Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* getting jquery-ui from website again now that it is working
* no code change per say (indent and comments) but also no longer need to comment out
> AMD. Register as an anonymous module.
* updated two-jq.html to show actual $ usage for testing
  • Loading branch information
adumesny committed Jan 24, 2021
1 parent 5220f4c commit 682e585
Show file tree
Hide file tree
Showing 3 changed files with 3,727 additions and 3,728 deletions.
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>
1 change: 1 addition & 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/)*

- [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)
Expand Down
Loading

0 comments on commit 682e585

Please sign in to comment.