Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions demo/two-jq.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Two grids demo</title>
<title>Two grids JQ demo</title>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="demo.css"/>
Expand Down Expand Up @@ -45,21 +45,19 @@
</head>
<body>
<div class="container-fluid">
<h1>Two grids demo</h1>
<h1>Two grids demo (Jquery version)</h1>

<div class="row">
<div class="col-md-3">
<div class="sidebar">

<!-- will size to match content -->
<div class="grid-stack-item">
<div class="grid-stack-item-content">Drag me</div>
</div>
<!-- manually force a drop size of 2x1 -->
<div class="grid-stack-item" gs-w="2" gs-h="1">
<div class="grid-stack-item-content">Drag me 2x1</div>
<div class="grid-stack-item" gs-w="2" gs-h="1" gs-max-w="3">
<div class="grid-stack-item-content">2x1, max=3</div>
</div>

</div>
</div>
<div class="col-md-9">
Expand All @@ -83,19 +81,21 @@ <h1>Two grids demo</h1>
</div>
<script src="events.js"></script>
<script type="text/javascript">
let grids;
$(function () { // testing $ works (delay loading here)
let options = {
column: 6,
minRow: 1, // don't collapse when empty
cellHeight: 70,
disableOneColumnMode: true,
float: false,
dragIn: '.sidebar .grid-stack-item', // class that can be dragged from outside
dragIn: '.sidebar .grid-stack-item', // add draggable to class
dragInOptions: { revert: 'invalid', scroll: false, appendTo: 'body', helper: 'clone' }, // clone
removable: '.trash', // drag-out delete class
removeTimeout: 100,
acceptWidgets: function(el) { return true; } // function example, else can be simple: true | false | '.someClass' value
};
let grids = GridStack.initAll(options);
grids = GridStack.initAll(options);
grids[1].float(true);

let items = [
Expand All @@ -110,15 +110,15 @@ <h1>Two grids demo</h1>
addEvents(grid, i);
grid.load(items);
});
});
function toggleFloat(button, i) {
grids[i].float(! grids[i].getFloat());
button.innerHTML = 'float: ' + grids[i].getFloat();
}

function toggleFloat(button, i) {
grids[i].float(! grids[i].getFloat());
button.innerHTML = 'float: ' + grids[i].getFloat();
}

function compact(i) {
grids[i].compact();
}
function compact(i) {
grids[i].compact();
}
</script>
</body>
</html>
7 changes: 6 additions & 1 deletion doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Change log
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*

- [3.1.5](#314-dev)
- [3.1.5-dev](#315-dev)
- [3.1.5 (2021-1-23)](#315-2021-1-23)
- [3.1.4 (2021-1-11)](#314-2021-1-11)
- [3.1.3 (2021-1-2)](#313-2021-1-2)
- [3.1.2 (2020-12-7)](#312-2020-12-7)
Expand Down Expand Up @@ -45,6 +46,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 -->
## 3.1.5-dev

- TBD

## 3.1.5 (2021-1-23)

- fix [1572](https://github.com/gridstack/gridstack.js/issues/1572) `column: N` option now sets CSS class
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": "3.1.5",
"version": "3.1.5-dev",
"description": "TypeScript/Javascript lib for dashboard layout and creation, no external dependencies, with many wrappers (React, Angular, 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,4 +1,4 @@
// gridstack-GridStackDD.get().ts 3.1.5 @preserve
// gridstack-GridStackDD.get().ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-ddi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gridstack-ddi.ts 3.1.5 @preserve
// gridstack-ddi.ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-engine.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gridstack-engine.ts 3.1.5 @preserve
// gridstack-engine.ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-extra.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* gridstack 3.1.5 extra CSS for [2-11] columns (non default)
* gridstack 3.1.5-dev extra CSS for [2-11] columns (non default)
* https://gridstackjs.com/
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
* gridstack.js may be freely distributed under the MIT 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 3.1.5 required CSS for default 12 and 1 column Mode size. Use gridstack-extra.css for column [2-11], else see https://github.com/gridstack/gridstack.js#custom-columns-css
* gridstack 3.1.5-dev required CSS for default 12 and 1 column Mode size. Use gridstack-extra.css for column [2-11], else see https://github.com/gridstack/gridstack.js#custom-columns-css
* https://gridstackjs.com/
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
* gridstack.js may be freely distributed under the MIT license.
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gridstack.ts 3.1.5 @preserve
// gridstack.ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
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,4 +1,4 @@
// dd-base-impl.ts 3.1.5 @preserve
// dd-base-impl.ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-draggable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-draggable.ts 3.1.5 @preserve
// dd-draggable.ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-droppable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-droppable.ts 3.1.5 @preserve
// dd-droppable.ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-element.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-elements.ts 3.1.5 @preserve
// dd-elements.ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-manager.ts 3.1.5 @preserve
// dd-manager.ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
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,4 +1,4 @@
// dd-resizable-handle.ts 3.1.5 @preserve
// dd-resizable-handle.ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-resizable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-resizable.ts 3.1.5 @preserve
// dd-resizable.ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-utils.ts 3.1.5 @preserve
// dd-utils.ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
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,4 +1,4 @@
// gridstack-dd-native.ts 3.1.5 @preserve
// gridstack-dd-native.ts 3.1.5-dev @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/index-h5.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// index.html5.ts 3.1.5 - everything you need for a Grid that uses HTML5 native drag&drop (work in progress) @preserve
// index.html5.ts 3.1.5-dev - everything you need for a Grid that uses HTML5 native drag&drop (work in progress) @preserve

// import './gridstack-poly.js';

Expand Down
2 changes: 1 addition & 1 deletion src/index-jq.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// index.jq.ts 3.1.5 - everything you need for a Grid that uses Jquery-ui drag&drop (original, full feature) @preserve
// index.jq.ts 3.1.5-dev - everything you need for a Grid that uses Jquery-ui drag&drop (original, full feature) @preserve

// import './gridstack-poly.js';

Expand Down
2 changes: 1 addition & 1 deletion src/index-static.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// index.static.ts 3.1.5 - everything you need for a static Grid (non draggable) @preserve
// index.static.ts 3.1.5-dev - everything you need for a static Grid (non draggable) @preserve

// import './gridstack-poly.js';

Expand Down
Loading