From 8f45c0e639d0b73e9e5f9c8de599f1541321b01d Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 29 Nov 2013 14:52:52 +0000 Subject: [PATCH] Replace old dialog delete dialog with new dialog in addressbook edit popup --- addressbook/js/app.js | 21 +++++++++++++++++++++ addressbook/templates/default/edit.xet | 12 ++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/addressbook/js/app.js b/addressbook/js/app.js index f609cc299a..808d5fcc62 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -78,6 +78,27 @@ app.classes.addressbook = AppJS.extend( }); }, + /** + * Creat a dialog for delete action in edit popup window. + * + * @param _action + * @param _senders + * + */ + delete_contact: function(_action, _senders) + { + var that = this; + var buttonId = _senders.id; + var callbackDeleteDialog = function (button_id) + { + if (button_id == et2_dialog.YES_BUTTON ) + { + that.et2._inst.submit(buttonId); + } + } + et2_dialog.show_dialog(callbackDeleteDialog, this.egw.lang("Do you really want to delete this contact?"),this.egw.lang("Delete"), {},et2_dialog.BUTTONS_YES_NO_CANCEL, et2_dialog.WARNING_MESSAGE); + }, + /** * Add appointment or show calendar for selected contacts, call default nm_action after some checks * diff --git a/addressbook/templates/default/edit.xet b/addressbook/templates/default/edit.xet index 8a927f3edd..0792df393d 100644 --- a/addressbook/templates/default/edit.xet +++ b/addressbook/templates/default/edit.xet @@ -114,12 +114,12 @@ - + - + @@ -135,12 +135,12 @@ - + - + @@ -636,9 +636,9 @@