gridster.js-rails 0.6.10 → 0.7.0
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 +7 -0
- data/bower.json +1 -1
- data/demos/assets/css/demo.css +58 -69
- data/demos/assets/css/demo.css.map +1 -0
- data/demos/assets/less/demo.less +86 -0
- data/demos/chaosWidget.html +90 -0
- data/demos/index.html +2 -7
- data/demos/responsive.html +1 -1
- data/lib/gridster.js-rails.rb +1 -3
- data/lib/gridster.js-rails/version.rb +1 -1
- data/package.json +15 -3
- data/vendor/assets/javascripts/jquery.gridster.js +127 -94
- data/vendor/assets/javascripts/jquery.gridster.min.js +2 -2
- data/vendor/assets/javascripts/jquery.gridster.with-extras.js +128 -95
- data/vendor/assets/javascripts/jquery.gridster.with-extras.min.js +2 -2
- data/vendor/assets/stylesheets/jquery.gridster.css +69 -88
- data/vendor/assets/stylesheets/jquery.gridster.min.css +2 -2
- metadata +19 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 416287df3b47fc850ae26a9a6b47e3b9830417f3
|
4
|
+
data.tar.gz: 0d16fadd272a19263a10d829ef267eeba4da5b08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b1de84cec608241267a5d1c054f295b5a03cb6eb959d61e1da879c2197c05208599e219dcc686396b457907c197e47929740dfec60180ebb369ae1929c6a0ef
|
7
|
+
data.tar.gz: b34476d3df6219ff6e8fec402681055767ad17a52a525242c7db87a8009660a10b2beb0b52bf62df6acc67659275a6a4960f63bba3f0acd8b5859cb6f7925317
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
|
+
<a name="v0.6.10"></a>
|
2
|
+
### v0.6.10 (2015-05-31)
|
3
|
+
* Add Ruby on Rails support
|
4
|
+
|
1
5
|
<a name="v0.6.9"></a>
|
2
6
|
### v0.6.9 (2015-05-27)
|
7
|
+
* bug fixes for positions and overlap
|
8
|
+
* dist modified to support webpack deployements
|
9
|
+
* new 'sticky' layout option which allows widgets to be places absolutely into a position on the grid.
|
3
10
|
|
4
11
|
<a name="v0.6.8"></a>
|
5
12
|
### v0.6.8 (2015-04-28)
|
data/bower.json
CHANGED
data/demos/assets/css/demo.css
CHANGED
@@ -1,94 +1,83 @@
|
|
1
|
+
/*! gridster.js - v0.6.10 - 2015-05-31
|
2
|
+
* https://dsmorse.github.io/gridster.js/
|
3
|
+
* Copyright (c) 2015 ducksboard; Licensed MIT */
|
1
4
|
body {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
5
|
+
background: #26941f;
|
6
|
+
font-size: 16px;
|
7
|
+
font-family: 'Helvetica Neue', Arial, sans-serif;
|
8
|
+
color: #ffffff;
|
9
|
+
margin: 0;
|
10
|
+
}
|
11
|
+
h1,
|
12
|
+
h2,
|
13
|
+
h3,
|
14
|
+
p {
|
15
|
+
margin: 10px;
|
7
16
|
}
|
8
|
-
|
9
|
-
h1, h2, h3, p {
|
10
|
-
margin: 10px;
|
11
|
-
}
|
12
|
-
|
13
17
|
table {
|
14
|
-
|
15
|
-
|
18
|
+
border-collapse: collapse;
|
19
|
+
border-spacing: 0;
|
16
20
|
}
|
17
|
-
|
18
|
-
/* Gridster styles */
|
19
21
|
.demo {
|
20
|
-
|
21
|
-
|
22
|
-
|
22
|
+
margin: 3em 0;
|
23
|
+
padding: 7.5em 0 5.5em;
|
24
|
+
background: #26941f;
|
23
25
|
}
|
24
|
-
|
25
26
|
.demo:hover .gridster {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
}
|
35
|
-
|
27
|
+
margin: 0 auto;
|
28
|
+
opacity: .8;
|
29
|
+
-webkit-transition: opacity .6s;
|
30
|
+
-moz-transition: opacity .6s;
|
31
|
+
-o-transition: opacity .6s;
|
32
|
+
-ms-transition: opacity .6s;
|
33
|
+
transition: opacity .6s;
|
34
|
+
}
|
36
35
|
.content {
|
37
|
-
|
36
|
+
color: white;
|
38
37
|
}
|
39
|
-
|
40
38
|
.gridster .gs-w {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
39
|
+
background: #61A9CF;
|
40
|
+
cursor: pointer;
|
41
|
+
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
42
|
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
45
43
|
}
|
46
|
-
|
47
44
|
.gridster .player {
|
48
|
-
|
49
|
-
|
50
|
-
|
45
|
+
-webkit-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
|
46
|
+
box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
|
47
|
+
background: #BBB;
|
51
48
|
}
|
52
|
-
|
53
49
|
.gridster .gs-w.try {
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
50
|
+
background-image: url(../img/sprite.png);
|
51
|
+
background-repeat: no-repeat;
|
52
|
+
background-position: 37px -169px;
|
58
53
|
}
|
59
|
-
|
60
54
|
.gridster .preview-holder {
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
}
|
65
|
-
|
66
|
-
ul {
|
67
|
-
list-style-type: none;
|
68
|
-
}
|
69
|
-
|
70
|
-
li {
|
71
|
-
list-style: none;
|
72
|
-
font-weight: bold
|
55
|
+
border: none !important;
|
56
|
+
border-radius: 0 !important;
|
57
|
+
background: red !important;
|
73
58
|
}
|
74
|
-
|
75
59
|
.gridster ul {
|
76
|
-
|
60
|
+
background-color: #EFEFEF;
|
77
61
|
}
|
78
|
-
|
79
62
|
.gridster li {
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
63
|
+
font-size: 1em;
|
64
|
+
font-weight: bold;
|
65
|
+
text-align: center;
|
66
|
+
line-height: 100%;
|
67
|
+
}
|
68
|
+
ul {
|
69
|
+
list-style-type: none;
|
70
|
+
}
|
71
|
+
li {
|
72
|
+
list-style: none;
|
73
|
+
font-weight: bold;
|
84
74
|
}
|
85
|
-
|
86
75
|
.gridster-box {
|
87
|
-
|
88
|
-
|
89
|
-
|
76
|
+
position: relative;
|
77
|
+
width: 100%;
|
78
|
+
height: 100%;
|
90
79
|
}
|
91
|
-
|
92
80
|
.controls {
|
93
|
-
|
81
|
+
margin-bottom: 20px;
|
94
82
|
}
|
83
|
+
/*# sourceMappingURL=demos/assets/css/demo.css.map */
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["demos/assets/less/demo.less"],"names":[],"mappings":";;;AAMA;EACE,mBAAA;EACA,eAAA;EACA,aAAa,mCAAb;EACA,cAAA;EACA,SAAA;;AAEF;AAAI;AAAI;AAAI;EACV,YAAA;;AAEF;EACE,yBAAA;EACA,iBAAA;;AAEF;EACE,aAAA;EACA,sBAAA;EACA,mBAAA;;AAEF,KAAK,MACH;EACE,cAAA;EACA,WAAA;EACA,+BAAA;EACA,4BAAA;EACA,0BAAA;EACA,2BAAA;EACA,uBAAA;;AAGJ;EACE,YAAA;;AAEF,SACE;EACE,mBAAA;EACA,eAAA;EACA,8CAAA;EACA,sCAAA;;AALJ,SAOE;EACE,kDAAA;EACA,0CAAA;EACA,gBAAA;;AAVJ,SAYE,MAAK;EACH,wCAAA;EACA,4BAAA;EACA,gCAAA;;AAfJ,SAiBE;EACE,uBAAA;EACA,2BAAA;EACA,0BAAA;;AApBJ,SAsBE;EACE,yBAAA;;AAvBJ,SAyBE;EACE,cAAA;EACA,iBAAA;EACA,kBAAA;EACA,iBAAA;;AAGJ;EACE,qBAAA;;AAEF;EACE,gBAAA;EACA,iBAAA;;AAEF;EACE,kBAAA;EACA,WAAA;EACA,YAAA;;AAEF;EACE,mBAAA"}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
/*! gridster.js - v0.6.10 - 2015-05-31
|
2
|
+
* https://dsmorse.github.io/gridster.js/
|
3
|
+
* Copyright (c) 2015 ducksboard; Licensed MIT */
|
4
|
+
|
5
|
+
@bg-color: #26941f;
|
6
|
+
|
7
|
+
body {
|
8
|
+
background: @bg-color;
|
9
|
+
font-size: 16px;
|
10
|
+
font-family: 'Helvetica Neue', Arial, sans-serif;
|
11
|
+
color: #ffffff;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
h1, h2, h3, p {
|
15
|
+
margin: 10px;
|
16
|
+
}
|
17
|
+
table {
|
18
|
+
border-collapse: collapse;
|
19
|
+
border-spacing: 0;
|
20
|
+
}
|
21
|
+
.demo {
|
22
|
+
margin: 3em 0;
|
23
|
+
padding: 7.5em 0 5.5em;
|
24
|
+
background: @bg-color;
|
25
|
+
}
|
26
|
+
.demo:hover {
|
27
|
+
.gridster {
|
28
|
+
margin: 0 auto;
|
29
|
+
opacity: .8;
|
30
|
+
-webkit-transition: opacity .6s;
|
31
|
+
-moz-transition: opacity .6s;
|
32
|
+
-o-transition: opacity .6s;
|
33
|
+
-ms-transition: opacity .6s;
|
34
|
+
transition: opacity .6s;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
.content {
|
38
|
+
color: white;
|
39
|
+
}
|
40
|
+
.gridster {
|
41
|
+
.gs-w {
|
42
|
+
background: #61A9CF;
|
43
|
+
cursor: pointer;
|
44
|
+
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
45
|
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
46
|
+
}
|
47
|
+
.player {
|
48
|
+
-webkit-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
|
49
|
+
box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
|
50
|
+
background: #BBB;
|
51
|
+
}
|
52
|
+
.gs-w.try {
|
53
|
+
background-image: url(../img/sprite.png);
|
54
|
+
background-repeat: no-repeat;
|
55
|
+
background-position: 37px -169px;
|
56
|
+
}
|
57
|
+
.preview-holder {
|
58
|
+
border: none !important;
|
59
|
+
border-radius: 0 !important;
|
60
|
+
background: red !important;
|
61
|
+
}
|
62
|
+
ul {
|
63
|
+
background-color: #EFEFEF;
|
64
|
+
}
|
65
|
+
li {
|
66
|
+
font-size: 1em;
|
67
|
+
font-weight: bold;
|
68
|
+
text-align: center;
|
69
|
+
line-height: 100%;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
ul {
|
73
|
+
list-style-type: none;
|
74
|
+
}
|
75
|
+
li {
|
76
|
+
list-style: none;
|
77
|
+
font-weight: bold;
|
78
|
+
}
|
79
|
+
.gridster-box {
|
80
|
+
position: relative;
|
81
|
+
width: 100%;
|
82
|
+
height: 100%;
|
83
|
+
}
|
84
|
+
.controls {
|
85
|
+
margin-bottom: 20px;
|
86
|
+
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Demo » Resize » gridster.js</title>
|
5
|
+
<link rel="stylesheet" type="text/css" href="assets/css/demo.css">
|
6
|
+
<link rel="stylesheet" type="text/css" href="../dist/jquery.gridster.min.css">
|
7
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
|
8
|
+
<script src=//cdnjs.cloudflare.com/ajax/libs/seedrandom/2.3.10/seedrandom.min.js></script>
|
9
|
+
<script src="../dist/jquery.gridster.js" type="text/javascript" charset="utf-8"></script>
|
10
|
+
</head>
|
11
|
+
|
12
|
+
<body>
|
13
|
+
|
14
|
+
<h1>Resize</h1>
|
15
|
+
|
16
|
+
<p>As hommage to Netflix's <a href="https://github.com/Netflix/SimianArmy/wiki/Chaos-Monkey">Chaos Monkey</a>, this demo page is for testing. It attempts to insert a widget at a random location to ensure the overlap deconfliction locic works.</p>
|
17
|
+
|
18
|
+
<div class="controls">
|
19
|
+
<button class="js-fixed-random">Insert widget at random location</button>
|
20
|
+
<button class="js-random-random">Insert random sized widget at random location</button>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="gridster">
|
24
|
+
<ul style="z-index: 2; float: left;position: absolute">
|
25
|
+
<li data-row="1" data-col="1" data-sizex="2" data-sizey="2">0</li>
|
26
|
+
<li data-row="1" data-col="3" data-sizex="1" data-sizey="2">1</li>
|
27
|
+
<li data-row="1" data-col="4" data-sizex="1" data-sizey="1">2</li>
|
28
|
+
<li data-row="3" data-col="2" data-sizex="3" data-sizey="1">3</li>
|
29
|
+
<li data-row="4" data-col="1" data-sizex="1" data-sizey="1">4</li>
|
30
|
+
<li data-row="3" data-col="1" data-sizex="1" data-sizey="1">5</li>
|
31
|
+
<li data-row="4" data-col="2" data-sizex="1" data-sizey="1">6</li>
|
32
|
+
<li data-row="5" data-col="2" data-sizex="1" data-sizey="1">7</li>
|
33
|
+
<li data-row="4" data-col="4" data-sizex="1" data-sizey="1">8</li>
|
34
|
+
<li data-row="1" data-col="5" data-sizex="1" data-sizey="3">9</li>
|
35
|
+
</ul>
|
36
|
+
<svg width="100%" height="800px" xmlns="http://www.w3.org/2000/svg" style="float: left;
|
37
|
+
position: relative;
|
38
|
+
z-index: 5;
|
39
|
+
margin-top: 15px;">
|
40
|
+
<defs>
|
41
|
+
<pattern id="grid" width="105" height="105" patternUnits="userSpaceOnUse">
|
42
|
+
<rect width="105" height="105" fill="url(#smallGrid)"/>
|
43
|
+
<path d="M 105 0 L 0 0 0 105" fill="none" stroke="black" stroke-width="1"/>
|
44
|
+
</pattern>
|
45
|
+
</defs>
|
46
|
+
|
47
|
+
<rect width="100%" height="100%" fill="url(#grid)" />
|
48
|
+
</svg>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
|
52
|
+
<script type="text/javascript">
|
53
|
+
Math.seedrandom();
|
54
|
+
|
55
|
+
function getRandomInt (min, max) {
|
56
|
+
return Math.floor(Math.random() * (max - min + 1)) + min;
|
57
|
+
}
|
58
|
+
</script>
|
59
|
+
|
60
|
+
<script type="text/javascript">
|
61
|
+
var gridster;
|
62
|
+
var nextSimian = 10;
|
63
|
+
|
64
|
+
$(function () {
|
65
|
+
|
66
|
+
gridster = $(".gridster ul").gridster({
|
67
|
+
widget_base_dimensions: [100, 100],
|
68
|
+
avoid_overlapped_widgets: true,
|
69
|
+
widget_margins: [5, 5],
|
70
|
+
helper: 'clone',
|
71
|
+
resize: {
|
72
|
+
enabled: true
|
73
|
+
}
|
74
|
+
}).data('gridster');
|
75
|
+
|
76
|
+
|
77
|
+
$('.js-random-random').on('click', function () {
|
78
|
+
gridster.add_widget('<li>' + nextSimian + '</li>', getRandomInt(1, 5), getRandomInt(1, 5), getRandomInt(1, 15), getRandomInt(1, 15));
|
79
|
+
nextSimian++;
|
80
|
+
});
|
81
|
+
|
82
|
+
$('.js-fixed-random').on('click', function () {
|
83
|
+
gridster.add_widget('<li>' + nextSimian + '</li>', 1 , 1, getRandomInt(1, 15), getRandomInt(1, 15));
|
84
|
+
nextSimian++;
|
85
|
+
});
|
86
|
+
|
87
|
+
});
|
88
|
+
</script>
|
89
|
+
</body>
|
90
|
+
</html>
|
data/demos/index.html
CHANGED
@@ -6,13 +6,7 @@
|
|
6
6
|
<link rel="stylesheet" href="assets/css/demo.css">
|
7
7
|
</head>
|
8
8
|
<body>
|
9
|
-
|
10
|
-
ul {
|
11
|
-
padding: 0 0 0 40px;
|
12
|
-
background-color: cadetblue;
|
13
|
-
width: 50%;
|
14
|
-
}
|
15
|
-
</style>
|
9
|
+
|
16
10
|
|
17
11
|
<div class="content">
|
18
12
|
<h2>Samples</h2>
|
@@ -24,6 +18,7 @@
|
|
24
18
|
<li><a href="grid-from-serialize.html">Build grid from serialize</a></li>
|
25
19
|
<li><a href="multiple-grids.html">Multiple gridster instances on the same page</a></li>
|
26
20
|
<li><a href="resize.html">Resizable widgets</a></li>
|
21
|
+
<li><a href="chaosWidget.html">Chaos Widgets</a></li>
|
27
22
|
<li><a href="resize-limits.html">Resizable widgets with constraints</a></li>
|
28
23
|
<li><a href="serialize.html">Serialize widgets positions</a></li>
|
29
24
|
<li><a href="using-drag-callbacks.html">Using drag callbacks</a></li>
|
data/demos/responsive.html
CHANGED
data/lib/gridster.js-rails.rb
CHANGED
data/package.json
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
"name": "gridster",
|
3
3
|
"title": "gridster.js",
|
4
4
|
"description": "a drag-and-drop multi-column jQuery grid plugin",
|
5
|
-
"version": "0.
|
5
|
+
"version": "0.7.0",
|
6
6
|
"homepage": "https://dsmorse.github.io/gridster.js/",
|
7
7
|
"author": {
|
8
|
-
"name": "
|
8
|
+
"name": "ducksboard"
|
9
9
|
},
|
10
10
|
"repository": {
|
11
11
|
"type": "git",
|
@@ -14,6 +14,7 @@
|
|
14
14
|
"bugs": {
|
15
15
|
"url": "https://github.com/dsmorse/gridster.js/issues"
|
16
16
|
},
|
17
|
+
"license": "MIT",
|
17
18
|
"licenses": [
|
18
19
|
{
|
19
20
|
"type": "MIT",
|
@@ -22,7 +23,7 @@
|
|
22
23
|
],
|
23
24
|
"keywords": [],
|
24
25
|
"devDependencies": {
|
25
|
-
"bower": "~
|
26
|
+
"bower": "~1.7.7",
|
26
27
|
"grunt": "~0.4.5",
|
27
28
|
"grunt-bump": "0.0.11",
|
28
29
|
"grunt-contrib-clean": "^0.6.0",
|
@@ -30,6 +31,7 @@
|
|
30
31
|
"grunt-contrib-copy": "^0.8.0",
|
31
32
|
"grunt-contrib-cssmin": "~0.10.0",
|
32
33
|
"grunt-contrib-jshint": "~0.10.0",
|
34
|
+
"grunt-contrib-less": "^1.2.0",
|
33
35
|
"grunt-contrib-qunit": "^0.7.0",
|
34
36
|
"grunt-contrib-uglify": "~0.6.0",
|
35
37
|
"grunt-contrib-watch": "~0.6.1",
|
@@ -42,5 +44,15 @@
|
|
42
44
|
},
|
43
45
|
"scripts": {
|
44
46
|
"test": "grunt test"
|
47
|
+
},
|
48
|
+
"main": "dist/jquery.gridster.js",
|
49
|
+
"directories": {
|
50
|
+
"test": "test"
|
51
|
+
},
|
52
|
+
"jspm": {
|
53
|
+
"main": "jquery.gridster",
|
54
|
+
"directories": {
|
55
|
+
"lib": "dist"
|
56
|
+
}
|
45
57
|
}
|
46
58
|
}
|