From 6e9effdb9f3b20ddfabf739e89bc6d71079f3756 Mon Sep 17 00:00:00 2001 From: devin chen Date: Tue, 21 May 2013 14:44:14 +0800 Subject: [PATCH] minor update --- app/assets/javascripts/jquery.gridster.js | 2 +- app/assets/javascripts/orbitdesktop.js | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/jquery.gridster.js b/app/assets/javascripts/jquery.gridster.js index 367c3b0e7..5c08c324d 100755 --- a/app/assets/javascripts/jquery.gridster.js +++ b/app/assets/javascripts/jquery.gridster.js @@ -2836,7 +2836,7 @@ */ fn.move_widget_down = function($widget, y_units) { - if (y_units <= 0) { + if (y_units <= 1) { // <= 0 return false; } var el_grid_data = $widget.coords().grid; diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 72f23f43d..dcbadcf6f 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -656,8 +656,8 @@ var orbitDesktop = function(dom){ var bindHandlers = function(){ // this function will bind all the handlers in the desktop var dragged = null,draggable,lastpos = []; /* Hotfix - Part 1 */ - var items = $(".gridster ul li"); - items.detach(); + // var items = $(".gridster ul li"); + // items.detach(); o.gridvar = $(".grid ul").find("> li ") .mousedown(function(e){ @@ -689,7 +689,7 @@ var orbitDesktop = function(dom){ // } // }); // } - $('.tinycanvas').tinyscrollbar_update(); + $('.tinycanvas').tinyscrollbar_update('relative'); var newpos = o.gridvar.serialize(); $.post("/desktop/newpositions",{"newpositions":newpos}); } @@ -698,14 +698,14 @@ var orbitDesktop = function(dom){ .data('gridster'); /* Hotfix - Part 2 */ - $.each(items , function (i, e) { - var item = $(this); - var columns = parseInt(item.attr("data-sizex")); - var rows = parseInt(item.attr("data-sizey")); - var col = parseInt(item.attr("data-col")); - var row = parseInt(item.attr("data-row")); - o.gridvar.add_widget(item, columns, rows, col, row); - }); + // $.each(items , function (i, e) { + // var item = $(this); + // var columns = parseInt(item.attr("data-sizex")); + // var rows = parseInt(item.attr("data-sizey")); + // var col = parseInt(item.attr("data-col")); + // var row = parseInt(item.attr("data-row")); + // o.gridvar.add_widget(item, columns, rows, col, row); + // }); var revertbacktiles = function(){ lastpos.push({"col":"","row":""});