From 409b6efa5f0d4149fb26513dd25259b9d0026840 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 11 Jan 2011 09:51:09 +0700 Subject: Support for enabling/disabling table widget. The table widget now can be enabled/disabled. When disabled, the checkboxes and links/buttons are grayed out and non functional. The radio buttons in HBAC and SUDO details page have been modified to enable/disable the corresponding tables. --- install/static/widget.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'install/static/widget.js') diff --git a/install/static/widget.js b/install/static/widget.js index f13a8b6e..1aa945f2 100755 --- a/install/static/widget.js +++ b/install/static/widget.js @@ -155,7 +155,8 @@ function ipa_widget(spec) { error_link.css('display', 'none'); }; - + that.set_enabled = function() { + }; that.refresh = function() { }; @@ -164,6 +165,7 @@ function ipa_widget(spec) { that.widget_init = that.init; that.widget_create = that.create; that.widget_setup = that.setup; + that.widget_reset = that.reset; return that; } @@ -795,6 +797,14 @@ function ipa_table_widget(spec) { return rows; }; + that.set_enabled = function(enabled) { + if (enabled) { + $('input[name="select"]', that.table).attr('disabled', false); + } else { + $('input[name="select"]', that.table).attr('disabled', true); + } + }; + that.refresh = function() { function on_success(data, text_status, xhr) { @@ -822,6 +832,7 @@ function ipa_table_widget(spec) { that.table_init = that.init; that.table_create = that.create; that.table_setup = that.setup; + that.table_set_enabled = that.set_enabled; return that; } -- cgit