mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
Merge pull request #1367 from open-sausages/pulls/4.0/module-loader
Implement RFC-7 JavaScript module loader
This commit is contained in:
commit
ddd6111755
@ -65,20 +65,8 @@ class AssetAdmin extends LeftAndMain implements PermissionProvider{
|
||||
|
||||
|
||||
Requirements::javascript(CMS_DIR . "/javascript/AssetAdmin.js");
|
||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.GridField.js');
|
||||
Requirements::add_i18n_javascript(CMS_DIR . '/javascript/lang', false, true);
|
||||
Requirements::css(CMS_DIR . "/css/screen.css");
|
||||
$frameworkDir = FRAMEWORK_DIR;
|
||||
Requirements::customScript(<<<JS
|
||||
_TREE_ICONS = {};
|
||||
_TREE_ICONS['Folder'] = {
|
||||
fileIcon: '$frameworkDir/javascript/tree/images/page-closedfolder.gif',
|
||||
openFolderIcon: '$frameworkDir/javascript/tree/images/page-openfolder.gif',
|
||||
closedFolderIcon: '$frameworkDir/javascript/tree/images/page-closedfolder.gif'
|
||||
};
|
||||
JS
|
||||
);
|
||||
|
||||
CMSBatchActionHandler::register('delete', 'AssetAdmin_DeleteBatchAction', 'Folder');
|
||||
}
|
||||
|
||||
@ -147,7 +135,7 @@ JS
|
||||
}
|
||||
|
||||
public function getEditForm($id = null, $fields = null) {
|
||||
Requirements::javascript(FRAMEWORK_DIR . '/javascript/AssetUploadField.js');
|
||||
Requirements::javascript(FRAMEWORK_DIR . '/javascript/dist/AssetUploadField.js');
|
||||
Requirements::css(FRAMEWORK_DIR . '/css/AssetUploadField.css');
|
||||
|
||||
$form = parent::getEditForm($id, $fields);
|
||||
|
Loading…
x
Reference in New Issue
Block a user