Commit Graph
151 Commits
Author SHA1 Message Date
vieron 70ccff71de Update gruntfile and package.json to compliance with grunt 0.4.x 2013-06-13 11:43:15 +02:00
Dustin Moore 20f98ae383 Updated Dist and Gruntfile 2013-05-15 09:29:59 -07:00
Dustin Moore ef476bcd1e Merge branch 'master' of https://github.com/ducksboard/gridster.js 2013-05-15 09:29:34 -07:00
Dustin Moore c2fcff7276 Updated Dist and Gruntfile 2013-05-15 09:28:48 -07:00
Dustin Moore eca38b6272 Merge pull request #165 from matiangul/master
Fix is_empty method
2013-05-14 08:42:10 -07:00
Dustin Moore 361c751e6e Updated Readme 2013-05-14 08:40:49 -07:00
Dustin Moore bc9859fede Add Gruntfile 2013-05-14 07:54:54 -07:00
Dustin Moore 52dc36ead9 Merge pull request #169 from tuvokki/master
Fix for Issue #158
2013-05-14 07:50:05 -07:00
Wouter Roosendaal 826120bdb1 resize_widget function with callback parameter
Is it possible to add a callback to the resize_widget function, that is
called when the resizing of a widget is finished? This may help to
update the widget content properly.
2013-05-13 16:14:47 +02:00
matiangul fca830007a Fixed is_empty method 2013-05-04 11:05:00 +02:00
Dustin Moore 4c9d502cbe Updated Readme added PSA 2013-04-25 09:16:28 -07:00
Dustin Moore bd63315641 Updated to latest version of Grunt 2013-04-25 08:36:54 -07:00
Dustin Moore d56f6d80a3 Merge pull request #152 from rfink/master
Fix for issue #46
2013-04-24 08:13:30 -07:00
Dustin Moore c0d0cd33ce Merge pull request #154 from tuvokki/master
Add setting for maximum number of columns
2013-04-24 08:08:12 -07:00
Wouter Roosendaal 5569caa687 Add max_cols setting
Right now the number of columns is calculated by dividing the available
space by the necessary space. I want to have an option to limit the
number of calculated columns, without changing the width of the div my
grid lives in.

In order to limit the number of calculated columns max_cols is set to a
number. To have 'unlimited' columns set the value of max_cols to -1 (as
ids done in the default settings). This provides the arbitrary useful
functionality to set the max number of columns to 0. Any sideeffect
caused by this are mitigated by checking that the max_cols is larger
than the min_cols setting.
2013-04-11 14:18:54 +02:00
Ryan Fink 6302b988d1 Fix for not removing stylesheets on destroy 2013-04-09 12:27:04 +00:00
Dustin Moore b58f1454a5 Merge pull request #125 from brokenseal/master
Possible solution to memory leak #124
2013-04-02 07:52:59 -07:00
Daniel Beauchamp d6f696e4f5 Merge pull request #76 from pushmatrix/master
Fix inverted arguments for a collision callback
2013-03-22 10:10:15 -07:00
Davide Callegari 7f3f679cb6 Fixed a minor issue when trying to destroy a non existing drag_api 2013-02-15 16:50:35 +01:00
Davide Callegari 7217b040e6 Built new version 2013-02-15 15:25:44 +01:00
Davide Callegari 233129b183 Bound leftover callbacks are one of the main causes of memory leaks, let's remove them inside the destroy method 2013-02-15 15:25:09 +01:00
Davide Callegari ac2908e1a2 Added a destroy method on the Gridster class 2013-02-15 14:30:20 +01:00
Davide Callegari 36bec0bb14 Fixed a couple of errors in the methods definition
Added my own IDE filed in the .gitignore file
2013-02-15 14:29:54 +01:00
Daniel Beauchamp ce391ae13e Fix inverted arguments for a collision callback
The start and stop callbacks on this line seem to be backwards.
2012-11-01 01:47:07 -03:00
vieron b538d64969 updated dist 2012-10-20 01:52:08 +02:00
vieron 55edd11ef8 gridster: new method remove_all_widgets
Remove multiple widgets without chaining callbacks was not possible so I've added a new argument to remove_widget method named `silent` which if it's value is true, widgets below the removed will not move up.

Also added the method remove_all_widgets.

Fixes #63
2012-10-20 01:37:41 +02:00
vieron c75db76f4e updated dist 2012-10-20 00:14:14 +02:00
vieron a20f3d53b5 ignoring demo folder 2012-10-20 00:12:47 +02:00
Philip Manavopoulosandvieron 552df22e1c Allow for an optional drag handle to be specified
When defining the gridster, you can now define a draggable.handle selector:

For example:

    $("#widgets").gridster({
        widget_margins: [10, 10],
        widget_base_dimensions: [565, 400],
		draggable: {
			stop: function(event, ui) {
				console.log('save new columns');
			},
			handle: '.title'
		}
    });

If handle is omitted (or left blank), it works as it did previously. If a value is specified, then dragging only starts if the element which was clicked matches the selector specified.

Added by @vieron:
Closes #29
2012-10-20 00:12:10 +02:00
vieron 07b34131bd update dist 2012-10-15 16:27:12 +02:00
vieron 68f1d6279c Avoid dynamic column generation.
Using add_faux_col each time a new widget is added to the grid caused the widget was always positioned in the first row on the right. Related to #60.
2012-10-15 15:47:31 +02:00
vieron a5d122246d updated dist 2012-10-07 21:45:06 +02:00
vieron 5411836c88 events/onselectstart: Don't prevent default behaviour on form fields
Fixes #56.
2012-10-07 21:36:58 +02:00
vieron 5a3c382c8b Immediate children selection for widgets. Fixes #52. 2012-10-07 21:12:38 +02:00
vieron 6ebd10139f updated dist 2012-10-07 21:12:38 +02:00
vieron 42ce094e1c updated grunt config to generate gridster+extras distribution 2012-10-07 21:12:38 +02:00
vieron cd5c936939 gridster extra methods
Some new methods we need at Ducksboard to implement TV mode.

Two new distributions of Gridster are generated with grunt:
    - jquery.gridster.with-extras.js
    - jquery.gridster.with-extras.min.js
2012-10-07 21:12:38 +02:00
vieron 7dbbc105c1 add_faux_cell: create parent array if doesn't exists 2012-10-07 21:12:38 +02:00
vieron 82b8778762 if not passed, use default namespace for generating stylessheets 2012-10-07 21:12:38 +02:00
vieron 7fc97d0f79 Allow to extend gridster out of the scope 2012-10-07 21:12:38 +02:00
vieron 0b1c9899d0 some code style corrections/improvements 2012-10-07 21:12:38 +02:00
vieron c4fee63b96 ability to specify a max row as limit in can_move_to method 2012-10-03 15:40:16 +02:00
vieron 3d5077dd7b add_faux_cols method 2012-10-03 15:33:46 +02:00
vieron c6bd80be8e Fixed disable method, it didn't work well for multiple instances.
Previously, disabling gridster caused all the instances of Gridster running on the pages was disabled. Because Draggable class uses event delegation from the body to manage drag events.
2012-10-03 13:48:55 +02:00
vieron c503a4f99e updated dist 2012-09-12 17:51:44 +02:00
vieron 3bc9ea3527 Possibility to namespace first-time styles generated by gridster.
Useful if you have multiple grid instances in the same document.
2012-09-12 17:50:48 +02:00
vieron 104ee3220d updated dist 2012-09-09 14:32:49 +02:00
vieron b71b8727df gridster: moving down widgets under placeholder. Related to #4.
This solves the overlapping-blocks seen in the screencast provided by @daniel-nelson. I've captured another one trying to reproduce the same movements with this commit applied: http://www.screenr.com/g7J8
2012-09-09 14:21:31 +02:00
vieron dc61567454 collision: ignore min_area in collision sorting
This doesn't work with grids with small values in widget_base_dimensions and widget_margins options.
2012-09-08 13:58:47 +02:00
vieron 60fbb1cbf2 updated dist 2012-08-20 21:06:38 +02:00