Skip to content

Commit

Permalink
Merge pull request #1773 from adumesny/master
Browse files Browse the repository at this point in the history
JQ droppable fix for website
  • Loading branch information
adumesny authored May 31, 2021
2 parents c3e97d9 + d06d15a commit dc7dc4c
Show file tree
Hide file tree
Showing 25 changed files with 36 additions and 25 deletions.
2 changes: 1 addition & 1 deletion demo/web1.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule="" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>

<script src="../dist/gridstack-h5.js"></script>
<script src="../dist/gridstack-jq.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion demo/web2.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule="" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>

<script src="../dist/gridstack-h5.js"></script>
<script src="../dist/gridstack-jq.js"></script>

<style type="text/css">
.grid-stack-item-removing {
Expand Down
5 changes: 5 additions & 0 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Change log
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*

- [4.2.5 (2021-5-31)](#425-2021-5-31)
- [4.2.4 (2021-5-29)](#424-2021-5-29)
- [4.2.3 (2021-5-8)](#423-2021-5-8)
- [4.2.2 (2021-4-23)](#422-2021-4-23)
Expand Down Expand Up @@ -57,6 +58,10 @@ Change log
- [v0.1.0 (2014-11-18)](#v010-2014-11-18)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## 4.2.5 (2021-5-31)

* fix for website with JQ `droppable('destroy')` giving error

## 4.2.4 (2021-5-29)

* fix [#1760](https://github.com/gridstack/gridstack.js/issues/1760) `removable:true` working again (broke in 4.x)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gridstack",
"version": "4.2.4-dev",
"version": "4.2.5",
"description": "TypeScript/JS lib for dashboard layout and creation, no external dependencies, with many wrappers (React, Angular, Vue, Ember, knockout...)",
"main": "./dist/gridstack.js",
"types": "./dist/gridstack.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-dd.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* gridstack-dd.ts 4.2.4-dev
* gridstack-dd.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-ddi.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* gridstack-ddi.ts 4.2.4-dev
* gridstack-ddi.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-engine.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* gridstack-engine.ts 4.2.4-dev
* gridstack-engine.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-h5.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* index-h5.ts 4.2.4-dev - everything you need for a Grid that uses HTML5 native drag&drop
* index-h5.ts 4.2.5 - everything you need for a Grid that uses HTML5 native drag&drop
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-jq.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* index-jq.ts 4.2.4-dev - everything you need for a Grid that uses Jquery-ui drag&drop (original, full feature)
* index-jq.ts 4.2.5 - everything you need for a Grid that uses Jquery-ui drag&drop (original, full feature)
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-poly.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* gridstack-poly.ts 4.2.4-dev - used for older browser support (not currently supported in v2+)
* gridstack-poly.ts 4.2.5 - used for older browser support (not currently supported in v2+)
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-static.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* index-static.ts 4.2.4-dev - much smaller, everything you need for a static Grid (non draggable, API driven)
* index-static.ts 4.2.5 - much smaller, everything you need for a static Grid (non draggable, API driven)
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/gridstack.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* gridstack SASS styles 4.2.4-dev
* gridstack SASS styles 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/gridstack.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* GridStack 4.2.4-dev
* GridStack 4.2.5
* https://gridstackjs.com/
*
* Copyright (c) 2021 Alain Dumesny
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-base-impl.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* dd-base-impl.ts 4.2.4-dev
* dd-base-impl.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-draggable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* dd-draggable.ts 4.2.4-dev
* dd-draggable.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-droppable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* dd-droppable.ts 4.2.4-dev
* dd-droppable.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-element.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* dd-elements.ts 4.2.4-dev
* dd-elements.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* dd-manager.ts 4.2.4-dev
* dd-manager.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-resizable-handle.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* dd-resizable-handle.ts 4.2.4-dev
* dd-resizable-handle.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-resizable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* dd-resizable.ts 4.2.4-dev
* dd-resizable.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* dd-utils.ts 4.2.4-dev
* dd-utils.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/
export class DDUtils {
Expand Down
2 changes: 1 addition & 1 deletion src/h5/gridstack-dd-native.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* gridstack-dd-native.ts 4.2.4-dev
* gridstack-dd-native.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
10 changes: 8 additions & 2 deletions src/jq/gridstack-dd-jqueryui.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gridstack-dd-jqueryui.ts 4.2.4-dev
// gridstack-dd-jqueryui.ts 4.2.5
// Copyright (c) 2021 Alain Dumesny - see root license
import { GridStackElement } from '../gridstack';
import { GridStackDD, DDOpts, DDKey, DDDropOpt, DDCallback, DDValue } from '../gridstack-dd';
Expand Down Expand Up @@ -90,7 +90,13 @@ export class GridStackDDJQueryUI extends GridStackDD {
opts._accept = opts.accept;
opts.accept = ($el: JQuery) => opts._accept($el.get(0));
}
$el.droppable(opts, key, value);
if (opts === 'disable' || opts === 'destroy') {
if ($el.data('ui-droppable')) { // error to call destroy if not there
$el.droppable(opts);
}
} else {
$el.droppable(opts, key, value);
}
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* types.ts 4.2.4-dev
* types.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* utils.ts 4.2.4-dev
* utils.ts 4.2.5
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/

Expand Down

0 comments on commit dc7dc4c

Please sign in to comment.