mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge branch '4.13' into 4
This commit is contained in:
commit
12cf9159c8
2
client/dist/js/SilverStripeNavigator.js
vendored
2
client/dist/js/SilverStripeNavigator.js
vendored
@ -1 +1 @@
|
||||
!function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/legacy/SilverStripeNavigator.js")}({"./client/src/legacy/SilverStripeNavigator.js":function(e,t,r){"use strict";function n(e){return document.getElementsByTagName("base")[0].href.replace("http://","").replace(/\//g,"_").replace(/\./g,"_")+e}var i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(i);(0,o.default)(document).ready(function(){(0,o.default)("#switchView a.newWindow").on("click",function(e){return window.open(this.href,n(this.target)).focus(),!1}),(0,o.default)("#SilverStripeNavigatorLink").on("click",function(e){return(0,o.default)("#SilverStripeNavigatorLinkPopup").toggle(),!1}),(0,o.default)("#SilverStripeNavigatorLinkPopup a.close").on("click",function(e){return(0,o.default)("#SilverStripeNavigatorLinkPopup").hide(),!1}),(0,o.default)("#SilverStripeNavigatorLinkPopup input").on("focus",function(e){this.select()})})},0:function(e,t){e.exports=jQuery}});
|
||||
!function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var r={};t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/legacy/SilverStripeNavigator.js")}({"./client/src/legacy/SilverStripeNavigator.js":function(e,t,r){"use strict";!function(){function e(e){return document.getElementsByTagName("base")[0].href.replace("http://","").replace(/\//g,"_").replace(/\./g,"_")+e}function t(e){var t=getComputedStyle(e).display;e.style.display="none",e.dataset.__toggle_display=t}function r(e){e.style.display=e.dataset.__toggle_display?e.dataset.__toggle_display:"block"}function n(e){"none"!==getComputedStyle(e).display?t(e):r(e)}var a=document.querySelectorAll("#switchView a.newWindow");if(a.length>0){var i=!0,l=!1,o=void 0;try{for(var u,c=a.values()[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var f=u.value;!function(t){t.addEventListener("click",function(r){return r.preventDefault(),window.open(t.href,e(t.target)).focus(),!1})}(f)}}catch(e){l=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(l)throw o}}}var v=document.getElementById("SilverStripeNavigatorLinkPopup");if(v){var s=document.getElementById("SilverStripeNavigatorLink");s&&s.addEventListener("click",function(e){return e.preventDefault(),n(v),!1});var d=v.querySelectorAll("a.close");if(d.length>0){var y=!0,p=!1,g=void 0;try{for(var S,m=d.values()[Symbol.iterator]();!(y=(S=m.next()).done);y=!0)S.value.addEventListener("click",function(e){return e.preventDefault(),t(v),!1})}catch(e){p=!0,g=e}finally{try{!y&&m.return&&m.return()}finally{if(p)throw g}}}var h=v.querySelectorAll("input");if(h.length>0){var _=!0,w=!1,b=void 0;try{for(var x,E=h.values()[Symbol.iterator]();!(_=(x=E.next()).done);_=!0){var k=x.value;!function(e){e.addEventListener("focus",function(t){e.select()})}(k)}}catch(e){w=!0,b=e}finally{try{!_&&E.return&&E.return()}finally{if(w)throw b}}}}}()}});
|
@ -1,29 +1,69 @@
|
||||
import $ from 'jquery';
|
||||
|
||||
function windowName(suffix) {
|
||||
var base = document.getElementsByTagName('base')[0].href.replace('http://','').replace(/\//g,'_').replace(/\./g,'_');
|
||||
(function() {
|
||||
function windowName(suffix) {
|
||||
const base = document.getElementsByTagName('base')[0].href.replace('http://','').replace(/\//g,'_').replace(/\./g,'_');
|
||||
return base + suffix;
|
||||
}
|
||||
}
|
||||
|
||||
function displayHide(elem) {
|
||||
const displayComputed = getComputedStyle(elem).display;
|
||||
elem.style.display = 'none';
|
||||
elem.dataset.__toggle_display = displayComputed;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#switchView a.newWindow').on('click', function(e) {
|
||||
var w = window.open(this.href, windowName(this.target));
|
||||
function displayShow(elem) {
|
||||
elem.style.display = elem.dataset.__toggle_display ? elem.dataset.__toggle_display : 'block';
|
||||
}
|
||||
|
||||
function displayToggle(elem) {
|
||||
const displayComputed = getComputedStyle(elem).display;
|
||||
if (displayComputed !== 'none') {
|
||||
displayHide(elem);
|
||||
} else {
|
||||
displayShow(elem);
|
||||
}
|
||||
}
|
||||
|
||||
const newWindowLinks = document.querySelectorAll('#switchView a.newWindow');
|
||||
if (newWindowLinks.length > 0) {
|
||||
for (const link of newWindowLinks.values()) {
|
||||
link.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
const w = window.open(link.href, windowName(link.target));
|
||||
w.focus();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$('#SilverStripeNavigatorLink').on('click', function(e) {
|
||||
$('#SilverStripeNavigatorLinkPopup').toggle();
|
||||
const popup = document.getElementById('SilverStripeNavigatorLinkPopup');
|
||||
if (popup) {
|
||||
const navigatorLink = document.getElementById('SilverStripeNavigatorLink');
|
||||
if (navigatorLink) {
|
||||
navigatorLink.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
displayToggle(popup);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
$('#SilverStripeNavigatorLinkPopup a.close').on('click', function(e) {
|
||||
$('#SilverStripeNavigatorLinkPopup').hide();
|
||||
const closeLinks = popup.querySelectorAll('a.close');
|
||||
if (closeLinks.length > 0) {
|
||||
for (const link of closeLinks.values()) {
|
||||
link.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
displayHide(popup);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$('#SilverStripeNavigatorLinkPopup input').on('focus',function(e) {
|
||||
this.select();
|
||||
const inputs = popup.querySelectorAll('input');
|
||||
if (inputs.length > 0) {
|
||||
for (const input of inputs.values()) {
|
||||
input.addEventListener('focus', function(e) {
|
||||
input.select();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
@ -352,7 +352,6 @@ class ContentController extends Controller
|
||||
if (Director::isDev() || Permission::check('CMS_ACCESS_CMSMain') || Permission::check('VIEW_DRAFT_CONTENT')) {
|
||||
if ($this->dataRecord) {
|
||||
Requirements::css('silverstripe/cms: client/dist/styles/SilverStripeNavigator.css');
|
||||
Requirements::javascript('silverstripe/admin: thirdparty/jquery/jquery.js');
|
||||
Requirements::javascript('silverstripe/cms: client/dist/js/SilverStripeNavigator.js');
|
||||
|
||||
$return = $nav = SilverStripeNavigator::get_for_record($this->dataRecord);
|
||||
|
@ -271,6 +271,7 @@ eo:
|
||||
many_many_BackLinkTracking: 'Spuri retroligilojn'
|
||||
many_many_ImageTracking: 'Spuri Bildojn'
|
||||
many_many_LinkTracking: 'Spuri Ligilojn'
|
||||
InvalidExtraMeta: 'Propraj meta-etikedoj ne enhavas validan HTML'
|
||||
SilverStripe\CMS\Model\SiteTreeFileExtension:
|
||||
TITLE_INDEX: '#'
|
||||
TITLE_TYPE: Tipo
|
||||
|
@ -81,7 +81,7 @@ nl:
|
||||
COMPAREMODE: 'Vergelijken (selecteer 2)'
|
||||
COMPARINGVERSION: 'U vergelijkt versie {version1} en {version2}.'
|
||||
MENUTITLE: Geschiedenis
|
||||
MULTISELECT: 'Meervoudige acties'
|
||||
MULTISELECT: 'Bulk acties'
|
||||
NOTPUBLISHED: 'Niet gepubliceerd'
|
||||
NO_PREVIEW: 'Geen voorbeeld beschikbaar'
|
||||
PUBLISHER: 'Gepubliceerd door'
|
||||
@ -270,6 +270,7 @@ nl:
|
||||
many_many_BackLinkTracking: 'Backlinks traceren'
|
||||
many_many_ImageTracking: 'Afbeeldingen traceren'
|
||||
many_many_LinkTracking: 'Links traceren'
|
||||
InvalidExtraMeta: 'De HTML bij Andere meta-tags is incorrect'
|
||||
SilverStripe\CMS\Model\SiteTreeFileExtension:
|
||||
TITLE_INDEX: '#'
|
||||
TITLE_TYPE: Type
|
||||
|
Loading…
Reference in New Issue
Block a user