summaryrefslogtreecommitdiffstats
path: root/install/ui/widget.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2011-08-18 13:46:44 +0200
committerEndi S. Dewata <edewata@redhat.com>2011-08-19 20:54:22 +0000
commit4a72593893f9037aafb8549e342c14f8bf34e1ae (patch)
treeac04b6f6fc8f70ee696faa67f5f6e88df5631307 /install/ui/widget.js
parent92780658b8149b87f1c0cab373b814c09de68975 (diff)
downloadfreeipa-4a72593893f9037aafb8549e342c14f8bf34e1ae.tar.gz
freeipa-4a72593893f9037aafb8549e342c14f8bf34e1ae.tar.xz
freeipa-4a72593893f9037aafb8549e342c14f8bf34e1ae.zip
Uncheck checkboxes in association after deletion
https://fedorahosted.org/freeipa/ticket/1639
Diffstat (limited to 'install/ui/widget.js')
-rw-r--r--install/ui/widget.js29
1 files changed, 20 insertions, 9 deletions
diff --git a/install/ui/widget.js b/install/ui/widget.js
index e30cacd7c..f88bba5c2 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -1263,16 +1263,11 @@ IPA.table_widget = function (spec) {
}).appendTo(th);
select_all_checkbox.change(function() {
- var checked = select_all_checkbox.is(':checked');
- select_all_checkbox.attr(
- 'title', checked ?
- IPA.messages.search.unselect_all :
- IPA.messages.search.select_all);
- var checkboxes = $('input[name=select]', that.tbody).get();
- for (var i=0; i<checkboxes.length; i++) {
- checkboxes[i].checked = checked;
+ if(select_all_checkbox.is(':checked')) {
+ that.select_all();
+ } else {
+ that.unselect_all();
}
- that.select_changed();
return false;
});
}
@@ -1449,6 +1444,21 @@ IPA.table_widget = function (spec) {
that.select_changed = function() {
};
+ that.select_all = function() {
+ $('input[name=select]', that.thead).attr('checked', true).
+ attr('title', IPA.messages.search.unselect_all);
+ $('input[name=select]', that.tbody).attr('checked', true);
+ that.select_changed();
+ };
+
+ that.unselect_all = function() {
+ $('input[name=select]', that.thead).attr('checked', false).
+ attr('title', IPA.messages.search.select_all);
+ $('input[name=select]', that.tbody).attr('checked', false);
+
+ that.select_changed();
+ };
+
that.empty = function() {
that.tbody.empty();
};
@@ -1464,6 +1474,7 @@ IPA.table_widget = function (spec) {
var record = that.get_record(result, i);
that.add_record(record);
}
+ that.unselect_all();
};
that.save = function() {