mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Release 0.5.2
This commit is contained in:
@@ -1,3 +1,25 @@
|
||||
<a name="v0.5.2"></a>
|
||||
### v0.5.2 (2014-06-16)
|
||||
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* **draggable:**
|
||||
* handle both touch and click events ([021a6c23](http://github.com/ducksboard/gridster.js/commit/021a6c23e851210c1b817bd353a1e5e19ce10b90), closes [#207](http://github.com/ducksboard/gridster.js/issues/207), [#236](http://github.com/ducksboard/gridster.js/issues/236), [#329](http://github.com/ducksboard/gridster.js/issues/329), [#380](http://github.com/ducksboard/gridster.js/issues/380))
|
||||
* replaced scrollX/Y with scrollLeft/Top ([bb7463a3](http://github.com/ducksboard/gridster.js/commit/bb7463a3241750397492dfbac133cea193f0254f))
|
||||
* fix offset during drag ([c726c4ad](http://github.com/ducksboard/gridster.js/commit/c726c4ad9c18fea95e4b46b9bacd36c42aa9691c))
|
||||
* bind drag events to $document ([dd6c7420](http://github.com/ducksboard/gridster.js/commit/dd6c7420087d5810a9f6b02bf9d81a04a60ae840))
|
||||
* **gridster:**
|
||||
* fix add_widget to use correct size_y when adding rows ([7d22e6c8](http://github.com/ducksboard/gridster.js/commit/7d22e6c8b201de33e33def77a93dc9009d0aa4cb))
|
||||
* Removing previously added style tags before adding new one. ([93c46ff4](http://github.com/ducksboard/gridster.js/commit/93c46ff45ebe59f3658b7f32f05b67109aa87311))
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* **draggable:**
|
||||
* allow ignore_dragging config option to be a function ([69fcfe45](http://github.com/ducksboard/gridster.js/commit/69fcfe459678e833cb53de040b9fbc96dd687543))
|
||||
* option to not remove helper on drag stop ([03910df9](http://github.com/ducksboard/gridster.js/commit/03910df967a1ae7bcb2fa3aadd58255e0bcbf327))
|
||||
|
||||
<a name="v0.5.1"></a>
|
||||
### v0.5.1 (2014-03-05)
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
/*! gridster.js - v0.5.1 - 2014-03-26
|
||||
/*! gridster.js - v0.5.2 - 2014-06-16
|
||||
* http://gridster.net/
|
||||
* Copyright (c) 2014 ducksboard; Licensed MIT */
|
||||
|
||||
|
||||
Vendored
+22
-17
@@ -1,4 +1,4 @@
|
||||
/*! gridster.js - v0.5.1 - 2014-03-26
|
||||
/*! gridster.js - v0.5.2 - 2014-06-16
|
||||
* http://gridster.net/
|
||||
* Copyright (c) 2014 ducksboard; Licensed MIT */
|
||||
|
||||
@@ -430,9 +430,9 @@
|
||||
var dir_map = { x : 'left', y : 'top' };
|
||||
var isTouch = !!('ontouchstart' in window);
|
||||
var pointer_events = {
|
||||
start: isTouch ? 'touchstart.gridster-draggable' : 'mousedown.gridster-draggable',
|
||||
move: isTouch ? 'touchmove.gridster-draggable' : 'mousemove.gridster-draggable',
|
||||
end: isTouch ? 'touchend.gridster-draggable' : 'mouseup.gridster-draggable'
|
||||
start: 'touchstart.gridster-draggable mousedown.gridster-draggable',
|
||||
move: 'touchmove.gridster-draggable mousemove.gridster-draggable',
|
||||
end: 'touchend.gridster-draggable mouseup.gridster-draggable'
|
||||
};
|
||||
|
||||
var capitalize = function(str) {
|
||||
@@ -467,7 +467,7 @@
|
||||
*/
|
||||
function Draggable(el, options) {
|
||||
this.options = $.extend({}, defaults, options);
|
||||
this.$body = $(document.body);
|
||||
this.$document = $(document);
|
||||
this.$container = $(el);
|
||||
this.$dragitems = $(this.options.items, this.$container);
|
||||
this.is_dragging = false;
|
||||
@@ -495,10 +495,10 @@
|
||||
this.$container.on(pointer_events.start, this.options.items,
|
||||
$.proxy(this.drag_handler, this));
|
||||
|
||||
this.$body.on(pointer_events.end, $.proxy(function(e) {
|
||||
this.$document.on(pointer_events.end, $.proxy(function(e) {
|
||||
this.is_dragging = false;
|
||||
if (this.disabled) { return; }
|
||||
this.$body.off(pointer_events.move);
|
||||
this.$document.off(pointer_events.move);
|
||||
if (this.drag_start) {
|
||||
this.on_dragstop(e);
|
||||
}
|
||||
@@ -512,7 +512,7 @@
|
||||
|
||||
|
||||
fn.get_mouse_pos = function(e) {
|
||||
if (isTouch) {
|
||||
if (e.originalEvent && e.originalEvent.touches) {
|
||||
var oe = e.originalEvent;
|
||||
e = oe.touches.length ? oe.touches[0] : oe.changedTouches[0];
|
||||
}
|
||||
@@ -532,9 +532,9 @@
|
||||
var diff_y = Math.round(mouse_actual_pos.top - this.mouse_init_pos.top);
|
||||
|
||||
var left = Math.round(this.el_init_offset.left +
|
||||
diff_x - this.baseX + this.scroll_offset_x);
|
||||
diff_x - this.baseX + $(window).scrollLeft() - this.win_offset_x);
|
||||
var top = Math.round(this.el_init_offset.top +
|
||||
diff_y - this.baseY + this.scroll_offset_y);
|
||||
diff_y - this.baseY + $(window).scrollTop() - this.win_offset_y);
|
||||
|
||||
if (this.options.limit) {
|
||||
if (left > this.player_max_left) {
|
||||
@@ -552,8 +552,8 @@
|
||||
pointer: {
|
||||
left: mouse_actual_pos.left,
|
||||
top: mouse_actual_pos.top,
|
||||
diff_left: diff_x + this.scroll_offset_x,
|
||||
diff_top: diff_y + this.scroll_offset_y
|
||||
diff_left: diff_x + ($(window).scrollLeft() - this.win_offset_x),
|
||||
diff_top: diff_y + ($(window).scrollTop() - this.win_offset_y)
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -636,6 +636,7 @@
|
||||
|
||||
fn.drag_handler = function(e) {
|
||||
var node = e.target.nodeName;
|
||||
// skip if drag is disabled, or click was not done with the mouse primary button
|
||||
if (this.disabled || e.which !== 1 && !isTouch) {
|
||||
return;
|
||||
}
|
||||
@@ -652,7 +653,7 @@
|
||||
this.mouse_init_pos = this.get_mouse_pos(e);
|
||||
this.offsetY = this.mouse_init_pos.top - this.el_init_pos.top;
|
||||
|
||||
this.$body.on(pointer_events.move, function(mme) {
|
||||
this.$document.on(pointer_events.move, function(mme) {
|
||||
var mouse_actual_pos = self.get_mouse_pos(mme);
|
||||
var diff_x = Math.abs(
|
||||
mouse_actual_pos.left - self.mouse_init_pos.left);
|
||||
@@ -700,6 +701,8 @@
|
||||
this.helper = false;
|
||||
}
|
||||
|
||||
this.win_offset_y = $(window).scrollTop();
|
||||
this.win_offset_x = $(window).scrollLeft();
|
||||
this.scroll_offset_y = 0;
|
||||
this.scroll_offset_x = 0;
|
||||
this.el_init_offset = this.$player.offset();
|
||||
@@ -777,7 +780,7 @@
|
||||
this.disable();
|
||||
|
||||
this.$container.off('.gridster-draggable');
|
||||
this.$body.off('.gridster-draggable');
|
||||
this.$document.off('.gridster-draggable');
|
||||
$(window).off('.gridster-draggable');
|
||||
|
||||
$.removeData(this.$container, 'drag');
|
||||
@@ -1028,7 +1031,9 @@
|
||||
}else{
|
||||
pos = {
|
||||
col: col,
|
||||
row: row
|
||||
row: row,
|
||||
size_x: size_x,
|
||||
size_y: size_y
|
||||
};
|
||||
|
||||
this.empty_cells(col, row, size_x, size_y);
|
||||
@@ -3592,8 +3597,8 @@
|
||||
(x * opts.widget_base_dimensions[0] +
|
||||
(x - 1) * (opts.widget_margins[0] * 2)) + 'px; }\n');
|
||||
}
|
||||
|
||||
this.remove_style_tags();
|
||||
|
||||
this.remove_style_tags();
|
||||
|
||||
return this.add_style_tag(styles);
|
||||
};
|
||||
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
/*! gridster.js - v0.5.1 - 2014-03-26 - * http://gridster.net/ - Copyright (c) 2014 ducksboard; Licensed MIT */
|
||||
/*! gridster.js - v0.5.2 - 2014-06-16 - * http://gridster.net/ - Copyright (c) 2014 ducksboard; Licensed MIT */
|
||||
.gridster{position:relative}.gridster>*{margin:0 auto;-webkit-transition:height .4s,width .4s;-moz-transition:height .4s,width .4s;-o-transition:height .4s,width .4s;-ms-transition:height .4s,width .4s;transition:height .4s,width .4s}.gridster .gs-w{z-index:2;position:absolute}.ready .gs-w:not(.preview-holder){-webkit-transition:opacity .3s,left .3s,top .3s;-moz-transition:opacity .3s,left .3s,top .3s;-o-transition:opacity .3s,left .3s,top .3s;transition:opacity .3s,left .3s,top .3s}.ready .gs-w:not(.preview-holder),.ready .resize-preview-holder{-webkit-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-moz-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-o-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;transition:opacity .3s,left .3s,top .3s,width .3s,height .3s}.gridster .preview-holder{z-index:1;position:absolute;background-color:#fff;border-color:#fff;opacity:.3}.gridster .player-revert{z-index:10!important;-webkit-transition:left .3s,top .3s!important;-moz-transition:left .3s,top .3s!important;-o-transition:left .3s,top .3s!important;transition:left .3s,top .3s!important}.gridster .dragging,.gridster .resizing{z-index:10!important;-webkit-transition:all 0s!important;-moz-transition:all 0s!important;-o-transition:all 0s!important;transition:all 0s!important}.gs-resize-handle{position:absolute;z-index:1}.gs-resize-handle-both{width:20px;height:20px;bottom:-8px;right:-8px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg08IS0tIEdlbmVyYXRvcjogQWRvYmUgRmlyZXdvcmtzIENTNiwgRXhwb3J0IFNWRyBFeHRlbnNpb24gYnkgQWFyb24gQmVhbGwgKGh0dHA6Ly9maXJld29ya3MuYWJlYWxsLmNvbSkgLiBWZXJzaW9uOiAwLjYuMSAgLS0+DTwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DTxzdmcgaWQ9IlVudGl0bGVkLVBhZ2UlMjAxIiB2aWV3Qm94PSIwIDAgNiA2IiBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjojZmZmZmZmMDAiIHZlcnNpb249IjEuMSINCXhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiDQl4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjZweCIgaGVpZ2h0PSI2cHgiDT4NCTxnIG9wYWNpdHk9IjAuMzAyIj4NCQk8cGF0aCBkPSJNIDYgNiBMIDAgNiBMIDAgNC4yIEwgNCA0LjIgTCA0LjIgNC4yIEwgNC4yIDAgTCA2IDAgTCA2IDYgTCA2IDYgWiIgZmlsbD0iIzAwMDAwMCIvPg0JPC9nPg08L3N2Zz4=);background-position:top left;background-repeat:no-repeat;cursor:se-resize;z-index:20}.gs-resize-handle-x{top:0;bottom:13px;right:-5px;width:10px;cursor:e-resize}.gs-resize-handle-y{left:0;right:13px;bottom:-5px;height:10px;cursor:s-resize}.gs-w:hover .gs-resize-handle,.resizing .gs-resize-handle{opacity:1}.gs-resize-handle,.gs-w.dragging .gs-resize-handle{opacity:0}.gs-resize-disabled .gs-resize-handle{display:none!important}[data-max-sizex="1"] .gs-resize-handle-x,[data-max-sizey="1"] .gs-resize-handle-y,[data-max-sizey="1"][data-max-sizex="1"] .gs-resize-handle{display:none!important}
|
||||
Vendored
+2
-1
File diff suppressed because one or more lines are too long
Vendored
+22
-15
@@ -1,4 +1,4 @@
|
||||
/*! gridster.js - v0.5.1 - 2014-03-26
|
||||
/*! gridster.js - v0.5.2 - 2014-06-16
|
||||
* http://gridster.net/
|
||||
* Copyright (c) 2014 ducksboard; Licensed MIT */
|
||||
|
||||
@@ -430,9 +430,9 @@
|
||||
var dir_map = { x : 'left', y : 'top' };
|
||||
var isTouch = !!('ontouchstart' in window);
|
||||
var pointer_events = {
|
||||
start: isTouch ? 'touchstart.gridster-draggable' : 'mousedown.gridster-draggable',
|
||||
move: isTouch ? 'touchmove.gridster-draggable' : 'mousemove.gridster-draggable',
|
||||
end: isTouch ? 'touchend.gridster-draggable' : 'mouseup.gridster-draggable'
|
||||
start: 'touchstart.gridster-draggable mousedown.gridster-draggable',
|
||||
move: 'touchmove.gridster-draggable mousemove.gridster-draggable',
|
||||
end: 'touchend.gridster-draggable mouseup.gridster-draggable'
|
||||
};
|
||||
|
||||
var capitalize = function(str) {
|
||||
@@ -467,7 +467,7 @@
|
||||
*/
|
||||
function Draggable(el, options) {
|
||||
this.options = $.extend({}, defaults, options);
|
||||
this.$body = $(document.body);
|
||||
this.$document = $(document);
|
||||
this.$container = $(el);
|
||||
this.$dragitems = $(this.options.items, this.$container);
|
||||
this.is_dragging = false;
|
||||
@@ -495,10 +495,10 @@
|
||||
this.$container.on(pointer_events.start, this.options.items,
|
||||
$.proxy(this.drag_handler, this));
|
||||
|
||||
this.$body.on(pointer_events.end, $.proxy(function(e) {
|
||||
this.$document.on(pointer_events.end, $.proxy(function(e) {
|
||||
this.is_dragging = false;
|
||||
if (this.disabled) { return; }
|
||||
this.$body.off(pointer_events.move);
|
||||
this.$document.off(pointer_events.move);
|
||||
if (this.drag_start) {
|
||||
this.on_dragstop(e);
|
||||
}
|
||||
@@ -512,7 +512,7 @@
|
||||
|
||||
|
||||
fn.get_mouse_pos = function(e) {
|
||||
if (isTouch) {
|
||||
if (e.originalEvent && e.originalEvent.touches) {
|
||||
var oe = e.originalEvent;
|
||||
e = oe.touches.length ? oe.touches[0] : oe.changedTouches[0];
|
||||
}
|
||||
@@ -532,9 +532,9 @@
|
||||
var diff_y = Math.round(mouse_actual_pos.top - this.mouse_init_pos.top);
|
||||
|
||||
var left = Math.round(this.el_init_offset.left +
|
||||
diff_x - this.baseX + this.scroll_offset_x);
|
||||
diff_x - this.baseX + $(window).scrollLeft() - this.win_offset_x);
|
||||
var top = Math.round(this.el_init_offset.top +
|
||||
diff_y - this.baseY + this.scroll_offset_y);
|
||||
diff_y - this.baseY + $(window).scrollTop() - this.win_offset_y);
|
||||
|
||||
if (this.options.limit) {
|
||||
if (left > this.player_max_left) {
|
||||
@@ -552,8 +552,8 @@
|
||||
pointer: {
|
||||
left: mouse_actual_pos.left,
|
||||
top: mouse_actual_pos.top,
|
||||
diff_left: diff_x + this.scroll_offset_x,
|
||||
diff_top: diff_y + this.scroll_offset_y
|
||||
diff_left: diff_x + ($(window).scrollLeft() - this.win_offset_x),
|
||||
diff_top: diff_y + ($(window).scrollTop() - this.win_offset_y)
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -636,6 +636,7 @@
|
||||
|
||||
fn.drag_handler = function(e) {
|
||||
var node = e.target.nodeName;
|
||||
// skip if drag is disabled, or click was not done with the mouse primary button
|
||||
if (this.disabled || e.which !== 1 && !isTouch) {
|
||||
return;
|
||||
}
|
||||
@@ -652,7 +653,7 @@
|
||||
this.mouse_init_pos = this.get_mouse_pos(e);
|
||||
this.offsetY = this.mouse_init_pos.top - this.el_init_pos.top;
|
||||
|
||||
this.$body.on(pointer_events.move, function(mme) {
|
||||
this.$document.on(pointer_events.move, function(mme) {
|
||||
var mouse_actual_pos = self.get_mouse_pos(mme);
|
||||
var diff_x = Math.abs(
|
||||
mouse_actual_pos.left - self.mouse_init_pos.left);
|
||||
@@ -700,6 +701,8 @@
|
||||
this.helper = false;
|
||||
}
|
||||
|
||||
this.win_offset_y = $(window).scrollTop();
|
||||
this.win_offset_x = $(window).scrollLeft();
|
||||
this.scroll_offset_y = 0;
|
||||
this.scroll_offset_x = 0;
|
||||
this.el_init_offset = this.$player.offset();
|
||||
@@ -777,7 +780,7 @@
|
||||
this.disable();
|
||||
|
||||
this.$container.off('.gridster-draggable');
|
||||
this.$body.off('.gridster-draggable');
|
||||
this.$document.off('.gridster-draggable');
|
||||
$(window).off('.gridster-draggable');
|
||||
|
||||
$.removeData(this.$container, 'drag');
|
||||
@@ -1028,7 +1031,9 @@
|
||||
}else{
|
||||
pos = {
|
||||
col: col,
|
||||
row: row
|
||||
row: row,
|
||||
size_x: size_x,
|
||||
size_y: size_y
|
||||
};
|
||||
|
||||
this.empty_cells(col, row, size_x, size_y);
|
||||
@@ -3593,6 +3598,8 @@
|
||||
(x - 1) * (opts.widget_margins[0] * 2)) + 'px; }\n');
|
||||
}
|
||||
|
||||
this.remove_style_tags();
|
||||
|
||||
return this.add_style_tag(styles);
|
||||
};
|
||||
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "gridster",
|
||||
"title": "gridster.js",
|
||||
"description": "a drag-and-drop multi-column jQuery grid plugin",
|
||||
"version": "0.5.1",
|
||||
"version": "0.5.2",
|
||||
"homepage": "http://gridster.net/",
|
||||
"author": {
|
||||
"name": "ducksboard",
|
||||
|
||||
Reference in New Issue
Block a user