diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index 90567e12..2b1ee07d 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -3,8 +3,8 @@ var a=n[i]={exports:{},id:i,loaded:!1} return t[i].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var n={} return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict" n(3),n(4),n(6),n(7),n(8),n(9),n(10),n(11)},,function(t,e){t.exports=jQuery},function(t,e,n){"use strict" -function i(t){return t&&t.__esModule?t:{"default":t}}var a=n(2),o=i(a) -o["default"].entwine("ss",function(t){t(".cms-add-form .parent-mode :input").entwine({onclick:function e(t){if("top"==this.val()){var e=this.closest("form").find("#Form_AddForm_ParentID_Holder .TreeDropdownField") +function i(t){return t&&t.__esModule?t:{"default":t}}var a=n(2),s=i(a) +s["default"].entwine("ss",function(t){t(".cms-add-form .parent-mode :input").entwine({onclick:function e(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 n(){var t=this @@ -12,42 +12,41 @@ this.find("#Form_AddForm_ParentID_Holder .TreeDropdownField").bind("change",func },loadCachedChildren:function i(t){var e=this.getParentCache() return"undefined"!=typeof e[t]?e[t]:null},saveCachedChildren:function a(t,e){var n=this.getParentCache() -n[t]=e,this.setParentCache(n)},updateTypeList:function o(){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,s=a?a.ClassName:null,r=s&&"child"===i&&o?s:"Root",d="undefined"!=typeof e[r]?e[r]:null,l=this,c=d&&"undefined"!=typeof d.defaultChild?d.defaultChild:null,u=[] +n[t]=e,this.setParentCache(n)},updateTypeList:function s(){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"),s=a&&"child"===i?n.getValue()||this.getParentID():null,o=a?a.ClassName:null,r=o&&"child"===i&&s?o:"Root",d="undefined"!=typeof e[r]?e[r]: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 h(t){l.saveCachedChildren(o,t),l.updateSelectionFilter(t,c)},complete:function f(){l.removeClass("loading")}}),!1)}u=d&&"undefined"!=typeof d.disallowedChildren?d.disallowedChildren:[], -this.updateSelectionFilter(u,c)},updateSelectionFilter:function s(e,n){var i=null +if(s){if(this.hasClass("loading"))return +return this.addClass("loading"),this.setParentID(s),n.getValue()||n.setValue(s),u=this.loadCachedChildren(s),null!==u?(this.updateSelectionFilter(u,c),void this.removeClass("loading")):(t.ajax({url:l.data("childfilter"), +data:{ParentID:s},success:function h(t){l.saveCachedChildren(s,t),l.updateSelectionFilter(t,c)},complete:function f(){l.removeClass("loading")}}),!1)}u=d&&"undefined"!=typeof d.disallowedChildren?d.disallowedChildren:[], +this.updateSelectionFilter(u,c)},updateSelectionFilter:function o(e,n){var i=null if(this.find("#Form_AddForm_PageType div.radio").each(function(){var n=t(this).find("input").val(),a=t.inArray(n,e)===-1 t(this).setEnabled(a),a||t(this).setSelected(!1),i=null===i?a:i&&a}),n)var a=this.find("#Form_AddForm_PageType div.radio input[value="+n+"]").parents("li:first") else var a=this.find("#Form_AddForm_PageType div.radio:not(.disabled):first") -a.setSelected(!0),a.siblings().setSelected(!1) -var o=this.find("#Form_AddForm_PageType div.radio: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 div.radio").entwine({onclick:function r(t){this.setSelected(!0) +a.setSelected(!0),a.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]").addAttr("disabled"), +this.find(".message-restricted")[i?"hide":"show"]()}}),t(".cms-add-form #Form_AddForm_PageType div.radio").entwine({onclick:function r(t){this.setSelected(!0)},setSelected:function d(t){var e=this.find("input") + -},setSelected:function d(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 l(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 c(e){var n=t(".cms-tree"),i=t(".cms-list"),a=0,o +e?t(this).find("input").removeAttr("disabled"):t(this).find("input").attr("disabled","disabled").removeAttr("checked")}}),t(".cms-content-addpage-button").entwine({onclick:function c(e){var n=t(".cms-tree"),i=t(".cms-list"),a=0,s -if(n.is(":visible")){var s=n.jstree("get_selected") -a=s?t(s[0]).data("id"):null}else{var r=i.find('input[name="Page[GridState]"]').val() +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 d={selector:this.data("targetPanel"),pjax:this.data("pjax")},l -a?(o=this.data("extraParams")?this.data("extraParams"):"",l=t.path.addSearchParams(i18n.sprintf(this.data("urlAddpage"),a),o)):l=this.attr("href"),t(".cms-container").loadPanel(l,null,d),e.preventDefault(), +a?(s=this.data("extraParams")?this.data("extraParams"):"",l=t.path.addSearchParams(i18n.sprintf(this.data("urlAddpage"),a),s)):l=this.attr("href"),t(".cms-container").loadPanel(l,null,d),e.preventDefault(), this.blur()}})})},function(t,e,n){"use strict" -function i(t){return t&&t.__esModule?t:{"default":t}}var a=n(2),o=i(a),s=n(5),r=i(s) -o["default"].entwine("ss",function(t){t(".cms-edit-form :input[name=ClassName]").entwine({onchange:function e(){alert(r["default"]._t("CMSMAIN.ALERTCLASSNAME"))}}),t(".cms-edit-form input[name=Title]").entwine({ +function i(t){return t&&t.__esModule?t:{"default":t}}var a=n(2),s=i(a),o=n(5),r=i(o) +s["default"].entwine("ss",function(t){t(".cms-edit-form :input[name=ClassName]").entwine({onchange:function e(){alert(r["default"]._t("CMSMAIN.ALERTCLASSNAME"))}}),t(".cms-edit-form input[name=Title]").entwine({ onmatch:function n(){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"),s=e.val() -e.data("OrigVal",s),0===i.val().indexOf(i.data("defaultUrl"))&&""==a.val()?e.updateURLSegment(s):t(".update",e.parent()).show(),e.updateRelatedFields(s,o),e.updateBreadcrumbLabel(s)})),this._super()},onunmatch:function i(){ +i.length>0&&(e._addActions(),this.bind("change",function(n){var s=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,s),e.updateBreadcrumbLabel(o)})),this._super()},onunmatch:function i(){ this._super()},updateRelatedFields:function a(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 o(e){var n=t("input:text[name=URLSegment]",this.closest("form")),i=n.closest(".field.urlsegment"),a=t(".update",this.parent()) +i.val()==n&&(i.val(e),i.updatedRelatedFields&&i.updatedRelatedFields())})},updateURLSegment:function s(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 s(e){var n=t(".cms-edit-form input[name=ID]").val(),i=t("span.cms-panel-link.crumb") +i.update(e),a.is(":visible")&&a.hide()},updateBreadcrumbLabel:function o(e){var n=t(".cms-edit-form input[name=ID]").val(),i=t("span.cms-panel-link.crumb") e&&""!=e&&i.text(e)},_addActions:function d(){var e=this,n n=t("