From 2d5aa7ce0e4b4344172901d6990ca75156f83ed2 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Wed, 21 Dec 2016 12:26:01 +1300 Subject: [PATCH] Fix Campaign List toggle (Fixes #6067) --- admin/client/dist/js/bundle.js | 8 ++++---- admin/client/dist/styles/bundle.css | 4 ++-- admin/client/src/components/Accordion/Accordion.scss | 3 ++- admin/client/src/components/Accordion/AccordionBlock.js | 9 ++++++--- admin/client/src/components/Modal/Modal.scss | 1 - 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/admin/client/dist/js/bundle.js b/admin/client/dist/js/bundle.js index f80f88bc8..e21cf897a 100644 --- a/admin/client/dist/js/bundle.js +++ b/admin/client/dist/js/bundle.js @@ -2609,10 +2609,10 @@ i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Obj n(262) -var f=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"render",value:function n(){var e=this.props.groupid+"_Header",t=this.props.groupid+"_Items",n="#"+t,i={ -id:t,"aria-expanded":!0,className:"list-group list-group-flush collapse in",role:"tabpanel","aria-labelledby":e} -return u["default"].createElement("div",{className:"accordion__block"},u["default"].createElement("a",{className:"accordion__title","data-toggle":"collapse",href:n,"aria-expanded":"true","aria-controls":t, -id:e,role:"tab"},this.props.title),u["default"].createElement("div",i,this.props.children))}}]),t}(d["default"]) +var f=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"render",value:function n(){var e=this.props.groupid+"_Header",t=this.props.groupid+"_Items",n=t.replace(/\\/g,"_"),i=e.replace(/\\/g,"_"),r="#"+n,a={ +id:n,"aria-expanded":!0,className:"list-group list-group-flush collapse in",role:"tabpanel","aria-labelledby":e} +return u["default"].createElement("div",{className:"accordion__block"},u["default"].createElement("a",{className:"accordion__title","data-toggle":"collapse",href:r,"aria-expanded":"true","aria-controls":t, +id:i,role:"tab"},this.props.title),u["default"].createElement("div",a,this.props.children))}}]),t}(d["default"]) t["default"]=f},function(e,t){e.exports=BootstrapCollapse},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")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called") diff --git a/admin/client/dist/styles/bundle.css b/admin/client/dist/styles/bundle.css index fe698e088..3609d690f 100644 --- a/admin/client/dist/styles/bundle.css +++ b/admin/client/dist/styles/bundle.css @@ -14911,8 +14911,9 @@ div.TreeDropdownField a.jstree-loading .jstree-pageicon{ color:#4f5861; } -.accordion__title .collapsed:before{ +.accordion__title.collapsed:before{ content:"6"; + display:block; } .field-group-component>.form-group{ @@ -16195,7 +16196,6 @@ input.checkbox,input.radio,input[type=checkbox],input[type=radio]{ .modal__response--error,.modal__response--good{ font-size:1.23rem; - font-weight:300; } .modal__response--error span:before,.modal__response--good span:before{ diff --git a/admin/client/src/components/Accordion/Accordion.scss b/admin/client/src/components/Accordion/Accordion.scss index f09136cb8..0adf13571 100644 --- a/admin/client/src/components/Accordion/Accordion.scss +++ b/admin/client/src/components/Accordion/Accordion.scss @@ -42,7 +42,8 @@ } } - .collapsed::before { + &.collapsed::before { content: "6"; + display: block; } } diff --git a/admin/client/src/components/Accordion/AccordionBlock.js b/admin/client/src/components/Accordion/AccordionBlock.js index 50815e970..61263c72f 100644 --- a/admin/client/src/components/Accordion/AccordionBlock.js +++ b/admin/client/src/components/Accordion/AccordionBlock.js @@ -8,9 +8,12 @@ class AccordionBlock extends SilverStripeComponent { render() { const headerID = `${this.props.groupid}_Header`; const listID = `${this.props.groupid}_Items`; - const href = `#${listID}`; + const listIDAttr = listID.replace(/\\/g, '_'); + const headerIDAttr = headerID.replace(/\\/g, '_'); + const href = `#${listIDAttr}`; + const groupProps = { - id: listID, + id: listIDAttr, 'aria-expanded': true, className: 'list-group list-group-flush collapse in', role: 'tabpanel', @@ -23,7 +26,7 @@ class AccordionBlock extends SilverStripeComponent { href={href} aria-expanded="true" aria-controls={listID} - id={headerID} + id={headerIDAttr} role="tab" >{this.props.title} diff --git a/admin/client/src/components/Modal/Modal.scss b/admin/client/src/components/Modal/Modal.scss index 6cdd9177d..6b197b91e 100644 --- a/admin/client/src/components/Modal/Modal.scss +++ b/admin/client/src/components/Modal/Modal.scss @@ -73,7 +73,6 @@ .modal__response--good, .modal__response--error { font-size: $font-size-lg; - font-weight: 300; span::before { font-family: silverstripe;