diff --git a/admin/client/dist/AssetUploadField.css b/admin/client/dist/AssetUploadField.css deleted file mode 100644 index 86a4d2417..000000000 --- a/admin/client/dist/AssetUploadField.css +++ /dev/null @@ -1,50 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports) { - - // removed by extract-text-webpack-plugin - -/***/ } -/******/ ]); \ No newline at end of file diff --git a/admin/client/dist/GridField_print.css b/admin/client/dist/GridField_print.css deleted file mode 100644 index 86a4d2417..000000000 --- a/admin/client/dist/GridField_print.css +++ /dev/null @@ -1,50 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports) { - - // removed by extract-text-webpack-plugin - -/***/ } -/******/ ]); \ No newline at end of file diff --git a/admin/client/dist/UploadField.css b/admin/client/dist/UploadField.css deleted file mode 100644 index 86a4d2417..000000000 --- a/admin/client/dist/UploadField.css +++ /dev/null @@ -1,50 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports) { - - // removed by extract-text-webpack-plugin - -/***/ } -/******/ ]); \ No newline at end of file diff --git a/admin/client/dist/bundle.css b/admin/client/dist/bundle.css deleted file mode 100644 index 86a4d2417..000000000 --- a/admin/client/dist/bundle.css +++ /dev/null @@ -1,50 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports) { - - // removed by extract-text-webpack-plugin - -/***/ } -/******/ ]); \ No newline at end of file diff --git a/admin/client/dist/editor.css b/admin/client/dist/editor.css deleted file mode 100644 index 86a4d2417..000000000 --- a/admin/client/dist/editor.css +++ /dev/null @@ -1,50 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports) { - - // removed by extract-text-webpack-plugin - -/***/ } -/******/ ]); \ No newline at end of file diff --git a/admin/client/dist/js/bundle.js b/admin/client/dist/js/bundle.js index ed9eb1f10..ee97d2946 100644 --- a/admin/client/dist/js/bundle.js +++ b/admin/client/dist/js/bundle.js @@ -59,64 +59,69 @@ return this.fetch(e,{method:"put",credentials:"same-origin",body:s(t),headers:n} return this.fetch(e,{method:"delete",credentials:"same-origin",body:s(t),headers:n}).then(a)}}]),e}(),O=new P t["default"]=O},function(e,t,n){n(8),e.exports=self.fetch.bind(self)},function(e,t){!function(e){"use strict" function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name") -return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function i(e){this.map={},e instanceof i?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){ -this.append(t,e[t])},this)}function r(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function o(e){return new Promise(function(t,n){e.onload=function(){t(e.result) +return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function i(e){var t={next:function(){var t=e.shift() +return{done:void 0===t,value:t}}} +return m.iterable&&(t[Symbol.iterator]=function(){return t}),t}function r(e){this.map={},e instanceof r?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){ +this.append(t,e[t])},this)}function o(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function a(e){return new Promise(function(t,n){e.onload=function(){t(e.result) -},e.onerror=function(){n(e.error)}})}function a(e){var t=new FileReader -return t.readAsArrayBuffer(e),o(t)}function s(e){var t=new FileReader -return t.readAsText(e),o(t)}function l(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e -else if(h.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e -else if(h.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e -else if(e){if(!h.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="" -this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type&&this.headers.set("content-type",this._bodyBlob.type)) +},e.onerror=function(){n(e.error)}})}function s(e){var t=new FileReader +return t.readAsArrayBuffer(e),a(t)}function l(e){var t=new FileReader +return t.readAsText(e),a(t)}function u(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e +else if(m.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e +else if(m.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e +else if(m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString() +else if(e){if(!m.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="" +this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8")) -},h.blob?(this.blob=function(){var e=r(this) +},m.blob?(this.blob=function(){var e=o(this) if(e)return e if(this._bodyBlob)return Promise.resolve(this._bodyBlob) if(this._bodyFormData)throw new Error("could not read FormData body as blob") -return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=r(this) +return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(s)},this.text=function(){var e=o(this) if(e)return e -if(this._bodyBlob)return s(this._bodyBlob) +if(this._bodyBlob)return l(this._bodyBlob) if(this._bodyFormData)throw new Error("could not read FormData body as text") -return Promise.resolve(this._bodyText)}):this.text=function(){var e=r(this) -return e?e:Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function u(e){var t=e.toUpperCase() +return Promise.resolve(this._bodyText)}):this.text=function(){var e=o(this) +return e?e:Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e){var t=e.toUpperCase() -return m.indexOf(t)>-1?t:e}function c(e,t){t=t||{} +return g.indexOf(t)>-1?t:e}function d(e,t){t=t||{} var n=t.body -if(c.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read") -this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e -if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=u(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null, +if(d.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read") +this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new r(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e +if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new r(t.headers)),this.method=c(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null, ("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests") -this._initBody(n)}function d(e){var t=new FormData +this._initBody(n)}function f(e){var t=new FormData return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ") -t.append(decodeURIComponent(i),decodeURIComponent(r))}}),t}function f(e){var t=new i,n=e.getAllResponseHeaders().trim().split("\n") +t.append(decodeURIComponent(i),decodeURIComponent(r))}}),t}function p(e){var t=new r,n=(e.getAllResponseHeaders()||"").trim().split("\n") return n.forEach(function(e){var n=e.trim().split(":"),i=n.shift().trim(),r=n.join(":").trim() -t.append(i,r)}),t}function p(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof i?t.headers:new i(t.headers), -this.url=t.url||"",this._initBody(e)}if(!e.fetch){i.prototype.append=function(e,i){e=t(e),i=n(i) +t.append(i,r)}),t}function h(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof r?t.headers:new r(t.headers), +this.url=t.url||"",this._initBody(e)}if(!e.fetch){var m={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob, +!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e} +r.prototype.append=function(e,i){e=t(e),i=n(i) var r=this.map[e] -r||(r=[],this.map[e]=r),r.push(i)},i.prototype["delete"]=function(e){delete this.map[t(e)]},i.prototype.get=function(e){var n=this.map[t(e)] -return n?n[0]:null},i.prototype.getAll=function(e){return this.map[t(e)]||[]},i.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},i.prototype.set=function(e,i){this.map[t(e)]=[n(i)]},i.prototype.forEach=function(e,t){ -Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(i){e.call(t,i,n,this)},this)},this)} -var h={blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e},m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"] - - -c.prototype.clone=function(){return new c(this)},l.call(c.prototype),l.call(p.prototype),p.prototype.clone=function(){return new p(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers), -url:this.url})},p.error=function(){var e=new p(null,{status:0,statusText:""}) +r||(r=[],this.map[e]=r),r.push(i)},r.prototype["delete"]=function(e){delete this.map[t(e)]},r.prototype.get=function(e){var n=this.map[t(e)] +return n?n[0]:null},r.prototype.getAll=function(e){return this.map[t(e)]||[]},r.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},r.prototype.set=function(e,i){this.map[t(e)]=[n(i)]},r.prototype.forEach=function(e,t){ +Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(i){e.call(t,i,n,this)},this)},this)},r.prototype.keys=function(){var e=[] +return this.forEach(function(t,n){e.push(n)}),i(e)},r.prototype.values=function(){var e=[] +return this.forEach(function(t){e.push(t)}),i(e)},r.prototype.entries=function(){var e=[] +return this.forEach(function(t,n){e.push([n,t])}),i(e)},m.iterable&&(r.prototype[Symbol.iterator]=r.prototype.entries) +var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"] +d.prototype.clone=function(){return new d(this)},u.call(d.prototype),u.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers), +url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""}) return e.type="error",e} -var g=[301,302,303,307,308] -p.redirect=function(e,t){if(g.indexOf(t)===-1)throw new RangeError("Invalid status code") -return new p(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=c,e.Response=p,e.fetch=function(e,t){return new Promise(function(n,i){function r(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0 +var v=[301,302,303,307,308] +h.redirect=function(e,t){if(v.indexOf(t)===-1)throw new RangeError("Invalid status code") +return new h(null,{status:t,headers:{location:e}})},e.Headers=r,e.Request=d,e.Response=h,e.fetch=function(e,t){return new Promise(function(n,i){function r(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0 }var o -o=c.prototype.isPrototypeOf(e)&&!t?e:new c(e,t) +o=d.prototype.isPrototypeOf(e)&&!t?e:new d(e,t) var a=new XMLHttpRequest -a.onload=function(){var e=1223===a.status?204:a.status -if(e<100||e>599)return void i(new TypeError("Network request failed")) -var t={status:e,statusText:a.statusText,headers:f(a),url:r()},o="response"in a?a.response:a.responseText -n(new p(o,t))},a.onerror=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&h.blob&&(a.responseType="blob"), -o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(e,t,n){var i;(function(t,r){ -!function(t,n){e.exports=n()}(this,function(){"use strict" +a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:p(a),url:r()},t="response"in a?a.response:a.responseText +n(new h(t,e))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0), +"responseType"in a&&m.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this) + +},function(e,t,n){var i;(function(t,r){!function(t,n){e.exports=n()}(this,function(){"use strict" function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function o(e){return"function"==typeof e}function a(e){K=e}function s(e){Y=e}function l(){return function(){return t.nextTick(p)}} function u(){return function(){Q(p)}}function c(){var e=0,t=new ee(p),n=document.createTextNode("") return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function d(){var e=new MessageChannel @@ -127,7 +132,7 @@ return Q=t.runOnLoop||t.runOnContext,u()}catch(r){return f()}}function m(e,t){va void 0===r[oe]&&M(r) var o=i._state return o?!function(){var e=n[o-1] -Y(function(){return I(o,r,e,i._result)})}():j(i,r,e,t),r}function g(e){var t=this +Y(function(){return A(o,r,e,i._result)})}():j(i,r,e,t),r}function g(e){var t=this if(e&&"object"==typeof e&&e.constructor===t)return e var n=new t(v) return P(n,e),n}function v(){}function y(){return new TypeError("You cannot resolve a promise with itself")}function b(){return new TypeError("A promises callback cannot return that same promise.")}function w(e){ @@ -138,9 +143,9 @@ i||(i=!0,S(e,t))},"Settle: "+(e._label||" unknown promise")) }function P(t,n){t===n?S(t,y()):e(n)?E(t,n,w(n)):k(t,n)}function O(e){e._onerror&&e._onerror(e._result),x(e)}function k(e,t){e._state===ae&&(e._result=t,e._state=se,0!==e._subscribers.length&&Y(x,e))}function S(e,t){ e._state===ae&&(e._state=le,e._result=t,Y(O,e))}function j(e,t,n,i){var r=e._subscribers,o=r.length e._onerror=null,r[o]=t,r[o+se]=n,r[o+le]=i,0===o&&e._state&&Y(x,e)}function x(e){var t=e._subscribers,n=e._state -if(0!==t.length){for(var i=void 0,r=void 0,o=e._result,a=0;a127?"x":F[M] -if(!D.match(b)){var U=A.slice(0,k),L=A.slice(k+1),B=F.match(w) +if(!D.match(b)){var U=I.slice(0,k),L=I.slice(k+1),B=F.match(w) B&&(U.push(B[1]),L.unshift(B[2])),L.length&&(s="/"+L.join(".")+s),this.hostname=U.join(".") break}}}this.hostname.length>y?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=l.toASCII(this.hostname)) var H=this.port?":"+this.port:"",$=this.hostname||"" -this.host=$+H,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!_[h])for(var k=0,I=m.length;k1&&(i=n[0]+"@",e=n[1]),e=e.replace(I,".") +n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(A,".") var r=e.split("."),o=s(r,t).join(".") return i+o}function u(e){for(var t=[],n=0,i=e.length,r,o;n=55296&&r<=56319&&nC-o&&a("overflow"),o+=M(r/i),r%=i,t.splice(r for(e=u(e),v=e.length,t=j,n=0,o=S,s=0;s=t&&mM((C-n)/y)&&a("overflow"),n+=(l-t)*y,t=l,s=0;sC&&a("overflow"),m==t){for(c=n,d=T;h=d<=o?E:d>=o+P?P:d-o,!(c= 0x80 (not a basic code point)", +var _,C=2147483647,T=36,E=1,P=26,O=38,k=700,S=72,j=128,x="-",R=/^xn--/,I=/[^\x20-\x7E]/,A=/[\x2E\u3002\uFF0E\uFF61]/g,F={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)", "invalid-input":"Invalid input"},D=T-E,M=Math.floor,N=String.fromCharCode,U _={version:"1.3.2",ucs2:{decode:u,encode:c},decode:h,encode:m,toASCII:v,toUnicode:g},i=function(){return _}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))}(this)}).call(t,n(17)(e),function(){return this}()) @@ -1094,7 +1102,7 @@ t.length&&t.remove(),n=$.path.addSearchParams(n,{tempid:e,BackURL:window.locatio }}),$(".leftandmain-logindialog").entwine({onmatch:function j(){this._super(),this.ssdialog({iframeUrl:this.data("url"),dialogClass:"leftandmain-logindialog-dialog",autoOpen:!0,minWidth:500,maxWidth:500, minHeight:370,maxHeight:400,closeOnEscape:!1,open:function e(){$(".ui-widget-overlay").addClass("leftandmain-logindialog-overlay")},close:function t(){$(".ui-widget-overlay").removeClass("leftandmain-logindialog-overlay") -}})},onunmatch:function x(){this._super()},open:function R(){this.ssdialog("open")},close:function A(){this.ssdialog("close")},toggle:function I(e){this.is(":visible")?this.close():this.open()},reauthenticate:function F(e){ +}})},onunmatch:function x(){this._super()},open:function R(){this.ssdialog("open")},close:function I(){this.ssdialog("close")},toggle:function A(e){this.is(":visible")?this.close():this.open()},reauthenticate:function F(e){ "undefined"!=typeof e.SecurityID&&$(":input[name=SecurityID]").val(e.SecurityID),"undefined"!=typeof e.TempID&&$("body").data("member-tempid",e.TempID),this.close()}}),$("form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading").entwine({ onmatch:function D(){this.append('
'),this._super()},onunmatch:function M(){this.find(".cms-content-loading-overlay,.cms-content-loading-spinner").remove(), this._super()}}),$('.cms input[type="submit"], .cms button, .cms input[type="reset"], .cms .ss-ui-button').entwine({onadd:function N(){this.addClass("ss-ui-button"),this.data("button")||this.button(),this._super() @@ -1355,9 +1363,9 @@ var o=i.find("li") o.length?o.first().find("a").click():document.location.href=r,i.select()}}}),e(".cms-menu-list li .toggle-children").entwine({onclick:function S(e){var t=this.closest("li") return t.toggle(),!1}}),e(".cms .profile-link").entwine({onclick:function j(){return e(".cms-container").loadPanel(this.attr("href")),e(".cms-menu-list li").removeClass("current").close(),!1}}),e(".cms-menu .sticky-toggle").entwine({ onadd:function x(){var t=!!e(".cms-menu").getPersistedStickyState() -this.toggleCSS(t),this.toggleIndicator(t),this._super()},toggleCSS:function R(e){this[e?"addClass":"removeClass"]("active")},toggleIndicator:function A(e){this.next(".sticky-status-indicator").text(e?"fixed":"auto") +this.toggleCSS(t),this.toggleIndicator(t),this._super()},toggleCSS:function R(e){this[e?"addClass":"removeClass"]("active")},toggleIndicator:function I(e){this.next(".sticky-status-indicator").text(e?"fixed":"auto") -},onclick:function I(){var e=this.closest(".cms-menu"),t=e.getPersistedCollapsedState(),n=e.getPersistedStickyState(),i=void 0===n?!this.hasClass("active"):!n +},onclick:function A(){var e=this.closest(".cms-menu"),t=e.getPersistedCollapsedState(),n=e.getPersistedStickyState(),i=void 0===n?!this.hasClass("active"):!n void 0===t?e.setPersistedCollapsedState(e.hasClass("collapsed")):void 0!==t&&i===!1&&e.clearPersistedCollapsedState(),e.setPersistedStickyState(i),this.toggleCSS(i),this.toggleIndicator(i),this._super() }})})},function(e,t,n){"use strict" @@ -1425,9 +1433,9 @@ changeVisibleState:function j(e){this.find('[data-name="'+e+'"]').addClass("acti var n=e(this).attr("data-name") this.addClass("active").siblings().removeClass("active"),e(".cms-preview").changeState(n),t.preventDefault()}}}),e(".preview-mode-selector").entwine({changeVisibleMode:function R(e){this.find("select").val(e).trigger("chosen:updated")._addIcon() -}}),e(".preview-mode-selector select").entwine({onchange:function A(t){this._super(t),t.preventDefault() +}}),e(".preview-mode-selector select").entwine({onchange:function I(t){this._super(t),t.preventDefault() var n=e(this).val() -e(".cms-preview").changeMode(n)}}),e(".cms-container--content-mode").entwine({onmatch:function I(){e(".cms-preview .result-selected").hasClass("font-icon-columns")&&statusMessage(s["default"]._t("LeftAndMain.DISABLESPLITVIEW","Screen too small to show site preview in split mode"),"error"), +e(".cms-preview").changeMode(n)}}),e(".cms-container--content-mode").entwine({onmatch:function A(){e(".cms-preview .result-selected").hasClass("font-icon-columns")&&statusMessage(s["default"]._t("LeftAndMain.DISABLESPLITVIEW","Screen too small to show site preview in split mode"),"error"), this._super()}}),e(".preview-size-selector").entwine({changeVisibleSize:function F(e){this.find("select").val(e).trigger("chosen:updated")._addIcon()}}),e(".preview-size-selector select").entwine({onchange:function D(t){ t.preventDefault() var n=e(this).val() @@ -1507,13 +1515,13 @@ o["default"].entwine("ss",function(e){e(".TreeDropdownField").entwine({"from .cm "use strict" function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r),a=n(98),s=i(a),l=n(4),u=i(l),c=n(106),d=i(c),f=n(35),p=n(107),h=i(p) o["default"].entwine("ss",function(e){e(".cms-content-actions .add-to-campaign-action,#add-to-campaign__action").entwine({onclick:function t(){var t=e("#add-to-campaign__dialog-wrapper") -return t.length||(t=e('
'),e("body").append(t)),t.open(),!1}}),e("#add-to-campaign__dialog-wrapper").entwine({open:function n(){this._renderModal()},close:function i(){ -this._clearModal()},_renderModal:function r(){var t=this,n=function l(){return t._clearModal()},i=function c(){return t._handleSubmitModal.apply(t,arguments)},r=e("form.cms-edit-form :input[name=ID]").val(),o=window.ss.store,a=o.getState().config.sections["SilverStripe\\CMS\\Controllers\\CMSPageEditController"],s=a.form.AddToCampaignForm.schemaUrl+"/"+r +return t.length||(t=e('
'),e("body").append(t)),t.open(),!1}}),e("#add-to-campaign__dialog-wrapper").entwine({onunmatch:function n(){this.close()},open:function i(){ +this._renderModal()},close:function r(){this._clearModal()},_renderModal:function o(){var t=this,n=function l(){return t._clearModal()},i=function c(){return t._handleSubmitModal.apply(t,arguments)},r=e("form.cms-edit-form :input[name=ID]").val(),o=window.ss.store,a=o.getState().config.sections["SilverStripe\\CMS\\Controllers\\CMSPageEditController"],s=a.form.AddToCampaignForm.schemaUrl+"/"+r d["default"].render(u["default"].createElement(f.Provider,{store:o},u["default"].createElement(h["default"],{show:!0,handleSubmit:i,handleHide:n,schemaUrl:s,bodyClassName:"modal__dialog",responseClassBad:"modal__response modal__response--error", -responseClassGood:"modal__response modal__response--good"})),this[0])},_clearModal:function o(){d["default"].unmountComponentAtNode(this[0])},_handleSubmitModal:function a(e,t,n){return e.preventDefault(), -t.Campaign?n():(alert(s["default"]._t("AddToCampaigns.ErrorCampaignNotSelected","There was no campaign selected to be added to")),null)}})})},,function(e,t){e.exports=FormBuilderModal},function(e,t,n){ +responseClassGood:"modal__response modal__response--good"})),this[0])},_clearModal:function a(){d["default"].unmountComponentAtNode(this[0])},_handleSubmitModal:function l(e,t,n){return event.preventDefault(), +e.Campaign?n():(alert(s["default"]._t("AddToCampaigns.ErrorCampaignNotSelected","There was no campaign selected to be added to")),null)}})})},,function(e,t){e.exports=FormBuilderModal},function(e,t,n){ "use strict" function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r) n(92),n(109) @@ -1747,8 +1755,8 @@ var s=!0 i.setCurrentXhr(null),o.jstree("destroy").bind("loaded.jstree",function(e,r){t.each(i.getValue(),function(e,t){r.inst.check_node(o.find("*[data-id="+t+"]"))}),s=!1,n&&n.apply(i)}).jstree(i.getTreeConfig()).bind("uncheck_node.jstree check_node.jstree",function(e,n){ var r=n.inst.get_checked(null,!0) i.setValue(t.map(r,function(e,n){return t(e).data("id")})),i.setTitle(t.map(r,function(e,t){return n.inst.get_text(e)})),i.data("metadata",t.map(r,function(e,n){return{id:t(e).data("id"),metadata:t(e).getMetaData() -}}))})}}),this.setCurrentXhr(a)},getValue:function A(){var e=this._super() -return e.split(/ *, */)},setValue:function I(e){this._super(t.isArray(e)?e.join(","):e)},setTitle:function F(e){this._super(t.isArray(e)?e.join(", "):e)},updateTitle:function D(){}}),t(".TreeDropdownField input[type=hidden]").entwine({ +}}))})}}),this.setCurrentXhr(a)},getValue:function I(){var e=this._super() +return e.split(/ *, */)},setValue:function A(e){this._super(t.isArray(e)?e.join(","):e)},setTitle:function F(e){this._super(t.isArray(e)?e.join(", "):e)},updateTitle:function D(){}}),t(".TreeDropdownField input[type=hidden]").entwine({ onadd:function M(){this._super(),this.bind("change.TreeDropdownField",function(){t(this).getField().updateTitle()})},onremove:function N(){this._super(),this.unbind(".TreeDropdownField")}})})}).call(t,n(1)) },,,function(module,exports,__webpack_require__){"use strict" @@ -1824,7 +1832,7 @@ e.insertLink(this.getLinkAttributes())})},removeLink:function j(){this.modifySel n.length&&(t._trigger("destroy",null,{context:n}),e.find(".ss-uploadfield-addfile").removeClass("borderTop"))},addAnchorSelector:function R(){if(!this.find(":input[name=AnchorSelector]").length){var t=this,n=e('') -this.find(":input[name=Anchor]").parent().append(n),this.updateAnchorSelector(),n.change(function(n){t.find(':input[name="Anchor"]').val(e(this).val())})}},getAnchors:function A(){var t=this.find(":input[name=LinkType]:checked").val(),n=e.Deferred() +this.find(":input[name=Anchor]").parent().append(n),this.updateAnchorSelector(),n.change(function(n){t.find(':input[name="Anchor"]').val(e(this).val())})}},getAnchors:function I(){var t=this.find(":input[name=LinkType]:checked").val(),n=e.Deferred() switch(t){case"anchor":var i=[],r=this.getEditor() @@ -1837,7 +1845,7 @@ l?e.ajax({url:e.path.addSearchParams(this.attr("action").replace("LinkForm","get }}):n.resolve([]) break -default:n.reject(_i18n2["default"]._t("HtmlEditorField.ANCHORSNOTSUPPORTED","Anchors are not supported for this link type."))}return n.promise()},updateAnchorSelector:function I(){var t=this,n=this.find(":input[name=AnchorSelector]"),i=this.getAnchors() +default:n.reject(_i18n2["default"]._t("HtmlEditorField.ANCHORSNOTSUPPORTED","Anchors are not supported for this link type."))}return n.promise()},updateAnchorSelector:function A(){var t=this,n=this.find(":input[name=AnchorSelector]"),i=this.getAnchors() n.empty(),n.append(e('")),i.done(function(t){if(n.empty(),n.append(e('")), @@ -2001,7 +2009,7 @@ this.val()&&(e.addClass("filtered"),t.addClass("filtered")),this._super()},onunm if("13"==e.keyCode){var i=this.closest(".filter-header").find(".ss-gridfield-button-filter"),r="show" return!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(r="hidden"),this.getGridField().reload({data:[{name:i.attr("name"),value:i.val(),filter:r}]}),!1 -}t.addClass("hover-alike"),n.addClass("hover-alike")}}}),e(".grid-field .relation-search").entwine({onfocusin:function A(t){this.autocomplete({source:function n(t,i){var r=e(this.element),o=e(this.element).closest("form") +}t.addClass("hover-alike"),n.addClass("hover-alike")}}}),e(".grid-field .relation-search").entwine({onfocusin:function I(t){this.autocomplete({source:function n(t,i){var r=e(this.element),o=e(this.element).closest("form") e.ajax({headers:{"X-Pjax":"Partial"},dataType:"json",type:"GET",url:e(r).data("searchUrl"),data:encodeURIComponent(r.attr("name"))+"="+encodeURIComponent(r.val()),success:i,error:function a(e){alert(s["default"]._t("GRIDFIELD.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later.")) @@ -2009,7 +2017,7 @@ e.ajax({headers:{"X-Pjax":"Partial"},dataType:"json",type:"GET",url:e(r).data("s }})},select:function i(t,n){var i=e('') i.val(n.item.id),e(this).closest(".grid-field").find(".action_gridfield_relationfind").replaceWith(i) var r=e(this).closest(".grid-field").find(".action_gridfield_relationadd") -r.data("button")?r.button("enable"):r.removeAttr("disabled")}})}}),e(".grid-field .pagination-page-number input").entwine({onkeydown:function I(t){if(13==t.keyCode){var n=parseInt(e(this).val(),10),i=e(this).getGridField() +r.data("button")?r.button("enable"):r.removeAttr("disabled")}})}}),e(".grid-field .pagination-page-number input").entwine({onkeydown:function A(t){if(13==t.keyCode){var n=parseInt(e(this).val(),10),i=e(this).getGridField() return i.setState("GridFieldPaginator",{currentPage:n}),i.reload(),!1}}})})},function(e,t,n){"use strict" @@ -2025,7 +2033,7 @@ var e={},t=(0,l.combineReducers)(g["default"].getAll()),n=[c["default"]],i=h["de var u=o(l.createStore),p=u(t,e) p.dispatch(y.setConfig(h["default"].getAll())),window.ss=window.ss||{},window.ss.store=p var m=new s["default"](p) -m.start(window.location.pathname)}var a=n(129),s=r(a),l=n(36),u=n(151),c=r(u),d=n(37),f=n(150),p=n(73),h=r(p),m=n(152),g=r(m),v=n(153),y=i(v),b=n(155),w=r(b),_=n(157),C=r(_),T=n(158),E=r(T),P=n(159),O=r(P),k=n(161),S=r(k),j=n(162),x=r(j),R=n(178),A=r(R),I=n(9),F=r(I) +m.start(window.location.pathname)}var a=n(129),s=r(a),l=n(36),u=n(151),c=r(u),d=n(37),f=n(150),p=n(73),h=r(p),m=n(152),g=r(m),v=n(153),y=i(v),b=n(155),w=r(b),_=n(157),C=r(_),T=n(158),E=r(T),P=n(159),O=r(P),k=n(161),S=r(k),j=n(162),x=r(j),R=n(178),I=r(R),A=n(9),F=r(A) F["default"].polyfill(),window.onload=o},function(e,t,n){"use strict" @@ -2123,11 +2131,11 @@ for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}, t["default"]=r},function(e,t,n){"use strict" function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}) var o=function(){function e(e,t){for(var n=0;n1){var t=this.props.breadcrumbs[this.props.breadcrumbs.length-2] -if(t&&t.href)return e.preventDefault(),void this.props.router.push(t.href)}}},{key:"render",value:function u(){var e=null +t&&t.href&&(e.preventDefault(),this.props.router.push(t.href))}}},{key:"render",value:function u(){var e=null switch(this.props.params.view){case"show":e=this.renderItemListView() break case"edit":e=this.renderDetailEditView() @@ -2414,22 +2422,20 @@ case"create":e=this.renderCreateView() break default:e=this.renderIndexView()}return e}},{key:"renderIndexView",value:function f(){var e=this.props.sectionConfig.form.EditForm.schemaUrl,t={title:S["default"]._t("Campaigns.ADDCAMPAIGN"),icon:"plus", handleClick:this.addCampaign.bind(this)},n={createFn:this.campaignListCreateFn.bind(this),schemaUrl:e} -return p["default"].createElement("div",{className:"fill-height cms-campaigns","aria-expanded":"true"},p["default"].createElement(x["default"],null,p["default"].createElement(C["default"],{multiline:!0, -crumbs:this.props.breadcrumbs})),p["default"].createElement("div",{className:"panel panel--padded panel--scrollable flexbox-area-grow"},p["default"].createElement("div",{className:"toolbar toolbar--content" -},p["default"].createElement("div",{className:"btn-toolbar"},p["default"].createElement(O["default"],t))),p["default"].createElement("div",{className:"campaign-admin"},p["default"].createElement(A["default"],n)))) - -}},{key:"renderItemListView",value:function h(){var e={sectionConfig:this.props.sectionConfig,campaignId:this.props.params.id,itemListViewEndpoint:this.props.sectionConfig.itemListViewEndpoint,publishApi:this.publishApi, -handleBackButtonClick:this.handleBackButtonClick.bind(this)} +return p["default"].createElement("div",{className:"fill-height","aria-expanded":"true"},p["default"].createElement(x["default"],null,p["default"].createElement(C["default"],{multiline:!0,crumbs:this.props.breadcrumbs +})),p["default"].createElement("div",{className:"panel panel--padded panel--scrollable flexbox-area-grow"},p["default"].createElement("div",{className:"toolbar toolbar--content"},p["default"].createElement("div",{ +className:"btn-toolbar"},p["default"].createElement(O["default"],t))),p["default"].createElement(I["default"],n)))}},{key:"renderItemListView",value:function h(){var e={sectionConfig:this.props.sectionConfig, +campaignId:this.props.params.id,itemListViewEndpoint:this.props.sectionConfig.itemListViewEndpoint,publishApi:this.publishApi,handleBackButtonClick:this.handleBackButtonClick.bind(this)} return p["default"].createElement(F["default"],e)}},{key:"renderDetailEditView",value:function m(){var e=this.props.sectionConfig.form.DetailEditForm.schemaUrl,t=e this.props.params.id>0&&(t=e+"/"+this.props.params.id) var n={createFn:this.campaignEditCreateFn.bind(this),schemaUrl:t} return p["default"].createElement("div",null,p["default"].createElement(x["default"],{showBackButton:!0,handleBackButtonClick:this.handleBackButtonClick},p["default"].createElement(C["default"],{multiline:!0, -crumbs:this.props.breadcrumbs})),p["default"].createElement("div",{className:"panel panel--padded panel--scrollable flexbox-area-grow form--inline"},p["default"].createElement(A["default"],n)))}},{key:"renderCreateView", +crumbs:this.props.breadcrumbs})),p["default"].createElement("div",{className:"panel panel--padded panel--scrollable flexbox-area-grow form--inline"},p["default"].createElement(I["default"],n)))}},{key:"renderCreateView", value:function g(){var e=this.props.sectionConfig.form.DetailEditForm.schemaUrl,t=e this.props.params.id>0&&(t=e+"/"+this.props.params.id) var n={createFn:this.campaignAddCreateFn.bind(this),schemaUrl:t} return p["default"].createElement("div",null,p["default"].createElement(x["default"],{showBackButton:!0,handleBackButtonClick:this.handleBackButtonClick},p["default"].createElement(C["default"],{multiline:!0, -crumbs:this.props.breadcrumbs})),p["default"].createElement("div",{className:"panel panel--padded panel--scrollable flexbox-area-grow form--inline"},p["default"].createElement(A["default"],n)))}},{key:"campaignEditCreateFn", +crumbs:this.props.breadcrumbs})),p["default"].createElement("div",{className:"panel panel--padded panel--scrollable flexbox-area-grow form--inline"},p["default"].createElement(I["default"],n)))}},{key:"campaignEditCreateFn", value:function v(e,t){var n=this,i=this.props.sectionConfig.url if("action_cancel"===t.name){var r=c({},t,{handleClick:function o(e){e.preventDefault(),n.props.router.push(i)}}) return p["default"].createElement(e,c({key:t.id},r))}return p["default"].createElement(e,c({key:t.id},t))}},{key:"campaignAddCreateFn",value:function b(e,t){var n=this,i=this.props.sectionConfig.url @@ -2467,39 +2473,40 @@ var i=Object.getOwnPropertyDescriptor(e,t) if(void 0===i){var r=Object.getPrototypeOf(e) return null===r?void 0:q(r,t,n)}if("value"in i)return i.value var o=i.get -if(void 0!==o)return o.call(n)},p=n(4),h=r(p),m=n(36),g=n(35),v=n(180),y=i(v),b=n(52),w=i(b),_=n(184),C=i(_),T=n(20),E=r(T),P=n(185),O=r(P),k=n(186),S=r(k),j=n(188),x=r(j),R=n(182),A=r(R),I=n(177),F=r(I),D=n(189),M=r(D),N=n(181),U=r(N),L=n(190),B=r(L),H=n(98),$=r(H),V=function(e){ +if(void 0!==o)return o.call(n)},p=n(4),h=r(p),m=n(36),g=n(35),v=n(180),y=i(v),b=n(52),w=i(b),_=n(184),C=i(_),T=n(20),E=r(T),P=n(185),O=r(P),k=n(186),S=r(k),j=n(188),x=r(j),R=n(182),I=r(R),A=n(177),F=r(A),D=n(189),M=r(D),N=n(181),U=r(N),L=n(190),B=r(L),H=n(98),$=r(H),V=function(e){ function t(e){o(this,t) var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)) -return n.handlePublish=n.handlePublish.bind(n),n.handleItemSelected=n.handleItemSelected.bind(n),n.setBreadcrumbs=n.setBreadcrumbs.bind(n),n}return s(t,e),d(t,[{key:"componentDidMount",value:function n(){ -var e=this.props.itemListViewEndpoint.url.replace(/:id/,this.props.campaignId) +return n.handlePublish=n.handlePublish.bind(n),n.handleItemSelected=n.handleItemSelected.bind(n),n.setBreadcrumbs=n.setBreadcrumbs.bind(n),n.handleCloseItem=n.handleCloseItem.bind(n),n}return s(t,e),d(t,[{ +key:"componentDidMount",value:function n(){var e=this.props.itemListViewEndpoint.url.replace(/:id/,this.props.campaignId) f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this),this.setBreadcrumbs(),Object.keys(this.props.record).length||this.props.recordActions.fetchRecord(this.props.treeClass,"get",e).then(this.setBreadcrumbs) }},{key:"setBreadcrumbs",value:function i(){if(this.props.record){var e=[{text:$["default"]._t("Campaigns.CAMPAIGN","Campaigns"),href:this.props.sectionConfig.url}] -e.push({text:this.props.record.Name,href:this.props.sectionConfig.url+"/set/"+this.props.campaignId+"/show"}),this.props.breadcrumbsActions.setBreadcrumbs(e)}}},{key:"render",value:function r(){var e=this,t=this.props.campaign.changeSetItemId,n=null,i=this.props.campaignId,r=this.props.record,o=this.groupItemsForSet(),a=[] +e.push({text:this.props.record.Name,href:this.props.sectionConfig.url+"/set/"+this.props.campaignId+"/show"}),this.props.breadcrumbsActions.setBreadcrumbs(e)}}},{key:"render",value:function r(){var e=this,t=this.props.campaign.changeSetItemId,n=null,i=t?"":"campaign-admin__campaign--hide-preview",r=this.props.campaignId,o=this.props.record,a=this.groupItemsForSet(),s=[] -Object.keys(o).forEach(function(s){var l=o[s],u=l.items.length,c=[],d=u+" "+(1===u?l.singular:l.plural),f="Set_"+i+"_Group_"+s +Object.keys(a).forEach(function(i){var l=a[i],u=l.items.length,c=[],d=u+" "+(1===u?l.singular:l.plural),f="Set_"+r+"_Group_"+i l.items.forEach(function(i){t||(t=i.ID) -var o=t===i.ID -o&&i._links&&(n=i._links) +var r=t===i.ID +r&&i._links&&(n=i._links) var a=[] -"none"!==i.ChangeType&&"published"!==r.State||a.push("list-group-item--inactive"),o&&a.push("active"),c.push(h["default"].createElement(x["default"],{key:i.ID,className:a.join(" "),handleClick:e.handleItemSelected, -handleClickArg:i.ID},h["default"].createElement(M["default"],{item:i,campaign:e.props.record})))}),a.push(h["default"].createElement(S["default"],{key:f,groupid:f,title:d},c))}) -var s=[this.props.config.absoluteBaseUrl,this.props.config.sections["SilverStripe\\CMS\\Controllers\\CMSPagesController"].url].join(""),l=a.length?h["default"].createElement(O["default"],null,a):h["default"].createElement("div",{ -className:"alert alert-warning",role:"alert"},h["default"].createElement("strong",null,"This campaign is empty.")," You can add pages by selecting"," ",h["default"].createElement("em",null,"Add to campaign")," from within the ",h["default"].createElement("em",null,"More Options")," popup on"," ","the ",h["default"].createElement("a",{ -href:s},"edit page screen"),"."),u=["panel","panel--padded","panel--scrollable","flexbox-area-grow","campaign-items"] -return h["default"].createElement("div",{className:"fill-width campaigns"},h["default"].createElement("div",{className:"fill-height campaign-items cms-content__left cms-campaigns","aria-expanded":"true" -},h["default"].createElement(A["default"],{showBackButton:!0,handleBackButtonClick:this.props.handleBackButtonClick},h["default"].createElement(U["default"],{multiline:!0,crumbs:this.props.breadcrumbs})),h["default"].createElement("div",{ -className:u.join(" ")},l),h["default"].createElement("div",{className:"toolbar toolbar--south"},this.renderButtonToolbar())),h["default"].createElement(B["default"],{itemLinks:n,itemId:t}))}},{key:"handleItemSelected", -value:function l(e,t){this.props.campaignActions.selectChangeSetItem(t)}},{key:"renderButtonToolbar",value:function u(){var e=this.getItems() +"none"!==i.ChangeType&&"published"!==o.State||a.push("list-group-item--inactive"),r&&a.push("active"),c.push(h["default"].createElement(x["default"],{key:i.ID,className:a.join(" "),handleClick:e.handleItemSelected, +handleClickArg:i.ID},h["default"].createElement(M["default"],{item:i,campaign:e.props.record})))}),s.push(h["default"].createElement(S["default"],{key:f,groupid:f,title:d},c))}) +var l=[this.props.config.absoluteBaseUrl,this.props.config.sections["SilverStripe\\CMS\\Controllers\\CMSPagesController"].url].join(""),u=s.length?h["default"].createElement(O["default"],null,s):h["default"].createElement("div",{ +className:"alert alert-warning",role:"alert"},h["default"].createElement("strong",null,"This campaign is empty.")," You can add items to a campaign by selecting ",h["default"].createElement("em",null,"Add to campaign")," from within the ",h["default"].createElement("em",null,"More Options "),"popup on ",h["default"].createElement("a",{ +href:l},"pages")," and files."),c=["panel","panel--padded","panel--scrollable","flexbox-area-grow"] +return h["default"].createElement("div",{className:"fill-width campaign-admin__campaign "+i},h["default"].createElement("div",{className:"fill-height campaign-admin__campaign-items","aria-expanded":"true" +},h["default"].createElement(I["default"],{showBackButton:!0,handleBackButtonClick:this.props.handleBackButtonClick},h["default"].createElement(U["default"],{multiline:!0,crumbs:this.props.breadcrumbs})),h["default"].createElement("div",{ +className:c.join(" ")},u),h["default"].createElement("div",{className:"toolbar toolbar--south"},this.renderButtonToolbar())),h["default"].createElement(B["default"],{itemLinks:n,itemId:t,onBack:this.handleCloseItem +}))}},{key:"handleItemSelected",value:function l(e,t){this.props.campaignActions.selectChangeSetItem(t)}},{key:"handleCloseItem",value:function u(){this.props.campaignActions.selectChangeSetItem(null)} +},{key:"renderButtonToolbar",value:function p(){var e=this.getItems() if(!e||!e.length)return h["default"].createElement("div",{className:"btn-toolbar"}) var t={} return"open"===this.props.record.State?t=c(t,{title:$["default"]._t("Campaigns.PUBLISHCAMPAIGN"),bootstrapButtonStyle:"primary",loading:this.props.campaign.isPublishing,handleClick:this.handlePublish,icon:"rocket" -}):"published"===this.props.record.State&&(t=c(t,{title:$["default"]._t("Campaigns.REVERTCAMPAIGN"),bootstrapButtonStyle:"default",icon:"back-in-time",disabled:!0})),h["default"].createElement("div",{className:"btn-toolbar" -},h["default"].createElement(F["default"],t))}},{key:"getItems",value:function p(){return this.props.record&&this.props.record._embedded?this.props.record._embedded.items:null}},{key:"groupItemsForSet", -value:function m(){var e={},t=this.getItems() +}):"published"===this.props.record.State&&(t=c(t,{title:$["default"]._t("Campaigns.REVERTCAMPAIGN"),bootstrapButtonStyle:"secondary-outline",icon:"back-in-time",disabled:!0})),h["default"].createElement("div",{ +className:"btn-toolbar"},h["default"].createElement(F["default"],t))}},{key:"getItems",value:function m(){return this.props.record&&this.props.record._embedded?this.props.record._embedded.items:null}},{ +key:"groupItemsForSet",value:function g(){var e={},t=this.getItems() return t?(t.forEach(function(t){var n=t.BaseClass -e[n]||(e[n]={singular:t.Singular,plural:t.Plural,items:[]}),e[n].items.push(t)}),e):e}},{key:"handlePublish",value:function g(e){e.preventDefault(),this.props.campaignActions.publishCampaign(this.props.publishApi,this.props.treeClass,this.props.campaignId) +e[n]||(e[n]={singular:t.Singular,plural:t.Plural,items:[]}),e[n].items.push(t)}),e):e}},{key:"handlePublish",value:function v(e){e.preventDefault(),this.props.campaignActions.publishCampaign(this.props.publishApi,this.props.treeClass,this.props.campaignId) }}]),t}(E["default"]) V.propTypes={campaign:h["default"].PropTypes.shape({isPublishing:h["default"].PropTypes.bool.isRequired,changeSetItemId:h["default"].PropTypes.number}),breadcrumbsActions:h["default"].PropTypes.object.isRequired, @@ -2583,16 +2590,20 @@ e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,wri value:!0}) var s=function(){function e(e,t){for(var n=0;nul,.TreeDropdownField .treedropdownfield-panel li.jstree-open>ul{ display:block; - margin-left:-13px; + margin-left:-15px; + margin-right:-20px; } .cms li.jstree-open>ul li ul,.TreeDropdownField .treedropdownfield-panel li.jstree-open>ul li ul{ margin-left:2px; + margin-right:0; } .cms li.jstree-closed>ul,.TreeDropdownField .treedropdownfield-panel li.jstree-closed>ul{ @@ -11660,6 +11673,10 @@ form.small .cms-file-info-data .field .middleColumn{ color:#aaa; } +.cms-tree{ + padding-bottom:1.5385rem; +} + .cms-tree.jstree.draggable .jstree-no-checkboxes li a{ padding-left:12px; } @@ -11672,6 +11689,15 @@ form.small .cms-file-info-data .field .middleColumn{ display:block; } +.cms-tree-holder{ + overflow-x:auto; + height:calc(100% - 13px); + padding-left:20px; + padding-right:20px; + margin-left:-20px; + margin-right:-20px; +} + .jstree-apple a .jstree-icon,.jstree-classic a .jstree-icon,.jstree-default-rtl a .jstree-icon,.jstree-default a .jstree-icon{ background-position:-60px -19px; } @@ -15063,7 +15089,7 @@ fieldset+.btn-toolbar{ } button.close{ - padding:.4615rem .7692rem; + padding:.3846rem .7692rem; } .btn--top-right{ @@ -15221,8 +15247,8 @@ th:only-child .grid-field__sort{ vertical-align:bottom; margin:0; float:right; - margin-top:-.4615rem; - margin-bottom:-.4615rem; + margin-top:-.3846rem; + margin-bottom:-.3846rem; } .grid-field .grid-field__filter-clear,.grid-field .grid-field__filter-submit{ @@ -15328,7 +15354,7 @@ div.grid-field__sort-field+.form__fieldgroup-item{ display:none; } - .grid-field__table td.grid-field__action-placeholder,.grid-field__table td.grid-field__cell--actions,.grid-field__table td:first-child,.grid-field__table th.grid-field__action-placeholder,.grid-field__table th.grid-field__cell--actions,.grid-field__table th:first-child{ + .cms-list .grid-field__table td,.cms-list .grid-field__table th,.grid-field__table td.grid-field__action-placeholder,.grid-field__table td.grid-field__cell--actions,.grid-field__table td:first-child,.grid-field__table th.grid-field__action-placeholder,.grid-field__table th.grid-field__cell--actions,.grid-field__table th:first-child{ display:table-cell; } } @@ -15355,6 +15381,8 @@ div.grid-field__sort-field+.form__fieldgroup-item{ .preview{ position:relative; + background-color:#f6f7f8; + border-left:1px solid #ced3d9; } @media (max-width:991px){ @@ -15363,6 +15391,7 @@ div.grid-field__sort-field+.form__fieldgroup-item{ right:0; z-index:2; width:100%; + border-left:0; } } @@ -15395,7 +15424,6 @@ div.grid-field__sort-field+.form__fieldgroup-item{ .preview__overlay{ text-align:center; - position:absolute; top:0; width:100%; height:calc(100% - 53px); @@ -15415,8 +15443,7 @@ div.grid-field__sort-field+.form__fieldgroup-item{ margin-right:auto; padding-left:1.5385rem; padding-right:1.5385rem; - height:53px; - width:100%; + min-height:53px; } .toolbar--content .btn-toolbar,.toolbar--north .btn-toolbar,.toolbar--south .btn-toolbar,.toolbar .btn-toolbar{ @@ -15430,6 +15457,7 @@ div.grid-field__sort-field+.form__fieldgroup-item{ border-bottom:1px solid #d9dee2; z-index:60; position:relative; + width:100%; } .toolbar a.btn{ @@ -15445,6 +15473,7 @@ div.grid-field__sort-field+.form__fieldgroup-item{ margin-left:-1.5385rem; margin-right:-1.5385rem; padding:.76925rem; + min-height:auto; } @media (max-width:991px){ @@ -15472,15 +15501,22 @@ div.grid-field__sort-field+.form__fieldgroup-item{ background-color:#f6f7f8; } -.cms-backlink .toolbar__back-button,.toolbar__back-button{ +.toolbar__back-button{ float:left; margin:.76925rem .6154rem .76925rem -.76925rem; padding-left:.3077rem; - padding-right:.3077rem; - border:0; color:#66727d; } +.toolbar--south .toolbar__back-button{ + margin-top:0; + margin-right:5px; +} + +.toolbar__back-button.btn--no-text{ + padding-right:.3077rem; +} + .nav-tabs{ margin-bottom:1.5385rem; } @@ -15918,83 +15954,26 @@ input.checkbox,input.radio,input[type=checkbox],input[type=radio]{ color:#d40404; } -.cms-content__inner{ - height:100%; +*,:after,:before{ + box-sizing:border-box; } -.cms-content__left,.cms-content__right{ - height:100%; - overflow:hidden; - background-color:#f6f7f8; - -webkit-transition:width .2s; - transition:width .2s; -} - -.cms-content__split{ +body,html{ + width:100%; height:100%; + margin:0; + padding:0; + display:-ms-flexbox; + display:-webkit-box; + display:flex; } @media (max-width:991px){ - .campaign-items{ - width:100%; - z-index:1; - } -} - -.campaigns{ - position:relative; - height:100%; -} - -.campaigns .cms-content--selected{ - display:block; -} - -.campaigns .cms-content__back-btn{ - width:36px; - height:36px; - background-color:rgba(79,88,97,.8); - display:block; - position:absolute; - top:8px; - left:12px; - content:"5"; - font-size:16px; - line-height:20px; - color:#fff; - padding:8px; - border-radius:50%; - font-family:silverstripe; - z-index:1; - cursor:pointer; -} - -.campaigns .cms-content__back-btn:hover{ - background-color:#4f5861; - text-decoration:none; -} - -@media (min-width:992px){ - .campaigns .cms-content__left{ - width:300px; - } - - .campaigns .cms-content__right{ - display:block; - border-left:1px solid #d9dee2; - } - - .campaigns .cms-content__back-btn{ + .CMSPageEditController.has-panel .cms-content-tools,.CMSPageSettingsController.has-panel .cms-content-tools{ display:none; } } -@media (min-width:1200px){ - .campaigns .cms-content__left{ - width:448px; - } -} - .panel{ margin-left:auto; margin-right:auto; @@ -16037,24 +16016,8 @@ input.checkbox,input.radio,input[type=checkbox],input[type=radio]{ box-shadow:0 16px 28px 0 rgba(0,0,0,.3),0 25px 55px 0 rgba(0,0,0,.3); } -*,:after,:before{ - box-sizing:border-box; -} - -body,html{ - width:100%; - margin:0; - padding:0; -} - -.fill-height,body,html{ - height:100%; - display:-ms-flexbox; - display:-webkit-box; - display:flex; -} - .fill-height{ + height:100%; min-height:0; -ms-flex-direction:column; -webkit-box-orient:vertical; @@ -16062,14 +16025,14 @@ body,html{ } .fill-height,.fill-width{ + display:-ms-flexbox; + display:-webkit-box; + display:flex; -webkit-box-direction:normal; } .fill-width{ width:100%; - display:-ms-flexbox; - display:-webkit-box; - display:flex; -ms-flex-direction:row; -webkit-box-orient:horizontal; flex-direction:row; @@ -16087,6 +16050,41 @@ body,html{ display:flex; } +.campaign-admin__campaign{ + position:relative; + height:100%; +} + +@media (max-width:991px){ + .campaign-admin__campaign.campaign-admin__campaign--hide-preview .campaign-admin__campaign-preview{ + display:none; + } + + .campaign-admin__campaign .list-group-item.active{ + background-color:#fff; + color:#4f5861; + z-index:0; + } + + .campaign-admin__campaign .list-group-item.active:hover{ + background-color:#f5f5f5; + color:#4f5861; + border-color:#ddd; + } +} + +.campaign-admin__campaign-items{ + width:100%; + z-index:1; + position:relative; +} + +@media (min-width:992px){ + .campaign-admin__campaign-items{ + width:300px; + } +} + .campaign-admin__item-links--has-links,.campaign-admin__item-links--is-linked{ color:#29abe2; float:right; diff --git a/admin/client/src/components/FormBuilderModal/FormBuilderModal.js b/admin/client/src/components/FormBuilderModal/FormBuilderModal.js index 4a7d4427b..66d4475d4 100644 --- a/admin/client/src/components/FormBuilderModal/FormBuilderModal.js +++ b/admin/client/src/components/FormBuilderModal/FormBuilderModal.js @@ -104,6 +104,8 @@ class FormBuilderModal extends SilverStripeComponent { }); }); }); + } else { + throw new Error('Promise was not returned for submitting'); } return promise; diff --git a/admin/client/src/components/GridField/GridField.scss b/admin/client/src/components/GridField/GridField.scss index ce08350c6..65af79cbd 100644 --- a/admin/client/src/components/GridField/GridField.scss +++ b/admin/client/src/components/GridField/GridField.scss @@ -246,7 +246,8 @@ div.grid-field__sort-field + .form__fieldgroup-item { .grid-field__table th { display: none; - &:first-child { + &:first-child, + .cms-list & { display: table-cell; } diff --git a/admin/client/src/components/ListGroup/ListGroup.scss b/admin/client/src/components/ListGroup/ListGroup.scss index e67fb0ca3..c5a800c6c 100644 --- a/admin/client/src/components/ListGroup/ListGroup.scss +++ b/admin/client/src/components/ListGroup/ListGroup.scss @@ -34,7 +34,7 @@ color: $white; opacity: 1; } - } + } } .list-group-item-heading { diff --git a/admin/client/src/components/Preview/Preview.js b/admin/client/src/components/Preview/Preview.js index e69a69097..405b3327c 100644 --- a/admin/client/src/components/Preview/Preview.js +++ b/admin/client/src/components/Preview/Preview.js @@ -7,6 +7,19 @@ import SilverStripeComponent from 'lib/SilverStripeComponent'; */ class Preview extends SilverStripeComponent { + constructor(props) { + super(props); + + this.handleBackClick = this.handleBackClick.bind(this); + } + + handleBackClick(event) { + if (typeof this.props.onBack === 'function') { + event.preventDefault(); + this.props.onBack(event); + } + } + render() { // @todo - Multiple preview views with toggle slider let body = null; @@ -60,12 +73,20 @@ class Preview extends SilverStripeComponent { body = ; } + const backButton = (typeof this.props.onBack === 'function') && ( + + ); + // Combine elements return ( -
+
{body} -
+ { backButton }
{toolbarButtons}
@@ -78,6 +99,7 @@ class Preview extends SilverStripeComponent { Preview.propTypes = { itemLinks: React.PropTypes.object, itemId: React.PropTypes.number, + onBack: React.PropTypes.func, }; export default Preview; diff --git a/admin/client/src/components/Preview/Preview.scss b/admin/client/src/components/Preview/Preview.scss index eca89d338..c8904dbe5 100644 --- a/admin/client/src/components/Preview/Preview.scss +++ b/admin/client/src/components/Preview/Preview.scss @@ -1,5 +1,7 @@ .preview { position: relative; + background-color: $tab-panel-texture-color; + border-left: 1px solid $border-color-dark; // Overlay preview at smaller sizes @include media-breakpoint-down(md) { @@ -7,6 +9,7 @@ right: 0; z-index: 2; width: 100%; + border-left: 0; } } @@ -40,7 +43,6 @@ .preview__overlay { text-align: center; - position: absolute; top: 0; width: 100%; height: calc(100% - #{$toolbar-total-height}); diff --git a/admin/client/src/components/Toolbar/Toolbar.scss b/admin/client/src/components/Toolbar/Toolbar.scss index 4407bf404..6c75d6468 100644 --- a/admin/client/src/components/Toolbar/Toolbar.scss +++ b/admin/client/src/components/Toolbar/Toolbar.scss @@ -3,8 +3,7 @@ .toolbar--content, .toolbar--south { @include make-container(); - height: $toolbar-total-height; - width: 100%; + min-height: $toolbar-total-height; .btn-toolbar { // TODO Remove '.cms .btn-toolbar' override @@ -15,12 +14,12 @@ // Northern bar containing breadcrumb, tabs etc. .toolbar--north { - // display: block; background-image: none; background-color: $background-darker; border-bottom: 1px solid $border-color; z-index: 60; position: relative; + width: 100%; } // TEMP overrides color of links in JqueryUI widgets @@ -42,6 +41,7 @@ margin-left: -$panel-padding-x; margin-right: -$panel-padding-x; padding: $spacer-xs; + min-height: auto; @include media-breakpoint-down(md) { @@ -74,12 +74,18 @@ background-color: $background-main; } -.toolbar__back-button, -.cms-backlink .toolbar__back-button { // TEMP: Needed for anchor buttons to override legacy styles +.toolbar__back-button { float: left; margin: $spacer-xs $spacer-x / 2 $spacer-xs #{-$spacer-xs}; padding-left: $spacer-x / 4; - padding-right: $spacer-x / 4; - border: 0; color: $body-color-light; // TEMP: Needed for anchor buttons to override legacy styles + + .toolbar--south & { + margin-top: 0; + margin-right: 5px; + } + + &.btn--no-text { + padding-right: $spacer-x / 4; + } } diff --git a/admin/client/src/containers/CampaignAdmin/CampaignAdmin.js b/admin/client/src/containers/CampaignAdmin/CampaignAdmin.js index 6ddc7aa38..7674a29fa 100644 --- a/admin/client/src/containers/CampaignAdmin/CampaignAdmin.js +++ b/admin/client/src/containers/CampaignAdmin/CampaignAdmin.js @@ -83,7 +83,6 @@ class CampaignAdmin extends SilverStripeComponent { if (last && last.href) { event.preventDefault(); this.props.router.push(last.href); - return; } } } @@ -126,7 +125,7 @@ class CampaignAdmin extends SilverStripeComponent { }; return ( -
+
@@ -136,9 +135,7 @@ class CampaignAdmin extends SilverStripeComponent {
-
- -
+
); diff --git a/admin/client/src/containers/CampaignAdmin/CampaignAdmin.scss b/admin/client/src/containers/CampaignAdmin/CampaignAdmin.scss index 044e69dfa..0ad0f869c 100644 --- a/admin/client/src/containers/CampaignAdmin/CampaignAdmin.scss +++ b/admin/client/src/containers/CampaignAdmin/CampaignAdmin.scss @@ -1,3 +1,39 @@ +// Required for preview position +.campaign-admin__campaign { + position: relative; + height: 100%; + + // On smaller screens hide the preview and show list of items with nothing selected + @include media-breakpoint-down(md) { + &.campaign-admin__campaign--hide-preview .campaign-admin__campaign-preview { + display: none; + } + + .list-group-item.active { + background-color: $list-group-bg; + color: $list-group-link-color; + z-index: 0; + + &:hover { + background-color: $list-group-hover-bg; + color: $list-group-link-color; + border-color: $list-group-border-color; + } + } + } +} + +.campaign-admin__campaign-items { + width: 100%; + z-index: 1; + position: relative; + + @include media-breakpoint-up(lg) { + width: $cms-panel-sm; + } +} + + // Campaign items which have linked associations .campaign-admin__item-links--has-links, .campaign-admin__item-links--is-linked { diff --git a/admin/client/src/containers/CampaignAdmin/CampaignAdminList.js b/admin/client/src/containers/CampaignAdmin/CampaignAdminList.js index 919e0de00..892696300 100644 --- a/admin/client/src/containers/CampaignAdmin/CampaignAdminList.js +++ b/admin/client/src/containers/CampaignAdmin/CampaignAdminList.js @@ -27,6 +27,7 @@ class CampaignAdminList extends SilverStripeComponent { this.handlePublish = this.handlePublish.bind(this); this.handleItemSelected = this.handleItemSelected.bind(this); this.setBreadcrumbs = this.setBreadcrumbs.bind(this); + this.handleCloseItem = this.handleCloseItem.bind(this); } componentDidMount() { @@ -72,6 +73,7 @@ class CampaignAdminList extends SilverStripeComponent { render() { let itemId = this.props.campaign.changeSetItemId; let itemLinks = null; + const selectedClass = (!itemId) ? 'campaign-admin__campaign--hide-preview' : ''; const campaignId = this.props.campaignId; const campaign = this.props.record; @@ -141,20 +143,18 @@ class CampaignAdminList extends SilverStripeComponent { ? ({accordionBlocks}) : (
- This campaign is empty. You can add pages by selecting{' '} - Add to campaign from within the More Options popup on{' '} - the edit page screen. + This campaign is empty. You can add items to a campaign by + selecting Add to campaign from within the More Options + popup on pages and files.
); const bodyClass = [ - 'panel', 'panel--padded', 'panel--scrollable', 'flexbox-area-grow', 'campaign-items', + 'panel', 'panel--padded', 'panel--scrollable', 'flexbox-area-grow', ]; return ( -
-
+
+
@@ -165,7 +165,7 @@ class CampaignAdminList extends SilverStripeComponent { {this.renderButtonToolbar()}
- +
); } @@ -180,6 +180,10 @@ class CampaignAdminList extends SilverStripeComponent { this.props.campaignActions.selectChangeSetItem(itemId); } + handleCloseItem() { + this.props.campaignActions.selectChangeSetItem(null); + } + renderButtonToolbar() { const items = this.getItems(); @@ -209,7 +213,7 @@ class CampaignAdminList extends SilverStripeComponent { // TODO Implement "revert" feature actionProps = Object.assign(actionProps, { title: i18n._t('Campaigns.REVERTCAMPAIGN'), - bootstrapButtonStyle: 'default', + bootstrapButtonStyle: 'secondary-outline', icon: 'back-in-time', disabled: true, }); @@ -231,7 +235,7 @@ class CampaignAdminList extends SilverStripeComponent { } /** - * @return {Array} + * @return {array} */ getItems() { if (this.props.record && this.props.record._embedded) { @@ -244,7 +248,7 @@ class CampaignAdminList extends SilverStripeComponent { /** * Group items for changeset display * - * @return array + * @return {object} */ groupItemsForSet() { const groups = {}; diff --git a/admin/client/src/containers/FormBuilderLoader/FormBuilderLoader.js b/admin/client/src/containers/FormBuilderLoader/FormBuilderLoader.js index 3328c63a6..542cb31a4 100644 --- a/admin/client/src/containers/FormBuilderLoader/FormBuilderLoader.js +++ b/admin/client/src/containers/FormBuilderLoader/FormBuilderLoader.js @@ -73,25 +73,38 @@ class FormBuilderLoader extends Component { * @param submitFn * @returns {Promise} */ - handleSubmit(dataWithAction, action, submitFn) { - return submitFn() - .then(formSchema => { - this.props.schemaActions.setSchema(formSchema); - return formSchema; - }) - // TODO Suggest storing messages in a separate redux store rather than throw an error - // ref: https://github.com/erikras/redux-form/issues/94#issuecomment-143398399 - .then(formSchema => { - if (!formSchema.state) { - return formSchema; - } - const messages = this.getMessages(formSchema.state); + handleSubmit(data, action, submitFn) { + let promise = null; + if (typeof this.props.handleSubmit === 'function') { + promise = this.props.handleSubmit(data, action, submitFn); + } else { + promise = submitFn(); + } - if (Object.keys(messages).length) { - throw new SubmissionError(messages); - } - return formSchema; - }); + if (promise) { + promise + .then(formSchema => { + this.props.schemaActions.setSchema(formSchema); + return formSchema; + }) + // TODO Suggest storing messages in a separate redux store rather than throw an error + // ref: https://github.com/erikras/redux-form/issues/94#issuecomment-143398399 + .then(formSchema => { + if (!formSchema.state) { + return formSchema; + } + const messages = this.getMessages(formSchema.state); + + if (Object.keys(messages).length) { + throw new SubmissionError(messages); + } + return formSchema; + }); + } else { + throw new Error('Promise was not returned for submitting'); + } + + return promise; } /** diff --git a/admin/client/src/legacy/AddToCampaignForm.js b/admin/client/src/legacy/AddToCampaignForm.js index aa2ad32e9..9277a3d08 100644 --- a/admin/client/src/legacy/AddToCampaignForm.js +++ b/admin/client/src/legacy/AddToCampaignForm.js @@ -33,6 +33,11 @@ jQuery.entwine('ss', ($) => { */ $('#add-to-campaign__dialog-wrapper').entwine({ + onunmatch() { + // solves errors given by ReactDOM "no matched root found" error. + this.close(); + }, + open() { this._renderModal(); }, @@ -71,10 +76,10 @@ jQuery.entwine('ss', ($) => { // this.empty(); }, - _handleSubmitModal(event, fieldValues, submitFn) { + _handleSubmitModal(data, action, submitFn) { event.preventDefault(); - if (!fieldValues.Campaign) { + if (!data.Campaign) { // TODO invisible submit disable, remove this when validation is implemented // eslint-disable-next-line no-alert alert(i18n._t( diff --git a/admin/client/src/styles/_layout.scss b/admin/client/src/styles/_layout.scss index c0621622d..b064f2b0d 100644 --- a/admin/client/src/styles/_layout.scss +++ b/admin/client/src/styles/_layout.scss @@ -1,86 +1,33 @@ -.cms-content__inner { - height: 100%; +// INITIATE FLEXBOX LAYOUT +// TODO Convert layout to BEM + +*, +*:before, +*:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } -.cms-content__right, -.cms-content__left { +html, +body { + width: 100%; height: 100%; - overflow: hidden; - background-color: $body-bg; - transition: width .2s; + margin: 0; + padding: 0; + display: -ms-flexbox; + display: flex; } -// .cms-content can be split into different left/right zones -// Exampale modifier: --left-sm = small left side panel with right panel width set to auto. -.cms-content__split { - height: 100%; -} -.campaign-items { - @include media-breakpoint-down(md) { - width: 100%; - z-index: 1; - } -} - -.campaigns { - position: relative; - height: 100%; - - // Overlay preview if there isn't enough space for both items and preview - .cms-content--selected { - display: block; - } - - // Back button for smaller screens, closes preview - .cms-content__back-btn { - width: 36px; - height: 36px; - background-color: rgba($gray-dark, 0.8); - display: block; - position: absolute; - top: 8px; - left: 12px; - content: "5"; - font-size: 16px; - line-height: 20px; - color: $white; - padding: 8px; - border-radius: 50%; - font-family: silverstripe; - z-index: 1; - cursor: pointer; - - &:hover { - background-color: $gray-dark; - text-decoration: none; - } - } - - @include media-breakpoint-up(lg) { - // padding-left: $cms-panel-sm; - - .cms-content__left { - width: $cms-panel-sm; - } - - .cms-content__right { - display: block; - border-left: 1px solid $border-color; - } - - .cms-content__back-btn { +// TODO move out of layout +@include media-breakpoint-down(md) { + .CMSPageEditController, + .CMSPageSettingsController { + &.has-panel .cms-content-tools { display: none; } } - - @include media-breakpoint-up(xl) { - // padding-left: $cms-panel-md; - - .cms-content__left { - width: $cms-panel-md; - } - } } @@ -136,28 +83,6 @@ } -// TEMPORY FLEXBOX STYLES -// Reference https://css-tricks.com/boxes-fill-height-dont-squish/ -// Reference http://codepen.io/clarkepaul/pen/qaNWAY - -*, -*:before, -*:after { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -html, -body { - width: 100%; - height: 100%; - margin: 0; - padding: 0; - display: -ms-flexbox; - display: flex; -} - // Flex magic // Nested items take up height .fill-height { diff --git a/admin/client/src/styles/_variables.scss b/admin/client/src/styles/_variables.scss index c8ca20f4c..87b62ac46 100644 --- a/admin/client/src/styles/_variables.scss +++ b/admin/client/src/styles/_variables.scss @@ -277,7 +277,7 @@ $table-border-color: $gray-lighter; // For each of Bootstrap's buttons, define text, background and border color. $btn-padding-x: .7692rem; // 10px -$btn-padding-y: .4615rem; // 6px +$btn-padding-y: .3846rem; // 5px $btn-font-weight: normal; $btn-primary-color: $white; diff --git a/admin/client/src/styles/legacy/_forms.scss b/admin/client/src/styles/legacy/_forms.scss index d51ccb64c..67d714146 100644 --- a/admin/client/src/styles/legacy/_forms.scss +++ b/admin/client/src/styles/legacy/_forms.scss @@ -540,7 +540,7 @@ button.loading { &.active, &:active { - box-shadow: 0 0 3px rgba(191, 194, 196, .9) inset; + box-shadow: 0 0 1px rgba(191, 194, 196, .9) inset; background: #dee3e8; color: darken($color-text, 10%); border: 0; @@ -833,6 +833,8 @@ div.switch-states{ padding-right: 0; } +.ui-button-text-only .ui-button-text { padding: 0; } + // Align buttons with input .urlsegment .update, .urlsegment .cancel { diff --git a/admin/client/src/styles/legacy/_style.scss b/admin/client/src/styles/legacy/_style.scss index 7f4957ee1..511b92996 100644 --- a/admin/client/src/styles/legacy/_style.scss +++ b/admin/client/src/styles/legacy/_style.scss @@ -65,6 +65,10 @@ body.cms { .cms-content { display: none; } + + .cms-preview { + border-left: 0; + } } // .cms-preview, @@ -211,15 +215,15 @@ body.cms { font-weight: normal; } - .breadcrumbs-wrapper { - float: left; - padding-top: $spacer-xs / 2; - } + .breadcrumbs-wrapper { + float: left; + padding-top: $spacer-xs / 2; + } } .view-controls { float: right; - margin-top: 4px; + margin-top: 5px; .icon-button-group { .icon-button { @@ -344,8 +348,6 @@ body.cms { &:active, &:focus, &:hover { - background: none; - box-shadow: none; color: darken($color-text, 10%); } @@ -1582,7 +1584,8 @@ form.member-profile-form { } .cms .cms-panel-padded .cms-content-view { - padding: $panel-padding-y $panel-padding-x; + padding: $panel-padding-y $panel-padding-x; + height: 100%; // For horizontal scrollbar on Pages sitetree at smaller sizes } .CMSPageAddController .cms-panel-padded { diff --git a/admin/client/src/styles/legacy/_tree.scss b/admin/client/src/styles/legacy/_tree.scss index b23aa341b..3a25d6e6d 100644 --- a/admin/client/src/styles/legacy/_tree.scss +++ b/admin/client/src/styles/legacy/_tree.scss @@ -164,11 +164,15 @@ li.jstree-open > ul { display: block; - margin-left: -13px; + margin-left: -15px; + margin-right: -20px; + li ul { - margin-left:2px; + margin-left: 2px; + margin-right: 0; } } + li.jstree-closed > ul { display: none; } @@ -571,6 +575,8 @@ // For drag and drop icons to not appear whilst in multi-selection .cms-tree { + padding-bottom: $panel-padding-y; + &.jstree.draggable { .jstree-no-checkboxes { li { @@ -596,6 +602,18 @@ } } + +// Scroll horizontal for sitetree +// so scrollbar is fixed to bottom of panel, and tree actions remain fixed at top +.cms-tree-holder { + overflow-x: auto; + height: calc(100% - 13px); // Magic number, need to investigate why its needed (possibly scroll bar height) + padding-left: 20px; + padding-right: 20px; + margin-left: -20px; + margin-right: -20px; +} + // Override thirdparty themes .jstree-default a .jstree-icon, .jstree-default-rtl a .jstree-icon, diff --git a/webpack.config.js b/webpack.config.js index 36e50d68b..9717dd6a1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -152,7 +152,7 @@ const config = [ 'UploadField': `${PATHS.ADMIN_CSS_SRC}/legacy/UploadField.scss`, }, output: { - path: 'admin/client/dist', + path: 'admin/client/dist/styles', filename: '[name].css', }, module: { @@ -164,26 +164,22 @@ const config = [ 'postcss?sourceMap', 'resolve-url', 'sass?sourceMap', - ], { - publicPath: '../', // needed because bundle.css is in a subfolder - }), + ]), }, { test: /\.css$/, loader: ExtractTextPlugin.extract([ 'css?sourceMap&minimize&-core&discardComments', 'postcss?sourceMap', - ], { - publicPath: '../', // needed because bundle.css is in a subfolder - }), + ]), }, { test: /\.(png|gif|jpg|svg)$/, - loader: `url?limit=10000&name=images/[name].[ext]`, + loader: `url?limit=10000&name=../images/[name].[ext]`, }, { test: /\.(woff|eot|ttf)$/, - loader: `file?name=fonts/[name].[ext]`, + loader: `file?name=../fonts/[name].[ext]`, }, ], }, @@ -191,7 +187,7 @@ const config = [ autoprefixer({ browsers: SUPPORTED_BROWSERS }), ], plugins: [ - new ExtractTextPlugin('styles/[name].css', { allChunks: true }), + new ExtractTextPlugin('[name].css', { allChunks: true }), ], }, { @@ -213,26 +209,22 @@ const config = [ 'postcss?sourceMap', 'resolve-url', 'sass?sourceMap', - ], { - publicPath: '../', // needed because bundle.css is in a subfolder - }), + ]), }, { test: /\.css$/, loader: ExtractTextPlugin.extract([ 'css?sourceMap&minimize&-core&discardComments', 'postcss?sourceMap', - ], { - publicPath: '../', // needed because bundle.css is in a subfolder - }), + ]), }, { test: /\.(png|gif|jpg|svg)$/, - loader: `url?limit=10000&name=images/[name].[ext]`, + loader: `url?limit=10000&name=../images/[name].[ext]`, }, { test: /\.(woff|eot|ttf)$/, - loader: `file?name=fonts/[name].[ext]`, + loader: `file?name=../fonts/[name].[ext]`, }, ], },