From 42f45aa1378e3529ff9d770b2fa4e7848e343f95 Mon Sep 17 00:00:00 2001 From: devin Date: Wed, 11 Apr 2012 13:46:32 +0800 Subject: [PATCH] theme setting update --- app/assets/images/sample_theme.jpg | Bin 0 -> 3744 bytes app/assets/javascripts/orbitdesktop.js | 29 +++++++++++++++---- app/assets/stylesheets/desktopmain.css | 15 +++++++++- app/assets/stylesheets/jquery.miniColors.css | 4 +-- app/assets/stylesheets/style.css.erb | 1 + app/views/desktop/settings.html.erb | 28 ++++++++++++++---- 6 files changed, 64 insertions(+), 13 deletions(-) create mode 100755 app/assets/images/sample_theme.jpg diff --git a/app/assets/images/sample_theme.jpg b/app/assets/images/sample_theme.jpg new file mode 100755 index 0000000000000000000000000000000000000000..03945979e18ac3ddfa3ff38c65443aeebc8ed5cc GIT binary patch literal 3744 zcmaJ@c{tPy7ykWb#$Xr>MyesQWXsZEEHRTMYuR&4F=WYlYe-r9SrXlneGiGTBwLy6 zhPbjX!=6?+Qr#cRB z!ogog;TV7j%%95;0MK{8bUfZ63E;g8Kis=k4avC9TKMywPZM(mnXwx8hCCh6BeuKtjw9Af7*k_PD1W*46B5TD1#ME<)bNhFoJ$!Hr z6C6#oqqFv977cUe1*SgU8Uj&vXVIVTT%A1ME_@Tgl)}9^9rfWR4@7?dY;|v!egv-z z*^RaW>4@zh4Tn|elD_8dw%uRC+bq^G-DCN%1idXkTE?CTzvcO#fsx2{9^r`J$wBIL z9~e$~^u6{PWSmBu3TWLim;s^^<1gqu(GA%h2Z|sLaT^YLJ7WaQUysL0`aL=VXK6a% z;cV0wwRt#KM+$y};h^vwe^1u>h+m#X+Yf;hhn~u{C+q9_To}pH1 zh^1!OEh482x-hv~VYaHnm%qSJW4$EM`BdmDn{4qJUn&2(Fuwuou{Ma*?Wibd3nY+TMvd(pFDlPSx+vd@`=a7PVMyY|_X%!t0aNz9LzlIdWa9R! z6E9dg$V5uhjRET%x7gA4`N+`0Z+o0X>m^WMyZ>pKNe4TzIn8Cy6&|A9z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HeEOl{Gmfc(IywPWW1)Q<0dB)lJE@x@ReYxJZ$HEZ9_^7t7&uj@dUSusy zVe!tu?Q7rZ-WJNKXA*i{w!IE46p$a}lN#Nl`wB|Wm7E-_z&p)R&lveIloBO%QbjqP zQraP~>Neo&RC%-ZNZPJBGle)Q6yudy8}v+E1WHORy?%OpRUVm9DtZak9IaQR`G+e50& z!wf3_Bfn%39AKK>O^Md)VVmIKrCI-aPq_1w&VFK)8wA@iq`eND(2att`*fFSc6_Q! z{~X8fZ!*6um`Iuy_VG%*@jMvfkV2?n!e(KrLz(5ky<8J79V7Q$+OW)!l~v8qGPK~I zE|HWHw~FaX3x@!wG})!1RLKREv+35roO#9Gc`!1xq$)N4Ou=z`dO0}Y*8uOmV0P?+ z#DZ5P)XGx9jj68j1ZKKZ2LR&Z+t5j^5g+y2JW>-mr@eu`3+>`e3Dsgbt4}bl)QX*# z!1qBb^cN?|Q$Mp|XE|}3wq) zU;4A-A|f?z9+i|6X?A0O!L+sf+)WPwrp>gmE3(SJG12^V#~&1gIj4lCGVtg(StpztcuEOt*e^tK1j zi8H}QYcYNa<_BQ~Zl4)PqwE(fC1eA?FteVe_^kY4VKYV&lDc_vN$T1<&y`mHMRwi8 Gv3~)8I*v#H literal 0 HcmV?d00001 diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 2c79bb90..eb2ed07c 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -292,8 +292,10 @@ var orbitDesktop = function(dom){ o.currenthtml = target; o.currentface = "settings"; var bindHandlers = function(){ - $("select#change_theme").change(function(){ - o.changeTheme($(this).val()); + $(".theme_list > li").click(function(){ + o.changeTheme($(this).find('.theme_name').text()); + $(".theme_list > li").removeClass('thmc1').data('clicked',null); + $(this).addClass('thmc1').data('clicked',true); }); $('.tinycanvas').each(function(){ @@ -312,9 +314,9 @@ var orbitDesktop = function(dom){ var target = $(this).attr('href'); $anchor - .removeClass('thmc2 thmtxt admtxt') - .addClass('admtxt'); - $(this).toggleClass('thmc2 thmtxt admtxt'); + .removeClass('thmc2 thmtxt admtxt admbg') + .addClass('admtxt admbg'); + $(this).toggleClass('thmc2 thmtxt admtxt admbg'); $tabcontent.hide(); $(target).show(); $('.tinycanvas').tinyscrollbar_update(); @@ -330,6 +332,23 @@ var orbitDesktop = function(dom){ }); + $('.theme_list li').hover(function(){ + $(this) + .addClass('thmc1') + .find('.theme_name') + .addClass('thmtxt'); + }, function(){ + var c = 'thmc1', + t = 'thmtxt'; + if( $(this).data('clicked') ){ + t = '', c = ''; + } + $(this) + .removeClass(c) + .find('.theme_name') + .removeClass(t); + }); + } // if(!o.desktopData[o.currentface]){ $(o.contentHolder).empty().load("/desktop/"+target,function(){ diff --git a/app/assets/stylesheets/desktopmain.css b/app/assets/stylesheets/desktopmain.css index 545d69cc..63fb12d1 100644 --- a/app/assets/stylesheets/desktopmain.css +++ b/app/assets/stylesheets/desktopmain.css @@ -1,4 +1,3 @@ -@import url(http://fonts.googleapis.com/css?family=Cuprum); /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) @@ -247,10 +246,24 @@ a:focus { outline: none; } .s_tab ul { overflow: hidden; } .s_tab li { float: left; } .s_tab a { display: block; } +.s_tab .admbg { background-color: #f0f0f0; } .st_c { display: none; } .st_c:first-child { display: block; } /* Setting Page */ +.theme_list {} +.theme_list li { + display: inline-block; + vertical-align: top; + margin: 0 0 24px 0; + padding: 6px 0px; + width: 132px; + text-align: center; + cursor: pointer + } +.theme_thumb { border: solid 1px #fff; width: 120px; margin: 0 auto; } +.theme_thumb img { display: block; } +.theme_name { font-size: 15px; padding: 8px 6px; display: block; } .theme_preview { width: 528px; height: 150px; line-height: 36px; font-size: 15px; } .theme_plate { overflow: hidden; } .theme_plate > div { float: left; margin-right: 12px; } diff --git a/app/assets/stylesheets/jquery.miniColors.css b/app/assets/stylesheets/jquery.miniColors.css index bfc06d39..831da6f8 100755 --- a/app/assets/stylesheets/jquery.miniColors.css +++ b/app/assets/stylesheets/jquery.miniColors.css @@ -19,8 +19,8 @@ } .miniColors-selector.black { - background: #000; - border-color: #000; + background: #222; + border-color: #222; } .miniColors-colors { diff --git a/app/assets/stylesheets/style.css.erb b/app/assets/stylesheets/style.css.erb index d2e33b04..0440dcde 100644 --- a/app/assets/stylesheets/style.css.erb +++ b/app/assets/stylesheets/style.css.erb @@ -1,3 +1,4 @@ +@import url(http://fonts.googleapis.com/css?family=Cuprum); @font-face{ font-family: 'WebSymbolsRegular'; src: url(<%= asset_path 'websymbols-regular-webfont.eot' %>); diff --git a/app/views/desktop/settings.html.erb b/app/views/desktop/settings.html.erb index 293c80af..8f0fda2e 100644 --- a/app/views/desktop/settings.html.erb +++ b/app/views/desktop/settings.html.erb @@ -21,14 +21,32 @@
-
-
try
+
+
+
    +
  • default
  • +
  • snake
  • +
  • sexy
  • +
  • vintage
  • +
  • Woodstock westwood allenwood
  • +
  • chris
  • +
  • Wood
  • +
  • Wood
  • +
  • Wood
  • +
  • Wood
  • +
  • Wood
  • +
  • Wood
  • +
  • Wood
  • +
  • Wood
  • +
  • Wood
  • +
+
Preview
@@ -77,7 +95,7 @@
-