From b08a33c634e8c894cd742266d92c5d16fcf1d364 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Wed, 25 May 2016 18:52:10 -0400 Subject: cleanups, s/posted/public/ --- data/assets/js/admin/tabs/posts.js | 42 +++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 14 deletions(-) (limited to 'data/assets') diff --git a/data/assets/js/admin/tabs/posts.js b/data/assets/js/admin/tabs/posts.js index 6bd4c4c..f2e082d 100644 --- a/data/assets/js/admin/tabs/posts.js +++ b/data/assets/js/admin/tabs/posts.js @@ -23,22 +23,31 @@ jQuery(function($) { "", "", - "", - "%{user_name|h}", + "%{site_name|h}", "", "", "", - // TODO: make editable - "%{site_name|h}", + "%{post_url}", "", "", - "%{post_url}", + "", + "%{user_name|h}", + "", "", "", @@ -106,10 +115,11 @@ jQuery(function($) { .find('.loading').toggleClass('hidden'); send('post/get_posts', { - type: $('#posts-filter-type li.active a').data('id'), - state: $('#posts-filter-state li.active a').data('id'), - q: $('#posts-q').data('q'), - page: 1, + type: $('#posts-filter-type li.active a').data('id'), + state: $('#posts-filter-state li.active a').data('id'), + user_id: $('#posts-filter-user li.active a').data('id'), + q: $('#posts-q').data('q'), + page: 1, }).always(function() { $('#posts-reload').removeClass('disabled') .find('.loading').toggleClass('hidden'); @@ -199,10 +209,14 @@ jQuery(function($) { reload(); }); - $('#posts').on('click', 'a.edit-user', function() { + $('#posts').on('click', 'a.edit', function() { var data = $(this).data(); - $('#user-edit-dialog').data(data).modal('show'); + if (data.edit == 'user') { + $('#user-edit-dialog').data(data).modal('show'); + } else if (data.edit == 'site') { + alert('TODO: edit site'); + } // stop event return false; -- cgit v1.2.3