mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
ENHANCEMENT: Update Asset's left and right panels with filders and files after 'Look for new files' was triggered (open #5543)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@113871 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b8338bc2bc
commit
75f12d5a7e
@ -38,7 +38,8 @@ class AssetAdmin extends LeftAndMain {
|
||||
'sync',
|
||||
'uploadiframe',
|
||||
'UploadForm',
|
||||
'deleteUnusedThumbnails' => 'ADMIN'
|
||||
'deleteUnusedThumbnails' => 'ADMIN',
|
||||
'SitetreeAsUL'
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -345,6 +345,18 @@ FilesystemSyncClass.prototype = {
|
||||
new Ajax.Request('admin/assets/sync', {
|
||||
onSuccess: function(t) {
|
||||
statusMessage(t.responseText, "good");
|
||||
|
||||
// Refresh asset tree
|
||||
new Ajax.Request('admin/assets/SitetreeAsUL', {
|
||||
onSuccess: function(t) {
|
||||
Element.replace($('sitetree'), t.responseText);
|
||||
SiteTree.applyTo('#sitetree');
|
||||
|
||||
// Reload the right panel
|
||||
var sel = $('sitetree').firstSelected();
|
||||
if(sel !== undefined) sel.selectTreeNode();
|
||||
}
|
||||
});
|
||||
},
|
||||
onFailure: function(t) {
|
||||
errorMessage("There was an error looking for new files");
|
||||
|
Loading…
Reference in New Issue
Block a user