From 343b9933fa6918f6a56ccc5ef6af845864c1ae11 Mon Sep 17 00:00:00 2001 From: Isaac Norman Date: Fri, 20 Feb 2015 12:31:53 +1100 Subject: [PATCH] Updated the datepicker to support the latest release from activeadmin github --- Gemfile.lock | 128 ++++++++++-------- .../datepicker/datepicker-input-icon.png | Bin 0 -> 1535 bytes .../images/active_admin/nested_menu_arrow.gif | Bin 0 -> 70 bytes .../active_admin/nested_menu_arrow_dark.gif | Bin 0 -> 70 bytes app/assets/images/active_admin/orderable.png | Bin 0 -> 220 bytes .../components/_date_picker.css.scss | 56 +++++--- 6 files changed, 114 insertions(+), 70 deletions(-) create mode 100644 app/assets/images/active_admin/datepicker/datepicker-input-icon.png create mode 100644 app/assets/images/active_admin/nested_menu_arrow.gif create mode 100644 app/assets/images/active_admin/nested_menu_arrow_dark.gif create mode 100644 app/assets/images/active_admin/orderable.png diff --git a/Gemfile.lock b/Gemfile.lock index d2e0ebc..15ca481 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,87 +1,107 @@ PATH remote: . specs: - flattened_active_admin (0.0.1) - rails (>= 4.0.0) + flattened_active_admin (0.0.5) + rails (>= 3.2.0) GEM remote: https://rubygems.org/ specs: - actionmailer (4.1.0) - actionpack (= 4.1.0) - actionview (= 4.1.0) - mail (~> 2.5.4) - actionpack (4.1.0) - actionview (= 4.1.0) - activesupport (= 4.1.0) - rack (~> 1.5.2) + actionmailer (4.2.0) + actionpack (= 4.2.0) + actionview (= 4.2.0) + activejob (= 4.2.0) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.0) + actionview (= 4.2.0) + activesupport (= 4.2.0) + rack (~> 1.6.0) rack-test (~> 0.6.2) - actionview (4.1.0) - activesupport (= 4.1.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.1) + actionview (4.2.0) + activesupport (= 4.2.0) builder (~> 3.1) erubis (~> 2.7.0) - activemodel (4.1.0) - activesupport (= 4.1.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.1) + activejob (4.2.0) + activesupport (= 4.2.0) + globalid (>= 0.3.0) + activemodel (4.2.0) + activesupport (= 4.2.0) builder (~> 3.1) - activerecord (4.1.0) - activemodel (= 4.1.0) - activesupport (= 4.1.0) - arel (~> 5.0.0) - activesupport (4.1.0) - i18n (~> 0.6, >= 0.6.9) + activerecord (4.2.0) + activemodel (= 4.2.0) + activesupport (= 4.2.0) + arel (~> 6.0) + activesupport (4.2.0) + i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) - thread_safe (~> 0.1) + thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - arel (5.0.1.20140414130214) + arel (6.0.0) builder (3.2.2) erubis (2.7.0) + globalid (0.3.2) + activesupport (>= 4.1.0) hike (1.2.3) - i18n (0.6.9) - json (1.8.1) - mail (2.5.4) - mime-types (~> 1.16) - treetop (~> 1.4.8) - mime-types (1.25.1) - minitest (5.3.3) - multi_json (1.9.3) - polyglot (0.3.4) - rack (1.5.2) - rack-test (0.6.2) + i18n (0.7.0) + json (1.8.2) + loofah (2.0.1) + nokogiri (>= 1.5.9) + mail (2.6.3) + mime-types (>= 1.16, < 3) + mime-types (2.4.3) + mini_portile (0.6.2) + minitest (5.5.1) + multi_json (1.10.1) + nokogiri (1.6.6.2) + mini_portile (~> 0.6.0) + rack (1.6.0) + rack-test (0.6.3) rack (>= 1.0) - rails (4.1.0) - actionmailer (= 4.1.0) - actionpack (= 4.1.0) - actionview (= 4.1.0) - activemodel (= 4.1.0) - activerecord (= 4.1.0) - activesupport (= 4.1.0) + rails (4.2.0) + actionmailer (= 4.2.0) + actionpack (= 4.2.0) + actionview (= 4.2.0) + activejob (= 4.2.0) + activemodel (= 4.2.0) + activerecord (= 4.2.0) + activesupport (= 4.2.0) bundler (>= 1.3.0, < 2.0) - railties (= 4.1.0) - sprockets-rails (~> 2.0) - railties (4.1.0) - actionpack (= 4.1.0) - activesupport (= 4.1.0) + railties (= 4.2.0) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.5) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.1) + loofah (~> 2.0) + railties (4.2.0) + actionpack (= 4.2.0) + activesupport (= 4.2.0) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (10.3.0) - sprockets (2.12.1) + rake (10.4.2) + sprockets (2.12.3) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.1.3) + sprockets-rails (2.2.4) actionpack (>= 3.0) activesupport (>= 3.0) - sprockets (~> 2.8) + sprockets (>= 2.8, < 4.0) sqlite3 (1.3.9) thor (0.19.1) - thread_safe (0.3.3) + thread_safe (0.3.4) tilt (1.4.1) - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) - tzinfo (1.1.0) + tzinfo (1.2.2) thread_safe (~> 0.1) PLATFORMS diff --git a/app/assets/images/active_admin/datepicker/datepicker-input-icon.png b/app/assets/images/active_admin/datepicker/datepicker-input-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..40ad6f74074ef3e705c688416b70c933b01d0316 GIT binary patch literal 1535 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&g8<1QX;1>s^BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFe_z-M3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWfo`&anSp|tp`M|! ziMhGCj)IYap@F`Ek-njkuA#Y=v5}R5fdUjL0c|TvNwW%aaf8|g1^l#~=$>Fbx5 zm+O@q>*W`v>l<2HT7t|lGSUUA&@HaaD@m--%_~-hnc$LIoLrPyP?DLSrvNfBF)6>a z#8wIDQivCF3*g4)6+?pw7-0Gpi3R$GdIlgb!4&%X;#ZoR3s+rS5|oN?FIIz#Ln;eW z^@CE2^Gl18ff1Lc46>@g%DE^tu_V7JBtJg~7K#BG`6caSW-r z)f0TyJ0wtK|NQ)W()WL)nPi=DIwrY^pZnq!v8@FQS(In6ii$MyBua;`&ANR2kl58l z9U2?z6>dFQ7V3D#>6e4I;BhvoVuRvkg;MfX^6&56mOMS-!a?Teh4*%T|8wr=++w{T zuZ5;>xxSl~mwx~D_xWqq_~TXamZ=3h*^=Kd#V+dE7I@7;U< zeNU}a{LZSk&-P3@RcZJ~r_oH1%|Y;3#D(Xd`z-njmV_u-{e3F%_)p0OyALLIpM4L^ z{P*hX?8S4kt2x~wJEU2Bb2&UTr}ktYS}NT;{kO7y@X9Z@Cw`az?!4jg)-~t2pP%D1 zZ*k(~m*c-$>|3m5E64k&%3*#^kfLKxVB+o5U+x`V*yp5}&#hR~Q)p-^YrOBAik}GA z`K1Dv&RUAA286gts6{ZYV7hfkkjctHOHx^tS+Qs8V+)z&U9&`l7ilb9C8H2&ye%|b z^mg>@>38y+t8A8Ku%ZHYWl;>!^*79{CA>8`kl6WPucWb zAIWV_Y7|mBIB)&hkH-`A4c4&fv3DF+KOb|kbn&@OYnt9&s@F|3Qe!_Cw|?s!pTA2S z?tXZGW8UoFcJtL+BIGWM^uN0=cRxoX;pV~%w!fwN4|Y{_A6-=S zJ<-H`_6+0hz6XFVdQ&MBb@05PIE A@Bjb+ literal 0 HcmV?d00001 diff --git a/app/assets/images/active_admin/nested_menu_arrow.gif b/app/assets/images/active_admin/nested_menu_arrow.gif new file mode 100644 index 0000000000000000000000000000000000000000..878357fe4c3cc8df2bccb444a16b593af2941e54 GIT binary patch literal 70 zcmZ?wbhEHbWM^PuSj51vZ{NN>d-im6bWEK(_5c6>)z#GuV4(Pug^_`Ql|cu@1F284wWg|Nnm{Cnp9lQ2fcl$iTqLpabH8)G{!0 SN9_F_s!3HE5!uq6uq-2R}L`iUdT1k0gQ7VIDN`6wR zf@f}GdTLN=VoGJ<$y6JlqB>6($B>F!Nq2UnS~H7WVKkH$xPE{oVnGSFK)CbGGY&DF zNd^l&8yr{#$`7hI9y3_<&}fE=-vO4=6ZIx{m?q~ql_?5rIrKxvgQ7~ zw@?1~|G$0@pVU;DsWK9t(|%mhSyXcE;3tk=zopr0Q0s>`v3p{ literal 0 HcmV?d00001 diff --git a/app/assets/stylesheets/flattened_active_admin/components/_date_picker.css.scss b/app/assets/stylesheets/flattened_active_admin/components/_date_picker.css.scss index 834e7a7..8bae0a5 100644 --- a/app/assets/stylesheets/flattened_active_admin/components/_date_picker.css.scss +++ b/app/assets/stylesheets/flattened_active_admin/components/_date_picker.css.scss @@ -1,7 +1,3 @@ -//= depend_on_asset "active_admin/datepicker/datepicker-nipple.png" -//= depend_on_asset "active_admin/datepicker/datepicker-header-bg.png" -//= depend_on_asset "active_admin/datepicker/datepicker-prev-link-icon.png" -//= depend_on_asset "active_admin/datepicker/datepicker-next-link-icon.png" // -------------------------------------- Date Picker .ui-datepicker { background: #fff; @@ -15,8 +11,6 @@ text-align: center; width: 160px; - background: image-url('active_admin/datepicker/datepicker-nipple.png') no-repeat 0 -40px; - a { text-decoration: none; &:hover { @@ -25,12 +19,28 @@ } .ui-datepicker-header { - background: image-url('active_admin/datepicker/datepicker-header-bg.png') no-repeat 0px 0px; - height: 12px; - padding: 16px 7px 8px; + height: 14px; + @include primary-gradient; + padding: 12px 5px 7px 4px; + margin: 0px 0px 2px 2px; + width: 147px; + border-top-left-radius: 7px; + border-top-right-radius: 7px; position: relative; z-index: 2000; + &:before { + content: ""; + position: absolute; + right: 45%; + top: -6px; + width: 0px; + height: 0px; + border-left: 8.5px solid rgba(0, 0, 0, 0); + border-right: 8.5px solid rgba(0, 0, 0, 0); + border-bottom: 10px solid #676e73; + } + .ui-datepicker-title { @include text-shadow(#000); color: #fff; @@ -39,26 +49,40 @@ font-weight: bold; line-height: 0.8em; text-align: center; + + .ui-datepicker-month { + margin: -4px 0 0 0; + } + .ui-datepicker-year { + margin: -4px 0 0 0; + } } + a { color: #fff; display: block; height: 19px; margin-top: -4px; - width: 20px; + width: 10px; &.ui-datepicker-prev { float: left; - background: image-url('active_admin/datepicker/datepicker-prev-link-icon.png') no-repeat 2px 5px; + width: 0; + height: 0; + margin: 0px 0px 0px 4px; + border-top: 5px solid transparent; + border-right: 5px solid white; + border-bottom: 5px solid transparent; } &.ui-datepicker-next { float: right; - background: image-url('active_admin/datepicker/datepicker-next-link-icon.png') no-repeat 12px 5px; - } - &:active { - margin-top: -3px; - height: 18px; + width: 0; + height: 0; + margin: 0px 4px 0px 0px; + border-top: 5px solid transparent; + border-left: 5px solid white; + border-bottom: 5px solid transparent; } span {