mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
API Add insert internal link modal
This commit is contained in:
parent
eb06646aa8
commit
f82f0844c1
@ -13,7 +13,7 @@ trim_trailing_whitespace = true
|
|||||||
[*.md]
|
[*.md]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
[*.{yml,js,json,css,scss}]
|
[*.{yml,js,json,css,scss,feature}]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
|
||||||
|
43
_config.php
43
_config.php
@ -1,19 +1,40 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use SilverStripe\Admin\CMSMenu;
|
use SilverStripe\Admin\CMSMenu;
|
||||||
|
use SilverStripe\CMS\Controllers\CMSMain;
|
||||||
|
use SilverStripe\CMS\Controllers\CMSPageAddController;
|
||||||
|
use SilverStripe\CMS\Controllers\CMSPageEditController;
|
||||||
|
use SilverStripe\CMS\Controllers\CMSPageHistoryController;
|
||||||
|
use SilverStripe\CMS\Controllers\CMSPageSettingsController;
|
||||||
use SilverStripe\CMS\Model\SiteTree;
|
use SilverStripe\CMS\Model\SiteTree;
|
||||||
|
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
|
||||||
use SilverStripe\View\Parsers\ShortcodeParser;
|
use SilverStripe\View\Parsers\ShortcodeParser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Define constants
|
||||||
|
*
|
||||||
* - CMS_DIR: Path relative to webroot, e.g. "cms"
|
* - CMS_DIR: Path relative to webroot, e.g. "cms"
|
||||||
* - CMS_PATH: Absolute filepath, e.g. "/var/www/my-webroot/cms"
|
* - CMS_PATH: Absolute filepath, e.g. "/var/www/my-webroot/cms"
|
||||||
*/
|
*/
|
||||||
define('CMS_PATH', realpath(__DIR__));
|
call_user_func(function () {
|
||||||
if (strpos(CMS_PATH, BASE_PATH) === 0) {
|
define('CMS_PATH', __DIR__);
|
||||||
define('CMS_DIR', trim(substr(CMS_PATH, strlen(BASE_PATH)), DIRECTORY_SEPARATOR));
|
|
||||||
} else {
|
// Check if CMS is root dir, or subdir
|
||||||
throw new Exception("Path error: CMS_PATH " . CMS_PATH . " not within BASE_PATH " . BASE_PATH);
|
if (strcasecmp(__DIR__, BASE_PATH) === 0) {
|
||||||
}
|
define('CMS_DIR', '');
|
||||||
|
$clientPath = 'client';
|
||||||
|
} else {
|
||||||
|
define('CMS_DIR', basename(__DIR__));
|
||||||
|
$clientPath = basename(__DIR__) . '/client';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enable insert-link to internal pages
|
||||||
|
TinyMCEConfig::get('cms')
|
||||||
|
->enablePlugins(array(
|
||||||
|
'sslinkinternal' => "{$clientPath}/dist/js/TinyMCE_sslink-internal.js",
|
||||||
|
));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the default internal shortcodes.
|
* Register the default internal shortcodes.
|
||||||
@ -24,8 +45,8 @@ ShortcodeParser::get('default')->register(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// TODO Remove once we can configure CMSMenu through static, nested configuration files
|
// TODO Remove once we can configure CMSMenu through static, nested configuration files
|
||||||
CMSMenu::remove_menu_class('SilverStripe\\CMS\\Controllers\\CMSMain');
|
CMSMenu::remove_menu_class(CMSMain::class);
|
||||||
CMSMenu::remove_menu_class('SilverStripe\\CMS\\Controllers\\CMSPageEditController');
|
CMSMenu::remove_menu_class(CMSPageEditController::class);
|
||||||
CMSMenu::remove_menu_class('SilverStripe\\CMS\\Controllers\\CMSPageSettingsController');
|
CMSMenu::remove_menu_class(CMSPageSettingsController::class);
|
||||||
CMSMenu::remove_menu_class('SilverStripe\\CMS\\Controllers\\CMSPageHistoryController');
|
CMSMenu::remove_menu_class(CMSPageHistoryController::class);
|
||||||
CMSMenu::remove_menu_class('SilverStripe\\CMS\\Controllers\\CMSPageAddController');
|
CMSMenu::remove_menu_class(CMSPageAddController::class);
|
||||||
|
@ -14,3 +14,9 @@ SilverStripe\Assets\File:
|
|||||||
extensions:
|
extensions:
|
||||||
- SilverStripe\CMS\Controllers\ErrorPageFileExtension
|
- SilverStripe\CMS\Controllers\ErrorPageFileExtension
|
||||||
- SilverStripe\CMS\Model\SiteTreeFileExtension
|
- SilverStripe\CMS\Model\SiteTreeFileExtension
|
||||||
|
---
|
||||||
|
Name: cmsmodals
|
||||||
|
---
|
||||||
|
SilverStripe\Admin\ModalController:
|
||||||
|
extensions:
|
||||||
|
- SilverStripe\CMS\Forms\InternalLinkModalExtension
|
||||||
|
2
client/dist/js/SilverStripeNavigator.js
vendored
2
client/dist/js/SilverStripeNavigator.js
vendored
@ -1 +1 @@
|
|||||||
!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=10)}({0:function(e,t){e.exports=jQuery},10:function(e,t,n){"use strict";function r(e){return document.getElementsByTagName("base")[0].href.replace("http://","").replace(/\//g,"_").replace(/\./g,"_")+e}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n.n(i);o()(document).ready(function(){o()("#switchView a.newWindow").on("click",function(e){return window.open(this.href,r(this.target)).focus(),!1}),o()("#SilverStripeNavigatorLink").on("click",function(e){return o()("#SilverStripeNavigatorLinkPopup").toggle(),!1}),o()("#SilverStripeNavigatorLinkPopup a.close").on("click",function(e){return o()("#SilverStripeNavigatorLinkPopup").hide(),!1}),o()("#SilverStripeNavigatorLinkPopup input").on("focus",function(e){this.select()})})}});
|
!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=17)}({0:function(e,t){e.exports=jQuery},17:function(e,t,n){"use strict";function r(e){return document.getElementsByTagName("base")[0].href.replace("http://","").replace(/\//g,"_").replace(/\./g,"_")+e}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n.n(i);o()(document).ready(function(){o()("#switchView a.newWindow").on("click",function(e){return window.open(this.href,r(this.target)).focus(),!1}),o()("#SilverStripeNavigatorLink").on("click",function(e){return o()("#SilverStripeNavigatorLinkPopup").toggle(),!1}),o()("#SilverStripeNavigatorLinkPopup a.close").on("click",function(e){return o()("#SilverStripeNavigatorLinkPopup").hide(),!1}),o()("#SilverStripeNavigatorLinkPopup input").on("focus",function(e){this.select()})})}});
|
1
client/dist/js/TinyMCE_sslink-internal.js
vendored
Normal file
1
client/dist/js/TinyMCE_sslink-internal.js
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=18)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=i18n},,,,,,,,function(e,t){e.exports=Injector},function(e,t){e.exports=InsertLinkModal},function(e,t){e.exports=React},function(e,t){e.exports=ReactApollo},function(e,t){e.exports=ReactDom},function(e,t){e.exports=ShortcodeSerialiser},function(e,t){e.exports=TinyMCEActionRegistrar},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n.n(r),o=n(15),a=n.n(o),l=n(11),s=n.n(l),c=n(13),u=n.n(c),p=n(12),d=(n.n(p),n(0)),f=n.n(d),g=n(14),k=n.n(g),h=n(10),_=(n.n(h),n(9));n.n(_),a.a.addAction("sslink",{text:i.a._t("CMS.LINKLABEL_PAGE","Link to page"),onclick:function(e){return e.execCommand("sslinkinternal")}});var m={init:function(e){e.addCommand("sslinkinternal",function(){f()("#"+e.id).entwine("ss").openLinkInternalDialog()})}},x="insert-link__dialog-wrapper--internal",A=n.i(_.provideInjector)(n.i(h.createInsertLinkModal)("SilverStripe\\CMS\\Controllers\\CMSPageEditController","editorInternalLink"));f.a.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkInternalDialog:function(){var t=e("#"+x);t.length||(t=e('<div id="'+x+'" />'),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e("#"+x).entwine({renderModal:function(e){var t=this,n=ss.store,r=ss.apolloClient,o=function(){return t.close()},a=function(){return t.handleInsert.apply(t,arguments)},l=this.getOriginalAttributes();u.a.render(s.a.createElement(p.ApolloProvider,{store:n,client:r},s.a.createElement(A,{show:e,onInsert:a,onHide:o,title:i.a._t("CMS.LINK_PAGE","Insert page link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--internal",fileAttributes:l})),this[0])},buildAttributes:function(e){return{href:k.a.serialise({name:"sitetree_link",properties:{id:e.PageID}},!0)+(e.Anchor&&e.Anchor.length?"#"+e.Anchor:""),target:e.TargetBlank?"_blank":"",title:e.Description}},getOriginalAttributes:function(){var t=this.getElement().getEditor(),n=e(t.getSelectedNode()),r=(n.attr("href")||"").split("#");if(!r[0])return{};var i=k.a.match("sitetree_link",!1,r[0]);return i?{PageID:i.properties.id?parseInt(i.properties.id,10):0,Anchor:r[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}:{}}})}),tinymce.PluginManager.add("sslinkinternal",function(e){return m.init(e)}),t.default=m}]);
|
2
client/dist/js/bundle.js
vendored
2
client/dist/js/bundle.js
vendored
@ -1 +1 @@
|
|||||||
!function(t){function e(a){if(n[a])return n[a].exports;var i=n[a]={i:a,l:!1,exports:{}};return t[a].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,a){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:a})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=9)}([function(t,e){t.exports=jQuery},function(t,e){t.exports=i18n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0);n.n(a).a.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 void 0!==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"),a=this.find("input[name=ParentModeField]:checked").val(),i=n.data("metadata"),s=i&&"child"===a?n.getValue()||this.getParentID():null,o=i?i.ClassName:null,r=o&&"child"===a&&s?o:"Root",d=void 0!==e[r]?e[r]:null,l=this,c=d&&void 0!==d.defaultChild?d.defaultChild:null,u=[];if(s){if(this.hasClass("loading"))return;return this.addClass("loading"),this.setParentID(s),n.getValue()||n.setValue(s),null!==(u=this.loadCachedChildren(s))?(this.updateSelectionFilter(u,c),void this.removeClass("loading")):(t.ajax({url:l.data("childfilter"),data:{ParentID:s},success:function(t){l.saveCachedChildren(s,t),l.updateSelectionFilter(t,c)},complete:function(){l.removeClass("loading")}}),!1)}u=d&&void 0!==d.disallowedChildren?d.disallowedChildren:[],this.updateSelectionFilter(u,c)},updateSelectionFilter:function(e,n){var a=null;if(this.find("#Form_AddForm_PageType div.radio").each(function(){var n=t(this).find("input").val(),i=-1===t.inArray(n,e);t(this).setEnabled(i),i||t(this).setSelected(!1),a=null===a?i:a&&i}),n)var i=this.find("#Form_AddForm_PageType div.radio input[value="+n+"]").parents("li:first");else var i=this.find("#Form_AddForm_PageType div.radio:not(.disabled):first");i.setSelected(!0),i.siblings().setSelected(!1),this.find("#Form_AddForm_PageType div.radio:not(.disabled)").length?this.find("button[name=action_doAdd]").removeAttr("disabled"):this.find("button[name=action_doAdd]").attr("disabled","disabled"),this.find(".message-restricted")[a?"hide":"show"]()}}),t(".cms-add-form #Form_AddForm_PageType div.radio").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-content-addpage-button").entwine({onclick:function(e){var n,a=t(".cms-tree"),i=t(".cms-list"),s=0;if(a.is(":visible")){var o=a.jstree("get_selected");s=o?t(o[0]).data("id"):null}else{var r=i.find('input[name="Page[GridState]"]').val();r&&(s=parseInt(JSON.parse(r).ParentID,10))}var d,l={selector:this.data("targetPanel"),pjax:this.data("pjax")};s?(n=this.data("extraParams")?this.data("extraParams"):"",d=t.path.addSearchParams(i18n.sprintf(this.data("urlAddpage"),s),n)):d=this.attr("href"),t(".cms-container").loadPanel(d,null,l),e.preventDefault(),this.blur()}})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),i=n.n(a),s=n(1),o=n.n(s);i.a.entwine("ss",function(t){t(".cms-edit-form :input[name=ClassName]").entwine({onchange:function(){alert(o.a._t("CMS.ALERTCLASSNAME"))}}),t(".cms-edit-form input[name=Title]").entwine({onmatch:function(){var e=this;e.data("OrigVal",e.val());var n=e.closest("form"),a=t("input:text[name=URLSegment]",n),i=t("input[name=LiveLink]",n);a.length>0&&(e._addActions(),this.bind("change",function(n){var s=e.data("OrigVal"),o=e.val();e.data("OrigVal",o),0===a.val().indexOf(a.data("defaultUrl"))&&""==i.val()?e.updateURLSegment(o):t(".update",e.parent()).show(),e.updateRelatedFields(o,s),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 a=t(this);a.val()==n&&(a.val(e),a.updatedRelatedFields&&a.updatedRelatedFields())})},updateURLSegment:function(e){var n=t("input:text[name=URLSegment]",this.closest("form")),a=n.closest(".field.urlsegment"),i=t(".update",this.parent());a.update(e),i.is(":visible")&&i.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:o.a._t("CMS.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(e){var n=this.find(":input[name=ParentType]:checked").val(),a=this.find("#Form_EditForm_ParentID_Holder");"root"==n?this.find(":input[name=ParentID]").val(0):this.find(":input[name=ParentID]").val(this.find("#Form_EditForm_ParentType_subpage").data("parentIdValue")),"root"!=n?a.slideDown(400,function(){t(this).css("overflow","visible")}):a.slideUp()},_changeParentId:function(t){var e=this.find(":input[name=ParentID]").val();this.find("#Form_EditForm_ParentType_subpage").data("parentIdValue",e)}}),t(".cms-edit-form .btn-toolbar #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 .btn-toolbar #Form_EditForm_action_rollback").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),a="";return a=n?o.a.sprintf(o.a._t("CMS.RollbackToVersion"),n):o.a._t("CMS.ConfirmRestoreFromLive"),!!confirm(a)&&this._super(t)}}),t(".cms-edit-form .btn-toolbar #Form_EditForm_action_archive").entwine({onclick:function(t){var e=this.parents("form:first"),n="";return n=e.find("input[name=ArchiveWarningMessage]").val().replace(/\\n/g,"\n"),!!confirm(n)&&this._super(t)}}),t(".cms-edit-form .btn-toolbar #Form_EditForm_action_restore").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),a="",i=this.data("toRoot");return a=o.a.sprintf(o.a._t(i?"CMS.RestoreToRoot":"CMS.Restore"),n),!!confirm(a)&&this._super(t)}}),t(".cms-edit-form .btn-toolbar #Form_EditForm_action_unpublish").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),a="";return a=o.a.sprintf(o.a._t("CMS.Unpublish"),n),!!confirm(a)&&this._super(t)}}),t(".cms-edit-form.changed").entwine({onmatch:function(t){var e=this.find("button[name=action_save]");e.attr("data-text-alternate")&&(e.attr("data-text-standard",e.find("span").text()),e.find("span").text(e.attr("data-text-alternate"))),e.attr("data-btn-alternate")&&(e.attr("data-btn-standard",e.attr("class")),e.attr("class",e.attr("data-btn-alternate"))),e.removeClass("btn-secondary-outline").addClass("btn-primary");var n=this.find("button[name=action_publish]");n.attr("data-text-alternate")&&(n.attr("data-text-standard",n.find("span").text()),n.find("span").text(n.attr("data-text-alternate"))),n.attr("data-btn-alternate")&&(n.attr("data-btn-standard",n.attr("class")),n.attr("class",n.attr("data-btn-alternate"))),n.removeClass("btn-secondary-outline").addClass("btn-primary"),this._super(t)},onunmatch:function(t){var e=this.find("button[name=action_save]");e.attr("data-text-standard")&&e.text(e.attr("data-text-standard")),e.attr("data-btn-standard")&&e.attr("class",e.attr("data-btn-standard"));var n=this.find("button[name=action_publish]");n.attr("data-text-standard")&&n.text(n.attr("data-text-standard")),n.attr("data-btn-standard")&&n.attr("class",n.attr("data-btn-standard")),this._super(t)}}),t(".cms-edit-form .btn-toolbar button[name=action_publish]").entwine({onbuttonafterrefreshalternate:function(){this.data("showingAlternate")?(this.addClass("btn-primary"),this.removeClass("btn-secondary")):(this.removeClass("btn-primary"),this.addClass("btn-secondary"))}}),t(".cms-edit-form .btn-toolbar button[name=action_save]").entwine({onbuttonafterrefreshalternate:function(){this.data("showingAlternate")?(this.addClass("btn-primary"),this.removeClass("btn-secondary")):(this.removeClass("btn-primary"),this.addClass("btn-secondary"))}}),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()})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),i=n.n(a),s=n(1),o=n.n(s);i.a.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 a="1",i=t(e[n]).find("li").length;i>20?a="3":i>10&&(a="2"),t(e[n]).addClass("col-"+a).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();return this.getHints(),n.plugins.push("contextmenu"),n.contextmenu={items:function(n){var a={edit:{label:n.hasClass("edit-disabled")?o.a._t("CMS.EditPage","Edit page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"):o.a._t("CMS.ViewPage","View 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(o.a.sprintf(e.data("urlEditpage"),n.data("id")))}}};n.hasClass("nochildren")||(a.showaslist={label:o.a._t("CMS.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 i=(n.data("pagetype"),n.data("id")),s=n.find(">a .item").data("allowedchildren"),r={},d=!1;return t.each(s,function(n,a){d=!0,r["allowedchildren-"+n]={label:'<span class="jstree-pageicon"></span>'+a,_class:"class-"+n,action:function(a){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(o.a.sprintf(e.data("urlAddpage"),i,n),e.data("extraParams")))}}}),d&&(a.addsubpage={label:o.a._t("CMS.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}),n.hasClass("edit-disabled")||(a.duplicate={label:o.a._t("CMS.Duplicate"),submenu:[{label:o.a._t("CMS.ThisPageOnly"),action:function(n){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(o.a.sprintf(e.data("urlDuplicate"),n.data("id")),e.data("extraParams")))}},{label:o.a._t("CMS.ThisPageAndSubpages"),action:function(n){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(o.a.sprintf(e.data("urlDuplicatewithchildren"),n.data("id")),e.data("extraParams")))}}]}),a}},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}})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0);n.n(a).a.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 .cms-panel-link.page-view-link").entwine({onclick:function(e){return this.siblings().removeClass("active"),this.addClass("active"),t(".cms-content-filters input[type='hidden'][name='view']").val(t(this).data("view")),this._super(e)}}),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),a=n.data("toolid");n.hasClass("active"),void 0!==a&&(n.data("active",!1).removeClass("active"),t("#"+a).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"),a=e.data("toolid"),i=t("#"+a);t.each(this.find(".cms-actions-buttons-row .tool-button"),function(){var e=t(this),n=t("#"+e.data("toolid"));e.data("toolid")!==a&&(n.hide(),e.data("active",!1))}),e[n?"removeClass":"addClass"]("active"),i[n?"hide":"show"](),e.data("active",!n)}})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),i=n.n(a),s=n(1),o=n.n(s);i.a.entwine("ss",function(t){t("#Form_VersionsForm").entwine({onmatch:function(){this._super()},onunmatch:function(){this._super()},onsubmit:function(e,n){e.preventDefault();var a;if(!(a=this.find(":input[name=ID]").val()))return!1;var i,s,r,d,l;if(l=this.find(":input[name=CompareMode]").is(":checked"),s=this.find("table input[type=checkbox]").filter(":checked"),l){if(2!=s.length)return!1;r=s.eq(0).val(),d=s.eq(1).val(),this.find(":submit[name=action_doCompare]"),i=o.a.sprintf(this.data("linkTmplCompare"),a,d,r)}else r=s.eq(0).val(),this.find(":submit[name=action_doShowVersion]"),i=o.a.sprintf(this.data("linkTmplShow"),a,r);t(".cms-container").loadPanel(i,"",{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]").css("display",""):n.find("tr[data-published=false]").css("display","none")._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(o.a._t("CMS.ONLYSELECTTWO","You can only compare two versions at this time.")):(this._select(),void(1==n.length&&this.parents("form").submit())):(this._select(),n._unselect(),void this.parents("form").submit())},_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)}})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0);n.n(a).a.entwine("ss",function(t){t("#Form_EditForm_RedirectionType input").entwine({onmatch:function(){t(this).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())}})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0);n.n(a).a.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(".URL-link").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"),a=arguments[0],i=a&&""!==a?a:e.val();n!=i?(this.addClass("loading"),this.suggest(i,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 a=this,i=a.find(":text"),s=t.path.parseUrl(a.closest("form").attr("action")),o=s.hrefNoSearch+"/field/"+i.attr("name")+"/suggest/?value="+encodeURIComponent(e);s.search&&(o+="&"+s.search.replace(/^\?/,"")),t.ajax({url:o,success:function(t){n.apply(this,arguments)},error:function(t,e){t.statusText=t.responseText},complete:function(){a.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()}})})},function(t,e,n){n(2),n(3),n(5),n(4),n(6),n(7),n(8)}]);
|
!function(t){function e(a){if(n[a])return n[a].exports;var i=n[a]={i:a,l:!1,exports:{}};return t[a].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,a){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:a})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=16)}([function(t,e){t.exports=jQuery},function(t,e){t.exports=i18n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0);n.n(a).a.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 void 0!==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"),a=this.find("input[name=ParentModeField]:checked").val(),i=n.data("metadata"),s=i&&"child"===a?n.getValue()||this.getParentID():null,o=i?i.ClassName:null,r=o&&"child"===a&&s?o:"Root",d=void 0!==e[r]?e[r]:null,l=this,c=d&&void 0!==d.defaultChild?d.defaultChild:null,u=[];if(s){if(this.hasClass("loading"))return;return this.addClass("loading"),this.setParentID(s),n.getValue()||n.setValue(s),null!==(u=this.loadCachedChildren(s))?(this.updateSelectionFilter(u,c),void this.removeClass("loading")):(t.ajax({url:l.data("childfilter"),data:{ParentID:s},success:function(t){l.saveCachedChildren(s,t),l.updateSelectionFilter(t,c)},complete:function(){l.removeClass("loading")}}),!1)}u=d&&void 0!==d.disallowedChildren?d.disallowedChildren:[],this.updateSelectionFilter(u,c)},updateSelectionFilter:function(e,n){var a=null;if(this.find("#Form_AddForm_PageType div.radio").each(function(){var n=t(this).find("input").val(),i=-1===t.inArray(n,e);t(this).setEnabled(i),i||t(this).setSelected(!1),a=null===a?i:a&&i}),n)var i=this.find("#Form_AddForm_PageType div.radio input[value="+n+"]").parents("li:first");else var i=this.find("#Form_AddForm_PageType div.radio:not(.disabled):first");i.setSelected(!0),i.siblings().setSelected(!1),this.find("#Form_AddForm_PageType div.radio:not(.disabled)").length?this.find("button[name=action_doAdd]").removeAttr("disabled"):this.find("button[name=action_doAdd]").attr("disabled","disabled"),this.find(".message-restricted")[a?"hide":"show"]()}}),t(".cms-add-form #Form_AddForm_PageType div.radio").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-content-addpage-button").entwine({onclick:function(e){var n,a=t(".cms-tree"),i=t(".cms-list"),s=0;if(a.is(":visible")){var o=a.jstree("get_selected");s=o?t(o[0]).data("id"):null}else{var r=i.find('input[name="Page[GridState]"]').val();r&&(s=parseInt(JSON.parse(r).ParentID,10))}var d,l={selector:this.data("targetPanel"),pjax:this.data("pjax")};s?(n=this.data("extraParams")?this.data("extraParams"):"",d=t.path.addSearchParams(i18n.sprintf(this.data("urlAddpage"),s),n)):d=this.attr("href"),t(".cms-container").loadPanel(d,null,l),e.preventDefault(),this.blur()}})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),i=n.n(a),s=n(1),o=n.n(s);i.a.entwine("ss",function(t){t(".cms-edit-form :input[name=ClassName]").entwine({onchange:function(){alert(o.a._t("CMS.ALERTCLASSNAME"))}}),t(".cms-edit-form input[name=Title]").entwine({onmatch:function(){var e=this;e.data("OrigVal",e.val());var n=e.closest("form"),a=t("input:text[name=URLSegment]",n),i=t("input[name=LiveLink]",n);a.length>0&&(e._addActions(),this.bind("change",function(n){var s=e.data("OrigVal"),o=e.val();e.data("OrigVal",o),0===a.val().indexOf(a.data("defaultUrl"))&&""==i.val()?e.updateURLSegment(o):t(".update",e.parent()).show(),e.updateRelatedFields(o,s),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 a=t(this);a.val()==n&&(a.val(e),a.updatedRelatedFields&&a.updatedRelatedFields())})},updateURLSegment:function(e){var n=t("input:text[name=URLSegment]",this.closest("form")),a=n.closest(".field.urlsegment"),i=t(".update",this.parent());a.update(e),i.is(":visible")&&i.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:o.a._t("CMS.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(e){var n=this.find(":input[name=ParentType]:checked").val(),a=this.find("#Form_EditForm_ParentID_Holder");"root"==n?this.find(":input[name=ParentID]").val(0):this.find(":input[name=ParentID]").val(this.find("#Form_EditForm_ParentType_subpage").data("parentIdValue")),"root"!=n?a.slideDown(400,function(){t(this).css("overflow","visible")}):a.slideUp()},_changeParentId:function(t){var e=this.find(":input[name=ParentID]").val();this.find("#Form_EditForm_ParentType_subpage").data("parentIdValue",e)}}),t(".cms-edit-form .btn-toolbar #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 .btn-toolbar #Form_EditForm_action_rollback").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),a="";return a=n?o.a.sprintf(o.a._t("CMS.RollbackToVersion"),n):o.a._t("CMS.ConfirmRestoreFromLive"),!!confirm(a)&&this._super(t)}}),t(".cms-edit-form .btn-toolbar #Form_EditForm_action_archive").entwine({onclick:function(t){var e=this.parents("form:first"),n="";return n=e.find("input[name=ArchiveWarningMessage]").val().replace(/\\n/g,"\n"),!!confirm(n)&&this._super(t)}}),t(".cms-edit-form .btn-toolbar #Form_EditForm_action_restore").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),a="",i=this.data("toRoot");return a=o.a.sprintf(o.a._t(i?"CMS.RestoreToRoot":"CMS.Restore"),n),!!confirm(a)&&this._super(t)}}),t(".cms-edit-form .btn-toolbar #Form_EditForm_action_unpublish").entwine({onclick:function(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),a="";return a=o.a.sprintf(o.a._t("CMS.Unpublish"),n),!!confirm(a)&&this._super(t)}}),t(".cms-edit-form.changed").entwine({onmatch:function(t){var e=this.find("button[name=action_save]");e.attr("data-text-alternate")&&(e.attr("data-text-standard",e.find("span").text()),e.find("span").text(e.attr("data-text-alternate"))),e.attr("data-btn-alternate")&&(e.attr("data-btn-standard",e.attr("class")),e.attr("class",e.attr("data-btn-alternate"))),e.removeClass("btn-secondary-outline").addClass("btn-primary");var n=this.find("button[name=action_publish]");n.attr("data-text-alternate")&&(n.attr("data-text-standard",n.find("span").text()),n.find("span").text(n.attr("data-text-alternate"))),n.attr("data-btn-alternate")&&(n.attr("data-btn-standard",n.attr("class")),n.attr("class",n.attr("data-btn-alternate"))),n.removeClass("btn-secondary-outline").addClass("btn-primary"),this._super(t)},onunmatch:function(t){var e=this.find("button[name=action_save]");e.attr("data-text-standard")&&e.text(e.attr("data-text-standard")),e.attr("data-btn-standard")&&e.attr("class",e.attr("data-btn-standard"));var n=this.find("button[name=action_publish]");n.attr("data-text-standard")&&n.text(n.attr("data-text-standard")),n.attr("data-btn-standard")&&n.attr("class",n.attr("data-btn-standard")),this._super(t)}}),t(".cms-edit-form .btn-toolbar button[name=action_publish]").entwine({onbuttonafterrefreshalternate:function(){this.data("showingAlternate")?(this.addClass("btn-primary"),this.removeClass("btn-secondary")):(this.removeClass("btn-primary"),this.addClass("btn-secondary"))}}),t(".cms-edit-form .btn-toolbar button[name=action_save]").entwine({onbuttonafterrefreshalternate:function(){this.data("showingAlternate")?(this.addClass("btn-primary"),this.removeClass("btn-secondary")):(this.removeClass("btn-primary"),this.addClass("btn-secondary"))}}),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()})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),i=n.n(a),s=n(1),o=n.n(s);i.a.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 a="1",i=t(e[n]).find("li").length;i>20?a="3":i>10&&(a="2"),t(e[n]).addClass("col-"+a).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();return this.getHints(),n.plugins.push("contextmenu"),n.contextmenu={items:function(n){var a={edit:{label:n.hasClass("edit-disabled")?o.a._t("CMS.EditPage","Edit page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"):o.a._t("CMS.ViewPage","View 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(o.a.sprintf(e.data("urlEditpage"),n.data("id")))}}};n.hasClass("nochildren")||(a.showaslist={label:o.a._t("CMS.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 i=(n.data("pagetype"),n.data("id")),s=n.find(">a .item").data("allowedchildren"),r={},d=!1;return t.each(s,function(n,a){d=!0,r["allowedchildren-"+n]={label:'<span class="jstree-pageicon"></span>'+a,_class:"class-"+n,action:function(a){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(o.a.sprintf(e.data("urlAddpage"),i,n),e.data("extraParams")))}}}),d&&(a.addsubpage={label:o.a._t("CMS.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}),n.hasClass("edit-disabled")||(a.duplicate={label:o.a._t("CMS.Duplicate"),submenu:[{label:o.a._t("CMS.ThisPageOnly"),action:function(n){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(o.a.sprintf(e.data("urlDuplicate"),n.data("id")),e.data("extraParams")))}},{label:o.a._t("CMS.ThisPageAndSubpages"),action:function(n){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(o.a.sprintf(e.data("urlDuplicatewithchildren"),n.data("id")),e.data("extraParams")))}}]}),a}},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}})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0);n.n(a).a.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 .cms-panel-link.page-view-link").entwine({onclick:function(e){return this.siblings().removeClass("active"),this.addClass("active"),t(".cms-content-filters input[type='hidden'][name='view']").val(t(this).data("view")),this._super(e)}}),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),a=n.data("toolid");n.hasClass("active"),void 0!==a&&(n.data("active",!1).removeClass("active"),t("#"+a).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"),a=e.data("toolid"),i=t("#"+a);t.each(this.find(".cms-actions-buttons-row .tool-button"),function(){var e=t(this),n=t("#"+e.data("toolid"));e.data("toolid")!==a&&(n.hide(),e.data("active",!1))}),e[n?"removeClass":"addClass"]("active"),i[n?"hide":"show"](),e.data("active",!n)}})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),i=n.n(a),s=n(1),o=n.n(s);i.a.entwine("ss",function(t){t("#Form_VersionsForm").entwine({onmatch:function(){this._super()},onunmatch:function(){this._super()},onsubmit:function(e,n){e.preventDefault();var a;if(!(a=this.find(":input[name=ID]").val()))return!1;var i,s,r,d,l;if(l=this.find(":input[name=CompareMode]").is(":checked"),s=this.find("table input[type=checkbox]").filter(":checked"),l){if(2!=s.length)return!1;r=s.eq(0).val(),d=s.eq(1).val(),this.find(":submit[name=action_doCompare]"),i=o.a.sprintf(this.data("linkTmplCompare"),a,d,r)}else r=s.eq(0).val(),this.find(":submit[name=action_doShowVersion]"),i=o.a.sprintf(this.data("linkTmplShow"),a,r);t(".cms-container").loadPanel(i,"",{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]").css("display",""):n.find("tr[data-published=false]").css("display","none")._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(o.a._t("CMS.ONLYSELECTTWO","You can only compare two versions at this time.")):(this._select(),void(1==n.length&&this.parents("form").submit())):(this._select(),n._unselect(),void this.parents("form").submit())},_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)}})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0);n.n(a).a.entwine("ss",function(t){t("#Form_EditForm_RedirectionType input").entwine({onmatch:function(){t(this).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())}})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(0);n.n(a).a.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(".URL-link").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"),a=arguments[0],i=a&&""!==a?a:e.val();n!=i?(this.addClass("loading"),this.suggest(i,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 a=this,i=a.find(":text"),s=t.path.parseUrl(a.closest("form").attr("action")),o=s.hrefNoSearch+"/field/"+i.attr("name")+"/suggest/?value="+encodeURIComponent(e);s.search&&(o+="&"+s.search.replace(/^\?/,"")),t.ajax({url:o,success:function(t){n.apply(this,arguments)},error:function(t,e){t.statusText=t.responseText},complete:function(){a.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()}})})},,,,,,,,function(t,e,n){n(2),n(3),n(5),n(4),n(6),n(7),n(8)}]);
|
128
client/src/legacy/TinyMCE_sslink-internal.js
Normal file
128
client/src/legacy/TinyMCE_sslink-internal.js
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
/* global tinymce, ss */
|
||||||
|
import i18n from 'i18n';
|
||||||
|
import TinyMCEActionRegistrar from 'lib/TinyMCEActionRegistrar';
|
||||||
|
import React from 'react';
|
||||||
|
import ReactDOM from 'react-dom';
|
||||||
|
import { ApolloProvider } from 'react-apollo';
|
||||||
|
import jQuery from 'jquery';
|
||||||
|
import ShortcodeSerialiser from 'lib/ShortcodeSerialiser';
|
||||||
|
import { createInsertLinkModal } from 'containers/InsertLinkModal/InsertLinkModal';
|
||||||
|
import { provideInjector } from 'lib/Injector';
|
||||||
|
|
||||||
|
// Link to external url
|
||||||
|
TinyMCEActionRegistrar.addAction('sslink', {
|
||||||
|
text: i18n._t('CMS.LINKLABEL_PAGE', 'Link to page'),
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
onclick: (editor) => editor.execCommand('sslinkinternal'),
|
||||||
|
});
|
||||||
|
|
||||||
|
const plugin = {
|
||||||
|
init(editor) {
|
||||||
|
editor.addCommand('sslinkinternal', () => {
|
||||||
|
const field = jQuery(`#${editor.id}`).entwine('ss');
|
||||||
|
|
||||||
|
field.openLinkInternalDialog();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const modalId = 'insert-link__dialog-wrapper--internal';
|
||||||
|
const sectionConfigKey = 'SilverStripe\\CMS\\Controllers\\CMSPageEditController';
|
||||||
|
const formName = 'editorInternalLink';
|
||||||
|
const InsertLinkInternalModal = provideInjector(createInsertLinkModal(sectionConfigKey, formName));
|
||||||
|
|
||||||
|
jQuery.entwine('ss', ($) => {
|
||||||
|
$('textarea.htmleditor').entwine({
|
||||||
|
openLinkInternalDialog() {
|
||||||
|
let dialog = $(`#${modalId}`);
|
||||||
|
|
||||||
|
if (!dialog.length) {
|
||||||
|
dialog = $(`<div id="${modalId}" />`);
|
||||||
|
$('body').append(dialog);
|
||||||
|
}
|
||||||
|
dialog.addClass('insert-link__dialog-wrapper');
|
||||||
|
|
||||||
|
dialog.setElement(this);
|
||||||
|
dialog.open();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assumes that $('.insert-link__dialog-wrapper').entwine({}); is defined for shared functions
|
||||||
|
*/
|
||||||
|
$(`#${modalId}`).entwine({
|
||||||
|
renderModal(show) {
|
||||||
|
const store = ss.store;
|
||||||
|
const client = ss.apolloClient;
|
||||||
|
const handleHide = () => this.close();
|
||||||
|
const handleInsert = (...args) => this.handleInsert(...args);
|
||||||
|
const attrs = this.getOriginalAttributes();
|
||||||
|
|
||||||
|
// create/update the react component
|
||||||
|
ReactDOM.render(
|
||||||
|
<ApolloProvider store={store} client={client}>
|
||||||
|
<InsertLinkInternalModal
|
||||||
|
show={show}
|
||||||
|
onInsert={handleInsert}
|
||||||
|
onHide={handleHide}
|
||||||
|
title={i18n._t('CMS.LINK_PAGE', 'Insert page link')}
|
||||||
|
bodyClassName="modal__dialog"
|
||||||
|
className="insert-link__dialog-wrapper--internal"
|
||||||
|
fileAttributes={attrs}
|
||||||
|
/>
|
||||||
|
</ApolloProvider>,
|
||||||
|
this[0]
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Object} data - Posted data
|
||||||
|
* @return {Object}
|
||||||
|
*/
|
||||||
|
buildAttributes(data) {
|
||||||
|
const shortcode = ShortcodeSerialiser.serialise({
|
||||||
|
name: 'sitetree_link',
|
||||||
|
properties: { id: data.PageID },
|
||||||
|
}, true);
|
||||||
|
|
||||||
|
// Add anchor
|
||||||
|
const anchor = data.Anchor && data.Anchor.length ? `#${data.Anchor}` : '';
|
||||||
|
const href = `${shortcode}${anchor}`;
|
||||||
|
|
||||||
|
return {
|
||||||
|
href,
|
||||||
|
target: data.TargetBlank ? '_blank' : '',
|
||||||
|
title: data.Description,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
getOriginalAttributes() {
|
||||||
|
const editor = this.getElement().getEditor();
|
||||||
|
const node = $(editor.getSelectedNode());
|
||||||
|
|
||||||
|
// Get href
|
||||||
|
const hrefParts = (node.attr('href') || '').split('#');
|
||||||
|
if (!hrefParts[0]) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if page is safe
|
||||||
|
const shortcode = ShortcodeSerialiser.match('sitetree_link', false, hrefParts[0]);
|
||||||
|
if (!shortcode) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
PageID: shortcode.properties.id ? parseInt(shortcode.properties.id, 10) : 0,
|
||||||
|
Anchor: hrefParts[1] || '',
|
||||||
|
Description: node.attr('title'),
|
||||||
|
TargetBlank: !!node.attr('target'),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Adds the plugin class to the list of available TinyMCE plugins
|
||||||
|
tinymce.PluginManager.add('sslinkinternal', (editor) => plugin.init(editor));
|
||||||
|
|
||||||
|
export default plugin;
|
@ -3,6 +3,7 @@
|
|||||||
namespace SilverStripe\CMS\Controllers;
|
namespace SilverStripe\CMS\Controllers;
|
||||||
|
|
||||||
use Page;
|
use Page;
|
||||||
|
use SilverStripe\Admin\LeftAndMain;
|
||||||
use SilverStripe\CampaignAdmin\AddToCampaignHandler;
|
use SilverStripe\CampaignAdmin\AddToCampaignHandler;
|
||||||
use SilverStripe\CMS\Model\SiteTree;
|
use SilverStripe\CMS\Model\SiteTree;
|
||||||
use SilverStripe\Control\Controller;
|
use SilverStripe\Control\Controller;
|
||||||
@ -36,6 +37,10 @@ class CMSPageEditController extends CMSMain
|
|||||||
'AddToCampaignForm' => [
|
'AddToCampaignForm' => [
|
||||||
'schemaUrl' => $this->Link('schema/AddToCampaignForm')
|
'schemaUrl' => $this->Link('schema/AddToCampaignForm')
|
||||||
],
|
],
|
||||||
|
'editorInternalLink' => [
|
||||||
|
'schemaUrl' => LeftAndMain::singleton()
|
||||||
|
->Link('methodSchema/Modals/editorInternalLink'),
|
||||||
|
],
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
40
code/Forms/InternalLinkFormFactory.php
Normal file
40
code/Forms/InternalLinkFormFactory.php
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace SilverStripe\CMS\Forms;
|
||||||
|
|
||||||
|
use SilverStripe\Admin\Forms\LinkFormFactory;
|
||||||
|
use SilverStripe\CMS\Model\SiteTree;
|
||||||
|
use SilverStripe\Forms\CheckboxField;
|
||||||
|
use SilverStripe\Forms\FieldList;
|
||||||
|
use SilverStripe\Forms\TextField;
|
||||||
|
use SilverStripe\Forms\TreeDropdownField;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides a form factory for inserting internal page links in a HTML editor
|
||||||
|
*/
|
||||||
|
class InternalLinkFormFactory extends LinkFormFactory
|
||||||
|
{
|
||||||
|
protected function getFormFields($controller, $name, $context)
|
||||||
|
{
|
||||||
|
$fields = FieldList::create([
|
||||||
|
TreeDropdownField::create(
|
||||||
|
'PageID',
|
||||||
|
_t(__CLASS__.'.SELECT_PAGE', 'Select a page'),
|
||||||
|
SiteTree::class,
|
||||||
|
'ID',
|
||||||
|
'TreeTitle'
|
||||||
|
),
|
||||||
|
TextField::create(
|
||||||
|
'Description',
|
||||||
|
_t(__CLASS__.'.LINKDESCR', 'Link description')
|
||||||
|
),
|
||||||
|
TextField::create('Anchor', _t(__CLASS__.'.ANCHORVALUE', 'Anchor')),
|
||||||
|
CheckboxField::create(
|
||||||
|
'TargetBlank',
|
||||||
|
_t(__CLASS__.'.LINKOPENNEWWIN', 'Open in new window/tab')
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $fields;
|
||||||
|
}
|
||||||
|
}
|
41
code/Forms/InternalLinkModalExtension.php
Normal file
41
code/Forms/InternalLinkModalExtension.php
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace SilverStripe\CMS\Forms;
|
||||||
|
|
||||||
|
use SilverStripe\Admin\ModalController;
|
||||||
|
use SilverStripe\Core\Extension;
|
||||||
|
use SilverStripe\Forms\Form;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decorates ModalController with insert internal link
|
||||||
|
* @see ModalController
|
||||||
|
*/
|
||||||
|
class InternalLinkModalExtension extends Extension
|
||||||
|
{
|
||||||
|
private static $allowed_actions = array(
|
||||||
|
'editorInternalLink',
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ModalController
|
||||||
|
*/
|
||||||
|
public function getOwner()
|
||||||
|
{
|
||||||
|
/** @var ModalController $owner */
|
||||||
|
$owner = $this->owner;
|
||||||
|
return $owner;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Form for inserting internal link pages
|
||||||
|
*
|
||||||
|
* @return Form
|
||||||
|
*/
|
||||||
|
public function editorInternalLink()
|
||||||
|
{
|
||||||
|
/** @var InternalLinkFormFactory $factory */
|
||||||
|
$factory = InternalLinkFormFactory::singleton();
|
||||||
|
return $factory->getForm($this->getOwner(), "editorInternalLink");
|
||||||
|
}
|
||||||
|
}
|
@ -13,11 +13,42 @@ So that I can link to a external website or a page on my site
|
|||||||
And I go to "/admin/pages"
|
And I go to "/admin/pages"
|
||||||
And I click on "About Us" in the tree
|
And I click on "About Us" in the tree
|
||||||
|
|
||||||
|
Scenario: I can link to an internal page
|
||||||
|
Given I select "awesome" in the "Content" HTML field
|
||||||
|
And I press the "Insert Link" HTML field button
|
||||||
|
And I click "Link to page" in the ".mce-menu" element
|
||||||
|
And I should see an "form#Form_editorInternalLink" element
|
||||||
|
When I click "(Choose Page)" in the ".Select-multi-value-wrapper" element
|
||||||
|
And I click "About Us" in the ".treedropdownfield__menu" element
|
||||||
|
And I fill in "my desc" for "Link description"
|
||||||
|
And I press the "Insert" button
|
||||||
|
Then the "Content" HTML field should contain "<a title="my desc" href="[sitetree_link,id=2]">awesome</a>"
|
||||||
|
# Required to avoid "unsaved changes" browser dialog
|
||||||
|
Then I press the "Save draft" button
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: I can edit a link to an internal page
|
||||||
|
Given I fill in the "Content" HTML field with "<a title='my desc' href='[sitetree_link,id=2]'>awesome</a>"
|
||||||
|
And I select "awesome" in the "Content" HTML field
|
||||||
|
And I press the "Insert Link" HTML field button
|
||||||
|
And I click "Link to page" in the ".mce-menu" element
|
||||||
|
And I should see an "form#Form_editorInternalLink" element
|
||||||
|
Then I should see "About Us" in the ".Select-value" element
|
||||||
|
And the "Link description" field should contain "my desc"
|
||||||
|
# This doesn't seem to suffer from that issue
|
||||||
|
When I click "About Us" in the ".Select-value" element
|
||||||
|
And I click "Home" in the ".treedropdownfield__menu" element
|
||||||
|
And I fill in "my new desc" for "Link description"
|
||||||
|
And I press the "Insert" button
|
||||||
|
Then the "Content" HTML field should contain "<a title="my new desc" href="[sitetree_link,id=1]">awesome</a>"
|
||||||
|
# Required to avoid "unsaved changes" browser dialog
|
||||||
|
Then I press the "Save draft" button
|
||||||
|
|
||||||
Scenario: I can link to an external URL
|
Scenario: I can link to an external URL
|
||||||
Given I select "awesome" in the "Content" HTML field
|
Given I select "awesome" in the "Content" HTML field
|
||||||
And I press the "Insert Link" HTML field button
|
And I press the "Insert Link" HTML field button
|
||||||
When I click "Link to external URL" in the ".mce-menu" element
|
When I click "Link to external URL" in the ".mce-menu" element
|
||||||
And I should see an "form#Form_EditorToolbarEditorExternalLink" element
|
And I should see an "form#Form_ModalsEditorExternalLink" element
|
||||||
When I fill in "http://silverstripe.org" for "URL"
|
When I fill in "http://silverstripe.org" for "URL"
|
||||||
And I check "Open in new window/tab"
|
And I check "Open in new window/tab"
|
||||||
And I press the "Insert" button
|
And I press the "Insert" button
|
||||||
@ -30,7 +61,7 @@ So that I can link to a external website or a page on my site
|
|||||||
And I select "awesome" in the "Content" HTML field
|
And I select "awesome" in the "Content" HTML field
|
||||||
When I press the "Insert Link" HTML field button
|
When I press the "Insert Link" HTML field button
|
||||||
And I click "Link to external URL" in the ".mce-menu" element
|
And I click "Link to external URL" in the ".mce-menu" element
|
||||||
And I should see an "form#Form_EditorToolbarEditorExternalLink" element
|
And I should see an "form#Form_ModalsEditorExternalLink" element
|
||||||
Then the "URL" field should contain "http://silverstripe.org"
|
Then the "URL" field should contain "http://silverstripe.org"
|
||||||
# This doesn't seem to suffer from that issue
|
# This doesn't seem to suffer from that issue
|
||||||
When I fill in "http://google.com" for "URL"
|
When I fill in "http://google.com" for "URL"
|
||||||
|
@ -26,6 +26,7 @@ const config = [
|
|||||||
bundle: `${PATHS.SRC}/bundles/bundle.js`,
|
bundle: `${PATHS.SRC}/bundles/bundle.js`,
|
||||||
// See https://github.com/webpack/webpack/issues/300#issuecomment-45313650
|
// See https://github.com/webpack/webpack/issues/300#issuecomment-45313650
|
||||||
SilverStripeNavigator: `${PATHS.LEGACY_SRC}/SilverStripeNavigator.js`,
|
SilverStripeNavigator: `${PATHS.LEGACY_SRC}/SilverStripeNavigator.js`,
|
||||||
|
'TinyMCE_sslink-internal': `${PATHS.LEGACY_SRC}/TinyMCE_sslink-internal.js`,
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: PATHS.DIST,
|
path: PATHS.DIST,
|
||||||
@ -33,7 +34,11 @@ const config = [
|
|||||||
},
|
},
|
||||||
devtool: (ENV !== 'production') ? 'source-map' : '',
|
devtool: (ENV !== 'production') ? 'source-map' : '',
|
||||||
resolve: resolveJS(ENV, PATHS),
|
resolve: resolveJS(ENV, PATHS),
|
||||||
externals: externalJS(ENV, PATHS),
|
externals: Object.assign({}, externalJS(ENV, PATHS), {
|
||||||
|
'containers/InsertLinkModal/InsertLinkModal': 'InsertLinkModal',
|
||||||
|
'lib/TinyMCEActionRegistrar': 'TinyMCEActionRegistrar',
|
||||||
|
'lib/ShortcodeSerialiser': 'ShortcodeSerialiser',
|
||||||
|
}),
|
||||||
module: moduleJS(ENV, PATHS),
|
module: moduleJS(ENV, PATHS),
|
||||||
plugins: pluginJS(ENV, PATHS),
|
plugins: pluginJS(ENV, PATHS),
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user