Hi,
with DOM enabled users can not drag and drop files to other folders in "Files & Images".
There is a setting to disable DOM for the assets folder: DataObjectManager::allow_assets_override
Since one of our customers wants dom enabled most the time, but sometimes needs to move files we added a config option for him:
Create a file named "CustomAssetAdmin.php":
<?php
class CustomAssetAdmin extends DataObjectDecorator {
function init() {
$config = SiteConfig::current_site_config();
DataObjectManager::allow_assets_override($config->DomAllowAssetsOverride);
}
}
?>
Add the option to your siteconfig: "CustomSiteConfig.php":
<?php
class CustomSiteConfig extends DataObjectDecorator {
function extraStatics() {
return array(
'db' => array(
'DomAllowAssetsOverride' => 'boolean'
)
);
}
public function updateCMSFields(FieldSet &$fields) {
$fields->addFieldToTab('Root.Settings', new CheckBoxField('DomAllowAssetsOverride','DOM in "Dateien und Bilder" verwenden?')); }
}
?>
Add these to your _config.php
DataObject::add_extension('SiteConfig', 'CustomSiteConfig');
Object::add_extension('AssetAdmin', 'CustomAssetAdmin');
That gives your users the option to enable/disable DOM for the assets folder on demand.
Johannes