From 16f51fd9dc454b26d9866b080caa17ffe2f8ce27 Mon Sep 17 00:00:00 2001 From: Daniel Beauchamp Date: Mon, 13 Aug 2012 23:36:38 -0400 Subject: Updated to use sprockets! Ah, much cleaner. --- .../project/assets/javascripts/application.coffee | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 templates/project/assets/javascripts/application.coffee (limited to 'templates/project/assets/javascripts/application.coffee') diff --git a/templates/project/assets/javascripts/application.coffee b/templates/project/assets/javascripts/application.coffee new file mode 100644 index 0000000..5b38c46 --- /dev/null +++ b/templates/project/assets/javascripts/application.coffee @@ -0,0 +1,25 @@ +# dashing.js is located in the dashing framework +# It includes jquery & batman for you. +#= require dashing.js + +#= require ./dashing.gridster.js +#= require ./jquery.knob.js +#= require_tree ../../widgets + +console.log("Yeah! The dashboard has started!") + +Dashing.on 'ready', -> + widget_margins = [5, 5] + widget_base_dimensions = [340, 380] + numColumns = 3 + + 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 -- cgit v1.2.3