diff --git a/javascript/AssetAdmin.js b/javascript/AssetAdmin.js index c0633bd6..60f380f5 100755 --- a/javascript/AssetAdmin.js +++ b/javascript/AssetAdmin.js @@ -16,33 +16,25 @@ var _HANDLER_FORMS = { }; (function($) { - $('.AssetAdmin').concrete('ss', function($) { - return { - onmatch: function() { - - this._super(); - } - }; - }); - + /** * Delete selected folders through "batch actions" tab. */ - $('#Form_BatchActionsForm').concrete('ss').register( - 'admin/assets/batchactions/delete', - function(ids) { - var confirmed = confirm( - ss.i18n.sprintf( - ss.i18n._t( - 'AssetAdmin.BATCHACTIONSDELETECONFIRM', - "Do you really want to delete %d folders?" - ), - ids.length - ) - ); - return (confirmed) ? ids : false; - } - ); + $(function() { + $('#Form_BatchActionsForm').concrete('ss').register( + // TODO Hardcoding of base URL + 'admin/assets/batchactions/delete', + function(ids) { + var confirmed = confirm( + ss.i18n.sprintf( + ss.i18n._t('AssetAdmin.BATCHACTIONSDELETECONFIRM'), + ids.length + ) + ); + return (confirmed) ? ids : false; + } + ); + }); $('#Form_SyncForm').concrete('ss', function($) { return { diff --git a/javascript/lang/en_US.js b/javascript/lang/en_US.js index 7b02665b..d90ed1f5 100644 --- a/javascript/lang/en_US.js +++ b/javascript/lang/en_US.js @@ -28,6 +28,6 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { 'LeftAndMain.CONFIRMUNSAVEDSHORT': "WARNING: Your changes have not been saved.", 'CMSMAIN.ALERTCLASSNAME': 'The page type will be updated after the page is saved', 'CMSMAIN.URLSEGMENTVALIDATION': 'URLs can only be made up of letters, digits and hyphens.', - 'AssetAdmin.BATCHACTIONSDELETECONFIRM': "Do you really want to delete %d folders?" + 'AssetAdmin.BATCHACTIONSDELETECONFIRM': "Do you really want to delete %s folders?" }); } \ No newline at end of file