summaryrefslogtreecommitdiff
path: root/templates/project/assets/javascripts/application.coffee
diff options
context:
space:
mode:
authorDaniel Beauchamp <daniel.beauchamp@shopify.com>2012-08-14 05:23:57 -0400
committerDaniel Beauchamp <daniel.beauchamp@shopify.com>2012-08-14 05:23:57 -0400
commit54c6a04b722663b518bf99b4d98a1c2e86ee5103 (patch)
tree91cc311d76bcdd0c6fb053798b383fbeb44c4063 /templates/project/assets/javascripts/application.coffee
parent8e3ca1d64444408677c93721c198908de43fa417 (diff)
Updated the sample project.
Diffstat (limited to 'templates/project/assets/javascripts/application.coffee')
-rw-r--r--templates/project/assets/javascripts/application.coffee23
1 files changed, 11 insertions, 12 deletions
diff --git a/templates/project/assets/javascripts/application.coffee b/templates/project/assets/javascripts/application.coffee
index 5b38c46..c84aa05 100644
--- a/templates/project/assets/javascripts/application.coffee
+++ b/templates/project/assets/javascripts/application.coffee
@@ -2,24 +2,23 @@
# It includes jquery & batman for you.
#= require dashing.js
-#= require ./dashing.gridster.js
-#= require ./jquery.knob.js
+#= require_directory .
#= require_tree ../../widgets
console.log("Yeah! The dashboard has started!")
Dashing.on 'ready', ->
widget_margins = [5, 5]
- widget_base_dimensions = [340, 380]
- numColumns = 3
+ widget_base_dimensions = [240, 330]
+ numColumns = 4
contentWidth = (widget_base_dimensions[0] + widget_margins[0] * 2) * numColumns
- $('.gridster').width(contentWidth)
-
- $('.gridster ul:first').gridster
- widget_margins: widget_margins
- widget_base_dimensions: widget_base_dimensions
- avoid_overlapped_widgets: !Dashing.customGridsterLayout
- draggable:
- stop: Dashing.showGridsterInstructions
+ Batman.setImmediate ->
+ $('.gridster').width(contentWidth)
+ $('.gridster ul:first').gridster
+ widget_margins: widget_margins
+ widget_base_dimensions: widget_base_dimensions
+ avoid_overlapped_widgets: !Dashing.customGridsterLayout
+ draggable:
+ stop: Dashing.showGridsterInstructions