2016-03-29 00:43:45 +02:00
|
|
|
!function e(t,n,i){function s(o,r){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!r&&l)return l(o,!0);if(a)return a(o,!0);var d=new Error("Cannot find module '"+o+"'");throw d.code="MODULE_NOT_FOUND",d}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){var n=t[o][1][e];return s(n?n:e)},c,c.exports,e,t,n,i)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<i.length;o++)s(i[o]);return s}({1:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".ss-tabset.ss-ui-action-tabset").entwine({IgnoreTabState:!0,onadd:function(){this._super(),this.tabs({collapsible:!0,active:!1})},onremove:function(){var t=e(".cms-container").find("iframe");t.each(function(t,n){try{e(n).contents().off("click.ss-ui-action-tabset")}catch(i){console.warn("Unable to access iframe, possible https mis-match")}}),e(document).off("click.ss-ui-action-tabset"),this._super()},ontabsbeforeactivate:function(e,t){this.riseUp(e,t)},onclick:function(e,t){this.attachCloseHandler(e,t)},attachCloseHandler:function(t,n){var i,s=this,a=e(".cms-container").find("iframe");i=function(t){var n,a;n=e(t.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),e(t.target).closest(s).length||n.length||(s.tabs("option","active",!1),a=e(".cms-container").find("iframe"),a.each(function(t,n){e(n).contents().off("click.ss-ui-action-tabset",i)}),e(document).off("click.ss-ui-action-tabset",i))},e(document).on("click.ss-ui-action-tabset",i),a.length>0&&a.each(function(t,n){e(n).contents().on("click.ss-ui-action-tabset",i)})},riseUp:function(t,n){var i,s,a,o,r,l,d,c,u;return i=e(this).find(".ui-tabs-panel").outerHeight(),s=e(this).find(".ui-tabs-nav").outerHeight(),a=e(window).height()+e(document).scrollTop()-s,o=e(this).find(".ui-tabs-nav").offset().top,r=n.newPanel,l=n.newTab,o+i>=a&&o-i>0?(this.addClass("rise-up"),null!==l.position()&&(d=-r.outerHeight(),c=r.parents(".south"),c&&(u=l.offset().top-c.offset().top,d-=u),e(r).css("top",d+"px"))):(this.removeClass("rise-up"),null!==l.position()&&e(r).css("top","0px")),!1}}),e(".cms-content-actions .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&e(n.newPanel).css("left",n.newTab.position().left+"px")}}),e(".cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(this).closest(".ss-ui-action-tabset").removeClass("tabset-open tabset-open-last")}}),e(".cms-content-fields .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&(e(n.newTab).hasClass("last")?(e(n.newPanel).css({left:"auto",right:"0px"}),e(n.newPanel).parent().addClass("tabset-open-last")):(e(n.newPanel).css("left",n.newTab.position().left+"px"),e(n.newTab).hasClass("first")&&(e(n.newPanel).css("left","0px"),e(n.newPanel).parent().addClass("tabset-open"))))}}),e(".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({"from .ui-tabs-nav li":{onhover:function(t){e(t.target).parent().find("li .active").removeClass("active"),e(t.target).find("a").addClass("active")}},ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).css({left:"auto",right:"auto"}),e(n.newPanel).length>0&&e(n.newPanel).parent().addClass("tabset-open")}})})},{jQuery:"jQuery"}],2:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s),o=e("i18n"),r=i(o);a["default"].entwine("ss.tree",function(e){e("#Form_BatchActionsForm").entwine({Actions:[],getTree:function(){return e(".cms-tree")},fromTree:{oncheck_node:function(e,t){this.serializeFromTree()},onuncheck_node:function(e,t){this.serializeFromTree()}},registerDefault:function(){this.register("admin/pages/batchactions/publish",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_PUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to publish?"),{num:e.length}));return t?e:!1}),this.register("admin/pages/batchactio
|
2016-04-05 12:30:50 +02:00
|
|
|
t.removeClass("split-disabled"),t.find(".disabled-tooltip").hide()},ondisable:function(){var t=e(".preview-mode-selector");t.addClass("split-disabled"),t.find(".disabled-tooltip").show()},_block:function(){return this.addClass("blocked"),this.find(".cms-preview-overlay").show(),this},_unblock:function(){return this.removeClass("blocked"),this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function(){var t,n;return e(".cms-previewable").length?(t=this.loadState("mode"),n=this.loadState("size"),this._moveNavigator(),t&&"content"==t||(this.enablePreview(),this._loadCurrentState()),this.redraw(),t&&this.changeMode(t),n&&this.changeSize(n)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function(e,t){t.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,oncolumnvisibilitychanged:function(){var e=this.getPendingURL();e&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(e),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function(){this._initialiseFromContent()}},_loadUrl:function(e){return this.find("iframe").addClass("loading").attr("src",e),this},_getNavigatorStates:function(){var t=e.map(this.getAllowedStates(),function(t){var n=e(".cms-preview-states .state-name[data-name="+t+"]");return n.length?{name:t,url:n.attr("data-link"),active:n.is(":radio")?n.is(":checked"):n.is(":selected")}:null});return t},_loadCurrentState:function(){if(!this.getIsPreviewEnabled())return this;var t=this._getNavigatorStates(),n=this.getCurrentStateName(),i=null;t&&(i=e.grep(t,function(e,t){return n===e.name||!n&&e.active}));var s=null;return i[0]?s=i[0].url:t.length?(this.setCurrentStateName(t[0].name),s=t[0].url):this.setCurrentStateName(null),s+=(-1===s.indexOf("?")?"?":"&")+"CMSPreview=1",this.is(".column-hidden")?(this.setPendingURL(s),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),s?(this._loadUrl(s),this._unblock()):this._block()),this},_moveNavigator:function(){var t=e(".cms-preview .cms-preview-controls"),n=e(".cms-edit-form .cms-navigator");n.length&&t.length?t.html(e(".cms-edit-form .cms-navigator").detach()):this._block()},_loadCurrentPage:function(){if(this.getIsPreviewEnabled()){var t;e(".cms-container");try{t=this.find("iframe")[0].contentDocument}catch(n){console.warn("Unable to access iframe, possible https mis-match")}if(t){var i=e(t).find("meta[name=x-page-id]").attr("content"),s=e(t).find("meta[name=x-cms-edit-link]").attr("content"),a=e(".cms-content");i&&a.find(":input[name=ID]").val()!=i&&e(".cms-container").entwine(".ss").loadPanel(s)}}},_adjustIframeForPreview:function(){var e,t=this.find("iframe")[0];if(t){try{e=t.contentDocument}catch(n){console.warn("Unable to access iframe, possible https mis-match")}if(e){for(var i=e.getElementsByTagName("A"),s=0;s<i.length;s++){var a=i[s].getAttribute("href");a&&a.match(/^http:\/\//)&&i[s].setAttribute("target","_blank")}var o=e.getElementById("SilverStripeNavigator");o&&(o.style.display="none");var r=e.getElementById("SilverStripeNavigatorMessage");r&&(r.style.display="none"),this.trigger("afterIframeAdjustedForPreview",[e])}}}}),e(".cms-edit-form").entwine({onadd:function(){this._super(),e(".cms-preview")._initialiseFromContent()}}),e(".cms-preview-states").entwine({changeVisibleState:function(e){this.find('input[data-name="'+e+'"]').prop("checked",!0)}}),e(".cms-preview-states .state-name").entwine({onclick:function(t){this.parent().find(".active").removeClass("active"),this.next("label").addClass("active");var n=e(this).attr("data-name");e(".cms-preview").changeState(n)}}),e(".preview-mode-selector").entwine({changeVisibleMode:function(e){this.find("select").val(e).trigger("liszt:updated")._addIcon()}}),e(".preview-mode-selector select").entwine({onchange:function(t){this._super(t),t.preventDefault();var n=e(this).val();e(".cms-preview").changeMode(n)}}),e(".preview-mode-selector .chzn-results li").entwine({onclick:function(t){if(e.browser.msie){t.preventDefault();var n=this.index(),i=this.closest(".preview-mode-selector").find("selec
|
2016-03-30 03:50:22 +02:00
|
|
|
$(t.newTab).closest("li").hasClass("readonly")?n.fadeOut():n.show()}})},rewriteHashlinks:function(){$(this).find("ul a").each(function(){if($(this).attr("href")){var e=$(this).attr("href").match(/#.*/);e&&$(this).attr("href",document.location.href.replace(/#.*/,"")+e[0])}})}}),$("#filters-button").entwine({onmatch:function(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function(){this._super()},showHide:function(){var e=this,t=$(".cms-content-filters").first(),n=this.data("collapsed");this.data("animating")||(this.toggleClass("active"),this.data("animating",!0),t[n?"slideDown":"slideUp"]({complete:function(){e.data("collapsed",!n),e.data("animating",!1)}}))},onclick:function(){this.showHide()}})});var statusMessage=function(e,t){e=jQuery("<div/>").text(e).html(),jQuery.noticeAdd({text:e,type:t,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})},errorMessage=function(e){jQuery.noticeAdd({text:e,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},{config:"config",jQuery:"jQuery",router:"router"}],14:[function(e,t,n){"use strict";e("../../src/LeftAndMain.Layout.js"),e("../../src/LeftAndMain.js"),e("../../src/LeftAndMain.ActionTabSet.js"),e("../../src/LeftAndMain.Panel.js"),e("../../src/LeftAndMain.Tree.js"),e("../../src/LeftAndMain.Content.js"),e("../../src/LeftAndMain.EditForm.js"),e("../../src/LeftAndMain.Menu.js"),e("../../src/LeftAndMain.Preview.js"),e("../../src/LeftAndMain.BatchActions.js"),e("../../src/LeftAndMain.FieldHelp.js"),e("../../src/LeftAndMain.FieldDescriptionToggle.js"),e("../../src/LeftAndMain.TreeDropdownField.js")},{"../../src/LeftAndMain.ActionTabSet.js":1,"../../src/LeftAndMain.BatchActions.js":2,"../../src/LeftAndMain.Content.js":3,"../../src/LeftAndMain.EditForm.js":4,"../../src/LeftAndMain.FieldDescriptionToggle.js":5,"../../src/LeftAndMain.FieldHelp.js":6,"../../src/LeftAndMain.Layout.js":7,"../../src/LeftAndMain.Menu.js":8,"../../src/LeftAndMain.Panel.js":9,"../../src/LeftAndMain.Preview.js":10,"../../src/LeftAndMain.Tree.js":11,"../../src/LeftAndMain.TreeDropdownField.js":12,"../../src/LeftAndMain.js":13}]},{},[14]);
|