From a7f60c7d45bdd215582e61c1c37655d7a4845e32 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Wed, 20 Apr 2011 18:29:33 -0500 Subject: [PATCH] add confirm dialog for helpers --- www/extras/admin/admin.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/extras/admin/admin.js b/www/extras/admin/admin.js index d16d1d08d..4a52ff0e4 100644 --- a/www/extras/admin/admin.js +++ b/www/extras/admin/admin.js @@ -581,11 +581,19 @@ WebGUI.Admin.prototype.getHelperHandler = function ( assetId, helperId, helper ) { if ( helper.url ) { return bind( this, function(){ + // a confirmation dialog + if ( helper.confirm && !confirm( helper.confirm ) ) { + return; + } this.gotoAsset( helper.url ) } ); } return bind( this, function(){ + // a confirmation dialog + if ( helper.confirm && !confirm( helper.confirm ) ) { + return; + } this.requestHelper( helperId, assetId ) } ); };