summaryrefslogtreecommitdiff
path: root/templates/project/assets/javascripts/application.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'templates/project/assets/javascripts/application.coffee')
-rw-r--r--templates/project/assets/javascripts/application.coffee12
1 files changed, 6 insertions, 6 deletions
diff --git a/templates/project/assets/javascripts/application.coffee b/templates/project/assets/javascripts/application.coffee
index c84aa05..be030e1 100644
--- a/templates/project/assets/javascripts/application.coffee
+++ b/templates/project/assets/javascripts/application.coffee
@@ -8,17 +8,17 @@
console.log("Yeah! The dashboard has started!")
Dashing.on 'ready', ->
- widget_margins = [5, 5]
- widget_base_dimensions = [240, 330]
- numColumns = 4
+ Dashing.widget_margins ||= [5, 5]
+ Dashing.widget_base_dimensions ||= [300, 360]
+ Dashing.numColumns ||= 4
- contentWidth = (widget_base_dimensions[0] + widget_margins[0] * 2) * numColumns
+ contentWidth = (Dashing.widget_base_dimensions[0] + Dashing.widget_margins[0] * 2) * Dashing.numColumns
Batman.setImmediate ->
$('.gridster').width(contentWidth)
$('.gridster ul:first').gridster
- widget_margins: widget_margins
- widget_base_dimensions: widget_base_dimensions
+ widget_margins: Dashing.widget_margins
+ widget_base_dimensions: Dashing.widget_base_dimensions
avoid_overlapped_widgets: !Dashing.customGridsterLayout
draggable:
stop: Dashing.showGridsterInstructions