mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUG Fix issue with old asset-admin repeating "level up" button
BUG Fix incorrectly built dist files
This commit is contained in:
parent
8e9a243966
commit
7c151321b4
8
client/dist/js/AssetAdmin.js
vendored
8
client/dist/js/AssetAdmin.js
vendored
@ -42,7 +42,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.AssetAdmin.cms-edit-form .ss-gridfield .col-buttons .action.gridfield-button-delete, .AssetAdmin.cms-edit-form .Actions button.action.action-delete').entwine({
|
$('.AssetAdmin.cms-edit-form .ss-gridfield .col-buttons .action.gridfield-button-delete, .AssetAdmin.cms-edit-form .btn-toolbar button.action.action-delete').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
var msg;
|
var msg;
|
||||||
if (this.closest('.ss-gridfield-item').data('class') == 'Folder') {
|
if (this.closest('.ss-gridfield-item').data('class') == 'Folder') {
|
||||||
@ -103,11 +103,5 @@
|
|||||||
$('.AssetAdmin.cms-edit-form .ss-gridfield').reload();
|
$('.AssetAdmin.cms-edit-form .ss-gridfield').reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.AssetAdmin .grid-levelup').entwine({
|
|
||||||
onmatch: function onmatch() {
|
|
||||||
this.closest('.ui-tabs-panel').find('.cms-actions-row').prepend(this);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
326
client/dist/js/CMSMain.AddForm.js
vendored
326
client/dist/js/CMSMain.AddForm.js
vendored
@ -1,179 +1,193 @@
|
|||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define('ss.CMSMain.AddForm', ['jQuery'], factory);
|
define('ss.CMSMain.AddForm', ['jQuery'], factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
factory(require('jQuery'));
|
factory(require('jQuery'));
|
||||||
} else {
|
} else {
|
||||||
var mod = {
|
var mod = {
|
||||||
exports: {}
|
exports: {}
|
||||||
};
|
};
|
||||||
factory(global.jQuery);
|
factory(global.jQuery);
|
||||||
global.ssCMSMainAddForm = mod.exports;
|
global.ssCMSMainAddForm = mod.exports;
|
||||||
}
|
}
|
||||||
})(this, function (_jQuery) {
|
})(this, function (_jQuery) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||||
|
|
||||||
function _interopRequireDefault(obj) {
|
function _interopRequireDefault(obj) {
|
||||||
return obj && obj.__esModule ? obj : {
|
return obj && obj.__esModule ? obj : {
|
||||||
default: obj
|
default: obj
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
_jQuery2.default.entwine('ss', function ($) {
|
_jQuery2.default.entwine('ss', function ($) {
|
||||||
$(".cms-add-form .parent-mode :input").entwine({
|
$(".cms-add-form .parent-mode :input").entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
if (this.val() == 'top') {
|
if (this.val() == 'top') {
|
||||||
var parentField = this.closest('form').find('#Form_AddForm_ParentID_Holder .TreeDropdownField');
|
var parentField = this.closest('form').find('#Form_AddForm_ParentID_Holder .TreeDropdownField');
|
||||||
parentField.setValue('');
|
parentField.setValue('');
|
||||||
parentField.setTitle('');
|
parentField.setTitle('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".cms-add-form").entwine({
|
$(".cms-add-form").entwine({
|
||||||
ParentID: 0,
|
ParentID: 0,
|
||||||
ParentCache: {},
|
ParentCache: {},
|
||||||
onadd: function onadd() {
|
onadd: function onadd() {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.find('#Form_AddForm_ParentID_Holder .TreeDropdownField').bind('change', function () {
|
|
||||||
self.updateTypeList();
|
|
||||||
});
|
|
||||||
this.find(".SelectionGroup.parent-mode").bind('change', function () {
|
|
||||||
self.updateTypeList();
|
|
||||||
});
|
|
||||||
this.updateTypeList();
|
|
||||||
},
|
|
||||||
loadCachedChildren: function loadCachedChildren(parentID) {
|
|
||||||
var cache = this.getParentCache();
|
|
||||||
if (typeof cache[parentID] !== 'undefined') return cache[parentID];else return null;
|
|
||||||
},
|
|
||||||
saveCachedChildren: function saveCachedChildren(parentID, children) {
|
|
||||||
var cache = this.getParentCache();
|
|
||||||
cache[parentID] = children;
|
|
||||||
this.setParentCache(cache);
|
|
||||||
},
|
|
||||||
|
|
||||||
updateTypeList: function updateTypeList() {
|
this.find('#Form_AddForm_ParentID_Holder .TreeDropdownField').bind('change', function () {
|
||||||
var hints = this.data('hints'),
|
self.updateTypeList();
|
||||||
parentTree = this.find('#Form_AddForm_ParentID_Holder .TreeDropdownField'),
|
});
|
||||||
parentMode = this.find("input[name=ParentModeField]:checked").val(),
|
this.find(".SelectionGroup.parent-mode").bind('change', function () {
|
||||||
metadata = parentTree.data('metadata'),
|
self.updateTypeList();
|
||||||
id = metadata && parentMode === 'child' ? parentTree.getValue() || this.getParentID() : null,
|
});
|
||||||
newClassName = metadata ? metadata.ClassName : null,
|
this.updateTypeList();
|
||||||
hintKey = newClassName && parentMode === 'child' ? newClassName : 'Root',
|
},
|
||||||
hint = typeof hints[hintKey] !== 'undefined' ? hints[hintKey] : null,
|
loadCachedChildren: function loadCachedChildren(parentID) {
|
||||||
self = this,
|
var cache = this.getParentCache();
|
||||||
defaultChildClass = hint && typeof hint.defaultChild !== 'undefined' ? hint.defaultChild : null,
|
if (typeof cache[parentID] !== 'undefined') return cache[parentID];else return null;
|
||||||
disallowedChildren = [];
|
},
|
||||||
|
saveCachedChildren: function saveCachedChildren(parentID, children) {
|
||||||
|
var cache = this.getParentCache();
|
||||||
|
cache[parentID] = children;
|
||||||
|
this.setParentCache(cache);
|
||||||
|
},
|
||||||
|
|
||||||
if (id) {
|
updateTypeList: function updateTypeList() {
|
||||||
if (this.hasClass('loading')) return;
|
var hints = this.data('hints'),
|
||||||
this.addClass('loading');
|
parentTree = this.find('#Form_AddForm_ParentID_Holder .TreeDropdownField'),
|
||||||
|
parentMode = this.find("input[name=ParentModeField]:checked").val(),
|
||||||
|
metadata = parentTree.data('metadata'),
|
||||||
|
id = metadata && parentMode === 'child' ? parentTree.getValue() || this.getParentID() : null,
|
||||||
|
newClassName = metadata ? metadata.ClassName : null,
|
||||||
|
hintKey = newClassName && parentMode === 'child' ? newClassName : 'Root',
|
||||||
|
hint = typeof hints[hintKey] !== 'undefined' ? hints[hintKey] : null,
|
||||||
|
self = this,
|
||||||
|
defaultChildClass = hint && typeof hint.defaultChild !== 'undefined' ? hint.defaultChild : null,
|
||||||
|
disallowedChildren = [];
|
||||||
|
|
||||||
this.setParentID(id);
|
if (id) {
|
||||||
if (!parentTree.getValue()) parentTree.setValue(id);
|
if (this.hasClass('loading')) return;
|
||||||
|
this.addClass('loading');
|
||||||
|
|
||||||
disallowedChildren = this.loadCachedChildren(id);
|
this.setParentID(id);
|
||||||
if (disallowedChildren !== null) {
|
if (!parentTree.getValue()) parentTree.setValue(id);
|
||||||
this.updateSelectionFilter(disallowedChildren, defaultChildClass);
|
|
||||||
this.removeClass('loading');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$.ajax({
|
|
||||||
url: self.data('childfilter'),
|
|
||||||
data: { 'ParentID': id },
|
|
||||||
success: function success(data) {
|
|
||||||
self.saveCachedChildren(id, data);
|
|
||||||
self.updateSelectionFilter(data, defaultChildClass);
|
|
||||||
},
|
|
||||||
complete: function complete() {
|
|
||||||
self.removeClass('loading');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return false;
|
disallowedChildren = this.loadCachedChildren(id);
|
||||||
} else {
|
if (disallowedChildren !== null) {
|
||||||
disallowedChildren = hint && typeof hint.disallowedChildren !== 'undefined' ? hint.disallowedChildren : [], this.updateSelectionFilter(disallowedChildren, defaultChildClass);
|
this.updateSelectionFilter(disallowedChildren, defaultChildClass);
|
||||||
}
|
this.removeClass('loading');
|
||||||
},
|
return;
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
url: self.data('childfilter'),
|
||||||
|
data: { 'ParentID': id },
|
||||||
|
success: function success(data) {
|
||||||
|
self.saveCachedChildren(id, data);
|
||||||
|
self.updateSelectionFilter(data, defaultChildClass);
|
||||||
|
},
|
||||||
|
complete: function complete() {
|
||||||
|
self.removeClass('loading');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
updateSelectionFilter: function updateSelectionFilter(disallowedChildren, defaultChildClass) {
|
return false;
|
||||||
var allAllowed = null;
|
} else {
|
||||||
this.find('#Form_AddForm_PageType li').each(function () {
|
disallowedChildren = hint && typeof hint.disallowedChildren !== 'undefined' ? hint.disallowedChildren : [];
|
||||||
var className = $(this).find('input').val(),
|
this.updateSelectionFilter(disallowedChildren, defaultChildClass);
|
||||||
isAllowed = $.inArray(className, disallowedChildren) === -1;
|
}
|
||||||
|
},
|
||||||
|
|
||||||
$(this).setEnabled(isAllowed);
|
updateSelectionFilter: function updateSelectionFilter(disallowedChildren, defaultChildClass) {
|
||||||
if (!isAllowed) $(this).setSelected(false);
|
var allAllowed = null;
|
||||||
if (allAllowed === null) allAllowed = isAllowed;else allAllowed = allAllowed && isAllowed;
|
this.find('#Form_AddForm_PageType div.radio').each(function () {
|
||||||
});
|
var className = $(this).find('input').val(),
|
||||||
|
isAllowed = $.inArray(className, disallowedChildren) === -1;
|
||||||
|
|
||||||
if (defaultChildClass) {
|
$(this).setEnabled(isAllowed);
|
||||||
var selectedEl = this.find('#Form_AddForm_PageType li input[value=' + defaultChildClass + ']').parents('li:first');
|
if (!isAllowed) {
|
||||||
} else {
|
$(this).setSelected(false);
|
||||||
var selectedEl = this.find('#Form_AddForm_PageType li:not(.disabled):first');
|
}
|
||||||
}
|
if (allAllowed === null) {
|
||||||
selectedEl.setSelected(true);
|
allAllowed = isAllowed;
|
||||||
selectedEl.siblings().setSelected(false);
|
} else {
|
||||||
|
allAllowed = allAllowed && isAllowed;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var buttonState = this.find('#Form_AddForm_PageType li:not(.disabled)').length ? 'enable' : 'disable';
|
if (defaultChildClass) {
|
||||||
this.find('button[name=action_doAdd]').button(buttonState);
|
var selectedEl = this.find('#Form_AddForm_PageType div.radio input[value=' + defaultChildClass + ']').parents('li:first');
|
||||||
|
} else {
|
||||||
|
var selectedEl = this.find('#Form_AddForm_PageType div.radio:not(.disabled):first');
|
||||||
|
}
|
||||||
|
selectedEl.setSelected(true);
|
||||||
|
selectedEl.siblings().setSelected(false);
|
||||||
|
|
||||||
this.find('.message-restricted')[allAllowed ? 'hide' : 'show']();
|
var buttonState = this.find('#Form_AddForm_PageType div.radio:not(.disabled)').length ? 'enable' : 'disable';
|
||||||
}
|
this.find('button[name=action_doAdd]').button(buttonState);
|
||||||
});
|
|
||||||
|
|
||||||
$(".cms-add-form #Form_AddForm_PageType li").entwine({
|
this.find('.message-restricted')[allAllowed ? 'hide' : 'show']();
|
||||||
onclick: function onclick(e) {
|
}
|
||||||
this.setSelected(true);
|
});
|
||||||
},
|
|
||||||
setSelected: function setSelected(bool) {
|
|
||||||
var input = this.find('input');
|
|
||||||
if (bool && !input.is(':disabled')) {
|
|
||||||
this.siblings().setSelected(false);
|
|
||||||
this.toggleClass('selected', true);
|
|
||||||
input.prop('checked', true);
|
|
||||||
} else {
|
|
||||||
this.toggleClass('selected', false);
|
|
||||||
input.prop('checked', false);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setEnabled: function setEnabled(bool) {
|
|
||||||
$(this).toggleClass('disabled', !bool);
|
|
||||||
if (!bool) $(this).find('input').attr('disabled', 'disabled').removeAttr('checked');else $(this).find('input').removeAttr('disabled');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".cms-page-add-button").entwine({
|
$(".cms-add-form #Form_AddForm_PageType div.radio").entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
var tree = $('.cms-tree'),
|
this.setSelected(true);
|
||||||
list = $('.cms-list'),
|
},
|
||||||
parentId = 0;
|
setSelected: function setSelected(bool) {
|
||||||
|
var input = this.find('input');
|
||||||
|
if (bool && !input.is(':disabled')) {
|
||||||
|
this.siblings().setSelected(false);
|
||||||
|
this.toggleClass('selected', true);
|
||||||
|
input.prop('checked', true);
|
||||||
|
} else {
|
||||||
|
this.toggleClass('selected', false);
|
||||||
|
input.prop('checked', false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setEnabled: function setEnabled(bool) {
|
||||||
|
$(this).toggleClass('disabled', !bool);
|
||||||
|
if (!bool) {
|
||||||
|
$(this).find('input').attr('disabled', 'disabled').removeAttr('checked');
|
||||||
|
} else {
|
||||||
|
$(this).find('input').removeAttr('disabled');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (tree.is(':visible')) {
|
$(".cms-content-addpage-button").entwine({
|
||||||
var selected = tree.jstree('get_selected');
|
onclick: function onclick(e) {
|
||||||
parentId = selected ? $(selected[0]).data('id') : null;
|
var tree = $('.cms-tree'),
|
||||||
} else {
|
list = $('.cms-list'),
|
||||||
var state = list.find('input[name="Page[GridState]"]').val();
|
parentId = 0,
|
||||||
if (state) parentId = parseInt(JSON.parse(state).ParentID, 10);
|
extraParams;
|
||||||
}
|
|
||||||
|
|
||||||
var data = { selector: this.data('targetPanel'), pjax: this.data('pjax') },
|
if (tree.is(':visible')) {
|
||||||
url;
|
var selected = tree.jstree('get_selected');
|
||||||
if (parentId) {
|
parentId = selected ? $(selected[0]).data('id') : null;
|
||||||
extraParams = this.data('extraParams') ? this.data('extraParams') : '';
|
} else {
|
||||||
url = $.path.addSearchParams(i18n.sprintf(this.data('urlAddpage'), parentId), extraParams);
|
var state = list.find('input[name="Page[GridState]"]').val();
|
||||||
} else {
|
if (state) {
|
||||||
url = this.attr('href');
|
parentId = parseInt(JSON.parse(state).ParentID, 10);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$('.cms-container').loadPanel(url, null, data);
|
var data = { selector: this.data('targetPanel'), pjax: this.data('pjax') },
|
||||||
e.preventDefault();
|
url;
|
||||||
|
if (parentId) {
|
||||||
|
extraParams = this.data('extraParams') ? this.data('extraParams') : '';
|
||||||
|
url = $.path.addSearchParams(i18n.sprintf(this.data('urlAddpage'), parentId), extraParams);
|
||||||
|
} else {
|
||||||
|
url = this.attr('href');
|
||||||
|
}
|
||||||
|
$('.cms-container').loadPanel(url, null, data);
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
this.blur();
|
this.blur();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
16
client/dist/js/CMSMain.EditForm.js
vendored
16
client/dist/js/CMSMain.EditForm.js
vendored
@ -179,7 +179,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-edit-form .Actions #Form_EditForm_action_print').entwine({
|
$('.cms-edit-form .btn-toolbar #Form_EditForm_action_print').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
var printURL = $(this[0].form).attr('action').replace(/\?.*$/, '') + '/printable/' + $(':input[name=ID]', this[0].form).val();
|
var printURL = $(this[0].form).attr('action').replace(/\?.*$/, '') + '/printable/' + $(':input[name=ID]', this[0].form).val();
|
||||||
if (printURL.substr(0, 7) != 'http://') printURL = $('base').attr('href') + printURL;
|
if (printURL.substr(0, 7) != 'http://') printURL = $('base').attr('href') + printURL;
|
||||||
@ -190,7 +190,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-edit-form .Actions #Form_EditForm_action_rollback').entwine({
|
$('.cms-edit-form .btn-toolbar #Form_EditForm_action_rollback').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
var form = this.parents('form:first'),
|
var form = this.parents('form:first'),
|
||||||
version = form.find(':input[name=Version]').val(),
|
version = form.find(':input[name=Version]').val(),
|
||||||
@ -208,7 +208,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-edit-form .Actions #Form_EditForm_action_archive').entwine({
|
$('.cms-edit-form .btn-toolbar #Form_EditForm_action_archive').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
var form = this.parents('form:first'),
|
var form = this.parents('form:first'),
|
||||||
version = form.find(':input[name=Version]').val(),
|
version = form.find(':input[name=Version]').val(),
|
||||||
@ -222,7 +222,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-edit-form .Actions #Form_EditForm_action_restore').entwine({
|
$('.cms-edit-form .btn-toolbar #Form_EditForm_action_restore').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
var form = this.parents('form:first'),
|
var form = this.parents('form:first'),
|
||||||
version = form.find(':input[name=Version]').val(),
|
version = form.find(':input[name=Version]').val(),
|
||||||
@ -237,7 +237,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-edit-form .Actions #Form_EditForm_action_delete').entwine({
|
$('.cms-edit-form .btn-toolbar #Form_EditForm_action_delete').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
var form = this.parents('form:first'),
|
var form = this.parents('form:first'),
|
||||||
version = form.find(':input[name=Version]').val(),
|
version = form.find(':input[name=Version]').val(),
|
||||||
@ -251,7 +251,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-edit-form .Actions #Form_EditForm_action_unpublish').entwine({
|
$('.cms-edit-form .btn-toolbar #Form_EditForm_action_unpublish').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
var form = this.parents('form:first'),
|
var form = this.parents('form:first'),
|
||||||
version = form.find(':input[name=Version]').val(),
|
version = form.find(':input[name=Version]').val(),
|
||||||
@ -280,7 +280,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-edit-form .Actions button[name=action_publish]').entwine({
|
$('.cms-edit-form .btn-toolbar button[name=action_publish]').entwine({
|
||||||
onbuttonafterrefreshalternate: function onbuttonafterrefreshalternate() {
|
onbuttonafterrefreshalternate: function onbuttonafterrefreshalternate() {
|
||||||
if (this.button('option', 'showingAlternate')) {
|
if (this.button('option', 'showingAlternate')) {
|
||||||
this.addClass('ss-ui-action-constructive');
|
this.addClass('ss-ui-action-constructive');
|
||||||
@ -290,7 +290,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-edit-form .Actions button[name=action_save]').entwine({
|
$('.cms-edit-form .btn-toolbar button[name=action_save]').entwine({
|
||||||
onbuttonafterrefreshalternate: function onbuttonafterrefreshalternate() {
|
onbuttonafterrefreshalternate: function onbuttonafterrefreshalternate() {
|
||||||
if (this.button('option', 'showingAlternate')) {
|
if (this.button('option', 'showingAlternate')) {
|
||||||
this.addClass('ss-ui-action-constructive');
|
this.addClass('ss-ui-action-constructive');
|
||||||
|
@ -133,10 +133,4 @@ $.entwine('ss', function($){
|
|||||||
$('.AssetAdmin.cms-edit-form .ss-gridfield').reload();
|
$('.AssetAdmin.cms-edit-form .ss-gridfield').reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.AssetAdmin .grid-levelup').entwine({
|
|
||||||
onmatch: function () {
|
|
||||||
this.closest('.ui-tabs-panel').find('.cms-actions-row').prepend(this);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
@ -166,7 +166,7 @@ class AssetAdmin extends LeftAndMain implements PermissionProvider{
|
|||||||
new GridFieldEditButton(),
|
new GridFieldEditButton(),
|
||||||
new GridFieldDeleteAction(),
|
new GridFieldDeleteAction(),
|
||||||
new GridFieldDetailForm(),
|
new GridFieldDetailForm(),
|
||||||
GridFieldLevelup::create($folder->ID)->setLinkSpec('admin/assets/show/%d')
|
GridFieldLevelup::create($folder->ID)->setLinkSpec($this->Link('show') . '/%d')
|
||||||
);
|
);
|
||||||
|
|
||||||
$gridField = GridField::create('File', $title, $this->getList(), $gridFieldConfig);
|
$gridField = GridField::create('File', $title, $this->getList(), $gridFieldConfig);
|
||||||
|
@ -101,12 +101,15 @@ gulp.task('bundle-legacy', function bundleLeftAndMain() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('umd-cms', () => { // eslint-disable-line
|
gulp.task('umd-cms', () => { // eslint-disable-line
|
||||||
return transformToUmd(glob.sync(`${PATHS.CMS_JS_SRC}/*.js`), PATHS.CMS_JS_DIST);
|
return transformToUmd(glob.sync(
|
||||||
|
`${PATHS.CMS_JS_SRC}/**/*.js`,
|
||||||
|
{ ignore: `${PATHS.CMS_JS_SRC}/bundles/*` }
|
||||||
|
), PATHS.CMS_JS_DIST);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('umd-watch', () => { // eslint-disable-line
|
gulp.task('umd-watch', () => { // eslint-disable-line
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
gulp.watch(`${PATHS.CMS_JS_SRC}/*.js`, ['umd-cms']);
|
gulp.watch(`${PATHS.CMS_JS_SRC}/**/*.js`, ['umd-cms']);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user