Use new dialog to confirm favorite deletion

This commit is contained in:
Nathan Gray 2013-05-09 04:05:03 +00:00
parent 07a157ad1a
commit 73f1cd921b
2 changed files with 23 additions and 19 deletions

View File

@ -242,7 +242,9 @@ var et2_favorites = et2_dropdown_button.extend([et2_INextmatchHeader],
var name = $j(this).parentsUntil("li").parent().attr("id");
// Make sure first
if(!confirm(header.egw().lang("Delete") + " " +header.stored_filters[name].name +"?")) return;
var do_delete = function(button_id)
{
if(button_id != et2_dialog.YES_BUTTON) return;
// Hide the trash
$j(this).hide();
@ -261,7 +263,9 @@ var et2_favorites = et2_dropdown_button.extend([et2_INextmatchHeader],
header.init_filters(header);
}
}, $j(this).parentsUntil("li").parent());
}
et2_dialog.show_dialog(do_delete, (header.egw().lang("Delete") + " " +header.stored_filters[name].name +"?"),
"Delete", et2_dialog.YES_NO, et2_dialog.QUESTION_MESSAGE);
},
// Create & set filter options for dropdown menu

View File

@ -173,7 +173,7 @@ var et2_tabbox = et2_DOMWidget.extend(
}
// Add any extra tabs
if(this.options.tabs.length)
if(this.options.tabs)
{
var readonly = this.getArrayMgr("readonlys").getEntry(this.id) || {};
for(var i = 0; i < this.options.tabs.length; i++)