minor update

This commit is contained in:
devin chen 2013-05-21 14:44:14 +08:00 committed by saurabhbhatia
parent 3cde26ca4a
commit ff375f0c5c
2 changed files with 12 additions and 12 deletions

View File

@ -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;

View File

@ -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":""});