Commit 696b0f7c authored by d's avatar d
Browse files

Fix #481.

parent 56801119
......@@ -476,9 +476,10 @@ Changes
#### v0.2.6-dev (Development version)
- update requirements to the latest versions of jQuery and jquery-ui.
- update requirements to the latest versions of jQuery (v3.1.0+) and jquery-ui (v1.12.0+).
- fix jQuery `size()` ([#486](https://github.com/troolee/gridstack.js/issues/486)).
- update _notify to allow detach ([#411](https://github.com/troolee/gridstack.js/issues/411)).
- fix code that checks for jquery-ui ([#481](https://github.com/troolee/gridstack.js/issues/481)).
#### v0.2.5 (2016-03-02)
......
......@@ -975,6 +975,9 @@
};
GridStack.prototype._prepareElementsByNode = function(el, node) {
if (typeof $.ui === 'undefined') {
return;
}
var self = this;
var cellWidth;
......@@ -1160,9 +1163,7 @@
}, triggerAddEvent);
el.data('_gridstack_node', node);
if (!this.opts.staticGrid) {
this._prepareElementsByNode(el, node);
}
this._prepareElementsByNode(el, node);
};
GridStack.prototype.setAnimation = function(enable) {
......@@ -1258,7 +1259,7 @@
el.each(function(index, el) {
el = $(el);
var node = el.data('_gridstack_node');
if (self.opts.staticGrid || typeof node == 'undefined' || node === null) {
if (typeof node == 'undefined' || node === null || typeof $.ui === 'undefined') {
return;
}
......@@ -1278,7 +1279,7 @@
el.each(function(index, el) {
el = $(el);
var node = el.data('_gridstack_node');
if (self.opts.staticGrid || typeof node == 'undefined' || node === null) {
if (typeof node == 'undefined' || node === null || typeof $.ui === 'undefined') {
return;
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -975,6 +975,9 @@
};
GridStack.prototype._prepareElementsByNode = function(el, node) {
if (typeof $.ui === 'undefined') {
return;
}
var self = this;
var cellWidth;
......@@ -1160,9 +1163,7 @@
}, triggerAddEvent);
el.data('_gridstack_node', node);
if (!this.opts.staticGrid) {
this._prepareElementsByNode(el, node);
}
this._prepareElementsByNode(el, node);
};
GridStack.prototype.setAnimation = function(enable) {
......@@ -1258,7 +1259,7 @@
el.each(function(index, el) {
el = $(el);
var node = el.data('_gridstack_node');
if (self.opts.staticGrid || typeof node == 'undefined' || node === null) {
if (typeof node == 'undefined' || node === null || typeof $.ui === 'undefined') {
return;
}
......@@ -1278,7 +1279,7 @@
el.each(function(index, el) {
el = $(el);
var node = el.data('_gridstack_node');
if (self.opts.staticGrid || typeof node == 'undefined' || node === null) {
if (typeof node == 'undefined' || node === null || typeof $.ui === 'undefined') {
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment