From bc6ea2ec0ee7dcfb182a9617306468e73d42bc73 Mon Sep 17 00:00:00 2001 From: Felipe Skroski Date: Wed, 29 Feb 2012 16:42:57 +1300 Subject: [PATCH] MINOR: (SSF-106) started on styling the filter bar on the datagrid --- css/GridField.css | 3 ++- forms/gridfield/GridFieldFilter.php | 4 ++-- images/icons/filter-icons.png | Bin 0 -> 1386 bytes scss/GridField.scss | 8 +++++++- 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 images/icons/filter-icons.png diff --git a/css/GridField.css b/css/GridField.css index 830e33de3..a0f85745a 100644 --- a/css/GridField.css +++ b/css/GridField.css @@ -37,7 +37,8 @@ .cms table.ss-gridfield-table tr th button.ss-gridfield-sort:hover { color: #fff !important; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } .cms table.ss-gridfield-table tr th button.ss-gridfield-sort { background: transparent url(../images/arrows.png) no-repeat right 6px; border: none; width: 100%; text-align: left; padding: 4px 0; text-shadow: rgba(0, 0, 0, 0.3) 0px -1px 0; color: #fff; -moz-border-radius: 0; -webkit-border-radius: 0; -o-border-radius: 0; -ms-border-radius: 0; -khtml-border-radius: 0; border-radius: 0; } .cms table.ss-gridfield-table tr th button.ss-gridfield-sort:hover { background-position: right -34px; } -.cms table.ss-gridfield-table tr th button.ss-gridfield-sort.ss-gridfield-sorted { background-position: right -116px; } +.cms table.ss-gridfield-table tr th button.ss-gridfield-sort.ss-gridfield-sorted-desc { background-position: right -72px; } +.cms table.ss-gridfield-table tr th button.ss-gridfield-sort.ss-gridfield-sorted-asc { background-position: right -116px; } .cms table.ss-gridfield-table tr th input.ss-gridfield-sort { padding: 2px; } .cms table.ss-gridfield-table tr th input.ss-gridfield-sort:focus { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } .cms table.ss-gridfield-table tr td { border-right: 1px solid rgba(0, 0, 0, 0.1); padding: 6.4px 12px; color: #666666; } diff --git a/forms/gridfield/GridFieldFilter.php b/forms/gridfield/GridFieldFilter.php index c1b1d2dd2..acf2c4859 100644 --- a/forms/gridfield/GridFieldFilter.php +++ b/forms/gridfield/GridFieldFilter.php @@ -84,8 +84,8 @@ class GridFieldFilter implements GridField_HTMLProvider, GridField_DataManipulat $resetbutton = new GridField_Action($gridField, 'reset', _t('GridField.ResetFilter', "Reset"), 'reset', null) ); - $filterbutton->addExtraClass('gridfield-button-filter'); - $resetbutton->addExtraClass('gridfield-button-reset'); + $filterbutton->addExtraClass('ss-gridfield-button-filter'); + $resetbutton->addExtraClass('ss-gridfield-button-reset'); } $field->iteratorProperties($currentColumn-1, count($columns)); diff --git a/images/icons/filter-icons.png b/images/icons/filter-icons.png new file mode 100644 index 0000000000000000000000000000000000000000..8ccd35f6f85cec05179b72c1246bf56fa6df4bbf GIT binary patch literal 1386 zcmeAS@N?(olHy`uVBq!ia0vp^Dj+ro8<0G>_)Hp*k}PqJC<)F_D=AMbN@Z|N$xljE z@XSq2PYp^XQ2>tmIipR1P$QlnRqTL9F}z+huvQIMFNom!%h zl$xHIXRGvn_kJaX%oJOta8q9c-vZ~}1OnC3`ysn+hwS0lBFq zi3%0DIeEoa6}C!XbFF}Ekg&dz0$52&wyhGxQ4ziY3eNdOsS2ig2D-@xW(EpohI)p^ zCg$emItoSxh6efuM*4KTB%1XJkii(hGOE?jkSNl+@ny;uz{4yi0i z)elN7&Mz%W21Z<(GRUd|E9aur#FG4?ko^1{SSSW$|Z5PIEk>IEf*+ybD@E~!PCWvMA{Mftf3U@u!`;&zKOPV=C8 zQ*gV*1*cwppkwqw5sMVjFd<;-0Wsmp7RZ4o{M0;PYA*sN>kl6c4>2$>-t%;E45_%4 zl(v9BfFUVefrEpOkFVnEtEty^m%snfkR;#m!5e(NGDMa6~k9lRfA&R}3ov2gowVWD&NggYDMJAOC*u<=>2e*Jp+6@9$R8aX>; z8!GJe+#O|&Z?cthZXKg-IKr%ris^YUJGDx07z zAb;SQhRSgjy@(A98bjD;&Yo@UJX674#$g)sCvk?AtZ&}DiLte{HM`-IWGAq{-I7ac z>i?5HS_Tbn7wZ$E0*|THzq_+DCF6{#Lc4$jgENCji*&;en+v?Z8%r2XQp5r#EN~1w zx?stYC!MZ+Z;y71Ph;_AuzF@^lJYEg*4_p?|Awa;3fIMFEq36Ha10JMmYnw4Z=Ovi zcfZ${4CcTKCQlt&1(+;f*-S91`10c7+NYFVdQ&MBb@02%`4hX4Qo literal 0 HcmV?d00001 diff --git a/scss/GridField.scss b/scss/GridField.scss index 68c906446..cc2267044 100644 --- a/scss/GridField.scss +++ b/scss/GridField.scss @@ -227,9 +227,15 @@ $gf_grid_x: 16px; &:hover { background-position: right -34px; } - &.ss-gridfield-sorted { + &.ss-gridfield-sorted-desc { + background-position: right -72px; + } + &.ss-gridfield-sorted-asc { background-position: right -116px; } + } + &.ss-gridfield-button-filter{ + background: transparent url(../images/icons/filter-icons.png) no-repeat right 6px; } } input {