Merge remote-tracking branch 'Toosick/gridster.js/patch-1'

* Toosick/gridster.js/patch-1:
  Update jquery.gridster.js
  Fix gridster destroy
This commit is contained in:
David Morse
2015-04-07 21:51:55 -06:00
5 changed files with 21 additions and 7 deletions
+6 -1
View File
@@ -4458,6 +4458,11 @@
fn.destroy = function(remove) {
this.$el.removeData('gridster');
// remove coords from elements
$.each(this.$widgets,function(){
$(this).removeData('coords');
});
// remove bound callback on window resize
$window.unbind('.gridster');
@@ -4467,7 +4472,7 @@
if (this.resize_api) {
this.resize_api.destroy();
}
this.$widgets.each(function(i, el) { $(el).coords().destroy(); });
if (this.resize_api) {
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -1
View File
@@ -4458,6 +4458,11 @@
fn.destroy = function(remove) {
this.$el.removeData('gridster');
// remove coords from elements
$.each(this.$widgets,function(){
$(this).removeData('coords');
});
// remove bound callback on window resize
$window.unbind('.gridster');
@@ -4467,7 +4472,7 @@
if (this.resize_api) {
this.resize_api.destroy();
}
this.$widgets.each(function(i, el) { $(el).coords().destroy(); });
if (this.resize_api) {
File diff suppressed because one or more lines are too long
+7 -3
View File
@@ -3251,8 +3251,7 @@
/* generate CSS styles for rows */
for(i = 1; i <= opts.rows + 1; i++) {
styles += (opts.namespace + ' [data-row="' + i + '"] { top:' +
((i * opts.widget_margins[1]) + ((i - 1) * opts.widget_base_dimensions[1]))
+ 'px; }\n');
((i * opts.widget_margins[1]) + ((i - 1) * opts.widget_base_dimensions[1])) + 'px; }\n');
}
for (var y = 1; y <= opts.rows; y++) {
@@ -3588,6 +3587,11 @@
fn.destroy = function(remove) {
this.$el.removeData('gridster');
// remove coords from elements
$.each(this.$widgets,function(){
$(this).removeData('coords');
});
// remove bound callback on window resize
$window.unbind('.gridster');
@@ -3597,7 +3601,7 @@
if (this.resize_api) {
this.resize_api.destroy();
}
this.$widgets.each(function(i, el) { $(el).coords().destroy(); });
if (this.resize_api) {