summaryrefslogtreecommitdiffstats
path: root/install/static/widget.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-01-11 09:51:09 +0700
committerAdam Young <ayoung@redhat.com>2011-01-11 21:33:35 -0500
commit409b6efa5f0d4149fb26513dd25259b9d0026840 (patch)
tree78eeb4cfc0c138ae4547656130554804e19511b8 /install/static/widget.js
parente79406a0f956dc827beb176d9a25d8b983f1fd23 (diff)
downloadfreeipa-409b6efa5f0d4149fb26513dd25259b9d0026840.tar.gz
freeipa-409b6efa5f0d4149fb26513dd25259b9d0026840.tar.xz
freeipa-409b6efa5f0d4149fb26513dd25259b9d0026840.zip
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.
Diffstat (limited to 'install/static/widget.js')
-rwxr-xr-xinstall/static/widget.js13
1 files changed, 12 insertions, 1 deletions
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;
}