Skip to content

Commit 83130dc

Browse files
committed
Merge branch 'develop' into typescript
2 parents b3d3011 + 116f687 commit 83130dc

File tree

5 files changed

+50
-23
lines changed

5 files changed

+50
-23
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ gridstack.js
66
[![devDependency Status](https://david-dm.org/gridstack/gridstack.js/dev-status.svg)](https://david-dm.org/gridstack/gridstack.js#info=devDependencies)
77
[![Coverage Status](https://coveralls.io/repos/github/gridstack/gridstack.js/badge.svg?branch=develop)](https://coveralls.io/github/gridstack/gridstack.js?branch=develop)
88
[![downloads](https://img.shields.io/npm/dm/gridstack.svg)](https://www.npmjs.com/package/gridstack)
9-
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/alaind831)
109

1110
Mobile-friendly Javascript library (with Typescript bindings) for dashboard layout and creation. Making a drag-and-drop, multi-column responsive dashboard has never been easier. Allows you to build draggable, responsive bootstrap v4-friendly layouts. It also has multiple bindings and works great with [React](https://reactjs.org/), [Angular](https://angular.io/), [Knockout.js](http://knockoutjs.com), [Ember](https://www.emberjs.com/) and others. Includes Typescript defines.
1211

1312
Inspired by no-longer maintained gridster, built with love.
1413

1514
Please visit http://gridstackjs.com and [these demos](http://gridstackjs.com/demo/).
1615

17-
If you find this lib useful, please [donate](https://www.paypal.me/alaind831) and help support it!
16+
If you find this lib useful, please donate [PayPal](https://www.paypal.me/alaind831) or [Venmo](https://www.venmo.com/adumesny) (adumesny) and help support it!
17+
18+
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/alaind831)
19+
[![Donate](https://img.shields.io/badge/Donate-Venmo-g.svg)](https://www.venmo.com/adumesny)
1820

1921
Join us on Slack: https://gridstackjs.troolee.com
2022

@@ -62,9 +64,9 @@ Usage
6264

6365
[![NPM version](https://img.shields.io/npm/v/gridstack.svg)](https://www.npmjs.com/package/gridstack)
6466

65-
```bash
66-
yarn install gridstack
67-
or
67+
```js
68+
yarn add gridstack
69+
// or
6870
npm install --save gridstack
6971
```
7072

demo/demo.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ h1 {
2424
}
2525

2626
.grid-stack {
27-
background: lightgoldenrodyellow;
27+
background: #FAFAD2;
2828
}
2929

3030
.grid-stack-item-content {

spec/gridstack-spec.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,34 @@ describe('gridstack', function() {
11571157
expect($('.grid-stack').hasClass('grid-stack-rtl')).toBe(false);
11581158
});
11591159
});
1160+
1161+
describe('grid.opts.styleInHead', function() {
1162+
beforeEach(function() {
1163+
document.body.insertAdjacentHTML('afterbegin', gridstackHTML);
1164+
});
1165+
afterEach(function() {
1166+
document.body.removeChild(document.getElementById('gs-cont'));
1167+
});
1168+
it('should add STYLE to parent node as a default', function() {
1169+
var options = {
1170+
cellHeight: 80,
1171+
verticalMargin: 10,
1172+
float: false,
1173+
};
1174+
var grid = GridStack.init(options);
1175+
expect(grid._styles.ownerNode.parentNode.tagName).toBe('DIV');
1176+
});
1177+
it('should add STYLE to HEAD if styleInHead === true', function() {
1178+
var options = {
1179+
cellHeight: 80,
1180+
verticalMargin: 10,
1181+
float: false,
1182+
styleInHead: true
1183+
};
1184+
var grid = GridStack.init(options);
1185+
expect(grid._styles.ownerNode.parentNode.tagName).toBe('HEAD');
1186+
});
1187+
});
11601188

11611189
describe('grid.opts.styleInHead', function() {
11621190
beforeEach(function() {

src/jq/jquery-ui.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
*/
66

77
(function( factory ) {
8-
/* [alain] we compile this in so no need to load with AMD
98
if ( typeof define === "function" && define.amd ) {
109

1110
// AMD. Register as an anonymous module.
1211
define([ "jquery" ], factory );
13-
} else */{
12+
} else {
1413

1514
// Browser globals
1615
factory( jQuery );

yarn.lock

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
15091509
dependencies:
15101510
ms "^2.1.1"
15111511

1512-
debug@^3.0.0, debug@^3.1.0, debug@^3.2.6:
1512+
debug@^3.1.0, debug@^3.2.6:
15131513
version "3.2.6"
15141514
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
15151515
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
@@ -2068,9 +2068,9 @@ eventemitter2@~0.4.13:
20682068
integrity sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=
20692069

20702070
eventemitter3@^4.0.0:
2071-
version "4.0.0"
2072-
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb"
2073-
integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==
2071+
version "4.0.7"
2072+
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
2073+
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==
20742074

20752075
events@1.1.1:
20762076
version "1.1.1"
@@ -2371,11 +2371,9 @@ flush-write-stream@^1.0.0:
23712371
readable-stream "^2.3.6"
23722372

23732373
follow-redirects@^1.0.0:
2374-
version "1.10.0"
2375-
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.10.0.tgz#01f5263aee921c6a54fb91667f08f4155ce169eb"
2376-
integrity sha512-4eyLK6s6lH32nOvLLwlIOnr9zrL8Sm+OvW4pVTJNoXeGzYIkHVf+pADQi+OJ0E67hiuSLezPVPyBcIZO50TmmQ==
2377-
dependencies:
2378-
debug "^3.0.0"
2374+
version "1.13.0"
2375+
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db"
2376+
integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==
23792377

23802378
for-in@^1.0.1, for-in@^1.0.2:
23812379
version "1.0.2"
@@ -3019,9 +3017,9 @@ http-errors@~1.7.2:
30193017
integrity sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=
30203018

30213019
http-proxy@^1.13.0:
3022-
version "1.18.0"
3023-
resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.0.tgz#dbe55f63e75a347db7f3d99974f2692a314a6a3a"
3024-
integrity sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==
3020+
version "1.18.1"
3021+
resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549"
3022+
integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==
30253023
dependencies:
30263024
eventemitter3 "^4.0.0"
30273025
follow-redirects "^1.0.0"
@@ -6713,9 +6711,9 @@ websocket-driver@>=0.5.1:
67136711
websocket-extensions ">=0.1.1"
67146712

67156713
websocket-extensions@>=0.1.1:
6716-
version "0.1.3"
6717-
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"
6718-
integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==
6714+
version "0.1.4"
6715+
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42"
6716+
integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==
67196717

67206718
websocket-stream@^5.0.1:
67216719
version "5.5.0"

0 commit comments

Comments
 (0)