Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit 135556b01afce242fcbba40602bfbfadac8eabd0 @mikepmunroe committed Mar 8, 2013
Showing with 5,251 additions and 0 deletions.
  1. +3 −0 Gemfile
  2. +61 −0 Gemfile.lock
  3. +1 −0 README.md
  4. BIN assets/fonts/fontawesome-webfont.eot
  5. +255 −0 assets/fonts/fontawesome-webfont.svg
  6. BIN assets/fonts/fontawesome-webfont.ttf
  7. BIN assets/fonts/fontawesome-webfont.woff
  8. BIN assets/images/logo.png
  9. +25 −0 assets/javascripts/application.coffee
  10. +4 −0 assets/javascripts/d3.v2.min.js
  11. +37 −0 assets/javascripts/dashing.gridster.coffee
  12. +2,890 −0 assets/javascripts/gridster/jquery.gridster.js
  13. +5 −0 assets/javascripts/gridster/jquery.leanModal.min.js
  14. +646 −0 assets/javascripts/jquery.knob.js
  15. +2 −0 assets/javascripts/rickshaw.min.js
  16. +255 −0 assets/stylesheets/application.scss
  17. +303 −0 assets/stylesheets/font-awesome.css
  18. +57 −0 assets/stylesheets/jquery.gridster.css
  19. +18 −0 config.ru
  20. +32 −0 dashboards/layout.erb
  21. +25 −0 dashboards/sample.erb
  22. +56 −0 dashboards/sampletv.erb
  23. +9 −0 jobs/buzzwords.rb
  24. +14 −0 jobs/convergence.rb
  25. +13 −0 jobs/sample.rb
  26. +17 −0 jobs/twitter.rb
  27. +26 −0 public/404.html
  28. BIN public/favicon.ico
  29. +18 −0 widgets/clock/clock.coffee
  30. +2 −0 widgets/clock/clock.html
  31. +13 −0 widgets/clock/clock.scss
  32. +24 −0 widgets/comments/comments.coffee
  33. +7 −0 widgets/comments/comments.html
  34. +33 −0 widgets/comments/comments.scss
  35. +35 −0 widgets/graph/graph.coffee
  36. +5 −0 widgets/graph/graph.html
  37. +65 −0 widgets/graph/graph.scss
  38. +9 −0 widgets/iframe/iframe.coffee
  39. +1 −0 widgets/iframe/iframe.html
  40. +8 −0 widgets/iframe/iframe.scss
  41. +9 −0 widgets/image/image.coffee
  42. +1 −0 widgets/image/image.html
  43. +13 −0 widgets/image/image.scss
  44. +6 −0 widgets/list/list.coffee
  45. +18 −0 widgets/list/list.html
  46. +60 −0 widgets/list/list.scss
  47. +14 −0 widgets/meter/meter.coffee
  48. +7 −0 widgets/meter/meter.html
  49. +35 −0 widgets/meter/meter.scss
  50. +24 −0 widgets/number/number.coffee
  51. +11 −0 widgets/number/number.html
  52. +39 −0 widgets/number/number.scss
  53. +1 −0 widgets/text/text.coffee
  54. +7 −0 widgets/text/text.html
  55. +32 −0 widgets/text/text.scss
@@ -0,0 +1,3 @@
+source :rubygems
+
+gem 'dashing'
@@ -0,0 +1,61 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ backports (3.1.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.6.1)
+ daemons (1.1.9)
+ dashing (1.0.4)
+ coffee-script
+ rack
+ rufus-scheduler
+ sass
+ sinatra
+ sinatra-contrib
+ sprockets
+ thin
+ thor
+ eventmachine (1.0.3)
+ execjs (1.4.0)
+ multi_json (~> 1.0)
+ hike (1.2.1)
+ multi_json (1.6.1)
+ rack (1.5.2)
+ rack-protection (1.4.0)
+ rack
+ rack-test (0.6.2)
+ rack (>= 1.0)
+ rufus-scheduler (2.0.18)
+ tzinfo (>= 0.3.23)
+ sass (3.2.6)
+ sinatra (1.3.5)
+ rack (~> 1.4)
+ rack-protection (~> 1.3)
+ tilt (~> 1.3, >= 1.3.3)
+ sinatra-contrib (1.3.2)
+ backports (>= 2.0)
+ eventmachine
+ rack-protection
+ rack-test
+ sinatra (~> 1.3.0)
+ tilt (~> 1.3)
+ sprockets (2.9.0)
+ hike (~> 1.2)
+ multi_json (~> 1.0)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ thin (1.5.0)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ thor (0.17.0)
+ tilt (1.3.4)
+ tzinfo (0.3.36)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ dashing
@@ -0,0 +1 @@
+Check out http://shopify.github.com/dashing for more information.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,25 @@
+# dashing.js is located in the dashing framework
+# It includes jquery & batman for you.
+#= require dashing.js
+
+#= require_directory .
+#= require_tree ../../widgets
+
+console.log("Yeah! The dashboard has started!")
+
+Dashing.on 'ready', ->
+ Dashing.widget_margins ||= [5, 5]
+ Dashing.widget_base_dimensions ||= [300, 360]
+ Dashing.numColumns ||= 4
+
+ contentWidth = (Dashing.widget_base_dimensions[0] + Dashing.widget_margins[0] * 2) * Dashing.numColumns
+
+ Batman.setImmediate ->
+ $('.gridster').width(contentWidth)
+ $('.gridster ul:first').gridster
+ widget_margins: Dashing.widget_margins
+ widget_base_dimensions: Dashing.widget_base_dimensions
+ avoid_overlapped_widgets: !Dashing.customGridsterLayout
+ draggable:
+ stop: Dashing.showGridsterInstructions
+ start: -> Dashing.currentWidgetPositions = Dashing.getWidgetPositions()
Oops, something went wrong.
@@ -0,0 +1,37 @@
+#= require_directory ./gridster
+
+# This file enables gridster integration (http://gridster.net/)
+# Delete it if you'd rather handle the layout yourself.
+# You'll miss out on a lot if you do, but we won't hold it against you.
+
+Dashing.gridsterLayout = (positions) ->
+ Dashing.customGridsterLayout = true
+ positions = positions.replace(/^"|"$/g, '')
+ positions = $.parseJSON(positions)
+ widgets = $("[data-row^=]")
+ for widget, index in widgets
+ $(widget).attr('data-row', positions[index].row)
+ $(widget).attr('data-col', positions[index].col)
+
+Dashing.getWidgetPositions = ->
+ $(".gridster ul:first").gridster().data('gridster').serialize()
+
+Dashing.showGridsterInstructions = ->
+ newWidgetPositions = Dashing.getWidgetPositions()
+
+ unless JSON.stringify(newWidgetPositions) == JSON.stringify(Dashing.currentWidgetPositions)
+ Dashing.currentWidgetPositions = newWidgetPositions
+ $('#save-gridster').slideDown()
+ $('#gridster-code').text("
+ <script type='text/javascript'>\n
+ $(function() {\n
+ \ \ Dashing.gridsterLayout('#{JSON.stringify(Dashing.currentWidgetPositions)}')\n
+ });\n
+ </script>
+ ")
+
+$ ->
+ $('#save-gridster').leanModal()
+
+ $('#save-gridster').click ->
+ $('#save-gridster').slideUp()
Oops, something went wrong.

0 comments on commit 135556b

Please sign in to comment.