Skip to content

Commit e344969

Browse files
committed
Merge branch 'develop'
2 parents 4afae7c + 5b92100 commit e344969

35 files changed

+5745
-12202
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
dist
12
node_modules
23
bower_components
34
coverage

.travis.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ sudo: required
66
addons:
77
chrome: stable
88
#before_install:
9-
#- npm install -g protractor@3.3.0
9+
#- yarn global add protractor@3.3.0
1010
cache:
1111
directories:
1212
- node_modules
1313
install:
14-
#- npm install -g npm@6.0.1
15-
- npm install -g grunt-cli
16-
- npm install -g bower
17-
#- npm install selenium-webdriver
18-
- npm install
14+
#- yarn global add npm@6.0.1
15+
- yarn global add grunt-cli
16+
- yarn global add bower
17+
#- yarn add selenium-webdriver
18+
- yarn
1919
- bower install
2020
#- ./node_modules/protractor/bin/webdriver-manager update --standalone
2121
#before_script:
2222
#- export CHROME_BIN=chromium-browser
2323
#- export DISPLAY=:99.0
2424
#- sh -e /etc/init.d/xvfb start
2525
script:
26-
- npm run build
27-
- npm test
26+
- yarn build
27+
- yarn test
2828
# - grunt e2e-test
2929
notifications:
3030
slack:

PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ Please explain the changes you made here. Include an example of what your change
33

44
### Checklist
55
- [ ] Created tests which fail without the change (if possible)
6-
- [ ] All tests passing (`npm test`)
6+
- [ ] All tests passing (`yarn test`)
77
- [ ] Extended the README / documentation, if necessary

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Join gridstack.js on Slack: https://gridstackjs.troolee.com
1616
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
1717
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
1818

19-
- [gridstack.js News](#gridstackjs-news)
19+
<!--- [gridstack.js News](#gridstackjs-news) -->
2020
- [Demo and examples](#demo-and-examples)
2121
- [Usage](#usage)
2222
- [Requirements](#requirements)
@@ -36,15 +36,15 @@ Join gridstack.js on Slack: https://gridstackjs.troolee.com
3636
- [Changes](#changes)
3737
- [The Team](#the-team)
3838

39-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
39+
<!-- END doctoc generated TOC please keep comment here to allow auto update
4040
4141
4242
gridstack.js News
4343
=====
4444
4545
Version 1.0 is coming! Check out the blog post here for more information:
4646
[https://dylandreams.com/2017/04/26/gridstack-10-coming-soon/](https://dylandreams.com/2017/04/26/gridstack-10-coming-soon/) and [subscribe to the blog](https://dylandreams.com) for more gridstack news and tutorials.
47-
47+
-->
4848

4949
Demo and examples
5050
====
@@ -57,10 +57,8 @@ Usage
5757

5858
## Requirements
5959

60-
* [lodash.js](https://lodash.com) (>= 4.17.10, full build)
6160
* [jQuery](http://jquery.com) (>= 3.1.0)
62-
63-
Note: You can still use [underscore.js](http://underscorejs.org) (>= 1.7.0) instead of lodash.js
61+
* `Array.prototype.find` for IE and older browsers ([core.js](https://github.com/zloirock/core-js#ecmascript-6-array) allows to include specific polyfills)
6462

6563
#### Using gridstack.js with jQuery UI
6664

@@ -80,9 +78,9 @@ Note: You can still use [underscore.js](http://underscorejs.org) (>= 1.7.0) inst
8078
* Using CDN:
8179

8280
```html
83-
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/gridstack.js/0.4.0/gridstack.min.css" />
84-
<script type="text/javascript" src='//cdnjs.cloudflare.com/ajax/libs/gridstack.js/0.4.0/gridstack.min.js'></script>
85-
<script type="text/javascript" src='//cdnjs.cloudflare.com/ajax/libs/gridstack.js/0.4.0/gridstack.jQueryUI.min.js'></script>
81+
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/gridstack.js/0.5.0/gridstack.min.css" />
82+
<script type="text/javascript" src='//cdnjs.cloudflare.com/ajax/libs/gridstack.js/0.5.0/gridstack.min.js'></script>
83+
<script type="text/javascript" src='//cdnjs.cloudflare.com/ajax/libs/gridstack.js/0.5.0/gridstack.jQueryUI.min.js'></script>
8684
```
8785

8886
* Using bower:
@@ -99,7 +97,7 @@ $ bower install gridstack
9997
$ npm install gridstack
10098
```
10199

102-
You can download files from `dist` directory as well.
100+
You can download source and build and use `dist` directory as well for latest non published code.
103101

104102
## Basic usage
105103

@@ -156,7 +154,7 @@ Please use [jQuery UI Touch Punch](https://github.com/furf/jquery-ui-touch-punch
156154
working on touch-based devices.
157155

158156
```html
159-
<script src="lodash.min.js"></script>
157+
<script src="core-js/client/shim.min.js"></script>
160158
<script src="jquery.min.js"></script>
161159
<script src="jquery-ui.min.js"></script>
162160
<script src="jquery.ui.touch-punch.min.js"></script>
@@ -311,11 +309,13 @@ for i in range(N):
311309
There are at least two more issues with gridstack in IE8 with jQueryUI resizable (it seems it doesn't work) and
312310
droppable. If you have any suggestions about support of IE8 you are welcome here: https://github.com/gridstack/gridstack.js/issues/76
313311

312+
<!-- fixed in 0.5.0 with #643 ?
314313
## Use with require.js
315314
316315
If you're using require.js and a single file jQueryUI please check out this
317316
[Stackoverflow question](http://stackoverflow.com/questions/35582945/redundant-dependencies-with-requirejs) to get it
318317
working properly.
318+
-->
319319

320320
Changes
321321
=====

bower.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gridstack",
3-
"version": "1.0.0-dev",
3+
"version": "0.5.0",
44
"homepage": "https://github.com/gridstack/gridstack.js",
55
"authors": [
66
"Pavel Reznikov <pashka.reznikov@gmail.com>",
@@ -15,7 +15,6 @@
1515
"amd"
1616
],
1717
"dependencies": {
18-
"lodash": ">= 4.17.10",
1918
"jquery": ">= 3.1.0",
2019
"jquery-ui": ">= 1.12.0"
2120
},

demo/anijs.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
<meta name="viewport" content="width=device-width, initial-scale=1" />
1111
<title>AniJS demo</title>
1212

13-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />
13+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" />
1414
<link rel="stylesheet" href="../dist/gridstack.css"/>
1515
<link rel="stylesheet" href="https://anijs.github.io/lib/anicollection/anicollection.css" />
1616

1717

18-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
19-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.0/jquery-ui.js"></script>
20-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
21-
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.0/lodash.min.js"></script>
18+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
19+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.js"></script>
20+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
21+
<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.6.9/shim.min.js"></script>
2222
<script src="../dist/gridstack.js"></script>
2323
<script src="../dist/gridstack.jQueryUI.js"></script>
2424

@@ -86,4 +86,4 @@ <h4>Widget added</h4>
8686
});
8787
</script>
8888
</body>
89-
</html>
89+
</html>

demo/float.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
<meta name="viewport" content="width=device-width, initial-scale=1">
1111
<title>Float grid demo</title>
1212

13-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
13+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
1414
<link rel="stylesheet" href="../dist/gridstack.css"/>
1515

16-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
17-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.0/jquery-ui.js"></script>
18-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
19-
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.0/lodash.min.js"></script>
16+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
17+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.js"></script>
18+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
19+
<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.6.9/shim.min.js"></script>
2020
<script src="../dist/gridstack.js"></script>
2121
<script src="../dist/gridstack.jQueryUI.js"></script>
2222

@@ -75,7 +75,7 @@ <h1>Float grid demo</h1>
7575
width: 1 + 3 * Math.random(),
7676
height: 1 + 3 * Math.random()
7777
};
78-
this.grid.addWidget($('<div><div class="grid-stack-item-content" /><div/>'),
78+
this.grid.addWidget($('<div><div class="grid-stack-item-content"></div></div>'),
7979
node.x, node.y, node.width, node.height);
8080
return false;
8181
}.bind(this);

demo/knockout.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
<meta name="viewport" content="width=device-width, initial-scale=1">
1111
<title>Knockout.js demo</title>
1212

13-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
13+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
1414
<link rel="stylesheet" href="../dist/gridstack.css"/>
1515

16-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
17-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.0/jquery-ui.js"></script>
18-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
19-
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.0/lodash.min.js"></script>
20-
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.2.0/knockout-min.js"></script>
16+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
17+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.js"></script>
18+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
19+
<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.6.9/shim.min.js"></script>
20+
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js"></script>
2121
<script src="../dist/gridstack.js"></script>
2222
<script src="../dist/gridstack.jQueryUI.js"></script>
2323

@@ -63,7 +63,7 @@ <h1>knockout.js Demo</h1>
6363
}).data('gridstack');
6464
}
6565

66-
var item = _.find(items, function (i) { return i.nodeType == 1 });
66+
var item = items.find(function (i) { return i.nodeType == 1 });
6767
grid.addWidget(item);
6868
ko.utils.domNodeDisposal.addDisposeCallback(item, function () {
6969
grid.removeWidget(item);

demo/knockout2.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
<meta name="viewport" content="width=device-width, initial-scale=1">
1111
<title>Knockout.js demo</title>
1212

13-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
13+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
1414
<link rel="stylesheet" href="../dist/gridstack.css"/>
1515

16-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
17-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.0/jquery-ui.js"></script>
18-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
19-
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.0/lodash.min.js"></script>
20-
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.2.0/knockout-min.js"></script>
16+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
17+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.js"></script>
18+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
19+
<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.6.9/shim.min.js"></script>
20+
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js"></script>
2121
<script src="../dist/gridstack.js"></script>
2222
<script src="../dist/gridstack.jQueryUI.js"></script>
2323

@@ -63,7 +63,7 @@ <h1>knockout.js Demo</h1>
6363
}).data('gridstack');
6464
}
6565

66-
var item = _.find(items, function (i) { return i.nodeType == 1 });
66+
var item = items.find(function (i) { return i.nodeType == 1 });
6767
grid.addWidget(item);
6868
ko.utils.domNodeDisposal.addDisposeCallback(item, function () {
6969
grid.removeWidget(item);

demo/nested.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
<meta name="viewport" content="width=device-width, initial-scale=1">
1111
<title>Nested grids demo</title>
1212

13-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
13+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
1414
<link rel="stylesheet" href="../dist/gridstack.css"/>
1515

16-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
17-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.0/jquery-ui.js"></script>
18-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
19-
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.0/lodash.min.js"></script>
16+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
17+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.js"></script>
18+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
19+
<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.6.9/shim.min.js"></script>
2020
<script src="../dist/gridstack.js"></script>
2121
<script src="../dist/gridstack.jQueryUI.js"></script>
2222

0 commit comments

Comments
 (0)