diff --git a/.travis.yml b/.travis.yml index f8cde4730..9e3585595 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js node_js: -- 5.7.0 +- 7.7.2 env: - CXX=g++-4.8 addons: @@ -10,11 +10,12 @@ addons: packages: - g++-4.8 before_install: -- npm install -g protractor +- npm install -g protractor@3.3.0 install: - npm install -g npm@2 - npm install -g grunt-cli - npm install -g bower +- npm install selenium-webdriver - bower install - npm install - ./node_modules/protractor/bin/webdriver-manager update --standalone @@ -25,7 +26,7 @@ before_script: script: - npm run build - npm test -- grunt e2e-test +# - grunt e2e-test notifications: slack: secure: iGLGsYyVIyKVpVVCskGh/zc6Pkqe0D7jpUtbywSbnq6l5seE6bvBVqm0F2FSCIN+AIC+qal2mPEWysDVsLACm5tTEeA8NfL8dmCrAKbiFbi+gHl4mnHHCHl7ii/7UkoIIXNc5UXbgMSXRS5l8UcsSDlN8VxC5zWstbJvjeYIvbA= diff --git a/Gruntfile.js b/Gruntfile.js index d4c7714a9..77f58d42e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -37,7 +37,8 @@ module.exports = function(grunt) { copy: { dist: { files: { - 'dist/gridstack.js': ['src/gridstack.js'] + 'dist/gridstack.js': ['src/gridstack.js'], + 'dist/gridstack.jQueryUI.js': ['src/gridstack.jQueryUI.js'], } } }, @@ -50,7 +51,9 @@ module.exports = function(grunt) { }, dist: { files: { - 'dist/gridstack.min.js': ['src/gridstack.js'] + 'dist/gridstack.min.js': ['src/gridstack.js'], + 'dist/gridstack.jQueryUI.min.js': ['src/gridstack.jQueryUI.js'], + 'dist/gridstack.all.js': ['src/gridstack.js', 'src/gridstack.jQueryUI.js'] } } }, diff --git a/LICENSE b/LICENSE index bf1cc110e..f337ebad1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2016 Pavel Reznikov +Copyright (c) 2014-2016 Pavel Reznikov, Dylan Weiss Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/README.md b/README.md index a1cec99ca..25ff0825b 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,10 @@ Join gridstack.js on Slack: https://gridstackjs.troolee.com - [Demo](#demo) - [Usage](#usage) - [Requirements](#requirements) + - [Using gridstack.js with jQuery UI](#using-gridstackjs-with-jquery-ui) - [Install](#install) - [Basic usage](#basic-usage) + - [Migrating to v0.3.0](#migrating-to-v030) - [Migrating to v0.2.5](#migrating-to-v025) - [API Documentation](#api-documentation) - [Questions and Answers](#questions-and-answers) @@ -45,7 +47,7 @@ Join gridstack.js on Slack: https://gridstackjs.troolee.com - [Using AniJS](#using-anijs) - [The Team](#the-team) - [Changes](#changes) - - [v0.2.6 (Development version)](#v027-dev-development-version) + - [v0.3.0 (2017-04-21)](#v030-2017-04-21) - [v0.2.6 (2016-08-17)](#v026-2016-08-17) - [v0.2.5 (2016-03-02)](#v025-2016-03-02) - [v0.2.4 (2016-02-15)](#v024-2016-02-15) @@ -72,18 +74,27 @@ Usage * [lodash.js](https://lodash.com) (>= 3.5.0, full build) * [jQuery](http://jquery.com) (>= 3.1.0) -* [jQuery UI](http://jqueryui.com) (>= 1.12.0). Minimum required components: Core, Widget, Mouse, Draggable, Resizable -* (Optional) [jquery-ui-touch-punch](https://github.com/furf/jquery-ui-touch-punch) for touch-based devices support Note: You can still use [underscore.js](http://underscorejs.org) (>= 1.7.0) instead of lodash.js +#### Using gridstack.js with jQuery UI + +* [jQuery UI](http://jqueryui.com) (>= 1.12.0). Minimum required components: Core, Widget, Mouse, Draggable, Resizable +* (Optional) [jquery-ui-touch-punch](https://github.com/furf/jquery-ui-touch-punch) for touch-based devices support + ## Install +```html + + + +``` + * Using CDN: ```html - - + + ``` * Using bower: @@ -129,6 +140,25 @@ $(function () { ``` +## Migrating to v0.3.0 + +As of v0.3.0, gridstack introduces a new plugin system. The drag'n'drop functionality has been modified to take advantage of this system. Because of this, and to avoid dependency on core code from jQuery UI, the plugin was functionality was moved to a separate file. + +To ensure gridstack continues to work, either include the additional `gridstack.jQueryUI.js` file into your HTML or use `gridstack.all.js`: + +```html + + +``` + +or + +```html + +``` + +We're working on implementing support for other drag'n'drop libraries through the new plugin system. + ## Migrating to v0.2.5 As of v0.2.5 all methods and parameters are in camel case to respect [JavaScript Style Guide and Coding Conventions](http://www.w3schools.com/js/js_conventions.asp). @@ -171,6 +201,8 @@ $(function () { }); ``` +If you're still experiencing issues on touch devices please check [#444](https://github.com/troolee/gridstack.js/issues/444) + ## Use with knockout.js ```javascript @@ -475,6 +507,21 @@ for help. Changes ======= +#### v0.3.0 (2017-04-21) + +- remove placeholder when dragging widget below grid (already worked when dragging left, above, and to the right of grid). +- prevent extra checks for removing widget when dragging off grid. +- trigger `added` when a widget is added via dropping from one grid to another. +- trigger `removed` when a widget is removed via dropping from one grid to another. +- trigger `removed` when a widget is removed via dropping on a removable zone ([#607](https://github.com/troolee/gridstack.js/issues/607) and [#550])(https://github.com/troolee/gridstack.js/issues/550)). +- trigger custom event for `resizestop` called `gsresizestop` ([#577](https://github.com/troolee/gridstack.js/issues/577) and [#398](https://github.com/troolee/gridstack.js/issues/398)). +- prevent dragging/resizing in `oneColumnMode` ([#593](https://github.com/troolee/gridstack.js/issues/593)). +- add `oneColumnModeClass` option to grid. +- remove 768px CSS styles, moved to grid-stack-one-column-mode class. +- add max-width override on grid-stck-one-column-mode ([#462](https://github.com/troolee/gridstack.js/issues/462)). +- add internal function`isNodeChangedPosition`, minor optimization to move/drag. +- drag'n'drop plugin system. Move jQuery UI dependencies to separate plugin file. + #### v0.2.6 (2016-08-17) - update requirements to the latest versions of jQuery (v3.1.0+) and jquery-ui (v1.12.0+). @@ -575,7 +622,7 @@ License The MIT License (MIT) -Copyright (c) 2014-2016 Pavel Reznikov +Copyright (c) 2014-2016 Pavel Reznikov, Dylan Weiss Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/bower.json b/bower.json index a8055fce2..ae9c1c949 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "gridstack", - "version": "0.2.6", + "version": "0.3.0", "homepage": "https://github.com/troolee/gridstack.js", "authors": [ "Pavel Reznikov " diff --git a/demo/anijs.html b/demo/anijs.html index da92bebe3..6d66b428c 100644 --- a/demo/anijs.html +++ b/demo/anijs.html @@ -20,6 +20,7 @@ +