Skip to content

Commit

Permalink
File managers fixes - fix delete folder from sidebar and after create
Browse files Browse the repository at this point in the history
  • Loading branch information
cykod committed Aug 11, 2010
1 parent 208a825 commit d79d84a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/file/_create_folder.rjs
Expand Up @@ -6,5 +6,5 @@ page << 'FileEditor.showDetails();'

page << "setTimeout('FileEditor.refreshUploadedFolder(#{@folder.id},#{@parent_id})',10);"
page << "FileEditor.recreateDragAndDroppables();"

page << "FileEditor.highlightTreeFolder(#{@folder.id});"
page << "setTimeout('FileEditor.nameChange(#{@folder.id});',20); "
4 changes: 2 additions & 2 deletions app/views/file/_file_javascript.rhtml
Expand Up @@ -703,9 +703,9 @@ FileEditor = {



deleteSelected: function() {
deleteSelected: function(file_ids) {
if(confirm('<%= jh "Are you sure you want to delete the selected item(s)?" %>')) {
var itms = FileEditor.selectedItems;
var itms = file_ids ? file_ids : FileEditor.selectedItems;
var req = $H({ 'file_id[]' : itms });
new Ajax.Request('<%= url_for :controller => "file", :action => "delete_files" %>',
{ parameters : req.toQueryString() + FileEditor.sizeParameters(),
Expand Down
2 changes: 0 additions & 2 deletions app/views/file/details/_folder_details.rhtml
Expand Up @@ -6,10 +6,8 @@
<% if file.file_type_match(@select) -%>
<button onclick='FileEditor.callbackFile(<%= file.id %>);'>Select</button>
<% end -%>
<% if !defined?(folder_just_loaded) || folder_just_loaded != true -%>
<button onclick='FileEditor.folderArchive(<%= file.id %>);'>Create Archive</button>
<button class='last' onclick='FileEditor.deleteSelected([<%= file.id %>]);'>Delete</button>
<% end -%>
<div style='clear:both;'></div>
</div>

Expand Down

0 comments on commit d79d84a

Please sign in to comment.