forked from jzoldak/edx-eng-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jay Zoldak
committed
Mar 27, 2013
0 parents
commit dfca599
Showing
57 changed files
with
5,262 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source :rubygems | ||
|
||
gem 'dashing' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
backports (3.1.1) | ||
coffee-script (2.2.0) | ||
coffee-script-source | ||
execjs | ||
coffee-script-source (1.6.2) | ||
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.7.2) | ||
rack (1.5.2) | ||
rack-protection (1.5.0) | ||
rack | ||
rack-test (0.6.2) | ||
rack (>= 1.0) | ||
rufus-scheduler (2.0.18) | ||
tzinfo (>= 0.3.23) | ||
sass (3.2.7) | ||
sinatra (1.3.6) | ||
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.1) | ||
daemons (>= 1.0.9) | ||
eventmachine (>= 0.12.6) | ||
rack (>= 1.0.0) | ||
thor (0.18.0) | ||
tilt (1.3.6) | ||
tzinfo (0.3.37) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
dashing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Check out http://shopify.github.com/dashing for more information. |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.