From 989e5aa974f1380c7cf79b7397b7916ef6be44cc Mon Sep 17 00:00:00 2001 From: devin chen Date: Wed, 10 Apr 2013 17:05:12 +0800 Subject: [PATCH] minor update --- app/assets/javascripts/orbitdesktop.js | 15 ++++++++++++++- app/assets/stylesheets/desktop/desktop-main.css | 5 +++-- app/assets/stylesheets/desktop/desktop-main.scss | 8 +++++++- app/views/desktop/desktop.html.erb | 6 +----- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 7f617863..b3241fbd 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -712,6 +712,19 @@ var orbitDesktop = function(dom){ dragged.removeClass("noClick"); }); + var element = $('.gridster li'); + $.each(element, function(i){ + if($(this).attr("data-category")=="app" && $(this).find('.text_wrapper').length < 1){ + $(this).find('.appname').wrapInner(''); + var w = $(this).find('.text_wrapper').width(); + if (w > 96){ + var text = $(this).find('.text_wrapper').text(); + slice = text.substr(0,12); + $(this).find('.text_wrapper').attr('title',text).text(slice+'...'); + } + } + }); + o.simple_drop_down(); o.tinyscrollbar_ext({ main: '.tinycanvas' @@ -791,7 +804,7 @@ var orbitDesktop = function(dom){ tempstyle = "style='display:none;'"; $("#desktop #section_heading").text(section.name); } - $("#desktop #section_list").append($('
  • '+section.name+'
  • ')); + $("#desktop #section_list").append($('
  • '+section.name+'
  • ')); }); bindSecondaryHandlers(); }else{ diff --git a/app/assets/stylesheets/desktop/desktop-main.css b/app/assets/stylesheets/desktop/desktop-main.css index 19220ecf..01acfd9f 100644 --- a/app/assets/stylesheets/desktop/desktop-main.css +++ b/app/assets/stylesheets/desktop/desktop-main.css @@ -295,7 +295,7 @@ a:focus { .fn_des.admtxt { line-height: 60px; - padding: 0 6px; + padding: 0 12px; font-size: 15px; position: absolute; z-index: 9; @@ -416,7 +416,8 @@ a:focus { position: absolute; left: 0; bottom: 0; - z-index: 3; } + z-index: 3; + white-space: nowrap; } [data-sizex="1"] .appname, .w1.h1 .appname { text-align: center; } [data-sizey="2"] .appname { diff --git a/app/assets/stylesheets/desktop/desktop-main.scss b/app/assets/stylesheets/desktop/desktop-main.scss index b89c3d10..d0dc77e9 100644 --- a/app/assets/stylesheets/desktop/desktop-main.scss +++ b/app/assets/stylesheets/desktop/desktop-main.scss @@ -231,7 +231,7 @@ a:focus { outline: none; } } .fn_des.admtxt { line-height: 60px; - padding: 0 6px; + padding: 0 12px; font-size: 15px; position: absolute; z-index: 9; @@ -385,6 +385,7 @@ a:focus { outline: none; } left: 0; bottom: 0; z-index: 3; + white-space: nowrap; [data-sizex="1"] &, .w1.h1 & { @@ -459,6 +460,11 @@ a:focus { outline: none; } cursor: move; overflow: hidden; } +// .app.gs_w:active { +// -webkit-transform: scale(0.9); +// -moz-transform: scale(0.9); +// transform: scale(0.9); +// } /* header drop menu */ .sdm_mdr .sdm_o { top: 36px; } diff --git a/app/views/desktop/desktop.html.erb b/app/views/desktop/desktop.html.erb index d34a1665..0426feee 100644 --- a/app/views/desktop/desktop.html.erb +++ b/app/views/desktop/desktop.html.erb @@ -2,13 +2,9 @@