From 34372b86c5e98530f4142c3a5216574f0e1d12d6 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 31 Dec 2008 09:50:25 +0000 Subject: Ajaxify the permissions browsing dialog. It only does allow/deny right now, it doesn't allow you to reset to inherited values. That's next. --- core/views/permissions_edit.html.php | 15 +++++++++++++-- core/views/permissions_form.html.php | 8 ++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'core/views') diff --git a/core/views/permissions_edit.html.php b/core/views/permissions_edit.html.php index ee561091..599ba520 100644 --- a/core/views/permissions_edit.html.php +++ b/core/views/permissions_edit.html.php @@ -6,8 +6,19 @@ url: form_url, success: function(data) { $("div.form").slideUp(); - var el = $("div#edit-" + id); - el.html(data).slideDown(); + $("div#edit-" + id).html(data).slideDown(); + } + }); + } + + var action_url = ""; + var form_url = ""; + set = function(cmd, group_id, perm_id, item_id) { + $.ajax({ + url: action_url.replace("__CMD__", cmd).replace("__GROUP__", group_id). + replace("__PERM__", perm_id).replace("__ITEM__", item_id), + success: function(data) { + $("div#edit-" + item_id).load(form_url.replace("__ITEM__", item_id)); } }); } diff --git a/core/views/permissions_form.html.php b/core/views/permissions_form.html.php index 4933d6f2..80fbedf6 100644 --- a/core/views/permissions_form.html.php +++ b/core/views/permissions_form.html.php @@ -22,9 +22,13 @@ denied locked - allowed + + + - denied + + + -- cgit v1.2.3