dashing-rails 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/assets/javascripts/dashing.gridster.coffee +22 -4
- data/lib/dashing/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dfddde01d385b4094caeb1dfa91d57eb3661695
|
4
|
+
data.tar.gz: f7afc786e36b73efdd1cd121818fe3dc3fb3f7dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec6a9a63a1191a23eea315b6e22b6eb4b58045c9f5d6d8f2de73340f0c49deb1eefcdc53b6e0f3fa2351c04f61c020b556d8f85e608f43cfcdf0577c2742450b
|
7
|
+
data.tar.gz: e4146726fc36bc5e96d4cf2251d9d811387ea41e1ddffed1d9932375ca2d8be24c706618492b863ad9433fe07581fb38dd9430102119ccad6ff8ffa5fc659123
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -6,10 +6,26 @@ Dashing.gridsterLayout = (positions) ->
|
|
6
6
|
Dashing.customGridsterLayout = true
|
7
7
|
positions = positions.replace(/^"|"$/g, '')
|
8
8
|
positions = $.parseJSON(positions)
|
9
|
-
widgets = $("[data-row
|
9
|
+
widgets = $("[data-row]")
|
10
|
+
maxRow = 1
|
11
|
+
maxCol = 1
|
12
|
+
numColumns = Dashing.numColumns || 1
|
10
13
|
for widget, index in widgets
|
11
|
-
|
12
|
-
|
14
|
+
if positions? and index < positions.length
|
15
|
+
$(widget).attr('data-row', positions[index].row)
|
16
|
+
$(widget).attr('data-col', positions[index].col)
|
17
|
+
if positions[index].row > maxRow
|
18
|
+
maxRow = positions[index].row
|
19
|
+
maxCol = positions[index].col + 1
|
20
|
+
else if positions[index].row == maxRow and positions[index].col >= maxCol
|
21
|
+
maxCol = positions[index].col + 1
|
22
|
+
else
|
23
|
+
if maxCol > numColumns
|
24
|
+
maxRow += 1
|
25
|
+
maxCol = 1
|
26
|
+
$(widget).attr('data-row', maxRow)
|
27
|
+
$(widget).attr('data-col', maxCol)
|
28
|
+
maxCol += 1
|
13
29
|
|
14
30
|
Dashing.getWidgetPositions = ->
|
15
31
|
$(".gridster ul:first").gridster().data('gridster').serialize()
|
@@ -24,7 +40,9 @@ Dashing.showGridsterInstructions = ->
|
|
24
40
|
<script type='text/javascript'>\n
|
25
41
|
$(function() {\n
|
26
42
|
\ \ Dashing.gridsterLayout('#{JSON.stringify(Dashing.currentWidgetPositions)}')\n
|
27
|
-
});\n
|
43
|
+
});\n
|
44
|
+
</script>
|
45
|
+
")
|
28
46
|
|
29
47
|
$ ->
|
30
48
|
$('#save-gridster').leanModal()
|
data/lib/dashing/version.rb
CHANGED