Skip to content

Commit

Permalink
MINOR Removed unused action_upload_right() and save() overloading in …
Browse files Browse the repository at this point in the history
…AssetAdmin.js

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92709 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed Nov 21, 2009
1 parent 8c37f08 commit fef2f77
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions javascript/AssetAdmin.js
Expand Up @@ -15,42 +15,6 @@ var _HANDLER_FORMS = {
sortitems : 'sortitems_options' sortitems : 'sortitems_options'
}; };


/**
* Top-right actions
*/

function action_upload_right(e) {
if(frames['AssetAdmin_upload'].document && frames['AssetAdmin_upload'].document.getElementById('Form_UploadForm')) {
// make sure at least one file is selected for upload
var values = "";
var inputs = $A(frames['AssetAdmin_upload'].document.getElementsByTagName("input"));
inputs.each(function(input) {
if(input.type == "file") values += input.value;
}.bind(this));

if(values.length == 0) {
alert("Please select at least one file for uploading");
openTab("Root_Upload");
} else {
frames['AssetAdmin_upload'].document.getElementById('Form_UploadForm').submit();
}
}
Event.stop(e);
return false;
}

/**
* Set up save folder name action
*/
Behaviour.register( {
'#Form_EditForm_save': {
onclick : function() {
$('Form_EditForm').save(false, null, 'save', false);
return false;
}
}
});

MarkingPropertiesButton = Class.create(); MarkingPropertiesButton = Class.create();
MarkingPropertiesButton.applyTo('#Form_EditForm_deletemarked', "Please select some files to delete!", 'deletemarked', 'Do you really want to delete the marked files?'); MarkingPropertiesButton.applyTo('#Form_EditForm_deletemarked', "Please select some files to delete!", 'deletemarked', 'Do you really want to delete the marked files?');


Expand Down

0 comments on commit fef2f77

Please sign in to comment.