mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Disabled AssetAdmin form reload after uploading through iframe, relies on old tree.js library - UI will change anyway
This commit is contained in:
parent
3b01a9af67
commit
91995ad73b
@ -281,13 +281,14 @@ JS
|
|||||||
$sFileIDs = implode(',', $fileIDs);
|
$sFileIDs = implode(',', $fileIDs);
|
||||||
$sFileNames = implode(',', $fileNames);
|
$sFileNames = implode(',', $fileNames);
|
||||||
|
|
||||||
echo <<<HTML
|
// TODO Will be replaced by new upload mechanism, refresh disabled for now
|
||||||
<script type="text/javascript">
|
// echo <<<HTML
|
||||||
var url = parent.document.getElementById('sitetree').getTreeNodeByIdx( "{$folder->ID}" ).getElementsByTagName('a')[0].href;
|
// <script type="text/javascript">
|
||||||
parent.jQuery('#Form_EditForm').entwine('ss').loadForm(url);
|
// var url = parent.document.getElementById('sitetree').getTreeNodeByIdx( "{$folder->ID}" ).getElementsByTagName('a')[0].href;
|
||||||
parent.statusMessage("{$statusMessage}","{$status}");
|
// parent.jQuery('#Form_EditForm').entwine('ss').loadForm(url);
|
||||||
</script>
|
// parent.statusMessage("{$statusMessage}","{$status}");
|
||||||
HTML;
|
// </script>
|
||||||
|
// HTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,7 +99,6 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
HtmlEditorConfig::get('cms')->setOption('spellchecker_languages', "+{$langName}={$this->Locale}");
|
HtmlEditorConfig::get('cms')->setOption('spellchecker_languages', "+{$langName}={$this->Locale}");
|
||||||
|
|
||||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.js');
|
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.js');
|
||||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.Tree.js');
|
|
||||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.EditForm.js');
|
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.EditForm.js');
|
||||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.Translatable.js');
|
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.Translatable.js');
|
||||||
|
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
/**
|
|
||||||
* File: CMSMain.Tree.js
|
|
||||||
*/
|
|
||||||
if(typeof SiteTreeHandlers == 'undefined') SiteTreeHandlers = {};
|
|
||||||
SiteTreeHandlers.parentChanged_url = 'admin/ajaxupdateparent';
|
|
||||||
SiteTreeHandlers.orderChanged_url = 'admin/ajaxupdatesort';
|
|
||||||
SiteTreeHandlers.loadPage_url = 'admin/getitem';
|
|
||||||
SiteTreeHandlers.loadTree_url = 'admin/getsubtree';
|
|
||||||
|
|
||||||
TreeContextMenu = {
|
|
||||||
'Edit this page' : function(treeNode) {
|
|
||||||
treeNode.selectTreeNode();
|
|
||||||
},
|
|
||||||
'Duplicate page and children' : function(treeNode) {
|
|
||||||
// First save the page silently (without confirmation) and then duplicate the page.
|
|
||||||
jQuery('#Form_EditForm').entwine('ss').ajaxSubmit(null, treeNode.duplicatePageWithChildren.bind(treeNode));
|
|
||||||
},
|
|
||||||
'Duplicate just this page' : function(treeNode) {
|
|
||||||
// First save the page silently (without confirmation) and then duplicate the page.
|
|
||||||
jQuery('#Form_EditForm').entwine('ss').ajaxSubmit(null, treeNode.duplicatePageWithChildren.bind(treeNode));
|
|
||||||
},
|
|
||||||
'Sort sub-pages' : function(treeNode) {
|
|
||||||
var children = treeNode.treeNodeHolder().childTreeNodes();
|
|
||||||
var sortedChildren = children.sort(function(a, b) {
|
|
||||||
var titleA = a.aTag.innerHTML.replace(/<[^>]*>/g,'');
|
|
||||||
var titleB = b.aTag.innerHTML.replace(/<[^>]*>/g,'');
|
|
||||||
return titleA < titleB ? -1 : (titleA > titleB ? 1 : 0);
|
|
||||||
});
|
|
||||||
|
|
||||||
var i,child;
|
|
||||||
for(i=0;child=sortedChildren[i];i++) {
|
|
||||||
treeNode.appendTreeNode(child);
|
|
||||||
}
|
|
||||||
|
|
||||||
treeNode.onOrderChanged(sortedChildren,treeNode);
|
|
||||||
}
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user