Skip to content

Commit 5ee5e60

Browse files
authored
Merge pull request #1586 from adumesny/develop
@adumesny https://jqueryui.com/download/ version
2 parents 77a2e63 + 682e585 commit 5ee5e60

24 files changed

+3753
-3750
lines changed

demo/two-jq.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<title>Two grids demo</title>
7+
<title>Two grids JQ demo</title>
88

99
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
1010
<link rel="stylesheet" href="demo.css"/>
@@ -45,21 +45,19 @@
4545
</head>
4646
<body>
4747
<div class="container-fluid">
48-
<h1>Two grids demo</h1>
48+
<h1>Two grids demo (Jquery version)</h1>
4949

5050
<div class="row">
5151
<div class="col-md-3">
5252
<div class="sidebar">
53-
5453
<!-- will size to match content -->
5554
<div class="grid-stack-item">
5655
<div class="grid-stack-item-content">Drag me</div>
5756
</div>
5857
<!-- manually force a drop size of 2x1 -->
59-
<div class="grid-stack-item" gs-w="2" gs-h="1">
60-
<div class="grid-stack-item-content">Drag me 2x1</div>
58+
<div class="grid-stack-item" gs-w="2" gs-h="1" gs-max-w="3">
59+
<div class="grid-stack-item-content">2x1, max=3</div>
6160
</div>
62-
6361
</div>
6462
</div>
6563
<div class="col-md-9">
@@ -83,19 +81,21 @@ <h1>Two grids demo</h1>
8381
</div>
8482
<script src="events.js"></script>
8583
<script type="text/javascript">
84+
let grids;
85+
$(function () { // testing $ works (delay loading here)
8686
let options = {
8787
column: 6,
8888
minRow: 1, // don't collapse when empty
8989
cellHeight: 70,
9090
disableOneColumnMode: true,
9191
float: false,
92-
dragIn: '.sidebar .grid-stack-item', // class that can be dragged from outside
92+
dragIn: '.sidebar .grid-stack-item', // add draggable to class
9393
dragInOptions: { revert: 'invalid', scroll: false, appendTo: 'body', helper: 'clone' }, // clone
9494
removable: '.trash', // drag-out delete class
9595
removeTimeout: 100,
9696
acceptWidgets: function(el) { return true; } // function example, else can be simple: true | false | '.someClass' value
9797
};
98-
let grids = GridStack.initAll(options);
98+
grids = GridStack.initAll(options);
9999
grids[1].float(true);
100100

101101
let items = [
@@ -110,15 +110,15 @@ <h1>Two grids demo</h1>
110110
addEvents(grid, i);
111111
grid.load(items);
112112
});
113+
});
114+
function toggleFloat(button, i) {
115+
grids[i].float(! grids[i].getFloat());
116+
button.innerHTML = 'float: ' + grids[i].getFloat();
117+
}
113118

114-
function toggleFloat(button, i) {
115-
grids[i].float(! grids[i].getFloat());
116-
button.innerHTML = 'float: ' + grids[i].getFloat();
117-
}
118-
119-
function compact(i) {
120-
grids[i].compact();
121-
}
119+
function compact(i) {
120+
grids[i].compact();
121+
}
122122
</script>
123123
</body>
124124
</html>

doc/CHANGES.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Change log
55
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
66
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
77

8-
- [3.1.5](#314-dev)
8+
- [3.1.5-dev](#315-dev)
9+
- [3.1.5 (2021-1-23)](#315-2021-1-23)
910
- [3.1.4 (2021-1-11)](#314-2021-1-11)
1011
- [3.1.3 (2021-1-2)](#313-2021-1-2)
1112
- [3.1.2 (2020-12-7)](#312-2020-12-7)
@@ -45,6 +46,10 @@ Change log
4546
- [v0.1.0 (2014-11-18)](#v010-2014-11-18)
4647

4748
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
49+
## 3.1.5-dev
50+
51+
- TBD
52+
4853
## 3.1.5 (2021-1-23)
4954

5055
- fix [1572](https://github.com/gridstack/gridstack.js/issues/1572) `column: N` option now sets CSS class

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gridstack",
3-
"version": "3.1.5",
3+
"version": "3.1.5-dev",
44
"description": "TypeScript/Javascript lib for dashboard layout and creation, no external dependencies, with many wrappers (React, Angular, Ember, knockout...)",
55
"main": "./dist/gridstack.js",
66
"types": "./dist/gridstack.d.ts",

src/gridstack-dd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// gridstack-GridStackDD.get().ts 3.1.5 @preserve
1+
// gridstack-GridStackDD.get().ts 3.1.5-dev @preserve
22

33
/**
44
* https://gridstackjs.com/

src/gridstack-ddi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// gridstack-ddi.ts 3.1.5 @preserve
1+
// gridstack-ddi.ts 3.1.5-dev @preserve
22

33
/**
44
* https://gridstackjs.com/

src/gridstack-engine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// gridstack-engine.ts 3.1.5 @preserve
1+
// gridstack-engine.ts 3.1.5-dev @preserve
22

33
/**
44
* https://gridstackjs.com/

src/gridstack-extra.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* gridstack 3.1.5 extra CSS for [2-11] columns (non default)
2+
* gridstack 3.1.5-dev extra CSS for [2-11] columns (non default)
33
* https://gridstackjs.com/
44
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
55
* gridstack.js may be freely distributed under the MIT license.

src/gridstack.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* gridstack 3.1.5 required CSS for default 12 and 1 column Mode size. Use gridstack-extra.css for column [2-11], else see https://github.com/gridstack/gridstack.js#custom-columns-css
2+
* gridstack 3.1.5-dev required CSS for default 12 and 1 column Mode size. Use gridstack-extra.css for column [2-11], else see https://github.com/gridstack/gridstack.js#custom-columns-css
33
* https://gridstackjs.com/
44
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
55
* gridstack.js may be freely distributed under the MIT license.

src/gridstack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// gridstack.ts 3.1.5 @preserve
1+
// gridstack.ts 3.1.5-dev @preserve
22

33
/**
44
* https://gridstackjs.com/

src/h5/dd-base-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dd-base-impl.ts 3.1.5 @preserve
1+
// dd-base-impl.ts 3.1.5-dev @preserve
22

33
/**
44
* https://gridstackjs.com/

0 commit comments

Comments
 (0)