diff --git a/Gruntfile.js b/Gruntfile.js index b1e6813cb..052de2053 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -40,8 +40,6 @@ module.exports = function(grunt) { dist: { files: { 'dist/gridstack-poly.js': ['src/gridstack-poly.js'], - //'dist/jq/jquery.js': ['src/jq/jquery.js'], - //'dist/jq/jquery-ui.js': ['src/jq/jquery-ui.js'], 'dist/src/gridstack.scss': ['src/gridstack.scss'], 'dist/src/gridstack-extra.scss': ['src/gridstack-extra.scss'], } @@ -58,14 +56,6 @@ module.exports = function(grunt) { files: { 'dist/jq/jquery.js': 'src/jq/jquery.js', 'dist/jq/jquery-ui.js': 'src/jq/jquery-ui.js', - /* - 'dist/jq/gridstack-dd-jqueryui.min.js': 'dist/jq/gridstack-dd-jqueryui.js', - 'dist/gridstack-dd.min.js': 'dist/gridstack-dd.js', - 'dist/gridstack-engine.min.js': 'dist/gridstack-engine.js', - 'dist/gridstack-poly.min.js': 'src/gridstack-poly.js', - 'dist/types.min.js': 'dist/types.js', - 'dist/utils.min.js': 'dist/utils.js', - */ } } }, diff --git a/README.md b/README.md index 607e73802..67d1842e0 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ alternatively in html ```html - + ``` ## Basic usage @@ -128,7 +128,7 @@ see [jsfiddle sample](https://jsfiddle.net/adumesny/jqhkry7g) as running example ## Requirements -GridStack no longer requires external dependencies as of v1.0.0 (lodash was removed in v0.5.0 and jquery API in v1.0.0). All you need to include is `gridstack.all.js` and `gridstack.min.css` (layouts are done using CSS column based %). +GridStack no longer requires external dependencies as of v1.0.0 (lodash was removed in v0.5.0 and jquery API in v1.0.0). All you need to include is `gridstack-h5.js` and `gridstack.min.css` (layouts are done using CSS column based %). ## API Documentation @@ -252,7 +252,7 @@ Please use [jQuery UI Touch Punch](https://github.com/furf/jquery-ui-touch-punch working on touch-based devices. ```html - + ``` @@ -359,12 +359,11 @@ v2 is a Typescript rewrite of 1.x, removing all jquery events, using classes and # jQuery Application -We're working on implementing HTML5 drag'n'drop through the plugin system. Right now it is still jquery-ui based. Because of that we are still bundling `jquery` (3.5.1) + `jquery-ui` (1.12.1 minimal drag|drop|resize) internally in `gridstack.all.js`. IFF your app needs to bring your own version instead, you should **instead** include `gridstack-poly.min.js` (optional IE support) + `gridstack.min.js` + `gridstack.jQueryUI.min.js` after you import your JQ libs. But note that there are issue with jQuery and ES6 import (see [1306](https://github.com/gridstack/gridstack.js/issues/1306)). +We now have a native HTML5 drag'n'drop through the plugin system (default), but the jquery-ui version can be used instead. It will bundle `jquery` (3.5.1) + `jquery-ui` (1.12.1 minimal drag|drop|resize) in `gridstack-jq.js`. IFF your app needs to bring your own version instead, you should **instead** include `gridstack-poly.min.js` (optional IE support) + `gridstack.min.js` + `gridstack.jQueryUI.min.js` after you import your JQ libs. But note that there are issue with jQuery and ES6 import (see [1306](https://github.com/gridstack/gridstack.js/issues/1306)). -Note: v2.0.0 does not currently support importing GridStack Drag&Drop without also including our jquery + jqueryui. Still trying to figure how to make that bundle possible. You will have to use 1.x - -As for events, you can still use `$(".grid-stack").on(...)` while jqueryui is used internally for things we don't support, but recommended you don't as that will get dropped at some point. +NOTE: v2.x / v3.0.0 does not currently support importing GridStack Drag&Drop without also including our jquery + jquery-ui. Still trying to figure how to make that bundle possible. You will have to use 1.x for now... +As for events, you can still use `$(".grid-stack").on(...)` for the version that uses jquery-ui for things we don't support. # Changes diff --git a/demo/advance.html b/demo/advance.html index 76cde9696..3fb8f0c6e 100644 --- a/demo/advance.html +++ b/demo/advance.html @@ -13,7 +13,7 @@ - + - - - -
-

Drag demo

-

-
Manual
-
HTML5 D&D
-
- - - - - \ No newline at end of file diff --git a/demo/experiment/test2.html b/demo/experiment/test2.html deleted file mode 100644 index 7b3c95a69..000000000 --- a/demo/experiment/test2.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - -

Drag the W3Schools image into the rectangle:

- -
-
- - - - \ No newline at end of file diff --git a/demo/float.html b/demo/float.html index 69ef2eb66..64f8b887e 100644 --- a/demo/float.html +++ b/demo/float.html @@ -7,7 +7,7 @@ Float grid demo - + diff --git a/demo/knockout.html b/demo/knockout.html index 2fdbb23a3..d31591aad 100644 --- a/demo/knockout.html +++ b/demo/knockout.html @@ -9,7 +9,7 @@ - +
diff --git a/demo/locked.html b/demo/locked.html index 878555171..6af6ae0ee 100644 --- a/demo/locked.html +++ b/demo/locked.html @@ -7,7 +7,7 @@ Locked demo - + diff --git a/demo/nested.html b/demo/nested.html index b622dd3fa..2742e5ae8 100644 --- a/demo/nested.html +++ b/demo/nested.html @@ -7,7 +7,7 @@ Nested grids demo - + - +
diff --git a/demo/serialization.html b/demo/serialization.html index c27e56d4f..bffadc764 100644 --- a/demo/serialization.html +++ b/demo/serialization.html @@ -7,7 +7,7 @@ Serialization demo - +
diff --git a/demo/static.html b/demo/static.html index 52ab0f622..cac65ff44 100644 --- a/demo/static.html +++ b/demo/static.html @@ -7,7 +7,7 @@ Static Grid - + diff --git a/demo/two-jq.html b/demo/two-jq.html new file mode 100644 index 000000000..3ed4acba2 --- /dev/null +++ b/demo/two-jq.html @@ -0,0 +1,124 @@ + + + + + + + Two grids demo + + + + + + + + + + +
+

Two grids demo

+ +
+
+ +
+
+
+
+
+
+ +
+ + +
+
+ + + + diff --git a/demo/two.html b/demo/two.html index afa9ddcb2..346bc51b3 100644 --- a/demo/two.html +++ b/demo/two.html @@ -10,7 +10,7 @@ - +