webui: select all checkbox remains selected after operation
The select all checkbox remained selected after bulk operation. This patch fixes it, after any bulk modify or delete operation, unselect_all function is called. https://fedorahosted.org/freeipa/ticket/4245 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
1 parent
5d832c3426
commit
6aeb138e46
3 files changed
+9
-1
No files matched your search
@@ -1203,6 +1203,7 @@ exp.association_facet = IPA.association_facet = function (spec, no_init) {
|
||||
method: that.remove_method,
|
||||
on_success: function(data) {
|
||||
that.refresh();
|
||||
that.table.unselect_all();
|
||||
|
||||
var succeeded = IPA.get_succeeded(data);
|
||||
var msg = text.get('@i18n:association.removed').replace('${count}', succeeded);
|
||||
@@ -1473,6 +1474,7 @@ exp.attribute_facet = IPA.attribute_facet = function(spec, no_init) {
|
||||
function(data) {
|
||||
that.load(data);
|
||||
that.show_content();
|
||||
that.table.unselect_all();
|
||||
|
||||
var succeeded = IPA.get_succeeded(data);
|
||||
var msg = text.get('@i18n:association.removed').replace('${count}', succeeded);
|
||||
|
||||
@@ -885,6 +885,8 @@ IPA.adder_dialog = function(spec) {
|
||||
that.add = function() {
|
||||
var rows = that.available_table.remove_selected_rows();
|
||||
that.selected_table.add_rows(rows);
|
||||
that.available_table.unselect_all();
|
||||
that.selected_table.unselect_all();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -893,6 +895,8 @@ IPA.adder_dialog = function(spec) {
|
||||
that.remove = function() {
|
||||
var rows = that.selected_table.remove_selected_rows();
|
||||
that.available_table.add_rows(rows);
|
||||
that.available_table.unselect_all();
|
||||
that.selected_table.unselect_all();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1357,4 +1361,4 @@ dialog_builder.factory = IPA.dialog;
|
||||
reg.set('dialog', dialog_builder.registry);
|
||||
|
||||
return {};
|
||||
});
|
||||
});
|
||||
@@ -353,6 +353,7 @@ IPA.search_deleter_dialog = function(spec) {
|
||||
batch.on_success = function(data, text_status, xhr) {
|
||||
that.facet.refresh();
|
||||
that.facet.on_update.notify([],that.facet);
|
||||
that.facet.table.unselect_all();
|
||||
var succeeded = batch.commands.length - batch.errors.errors.length;
|
||||
var msg = text.get('@i18n:search.deleted').replace('${count}', succeeded);
|
||||
IPA.notify_success(msg);
|
||||
@@ -505,6 +506,7 @@ IPA.batch_items_action = function(spec) {
|
||||
that.on_success = function(facet, data, text_status, xhr) {
|
||||
facet.on_update.notify();
|
||||
facet.refresh();
|
||||
facet.table.unselect_all();
|
||||
|
||||
if (that.success_msg) {
|
||||
var succeeded = that.batch.commands.length - that.batch.errors.errors.length;
|
||||
|
||||
Reference in new issue
Block a user