From cf5c055dede91a0da362aef8b3a9e5465af16de4 Mon Sep 17 00:00:00 2001 From: Paul Clarke Date: Wed, 21 Dec 2016 15:52:45 +1300 Subject: [PATCH] Enhancement Fix Campaign admin publish button styles missing API remove unused textures Enhancement Update legacy DB icon to match new colour Enhancement Remove Done button on import modal --- .../images/textures/bg_cms_main_content.png | Bin 2601 -> 0 bytes .../images/textures/cms_content_header.png | Bin 14612 -> 0 bytes admin/client/dist/js/bundle.js | 5 +++-- .../src/components/FormAction/FormAction.js | 5 +++++ .../CampaignAdmin/CampaignAdminList.js | 4 ++-- .../src/sprites/menu-icons/16x16/db.png | Bin 301 -> 14712 bytes .../GridField/GridFieldImportButton_Modal.ss | 4 ---- 7 files changed, 10 insertions(+), 8 deletions(-) delete mode 100644 admin/client/dist/images/textures/bg_cms_main_content.png delete mode 100644 admin/client/dist/images/textures/cms_content_header.png diff --git a/admin/client/dist/images/textures/bg_cms_main_content.png b/admin/client/dist/images/textures/bg_cms_main_content.png deleted file mode 100644 index ce265dba18b4b5a3d810383ca38b3598094932ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2601 zcmV+^3fA?BP)M@9^;R^zHHS?C|mN z^!4rV@$2sI^7Z!d_4V!X^6v8T?eFmL^z`rX^6v5R?C$UH^YiZT@$B&M?(*~P@bK#G z?(g&T>+kUE?e6gM^Y8NV@$>ZX^Yiia^q>l`>Hq)(^`U-?p)5o>($`aX342t|gaZt@`dg{_G*WLbB9iS;y|?IkXTfFWHol|a=#=2tCs)}}FLj#Kg)Jsj6} z@1ApRd~Pu=uQ^U3#901bZ}v-J9Wm{(q{t~!INFgOxo*GFld*QA++)N!rAJuYIB-h) zt}o(tG|K3G*s_3MZ?X4YzQ2cap5XHwEm$vwMtQWkOgwENhnf;kmb`D*`?MNc&f)!- z&0FSRMwhbysGNCNRfB5lvjYI%vt+G%Ugz39oiXopa1r?7bsYyg2Cr=6RBF%gZszw3 z;XX$%XR?yaA1Q-r|E{c(!Aqae|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g4-)oo)O=e8#cc#WN&A2Juluu`K_LR zUoREU31P5pS5Yt_Lh@bX3ki(25iOkGX+8p8ig-wnM`IX>8m^szv#GF`VQdFIMV`MM3Ktr;aM~N+-LpEkMZ4;E1X#)I;9Jybem8bYI#onZl+1K|_fOsoP!@KjOu0 zdQgWO%l#CX^MdYMS@wS0Ue^WZPU3q4#Ukl|EURj!A}bkA)-=lb`XYtHw)_mn$iNK^ zcC_y!$XiSzx! z63L;ua~Zp}5w4Bk=H64{j*IaO0mmK6*5S^3=vYyg=t!N;0V8)+Q;|>WXpzU z-Q$F&+m*2`Udyr&vdAVeu6>k^+u?tAyV8v*LU*V14%Dwn#Kc|Q4wMPfpN1C&#^sJJC574)bN(wfIGFm->BaK-*rvLP>SaCcccOI_LohnQx#sSaZN+yzXA*Z3V>-jL5}v{00000 LNkvXXu0mjfd^04Y diff --git a/admin/client/dist/images/textures/cms_content_header.png b/admin/client/dist/images/textures/cms_content_header.png deleted file mode 100644 index d815a26547b7c7c6338362b6436e74fd91f7308d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14612 zcmeI3&u`mg7{}jAXc~bDAr4GCAma(d1j%bVb<f}exK*{ z=lv01{PFhI^$Ued1%%Lr&5h;`{iN~I-{;TK=!v`E@6(Sb{f)g4p{JgU|Ci9`UtC0J z^@`JKM{VOR&GPys)Al-~H0t|QjgWqI8M;cAgCy^3l6YctyZz5U_~iXMKL^fBXd-A!^>%slRQllT7lz7j^_$-UbEv3 zqM9hig|gS=y83=r$PFj#C`CLneJqzGJkMlXna3Xly<}*%g-MU}i5rE~C(rfyhhF4` zhu(scS@*)ibWRK-t37wT{r=q2VYGgeBA6hZ>kM1RKEXRA^ag=N)^E~FxjgUcBd42B z&QzwjXW`h%$XQ^Eds17n6w(>e>9uN&fS8dNv^=j@PgmLY2|}UKNLH2bieXxg8*{y) z<5^Qa<9R;PG$T@{D^e{=%f+(Pk}H}lX_ES?tZ0%1lBCL+9EN8*-D8krCCMREtENol z0Ls}MbO+gHWIj+9s0Dd!OY3?;-;C-`-#j4LcMo)&Hv(n0uC#{N^8z|7QZMUxUNdkd zYfam9!^m_kve~TDhLYph+KNI}%ay89Tvn70ee2l8Rhg(oRhH~-l`Kn2IfZB#(0(d) z)3XNgewn1UA2KztpGy69;Lx+q>;X+Y`iCtsC(Wr+8%{`9=rLHibp0l$*)Dl+y7i=^ z=Om|+Zw4WW_gqap*>u@4mYq_uC)vB2X~pMR-HNvav2{Gvnhz^;PHfJjPGFiJ*caCr z9uoJg4V9)!REv{@UN;(=0a-hsYvRFndzyFJI9ou+@h?EnnVyQYb$W)9jZfF?=^54I zgH5BWfsV{fW6;!5yYxnZ)K^rstm=5SdDgM*j7YEDbm$Ha<8>+1>qr3({c592XN2 z6mVRS1~cZkn24Z&3fBmRB$+ndVx{{1ENDJmEr)~=6fLA1HP)%^PP H{oDTolK8%S diff --git a/admin/client/dist/js/bundle.js b/admin/client/dist/js/bundle.js index f39c83595..780c46554 100644 --- a/admin/client/dist/js/bundle.js +++ b/admin/client/dist/js/bundle.js @@ -327,6 +327,7 @@ t&&e.push("btn-"+t),"string"!=typeof this.props.title&&e.push("btn--no-text") var n=this.getIcon() return n&&e.push("font-icon-"+n),this.props.loading&&e.push("btn--loading"),this.props.disabled&&e.push("disabled"),"string"==typeof this.props.extraClass&&e.push(this.props.extraClass),e.join(" ")}},{ key:"getButtonStyle",value:function d(){if("undefined"!=typeof this.props.data.buttonStyle)return this.props.data.buttonStyle +if("undefined"!=typeof this.props.buttonStyle)return this.props.buttonStyle var e=this.props.extraClass.split(" ") return e.find(function(e){return e.indexOf("btn-")>-1})?null:"action_save"===this.props.name||e.find(function(e){return"ss-ui-action-constructive"===e})?"primary":"secondary"}},{key:"getIcon",value:function f(){ return this.props.icon||this.props.data.icon||null}},{key:"getLoadingIcon",value:function p(){return this.props.loading?c["default"].createElement("div",{className:"btn__loading-icon"},c["default"].createElement("span",{ @@ -2571,8 +2572,8 @@ className:c.join(" ")},u),h["default"].createElement("div",{className:"toolbar t },{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:"secondary-outline",icon:"back-in-time",disabled:!0})),h["default"].createElement("div",{ +return"open"===this.props.record.State?t=c(t,{title:$["default"]._t("Campaigns.PUBLISHCAMPAIGN"),buttonStyle:"primary",loading:this.props.campaign.isPublishing,handleClick:this.handlePublish,icon:"rocket" +}):"published"===this.props.record.State&&(t=c(t,{title:$["default"]._t("Campaigns.REVERTCAMPAIGN"),buttonStyle:"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 diff --git a/admin/client/src/components/FormAction/FormAction.js b/admin/client/src/components/FormAction/FormAction.js index e1f38aa0b..f19c58b2a 100644 --- a/admin/client/src/components/FormAction/FormAction.js +++ b/admin/client/src/components/FormAction/FormAction.js @@ -46,6 +46,7 @@ class FormAction extends SilverStripeComponent { // Add 'type' class const style = this.getButtonStyle(); + if (style) { buttonClasses.push(`btn-${style}`); } @@ -89,6 +90,10 @@ class FormAction extends SilverStripeComponent { return this.props.data.buttonStyle; } + if (typeof this.props.buttonStyle !== 'undefined') { + return this.props.buttonStyle; + } + const extraClasses = this.props.extraClass.split(' '); // defined their own `btn-${something}` class diff --git a/admin/client/src/containers/CampaignAdmin/CampaignAdminList.js b/admin/client/src/containers/CampaignAdmin/CampaignAdminList.js index 58f42c70d..c10f7cc86 100644 --- a/admin/client/src/containers/CampaignAdmin/CampaignAdminList.js +++ b/admin/client/src/containers/CampaignAdmin/CampaignAdminList.js @@ -204,7 +204,7 @@ class CampaignAdminList extends SilverStripeComponent { if (this.props.record.State === 'open') { actionProps = Object.assign(actionProps, { title: i18n._t('Campaigns.PUBLISHCAMPAIGN'), - bootstrapButtonStyle: 'primary', + buttonStyle: 'primary', loading: this.props.campaign.isPublishing, handleClick: this.handlePublish, icon: 'rocket', @@ -213,7 +213,7 @@ class CampaignAdminList extends SilverStripeComponent { // TODO Implement "revert" feature actionProps = Object.assign(actionProps, { title: i18n._t('Campaigns.REVERTCAMPAIGN'), - bootstrapButtonStyle: 'secondary-outline', + buttonStyle: 'secondary-outline', icon: 'back-in-time', disabled: true, }); diff --git a/admin/client/src/sprites/menu-icons/16x16/db.png b/admin/client/src/sprites/menu-icons/16x16/db.png index 4675fe08a86ed7a74024c9f60f029e99ce484939..f3eb44e57c081a0bffdd5581ecb6e6cf6d2434b0 100644 GIT binary patch literal 14712 zcmeI3TZ|J`7{`Yta@hzWKB&PMhLSZPv~%fwn0ABP#odIi%WjdbFEBfEc01C}l$j~* zt|p=q!03xUC=rEZBZ(2B0TW|XBq3@9ebC^8;)C$G@<2cnyavy7y6x9)%K^jVY0{l< z&-wqq@67L9Ixq9m@X+JSx>t5H46|%-AT@%oE8OprMfmTk-)<`Sva~obW;0Az)cr2F zu_$$xVPb3bOxDS!w@9j42q>C4jslfJ5vv(S?yVFRbr*8jaWttL3E$OE&-hqfOZc{j z(|o$vhjRMBw1q~ehcfE)E;X+CdXwF9MZyUR$WhozA#d1HCE=^)m2m7fb3V2zadstq zo7{qIHa*PtnHFNhfrwuff-yE44+!CSObl&cMP7(-e4Gtao=TjOQesuGelm-a?^mY1`@FgAvq_wsqQ>sUqS=kZqPM z74`4Ix3Z?)-8=e3V{)1@xjh}njw*Two7>~rs!PF}AsOGR)Mp{ZF|CYg=9Atk8=gbR z_Vu}|D$1@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d delta 254 zcmV}LP=Bz2nYy#2xN$nAs2rD8FWQhbW?9;ba!ELWdL_~cP?pe zYja~^aAhuUa%Y?FJQ@H10IEquK~y-6tJo^;?AsEbxVO4|I{JFi6ti;olPTOP_*-Cz zwSJp;f*lrJ1-3*kuxmTGmdafu&hf{OBsLX%6Dq&+8!#h(9_l7V!vFvP07*qoM6N<$ Ef_EZl*Z=?k diff --git a/templates/SilverStripe/Forms/GridField/GridFieldImportButton_Modal.ss b/templates/SilverStripe/Forms/GridField/GridFieldImportButton_Modal.ss index fca0236e2..e8de94d62 100644 --- a/templates/SilverStripe/Forms/GridField/GridFieldImportButton_Modal.ss +++ b/templates/SilverStripe/Forms/GridField/GridFieldImportButton_Modal.ss @@ -11,9 +11,5 @@ $ImportForm <% end_if %> - -