Successful action notification

User was not notified about success of actions executed from action list, action panel or facet cotrol bar.

This patch adds IPA.notify_success(message) call. It creates a yellow notification area with supplied message in Web UI header in the middle of the green area (empty space of first level navigation).
This area is displayed for 3s and then it fades out (800ms). It also fades out when it is clicked.

This call is used(directly or indirectly) in:
 * search facets: delete, disable, enable actions
 * details facets: delete action
 * user details facet: reset password action
 * host details facet: unprovision, set OTP actions
 * service details facet: unprovision action
 * host and service details facet: request, revoke, restore certificates actions
 * group details facet: change to POSIX/external actions
 * dns zone details facet: add/remove permission actions

 https://fedorahosted.org/freeipa/ticket/2977
This commit is contained in:
Petr Vobornik
2012-08-27 10:57:47 +02:00
parent 7d3aa96103
commit 81007ff385
15 changed files with 136 additions and 82 deletions

View File

@@ -57,20 +57,12 @@ IPA.user.entity = function(spec) {
],
actions: [
{
name: 'disable',
factory: IPA.batch_items_action,
method: 'disable',
needs_confirm: true,
hide_cond: ['self-service'],
enable_cond: ['item-selected']
factory: IPA.batch_disable_action,
hide_cond: ['self-service']
},
{
name: 'enable',
factory: IPA.batch_items_action,
method: 'enable',
needs_confirm: true,
hide_cond: ['self-service'],
enable_cond: ['item-selected']
factory: IPA.batch_enable_action,
hide_cond: ['self-service']
}
],
control_buttons: [
@@ -614,7 +606,7 @@ IPA.user_password_dialog = function(spec) {
if (that.success_handler) {
that.success_handler.call(this, data, text_status, xhr);
} else {
alert(IPA.messages.password.password_change_complete);
IPA.notify_success(IPA.messages.password.password_change_complete);
that.close();
// refresh password expiration field