silverstripe-contentreview/client/dist/js/contentreview.js
2019-11-05 17:46:14 +13:00

1 line
3.9 KiB
JavaScript

!function(e){function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var t={};n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s="./client/src/bundles/bundle.js")}({"./client/src/bundles/ContentReviewForm.js":function(e,n,t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=t(4),r=o(i),s=t(0),u=o(s),c=t(2),l=o(c),a=t(3),d=o(a),f=t(1),_=(0,f.loadComponent)("FormBuilderModal");u.default.entwine("ss",function(e){e(".cms-content-actions .content-review__button").entwine({onclick:function(n){n.preventDefault();var t=e("#content-review__dialog-wrapper");return t.length||(t=e('<div id="content-review__dialog-wrapper" />'),e("body").append(t)),t.open(),!1}}),e(".content-review-modal .content-review-modal__nav-link").entwine({onclick:function(n){n.preventDefault();var t=e(n.target);window.location=t.attr("href")}}),e("#content-review__dialog-wrapper").entwine({onunmatch:function(){this._clearModal()},open:function(){this._renderModal(!0)},close:function(){this._renderModal(!1)},_renderModal:function(n){var t=this,o=function(){return t.close()},i=function(){return t._handleSubmitModal.apply(t,arguments)},s=e("form.cms-edit-form :input[name=ID]").val(),u=window.ss.store,c=u.getState().config.sections.find(function(e){return"SilverStripe\\CMS\\Controllers\\CMSPageEditController"===e.name}),a=c.form.ReviewContentForm.schemaUrl+"/"+s,f=r.default._t("ContentReview.CONTENT_DUE_FOR_REVIEW","Content due for review");d.default.render(l.default.createElement(_,{title:f,isOpen:n,onSubmit:i,onClosed:o,schemaUrl:a,bodyClassName:"modal__dialog",className:"content-review-modal",responseClassBad:"modal__response modal__response--error",responseClassGood:"modal__response modal__response--good",identifier:"ContentReview.CONTENT_DUE_FOR_REVIEW"}),this[0])},_clearModal:function(){d.default.unmountComponentAtNode(this[0])},_handleSubmitModal:function(n,t,o){return e(".content-review__button-holder").remove(),o()}})})},"./client/src/bundles/ContentReviewSettings.js":function(e,n,t){"use strict";var o=t(0);(function(e){return e&&e.__esModule?e:{default:e}})(o).default.entwine("ss",function(e){e(".cms-edit-form #Form_EditForm_ContentReviewType_Holder").entwine({onmatch:function(){var e=this;this.find(".optionset :input").bind("change",function(n){e.show_option(n.target.value)});var n=this.find("input[name=ContentReviewType]:checked").val();this.show_option(n),this._super()},onunmatch:function(){return this._super()},show_option:function(e){"Custom"===e?this._custom():"Inherit"===e?this._inherited():this._disabled()},_custom:function(){e(".review-settings").show(),e(".field.custom-setting").show()},_inherited:function(){e(".review-settings").show(),e(".field.custom-setting").hide()},_disabled:function(){e(".review-settings").hide()}})})},"./client/src/bundles/PagesDueForReview.js":function(e,n,t){"use strict";var o=t(0);(function(e){return e&&e.__esModule?e:{default:e}})(o).default.entwine("ss",function(e){function n(n){var t="ContentReviewOwnerID"+n,o=e("div.subsiteSpecificOwnerID"),i=0;for(i=0;i<o.length;i++)o[i].id===t?e(o[i]).show():e(o[i]).hide()}e("#Form_EditForm_SubsiteIDWithOwner").entwine({onmatch:function(){n(this.value)},change:function(){n(this.value)}})})},"./client/src/bundles/bundle.js":function(e,n,t){"use strict";t("./client/src/bundles/ContentReviewForm.js"),t("./client/src/bundles/ContentReviewSettings.js"),t("./client/src/bundles/PagesDueForReview.js")},0:function(e,n){e.exports=jQuery},1:function(e,n){e.exports=Injector},2:function(e,n){e.exports=React},3:function(e,n){e.exports=ReactDom},4:function(e,n){e.exports=i18n}});