diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index be920ce64e6..9a21f53b3b4 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1672,11 +1672,6 @@ function VirtualPages() { */ function getCMSFields() { require_once("forms/Form.php"); - Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/prototype/prototype.js"); - Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js"); - Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js"); - Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang'); - Requirements::javascript(SAPPHIRE_DIR . '/javascript/UpdateURL.js'); // Status / message // Create a status message for multiple parents diff --git a/docs/en/reference/leftandmain.md b/docs/en/reference/leftandmain.md index c1365e40414..3c3b5ae4e22 100644 --- a/docs/en/reference/leftandmain.md +++ b/docs/en/reference/leftandmain.md @@ -6,12 +6,6 @@ LeftAndMain is the base class of all the admin area controllers. ## Best Practices -### Refreshing - -Please use LeftAndMain::ForceReload to reload the whole form-area after an Ajax-Request. If you just need to refresh -parts of the form, please use javascript-replacement in the response of the original Ajax-Request. Consider using -`[api:Form]` for compiling Ajax-Responses and automatic detection of Ajax/Non-Ajax-Calls. - ### Custom Access Checking You can customize access control in `[api:LeftAndMain]`. diff --git a/filesystem/Folder.php b/filesystem/Folder.php index 2a6c43d677a..8dddaaf3079 100755 --- a/filesystem/Folder.php +++ b/filesystem/Folder.php @@ -25,6 +25,12 @@ class Folder extends File { static $default_sort = "\"Sort\""; + function populateDefaults() { + parent::populateDefaults(); + + if(!$this->Name) $this->Name = _t('AssetAdmin.NEWFOLDER',"NewFolder"); + } + /** * Find the given folder or create it both as {@link Folder} database records * and on the filesystem. If necessary, creates parent folders as well. diff --git a/javascript/layout_helpers.js b/javascript/layout_helpers.js deleted file mode 100755 index 1e9f9d88efa..00000000000 --- a/javascript/layout_helpers.js +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Stretch an object out to fill its parent. Give space for siblings - * If Mozilla didn't have a funky bug, we could *maybe* do this without JavaScript - * - * A more robust stretchObject() replacement - */ -function fitToParent(el, tweakVal) { - if(typeof el == "string") { - var elName = el; - el = document.getElementById(el); - if(!el) /*throw("fitToParent: Can't find element '" + elName + "'")*/ return; - } - var height = getFittingHeight(el, tweakVal) + 'px'; - el.style.height = height; -} - -function getFittingHeight(el, tweakVal, ignoreElements) { - if(typeof el == "string") el = document.getElementById(el); - - // we set overflow = hidden so that large children don't muck things up - if(el.parentNode && el.parentNode != document.body) { - if(getDimension(el.parentNode,'overflow',true) != 'auto') el.parentNode.style.overflow = 'hidden'; - } - - var otherHeight = 0; - - var notAComment; - if(el.parentNode) { - for(var i=0;i