From a0b22761c7be70e04c83d6e8bf0071f13dd83a89 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Sat, 23 Feb 2013 17:12:02 +0800 Subject: [PATCH] css minor changes. --- app/assets/javascripts/orbitdesktop.js | 13 +++++++------ app/assets/stylesheets/desktopmain.css | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index d46728d0..a4f58b7c 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -39,6 +39,7 @@ var orbitDesktop = function(dom){ this.tp = ""; this.sectionList; this.data_method; + this.gridvar = null; this.initialize = function(){ var theme = o.theme; @@ -423,21 +424,21 @@ var orbitDesktop = function(dom){ var row = 1,col = 1,x = 1,y = 1; var $group = $('
'); var $ul = $(''); + $.each(tiles,function(i,tile){ if(row >= 4){ row = 1; col++; } - var shape = tile.shape.split(" "); x = parseInt(shape[0].substr(1,1)); y = parseInt(shape[1].substr(1,1)); var tilecolor = tilecolors[Math.floor(Math.random()*tilecolors.length)]; var op = opacity[Math.floor(Math.random()*opacity.length)]; if(tile.data_category == "app") - $li = $('
  • '+tile.title+'

  • '); + $li = $('
  • '+tile.title+'

  • '); else - $li = $('
  • Loading...

    '+tile.title+'

  • '); + $li = $('
  • Loading...

    '+tile.title+'

  • '); row = row + y; @@ -446,11 +447,11 @@ var orbitDesktop = function(dom){ $group.append($ul); console.log($group); $("div#desktop div#group_wrapper").append($group); - $(".grid ul").gridster({ + o.gridvar = $(".grid ul").gridster({ widget_margins: [6, 6], widget_base_dimensions: [120, 120] }); - bindHandlers(); + bindHandlers(); o.initializeWidgets(); }) // var tilecolors = o.themesettings.tilecolor; @@ -1218,7 +1219,7 @@ var orbitDesktop = function(dom){ }) }; this.initializeWidgets = function(){ // this function will initialize all the widgets in the desktop - var elements = $("#group_wrapper li.tile"); + var elements = $("#group_wrapper li.element"); $.each(elements,function(){ var widget = $(this); if(widget.attr("data-category")=="widget"){ diff --git a/app/assets/stylesheets/desktopmain.css b/app/assets/stylesheets/desktopmain.css index 5263b351..54d85690 100644 --- a/app/assets/stylesheets/desktopmain.css +++ b/app/assets/stylesheets/desktopmain.css @@ -388,9 +388,9 @@ a:focus { outline: none; } .hp { padding-left: 12px; padding-right: 12px; } .vp { padding-top: 12px; padding-bottom: 12px; } .element { - margin: 0 12px 12px 0; - float: left; - position: relative; + /*margin: 0 12px 12px 0; + float: left;*/ + position: absolute; /*display:inline-block;*/ } .group{