From 379a9cc41f04d36538aee11839c1222d408b4f99 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 18 Nov 2010 20:17:14 -0600 Subject: SUDO Rule Search and Details Pages The search and details pages for SUDO Rule have been added. Codes that are shared with HBAC have been moved to rule.js. The following methods were renamed for consistency: - ipa_details_load() -> ipa_details_refresh() - ipa_details_display() -> ipa_details_load() The ipa_details_cache has been removed because the cache is now stored in each widget. The index.xhtml has been removed. All references to it has been changed to index.html. The Unselect All checkbox has been fixed. Unnecessary parameter 'container' has been removed. The unit test has been updated and new test data has been added. --- install/static/widget.js | 139 ++++++++++++++++++++++++----------------------- 1 file changed, 70 insertions(+), 69 deletions(-) (limited to 'install/static/widget.js') diff --git a/install/static/widget.js b/install/static/widget.js index 6ed27dec..f6bc3d83 100755 --- a/install/static/widget.js +++ b/install/static/widget.js @@ -63,22 +63,22 @@ function ipa_widget(spec) { } function setup(container) { - this.container = container; + that.container = container; } - function load(container, result) { + function load(result) { } - function save(container) { + function save() { return []; } - function clear(container) { + function clear() { } that.is_dirty = function(container) { if (!that.values) return true; - var values = that.save(that.container); + var values = that.save(); if (values.length != that.values.length) return true; for (var i=0; iError: '+error_thrown.name+'

'); - that.container.append('

'+error_thrown.title+'

'); - that.container.append('

'+error_thrown.message+'

'); + var summary = $('span[name=summary]', that.tfoot).empty(); + summary.append('

Error: '+error_thrown.name+'

'); + summary.append('

'+error_thrown.title+'

'); + summary.append('

'+error_thrown.message+'

'); } var pkey = $.bbq.getState(that.entity_name + '-pkey', true) || ''; - ipa_cmd('show', [pkey], {'rights': true}, on_success, on_error, that.entity_name); + ipa_cmd('show', [pkey], {'all': true, 'rights': true}, on_success, on_error, that.entity_name); }; if (spec.columns) { @@ -670,6 +669,8 @@ function ipa_table_widget(spec) { } // methods that should be invoked by subclasses + that.table_init = that.init; + that.table_create = that.create; that.table_setup = that.setup; return that; @@ -795,7 +796,7 @@ function ipa_dialog(spec) { var record = {}; for (var i=0; i