From 74f083b226c7865f0ce978a9df3275278d789cd5 Mon Sep 17 00:00:00 2001 From: devin Date: Fri, 6 Apr 2012 04:42:20 +0800 Subject: [PATCH] details changed orbitdesktop.js, orbitdesktopAPI.js update! --- app/assets/javascripts/orbitdesktop.js | 35 ++++++++--- app/assets/javascripts/orbitdesktopAPI.js | 9 ++- app/assets/stylesheets/desktopmain.css | 68 ++++++++++++++------ app/views/desktop/app_manager.html.erb | 2 +- app/views/desktop/desktop.html.erb | 77 +++++++++-------------- app/views/desktop/index.html.erb | 12 ++-- app/views/desktop/sections.html.erb | 14 ++--- app/views/desktop/settings.html.erb | 23 ++++++- 8 files changed, 149 insertions(+), 91 deletions(-) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index a274d055..38da1284 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -65,7 +65,7 @@ var orbitDesktop = function(dom){ if(o.currenthtml!=target){ o.desktopData[o.currentface] = $(o.contentHolder).html(); $("#content").hide("drop",o.transitionTime,function(){ - o.initializeSectionsManager(target); + o.initializeSettings(target); }); } }); @@ -132,6 +132,7 @@ var orbitDesktop = function(dom){ }); $('#holder').tinyscrollbar({ axis: 'x'}); + sdm(); } if(!o.desktopData[o.currentface]){ $(o.contentHolder).empty().load("/desktop/"+target,function(){ @@ -219,11 +220,14 @@ var orbitDesktop = function(dom){ } else $("#"+$(this).attr("data-category")).append(element); - } + }, + over:function(){ + $(this).find('span.tile').removeClass('op06'); + }, + out:function(){ + $(this).find('span.tile').addClass('op06'); + } }); - $(".section_label ul li:not(:nth-child(1)) span.tile").hover(function(){ - $(this).toggleClass("op06"); - })//.mouseleave(function(){$(this).addClass("op06");}); $('#holder').tinyscrollbar({ axis: 'x'}); }; if(!o.desktopData[o.currentface]){ @@ -283,7 +287,7 @@ var orbitDesktop = function(dom){ }; this.initializeSettings = function(target){ o.currenthtml = target; - o.currentface = "sections"; + o.currentface = "settings"; if(!o.desktopData[o.currentface]){ $(o.contentHolder).empty().load("/desktop/"+target,function(){ // bindHandlers(); @@ -301,6 +305,7 @@ orbitDesktop.prototype.themefolder = "themes"; // devin (function(){ $(document).ready(function(){ + // dock effect var $widget_fn = $('.widget_fn'), $fn_des = $('.fn_des'); @@ -324,8 +329,20 @@ orbitDesktop.prototype.themefolder = "themes"; $fn_des.stop(true, true).fadeOut(); }); - }); - +}()); -}()); \ No newline at end of file +// Simple Dropdown Menu +function sdm(){ + var $sdm = $('.sdm'); + + if( !$sdm.children('.sdm_o') ){ + return; + } else { + $sdm.hover(function(){ + $(this).addClass('thmc2'); + }, function(){ + $(this).removeClass('thmc2'); + }); + } +} \ No newline at end of file diff --git a/app/assets/javascripts/orbitdesktopAPI.js b/app/assets/javascripts/orbitdesktopAPI.js index 282f9dc8..f2db7114 100644 --- a/app/assets/javascripts/orbitdesktopAPI.js +++ b/app/assets/javascripts/orbitdesktopAPI.js @@ -17,7 +17,7 @@ var orbitDesktopAPI = function(){ o = this; this.notify = function(msg,type,time){ var $notify = $("#orbitnote"); - var img; + var img, n_height; if(!type)type=""; switch(type){ case "alert": @@ -35,8 +35,13 @@ var orbitDesktopAPI = function(){ } $notify.find("img#note_img").attr("src","/assets/"+img); $notify.find(".note_message").text(msg); + n_height = $notify.outerHeight(); if(!time)time=5000; else time=time*1000; - $notify.slideDown().delay(time).slideUp(); + $notify + .css({'top':-n_height, 'display':'block', 'opacity':0}) + .animate({top:0,opacity:1},200) + .delay(time) + .animate({top:-n_height,opacity:0},200); }; }; diff --git a/app/assets/stylesheets/desktopmain.css b/app/assets/stylesheets/desktopmain.css index c2f58e6a..f9930737 100644 --- a/app/assets/stylesheets/desktopmain.css +++ b/app/assets/stylesheets/desktopmain.css @@ -154,7 +154,35 @@ a, a:hover { text-decoration: none; } height:516px; } -.appname { font-size: 15px; } +.appname { + font-size: 15px; + height: 30px; + line-height: 30px; + overflow: hidden; + cursor: default; + z-index: 2; + } +.w1.h1 .appname { text-align: center; } +.w2.h2 .appname { font-size: 21px; } +.appicon { + display: block; + width: 60px; + height: 60px; + margin: 0 auto; + position: relative; + } +.appholder { + position: relative; + padding-bottom: 12px; + } +.holder_f { + position: absolute; + width: 100%; + height: 100%; + padding: 0; + left: 0; + top: 0; + } .dtitle { font-size: 30px; line-height: 60px; @@ -163,22 +191,8 @@ a, a:hover { text-decoration: none; } position: relative; z-index: 9; } -.dtitle:hover { - /* $(this).addClass( .thmc1 or .thmc2 ); */ - } -.dtitle:hover .section_slc { display: block; } -.section_slc { - display: none; - position: absolute; - width: 252px; - left: 0; - top: 60px; - font-size: 15px; - line-height: 34px; - } -.section_slc li { border-top: solid 1px #f2f2f2; padding: 0 12px; } -.section_slc li:first-child { border: none; } -.section_slc li:hover { background-color: #F0F0F0; } +/*.section_slc { width: 252px; }*/ + .admbg { background-color: #fff; } .admtxt { color: #666; } .admtxt:hover { color: #666; } @@ -198,6 +212,21 @@ a, a:hover { text-decoration: none; } left: 0; top: 0; } + +/* simple dropdown menu */ +.sdm {} +.sdm:hover .sdm_o { display: block; } +.sdm_o { + display: none; + position: absolute; + left: 0; + top: 60px; + font-size: 15px; + } +.sdm_o li { border-top: solid 1px #f2f2f2; } +.sdm_o li:first-child { border: none; } +.sdm_o .admtxt { display: block; line-height: 36px; } +.sdm_o .admtxt:hover { background-color: #F0F0F0; } /* theme color opacity */ .op10 { opacity: 1; } .op09 { opacity: 0.9; } @@ -231,6 +260,7 @@ a, a:hover { text-decoration: none; } .element { margin: 0 12px 12px 0; float: left; + position: relative; /*display:inline-block;*/ } .group{ @@ -250,7 +280,7 @@ a, a:hover { text-decoration: none; } max-width: 340px; } .g_sep { width: 11px; border-left: solid 1px #fff; } -.appicon { width: 60px; height: 60px; } + .clear { clear: both; } @@ -270,7 +300,7 @@ a, a:hover { text-decoration: none; } /* Orbit Notification */ #orbitnote { - position: absolute; + position: fixed; top: 0; left: 50%; margin-left: -206px; diff --git a/app/views/desktop/app_manager.html.erb b/app/views/desktop/app_manager.html.erb index d8948c39..7690d051 100755 --- a/app/views/desktop/app_manager.html.erb +++ b/app/views/desktop/app_manager.html.erb @@ -13,7 +13,7 @@
-
+
diff --git a/app/views/desktop/desktop.html.erb b/app/views/desktop/desktop.html.erb index c852ded9..d438bc69 100755 --- a/app/views/desktop/desktop.html.erb +++ b/app/views/desktop/desktop.html.erb @@ -1,67 +1,52 @@