mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge remote-tracking branch 'origin/3'
This commit is contained in:
commit
b4c4c636f2
78
javascript/dist/AssetAdmin.js
vendored
78
javascript/dist/AssetAdmin.js
vendored
@ -23,17 +23,45 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* File: AssetAdmin.js
|
||||||
|
*/
|
||||||
|
|
||||||
_jQuery2.default.entwine('ss', function ($) {
|
_jQuery2.default.entwine('ss', function ($) {
|
||||||
|
/**
|
||||||
|
* Delete selected folders through "batch actions" tab.
|
||||||
|
*/
|
||||||
|
/* assets don't currently have batch actions; disabling for now
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#Form_BatchActionsForm').entwine('.ss.tree').register(
|
||||||
|
// TODO Hardcoding of base URL
|
||||||
|
'admin/assets/batchactions/delete',
|
||||||
|
function(ids) {
|
||||||
|
var confirmed = confirm(
|
||||||
|
i18n.sprintf(
|
||||||
|
i18n._t('AssetAdmin.BATCHACTIONSDELETECONFIRM'),
|
||||||
|
ids.length
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return (confirmed) ? ids : false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load folder detail view via controller methods
|
||||||
|
* rather than built-in GridField view (which is only geared towards showing files).
|
||||||
|
*/
|
||||||
$('.AssetAdmin.cms-edit-form .ss-gridfield-item').entwine({
|
$('.AssetAdmin.cms-edit-form .ss-gridfield-item').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
|
// Let actions do their own thing
|
||||||
if ($(e.target).closest('.action').length) {
|
if ($(e.target).closest('.action').length) {
|
||||||
this._super(e);
|
this._super(e);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var grid = this.closest('.ss-gridfield');
|
var grid = this.closest('.ss-gridfield');
|
||||||
|
|
||||||
if (this.data('class') == 'Folder') {
|
if (this.data('class') == 'Folder') {
|
||||||
var url = grid.data('urlFolderTemplate').replace('%s', this.data('id'));
|
var url = grid.data('urlFolderTemplate').replace('%s', this.data('id'));
|
||||||
$('.cms-container').loadPanel(url);
|
$('.cms-container').loadPanel(url);
|
||||||
@ -43,41 +71,56 @@
|
|||||||
this._super(e);
|
this._super(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.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 .Actions 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') {
|
||||||
msg = _i18n2.default._t('AssetAdmin.ConfirmDelete');
|
msg = _i18n2.default._t('AssetAdmin.ConfirmDelete');
|
||||||
} else {
|
} else {
|
||||||
msg = _i18n2.default._t('TABLEFIELD.DELETECONFIRMMESSAGE');
|
msg = _i18n2.default._t('TABLEFIELD.DELETECONFIRMMESSAGE');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!confirm(msg)) return false;
|
if (!confirm(msg)) return false;
|
||||||
this.getGridField().reload({
|
|
||||||
data: [{
|
this.getGridField().reload({ data: [{ name: this.attr('name'), value: this.val() }] });
|
||||||
name: this.attr('name'),
|
|
||||||
value: this.val()
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.AssetAdmin.cms-edit-form :submit[name=action_delete]').entwine({
|
$('.AssetAdmin.cms-edit-form :submit[name=action_delete]').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
if (!confirm(_i18n2.default._t('AssetAdmin.ConfirmDelete'))) return false;else this._super(e);
|
if (!confirm(_i18n2.default._t('AssetAdmin.ConfirmDelete'))) return false;else this._super(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prompt for a new foldername, rather than using dedicated form.
|
||||||
|
* Better usability, but less flexibility in terms of inputs and validation.
|
||||||
|
* Mainly necessary because AssetAdmin->AddForm() returns don't play nicely
|
||||||
|
* with the nested AssetAdmin->EditForm() DOM structures.
|
||||||
|
*/
|
||||||
$('.AssetAdmin .cms-add-folder-link').entwine({
|
$('.AssetAdmin .cms-add-folder-link').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
var name = prompt(_i18n2.default._t('Folder.Name'));
|
var name = prompt(_i18n2.default._t('Folder.Name'));
|
||||||
if (!name) return false;
|
if (!name) return false;
|
||||||
|
|
||||||
this.closest('.cms-container').loadPanel(this.data('url') + '&Name=' + name);
|
this.closest('.cms-container').loadPanel(this.data('url') + '&Name=' + name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: #Form_SyncForm
|
||||||
|
*/
|
||||||
$('#Form_SyncForm').entwine({
|
$('#Form_SyncForm').entwine({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: onsubmit
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* (Event) e
|
||||||
|
*/
|
||||||
onsubmit: function onsubmit(e) {
|
onsubmit: function onsubmit(e) {
|
||||||
var button = jQuery(this).find(':submit:first');
|
var button = jQuery(this).find(':submit:first');
|
||||||
button.addClass('loading');
|
button.addClass('loading');
|
||||||
@ -86,27 +129,32 @@
|
|||||||
data: this.serializeArray(),
|
data: this.serializeArray(),
|
||||||
success: function success() {
|
success: function success() {
|
||||||
button.removeClass('loading');
|
button.removeClass('loading');
|
||||||
|
// reload current form and tree
|
||||||
var currNode = $('.cms-tree')[0].firstSelected();
|
var currNode = $('.cms-tree')[0].firstSelected();
|
||||||
|
|
||||||
if (currNode) {
|
if (currNode) {
|
||||||
var url = $(currNode).find('a').attr('href');
|
var url = $(currNode).find('a').attr('href');
|
||||||
$('.cms-content').loadPanel(url);
|
$('.cms-content').loadPanel(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.cms-tree')[0].setCustomURL('admin/assets/getsubtree');
|
$('.cms-tree')[0].setCustomURL('admin/assets/getsubtree');
|
||||||
$('.cms-tree')[0].reload({
|
$('.cms-tree')[0].reload({ onSuccess: function onSuccess() {
|
||||||
onSuccess: function onSuccess() {}
|
// TODO Reset current tree node
|
||||||
});
|
} });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reload the gridfield to show the user the file has been added
|
||||||
|
*/
|
||||||
$('.AssetAdmin.cms-edit-form .ss-uploadfield-item-progress').entwine({
|
$('.AssetAdmin.cms-edit-form .ss-uploadfield-item-progress').entwine({
|
||||||
onunmatch: function onunmatch() {
|
onunmatch: function onunmatch() {
|
||||||
$('.AssetAdmin.cms-edit-form .ss-gridfield').reload();
|
$('.AssetAdmin.cms-edit-form .ss-gridfield').reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.AssetAdmin .grid-levelup').entwine({
|
$('.AssetAdmin .grid-levelup').entwine({
|
||||||
onmatch: function onmatch() {
|
onmatch: function onmatch() {
|
||||||
this.closest('.ui-tabs-panel').find('.cms-actions-row').prepend(this);
|
this.closest('.ui-tabs-panel').find('.cms-actions-row').prepend(this);
|
||||||
|
58
javascript/dist/CMSMain.AddForm.js
vendored
58
javascript/dist/CMSMain.AddForm.js
vendored
@ -22,6 +22,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
_jQuery2.default.entwine('ss', function ($) {
|
_jQuery2.default.entwine('ss', function ($) {
|
||||||
|
/**
|
||||||
|
* Reset the parent node selection if the type is
|
||||||
|
* set back to "toplevel page", to avoid submitting inconsistent state.
|
||||||
|
*/
|
||||||
$(".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') {
|
||||||
@ -31,9 +35,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".cms-add-form").entwine({
|
$(".cms-add-form").entwine({
|
||||||
ParentID: 0,
|
ParentID: 0, // Last selected parentID
|
||||||
ParentCache: {},
|
ParentCache: {}, // Cache allowed children for each selected page
|
||||||
onadd: function onadd() {
|
onadd: function onadd() {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.find('#Form_AddForm_ParentID_Holder .TreeDropdownField').bind('change', function () {
|
this.find('#Form_AddForm_ParentID_Holder .TreeDropdownField').bind('change', function () {
|
||||||
@ -53,6 +58,12 @@
|
|||||||
cache[parentID] = children;
|
cache[parentID] = children;
|
||||||
this.setParentCache(cache);
|
this.setParentCache(cache);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Limit page type selection based on parent selection.
|
||||||
|
* Select of root classes is pre-computed, but selections with a given parent
|
||||||
|
* are updated on-demand.
|
||||||
|
* Similar implementation to LeftAndMain.Tree.js.
|
||||||
|
*/
|
||||||
updateTypeList: function updateTypeList() {
|
updateTypeList: function updateTypeList() {
|
||||||
var hints = this.data('hints'),
|
var hints = this.data('hints'),
|
||||||
parentTree = this.find('#Form_AddForm_ParentID_Holder .TreeDropdownField'),
|
parentTree = this.find('#Form_AddForm_ParentID_Holder .TreeDropdownField'),
|
||||||
@ -67,24 +78,26 @@
|
|||||||
disallowedChildren = [];
|
disallowedChildren = [];
|
||||||
|
|
||||||
if (id) {
|
if (id) {
|
||||||
|
// Prevent interface operations
|
||||||
if (this.hasClass('loading')) return;
|
if (this.hasClass('loading')) return;
|
||||||
this.addClass('loading');
|
this.addClass('loading');
|
||||||
|
|
||||||
|
// Enable last parent ID to be re-selected from memory
|
||||||
this.setParentID(id);
|
this.setParentID(id);
|
||||||
if (!parentTree.getValue()) parentTree.setValue(id);
|
if (!parentTree.getValue()) parentTree.setValue(id);
|
||||||
disallowedChildren = this.loadCachedChildren(id);
|
|
||||||
|
|
||||||
|
// Use cached data if available
|
||||||
|
disallowedChildren = this.loadCachedChildren(id);
|
||||||
if (disallowedChildren !== null) {
|
if (disallowedChildren !== null) {
|
||||||
this.updateSelectionFilter(disallowedChildren, defaultChildClass);
|
this.updateSelectionFilter(disallowedChildren, defaultChildClass);
|
||||||
this.removeClass('loading');
|
this.removeClass('loading');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: self.data('childfilter'),
|
url: self.data('childfilter'),
|
||||||
data: {
|
data: { 'ParentID': id },
|
||||||
'ParentID': id
|
|
||||||
},
|
|
||||||
success: function success(data) {
|
success: function success(data) {
|
||||||
|
// reload current form and tree
|
||||||
self.saveCachedChildren(id, data);
|
self.saveCachedChildren(id, data);
|
||||||
self.updateSelectionFilter(data, defaultChildClass);
|
self.updateSelectionFilter(data, defaultChildClass);
|
||||||
},
|
},
|
||||||
@ -92,41 +105,53 @@
|
|||||||
self.removeClass('loading');
|
self.removeClass('loading');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
disallowedChildren = hint && typeof hint.disallowedChildren !== 'undefined' ? hint.disallowedChildren : [], this.updateSelectionFilter(disallowedChildren, defaultChildClass);
|
disallowedChildren = hint && typeof hint.disallowedChildren !== 'undefined' ? hint.disallowedChildren : [], this.updateSelectionFilter(disallowedChildren, defaultChildClass);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Update the selection filter with the given blacklist and default selection
|
||||||
|
*
|
||||||
|
* @param array disallowedChildren
|
||||||
|
* @param string defaultChildClass
|
||||||
|
*/
|
||||||
updateSelectionFilter: function updateSelectionFilter(disallowedChildren, defaultChildClass) {
|
updateSelectionFilter: function updateSelectionFilter(disallowedChildren, defaultChildClass) {
|
||||||
var allAllowed = null;
|
// Limit selection
|
||||||
|
var allAllowed = null; // troolian
|
||||||
this.find('#Form_AddForm_PageType li').each(function () {
|
this.find('#Form_AddForm_PageType li').each(function () {
|
||||||
var className = $(this).find('input').val(),
|
var className = $(this).find('input').val(),
|
||||||
isAllowed = $.inArray(className, disallowedChildren) === -1;
|
isAllowed = $.inArray(className, disallowedChildren) === -1;
|
||||||
|
|
||||||
$(this).setEnabled(isAllowed);
|
$(this).setEnabled(isAllowed);
|
||||||
if (!isAllowed) $(this).setSelected(false);
|
if (!isAllowed) $(this).setSelected(false);
|
||||||
if (allAllowed === null) allAllowed = isAllowed;else allAllowed = allAllowed && isAllowed;
|
if (allAllowed === null) allAllowed = isAllowed;else allAllowed = allAllowed && isAllowed;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Set default child selection, or fall back to first available option
|
||||||
if (defaultChildClass) {
|
if (defaultChildClass) {
|
||||||
var selectedEl = this.find('#Form_AddForm_PageType li input[value=' + defaultChildClass + ']').parents('li:first');
|
var selectedEl = this.find('#Form_AddForm_PageType li input[value=' + defaultChildClass + ']').parents('li:first');
|
||||||
} else {
|
} else {
|
||||||
var selectedEl = this.find('#Form_AddForm_PageType li:not(.disabled):first');
|
var selectedEl = this.find('#Form_AddForm_PageType li:not(.disabled):first');
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedEl.setSelected(true);
|
selectedEl.setSelected(true);
|
||||||
selectedEl.siblings().setSelected(false);
|
selectedEl.siblings().setSelected(false);
|
||||||
|
|
||||||
|
// Disable the "Create" button if none of the pagetypes are available
|
||||||
var buttonState = this.find('#Form_AddForm_PageType li:not(.disabled)').length ? 'enable' : 'disable';
|
var buttonState = this.find('#Form_AddForm_PageType li:not(.disabled)').length ? 'enable' : 'disable';
|
||||||
this.find('button[name=action_doAdd]').button(buttonState);
|
this.find('button[name=action_doAdd]').button(buttonState);
|
||||||
|
|
||||||
this.find('.message-restricted')[allAllowed ? 'hide' : 'show']();
|
this.find('.message-restricted')[allAllowed ? 'hide' : 'show']();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".cms-add-form #Form_AddForm_PageType li").entwine({
|
$(".cms-add-form #Form_AddForm_PageType li").entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
this.setSelected(true);
|
this.setSelected(true);
|
||||||
},
|
},
|
||||||
setSelected: function setSelected(bool) {
|
setSelected: function setSelected(bool) {
|
||||||
var input = this.find('input');
|
var input = this.find('input');
|
||||||
|
|
||||||
if (bool && !input.is(':disabled')) {
|
if (bool && !input.is(':disabled')) {
|
||||||
this.siblings().setSelected(false);
|
this.siblings().setSelected(false);
|
||||||
this.toggleClass('selected', true);
|
this.toggleClass('selected', true);
|
||||||
@ -141,12 +166,14 @@
|
|||||||
if (!bool) $(this).find('input').attr('disabled', 'disabled').removeAttr('checked');else $(this).find('input').removeAttr('disabled');
|
if (!bool) $(this).find('input').attr('disabled', 'disabled').removeAttr('checked');else $(this).find('input').removeAttr('disabled');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".cms-page-add-button").entwine({
|
$(".cms-page-add-button").entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
var tree = $('.cms-tree'),
|
var tree = $('.cms-tree'),
|
||||||
list = $('.cms-list'),
|
list = $('.cms-list'),
|
||||||
parentId = 0;
|
parentId = 0;
|
||||||
|
|
||||||
|
// Choose parent ID either from tree or list view, depending which is visible
|
||||||
if (tree.is(':visible')) {
|
if (tree.is(':visible')) {
|
||||||
var selected = tree.jstree('get_selected');
|
var selected = tree.jstree('get_selected');
|
||||||
parentId = selected ? $(selected[0]).data('id') : null;
|
parentId = selected ? $(selected[0]).data('id') : null;
|
||||||
@ -155,12 +182,8 @@
|
|||||||
if (state) parentId = parseInt(JSON.parse(state).ParentID, 10);
|
if (state) parentId = parseInt(JSON.parse(state).ParentID, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = {
|
var data = { selector: this.data('targetPanel'), pjax: this.data('pjax') },
|
||||||
selector: this.data('targetPanel'),
|
|
||||||
pjax: this.data('pjax')
|
|
||||||
},
|
|
||||||
url;
|
url;
|
||||||
|
|
||||||
if (parentId) {
|
if (parentId) {
|
||||||
extraParams = this.data('extraParams') ? this.data('extraParams') : '';
|
extraParams = this.data('extraParams') ? this.data('extraParams') : '';
|
||||||
url = $.path.addSearchParams(i18n.sprintf(this.data('urlAddpage'), parentId), extraParams);
|
url = $.path.addSearchParams(i18n.sprintf(this.data('urlAddpage'), parentId), extraParams);
|
||||||
@ -170,7 +193,12 @@
|
|||||||
|
|
||||||
$('.cms-container').loadPanel(url, null, data);
|
$('.cms-container').loadPanel(url, null, data);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
// Remove focussed state from button
|
||||||
this.blur();
|
this.blur();
|
||||||
|
|
||||||
|
// $('.cms-page-add-form-dialog').dialog('open');
|
||||||
|
// e.preventDefault();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
214
javascript/dist/CMSMain.EditForm.js
vendored
214
javascript/dist/CMSMain.EditForm.js
vendored
@ -23,28 +23,48 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* File: CMSMain.EditForm.js
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
_jQuery2.default.entwine('ss', function ($) {
|
_jQuery2.default.entwine('ss', function ($) {
|
||||||
|
/**
|
||||||
|
* Class: .cms-edit-form :input[name=ClassName]
|
||||||
|
* Alert the user on change of page-type. This might have implications
|
||||||
|
* on the available form fields etc.
|
||||||
|
*/
|
||||||
$('.cms-edit-form :input[name=ClassName]').entwine({
|
$('.cms-edit-form :input[name=ClassName]').entwine({
|
||||||
|
// Function: onchange
|
||||||
onchange: function onchange() {
|
onchange: function onchange() {
|
||||||
alert(_i18n2.default._t('CMSMAIN.ALERTCLASSNAME'));
|
alert(_i18n2.default._t('CMSMAIN.ALERTCLASSNAME'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: .cms-edit-form input[name=Title]
|
||||||
|
*
|
||||||
|
* Input validation on the Title field
|
||||||
|
*/
|
||||||
$('.cms-edit-form input[name=Title]').entwine({
|
$('.cms-edit-form input[name=Title]').entwine({
|
||||||
|
// Constructor: onmatch
|
||||||
onmatch: function onmatch() {
|
onmatch: function onmatch() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
self.data('OrigVal', self.val());
|
self.data('OrigVal', self.val());
|
||||||
|
|
||||||
var form = self.closest('form');
|
var form = self.closest('form');
|
||||||
var urlSegmentInput = $('input:text[name=URLSegment]', form);
|
var urlSegmentInput = $('input:text[name=URLSegment]', form);
|
||||||
var liveLinkInput = $('input[name=LiveLink]', form);
|
var liveLinkInput = $('input[name=LiveLink]', form);
|
||||||
|
|
||||||
if (urlSegmentInput.length > 0) {
|
if (urlSegmentInput.length > 0) {
|
||||||
self._addActions();
|
self._addActions();
|
||||||
|
|
||||||
this.bind('change', function (e) {
|
this.bind('change', function (e) {
|
||||||
var origTitle = self.data('OrigVal');
|
var origTitle = self.data('OrigVal');
|
||||||
var title = self.val();
|
var title = self.val();
|
||||||
self.data('OrigVal', title);
|
self.data('OrigVal', title);
|
||||||
|
|
||||||
|
// Criteria for defining a "new" page
|
||||||
if (urlSegmentInput.val().indexOf(urlSegmentInput.data('defaultUrl')) === 0 && liveLinkInput.val() == '') {
|
if (urlSegmentInput.val().indexOf(urlSegmentInput.data('defaultUrl')) === 0 && liveLinkInput.val() == '') {
|
||||||
self.updateURLSegment(title);
|
self.updateURLSegment(title);
|
||||||
} else {
|
} else {
|
||||||
@ -61,37 +81,67 @@
|
|||||||
onunmatch: function onunmatch() {
|
onunmatch: function onunmatch() {
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: updateRelatedFields
|
||||||
|
*
|
||||||
|
* Update the related fields if appropriate
|
||||||
|
* (String) title The new title
|
||||||
|
* (Stirng) origTitle The original title
|
||||||
|
*/
|
||||||
updateRelatedFields: function updateRelatedFields(title, origTitle) {
|
updateRelatedFields: function updateRelatedFields(title, origTitle) {
|
||||||
|
// Update these fields only if their value was originally the same as the title
|
||||||
this.parents('form').find('input[name=MetaTitle], input[name=MenuTitle]').each(function () {
|
this.parents('form').find('input[name=MetaTitle], input[name=MenuTitle]').each(function () {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
|
||||||
if ($this.val() == origTitle) {
|
if ($this.val() == origTitle) {
|
||||||
$this.val(title);
|
$this.val(title);
|
||||||
|
// Onchange bubbling didn't work in IE8, so .trigger('change') couldn't be used
|
||||||
if ($this.updatedRelatedFields) $this.updatedRelatedFields();
|
if ($this.updatedRelatedFields) $this.updatedRelatedFields();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: updateURLSegment
|
||||||
|
*
|
||||||
|
* Update the URLSegment
|
||||||
|
* (String) title
|
||||||
|
*/
|
||||||
updateURLSegment: function updateURLSegment(title) {
|
updateURLSegment: function updateURLSegment(title) {
|
||||||
var urlSegmentInput = $('input:text[name=URLSegment]', this.closest('form'));
|
var urlSegmentInput = $('input:text[name=URLSegment]', this.closest('form'));
|
||||||
var urlSegmentField = urlSegmentInput.closest('.field.urlsegment');
|
var urlSegmentField = urlSegmentInput.closest('.field.urlsegment');
|
||||||
var updateURLFromTitle = $('.update', this.parent());
|
var updateURLFromTitle = $('.update', this.parent());
|
||||||
urlSegmentField.update(title);
|
urlSegmentField.update(title);
|
||||||
|
|
||||||
if (updateURLFromTitle.is(':visible')) {
|
if (updateURLFromTitle.is(':visible')) {
|
||||||
updateURLFromTitle.hide();
|
updateURLFromTitle.hide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: updateBreadcrumbLabel
|
||||||
|
*
|
||||||
|
* Update the breadcrumb
|
||||||
|
* (String) title
|
||||||
|
*/
|
||||||
updateBreadcrumbLabel: function updateBreadcrumbLabel(title) {
|
updateBreadcrumbLabel: function updateBreadcrumbLabel(title) {
|
||||||
var pageID = $('.cms-edit-form input[name=ID]').val();
|
var pageID = $('.cms-edit-form input[name=ID]').val();
|
||||||
var panelCrumb = $('span.cms-panel-link.crumb');
|
var panelCrumb = $('span.cms-panel-link.crumb');
|
||||||
|
|
||||||
if (title && title != "") {
|
if (title && title != "") {
|
||||||
panelCrumb.text(title);
|
panelCrumb.text(title);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: _addActions
|
||||||
|
*
|
||||||
|
* Utility to add update from title action
|
||||||
|
*
|
||||||
|
*/
|
||||||
_addActions: function _addActions() {
|
_addActions: function _addActions() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var updateURLFromTitle;
|
var updateURLFromTitle;
|
||||||
|
|
||||||
|
// update button
|
||||||
updateURLFromTitle = $('<button />', {
|
updateURLFromTitle = $('<button />', {
|
||||||
'class': 'update ss-ui-button-small',
|
'class': 'update ss-ui-button-small',
|
||||||
'text': _i18n2.default._t('URLSEGMENT.UpdateURL'),
|
'text': _i18n2.default._t('URLSEGMENT.UpdateURL'),
|
||||||
@ -101,11 +151,21 @@
|
|||||||
self.updateURLSegment(self.val());
|
self.updateURLSegment(self.val());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// insert elements
|
||||||
updateURLFromTitle.insertAfter(self);
|
updateURLFromTitle.insertAfter(self);
|
||||||
updateURLFromTitle.hide();
|
updateURLFromTitle.hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: .cms-edit-form .parentTypeSelector
|
||||||
|
*
|
||||||
|
* ParentID field combination - mostly toggling between
|
||||||
|
* the two radiobuttons and setting the hidden "ParentID" field
|
||||||
|
*/
|
||||||
$('.cms-edit-form .parentTypeSelector').entwine({
|
$('.cms-edit-form .parentTypeSelector').entwine({
|
||||||
|
// Constructor: onmatch
|
||||||
onmatch: function onmatch() {
|
onmatch: function onmatch() {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.find(':input[name=ParentType]').bind('click', function (e) {
|
this.find(':input[name=ParentType]').bind('click', function (e) {
|
||||||
@ -116,7 +176,6 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
this._changeParentId();
|
this._changeParentId();
|
||||||
|
|
||||||
this._toggleSelection();
|
this._toggleSelection();
|
||||||
|
|
||||||
this._super();
|
this._super();
|
||||||
@ -124,23 +183,51 @@
|
|||||||
onunmatch: function onunmatch() {
|
onunmatch: function onunmatch() {
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: _toggleSelection
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* (Event) e
|
||||||
|
*/
|
||||||
_toggleSelection: function _toggleSelection(e) {
|
_toggleSelection: function _toggleSelection(e) {
|
||||||
var selected = this.find(':input[name=ParentType]:checked').val();
|
var selected = this.find(':input[name=ParentType]:checked').val();
|
||||||
if (selected == 'root') this.find(':input[name=ParentID]').val(0);else this.find(':input[name=ParentID]').val(this.find('#Form_EditForm_ParentType_subpage').data('parentIdValue'));
|
// reset parent id if 'root' radiobutton is selected
|
||||||
|
if (selected == 'root') this.find(':input[name=ParentID]').val(0);
|
||||||
|
// otherwise use the old value
|
||||||
|
else this.find(':input[name=ParentID]').val(this.find('#Form_EditForm_ParentType_subpage').data('parentIdValue'));
|
||||||
|
// toggle tree dropdown based on selection
|
||||||
this.find('#Form_EditForm_ParentID_Holder').toggle(selected != 'root');
|
this.find('#Form_EditForm_ParentID_Holder').toggle(selected != 'root');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: _changeParentId
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* (Event) e
|
||||||
|
*/
|
||||||
_changeParentId: function _changeParentId(e) {
|
_changeParentId: function _changeParentId(e) {
|
||||||
var value = this.find(':input[name=ParentID]').val();
|
var value = this.find(':input[name=ParentID]').val();
|
||||||
|
// set a data attribute so we know what to use in _toggleSelection
|
||||||
this.find('#Form_EditForm_ParentType_subpage').data('parentIdValue', value);
|
this.find('#Form_EditForm_ParentType_subpage').data('parentIdValue', value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: .cms-edit-form #CanViewType, .cms-edit-form #CanEditType
|
||||||
|
*
|
||||||
|
* Toggle display of group dropdown in "access" tab,
|
||||||
|
* based on selection of radiobuttons.
|
||||||
|
*/
|
||||||
$('.cms-edit-form #CanViewType, .cms-edit-form #CanEditType, .cms-edit-form #CanCreateTopLevelType').entwine({
|
$('.cms-edit-form #CanViewType, .cms-edit-form #CanEditType, .cms-edit-form #CanCreateTopLevelType').entwine({
|
||||||
|
// Constructor: onmatch
|
||||||
onmatch: function onmatch() {
|
onmatch: function onmatch() {
|
||||||
|
// TODO Decouple
|
||||||
var dropdown;
|
var dropdown;
|
||||||
if (this.attr('id') == 'CanViewType') dropdown = $('#Form_EditForm_ViewerGroups_Holder');else if (this.attr('id') == 'CanEditType') dropdown = $('#Form_EditForm_EditorGroups_Holder');else if (this.attr('id') == 'CanCreateTopLevelType') dropdown = $('#Form_EditForm_CreateTopLevelGroups_Holder');
|
if (this.attr('id') == 'CanViewType') dropdown = $('#Form_EditForm_ViewerGroups_Holder');else if (this.attr('id') == 'CanEditType') dropdown = $('#Form_EditForm_EditorGroups_Holder');else if (this.attr('id') == 'CanCreateTopLevelType') dropdown = $('#Form_EditForm_CreateTopLevelGroups_Holder');
|
||||||
|
|
||||||
this.find('.optionset :input').bind('change', function (e) {
|
this.find('.optionset :input').bind('change', function (e) {
|
||||||
var wrapper = $(this).closest('.middleColumn').parent('div');
|
var wrapper = $(this).closest('.middleColumn').parent('div');
|
||||||
|
|
||||||
if (e.target.value == 'OnlyTheseUsers') {
|
if (e.target.value == 'OnlyTheseUsers') {
|
||||||
wrapper.addClass('remove-splitter');
|
wrapper.addClass('remove-splitter');
|
||||||
dropdown['show']();
|
dropdown['show']();
|
||||||
@ -149,6 +236,8 @@
|
|||||||
dropdown['hide']();
|
dropdown['hide']();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// initial state
|
||||||
var currentVal = this.find('input[name=' + this.attr('id') + ']:checked').val();
|
var currentVal = this.find('input[name=' + this.attr('id') + ']:checked').val();
|
||||||
dropdown[currentVal == 'OnlyTheseUsers' ? 'show' : 'hide']();
|
dropdown[currentVal == 'OnlyTheseUsers' ? 'show' : 'hide']();
|
||||||
|
|
||||||
@ -158,26 +247,52 @@
|
|||||||
this._super();
|
this._super();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: .cms-edit-form .Actions #Form_EditForm_action_print
|
||||||
|
*
|
||||||
|
* Open a printable representation of the form in a new window.
|
||||||
|
* Used for readonly older versions of a specific page.
|
||||||
|
*/
|
||||||
$('.cms-edit-form .Actions #Form_EditForm_action_print').entwine({
|
$('.cms-edit-form .Actions #Form_EditForm_action_print').entwine({
|
||||||
|
/**
|
||||||
|
* Function: onclick
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* (Event) e
|
||||||
|
*/
|
||||||
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;
|
||||||
|
|
||||||
window.open(printURL, 'printable');
|
window.open(printURL, 'printable');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: .cms-edit-form .Actions #Form_EditForm_action_rollback
|
||||||
|
*
|
||||||
|
* A "rollback" to a specific version needs user confirmation.
|
||||||
|
*/
|
||||||
$('.cms-edit-form .Actions #Form_EditForm_action_rollback').entwine({
|
$('.cms-edit-form .Actions #Form_EditForm_action_rollback').entwine({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: onclick
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* (Event) e
|
||||||
|
*/
|
||||||
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(),
|
||||||
message = '';
|
message = '';
|
||||||
|
|
||||||
if (version) {
|
if (version) {
|
||||||
message = _i18n2.default.sprintf(_i18n2.default._t('CMSMain.RollbackToVersion'), version);
|
message = _i18n2.default.sprintf(_i18n2.default._t('CMSMain.RollbackToVersion'), version);
|
||||||
} else {
|
} else {
|
||||||
message = _i18n2.default._t('CMSMain.ConfirmRestoreFromLive');
|
message = _i18n2.default._t('CMSMain.ConfirmRestoreFromLive');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (confirm(message)) {
|
if (confirm(message)) {
|
||||||
return this._super(e);
|
return this._super(e);
|
||||||
} else {
|
} else {
|
||||||
@ -185,13 +300,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: .cms-edit-form .Actions #Form_EditForm_action_archive
|
||||||
|
*
|
||||||
|
* Informing the user about the archive action while requiring confirmation
|
||||||
|
*/
|
||||||
$('.cms-edit-form .Actions #Form_EditForm_action_archive').entwine({
|
$('.cms-edit-form .Actions #Form_EditForm_action_archive').entwine({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: onclick
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* (Event) e
|
||||||
|
*/
|
||||||
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(),
|
||||||
message = '';
|
message = '';
|
||||||
message = _i18n2.default.sprintf(_i18n2.default._t('CMSMain.Archive'), version);
|
message = _i18n2.default.sprintf(_i18n2.default._t('CMSMain.Archive'), version);
|
||||||
|
|
||||||
if (confirm(message)) {
|
if (confirm(message)) {
|
||||||
return this._super(e);
|
return this._super(e);
|
||||||
} else {
|
} else {
|
||||||
@ -199,14 +326,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: .cms-edit-form .Actions #Form_EditForm_action_restore
|
||||||
|
*
|
||||||
|
* Informing the user about the archive action while requiring confirmation
|
||||||
|
*/
|
||||||
$('.cms-edit-form .Actions #Form_EditForm_action_restore').entwine({
|
$('.cms-edit-form .Actions #Form_EditForm_action_restore').entwine({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: onclick
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* (Event) e
|
||||||
|
*/
|
||||||
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(),
|
||||||
message = '',
|
message = '',
|
||||||
toRoot = this.data('toRoot');
|
toRoot = this.data('toRoot');
|
||||||
message = _i18n2.default.sprintf(_i18n2.default._t(toRoot ? 'CMSMain.RestoreToRoot' : 'CMSMain.Restore'), version);
|
message = _i18n2.default.sprintf(_i18n2.default._t(toRoot ? 'CMSMain.RestoreToRoot' : 'CMSMain.Restore'), version);
|
||||||
|
|
||||||
if (confirm(message)) {
|
if (confirm(message)) {
|
||||||
return this._super(e);
|
return this._super(e);
|
||||||
} else {
|
} else {
|
||||||
@ -214,13 +353,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: .cms-edit-form .Actions #Form_EditForm_action_delete
|
||||||
|
*
|
||||||
|
* Informing the user about the delete from draft action while requiring confirmation
|
||||||
|
*/
|
||||||
$('.cms-edit-form .Actions #Form_EditForm_action_delete').entwine({
|
$('.cms-edit-form .Actions #Form_EditForm_action_delete').entwine({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: onclick
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* (Event) e
|
||||||
|
*/
|
||||||
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(),
|
||||||
message = '';
|
message = '';
|
||||||
message = _i18n2.default.sprintf(_i18n2.default._t('CMSMain.DeleteFromDraft'), version);
|
message = _i18n2.default.sprintf(_i18n2.default._t('CMSMain.DeleteFromDraft'), version);
|
||||||
|
|
||||||
if (confirm(message)) {
|
if (confirm(message)) {
|
||||||
return this._super(e);
|
return this._super(e);
|
||||||
} else {
|
} else {
|
||||||
@ -228,13 +379,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: .cms-edit-form .Actions #Form_EditForm_action_unpublish
|
||||||
|
* Informing the user about the unpublish action while requiring confirmation
|
||||||
|
*/
|
||||||
$('.cms-edit-form .Actions #Form_EditForm_action_unpublish').entwine({
|
$('.cms-edit-form .Actions #Form_EditForm_action_unpublish').entwine({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: onclick
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* (Event) e
|
||||||
|
*/
|
||||||
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(),
|
||||||
message = '';
|
message = '';
|
||||||
message = _i18n2.default.sprintf(_i18n2.default._t('CMSMain.Unpublish'), version);
|
message = _i18n2.default.sprintf(_i18n2.default._t('CMSMain.Unpublish'), version);
|
||||||
|
|
||||||
if (confirm(message)) {
|
if (confirm(message)) {
|
||||||
return this._super(e);
|
return this._super(e);
|
||||||
} else {
|
} else {
|
||||||
@ -242,11 +404,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable save buttons upon detecting changes to content.
|
||||||
|
* "changed" class is added by jQuery.changetracker.
|
||||||
|
*/
|
||||||
$('.cms-edit-form.changed').entwine({
|
$('.cms-edit-form.changed').entwine({
|
||||||
onmatch: function onmatch(e) {
|
onmatch: function onmatch(e) {
|
||||||
this.find('button[name=action_save]').button('option', 'showingAlternate', true);
|
this.find('button[name=action_save]').button('option', 'showingAlternate', true);
|
||||||
this.find('button[name=action_publish]').button('option', 'showingAlternate', true);
|
this.find('button[name=action_publish]').button('option', 'showingAlternate', true);
|
||||||
|
|
||||||
this._super(e);
|
this._super(e);
|
||||||
},
|
},
|
||||||
onunmatch: function onunmatch(e) {
|
onunmatch: function onunmatch(e) {
|
||||||
@ -254,11 +420,14 @@
|
|||||||
if (saveButton.data('button')) saveButton.button('option', 'showingAlternate', false);
|
if (saveButton.data('button')) saveButton.button('option', 'showingAlternate', false);
|
||||||
var publishButton = this.find('button[name=action_publish]');
|
var publishButton = this.find('button[name=action_publish]');
|
||||||
if (publishButton.data('button')) publishButton.button('option', 'showingAlternate', false);
|
if (publishButton.data('button')) publishButton.button('option', 'showingAlternate', false);
|
||||||
|
|
||||||
this._super(e);
|
this._super(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-edit-form .Actions button[name=action_publish]').entwine({
|
$('.cms-edit-form .Actions button[name=action_publish]').entwine({
|
||||||
|
/**
|
||||||
|
* Bind to ssui.button event to trigger stylistic changes.
|
||||||
|
*/
|
||||||
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');
|
||||||
@ -267,7 +436,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-edit-form .Actions button[name=action_save]').entwine({
|
$('.cms-edit-form .Actions button[name=action_save]').entwine({
|
||||||
|
/**
|
||||||
|
* Bind to ssui.button event to trigger stylistic changes.
|
||||||
|
*/
|
||||||
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');
|
||||||
@ -276,10 +449,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: .cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked
|
||||||
|
*
|
||||||
|
* Showing the "Page location" "Parent page" chooser only when the "Sub-page underneath a parent page"
|
||||||
|
* radio button is selected
|
||||||
|
*/
|
||||||
$('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').entwine({
|
$('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').entwine({
|
||||||
onmatch: function onmatch() {
|
onmatch: function onmatch() {
|
||||||
this.redraw();
|
this.redraw();
|
||||||
|
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
onunmatch: function onunmatch() {
|
onunmatch: function onunmatch() {
|
||||||
@ -294,8 +473,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//trigger an initial change event to do the initial hiding of the element, if necessary
|
||||||
if ($('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').attr('id') == 'Form_EditForm_ParentType_root') {
|
if ($('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').attr('id') == 'Form_EditForm_ParentType_root') {
|
||||||
$('.cms-edit-form.CMSPageSettingsController #Form_EditForm_ParentID_Holder').hide();
|
$('.cms-edit-form.CMSPageSettingsController #Form_EditForm_ParentID_Holder').hide(); //quick hide on first run
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
34
javascript/dist/CMSMain.Tree.js
vendored
34
javascript/dist/CMSMain.Tree.js
vendored
@ -30,12 +30,18 @@
|
|||||||
this.adjustContextClass();
|
this.adjustContextClass();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
|
* Add and remove classes from context menus to allow for
|
||||||
|
* adjusting the display
|
||||||
|
*/
|
||||||
adjustContextClass: function adjustContextClass() {
|
adjustContextClass: function adjustContextClass() {
|
||||||
var menus = $('#vakata-contextmenu').find("ul ul");
|
var menus = $('#vakata-contextmenu').find("ul ul");
|
||||||
|
|
||||||
menus.each(function (i) {
|
menus.each(function (i) {
|
||||||
var col = "1",
|
var col = "1",
|
||||||
count = $(menus[i]).find('li').length;
|
count = $(menus[i]).find('li').length;
|
||||||
|
|
||||||
|
//Assign columns to menus over 10 items long
|
||||||
if (count > 20) {
|
if (count > 20) {
|
||||||
col = "3";
|
col = "3";
|
||||||
} else if (count > 10) {
|
} else if (count > 10) {
|
||||||
@ -43,6 +49,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(menus[i]).addClass('col-' + col).removeClass('right');
|
$(menus[i]).addClass('col-' + col).removeClass('right');
|
||||||
|
|
||||||
|
//Remove "right" class that jstree adds on mouseenter
|
||||||
$(menus[i]).find('li').on("mouseenter", function (e) {
|
$(menus[i]).find('li').on("mouseenter", function (e) {
|
||||||
$(this).parent('ul').removeClass("right");
|
$(this).parent('ul').removeClass("right");
|
||||||
});
|
});
|
||||||
@ -52,10 +60,10 @@
|
|||||||
var self = this,
|
var self = this,
|
||||||
config = this._super(),
|
config = this._super(),
|
||||||
hints = this.getHints();
|
hints = this.getHints();
|
||||||
|
|
||||||
config.plugins.push('contextmenu');
|
config.plugins.push('contextmenu');
|
||||||
config.contextmenu = {
|
config.contextmenu = {
|
||||||
'items': function items(node) {
|
'items': function items(node) {
|
||||||
|
|
||||||
var menuitems = {
|
var menuitems = {
|
||||||
'edit': {
|
'edit': {
|
||||||
'label': _i18n2.default._t('Tree.EditPage', 'Edit page', 100, 'Used in the context menu when right-clicking on a page node in the CMS tree'),
|
'label': _i18n2.default._t('Tree.EditPage', 'Edit page', 100, 'Used in the context menu when right-clicking on a page node in the CMS tree'),
|
||||||
@ -65,26 +73,26 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Add "show as list"
|
||||||
if (!node.hasClass('nochildren')) {
|
if (!node.hasClass('nochildren')) {
|
||||||
menuitems['showaslist'] = {
|
menuitems['showaslist'] = {
|
||||||
'label': _i18n2.default._t('Tree.ShowAsList'),
|
'label': _i18n2.default._t('Tree.ShowAsList'),
|
||||||
'action': function action(obj) {
|
'action': function action(obj) {
|
||||||
$('.cms-container').entwine('.ss').loadPanel(self.data('urlListview') + '&ParentID=' + obj.data('id'), null, {
|
$('.cms-container').entwine('.ss').loadPanel(self.data('urlListview') + '&ParentID=' + obj.data('id'), null,
|
||||||
tabState: {
|
// Default to list view tab
|
||||||
'pages-controller-cms-content': {
|
{ tabState: { 'pages-controller-cms-content': { 'tabSelector': '.content-listview' } } });
|
||||||
'tabSelector': '.content-listview'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Build a list for allowed children as submenu entries
|
||||||
var pagetype = node.data('pagetype'),
|
var pagetype = node.data('pagetype'),
|
||||||
id = node.data('id'),
|
id = node.data('id'),
|
||||||
allowedChildren = node.find('>a .item').data('allowedchildren'),
|
allowedChildren = node.find('>a .item').data('allowedchildren'),
|
||||||
menuAllowedChildren = {},
|
menuAllowedChildren = {},
|
||||||
hasAllowedChildren = false;
|
hasAllowedChildren = false;
|
||||||
|
|
||||||
|
// Convert to menu entries
|
||||||
$.each(allowedChildren, function (klass, title) {
|
$.each(allowedChildren, function (klass, title) {
|
||||||
hasAllowedChildren = true;
|
hasAllowedChildren = true;
|
||||||
menuAllowedChildren["allowedchildren-" + klass] = {
|
menuAllowedChildren["allowedchildren-" + klass] = {
|
||||||
@ -117,12 +125,16 @@
|
|||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
|
|
||||||
return menuitems;
|
return menuitems;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Scroll tree down to context of the current page, if it isn't
|
||||||
|
// already visible
|
||||||
$('.cms-tree a.jstree-clicked').entwine({
|
$('.cms-tree a.jstree-clicked').entwine({
|
||||||
onmatch: function onmatch() {
|
onmatch: function onmatch() {
|
||||||
var self = this,
|
var self = this,
|
||||||
@ -130,18 +142,24 @@
|
|||||||
scrollTo;
|
scrollTo;
|
||||||
|
|
||||||
if (self.offset().top < 0 || self.offset().top > panel.height() - self.height()) {
|
if (self.offset().top < 0 || self.offset().top > panel.height() - self.height()) {
|
||||||
|
// Current scroll top + our current offset top is our
|
||||||
|
// position in the panel
|
||||||
scrollTo = panel.scrollTop() + self.offset().top + panel.height() / 2;
|
scrollTo = panel.scrollTop() + self.offset().top + panel.height() / 2;
|
||||||
|
|
||||||
panel.animate({
|
panel.animate({
|
||||||
scrollTop: scrollTo
|
scrollTop: scrollTo
|
||||||
}, 'slow');
|
}, 'slow');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Clear filters button
|
||||||
$('.cms-tree-filtered .clear-filter').entwine({
|
$('.cms-tree-filtered .clear-filter').entwine({
|
||||||
onclick: function onclick() {
|
onclick: function onclick() {
|
||||||
window.location = location.protocol + '//' + location.host + location.pathname;
|
window.location = location.protocol + '//' + location.host + location.pathname;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-tree-filtered').entwine({
|
$('.cms-tree-filtered').entwine({
|
||||||
onmatch: function onmatch() {
|
onmatch: function onmatch() {
|
||||||
var self = this,
|
var self = this,
|
||||||
|
39
javascript/dist/CMSMain.js
vendored
39
javascript/dist/CMSMain.js
vendored
@ -21,9 +21,18 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Behaviour for the CMS Content Toolbar.
|
||||||
|
* Applies to tools on top-level views i.e. '/admin/pages' and '/admin/assets' and
|
||||||
|
* their corresponding tools in the SiteTree panel.
|
||||||
|
* An example is 'bulk actions' on the Pages view.
|
||||||
|
*/
|
||||||
_jQuery2.default.entwine('ss', function ($) {
|
_jQuery2.default.entwine('ss', function ($) {
|
||||||
|
|
||||||
|
// Faux three column layout
|
||||||
$('.cms-content-header-info').entwine({
|
$('.cms-content-header-info').entwine({
|
||||||
'from .cms-panel': {
|
'from .cms-panel': {
|
||||||
|
// Keep the header info's width synced with the TreeView panel's width.
|
||||||
ontoggle: function ontoggle(e) {
|
ontoggle: function ontoggle(e) {
|
||||||
var $treeViewPanel = this.closest('.cms-content').find(e.target);
|
var $treeViewPanel = this.closest('.cms-content').find(e.target);
|
||||||
|
|
||||||
@ -35,24 +44,31 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-content-toolbar').entwine({
|
$('.cms-content-toolbar').entwine({
|
||||||
|
|
||||||
onmatch: function onmatch() {
|
onmatch: function onmatch() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this._super();
|
this._super();
|
||||||
|
|
||||||
|
// Initialise the buttons
|
||||||
$.each(this.find('.cms-actions-buttons-row .tool-button'), function () {
|
$.each(this.find('.cms-actions-buttons-row .tool-button'), function () {
|
||||||
var $button = $(this),
|
var $button = $(this),
|
||||||
toolId = $button.data('toolid'),
|
toolId = $button.data('toolid'),
|
||||||
isActive = $button.hasClass('active');
|
isActive = $button.hasClass('active');
|
||||||
|
|
||||||
|
// We don't care about tools that don't have a related 'action'.
|
||||||
if (toolId !== void 0) {
|
if (toolId !== void 0) {
|
||||||
|
// Set the tool to its closed state.
|
||||||
$button.data('active', false).removeClass('active');
|
$button.data('active', false).removeClass('active');
|
||||||
$('#' + toolId).hide();
|
$('#' + toolId).hide();
|
||||||
|
|
||||||
self.bindActionButtonEvents($button);
|
self.bindActionButtonEvents($button);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onunmatch: function onunmatch() {
|
onunmatch: function onunmatch() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
@ -63,19 +79,41 @@
|
|||||||
self.unbindActionButtonEvents($button);
|
self.unbindActionButtonEvents($button);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @func bindActionButtonEvents
|
||||||
|
* @param {object} $button
|
||||||
|
* @desc Add event handlers in the '.cmsContentToolbar' namespace.
|
||||||
|
*/
|
||||||
bindActionButtonEvents: function bindActionButtonEvents($button) {
|
bindActionButtonEvents: function bindActionButtonEvents($button) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
$button.on('click.cmsContentToolbar', function (e) {
|
$button.on('click.cmsContentToolbar', function (e) {
|
||||||
self.showHideTool($button);
|
self.showHideTool($button);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @func unbindActionButtonEvents
|
||||||
|
* @param {object} $button
|
||||||
|
* @desc Remove all event handlers in the '.cmsContentToolbar' namespace.
|
||||||
|
*/
|
||||||
unbindActionButtonEvents: function unbindActionButtonEvents($button) {
|
unbindActionButtonEvents: function unbindActionButtonEvents($button) {
|
||||||
$button.off('.cmsContentToolbar');
|
$button.off('.cmsContentToolbar');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @func showTool
|
||||||
|
* @param {object} $button
|
||||||
|
* @desc Show a tool in the tools row. Hides all other tools.
|
||||||
|
*/
|
||||||
showHideTool: function showHideTool($button) {
|
showHideTool: function showHideTool($button) {
|
||||||
var isActive = $button.data('active'),
|
var isActive = $button.data('active'),
|
||||||
toolId = $button.data('toolid'),
|
toolId = $button.data('toolid'),
|
||||||
$action = $('#' + toolId);
|
$action = $('#' + toolId);
|
||||||
|
|
||||||
|
// Hide all tools except the one passed as a param,
|
||||||
|
// which gets handled separately.
|
||||||
$.each(this.find('.cms-actions-buttons-row .tool-button'), function () {
|
$.each(this.find('.cms-actions-buttons-row .tool-button'), function () {
|
||||||
var $currentButton = $(this),
|
var $currentButton = $(this),
|
||||||
$currentAction = $('#' + $currentButton.data('toolid'));
|
$currentAction = $('#' + $currentButton.data('toolid'));
|
||||||
@ -85,6 +123,7 @@
|
|||||||
$currentButton.data('active', false);
|
$currentButton.data('active', false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$button[isActive ? 'removeClass' : 'addClass']('active');
|
$button[isActive ? 'removeClass' : 'addClass']('active');
|
||||||
$action[isActive ? 'hide' : 'show']();
|
$action[isActive ? 'hide' : 'show']();
|
||||||
$button.data('active', !isActive);
|
$button.data('active', !isActive);
|
||||||
|
85
javascript/dist/CMSPageHistoryController.js
vendored
85
javascript/dist/CMSPageHistoryController.js
vendored
@ -23,26 +23,59 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* File: CMSPageHistoryController.js
|
||||||
|
*
|
||||||
|
* Handles related interactions between the version selection form on the
|
||||||
|
* left hand side of the panel and the version displaying on the right
|
||||||
|
* hand side.
|
||||||
|
*/
|
||||||
|
|
||||||
_jQuery2.default.entwine('ss', function ($) {
|
_jQuery2.default.entwine('ss', function ($) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: #Form_VersionsForm
|
||||||
|
*
|
||||||
|
* The left hand side version selection form is the main interface for
|
||||||
|
* users to select a version to view, or to compare two versions
|
||||||
|
*/
|
||||||
$('#Form_VersionsForm').entwine({
|
$('#Form_VersionsForm').entwine({
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
onmatch: function onmatch() {
|
onmatch: function onmatch() {
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
onunmatch: function onunmatch() {
|
onunmatch: function onunmatch() {
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Function: submit.
|
||||||
|
*
|
||||||
|
* Submits either the compare versions form or the view single form
|
||||||
|
* display based on whether we have two or 1 option selected
|
||||||
|
*
|
||||||
|
* Todo:
|
||||||
|
* Handle coupling to admin url
|
||||||
|
*/
|
||||||
onsubmit: function onsubmit(e, d) {
|
onsubmit: function onsubmit(e, d) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
var id,
|
var id,
|
||||||
self = this;
|
self = this;
|
||||||
|
|
||||||
id = this.find(':input[name=ID]').val();
|
id = this.find(':input[name=ID]').val();
|
||||||
|
|
||||||
if (!id) return false;
|
if (!id) return false;
|
||||||
|
|
||||||
var button, url, selected, to, from, compare, data;
|
var button, url, selected, to, from, compare, data;
|
||||||
|
|
||||||
compare = this.find(":input[name=CompareMode]").is(":checked");
|
compare = this.find(":input[name=CompareMode]").is(":checked");
|
||||||
selected = this.find("table input[type=checkbox]").filter(":checked");
|
selected = this.find("table input[type=checkbox]").filter(":checked");
|
||||||
|
|
||||||
if (compare) {
|
if (compare) {
|
||||||
if (selected.length != 2) return false;
|
if (selected.length != 2) return false;
|
||||||
|
|
||||||
to = selected.eq(0).val();
|
to = selected.eq(0).val();
|
||||||
from = selected.eq(1).val();
|
from = selected.eq(1).val();
|
||||||
button = this.find(':submit[name=action_doCompare]');
|
button = this.find(':submit[name=action_doCompare]');
|
||||||
@ -53,20 +86,30 @@
|
|||||||
url = _i18n2.default.sprintf(this.data('linkTmplShow'), id, to);
|
url = _i18n2.default.sprintf(this.data('linkTmplShow'), id, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.cms-container').loadPanel(url, '', {
|
$('.cms-container').loadPanel(url, '', { pjax: 'CurrentForm' });
|
||||||
pjax: 'CurrentForm'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: :input[name=ShowUnpublished]
|
||||||
|
*
|
||||||
|
* Used for toggling whether to show or hide unpublished versions.
|
||||||
|
*/
|
||||||
$('#Form_VersionsForm input[name=ShowUnpublished]').entwine({
|
$('#Form_VersionsForm input[name=ShowUnpublished]').entwine({
|
||||||
onmatch: function onmatch() {
|
onmatch: function onmatch() {
|
||||||
this.toggle();
|
this.toggle();
|
||||||
|
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
onunmatch: function onunmatch() {
|
onunmatch: function onunmatch() {
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Event: :input[name=ShowUnpublished] change
|
||||||
|
*
|
||||||
|
* Changing the show unpublished checkbox toggles whether to show
|
||||||
|
* or hide the unpublished versions. Because those rows may be being
|
||||||
|
* compared this also ensures those rows are unselected.
|
||||||
|
*/
|
||||||
onchange: function onchange() {
|
onchange: function onchange() {
|
||||||
this.toggle();
|
this.toggle();
|
||||||
},
|
},
|
||||||
@ -81,9 +124,27 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: #Form_VersionsForm tr
|
||||||
|
*
|
||||||
|
* An individual row in the versions form. Selecting the row updates
|
||||||
|
* the edit form depending on whether we're showing individual version
|
||||||
|
* information or displaying comparsion.
|
||||||
|
*/
|
||||||
$("#Form_VersionsForm tbody tr").entwine({
|
$("#Form_VersionsForm tbody tr").entwine({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: onclick
|
||||||
|
*
|
||||||
|
* Selects or deselects the row (if in compare mode). Will trigger
|
||||||
|
* an update of the edit form if either selected (in single mode)
|
||||||
|
* or if this is the second row selected (in compare mode)
|
||||||
|
*/
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
var compare, selected;
|
var compare, selected;
|
||||||
|
|
||||||
|
// compare mode
|
||||||
compare = this.parents("form").find(':input[name=CompareMode]').attr("checked");
|
compare = this.parents("form").find(':input[name=CompareMode]').attr("checked");
|
||||||
selected = this.siblings(".active");
|
selected = this.siblings(".active");
|
||||||
|
|
||||||
@ -92,12 +153,14 @@
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
} else if (compare) {
|
} else if (compare) {
|
||||||
|
// check if we have already selected more than two.
|
||||||
if (selected.length > 1) {
|
if (selected.length > 1) {
|
||||||
return alert(_i18n2.default._t('ONLYSELECTTWO', 'You can only compare two versions at this time.'));
|
return alert(_i18n2.default._t('ONLYSELECTTWO', 'You can only compare two versions at this time.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
this._select();
|
this._select();
|
||||||
|
|
||||||
|
// if this is the second selected then we can compare.
|
||||||
if (selected.length == 1) {
|
if (selected.length == 1) {
|
||||||
this.parents('form').submit();
|
this.parents('form').submit();
|
||||||
}
|
}
|
||||||
@ -105,20 +168,32 @@
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
this._select();
|
this._select();
|
||||||
|
|
||||||
selected._unselect();
|
selected._unselect();
|
||||||
|
|
||||||
this.parents("form").submit();
|
this.parents("form").submit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: _unselect()
|
||||||
|
*
|
||||||
|
* Unselects the row from the form selection.
|
||||||
|
*/
|
||||||
_unselect: function _unselect() {
|
_unselect: function _unselect() {
|
||||||
this.removeClass('active');
|
this.removeClass('active');
|
||||||
this.find(":input[type=checkbox]").attr("checked", false);
|
this.find(":input[type=checkbox]").attr("checked", false);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function: _select()
|
||||||
|
*
|
||||||
|
* Selects the currently matched row in the form selection
|
||||||
|
*/
|
||||||
_select: function _select() {
|
_select: function _select() {
|
||||||
this.addClass('active');
|
this.addClass('active');
|
||||||
this.find(":input[type=checkbox]").attr("checked", true);
|
this.find(":input[type=checkbox]").attr("checked", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
1
javascript/dist/RedirectorPage.js
vendored
1
javascript/dist/RedirectorPage.js
vendored
@ -26,7 +26,6 @@
|
|||||||
onmatch: function onmatch() {
|
onmatch: function onmatch() {
|
||||||
var self = $(this);
|
var self = $(this);
|
||||||
if (self.attr('checked')) this.toggle();
|
if (self.attr('checked')) this.toggle();
|
||||||
|
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
onunmatch: function onunmatch() {
|
onunmatch: function onunmatch() {
|
||||||
|
3
javascript/dist/SilverStripeNavigator.js
vendored
3
javascript/dist/SilverStripeNavigator.js
vendored
@ -32,14 +32,17 @@
|
|||||||
w.focus();
|
w.focus();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
(0, _jQuery2.default)('#SilverStripeNavigatorLink').on('click', function (e) {
|
(0, _jQuery2.default)('#SilverStripeNavigatorLink').on('click', function (e) {
|
||||||
(0, _jQuery2.default)('#SilverStripeNavigatorLinkPopup').toggle();
|
(0, _jQuery2.default)('#SilverStripeNavigatorLinkPopup').toggle();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
(0, _jQuery2.default)('#SilverStripeNavigatorLinkPopup a.close').on('click', function (e) {
|
(0, _jQuery2.default)('#SilverStripeNavigatorLinkPopup a.close').on('click', function (e) {
|
||||||
(0, _jQuery2.default)('#SilverStripeNavigatorLinkPopup').hide();
|
(0, _jQuery2.default)('#SilverStripeNavigatorLinkPopup').hide();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
(0, _jQuery2.default)('#SilverStripeNavigatorLinkPopup input').on('focus', function (e) {
|
(0, _jQuery2.default)('#SilverStripeNavigatorLinkPopup input').on('focus', function (e) {
|
||||||
this.select();
|
this.select();
|
||||||
});
|
});
|
||||||
|
42
javascript/dist/SiteTreeURLSegmentField.js
vendored
42
javascript/dist/SiteTreeURLSegmentField.js
vendored
@ -22,36 +22,61 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
_jQuery2.default.entwine('ss', function ($) {
|
_jQuery2.default.entwine('ss', function ($) {
|
||||||
|
/**
|
||||||
|
* Class: .field.urlsegment
|
||||||
|
*
|
||||||
|
* Provides enhanced functionality (read-only/edit switch) and
|
||||||
|
* input validation on the URLSegment field
|
||||||
|
*/
|
||||||
$('.field.urlsegment:not(.readonly)').entwine({
|
$('.field.urlsegment:not(.readonly)').entwine({
|
||||||
|
|
||||||
|
// Roughly matches the field width including edit button
|
||||||
MaxPreviewLength: 55,
|
MaxPreviewLength: 55,
|
||||||
|
|
||||||
Ellipsis: '...',
|
Ellipsis: '...',
|
||||||
|
|
||||||
onmatch: function onmatch() {
|
onmatch: function onmatch() {
|
||||||
|
// Only initialize the field if it contains an editable field.
|
||||||
|
// This ensures we don't get bogus previews on readonly fields.
|
||||||
if (this.find(':text').length) this.toggleEdit(false);
|
if (this.find(':text').length) this.toggleEdit(false);
|
||||||
this.redraw();
|
this.redraw();
|
||||||
|
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
|
||||||
redraw: function redraw() {
|
redraw: function redraw() {
|
||||||
var field = this.find(':text'),
|
var field = this.find(':text'),
|
||||||
url = decodeURI(field.data('prefix') + field.val()),
|
url = decodeURI(field.data('prefix') + field.val()),
|
||||||
previewUrl = url;
|
previewUrl = url;
|
||||||
|
|
||||||
|
// Truncate URL if required (ignoring the suffix, retaining the full value)
|
||||||
if (url.length > this.getMaxPreviewLength()) {
|
if (url.length > this.getMaxPreviewLength()) {
|
||||||
previewUrl = this.getEllipsis() + url.substr(url.length - this.getMaxPreviewLength(), url.length);
|
previewUrl = this.getEllipsis() + url.substr(url.length - this.getMaxPreviewLength(), url.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Transfer current value to holder
|
||||||
this.find('.preview').attr('href', encodeURI(url + field.data('suffix'))).text(previewUrl);
|
this.find('.preview').attr('href', encodeURI(url + field.data('suffix'))).text(previewUrl);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Boolean
|
||||||
|
*/
|
||||||
toggleEdit: function toggleEdit(toggle) {
|
toggleEdit: function toggleEdit(toggle) {
|
||||||
var field = this.find(':text');
|
var field = this.find(':text');
|
||||||
|
|
||||||
this.find('.preview-holder')[toggle ? 'hide' : 'show']();
|
this.find('.preview-holder')[toggle ? 'hide' : 'show']();
|
||||||
this.find('.edit-holder')[toggle ? 'show' : 'hide']();
|
this.find('.edit-holder')[toggle ? 'show' : 'hide']();
|
||||||
|
|
||||||
if (toggle) {
|
if (toggle) {
|
||||||
field.data("origval", field.val());
|
field.data("origval", field.val()); //retain current value for cancel
|
||||||
field.focus();
|
field.focus();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Commits the change of the URLSegment to the field
|
||||||
|
* Optional: pass in (String) to update the URLSegment
|
||||||
|
*/
|
||||||
update: function update() {
|
update: function update() {
|
||||||
var self = this,
|
var self = this,
|
||||||
field = this.find(':text'),
|
field = this.find(':text'),
|
||||||
@ -72,17 +97,29 @@
|
|||||||
this.redraw();
|
this.redraw();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cancels any changes to the field
|
||||||
|
*/
|
||||||
cancel: function cancel() {
|
cancel: function cancel() {
|
||||||
var field = this.find(':text');
|
var field = this.find(':text');
|
||||||
field.val(field.data("origval"));
|
field.val(field.data("origval"));
|
||||||
this.toggleEdit(false);
|
this.toggleEdit(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a value matching the criteria.
|
||||||
|
*
|
||||||
|
* @param (String)
|
||||||
|
* @param (Function)
|
||||||
|
*/
|
||||||
suggest: function suggest(val, callback) {
|
suggest: function suggest(val, callback) {
|
||||||
var self = this,
|
var self = this,
|
||||||
field = self.find(':text'),
|
field = self.find(':text'),
|
||||||
urlParts = $.path.parseUrl(self.closest('form').attr('action')),
|
urlParts = $.path.parseUrl(self.closest('form').attr('action')),
|
||||||
url = urlParts.hrefNoSearch + '/field/' + field.attr('name') + '/suggest/?value=' + encodeURIComponent(val);
|
url = urlParts.hrefNoSearch + '/field/' + field.attr('name') + '/suggest/?value=' + encodeURIComponent(val);
|
||||||
if (urlParts.search) url += '&' + urlParts.search.replace(/^\?/, '');
|
if (urlParts.search) url += '&' + urlParts.search.replace(/^\?/, '');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
success: function success(data) {
|
success: function success(data) {
|
||||||
@ -97,18 +134,21 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.field.urlsegment .edit').entwine({
|
$('.field.urlsegment .edit').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.closest('.field').toggleEdit(true);
|
this.closest('.field').toggleEdit(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.field.urlsegment .update').entwine({
|
$('.field.urlsegment .update').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.closest('.field').update();
|
this.closest('.field').update();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.field.urlsegment .cancel').entwine({
|
$('.field.urlsegment .cancel').entwine({
|
||||||
onclick: function onclick(e) {
|
onclick: function onclick(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
2
javascript/dist/bundle-lib.js
vendored
2
javascript/dist/bundle-lib.js
vendored
@ -1 +1 @@
|
|||||||
!function t(e,n,i){function a(o,s){if(!n[o]){if(!e[o]){var d="function"==typeof require&&require;if(!s&&d)return d(o,!0);if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return a(n?n:t)},c,c.exports,t,e,n,i)}return n[o].exports}for(var r="function"==typeof require&&require,o=0;o<i.length;o++)a(i[o]);return a}({1:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),r=i(a);r["default"].entwine("ss",function(t){t(".cms-add-form .parent-mode :input").entwine({onclick:function(t){if("top"==this.val()){var e=this.closest("form").find("#Form_AddForm_ParentID_Holder .TreeDropdownField");e.setValue(""),e.setTitle("")}}}),t(".cms-add-form").entwine({ParentID:0,ParentCache:{},onadd:function(){var t=this;this.find("#Form_AddForm_ParentID_Holder .TreeDropdownField").bind("change",function(){t.updateTypeList()}),this.find(".SelectionGroup.parent-mode").bind("change",function(){t.updateTypeList()}),this.updateTypeList()},loadCachedChildren:function(t){var e=this.getParentCache();return"undefined"!=typeof e[t]?e[t]:null},saveCachedChildren:function(t,e){var n=this.getParentCache();n[t]=e,this.setParentCache(n)},updateTypeList:function(){var e=this.data("hints"),n=this.find("#Form_AddForm_ParentID_Holder .TreeDropdownField"),i=this.find("input[name=ParentModeField]:checked").val(),a=n.data("metadata"),r=a&&"child"===i?n.getValue()||this.getParentID():null,o=a?a.ClassName:null,s=o&&"child"===i?o:"Root",d="undefined"!=typeof e[s]?e[s]:null,l=this,c=d&&"undefined"!=typeof d.defaultChild?d.defaultChild:null,u=[];if(r){if(this.hasClass("loading"))return;return this.addClass("loading"),this.setParentID(r),n.getValue()||n.setValue(r),u=this.loadCachedChildren(r),null!==u?(this.updateSelectionFilter(u,c),void this.removeClass("loading")):(t.ajax({url:l.data("childfilter"),data:{ParentID:r},success:function(t){l.saveCachedChildren(r,t),l.updateSelectionFilter(t,c)},complete:function(){l.removeClass("loading")}}),!1)}u=d&&"undefined"!=typeof d.disallowedChildren?d.disallowedChildren:[],this.updateSelectionFilter(u,c)},updateSelectionFilter:function(e,n){var i=null;if(this.find("#Form_AddForm_PageType li").each(function(){var n=t(this).find("input").val(),a=-1===t.inArray(n,e);t(this).setEnabled(a),a||t(this).setSelected(!1),i=null===i?a:i&&a}),n)var a=this.find("#Form_AddForm_PageType li input[value="+n+"]").parents("li:first");else var a=this.find("#Form_AddForm_PageType li:not(.disabled):first");a.setSelected(!0),a.siblings().setSelected(!1);var r=this.find("#Form_AddForm_PageType li:not(.disabled)").length?"enable":"disable";this.find("button[name=action_doAdd]").button(r),this.find(".message-restricted")[i?"hide":"show"]()}}),t(".cms-add-form #Form_AddForm_PageType li").entwine({onclick:function(t){this.setSelected(!0)},setSelected:function(t){var e=this.find("input");t&&!e.is(":disabled")?(this.siblings().setSelected(!1),this.toggleClass("selected",!0),e.prop("checked",!0)):(this.toggleClass("selected",!1),e.prop("checked",!1))},setEnabled:function(e){t(this).toggleClass("disabled",!e),e?t(this).find("input").removeAttr("disabled"):t(this).find("input").attr("disabled","disabled").removeAttr("checked")}}),t(".cms-page-add-button").entwine({onclick:function(e){var n=t(".cms-tree"),i=t(".cms-list"),a=0;if(n.is(":visible")){var r=n.jstree("get_selected");a=r?t(r[0]).data("id"):null}else{var o=i.find('input[name="Page[GridState]"]').val();o&&(a=parseInt(JSON.parse(o).ParentID,10))}var s,d={selector:this.data("targetPanel"),pjax:this.data("pjax")};a?(extraParams=this.data("extraParams")?this.data("extraParams"):"",s=t.path.addSearchParams(i18n.sprintf(this.data("urlAddpage"),a),extraParams)):s=this.attr("href"),t(".cms-container").loadPanel(s,null,d),e.preventDefault(),this.blur()}})})},{jQuery:"jQuery"}],2:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),r=i(a),o=t("i18n"),s=i(o);r["default"].entwine("ss",function(t){t(".cms-edit-form :input[name=ClassName]").entwine({onchange:function(){alert(s["default"]._t("CMSMAIN.ALERTCLASSNAME"))}}),t(".cms-edit-form input[name=Title]").entwine({onmatch:function(){var e=this;e.data("OrigVal",e.val());var n=e.closest("form"),i=t("input:text[name=URLSegment]",n),a=t("input[name=LiveLink]",n);i.length>0&&(e._addActions(),this.bind("change",function(n){var r=e.data("OrigVal"),o=e.val();e.data("OrigVal",o),0===i.val().indexOf(i.data("defaultUrl"))&&""==a.val()?e.updateURLSegment(o):t(".update",e.parent()).show(),e.updateRelatedFields(o,r),e.updateBreadcrumbLabel(o)})),this._super()},onunmatch:function(){this._super()},updateRelatedFields:function(e,n){this.parents("form").find("input[name=MetaTitle], input[name=MenuTitle]").each(function(){var i=t(this);i.val()==n&&(i.val(e),i.updatedRelatedFields&&i.updatedRelatedFields())})},updateURLSegment:function(e){var n=t("input:text[name=URLSegment]",this.closest("form")),i=n.closest(".field.urlsegment"),a=t(".update",this.parent());i.update(e),a.is(":visible")&&a.hide()},updateBreadcrumbLabel:function(e){var n=(t(".cms-edit-form input[name=ID]").val(),t("span.cms-panel-link.crumb"));e&&""!=e&&n.text(e)},_addActions:function(){var e,n=this;e=t("<button />",{"class":"update ss-ui-button-small",text:s["default"]._t("URLSEGMENT.UpdateURL"),type:"button",click:function(t){t.preventDefault(),n.updateURLSegment(n.val())}}),e.insertAfter(n),e.hide()}}),t(".cms-edit-form .parentTypeSelector").entwine({onmatch:function(){var t=this;this.find(":input[name=ParentType]").bind("click",function(e){t._toggleSelection(e)}),this.find(".TreeDropdownField").bind("change",function(e){t._changeParentId(e)}),this._changeParentId(),this._toggleSelection(),this._super()},onunmatch:function(){this._super()},_toggleSelection:function(t){var e=this.find(":input[name=ParentType]:checked").val();"root"==e?this.find(":input[name=ParentID]").val(0):this.find(":input[name=ParentID]").val(this.find("#Form_EditForm_ParentType_subpage").data("parentIdValue")),this.find("#Form_EditForm_ParentID_Holder").toggle("root"!=e)},_changeParentId:function(t){var e=this.find(":input[name=ParentID]").val();this.find("#Form_EditForm_ParentType_subpage").data("parentIdValue",e)}}),t(".cms-edit-form #CanViewType, .cms-edit-form #CanEditType, .cms-edit-form #CanCreateTopLevelType").entwine({onmatch:function(){var e;"CanViewType"==this.attr("id")?e=t("#Form_EditForm_ViewerGroups_Holder"):"CanEditType"==this.attr("id")?e=t("#Form_EditForm_EditorGroups_Holder"):"CanCreateTopLevelType"==this.attr("id")&&(e=t("#Form_EditForm_CreateTopLevelGroups_Holder")),this.find(".optionset :input").bind("change",function(n){var i=t(this).closest(".middleColumn").parent("div");"OnlyTheseUsers"==n.target.value?(i.addClass("remove-splitter"),e.show()):(i.removeClass("remove-splitter"),e.hide())});var n=this.find("input[name="+this.attr("id")+"]:checked").val();e["OnlyTheseUsers"==n?"show":"hide"](),this._super()},onunmatch:function(){this._super()}}),t(".cms-edit-form .Actions #Form_EditForm_action_print").entwine({onclick:function(e){var n=t(this[0].form).attr("action").replace(/\?.*$/,"")+"/printable/"+t(":input[name=ID]",this[0].form).val();return"http://"!=n.substr(0,7)&&(n=t("base").attr("href")+n),window.open(n,"printable"),!1}}),t(".cms-edit-form .Actions #Form_EditForm_action_rollback").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="";return i=n?s["default"].sprintf(s["default"]._t("CMSMain.RollbackToVersion"),n):s["default"]._t("CMSMain.ConfirmRestoreFromLive"),confirm(i)?this._super(t):!1}}),t(".cms-edit-form .Actions #Form_EditForm_action_archive").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="";return i=s["default"].sprintf(s["default"]._t("CMSMain.Archive"),n),confirm(i)?this._super(t):!1}}),t(".cms-edit-form .Actions #Form_EditForm_action_restore").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="",a=this.data("toRoot");return i=s["default"].sprintf(s["default"]._t(a?"CMSMain.RestoreToRoot":"CMSMain.Restore"),n),confirm(i)?this._super(t):!1}}),t(".cms-edit-form .Actions #Form_EditForm_action_delete").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="";return i=s["default"].sprintf(s["default"]._t("CMSMain.DeleteFromDraft"),n),confirm(i)?this._super(t):!1}}),t(".cms-edit-form .Actions #Form_EditForm_action_unpublish").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="";return i=s["default"].sprintf(s["default"]._t("CMSMain.Unpublish"),n),confirm(i)?this._super(t):!1}}),t(".cms-edit-form.changed").entwine({onmatch:function(t){this.find("button[name=action_save]").button("option","showingAlternate",!0),this.find("button[name=action_publish]").button("option","showingAlternate",!0),this._super(t)},onunmatch:function(t){var e=this.find("button[name=action_save]");e.data("button")&&e.button("option","showingAlternate",!1);var n=this.find("button[name=action_publish]");n.data("button")&&n.button("option","showingAlternate",!1),this._super(t)}}),t(".cms-edit-form .Actions button[name=action_publish]").entwine({onbuttonafterrefreshalternate:function(){this.button("option","showingAlternate")?this.addClass("ss-ui-action-constructive"):this.removeClass("ss-ui-action-constructive")}}),t(".cms-edit-form .Actions button[name=action_save]").entwine({onbuttonafterrefreshalternate:function(){this.button("option","showingAlternate")?this.addClass("ss-ui-action-constructive"):this.removeClass("ss-ui-action-constructive")}}),t('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').entwine({onmatch:function(){this.redraw(),this._super()},onunmatch:function(){this._super()},redraw:function(){var e=t(".cms-edit-form.CMSPageSettingsController #Form_EditForm_ParentID_Holder");"Form_EditForm_ParentType_root"==t(this).attr("id")?e.slideUp():e.slideDown()},onclick:function(){this.redraw()}}),"Form_EditForm_ParentType_root"==t('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').attr("id")&&t(".cms-edit-form.CMSPageSettingsController #Form_EditForm_ParentID_Holder").hide()})},{i18n:"i18n",jQuery:"jQuery"}],3:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),r=i(a),o=t("i18n"),s=i(o);r["default"].entwine("ss.tree",function(t){t(".cms-tree").entwine({fromDocument:{"oncontext_show.vakata":function(t){this.adjustContextClass()}},adjustContextClass:function(){var e=t("#vakata-contextmenu").find("ul ul");e.each(function(n){var i="1",a=t(e[n]).find("li").length;a>20?i="3":a>10&&(i="2"),t(e[n]).addClass("col-"+i).removeClass("right"),t(e[n]).find("li").on("mouseenter",function(e){t(this).parent("ul").removeClass("right")})})},getTreeConfig:function(){var e=this,n=this._super();this.getHints();return n.plugins.push("contextmenu"),n.contextmenu={items:function(n){var i={edit:{label:s["default"]._t("Tree.EditPage","Edit page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"),action:function(n){t(".cms-container").entwine(".ss").loadPanel(s["default"].sprintf(e.data("urlEditpage"),n.data("id")))}}};n.hasClass("nochildren")||(i.showaslist={label:s["default"]._t("Tree.ShowAsList"),action:function(n){t(".cms-container").entwine(".ss").loadPanel(e.data("urlListview")+"&ParentID="+n.data("id"),null,{tabState:{"pages-controller-cms-content":{tabSelector:".content-listview"}}})}});var a=(n.data("pagetype"),n.data("id")),r=n.find(">a .item").data("allowedchildren"),o={},d=!1;return t.each(r,function(n,i){d=!0,o["allowedchildren-"+n]={label:'<span class="jstree-pageicon"></span>'+i,_class:"class-"+n,action:function(i){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(s["default"].sprintf(e.data("urlAddpage"),a,n),e.data("extraParams")))}}}),d&&(i.addsubpage={label:s["default"]._t("Tree.AddSubPage","Add page under this page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"),submenu:o}),i.duplicate={label:s["default"]._t("Tree.Duplicate"),submenu:[{label:s["default"]._t("Tree.ThisPageOnly"),action:function(n){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(s["default"].sprintf(e.data("urlDuplicate"),n.data("id")),e.data("extraParams")))}},{label:s["default"]._t("Tree.ThisPageAndSubpages"),action:function(n){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(s["default"].sprintf(e.data("urlDuplicatewithchildren"),n.data("id")),e.data("extraParams")))}}]},i}},n}}),t(".cms-tree a.jstree-clicked").entwine({onmatch:function(){var t,e=this,n=e.parents(".cms-panel-content");(e.offset().top<0||e.offset().top>n.height()-e.height())&&(t=n.scrollTop()+e.offset().top+n.height()/2,n.animate({scrollTop:t},"slow"))}}),t(".cms-tree-filtered .clear-filter").entwine({onclick:function(){window.location=location.protocol+"//"+location.host+location.pathname}}),t(".cms-tree-filtered").entwine({onmatch:function(){var e=this,n=function(){var n=t(".cms-content-tools .cms-panel-content").height()-e.parent().siblings(".cms-content-toolbar").outerHeight(!0);e.css("height",n+"px")};n(),t(window).on("resize",window.ss.debounce(n,300))}})})},{i18n:"i18n",jQuery:"jQuery"}],4:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),r=i(a);r["default"].entwine("ss",function(t){t(".cms-content-header-info").entwine({"from .cms-panel":{ontoggle:function(t){var e=this.closest(".cms-content").find(t.target);0!==e.length&&this.parent()[e.hasClass("collapsed")?"addClass":"removeClass"]("collapsed")}}}),t(".cms-content-toolbar").entwine({onmatch:function(){var e=this;this._super(),t.each(this.find(".cms-actions-buttons-row .tool-button"),function(){var n=t(this),i=n.data("toolid");n.hasClass("active");void 0!==i&&(n.data("active",!1).removeClass("active"),t("#"+i).hide(),e.bindActionButtonEvents(n))})},onunmatch:function(){var e=this;this._super(),t.each(this.find(".cms-actions-buttons-row .tool-button"),function(){var n=t(this);e.unbindActionButtonEvents(n)})},bindActionButtonEvents:function(t){var e=this;t.on("click.cmsContentToolbar",function(n){e.showHideTool(t)})},unbindActionButtonEvents:function(t){t.off(".cmsContentToolbar")},showHideTool:function(e){var n=e.data("active"),i=e.data("toolid"),a=t("#"+i);t.each(this.find(".cms-actions-buttons-row .tool-button"),function(){var e=t(this),n=t("#"+e.data("toolid"));e.data("toolid")!==i&&(n.hide(),e.data("active",!1))}),e[n?"removeClass":"addClass"]("active"),a[n?"hide":"show"](),e.data("active",!n)}})})},{jQuery:"jQuery"}],5:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),r=i(a),o=t("i18n"),s=i(o);r["default"].entwine("ss",function(t){t("#Form_VersionsForm").entwine({onmatch:function(){this._super()},onunmatch:function(){this._super()},onsubmit:function(e,n){e.preventDefault();var i;if(i=this.find(":input[name=ID]").val(),!i)return!1;var a,r,o,d,l,c;if(c=this.find(":input[name=CompareMode]").is(":checked"),o=this.find("table input[type=checkbox]").filter(":checked"),c){if(2!=o.length)return!1;d=o.eq(0).val(),l=o.eq(1).val(),a=this.find(":submit[name=action_doCompare]"),r=s["default"].sprintf(this.data("linkTmplCompare"),i,l,d)}else d=o.eq(0).val(),a=this.find(":submit[name=action_doShowVersion]"),r=s["default"].sprintf(this.data("linkTmplShow"),i,d);t(".cms-container").loadPanel(r,"",{pjax:"CurrentForm"})}}),t("#Form_VersionsForm input[name=ShowUnpublished]").entwine({onmatch:function(){this.toggle(),this._super()},onunmatch:function(){this._super()},onchange:function(){this.toggle()},toggle:function(){var e=t(this),n=e.parents("form");e.attr("checked")?n.find("tr[data-published=false]").show():n.find("tr[data-published=false]").hide()._unselect()}}),t("#Form_VersionsForm tbody tr").entwine({onclick:function(t){var e,n;return e=this.parents("form").find(":input[name=CompareMode]").attr("checked"),n=this.siblings(".active"),e&&this.hasClass("active")?void this._unselect():e?n.length>1?alert(s["default"]._t("ONLYSELECTTWO","You can only compare two versions at this time.")):(this._select(),void(1==n.length&&this.parents("form").submit())):(this._select(),n._unselect(),this.parents("form").submit(),void 0)},_unselect:function(){this.removeClass("active"),this.find(":input[type=checkbox]").attr("checked",!1)},_select:function(){this.addClass("active"),this.find(":input[type=checkbox]").attr("checked",!0)}})})},{i18n:"i18n",jQuery:"jQuery"}],6:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),r=i(a);r["default"].entwine("ss",function(t){t("#Form_EditForm_RedirectionType input").entwine({onmatch:function(){var e=t(this);e.attr("checked")&&this.toggle(),this._super()},onunmatch:function(){this._super()},onclick:function(){this.toggle()},toggle:function(){"Internal"==t(this).attr("value")?(t("#Form_EditForm_ExternalURL_Holder").hide(),t("#Form_EditForm_LinkToID_Holder").show()):(t("#Form_EditForm_ExternalURL_Holder").show(),t("#Form_EditForm_LinkToID_Holder").hide())}})})},{jQuery:"jQuery"}],7:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t){var e=document.getElementsByTagName("base")[0].href.replace("http://","").replace(/\//g,"_").replace(/\./g,"_");return e+t}var r=t("jQuery"),o=i(r);(0,o["default"])(document).ready(function(){(0,o["default"])("#switchView a.newWindow").on("click",function(t){var e=window.open(this.href,a(this.target));return e.focus(),!1}),(0,o["default"])("#SilverStripeNavigatorLink").on("click",function(t){return(0,o["default"])("#SilverStripeNavigatorLinkPopup").toggle(),!1}),(0,o["default"])("#SilverStripeNavigatorLinkPopup a.close").on("click",function(t){return(0,o["default"])("#SilverStripeNavigatorLinkPopup").hide(),!1}),(0,o["default"])("#SilverStripeNavigatorLinkPopup input").on("focus",function(t){this.select()})})},{jQuery:"jQuery"}],8:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),r=i(a);r["default"].entwine("ss",function(t){t(".field.urlsegment:not(.readonly)").entwine({MaxPreviewLength:55,Ellipsis:"...",onmatch:function(){this.find(":text").length&&this.toggleEdit(!1),this.redraw(),this._super()},redraw:function(){var t=this.find(":text"),e=decodeURI(t.data("prefix")+t.val()),n=e;e.length>this.getMaxPreviewLength()&&(n=this.getEllipsis()+e.substr(e.length-this.getMaxPreviewLength(),e.length)),this.find(".preview").attr("href",encodeURI(e+t.data("suffix"))).text(n)},toggleEdit:function(t){var e=this.find(":text");this.find(".preview-holder")[t?"hide":"show"](),this.find(".edit-holder")[t?"show":"hide"](),t&&(e.data("origval",e.val()),e.focus())},update:function(){var t=this,e=this.find(":text"),n=e.data("origval"),i=arguments[0],a=i&&""!==i?i:e.val();n!=a?(this.addClass("loading"),this.suggest(a,function(n){e.val(decodeURIComponent(n.value)),t.toggleEdit(!1),t.removeClass("loading"),t.redraw()})):(this.toggleEdit(!1),this.redraw())},cancel:function(){var t=this.find(":text");t.val(t.data("origval")),this.toggleEdit(!1)},suggest:function(e,n){var i=this,a=i.find(":text"),r=t.path.parseUrl(i.closest("form").attr("action")),o=r.hrefNoSearch+"/field/"+a.attr("name")+"/suggest/?value="+encodeURIComponent(e);r.search&&(o+="&"+r.search.replace(/^\?/,"")),t.ajax({url:o,success:function(t){n.apply(this,arguments)},error:function(t,e){t.statusText=t.responseText},complete:function(){i.removeClass("loading")}})}}),t(".field.urlsegment .edit").entwine({onclick:function(t){t.preventDefault(),this.closest(".field").toggleEdit(!0)}}),t(".field.urlsegment .update").entwine({onclick:function(t){t.preventDefault(),this.closest(".field").update()}}),t(".field.urlsegment .cancel").entwine({onclick:function(t){t.preventDefault(),this.closest(".field").cancel()}})})},{jQuery:"jQuery"}],9:[function(t,e,n){"use strict";t("../../src/CMSMain.AddForm.js"),t("../../src/CMSMain.EditForm.js"),t("../../src/CMSMain.js"),t("../../src/CMSMain.Tree.js"),t("../../src/CMSPageHistoryController.js"),t("../../src/RedirectorPage.js"),t("../../src/SilverStripeNavigator.js"),t("../../src/SiteTreeURLSegmentField.js")},{"../../src/CMSMain.AddForm.js":1,"../../src/CMSMain.EditForm.js":2,"../../src/CMSMain.Tree.js":3,"../../src/CMSMain.js":4,"../../src/CMSPageHistoryController.js":5,"../../src/RedirectorPage.js":6,"../../src/SilverStripeNavigator.js":7,"../../src/SiteTreeURLSegmentField.js":8}]},{},[9]);
|
!function t(e,n,i){function a(r,s){if(!n[r]){if(!e[r]){var d="function"==typeof require&&require;if(!s&&d)return d(r,!0);if(o)return o(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[r]={exports:{}};e[r][0].call(c.exports,function(t){var n=e[r][1][t];return a(n?n:t)},c,c.exports,t,e,n,i)}return n[r].exports}for(var o="function"==typeof require&&require,r=0;r<i.length;r++)a(i[r]);return a}({1:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),o=i(a);o["default"].entwine("ss",function(t){t(".cms-add-form .parent-mode :input").entwine({onclick:function(t){if("top"==this.val()){var e=this.closest("form").find("#Form_AddForm_ParentID_Holder .TreeDropdownField");e.setValue(""),e.setTitle("")}}}),t(".cms-add-form").entwine({ParentID:0,ParentCache:{},onadd:function(){var t=this;this.find("#Form_AddForm_ParentID_Holder .TreeDropdownField").bind("change",function(){t.updateTypeList()}),this.find(".SelectionGroup.parent-mode").bind("change",function(){t.updateTypeList()}),this.updateTypeList()},loadCachedChildren:function(t){var e=this.getParentCache();return"undefined"!=typeof e[t]?e[t]:null},saveCachedChildren:function(t,e){var n=this.getParentCache();n[t]=e,this.setParentCache(n)},updateTypeList:function(){var e=this.data("hints"),n=this.find("#Form_AddForm_ParentID_Holder .TreeDropdownField"),i=this.find("input[name=ParentModeField]:checked").val(),a=n.data("metadata"),o=a&&"child"===i?n.getValue()||this.getParentID():null,r=a?a.ClassName:null,s=r&&"child"===i?r:"Root",d="undefined"!=typeof e[s]?e[s]:null,l=this,c=d&&"undefined"!=typeof d.defaultChild?d.defaultChild:null,u=[];if(o){if(this.hasClass("loading"))return;return this.addClass("loading"),this.setParentID(o),n.getValue()||n.setValue(o),u=this.loadCachedChildren(o),null!==u?(this.updateSelectionFilter(u,c),void this.removeClass("loading")):(t.ajax({url:l.data("childfilter"),data:{ParentID:o},success:function(t){l.saveCachedChildren(o,t),l.updateSelectionFilter(t,c)},complete:function(){l.removeClass("loading")}}),!1)}u=d&&"undefined"!=typeof d.disallowedChildren?d.disallowedChildren:[],this.updateSelectionFilter(u,c)},updateSelectionFilter:function(e,n){var i=null;if(this.find("#Form_AddForm_PageType li").each(function(){var n=t(this).find("input").val(),a=-1===t.inArray(n,e);t(this).setEnabled(a),a||t(this).setSelected(!1),i=null===i?a:i&&a}),n)var a=this.find("#Form_AddForm_PageType li input[value="+n+"]").parents("li:first");else var a=this.find("#Form_AddForm_PageType li:not(.disabled):first");a.setSelected(!0),a.siblings().setSelected(!1);var o=this.find("#Form_AddForm_PageType li:not(.disabled)").length?"enable":"disable";this.find("button[name=action_doAdd]").button(o),this.find(".message-restricted")[i?"hide":"show"]()}}),t(".cms-add-form #Form_AddForm_PageType li").entwine({onclick:function(t){this.setSelected(!0)},setSelected:function(t){var e=this.find("input");t&&!e.is(":disabled")?(this.siblings().setSelected(!1),this.toggleClass("selected",!0),e.prop("checked",!0)):(this.toggleClass("selected",!1),e.prop("checked",!1))},setEnabled:function(e){t(this).toggleClass("disabled",!e),e?t(this).find("input").removeAttr("disabled"):t(this).find("input").attr("disabled","disabled").removeAttr("checked")}}),t(".cms-page-add-button").entwine({onclick:function(e){var n=t(".cms-tree"),i=t(".cms-list"),a=0;if(n.is(":visible")){var o=n.jstree("get_selected");a=o?t(o[0]).data("id"):null}else{var r=i.find('input[name="Page[GridState]"]').val();r&&(a=parseInt(JSON.parse(r).ParentID,10))}var s,d={selector:this.data("targetPanel"),pjax:this.data("pjax")};a?(extraParams=this.data("extraParams")?this.data("extraParams"):"",s=t.path.addSearchParams(i18n.sprintf(this.data("urlAddpage"),a),extraParams)):s=this.attr("href"),t(".cms-container").loadPanel(s,null,d),e.preventDefault(),this.blur()}})})},{jQuery:"jQuery"}],2:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),o=i(a),r=t("i18n"),s=i(r);o["default"].entwine("ss",function(t){t(".cms-edit-form :input[name=ClassName]").entwine({onchange:function(){alert(s["default"]._t("CMSMAIN.ALERTCLASSNAME"))}}),t(".cms-edit-form input[name=Title]").entwine({onmatch:function(){var e=this;e.data("OrigVal",e.val());var n=e.closest("form"),i=t("input:text[name=URLSegment]",n),a=t("input[name=LiveLink]",n);i.length>0&&(e._addActions(),this.bind("change",function(n){var o=e.data("OrigVal"),r=e.val();e.data("OrigVal",r),0===i.val().indexOf(i.data("defaultUrl"))&&""==a.val()?e.updateURLSegment(r):t(".update",e.parent()).show(),e.updateRelatedFields(r,o),e.updateBreadcrumbLabel(r)})),this._super()},onunmatch:function(){this._super()},updateRelatedFields:function(e,n){this.parents("form").find("input[name=MetaTitle], input[name=MenuTitle]").each(function(){var i=t(this);i.val()==n&&(i.val(e),i.updatedRelatedFields&&i.updatedRelatedFields())})},updateURLSegment:function(e){var n=t("input:text[name=URLSegment]",this.closest("form")),i=n.closest(".field.urlsegment"),a=t(".update",this.parent());i.update(e),a.is(":visible")&&a.hide()},updateBreadcrumbLabel:function(e){var n=(t(".cms-edit-form input[name=ID]").val(),t("span.cms-panel-link.crumb"));e&&""!=e&&n.text(e)},_addActions:function(){var e,n=this;e=t("<button />",{"class":"update ss-ui-button-small",text:s["default"]._t("URLSEGMENT.UpdateURL"),type:"button",click:function(t){t.preventDefault(),n.updateURLSegment(n.val())}}),e.insertAfter(n),e.hide()}}),t(".cms-edit-form .parentTypeSelector").entwine({onmatch:function(){var t=this;this.find(":input[name=ParentType]").bind("click",function(e){t._toggleSelection(e)}),this.find(".TreeDropdownField").bind("change",function(e){t._changeParentId(e)}),this._changeParentId(),this._toggleSelection(),this._super()},onunmatch:function(){this._super()},_toggleSelection:function(t){var e=this.find(":input[name=ParentType]:checked").val();"root"==e?this.find(":input[name=ParentID]").val(0):this.find(":input[name=ParentID]").val(this.find("#Form_EditForm_ParentType_subpage").data("parentIdValue")),this.find("#Form_EditForm_ParentID_Holder").toggle("root"!=e)},_changeParentId:function(t){var e=this.find(":input[name=ParentID]").val();this.find("#Form_EditForm_ParentType_subpage").data("parentIdValue",e)}}),t(".cms-edit-form #CanViewType, .cms-edit-form #CanEditType, .cms-edit-form #CanCreateTopLevelType").entwine({onmatch:function(){var e;"CanViewType"==this.attr("id")?e=t("#Form_EditForm_ViewerGroups_Holder"):"CanEditType"==this.attr("id")?e=t("#Form_EditForm_EditorGroups_Holder"):"CanCreateTopLevelType"==this.attr("id")&&(e=t("#Form_EditForm_CreateTopLevelGroups_Holder")),this.find(".optionset :input").bind("change",function(n){var i=t(this).closest(".middleColumn").parent("div");"OnlyTheseUsers"==n.target.value?(i.addClass("remove-splitter"),e.show()):(i.removeClass("remove-splitter"),e.hide())});var n=this.find("input[name="+this.attr("id")+"]:checked").val();e["OnlyTheseUsers"==n?"show":"hide"](),this._super()},onunmatch:function(){this._super()}}),t(".cms-edit-form .Actions #Form_EditForm_action_print").entwine({onclick:function(e){var n=t(this[0].form).attr("action").replace(/\?.*$/,"")+"/printable/"+t(":input[name=ID]",this[0].form).val();return"http://"!=n.substr(0,7)&&(n=t("base").attr("href")+n),window.open(n,"printable"),!1}}),t(".cms-edit-form .Actions #Form_EditForm_action_rollback").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="";return i=n?s["default"].sprintf(s["default"]._t("CMSMain.RollbackToVersion"),n):s["default"]._t("CMSMain.ConfirmRestoreFromLive"),confirm(i)?this._super(t):!1}}),t(".cms-edit-form .Actions #Form_EditForm_action_archive").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="";return i=s["default"].sprintf(s["default"]._t("CMSMain.Archive"),n),confirm(i)?this._super(t):!1}}),t(".cms-edit-form .Actions #Form_EditForm_action_restore").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="",a=this.data("toRoot");return i=s["default"].sprintf(s["default"]._t(a?"CMSMain.RestoreToRoot":"CMSMain.Restore"),n),confirm(i)?this._super(t):!1}}),t(".cms-edit-form .Actions #Form_EditForm_action_delete").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="";return i=s["default"].sprintf(s["default"]._t("CMSMain.DeleteFromDraft"),n),confirm(i)?this._super(t):!1}}),t(".cms-edit-form .Actions #Form_EditForm_action_unpublish").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="";return i=s["default"].sprintf(s["default"]._t("CMSMain.Unpublish"),n),confirm(i)?this._super(t):!1}}),t(".cms-edit-form.changed").entwine({onmatch:function(t){this.find("button[name=action_save]").button("option","showingAlternate",!0),this.find("button[name=action_publish]").button("option","showingAlternate",!0),this._super(t)},onunmatch:function(t){var e=this.find("button[name=action_save]");e.data("button")&&e.button("option","showingAlternate",!1);var n=this.find("button[name=action_publish]");n.data("button")&&n.button("option","showingAlternate",!1),this._super(t)}}),t(".cms-edit-form .Actions button[name=action_publish]").entwine({onbuttonafterrefreshalternate:function(){this.button("option","showingAlternate")?this.addClass("ss-ui-action-constructive"):this.removeClass("ss-ui-action-constructive")}}),t(".cms-edit-form .Actions button[name=action_save]").entwine({onbuttonafterrefreshalternate:function(){this.button("option","showingAlternate")?this.addClass("ss-ui-action-constructive"):this.removeClass("ss-ui-action-constructive")}}),t('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').entwine({onmatch:function(){this.redraw(),this._super()},onunmatch:function(){this._super()},redraw:function(){var e=t(".cms-edit-form.CMSPageSettingsController #Form_EditForm_ParentID_Holder");"Form_EditForm_ParentType_root"==t(this).attr("id")?e.slideUp():e.slideDown()},onclick:function(){this.redraw()}}),"Form_EditForm_ParentType_root"==t('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').attr("id")&&t(".cms-edit-form.CMSPageSettingsController #Form_EditForm_ParentID_Holder").hide()})},{i18n:"i18n",jQuery:"jQuery"}],3:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),o=i(a),r=t("i18n"),s=i(r);o["default"].entwine("ss.tree",function(t){t(".cms-tree").entwine({fromDocument:{"oncontext_show.vakata":function(t){this.adjustContextClass()}},adjustContextClass:function(){var e=t("#vakata-contextmenu").find("ul ul");e.each(function(n){var i="1",a=t(e[n]).find("li").length;a>20?i="3":a>10&&(i="2"),t(e[n]).addClass("col-"+i).removeClass("right"),t(e[n]).find("li").on("mouseenter",function(e){t(this).parent("ul").removeClass("right")})})},getTreeConfig:function(){var e=this,n=this._super();this.getHints();return n.plugins.push("contextmenu"),n.contextmenu={items:function(n){var i={edit:{label:s["default"]._t("Tree.EditPage","Edit page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"),action:function(n){t(".cms-container").entwine(".ss").loadPanel(s["default"].sprintf(e.data("urlEditpage"),n.data("id")))}}};n.hasClass("nochildren")||(i.showaslist={label:s["default"]._t("Tree.ShowAsList"),action:function(n){t(".cms-container").entwine(".ss").loadPanel(e.data("urlListview")+"&ParentID="+n.data("id"),null,{tabState:{"pages-controller-cms-content":{tabSelector:".content-listview"}}})}});var a=(n.data("pagetype"),n.data("id")),o=n.find(">a .item").data("allowedchildren"),r={},d=!1;return t.each(o,function(n,i){d=!0,r["allowedchildren-"+n]={label:'<span class="jstree-pageicon"></span>'+i,_class:"class-"+n,action:function(i){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(s["default"].sprintf(e.data("urlAddpage"),a,n),e.data("extraParams")))}}}),d&&(i.addsubpage={label:s["default"]._t("Tree.AddSubPage","Add page under this page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"),submenu:r}),i.duplicate={label:s["default"]._t("Tree.Duplicate"),submenu:[{label:s["default"]._t("Tree.ThisPageOnly"),action:function(n){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(s["default"].sprintf(e.data("urlDuplicate"),n.data("id")),e.data("extraParams")))}},{label:s["default"]._t("Tree.ThisPageAndSubpages"),action:function(n){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(s["default"].sprintf(e.data("urlDuplicatewithchildren"),n.data("id")),e.data("extraParams")))}}]},i}},n}}),t(".cms-tree a.jstree-clicked").entwine({onmatch:function(){var t,e=this,n=e.parents(".cms-panel-content");(e.offset().top<0||e.offset().top>n.height()-e.height())&&(t=n.scrollTop()+e.offset().top+n.height()/2,n.animate({scrollTop:t},"slow"))}}),t(".cms-tree-filtered .clear-filter").entwine({onclick:function(){window.location=location.protocol+"//"+location.host+location.pathname}}),t(".cms-tree-filtered").entwine({onmatch:function(){var e=this,n=function(){var n=t(".cms-content-tools .cms-panel-content").height()-e.parent().siblings(".cms-content-toolbar").outerHeight(!0);e.css("height",n+"px")};n(),t(window).on("resize",window.ss.debounce(n,300))}})})},{i18n:"i18n",jQuery:"jQuery"}],4:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),o=i(a);o["default"].entwine("ss",function(t){t(".cms-content-header-info").entwine({"from .cms-panel":{ontoggle:function(t){var e=this.closest(".cms-content").find(t.target);0!==e.length&&this.parent()[e.hasClass("collapsed")?"addClass":"removeClass"]("collapsed")}}}),t(".cms-content-toolbar").entwine({onmatch:function(){var e=this;this._super(),t.each(this.find(".cms-actions-buttons-row .tool-button"),function(){var n=t(this),i=n.data("toolid");n.hasClass("active");void 0!==i&&(n.data("active",!1).removeClass("active"),t("#"+i).hide(),e.bindActionButtonEvents(n))})},onunmatch:function(){var e=this;this._super(),t.each(this.find(".cms-actions-buttons-row .tool-button"),function(){var n=t(this);e.unbindActionButtonEvents(n)})},bindActionButtonEvents:function(t){var e=this;t.on("click.cmsContentToolbar",function(n){e.showHideTool(t)})},unbindActionButtonEvents:function(t){t.off(".cmsContentToolbar")},showHideTool:function(e){var n=e.data("active"),i=e.data("toolid"),a=t("#"+i);t.each(this.find(".cms-actions-buttons-row .tool-button"),function(){var e=t(this),n=t("#"+e.data("toolid"));e.data("toolid")!==i&&(n.hide(),e.data("active",!1))}),e[n?"removeClass":"addClass"]("active"),a[n?"hide":"show"](),e.data("active",!n)}})})},{jQuery:"jQuery"}],5:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),o=i(a),r=t("i18n"),s=i(r);o["default"].entwine("ss",function(t){t("#Form_VersionsForm").entwine({onmatch:function(){this._super()},onunmatch:function(){this._super()},onsubmit:function(e,n){e.preventDefault();var i;if(i=this.find(":input[name=ID]").val(),!i)return!1;var a,o,r,d,l,c;if(c=this.find(":input[name=CompareMode]").is(":checked"),r=this.find("table input[type=checkbox]").filter(":checked"),c){if(2!=r.length)return!1;d=r.eq(0).val(),l=r.eq(1).val(),a=this.find(":submit[name=action_doCompare]"),o=s["default"].sprintf(this.data("linkTmplCompare"),i,l,d)}else d=r.eq(0).val(),a=this.find(":submit[name=action_doShowVersion]"),o=s["default"].sprintf(this.data("linkTmplShow"),i,d);t(".cms-container").loadPanel(o,"",{pjax:"CurrentForm"})}}),t("#Form_VersionsForm input[name=ShowUnpublished]").entwine({onmatch:function(){this.toggle(),this._super()},onunmatch:function(){this._super()},onchange:function(){this.toggle()},toggle:function(){var e=t(this),n=e.parents("form");e.attr("checked")?n.find("tr[data-published=false]").show():n.find("tr[data-published=false]").hide()._unselect()}}),t("#Form_VersionsForm tbody tr").entwine({onclick:function(t){var e,n;return e=this.parents("form").find(":input[name=CompareMode]").attr("checked"),n=this.siblings(".active"),e&&this.hasClass("active")?void this._unselect():e?n.length>1?alert(s["default"]._t("ONLYSELECTTWO","You can only compare two versions at this time.")):(this._select(),void(1==n.length&&this.parents("form").submit())):(this._select(),n._unselect(),this.parents("form").submit(),void 0)},_unselect:function(){this.removeClass("active"),this.find(":input[type=checkbox]").attr("checked",!1)},_select:function(){this.addClass("active"),this.find(":input[type=checkbox]").attr("checked",!0)}})})},{i18n:"i18n",jQuery:"jQuery"}],6:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),o=i(a);o["default"].entwine("ss",function(t){t("#Form_EditForm_RedirectionType input").entwine({onmatch:function(){var e=t(this);e.attr("checked")&&this.toggle(),this._super()},onunmatch:function(){this._super()},onclick:function(){this.toggle()},toggle:function(){"Internal"==t(this).attr("value")?(t("#Form_EditForm_ExternalURL_Holder").hide(),t("#Form_EditForm_LinkToID_Holder").show()):(t("#Form_EditForm_ExternalURL_Holder").show(),t("#Form_EditForm_LinkToID_Holder").hide())}})})},{jQuery:"jQuery"}],7:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t){var e=document.getElementsByTagName("base")[0].href.replace("http://","").replace(/\//g,"_").replace(/\./g,"_");return e+t}var o=t("jQuery"),r=i(o);(0,r["default"])(document).ready(function(){(0,r["default"])("#switchView a.newWindow").on("click",function(t){var e=window.open(this.href,a(this.target));return e.focus(),!1}),(0,r["default"])("#SilverStripeNavigatorLink").on("click",function(t){return(0,r["default"])("#SilverStripeNavigatorLinkPopup").toggle(),!1}),(0,r["default"])("#SilverStripeNavigatorLinkPopup a.close").on("click",function(t){return(0,r["default"])("#SilverStripeNavigatorLinkPopup").hide(),!1}),(0,r["default"])("#SilverStripeNavigatorLinkPopup input").on("focus",function(t){this.select()})})},{jQuery:"jQuery"}],8:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=t("jQuery"),o=i(a);o["default"].entwine("ss",function(t){t(".field.urlsegment:not(.readonly)").entwine({MaxPreviewLength:55,Ellipsis:"...",onmatch:function(){this.find(":text").length&&this.toggleEdit(!1),this.redraw(),this._super()},redraw:function(){var t=this.find(":text"),e=decodeURI(t.data("prefix")+t.val()),n=e;e.length>this.getMaxPreviewLength()&&(n=this.getEllipsis()+e.substr(e.length-this.getMaxPreviewLength(),e.length)),this.find(".preview").attr("href",encodeURI(e+t.data("suffix"))).text(n)},toggleEdit:function(t){var e=this.find(":text");this.find(".preview-holder")[t?"hide":"show"](),this.find(".edit-holder")[t?"show":"hide"](),t&&(e.data("origval",e.val()),e.focus())},update:function(){var t=this,e=this.find(":text"),n=e.data("origval"),i=arguments[0],a=i&&""!==i?i:e.val();n!=a?(this.addClass("loading"),this.suggest(a,function(n){e.val(decodeURIComponent(n.value)),t.toggleEdit(!1),t.removeClass("loading"),t.redraw()})):(this.toggleEdit(!1),this.redraw())},cancel:function(){var t=this.find(":text");t.val(t.data("origval")),this.toggleEdit(!1)},suggest:function(e,n){var i=this,a=i.find(":text"),o=t.path.parseUrl(i.closest("form").attr("action")),r=o.hrefNoSearch+"/field/"+a.attr("name")+"/suggest/?value="+encodeURIComponent(e);o.search&&(r+="&"+o.search.replace(/^\?/,"")),t.ajax({url:r,success:function(t){n.apply(this,arguments)},error:function(t,e){t.statusText=t.responseText},complete:function(){i.removeClass("loading")}})}}),t(".field.urlsegment .edit").entwine({onclick:function(t){t.preventDefault(),this.closest(".field").toggleEdit(!0)}}),t(".field.urlsegment .update").entwine({onclick:function(t){t.preventDefault(),this.closest(".field").update()}}),t(".field.urlsegment .cancel").entwine({onclick:function(t){t.preventDefault(),this.closest(".field").cancel()}})})},{jQuery:"jQuery"}],9:[function(t,e,n){"use strict";t("../../src/CMSMain.AddForm.js"),t("../../src/CMSMain.EditForm.js"),t("../../src/CMSMain.js"),t("../../src/CMSMain.Tree.js"),t("../../src/CMSPageHistoryController.js"),t("../../src/RedirectorPage.js"),t("../../src/SilverStripeNavigator.js"),t("../../src/SiteTreeURLSegmentField.js")},{"../../src/CMSMain.AddForm.js":1,"../../src/CMSMain.EditForm.js":2,"../../src/CMSMain.Tree.js":3,"../../src/CMSMain.js":4,"../../src/CMSPageHistoryController.js":5,"../../src/RedirectorPage.js":6,"../../src/SilverStripeNavigator.js":7,"../../src/SiteTreeURLSegmentField.js":8}]},{},[9]);
|
20
lang/cs.yml
20
lang/cs.yml
@ -71,8 +71,8 @@ cs:
|
|||||||
PUBLISH_PAGES: Zveřejnit
|
PUBLISH_PAGES: Zveřejnit
|
||||||
RESTORE: Obnovit
|
RESTORE: Obnovit
|
||||||
RESTORED_PAGES: 'Obnoveno %d stránek'
|
RESTORED_PAGES: 'Obnoveno %d stránek'
|
||||||
UNPUBLISHED_PAGES: 'Nezveřejněné %d stránky'
|
UNPUBLISHED_PAGES: 'Nezveřejněných %d stránek'
|
||||||
UNPUBLISH_PAGES: Nezveřejnit
|
UNPUBLISH_PAGES: Nezveřejňovat
|
||||||
CMSFileAddController:
|
CMSFileAddController:
|
||||||
MENUTITLE: Soubory
|
MENUTITLE: Soubory
|
||||||
CMSMain:
|
CMSMain:
|
||||||
@ -94,11 +94,11 @@ cs:
|
|||||||
DUPLICATEDWITHCHILDREN: 'Duplikováno ''{title}'' a potomci úspěšně'
|
DUPLICATEDWITHCHILDREN: 'Duplikováno ''{title}'' a potomci úspěšně'
|
||||||
EMAIL: E-mail
|
EMAIL: E-mail
|
||||||
EditTree: 'Upravit strom'
|
EditTree: 'Upravit strom'
|
||||||
ListFiltered: 'Filtrovaný seznam.'
|
ListFiltered: 'Zobrazení výsledků vyhledávání.'
|
||||||
MENUTITLE: 'Upravit stránku'
|
MENUTITLE: 'Upravit stránku'
|
||||||
NEWPAGE: 'Nová {pagetype}'
|
NEWPAGE: 'Nová {pagetype}'
|
||||||
PAGENOTEXISTS: 'Tato stránka neexistuje'
|
PAGENOTEXISTS: 'Tato stránka neexistuje'
|
||||||
PAGES: Stránky
|
PAGES: 'Stav stránky'
|
||||||
PAGETYPEANYOPT: Jakékoliv
|
PAGETYPEANYOPT: Jakékoliv
|
||||||
PAGETYPEOPT: 'Typ stránky'
|
PAGETYPEOPT: 'Typ stránky'
|
||||||
PUBALLCONFIRM: 'Prosím zveřejněte veškeré stránky z úschovny'
|
PUBALLCONFIRM: 'Prosím zveřejněte veškeré stránky z úschovny'
|
||||||
@ -122,11 +122,11 @@ cs:
|
|||||||
TabContent: Obsah
|
TabContent: Obsah
|
||||||
TabHistory: Historie
|
TabHistory: Historie
|
||||||
TabSettings: Nastavení
|
TabSettings: Nastavení
|
||||||
TreeFiltered: 'Fltrovaná struktura.'
|
TreeFiltered: 'Zobrazení výsledků vyhledávání.'
|
||||||
TreeFilteredClear: 'Vyčistit filtr'
|
TreeFilteredClear: Vyčistit
|
||||||
CMSMain_left_ss:
|
CMSMain_left_ss:
|
||||||
APPLY_FILTER: 'Použít filtr'
|
APPLY_FILTER: Hledat
|
||||||
CLEAR_FILTER: 'Vyčistit filtr'
|
CLEAR_FILTER: Vyčistit
|
||||||
RESET: Resetovat
|
RESET: Resetovat
|
||||||
CMSPageAddController:
|
CMSPageAddController:
|
||||||
MENUTITLE: 'Přidat stránku'
|
MENUTITLE: 'Přidat stránku'
|
||||||
@ -159,7 +159,7 @@ cs:
|
|||||||
MENUTITLE: Stránky
|
MENUTITLE: Stránky
|
||||||
TreeView: 'Pohled strom'
|
TreeView: 'Pohled strom'
|
||||||
CMSPagesController_ContentToolbar_ss:
|
CMSPagesController_ContentToolbar_ss:
|
||||||
MULTISELECT: Multi-výběr
|
MULTISELECT: 'Dávkové akce'
|
||||||
CMSPagesController_Tools_ss:
|
CMSPagesController_Tools_ss:
|
||||||
FILTER: Filtr
|
FILTER: Filtr
|
||||||
CMSSIteTreeFilter_PublishedPages:
|
CMSSIteTreeFilter_PublishedPages:
|
||||||
@ -168,7 +168,7 @@ cs:
|
|||||||
FILTERDATEFROM: Od
|
FILTERDATEFROM: Od
|
||||||
FILTERDATEHEADING: Datum
|
FILTERDATEHEADING: Datum
|
||||||
FILTERDATETO: Do
|
FILTERDATETO: Do
|
||||||
FILTERLABELTEXT: Obsah
|
FILTERLABELTEXT: Hledat
|
||||||
PAGEFILTERDATEHEADING: 'Poslední změna'
|
PAGEFILTERDATEHEADING: 'Poslední změna'
|
||||||
CMSSettingsController:
|
CMSSettingsController:
|
||||||
MENUTITLE: Možnosti
|
MENUTITLE: Možnosti
|
||||||
|
25
lang/fi.yml
25
lang/fi.yml
@ -71,6 +71,8 @@ fi:
|
|||||||
PUBLISH_PAGES: Julkaise
|
PUBLISH_PAGES: Julkaise
|
||||||
RESTORE: Palauta
|
RESTORE: Palauta
|
||||||
RESTORED_PAGES: 'Palautettu %d sivua'
|
RESTORED_PAGES: 'Palautettu %d sivua'
|
||||||
|
UNPUBLISHED_PAGES: 'Poistettiin %d sivua julkaisusta'
|
||||||
|
UNPUBLISH_PAGES: Piilota julkaisu
|
||||||
CMSFileAddController:
|
CMSFileAddController:
|
||||||
MENUTITLE: Tiedostot
|
MENUTITLE: Tiedostot
|
||||||
CMSMain:
|
CMSMain:
|
||||||
@ -92,10 +94,13 @@ fi:
|
|||||||
DUPLICATEDWITHCHILDREN: '''{title}'' ja alasivu monistettiin onnistuneesti'
|
DUPLICATEDWITHCHILDREN: '''{title}'' ja alasivu monistettiin onnistuneesti'
|
||||||
EMAIL: Sähköposti
|
EMAIL: Sähköposti
|
||||||
EditTree: 'Muokkaa rakennepuuta'
|
EditTree: 'Muokkaa rakennepuuta'
|
||||||
|
ListFiltered: 'Näytetään hakutulokset.'
|
||||||
MENUTITLE: 'Muokkaa sivua'
|
MENUTITLE: 'Muokkaa sivua'
|
||||||
NEWPAGE: 'Uusi {pagetype}'
|
NEWPAGE: 'Uusi {pagetype}'
|
||||||
PAGENOTEXISTS: 'Tätä sivua ei ole olemassa'
|
PAGENOTEXISTS: 'Tätä sivua ei ole olemassa'
|
||||||
|
PAGES: 'Sivun tila'
|
||||||
PAGETYPEANYOPT: Mikä tahansa
|
PAGETYPEANYOPT: Mikä tahansa
|
||||||
|
PAGETYPEOPT: 'Sivutyyppi'
|
||||||
PUBALLCONFIRM: 'Julkaise jokainen sivu tällä sivustolla kopioiden luonnosten sisältö julkiselle sivustolle'
|
PUBALLCONFIRM: 'Julkaise jokainen sivu tällä sivustolla kopioiden luonnosten sisältö julkiselle sivustolle'
|
||||||
PUBALLFUN: 'Julkaise kaikki -toiminto'
|
PUBALLFUN: 'Julkaise kaikki -toiminto'
|
||||||
PUBALLFUN2: "Painamalla tätä nappia, tekee se saman kuin kävisit painamassa joka sivulla \"julkaise\". Se on käytännöllinen, jos on tehnyt isoja muutoksia sisältöön, esim. kun sivusto luotiin."
|
PUBALLFUN2: "Painamalla tätä nappia, tekee se saman kuin kävisit painamassa joka sivulla \"julkaise\". Se on käytännöllinen, jos on tehnyt isoja muutoksia sisältöön, esim. kun sivusto luotiin."
|
||||||
@ -104,6 +109,7 @@ fi:
|
|||||||
REMOVED: 'Poista ''{title}''{description} näkyvältä sivustolta'
|
REMOVED: 'Poista ''{title}''{description} näkyvältä sivustolta'
|
||||||
REMOVEDPAGE: '''{title}'' poistettiin julkaistulta sivustolta'
|
REMOVEDPAGE: '''{title}'' poistettiin julkaistulta sivustolta'
|
||||||
REMOVEDPAGEFROMDRAFT: 'Poistettu ''%s'' luonnossivustolta'
|
REMOVEDPAGEFROMDRAFT: 'Poistettu ''%s'' luonnossivustolta'
|
||||||
|
RESTORE: 'Palauta luonnos'
|
||||||
RESTORED: '''{title}'' palautettiin onnistuneesti'
|
RESTORED: '''{title}'' palautettiin onnistuneesti'
|
||||||
RESTORE_DESC: 'Palauta arkistoitu versio luonnokseksi'
|
RESTORE_DESC: 'Palauta arkistoitu versio luonnokseksi'
|
||||||
RESTORE_TO_ROOT: 'Palauta luonnos päätasolle'
|
RESTORE_TO_ROOT: 'Palauta luonnos päätasolle'
|
||||||
@ -116,7 +122,11 @@ fi:
|
|||||||
TabContent: Sisältö
|
TabContent: Sisältö
|
||||||
TabHistory: Historia
|
TabHistory: Historia
|
||||||
TabSettings: Asetukset
|
TabSettings: Asetukset
|
||||||
|
TreeFiltered: 'Näytetään haun tulokset.'
|
||||||
|
TreeFilteredClear: Tyhjennä
|
||||||
CMSMain_left_ss:
|
CMSMain_left_ss:
|
||||||
|
APPLY_FILTER: Hae
|
||||||
|
CLEAR_FILTER: Tyhjennä
|
||||||
RESET: Nollaa
|
RESET: Nollaa
|
||||||
CMSPageAddController:
|
CMSPageAddController:
|
||||||
MENUTITLE: 'Lisää sivu'
|
MENUTITLE: 'Lisää sivu'
|
||||||
@ -148,6 +158,8 @@ fi:
|
|||||||
ListView: 'Listanäkymä'
|
ListView: 'Listanäkymä'
|
||||||
MENUTITLE: Sivut
|
MENUTITLE: Sivut
|
||||||
TreeView: 'Puunäkymä'
|
TreeView: 'Puunäkymä'
|
||||||
|
CMSPagesController_ContentToolbar_ss:
|
||||||
|
MULTISELECT: 'Sarjatehtävät'
|
||||||
CMSPagesController_Tools_ss:
|
CMSPagesController_Tools_ss:
|
||||||
FILTER: Suodata
|
FILTER: Suodata
|
||||||
CMSSIteTreeFilter_PublishedPages:
|
CMSSIteTreeFilter_PublishedPages:
|
||||||
@ -156,11 +168,20 @@ fi:
|
|||||||
FILTERDATEFROM: Alkaen
|
FILTERDATEFROM: Alkaen
|
||||||
FILTERDATEHEADING: Pvm
|
FILTERDATEHEADING: Pvm
|
||||||
FILTERDATETO: Päättyen
|
FILTERDATETO: Päättyen
|
||||||
|
FILTERLABELTEXT: Haku
|
||||||
PAGEFILTERDATEHEADING: 'Viimeksi muokattu'
|
PAGEFILTERDATEHEADING: 'Viimeksi muokattu'
|
||||||
CMSSettingsController:
|
CMSSettingsController:
|
||||||
MENUTITLE: Asetukset
|
MENUTITLE: Asetukset
|
||||||
|
CMSSiteTreeFilter_ChangedPages:
|
||||||
|
Title: 'Muokatut sivut'
|
||||||
|
CMSSiteTreeFilter_DeletedPages:
|
||||||
|
Title: 'Kaikki sivut, mukaan lukien arkistoidut'
|
||||||
CMSSiteTreeFilter_Search:
|
CMSSiteTreeFilter_Search:
|
||||||
Title: 'Kaikki sivut'
|
Title: 'Kaikki sivut'
|
||||||
|
CMSSiteTreeFilter_StatusDeletedPages:
|
||||||
|
Title: 'Arkistoidut sivut'
|
||||||
|
CMSSiteTreeFilter_StatusDraftPages:
|
||||||
|
Title: 'Luonnossivut'
|
||||||
CMSSiteTreeFilter_StatusRemovedFromDraftPages:
|
CMSSiteTreeFilter_StatusRemovedFromDraftPages:
|
||||||
Title: 'Näkyvillä, mutta poistettu luonnoksista'
|
Title: 'Näkyvillä, mutta poistettu luonnoksista'
|
||||||
ContentControl:
|
ContentControl:
|
||||||
@ -221,6 +242,7 @@ fi:
|
|||||||
DEFAULTSERVERERRORPAGETITLE: 'Palvelinvirhe'
|
DEFAULTSERVERERRORPAGETITLE: 'Palvelinvirhe'
|
||||||
DESCRIPTION: 'Omat virheilmoitukset (sivuille, kuten "Sivua ei löytynyt")'
|
DESCRIPTION: 'Omat virheilmoitukset (sivuille, kuten "Sivua ei löytynyt")'
|
||||||
ERRORFILEPROBLEM: 'Virhe avattaessa tiedostoa "{filename}" palvelimelle tallentamista varten. Tarkista tiedoston kirjoitusoikeudet.'
|
ERRORFILEPROBLEM: 'Virhe avattaessa tiedostoa "{filename}" palvelimelle tallentamista varten. Tarkista tiedoston kirjoitusoikeudet.'
|
||||||
|
PLURALNAME: 'Virhesivut'
|
||||||
SINGULARNAME: 'Virhesivu'
|
SINGULARNAME: 'Virhesivu'
|
||||||
File:
|
File:
|
||||||
Title: Nimi
|
Title: Nimi
|
||||||
@ -245,6 +267,7 @@ fi:
|
|||||||
HASBEENSETUP: 'Sivu, joka ohjaa käyttäjän toiselle sivulle on valmis, mutta sivua, jolle käyttäjä ohjataan, ei ole.'
|
HASBEENSETUP: 'Sivu, joka ohjaa käyttäjän toiselle sivulle on valmis, mutta sivua, jolle käyttäjä ohjataan, ei ole.'
|
||||||
HEADER: 'Tämä sivu ohjaa käyttäjän toiselle sivulle'
|
HEADER: 'Tämä sivu ohjaa käyttäjän toiselle sivulle'
|
||||||
OTHERURL: 'Toisen verkkosivuston URL-osoite'
|
OTHERURL: 'Toisen verkkosivuston URL-osoite'
|
||||||
|
PLURALNAME: 'Uudelleenohjaavat sivut'
|
||||||
REDIRECTTO: 'Minne ohjataan?'
|
REDIRECTTO: 'Minne ohjataan?'
|
||||||
REDIRECTTOEXTERNAL: 'Muu verkkosivusto'
|
REDIRECTTOEXTERNAL: 'Muu verkkosivusto'
|
||||||
REDIRECTTOPAGE: 'Sivu verkkosivustollasi'
|
REDIRECTTOPAGE: 'Sivu verkkosivustollasi'
|
||||||
@ -278,6 +301,7 @@ fi:
|
|||||||
SilverStripeNavigator:
|
SilverStripeNavigator:
|
||||||
ARCHIVED: Arkistoitu
|
ARCHIVED: Arkistoitu
|
||||||
SilverStripeNavigatorLink:
|
SilverStripeNavigatorLink:
|
||||||
|
ShareInstructions: 'Jaa tämä sivu kopioimalla ja liittämällä alapuolella oleva linkki.'
|
||||||
ShareLink: 'Jaa linkki'
|
ShareLink: 'Jaa linkki'
|
||||||
SilverStripeNavigatorLinkl:
|
SilverStripeNavigatorLinkl:
|
||||||
CloseLink: Sulje
|
CloseLink: Sulje
|
||||||
@ -412,5 +436,6 @@ fi:
|
|||||||
EditLink: muokkaa
|
EditLink: muokkaa
|
||||||
HEADER: 'Tämä on virtuaalisivu'
|
HEADER: 'Tämä on virtuaalisivu'
|
||||||
HEADERWITHLINK: 'Tämä on virtuaalisivu, joka kopioi sisällön kohteesta "{title}" ({link})'
|
HEADERWITHLINK: 'Tämä on virtuaalisivu, joka kopioi sisällön kohteesta "{title}" ({link})'
|
||||||
|
PLURALNAME: 'Virtuaalisivut'
|
||||||
PageTypNotAllowedOnRoot: 'Alkuperäinen sivutyyppi "{type}" ei ole sallittu tämän virtuaalisen sivun päätasolla'
|
PageTypNotAllowedOnRoot: 'Alkuperäinen sivutyyppi "{type}" ei ole sallittu tämän virtuaalisen sivun päätasolla'
|
||||||
SINGULARNAME: 'Virtuaalisivu'
|
SINGULARNAME: 'Virtuaalisivu'
|
||||||
|
@ -156,6 +156,7 @@ it:
|
|||||||
FILTERDATEFROM: Da
|
FILTERDATEFROM: Da
|
||||||
FILTERDATEHEADING: Data
|
FILTERDATEHEADING: Data
|
||||||
FILTERDATETO: A
|
FILTERDATETO: A
|
||||||
|
PAGEFILTERDATEHEADING: 'Ultima modifica'
|
||||||
CMSSettingsController:
|
CMSSettingsController:
|
||||||
MENUTITLE: Impostazioni
|
MENUTITLE: Impostazioni
|
||||||
CMSSiteTreeFilter_Search:
|
CMSSiteTreeFilter_Search:
|
||||||
@ -220,7 +221,10 @@ it:
|
|||||||
DEFAULTSERVERERRORPAGETITLE: 'Errore server'
|
DEFAULTSERVERERRORPAGETITLE: 'Errore server'
|
||||||
DESCRIPTION: 'Contenuto personalizzato per differenti casi di errore (es. "Pagina non trovata")'
|
DESCRIPTION: 'Contenuto personalizzato per differenti casi di errore (es. "Pagina non trovata")'
|
||||||
ERRORFILEPROBLEM: 'Errore nell''apertura del file "{filename}" per la scrittura. Controlla i permessi del file.'
|
ERRORFILEPROBLEM: 'Errore nell''apertura del file "{filename}" per la scrittura. Controlla i permessi del file.'
|
||||||
|
PLURALNAME: 'Pagine di errore'
|
||||||
SINGULARNAME: 'Pagine errore'
|
SINGULARNAME: 'Pagine errore'
|
||||||
|
File:
|
||||||
|
Title: Titolo
|
||||||
Folder:
|
Folder:
|
||||||
AddFolderButton: 'Aggiungi cartella'
|
AddFolderButton: 'Aggiungi cartella'
|
||||||
DELETEUNUSEDTHUMBNAILS: 'Elimina anteprime inutilizzate'
|
DELETEUNUSEDTHUMBNAILS: 'Elimina anteprime inutilizzate'
|
||||||
@ -242,6 +246,7 @@ it:
|
|||||||
HASBEENSETUP: 'Una pagina di redirezione è stata configurata nonostante non vi sia alcun indirizzo a cui farla puntare'
|
HASBEENSETUP: 'Una pagina di redirezione è stata configurata nonostante non vi sia alcun indirizzo a cui farla puntare'
|
||||||
HEADER: 'Questa pagina redirigerà gli utenti su un''altra'
|
HEADER: 'Questa pagina redirigerà gli utenti su un''altra'
|
||||||
OTHERURL: 'Altro indirizzo del sito web'
|
OTHERURL: 'Altro indirizzo del sito web'
|
||||||
|
PLURALNAME: 'Pagine di redirezione'
|
||||||
REDIRECTTO: 'Redirigi a'
|
REDIRECTTO: 'Redirigi a'
|
||||||
REDIRECTTOEXTERNAL: 'Un altro sito web'
|
REDIRECTTOEXTERNAL: 'Un altro sito web'
|
||||||
REDIRECTTOPAGE: 'Una pagina sul tuo sito web'
|
REDIRECTTOPAGE: 'Una pagina sul tuo sito web'
|
||||||
@ -409,5 +414,6 @@ it:
|
|||||||
EditLink: modifica
|
EditLink: modifica
|
||||||
HEADER: 'Questa è una pagina virtuale'
|
HEADER: 'Questa è una pagina virtuale'
|
||||||
HEADERWITHLINK: 'Questa è una pagina virtuale copiata da "{title}" ({link})'
|
HEADERWITHLINK: 'Questa è una pagina virtuale copiata da "{title}" ({link})'
|
||||||
|
PLURALNAME: 'Pagine virtuali'
|
||||||
PageTypNotAllowedOnRoot: 'Il tipo di pagina originale "{type}" non è consentito al primo livello per questa pagina virtuale'
|
PageTypNotAllowedOnRoot: 'Il tipo di pagina originale "{type}" non è consentito al primo livello per questa pagina virtuale'
|
||||||
SINGULARNAME: 'Pagina virtuale'
|
SINGULARNAME: 'Pagina virtuale'
|
||||||
|
21
lang/lt.yml
21
lang/lt.yml
@ -71,6 +71,8 @@ lt:
|
|||||||
PUBLISH_PAGES: Publikuoti
|
PUBLISH_PAGES: Publikuoti
|
||||||
RESTORE: Atstatyti
|
RESTORE: Atstatyti
|
||||||
RESTORED_PAGES: 'Atstatyti %d puslapiai'
|
RESTORED_PAGES: 'Atstatyti %d puslapiai'
|
||||||
|
UNPUBLISHED_PAGES: 'Nebepublikuojami %d puslapiai'
|
||||||
|
UNPUBLISH_PAGES: Nepublikuoti
|
||||||
CMSFileAddController:
|
CMSFileAddController:
|
||||||
MENUTITLE: Bylos
|
MENUTITLE: Bylos
|
||||||
CMSMain:
|
CMSMain:
|
||||||
@ -96,7 +98,7 @@ lt:
|
|||||||
MENUTITLE: 'Redaguoti puslapį'
|
MENUTITLE: 'Redaguoti puslapį'
|
||||||
NEWPAGE: 'Naujas {pagetype}'
|
NEWPAGE: 'Naujas {pagetype}'
|
||||||
PAGENOTEXISTS: 'Šis puslapis neegzistuoja'
|
PAGENOTEXISTS: 'Šis puslapis neegzistuoja'
|
||||||
PAGES: Puslapiai
|
PAGES: 'Puslapio būsena'
|
||||||
PAGETYPEANYOPT: Bet koks
|
PAGETYPEANYOPT: Bet koks
|
||||||
PAGETYPEOPT: 'Puslapio tipas'
|
PAGETYPEOPT: 'Puslapio tipas'
|
||||||
PUBALLCONFIRM: 'Prašome publikuoti kiekvieną svetainės puslapį, kopijuojant turinį į svetainę'
|
PUBALLCONFIRM: 'Prašome publikuoti kiekvieną svetainės puslapį, kopijuojant turinį į svetainę'
|
||||||
@ -121,10 +123,10 @@ lt:
|
|||||||
TabHistory: Istorija
|
TabHistory: Istorija
|
||||||
TabSettings: Nustatymai
|
TabSettings: Nustatymai
|
||||||
TreeFiltered: 'Rodomi paieškos rezultatai'
|
TreeFiltered: 'Rodomi paieškos rezultatai'
|
||||||
TreeFilteredClear: 'Išvalyti filtrą'
|
TreeFilteredClear: Išvalyti filtrą
|
||||||
CMSMain_left_ss:
|
CMSMain_left_ss:
|
||||||
APPLY_FILTER: 'Ieškoti'
|
APPLY_FILTER: Ieškoti
|
||||||
CLEAR_FILTER: 'Išvalyti filtrą'
|
CLEAR_FILTER: Išvalyti filtrą
|
||||||
RESET: Atstatyti
|
RESET: Atstatyti
|
||||||
CMSPageAddController:
|
CMSPageAddController:
|
||||||
MENUTITLE: 'Pridėti puslapį'
|
MENUTITLE: 'Pridėti puslapį'
|
||||||
@ -157,7 +159,7 @@ lt:
|
|||||||
MENUTITLE: Puslapiai
|
MENUTITLE: Puslapiai
|
||||||
TreeView: 'Medžio rodinys'
|
TreeView: 'Medžio rodinys'
|
||||||
CMSPagesController_ContentToolbar_ss:
|
CMSPagesController_ContentToolbar_ss:
|
||||||
MULTISELECT: Daugybinis pasirinkimas
|
MULTISELECT: 'Daugybinis pasirinkimas'
|
||||||
CMSPagesController_Tools_ss:
|
CMSPagesController_Tools_ss:
|
||||||
FILTER: Filtras
|
FILTER: Filtras
|
||||||
CMSSIteTreeFilter_PublishedPages:
|
CMSSIteTreeFilter_PublishedPages:
|
||||||
@ -170,8 +172,16 @@ lt:
|
|||||||
PAGEFILTERDATEHEADING: 'Redaguota'
|
PAGEFILTERDATEHEADING: 'Redaguota'
|
||||||
CMSSettingsController:
|
CMSSettingsController:
|
||||||
MENUTITLE: Nustatymai
|
MENUTITLE: Nustatymai
|
||||||
|
CMSSiteTreeFilter_ChangedPages:
|
||||||
|
Title: 'Pakeisti puslapiai'
|
||||||
|
CMSSiteTreeFilter_DeletedPages:
|
||||||
|
Title: 'Visi puslapiai, taip pat ir archyvuoti'
|
||||||
CMSSiteTreeFilter_Search:
|
CMSSiteTreeFilter_Search:
|
||||||
Title: 'Visi puslapiai'
|
Title: 'Visi puslapiai'
|
||||||
|
CMSSiteTreeFilter_StatusDeletedPages:
|
||||||
|
Title: 'Archyvuoti puslapiai'
|
||||||
|
CMSSiteTreeFilter_StatusDraftPages:
|
||||||
|
Title: 'Juodraštiniai puslapiai'
|
||||||
CMSSiteTreeFilter_StatusRemovedFromDraftPages:
|
CMSSiteTreeFilter_StatusRemovedFromDraftPages:
|
||||||
Title: 'Publikuotas, bet pašalintas iš juodraščių'
|
Title: 'Publikuotas, bet pašalintas iš juodraščių'
|
||||||
ContentControl:
|
ContentControl:
|
||||||
@ -291,6 +301,7 @@ lt:
|
|||||||
SilverStripeNavigator:
|
SilverStripeNavigator:
|
||||||
ARCHIVED: Archyvuota
|
ARCHIVED: Archyvuota
|
||||||
SilverStripeNavigatorLink:
|
SilverStripeNavigatorLink:
|
||||||
|
ShareInstructions: 'Norėdami pasidalinti šiuo puslapiu, kopijuokite žemiau esančią nuorodą.'
|
||||||
ShareLink: 'Dalintis nuoroda'
|
ShareLink: 'Dalintis nuoroda'
|
||||||
SilverStripeNavigatorLinkl:
|
SilverStripeNavigatorLinkl:
|
||||||
CloseLink: Uždaryti
|
CloseLink: Uždaryti
|
||||||
|
@ -94,9 +94,7 @@ pl:
|
|||||||
MENUTITLE: 'Edytuj stronę'
|
MENUTITLE: 'Edytuj stronę'
|
||||||
NEWPAGE: 'Nowa {pagetype}'
|
NEWPAGE: 'Nowa {pagetype}'
|
||||||
PAGENOTEXISTS: 'Ta strona nie istnieje'
|
PAGENOTEXISTS: 'Ta strona nie istnieje'
|
||||||
PAGES: Strony
|
|
||||||
PAGETYPEANYOPT: Jakikolwiek
|
PAGETYPEANYOPT: Jakikolwiek
|
||||||
PAGETYPEOPT: 'Rodzaj strony'
|
|
||||||
PUBALLCONFIRM: 'Opublikuj każdą stronę w witrynie'
|
PUBALLCONFIRM: 'Opublikuj każdą stronę w witrynie'
|
||||||
PUBALLFUN: '"Opublikuj wszystko"'
|
PUBALLFUN: '"Opublikuj wszystko"'
|
||||||
PUBALLFUN2: "Naciśnięcie tego przycisku spowoduje przejście po wszystkich stronach i opublikowanie ich. Zazwyczaj używa się tego, gdy w witrynie było bardzo dużo zmian, na przykład gdy witryna została utworzona."
|
PUBALLFUN2: "Naciśnięcie tego przycisku spowoduje przejście po wszystkich stronach i opublikowanie ich. Zazwyczaj używa się tego, gdy w witrynie było bardzo dużo zmian, na przykład gdy witryna została utworzona."
|
||||||
@ -116,10 +114,7 @@ pl:
|
|||||||
TabContent: Zawartość
|
TabContent: Zawartość
|
||||||
TabHistory: Historia
|
TabHistory: Historia
|
||||||
TabSettings: Opcje
|
TabSettings: Opcje
|
||||||
TreeFilteredClear: 'Usuń filtr'
|
|
||||||
CMSMain_left_ss:
|
CMSMain_left_ss:
|
||||||
APPLY_FILTER: 'Zastosuj filtr'
|
|
||||||
CLEAR_FILTER: 'Usuń filtr'
|
|
||||||
RESET: Resetuj
|
RESET: Resetuj
|
||||||
CMSPageAddController:
|
CMSPageAddController:
|
||||||
MENUTITLE: 'Dodaj stronę'
|
MENUTITLE: 'Dodaj stronę'
|
||||||
@ -151,8 +146,6 @@ pl:
|
|||||||
ListView: 'Widok listy'
|
ListView: 'Widok listy'
|
||||||
MENUTITLE: Strony
|
MENUTITLE: Strony
|
||||||
TreeView: 'Widok drzewa'
|
TreeView: 'Widok drzewa'
|
||||||
CMSPagesController_ContentToolbar_ss:
|
|
||||||
MULTISELECT: Multi wybór
|
|
||||||
CMSPagesController_Tools_ss:
|
CMSPagesController_Tools_ss:
|
||||||
FILTER: Filtr
|
FILTER: Filtr
|
||||||
CMSSIteTreeFilter_PublishedPages:
|
CMSSIteTreeFilter_PublishedPages:
|
||||||
@ -161,7 +154,6 @@ pl:
|
|||||||
FILTERDATEFROM: Od
|
FILTERDATEFROM: Od
|
||||||
FILTERDATEHEADING: Data
|
FILTERDATEHEADING: Data
|
||||||
FILTERDATETO: Do
|
FILTERDATETO: Do
|
||||||
FILTERLABELTEXT: Zawartość
|
|
||||||
PAGEFILTERDATEHEADING: 'Ostatnio edytowane'
|
PAGEFILTERDATEHEADING: 'Ostatnio edytowane'
|
||||||
CMSSettingsController:
|
CMSSettingsController:
|
||||||
MENUTITLE: Ustawienia
|
MENUTITLE: Ustawienia
|
||||||
|
20
lang/sk.yml
20
lang/sk.yml
@ -94,13 +94,13 @@ sk:
|
|||||||
DUPLICATEDWITHCHILDREN: 'Duplikované ''{title}'' a potomkovia úspešne'
|
DUPLICATEDWITHCHILDREN: 'Duplikované ''{title}'' a potomkovia úspešne'
|
||||||
EMAIL: Pošli e-mailom
|
EMAIL: Pošli e-mailom
|
||||||
EditTree: 'Editovať strom'
|
EditTree: 'Editovať strom'
|
||||||
ListFiltered: 'Filtrovaný zoznam.'
|
ListFiltered: 'Zobrazenie výsledkov vyhľadávania.'
|
||||||
MENUTITLE: 'Upraviť stránku'
|
MENUTITLE: 'Upraviť stránku'
|
||||||
NEWPAGE: 'Nová {pagetype}'
|
NEWPAGE: 'Nová {pagetype}'
|
||||||
PAGENOTEXISTS: 'Táto stránka neexistuje.'
|
PAGENOTEXISTS: 'Táto stránka neexistuje.'
|
||||||
PAGES: Stránky
|
PAGES: 'Stav stránky'
|
||||||
PAGETYPEANYOPT: Akákoľvek
|
PAGETYPEANYOPT: Akákoľvek
|
||||||
PAGETYPEOPT: 'Typ stránky'
|
PAGETYPEOPT: 'Typ stránky:'
|
||||||
PUBALLCONFIRM: 'Prosím, zverejnite všetky stránky webu, zkopírovaním obsahu na verejné'
|
PUBALLCONFIRM: 'Prosím, zverejnite všetky stránky webu, zkopírovaním obsahu na verejné'
|
||||||
PUBALLFUN: 'Funkcia "Publikovať všetko"'
|
PUBALLFUN: 'Funkcia "Publikovať všetko"'
|
||||||
PUBALLFUN2: "Stlačením tohto tlačidla vykonáte to isté ako keby ste navštívili každú stránku a stlačili \"publikuj\". Je určené na použite po rozsiahlych zmenách obsahu, napríklad keď bol web prvýkrát vytvorený."
|
PUBALLFUN2: "Stlačením tohto tlačidla vykonáte to isté ako keby ste navštívili každú stránku a stlačili \"publikuj\". Je určené na použite po rozsiahlych zmenách obsahu, napríklad keď bol web prvýkrát vytvorený."
|
||||||
@ -122,11 +122,11 @@ sk:
|
|||||||
TabContent: Obsah
|
TabContent: Obsah
|
||||||
TabHistory: História
|
TabHistory: História
|
||||||
TabSettings: Nastavenia
|
TabSettings: Nastavenia
|
||||||
TreeFiltered: 'Filtrované štruktúra.'
|
TreeFiltered: 'Zobrazenie výsledkov vyhľadávania.'
|
||||||
TreeFilteredClear: 'Vyčistiť filter'
|
TreeFilteredClear: Vyčistiť
|
||||||
CMSMain_left_ss:
|
CMSMain_left_ss:
|
||||||
APPLY_FILTER: 'Použiť filter'
|
APPLY_FILTER: Hľadať
|
||||||
CLEAR_FILTER: 'Vyčistiť filter'
|
CLEAR_FILTER: Vyčistiť
|
||||||
RESET: Reset
|
RESET: Reset
|
||||||
CMSPageAddController:
|
CMSPageAddController:
|
||||||
MENUTITLE: 'Pridať stránku'
|
MENUTITLE: 'Pridať stránku'
|
||||||
@ -159,7 +159,7 @@ sk:
|
|||||||
MENUTITLE: Stránky
|
MENUTITLE: Stránky
|
||||||
TreeView: 'Zobraziť strom'
|
TreeView: 'Zobraziť strom'
|
||||||
CMSPagesController_ContentToolbar_ss:
|
CMSPagesController_ContentToolbar_ss:
|
||||||
MULTISELECT: Multi-výber
|
MULTISELECT: 'Dávkové akcie'
|
||||||
CMSPagesController_Tools_ss:
|
CMSPagesController_Tools_ss:
|
||||||
FILTER: Filtrovať
|
FILTER: Filtrovať
|
||||||
CMSSIteTreeFilter_PublishedPages:
|
CMSSIteTreeFilter_PublishedPages:
|
||||||
@ -168,7 +168,7 @@ sk:
|
|||||||
FILTERDATEFROM: Od
|
FILTERDATEFROM: Od
|
||||||
FILTERDATEHEADING: Dátum
|
FILTERDATEHEADING: Dátum
|
||||||
FILTERDATETO: Do
|
FILTERDATETO: Do
|
||||||
FILTERLABELTEXT: Obsah
|
FILTERLABELTEXT: Hľadať
|
||||||
PAGEFILTERDATEHEADING: 'Posledne zmenené'
|
PAGEFILTERDATEHEADING: 'Posledne zmenené'
|
||||||
CMSSettingsController:
|
CMSSettingsController:
|
||||||
MENUTITLE: Nastavenia
|
MENUTITLE: Nastavenia
|
||||||
@ -301,7 +301,7 @@ sk:
|
|||||||
SilverStripeNavigator:
|
SilverStripeNavigator:
|
||||||
ARCHIVED: Archivované
|
ARCHIVED: Archivované
|
||||||
SilverStripeNavigatorLink:
|
SilverStripeNavigatorLink:
|
||||||
ShareInstructions: 'K zdielaniu tejto stránky, zkopírujte a prilepte odkaz dolu.'
|
ShareInstructions: 'K zdielaniu tejto stránky, zkopírujte a vložte odkaz dolu.'
|
||||||
ShareLink: 'Zdieľať odkaz'
|
ShareLink: 'Zdieľať odkaz'
|
||||||
SilverStripeNavigatorLinkl:
|
SilverStripeNavigatorLinkl:
|
||||||
CloseLink: Zavrieť
|
CloseLink: Zavrieť
|
||||||
|
Loading…
Reference in New Issue
Block a user