Merge pull request #1589 from sminnee/webpack
Replace browserify/gulp with Webpack
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/**/*.js.map
|
||||
/**/*.css.map
|
||||
|
BIN
client/dist/images/add-bg-hover.png
vendored
Before Width: | Height: | Size: 621 B |
BIN
client/dist/images/add-bg.png
vendored
Before Width: | Height: | Size: 578 B |
BIN
client/dist/images/add.gif
vendored
Before Width: | Height: | Size: 1004 B |
BIN
client/dist/images/arrow_refresh.gif
vendored
Before Width: | Height: | Size: 564 B |
0
client/dist/images/blue-folder-horizontal.png
vendored
Executable file → Normal file
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 375 B |
BIN
client/dist/images/bullet_arrow_down.png
vendored
Before Width: | Height: | Size: 147 B |
BIN
client/dist/images/bullet_arrow_up.png
vendored
Before Width: | Height: | Size: 140 B |
BIN
client/dist/images/check.png
vendored
Before Width: | Height: | Size: 3.5 KiB |
BIN
client/dist/images/closeicon.gif
vendored
Before Width: | Height: | Size: 332 B |
BIN
client/dist/images/content-header-tabs-sprite.png
vendored
Before Width: | Height: | Size: 3.6 KiB |
BIN
client/dist/images/delete-small.gif
vendored
Before Width: | Height: | Size: 181 B |
BIN
client/dist/images/delete.gif
vendored
Before Width: | Height: | Size: 356 B |
BIN
client/dist/images/delete_disabled.gif
vendored
Before Width: | Height: | Size: 230 B |
BIN
client/dist/images/dialogs/alert.gif
vendored
Before Width: | Height: | Size: 1.9 KiB |
BIN
client/dist/images/dialogs/alert.png
vendored
Before Width: | Height: | Size: 1.7 KiB |
BIN
client/dist/images/down.gif
vendored
Before Width: | Height: | Size: 570 B |
BIN
client/dist/images/edit.gif
vendored
Before Width: | Height: | Size: 1.0 KiB |
BIN
client/dist/images/edit_disabled.gif
vendored
Before Width: | Height: | Size: 305 B |
BIN
client/dist/images/flash_large.jpg
vendored
Before Width: | Height: | Size: 4.3 KiB |
BIN
client/dist/images/flash_small.jpg
vendored
Before Width: | Height: | Size: 994 B |
BIN
client/dist/images/handled-bg.png
vendored
Before Width: | Height: | Size: 9.7 KiB |
BIN
client/dist/images/locked.gif
vendored
Before Width: | Height: | Size: 973 B |
BIN
client/dist/images/network-save-bw.gif
vendored
Before Width: | Height: | Size: 623 B |
BIN
client/dist/images/network-save.gif
vendored
Before Width: | Height: | Size: 1.7 KiB |
BIN
client/dist/images/pagination/record-export.png
vendored
Before Width: | Height: | Size: 817 B |
BIN
client/dist/images/pagination/record-first-g.png
vendored
Before Width: | Height: | Size: 1.1 KiB |
BIN
client/dist/images/pagination/record-first.png
vendored
Before Width: | Height: | Size: 1.1 KiB |
BIN
client/dist/images/pagination/record-last-g.png
vendored
Before Width: | Height: | Size: 1.1 KiB |
BIN
client/dist/images/pagination/record-last.png
vendored
Before Width: | Height: | Size: 1.1 KiB |
BIN
client/dist/images/pagination/record-next-g.png
vendored
Before Width: | Height: | Size: 1.0 KiB |
BIN
client/dist/images/pagination/record-next.png
vendored
Before Width: | Height: | Size: 1.0 KiB |
BIN
client/dist/images/pagination/record-prev-g.png
vendored
Before Width: | Height: | Size: 429 B |
BIN
client/dist/images/pagination/record-prev.png
vendored
Before Width: | Height: | Size: 1.0 KiB |
BIN
client/dist/images/pagination/record-print.png
vendored
Before Width: | Height: | Size: 818 B |
BIN
client/dist/images/right.gif
vendored
Before Width: | Height: | Size: 574 B |
BIN
client/dist/images/show.png
vendored
Before Width: | Height: | Size: 693 B |
BIN
client/dist/images/show_disabled.png
vendored
Before Width: | Height: | Size: 672 B |
BIN
client/dist/images/swf-upload-button-small.jpg
vendored
Before Width: | Height: | Size: 1.9 KiB |
BIN
client/dist/images/tables/checkbox.png
vendored
Before Width: | Height: | Size: 148 B |
BIN
client/dist/images/tables/thead.png
vendored
Before Width: | Height: | Size: 154 B |
BIN
client/dist/images/tickbox-canttick.gif
vendored
Before Width: | Height: | Size: 86 B |
BIN
client/dist/images/tickbox-fail.gif
vendored
Before Width: | Height: | Size: 64 B |
BIN
client/dist/images/tickbox-greyedout.gif
vendored
Before Width: | Height: | Size: 64 B |
BIN
client/dist/images/tickbox-greyticked.gif
vendored
Before Width: | Height: | Size: 76 B |
BIN
client/dist/images/tickbox-ticked.gif
vendored
Before Width: | Height: | Size: 70 B |
BIN
client/dist/images/tickbox-unticked.gif
vendored
Before Width: | Height: | Size: 70 B |
BIN
client/dist/images/treeicons/blue-document.png
vendored
Before Width: | Height: | Size: 813 B |
Before Width: | Height: | Size: 1.1 KiB |
BIN
client/dist/images/treeicons/book-closedfolder.gif
vendored
Before Width: | Height: | Size: 147 B |
BIN
client/dist/images/treeicons/book-file.gif
vendored
Before Width: | Height: | Size: 147 B |
BIN
client/dist/images/treeicons/book-openfolder.gif
vendored
Before Width: | Height: | Size: 160 B |
Before Width: | Height: | Size: 266 B |
BIN
client/dist/images/treeicons/brokenlink-file.gif
vendored
Before Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 262 B |
BIN
client/dist/images/treeicons/draft-file.png
vendored
Before Width: | Height: | Size: 3.0 KiB |
BIN
client/dist/images/treeicons/draft-folder.png
vendored
Before Width: | Height: | Size: 563 B |
Before Width: | Height: | Size: 461 B |
BIN
client/dist/images/treeicons/element-file.gif
vendored
Before Width: | Height: | Size: 918 B |
BIN
client/dist/images/treeicons/element-openfolder.gif
vendored
Before Width: | Height: | Size: 444 B |
BIN
client/dist/images/treeicons/folder-closedfolder.gif
vendored
Before Width: | Height: | Size: 210 B |
BIN
client/dist/images/treeicons/folder-file.gif
vendored
Before Width: | Height: | Size: 210 B |
BIN
client/dist/images/treeicons/folder-openfolder.gif
vendored
Before Width: | Height: | Size: 219 B |
BIN
client/dist/images/treeicons/home-file.png
vendored
Before Width: | Height: | Size: 791 B |
BIN
client/dist/images/treeicons/multi-user.gif
vendored
Before Width: | Height: | Size: 554 B |
BIN
client/dist/images/treeicons/multi-user.png
vendored
Before Width: | Height: | Size: 611 B |
Before Width: | Height: | Size: 210 B |
BIN
client/dist/images/treeicons/page-gold-file.gif
vendored
Before Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 219 B |
BIN
client/dist/images/treeicons/page-shortcut-file.gif
vendored
Before Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 798 B |
BIN
client/dist/images/treeicons/preferences-file.gif
vendored
Before Width: | Height: | Size: 798 B |
Before Width: | Height: | Size: 798 B |
BIN
client/dist/images/treeicons/reports-file.png
vendored
Before Width: | Height: | Size: 475 B |
BIN
client/dist/images/treeicons/reports-foldericon.png
vendored
Before Width: | Height: | Size: 445 B |
Before Width: | Height: | Size: 461 B |
BIN
client/dist/images/treeicons/root.png
vendored
Before Width: | Height: | Size: 336 B |
BIN
client/dist/images/treeicons/sent-file.gif
vendored
Before Width: | Height: | Size: 338 B |
BIN
client/dist/images/treeicons/sent-folder.png
vendored
Before Width: | Height: | Size: 488 B |
BIN
client/dist/images/treeicons/task-file.gif
vendored
Before Width: | Height: | Size: 487 B |
BIN
client/dist/images/treeicons/user-file.gif
vendored
Before Width: | Height: | Size: 774 B |
BIN
client/dist/images/unlocked.gif
vendored
Before Width: | Height: | Size: 936 B |
BIN
client/dist/images/unlockedled.gif
vendored
Before Width: | Height: | Size: 936 B |
BIN
client/dist/images/widget-title-bg.gif
vendored
Before Width: | Height: | Size: 264 B |
4
client/dist/js/bundle-legacy.js
vendored
@ -1,2 +1,2 @@
|
||||
!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";t("../legacy/CMSMain.AddForm.js"),t("../legacy/CMSMain.EditForm.js"),t("../legacy/CMSMain.js"),t("../legacy/CMSMain.Tree.js"),t("../legacy/CMSPageHistoryController.js"),t("../legacy/RedirectorPage.js"),t("../legacy/SilverStripeNavigator.js"),t("../legacy/SiteTreeURLSegmentField.js")},{"../legacy/CMSMain.AddForm.js":2,"../legacy/CMSMain.EditForm.js":3,"../legacy/CMSMain.Tree.js":4,"../legacy/CMSMain.js":5,"../legacy/CMSPageHistoryController.js":6,"../legacy/RedirectorPage.js":7,"../legacy/SilverStripeNavigator.js":8,"../legacy/SiteTreeURLSegmentField.js":9}],2:[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 div.radio").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 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(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,i=t(".cms-tree"),a=t(".cms-list"),o=0;if(i.is(":visible")){var r=i.jstree("get_selected");o=r?t(r[0]).data("id"):null}else{var s=a.find('input[name="Page[GridState]"]').val();s&&(o=parseInt(JSON.parse(s).ParentID,10))}var d,l={selector:this.data("targetPanel"),pjax:this.data("pjax")};o?(n=this.data("extraParams")?this.data("extraParams"):"",d=t.path.addSearchParams(i18n.sprintf(this.data("urlAddpage"),o),n)):d=this.attr("href"),t(".cms-container").loadPanel(d,null,l),e.preventDefault(),this.blur()}})})},{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",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(e){var n=this.find(":input[name=ParentType]:checked").val(),i=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?i.slideDown(400,function(){t(this).css("overflow","visible")}):i.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 #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 .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(),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 .btn-toolbar #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 .btn-toolbar #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 .btn-toolbar #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 .btn-toolbar #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 .btn-toolbar 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 .btn-toolbar 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"}],4:[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:n.hasClass("edit-disabled")?s["default"]._t("Tree.EditPage","Edit page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"):s["default"]._t("Tree.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(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}),n.hasClass("edit-disabled")||(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"}],5:[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"}],6:[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"}],7:[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"}],8:[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"}],9:[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"}]},{},[1]);
|
||||
//# sourceMappingURL=bundle-legacy.js.map
|
||||
!function(t){function e(i){if(n[i])return n[i].exports;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(1),n(3),n(5),n(6),n(7),n(8),n(9),n(10),n(11)},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");e.setValue(""),e.setTitle("")}}}),t(".cms-add-form").entwine({ParentID:0,ParentCache:{},onadd:function n(){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 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?s:"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(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)},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;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();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(),this.blur()}})})},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),s=n(4),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({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(){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.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");e&&""!=e&&i.text(e)},_addActions:function d(){var e=this,n;n=t("<button />",{"class":"update ss-ui-button-small",text:r["default"]._t("URLSEGMENT.UpdateURL"),type:"button",click:function i(t){t.preventDefault(),e.updateURLSegment(e.val())}}),n.insertAfter(e),n.hide()}}),t(".cms-edit-form .parentTypeSelector").entwine({onmatch:function l(){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 c(){this._super()},_toggleSelection:function u(e){var n=this.find(":input[name=ParentType]:checked").val(),i=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?i.slideDown(400,function(){t(this).css("overflow","visible")}):i.slideUp()},_changeParentId:function h(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 f(){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 m(){this._super()}}),t(".cms-edit-form .btn-toolbar #Form_EditForm_action_print").entwine({onclick:function p(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 v(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="";return i=n?r["default"].sprintf(r["default"]._t("CMSMain.RollbackToVersion"),n):r["default"]._t("CMSMain.ConfirmRestoreFromLive"),!!confirm(i)&&this._super(t)}}),t(".cms-edit-form .btn-toolbar #Form_EditForm_action_archive").entwine({onclick:function g(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="";return i=r["default"].sprintf(r["default"]._t("CMSMain.Archive"),n),!!confirm(i)&&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(),i="",a=this.data("toRoot");return i=r["default"].sprintf(r["default"]._t(a?"CMSMain.RestoreToRoot":"CMSMain.Restore"),n),!!confirm(i)&&this._super(t)}}),t(".cms-edit-form .btn-toolbar #Form_EditForm_action_delete").entwine({onclick:function b(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="";return i=r["default"].sprintf(r["default"]._t("CMSMain.DeleteFromDraft"),n),!!confirm(i)&&this._super(t)}}),t(".cms-edit-form .btn-toolbar #Form_EditForm_action_unpublish").entwine({onclick:function w(t){var e=this.parents("form:first"),n=e.find(":input[name=Version]").val(),i="";return i=r["default"].sprintf(r["default"]._t("CMSMain.Unpublish"),n),!!confirm(i)&&this._super(t)}}),t(".cms-edit-form.changed").entwine({onmatch:function C(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 F(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 .btn-toolbar button[name=action_publish]").entwine({onbuttonafterrefreshalternate:function P(){this.button("option","showingAlternate")?this.addClass("ss-ui-action-constructive"):this.removeClass("ss-ui-action-constructive")}}),t(".cms-edit-form .btn-toolbar button[name=action_save]").entwine({onbuttonafterrefreshalternate:function S(){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 T(){this.redraw(),this._super()},onunmatch:function k(){this._super()},redraw:function x(){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 E(){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){t.exports=i18n},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-content-header-info").entwine({"from .cms-panel":{ontoggle:function e(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 n(){var e=this;this._super(),t.each(this.find(".cms-actions-buttons-row .tool-button"),function(){var n=t(this),i=n.data("toolid"),a=n.hasClass("active");void 0!==i&&(n.data("active",!1).removeClass("active"),t("#"+i).hide(),e.bindActionButtonEvents(n))})},onunmatch:function i(){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 a(t){var e=this;t.on("click.cmsContentToolbar",function(n){e.showHideTool(t)})},unbindActionButtonEvents:function o(t){t.off(".cmsContentToolbar")},showHideTool:function s(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)}})})},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(4),r=i(s);o["default"].entwine("ss.tree",function(t){t(".cms-tree").entwine({fromDocument:{"oncontext_show.vakata":function e(t){this.adjustContextClass()}},adjustContextClass:function n(){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 i(){var e=this,n=this._super(),i=this.getHints();return n.plugins.push("contextmenu"),n.contextmenu={items:function a(n){var i={edit:{label:n.hasClass("edit-disabled")?r["default"]._t("Tree.EditPage","Edit page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"):r["default"]._t("Tree.ViewPage","View page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"),action:function c(n){t(".cms-container").entwine(".ss").loadPanel(r["default"].sprintf(e.data("urlEditpage"),n.data("id")))}}};n.hasClass("nochildren")||(i.showaslist={label:r["default"]._t("Tree.ShowAsList"),action:function u(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"),o=n.data("id"),s=n.find(">a .item").data("allowedchildren"),d={},l=!1;return t.each(s,function(n,i){l=!0,d["allowedchildren-"+n]={label:'<span class="jstree-pageicon"></span>'+i,_class:"class-"+n,action:function a(i){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(r["default"].sprintf(e.data("urlAddpage"),o,n),e.data("extraParams")))}}}),l&&(i.addsubpage={label:r["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:d}),n.hasClass("edit-disabled")||(i.duplicate={label:r["default"]._t("Tree.Duplicate"),submenu:[{label:r["default"]._t("Tree.ThisPageOnly"),action:function h(n){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(r["default"].sprintf(e.data("urlDuplicate"),n.data("id")),e.data("extraParams")))}},{label:r["default"]._t("Tree.ThisPageAndSubpages"),action:function f(n){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(r["default"].sprintf(e.data("urlDuplicatewithchildren"),n.data("id")),e.data("extraParams")))}}]}),i}},n}}),t(".cms-tree a.jstree-clicked").entwine({onmatch:function a(){var t=this,e=t.parents(".cms-panel-content"),n;(t.offset().top<0||t.offset().top>e.height()-t.height())&&(n=e.scrollTop()+t.offset().top+e.height()/2,e.animate({scrollTop:n},"slow"))}}),t(".cms-tree-filtered .clear-filter").entwine({onclick:function o(){window.location=location.protocol+"//"+location.host+location.pathname}}),t(".cms-tree-filtered").entwine({onmatch:function s(){var e=this,n=function i(){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))}})})},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(4),r=i(s);o["default"].entwine("ss",function(t){t("#Form_VersionsForm").entwine({onmatch:function e(){this._super()},onunmatch:function n(){this._super()},onsubmit:function i(e,n){e.preventDefault();var i,a=this;if(i=this.find(":input[name=ID]").val(),!i)return!1;var o,s,d,l,c,u,h;if(u=this.find(":input[name=CompareMode]").is(":checked"),d=this.find("table input[type=checkbox]").filter(":checked"),u){if(2!=d.length)return!1;l=d.eq(0).val(),c=d.eq(1).val(),o=this.find(":submit[name=action_doCompare]"),s=r["default"].sprintf(this.data("linkTmplCompare"),i,c,l)}else l=d.eq(0).val(),o=this.find(":submit[name=action_doShowVersion]"),s=r["default"].sprintf(this.data("linkTmplShow"),i,l);t(".cms-container").loadPanel(s,"",{pjax:"CurrentForm"})}}),t("#Form_VersionsForm input[name=ShowUnpublished]").entwine({onmatch:function a(){this.toggle(),this._super()},onunmatch:function o(){this._super()},onchange:function s(){this.toggle()},toggle:function d(){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 l(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(r["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 c(){this.removeClass("active"),this.find(":input[type=checkbox]").attr("checked",!1)},_select:function u(){this.addClass("active"),this.find(":input[type=checkbox]").attr("checked",!0)}})})},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("#Form_EditForm_RedirectionType input").entwine({onmatch:function e(){var e=t(this);e.attr("checked")&&this.toggle(),this._super()},onunmatch:function n(){this._super()},onclick:function i(){this.toggle()},toggle:function a(){"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";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=n(2),s=i(o);(0,s["default"])(document).ready(function(){(0,s["default"])("#switchView a.newWindow").on("click",function(t){var e=window.open(this.href,a(this.target));return e.focus(),!1}),(0,s["default"])("#SilverStripeNavigatorLink").on("click",function(t){return(0,s["default"])("#SilverStripeNavigatorLinkPopup").toggle(),!1}),(0,s["default"])("#SilverStripeNavigatorLinkPopup a.close").on("click",function(t){return(0,s["default"])("#SilverStripeNavigatorLinkPopup").hide(),!1}),(0,s["default"])("#SilverStripeNavigatorLinkPopup input").on("focus",function(t){this.select()})})},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(".field.urlsegment:not(.readonly)").entwine({MaxPreviewLength:55,Ellipsis:"...",onmatch:function e(){this.find(":text").length&&this.toggleEdit(!1),this.redraw(),this._super()},redraw:function n(){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 i(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 a(){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 o(){var t=this.find(":text");t.val(t.data("origval")),this.toggleEdit(!1)},suggest:function s(e,n){var i=this,a=i.find(":text"),o=t.path.parseUrl(i.closest("form").attr("action")),s=o.hrefNoSearch+"/field/"+a.attr("name")+"/suggest/?value="+encodeURIComponent(e);o.search&&(s+="&"+o.search.replace(/^\?/,"")),t.ajax({url:s,success:function r(t){n.apply(this,arguments)},error:function d(t,e){t.statusText=t.responseText},complete:function l(){i.removeClass("loading")}})}}),t(".field.urlsegment .edit").entwine({onclick:function r(t){t.preventDefault(),this.closest(".field").toggleEdit(!0)}}),t(".field.urlsegment .update").entwine({onclick:function d(t){t.preventDefault(),this.closest(".field").update()}}),t(".field.urlsegment .cancel").entwine({onclick:function l(t){t.preventDefault(),this.closest(".field").cancel()}})})},function(t,e){}]);
|
||||
//# sourceMappingURL=bundle-legacy.js.map
|
5
client/dist/styles/bundle.css
vendored
@ -1,3 +1,2 @@
|
||||
#cms-page-history-versions tr.loading{color:#999}#cms-page-history-versions tr.loading td:hover{cursor:none}#cms-page-history-versions td:hover{cursor:pointer}.CMSPageHistoryController ins{background-color:#DFD;padding:2px;text-decoration:none}.CMSPageHistoryController del{background-color:#FDD;padding:2px;color:#f44}#cms-content-treeview .cms-tree-expand-trigger,#cms-content-listview .cms-tree-expand-trigger{display:none}.cms-content-tools #cms-content-treeview .cms-content-toolbar{border-bottom:none;box-shadow:none;margin-bottom:0}.cms-content-tools #cms-content-treeview .cms-tree-expand-trigger{display:block;float:left;margin:0 0 2px 0}.cms-content-tools #cms-content-treeview .cms-tree-expand-trigger span.ui-button-text{padding-right:8px}.cms-content-tools #cms-content-treeview .cms-tree .badge{display:none}.cms-content-tools #cms-content-treeview .cms-tree a:hover>.text>.badge,.cms-content-tools #cms-content-treeview .cms-tree .jstree-clicked>.text>.badge{display:inline-block}.field.urlsegment.loading{background:url(../images/loading.gif) no-repeat 162px 8px}.field.urlsegment .preview{padding-top:8px;display:inline-block}.field.urlsegment input.text{width:250px;float:left}.field.urlsegment input.text,.field.urlsegment .cancel,.field.urlsegment .update,.field.urlsegment .edit{margin-right:8px}.field.urlsegment .help{margin-left:0}.field.urlsegment .edit-holder{display:none}.field.urlsegment .edit-holder .form__field-description{clear:both}#Form_EditForm #Title .update{margin-left:7px}
|
||||
|
||||
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLm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TSxBQUFBLFdBQVcsQ0F3QmhCLFlBQVksQUFBQyxDQUNaLE9BQU8sQ0FBRSxJQUFLLENBS2QsQUE5QkYsTUFBTSxBQUFBLFdBQVcsQ0F3QmhCLFlBQVksQ0FHVCx3QkFBd0IsQUFBQyxDQUN2QixLQUFLLENBQUUsSUFBSyxDQUNiLEFBSUwsY0FBYyxDQUFDLE1BQU0sQ0FBQyxPQUFPLEFBQUMsQ0FDN0IsV0FBVyxDQUFFLEdBQUksQ0FDakIiLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9 */
|
||||
#cms-page-history-versions tr.loading{color:#999}#cms-page-history-versions tr.loading td:hover{cursor:none}#cms-page-history-versions td:hover{cursor:pointer}.CMSPageHistoryController ins{background-color:#dfd;padding:2px;text-decoration:none}.CMSPageHistoryController del{background-color:#fdd;padding:2px;color:#f44}#cms-content-listview .cms-tree-expand-trigger,#cms-content-treeview .cms-tree-expand-trigger{display:none}.cms-content-tools #cms-content-treeview .cms-content-toolbar{border-bottom:none;box-shadow:none;margin-bottom:0}.cms-content-tools #cms-content-treeview .cms-tree-expand-trigger{display:block;float:left;margin:0 0 2px}.cms-content-tools #cms-content-treeview .cms-tree-expand-trigger span.ui-button-text{padding-right:8px}.cms-content-tools #cms-content-treeview .cms-tree .badge{display:none}.cms-content-tools #cms-content-treeview .cms-tree .jstree-clicked>.text>.badge,.cms-content-tools #cms-content-treeview .cms-tree a:hover>.text>.badge{display:inline-block}.field.urlsegment.loading{background:url(../images/loading.gif) no-repeat 162px 8px}.field.urlsegment .preview{padding-top:8px;display:inline-block}.field.urlsegment input.text{width:250px;float:left}.field.urlsegment .cancel,.field.urlsegment .edit,.field.urlsegment .update,.field.urlsegment input.text{margin-right:8px}.field.urlsegment .help{margin-left:0}.field.urlsegment .edit-holder{display:none}.field.urlsegment .edit-holder .form__field-description{clear:both}#Form_EditForm #Title .update{margin-left:7px}
|
||||
/*# sourceMappingURL=bundle.css.map*/
|
@ -6,3 +6,5 @@ require('../legacy/CMSPageHistoryController.js');
|
||||
require('../legacy/RedirectorPage.js');
|
||||
require('../legacy/SilverStripeNavigator.js');
|
||||
require('../legacy/SiteTreeURLSegmentField.js');
|
||||
|
||||
require('../styles/bundle.scss');
|
||||
|
BIN
client/src/images/blue-folder-horizontal.png
Executable file
After Width: | Height: | Size: 375 B |
BIN
client/src/images/loading.gif
Normal file
After Width: | Height: | Size: 847 B |
@ -96,7 +96,7 @@
|
||||
.field.urlsegment {
|
||||
|
||||
&.loading {
|
||||
background: url(../images/loading.gif) no-repeat 162px 8px;
|
||||
background: url(../../images/loading.gif) no-repeat 162px 8px;
|
||||
}
|
||||
|
||||
.preview {
|
||||
|
@ -310,7 +310,7 @@ class ContentController extends Controller {
|
||||
if(Director::isDev() || Permission::check('CMS_ACCESS_CMSMain') || Permission::check('VIEW_DRAFT_CONTENT')) {
|
||||
if($this->dataRecord) {
|
||||
Requirements::css(CMS_DIR . '/client/dist/styles/SilverStripeNavigator.css');
|
||||
Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
|
||||
Requirements::javascript(ADMIN_THIRDPARTY_DIR . '/jquery/jquery.js');
|
||||
Requirements::javascript(CMS_DIR . '/client/dist/js/SilverStripeNavigator.js');
|
||||
|
||||
$return = $nav = SilverStripeNavigator::get_for_record($this->dataRecord);
|
||||
|
@ -79,7 +79,7 @@ in the other stage:<br />
|
||||
}
|
||||
|
||||
public function index() {
|
||||
Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
|
||||
Requirements::javascript('http://code.jquery.com/jquery-1.7.2.min.js');
|
||||
Requirements::customCSS('#OrphanIDs .middleColumn {width: auto;}');
|
||||
Requirements::customCSS('#OrphanIDs label {display: inline;}');
|
||||
|
||||
|
135
gulpfile.js
@ -1,135 +0,0 @@
|
||||
const gulp = require('gulp');
|
||||
const babel = require('gulp-babel');
|
||||
const notify = require('gulp-notify');
|
||||
const sass = require('gulp-sass');
|
||||
const sourcemaps = require('gulp-sourcemaps');
|
||||
const uglify = require('gulp-uglify');
|
||||
const gulpUtil = require('gulp-util');
|
||||
const browserify = require('browserify');
|
||||
const babelify = require('babelify');
|
||||
const watchify = require('watchify');
|
||||
const source = require('vinyl-source-stream');
|
||||
const buffer = require('vinyl-buffer');
|
||||
const path = require('path');
|
||||
const glob = require('glob');
|
||||
const eventStream = require('event-stream');
|
||||
const semver = require('semver');
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
const isDev = typeof process.env.npm_config_development !== 'undefined';
|
||||
process.env.NODE_ENV = isDev ? 'development' : 'production';
|
||||
|
||||
const PATHS = {
|
||||
MODULES: './node_modules',
|
||||
CMS_JS_SRC: './client/src',
|
||||
CMS_JS_DIST: './client/dist/js',
|
||||
CMS_CSS_SRC: './client/src/styles',
|
||||
CMS_CSS_DIST: './client/dist/styles',
|
||||
};
|
||||
|
||||
const babelifyOptions = {
|
||||
presets: ['es2015', 'es2015-ie', 'react'],
|
||||
plugins: ['transform-object-assign'],
|
||||
ignore: /(node_modules|thirdparty)/,
|
||||
comments: false,
|
||||
};
|
||||
|
||||
const browserifyOptions = {};
|
||||
if (isDev) {
|
||||
browserifyOptions.debug = true;
|
||||
browserifyOptions.cache = {};
|
||||
browserifyOptions.packageCache = {};
|
||||
browserifyOptions.plugin = [watchify];
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms the passed JavaScript files to UMD modules.
|
||||
*
|
||||
* @param array files - The files to transform.
|
||||
* @param string dest - The output directory.
|
||||
* @return object
|
||||
*/
|
||||
function transformToUmd(files, dest) {
|
||||
return eventStream.merge(files.map((file) => { // eslint-disable-line arrow-body-style
|
||||
return gulp.src(file)
|
||||
.pipe(babel({
|
||||
presets: ['es2015'],
|
||||
moduleId: `ss.${path.parse(file).name}`,
|
||||
plugins: ['transform-es2015-modules-umd'],
|
||||
comments: false,
|
||||
}))
|
||||
.on('error', notify.onError({
|
||||
message: 'Error: <%= error.message %>',
|
||||
}))
|
||||
.pipe(gulp.dest(dest));
|
||||
}));
|
||||
}
|
||||
|
||||
// Make sure the version of Node being used is valid.
|
||||
if (!semver.satisfies(process.versions.node, packageJson.engines.node)) {
|
||||
console.error( // eslint-disable-line no-console
|
||||
`Invalid Node.js version. You need to be using ${packageJson.engines.node}` +
|
||||
'. If you want to manage multiple Node.js versions try https://github.com/creationix/nvm'
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
gulp.task('build', ['umd-cms', 'umd-watch', 'bundle-legacy']);
|
||||
|
||||
gulp.task('bundle-legacy', function bundleLeftAndMain() {
|
||||
const bundleFileName = 'bundle-legacy.js';
|
||||
|
||||
return browserify(Object.assign(
|
||||
{},
|
||||
browserifyOptions,
|
||||
{ entries: `${PATHS.CMS_JS_SRC}/bundles/legacy.js` })
|
||||
)
|
||||
.on('update', bundleLeftAndMain)
|
||||
.on('log', (msg) => gulpUtil.log('Finished', `bundled ${bundleFileName} ${msg}`))
|
||||
.transform(babelify, babelifyOptions)
|
||||
.external('jQuery')
|
||||
.external('i18n')
|
||||
.external('lib/Router')
|
||||
.bundle()
|
||||
.on('error', notify.onError({ message: `${bundleFileName}: <%= error.message %>` }))
|
||||
.pipe(source(bundleFileName))
|
||||
.pipe(buffer())
|
||||
.pipe(sourcemaps.init({ loadMaps: true }))
|
||||
.pipe(uglify())
|
||||
.pipe(sourcemaps.write('./'))
|
||||
.pipe(gulp.dest(PATHS.CMS_JS_DIST));
|
||||
});
|
||||
|
||||
gulp.task('umd-cms', () => { // eslint-disable-line
|
||||
return transformToUmd(glob.sync(
|
||||
`${PATHS.CMS_JS_SRC}/**/*.js`,
|
||||
{ ignore: `${PATHS.CMS_JS_SRC}/bundles/*` }
|
||||
), PATHS.CMS_JS_DIST);
|
||||
});
|
||||
|
||||
gulp.task('umd-watch', () => { // eslint-disable-line
|
||||
if (isDev) {
|
||||
gulp.watch(`${PATHS.CMS_JS_SRC}/**/*.js`, ['umd-cms']);
|
||||
}
|
||||
});
|
||||
|
||||
gulp.task('css', ['compile:css'], () => { // eslint-disable-line
|
||||
if (isDev) {
|
||||
gulp.watch(`${PATHS.CMS_CSS_SRC}/**/*.scss`, ['compile:css']);
|
||||
gulp.watch(`${PATHS.CMS_JS_SRC}/**/*.scss`, ['compile:css']);
|
||||
}
|
||||
});
|
||||
|
||||
gulp.task('compile:css', () => { // eslint-disable-line
|
||||
const outputStyle = isDev ? 'expanded' : 'compressed';
|
||||
|
||||
return gulp.src(`${PATHS.CMS_CSS_SRC}/**/*.scss`)
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(sass({ outputStyle })
|
||||
.on('error', notify.onError({
|
||||
message: 'Error: <%= error.message %>',
|
||||
}))
|
||||
)
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest(PATHS.CMS_CSS_DIST));
|
||||
});
|
31
package.json
@ -9,8 +9,8 @@
|
||||
"node": "4.x"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "gulp build",
|
||||
"css": "gulp css",
|
||||
"build": "webpack",
|
||||
"watch": "webpack -w",
|
||||
"lock": "npm-shrinkwrap --dev",
|
||||
"lint": "eslint javascript"
|
||||
},
|
||||
@ -29,32 +29,27 @@
|
||||
},
|
||||
"homepage": "https://github.com/silverstripe/silverstripe-cms#readme",
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^6.4.0",
|
||||
"babel-core": "^6.7.4",
|
||||
"babel-loader": "^6.2.5",
|
||||
"babel-plugin-transform-es2015-modules-umd": "^6.6.5",
|
||||
"babel-plugin-transform-object-assign": "^6.5.0",
|
||||
"babel-preset-es2015": "^6.6.0",
|
||||
"babel-preset-es2015-ie": "^6.6.1",
|
||||
"babel-preset-react": "^6.5.0",
|
||||
"babelify": "^7.2.0",
|
||||
"browserify": "^13.0.0",
|
||||
"css-loader": "^0.23.1",
|
||||
"eslint": "^2.7.0",
|
||||
"eslint-config-airbnb": "^6.2.0",
|
||||
"eslint-plugin-react": "^4.3.0",
|
||||
"event-stream": "^3.3.2",
|
||||
"extract-text-webpack-plugin": "^1.0.1",
|
||||
"file-loader": "^0.9.0",
|
||||
"glob": "^6.0.4",
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-babel": "^6.1.1",
|
||||
"gulp-diff": "^1.0.0",
|
||||
"gulp-if": "^2.0.0",
|
||||
"gulp-notify": "^2.2.0",
|
||||
"gulp-sass": "^2.2.0",
|
||||
"gulp-sourcemaps": "^1.6.0",
|
||||
"gulp-uglify": "^1.5.1",
|
||||
"gulp-util": "^3.0.7",
|
||||
"node-sass": "^3.8.0",
|
||||
"npm-shrinkwrap": "https://registry.npmjs.org/npm-shrinkwrap/-/npm-shrinkwrap-5.4.1.tgz",
|
||||
"postcss-loader": "^0.10.1",
|
||||
"resolve-url-loader": "^1.6.0",
|
||||
"sass-loader": "^4.0.0",
|
||||
"semver": "^5.1.0",
|
||||
"vinyl-buffer": "^1.0.0",
|
||||
"vinyl-source-stream": "^1.1.0",
|
||||
"watchify": "^3.7.0"
|
||||
"url-loader": "^0.5.7",
|
||||
"webpack": "^1.13.2"
|
||||
}
|
||||
}
|
||||
|
104
webpack.config.js
Normal file
@ -0,0 +1,104 @@
|
||||
const webpack = require('webpack');
|
||||
const autoprefixer = require('autoprefixer');
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
|
||||
const PATHS = {
|
||||
MODULES: './node_modules',
|
||||
CMS_JS_SRC: './client/src',
|
||||
CMS_JS_DIST: './client/dist/js',
|
||||
CMS_CSS_SRC: './client/src/styles',
|
||||
CMS_CSS_DIST: './client/dist/styles',
|
||||
};
|
||||
|
||||
// Used for autoprefixing css properties (same as Bootstrap Aplha.2 defaults)
|
||||
const SUPPORTED_BROWSERS = [
|
||||
'Chrome >= 35',
|
||||
'Firefox >= 31',
|
||||
'Edge >= 12',
|
||||
'Explorer >= 9',
|
||||
'iOS >= 8',
|
||||
'Safari >= 8',
|
||||
'Android 2.3',
|
||||
'Android >= 4',
|
||||
'Opera >= 12',
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
'bundle-legacy': `${PATHS.CMS_JS_SRC}/bundles/legacy.js`,
|
||||
// SilverStripeNavigator: `${PATHS.CMS_CSS_SRC}/SilverStripeNavigator.scss`,
|
||||
},
|
||||
resolve: {
|
||||
modulesDirectories: [PATHS.CMS_JS_SRC, PATHS.MODULES],
|
||||
},
|
||||
output: {
|
||||
path: './client/dist',
|
||||
filename: 'js/[name].js',
|
||||
},
|
||||
externals: {
|
||||
i18n: 'i18n',
|
||||
jQuery: 'jQuery',
|
||||
'lib/Router': 'Router',
|
||||
},
|
||||
devtool: 'source-map',
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /(node_modules|thirdparty)/,
|
||||
loader: 'babel',
|
||||
query: {
|
||||
presets: ['es2015', 'react'],
|
||||
plugins: ['transform-object-assign'/* , 'transform-object-rest-spread' */],
|
||||
comments: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
loader: ExtractTextPlugin.extract([
|
||||
'css?sourceMap&minimize',
|
||||
'postcss?sourceMap',
|
||||
'resolve-url',
|
||||
'sass?sourceMap',
|
||||
], {
|
||||
publicPath: '../', // needed because bundle.css is in a subfolder
|
||||
}),
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
loader: ExtractTextPlugin.extract([
|
||||
'css?sourceMap&minimize',
|
||||
'postcss?sourceMap',
|
||||
'resolve-url',
|
||||
], {
|
||||
publicPath: '../', // needed because bundle.css is in a subfolder
|
||||
}),
|
||||
},
|
||||
{
|
||||
test: /\.(png|gif|jpg|svg)$/,
|
||||
loader: 'file?name=images/[name].[ext]',
|
||||
},
|
||||
{
|
||||
test: /\.(woff|eot|ttf)$/,
|
||||
loader: 'file?name=fonts/[name].[ext]',
|
||||
},
|
||||
],
|
||||
},
|
||||
postcss: [
|
||||
autoprefixer({ browsers: SUPPORTED_BROWSERS }),
|
||||
],
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
$: 'jquery',
|
||||
jQuery: 'jquery',
|
||||
'ss.i18n': 'i18n',
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
unused: false,
|
||||
warnings: false,
|
||||
},
|
||||
}),
|
||||
new ExtractTextPlugin('styles/bundle.css', { allChunks: true }),
|
||||
],
|
||||
};
|