Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/jquery.gridster.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! gridster.js - v0.5.6 - 2014-09-25
/*! gridster.js - v0.5.6 - 2015-08-16
* http://gridster.net/
* Copyright (c) 2014 ducksboard; Licensed MIT */
* Copyright (c) 2015 ducksboard; Licensed MIT */

.gridster {
position:relative;
Expand Down
15 changes: 11 additions & 4 deletions dist/jquery.gridster.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! gridster.js - v0.5.6 - 2014-09-25
/*! gridster.js - v0.5.6 - 2015-08-16
* http://gridster.net/
* Copyright (c) 2014 ducksboard; Licensed MIT */
* Copyright (c) 2015 ducksboard; Licensed MIT */

;(function(root, factory) {

Expand Down Expand Up @@ -881,6 +881,7 @@
auto_init: true,
serialize_params: function($w, wgd) {
return {
id: $w.attr('id'),
col: wgd.col,
row: wgd.row,
size_x: wgd.size_x,
Expand Down Expand Up @@ -1172,7 +1173,13 @@
* @return {HTMLElement} Returns the jQuery wrapped HTMLElement representing.
* the widget that was just created.
*/
fn.add_widget = function(html, size_x, size_y, col, row, max_size, min_size) {
fn.add_widget = function(html, size_x, size_y, col, row, max_size, min_size, callback) {

if(typeof max_size === 'function'){
callback = max_size;
max_size = undefined;
}

var pos;
size_x || (size_x = 1);
size_y || (size_y = 1);
Expand Down Expand Up @@ -1217,7 +1224,7 @@

this.drag_api.set_limits(this.cols * this.min_widget_width);

return $w.fadeIn();
return $w.fadeIn(400, callback);
};


Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.gridster.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/jquery.gridster.min.js

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions dist/jquery.gridster.with-extras.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! gridster.js - v0.5.6 - 2014-09-25
/*! gridster.js - v0.5.6 - 2015-08-16
* http://gridster.net/
* Copyright (c) 2014 ducksboard; Licensed MIT */
* Copyright (c) 2015 ducksboard; Licensed MIT */

;(function(root, factory) {

Expand Down Expand Up @@ -881,6 +881,7 @@
auto_init: true,
serialize_params: function($w, wgd) {
return {
id: $w.attr('id'),
col: wgd.col,
row: wgd.row,
size_x: wgd.size_x,
Expand Down Expand Up @@ -1172,7 +1173,13 @@
* @return {HTMLElement} Returns the jQuery wrapped HTMLElement representing.
* the widget that was just created.
*/
fn.add_widget = function(html, size_x, size_y, col, row, max_size, min_size) {
fn.add_widget = function(html, size_x, size_y, col, row, max_size, min_size, callback) {

if(typeof max_size === 'function'){
callback = max_size;
max_size = undefined;
}

var pos;
size_x || (size_x = 1);
size_y || (size_y = 1);
Expand Down Expand Up @@ -1217,7 +1224,7 @@

this.drag_api.set_limits(this.cols * this.min_widget_width);

return $w.fadeIn();
return $w.fadeIn(400, callback);
};


Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.gridster.with-extras.min.js

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions src/jquery.gridster.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
auto_init: true,
serialize_params: function($w, wgd) {
return {
id: $w.attr('id'),
col: wgd.col,
row: wgd.row,
size_x: wgd.size_x,
Expand Down Expand Up @@ -325,7 +326,13 @@
* @return {HTMLElement} Returns the jQuery wrapped HTMLElement representing.
* the widget that was just created.
*/
fn.add_widget = function(html, size_x, size_y, col, row, max_size, min_size) {
fn.add_widget = function(html, size_x, size_y, col, row, max_size, min_size, callback) {

if(typeof max_size === 'function'){
callback = max_size;
max_size = undefined;
}

var pos;
size_x || (size_x = 1);
size_y || (size_y = 1);
Expand Down Expand Up @@ -370,7 +377,7 @@

this.drag_api.set_limits(this.cols * this.min_widget_width);

return $w.fadeIn();
return $w.fadeIn(400, callback);
};


Expand Down