Skip to content

Commit e91ce7e

Browse files
author
Alain Dumesny
authored
Merge pull request #1064 from adumesny/develop
add `jquery-ui.js` minimal need
2 parents 7ab2f3c + 0a51f87 commit e91ce7e

22 files changed

+4073
-31
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
dist/*.js
22
demo/*
33
spec/*
4+
src/jquery-ui.js
5+
src/jquery-ui.min.js

Gruntfile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ module.exports = function(grunt) {
3939
'dist/gridstack.d.ts': ['src/gridstack.d.ts'],
4040
'dist/gridstack.jQueryUI.js': ['src/gridstack.jQueryUI.js'],
4141
'dist/gridstack.poly.js': ['src/gridstack.poly.js'],
42+
'dist/jquery-ui.js': ['src/jquery-ui.js'],
43+
'dist/jquery-ui.min.js': ['src/jquery-ui.min.js'],
4244
}
4345
}
4446
},
@@ -54,7 +56,7 @@ module.exports = function(grunt) {
5456
'dist/gridstack.min.js': ['src/gridstack.js'],
5557
'dist/gridstack.jQueryUI.min.js': ['src/gridstack.jQueryUI.js'],
5658
'dist/gridstack.poly.min.js': ['src/gridstack.poly.js'],
57-
'dist/gridstack.all.js': ['src/gridstack.poly.js', 'src/gridstack.js', 'src/gridstack.jQueryUI.js']
59+
'dist/gridstack.all.js': ['src/gridstack.poly.js', 'src/gridstack.js', 'src/jquery-ui.js', 'src/gridstack.jQueryUI.js']
5860
}
5961
}
6062
},

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,30 +47,32 @@ Usage
4747
## Requirements
4848

4949
* [jQuery](http://jquery.com) (>= 3.1.0)
50-
* `Array.prototype.find`, and `Number.isNaN()` for IE and older browsers. We supply a separate `gridstack.poly.js` for that
50+
* `Array.prototype.find`, and `Number.isNaN()` for IE and older browsers.
51+
* Note: as of v0.5.4 We supply a separate `gridstack.poly.js` for that
5152
(part of `gridstack.all.js`) or you can look at other pollyfills
5253
([core.js](https://github.com/zloirock/core-js#ecmascript-6-array) and [mozilla.org](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)).
5354

5455
#### Using gridstack.js with jQuery UI
5556

56-
* [jQuery UI](http://jqueryui.com) (>= 1.12.0). Minimum required components: Core, Widget, Mouse, Draggable, Resizable
57+
* [jQuery UI](http://jqueryui.com) (>= 1.12.0). Minimum required components: Draggable, Droppable, Resizable (Widget, Mouse, core).
58+
* Note: as of v0.5.4 we include this subset as `jquery-ui.js` (and min.js) which is part of `gridstack.all.js`. If you wish to bring your own lib, include the individual gridstack parts instead of all.js
5759
* (Optional) [jquery-ui-touch-punch](https://github.com/furf/jquery-ui-touch-punch) for touch-based devices support
5860

5961
## Install
6062

6163
* Using CDN (minimized):
6264

6365
```html
64-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@0.5.3/dist/gridstack.min.css" />
65-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/gridstack@0.5.3/dist/gridstack.all.js"></script>
66+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@latest/dist/gridstack.min.css" />
67+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/gridstack@latest/dist/gridstack.all.js"></script>
6668
```
6769

6870
* Using CDN (debug):
6971

7072
```html
71-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@0.5.3/dist/gridstack.css" />
72-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/gridstack@0.5.3/dist/gridstack.js"></script>
73-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/gridstack@0.5.3/dist/gridstack.jQueryUI.js"></script>
73+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@latest/dist/gridstack.css" />
74+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/gridstack@latest/dist/gridstack.js"></script>
75+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/gridstack@latest/dist/gridstack.jQueryUI.js"></script>
7476
```
7577

7678
* or local:
@@ -188,7 +190,7 @@ $('.grid-stack').gridstack( {column: N} );
188190

189191
2) and change your HTML accordingly if **N < 12** (else custom CSS section next). Without this, things will not render/work correctly.
190192
```html
191-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@0.5.3/dist/gridstack-extra.css"/>
193+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@latest/dist/gridstack-extra.css"/>
192194

193195
<div class="grid-stack grid-stack-N">...</div>
194196
```

demo/anijs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<link rel="stylesheet" href="../dist/gridstack.css"/>
1212

1313
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
14-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
1514
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
15+
<script src="../src/jquery-ui.min.js"></script>
1616
<script src="../src/gridstack.js"></script>
1717
<script src="../src/gridstack.jQueryUI.js"></script>
1818

demo/float.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<link rel="stylesheet" href="../dist/gridstack.css"/>
1111

1212
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
13-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
1413
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
14+
<script src="../src/jquery-ui.min.js"></script>
1515
<script src="../src/gridstack.js"></script>
1616
<script src="../src/gridstack.jQueryUI.js"></script>
1717

demo/knockout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
<link rel="stylesheet" href="../dist/gridstack.css"/>
1111

1212
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
13-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
1413
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
1514
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js"></script>
15+
<script src="../src/jquery-ui.min.js"></script>
1616
<script src="../src/gridstack.js"></script>
1717
<script src="../src/gridstack.jQueryUI.js"></script>
1818

demo/knockout2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
<link rel="stylesheet" href="../dist/gridstack.css"/>
1111

1212
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
13-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
1413
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
1514
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js"></script>
15+
<script src="../src/jquery-ui.min.js"></script>
1616
<script src="../src/gridstack.js"></script>
1717
<script src="../src/gridstack.jQueryUI.js"></script>
1818

demo/nested.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<link rel="stylesheet" href="../dist/gridstack.css"/>
1111

1212
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
13-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
1413
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
14+
<script src="../src/jquery-ui.min.js"></script>
1515
<script src="../src/gridstack.js"></script>
1616
<script src="../src/gridstack.jQueryUI.js"></script>
1717

demo/responsive.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<link rel="stylesheet" href="../dist/gridstack-extra.css"/>
1212

1313
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
14-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
1514
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
15+
<script src="../src/jquery-ui.min.js"></script>
1616
<script src="../src/gridstack.js"></script>
1717
<script src="../src/gridstack.jQueryUI.js"></script>
1818

demo/right-to-left(rtl).html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<link rel="stylesheet" href="../dist/gridstack.css"/>
1212

1313
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
14-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
1514
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
1615
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js"></script>
16+
<script src="../src/jquery-ui.min.js"></script>
1717
<script src="../src/gridstack.js"></script>
1818
<script src="../src/gridstack.jQueryUI.js"></script>
1919

0 commit comments

Comments
 (0)