Merge commit '707ab11f54'
This commit is contained in:
commit
e9bc1bb3ad
8 changed files with 67 additions and 37 deletions
|
|
@ -38,7 +38,8 @@ module.exports = function (grunt) {
|
|||
uglify: {
|
||||
options: {
|
||||
sourceMap: true,
|
||||
sourceMapName: 'dist/gridstack.min.map'
|
||||
sourceMapName: 'dist/gridstack.min.map',
|
||||
preserveComments: 'some'
|
||||
},
|
||||
dist: {
|
||||
files: {
|
||||
|
|
|
|||
30
README.md
30
README.md
|
|
@ -18,6 +18,7 @@ Join gridstack.js on Slack: https://gridstackjs.troolee.com
|
|||
- [Demo](#demo)
|
||||
- [Usage](#usage)
|
||||
- [Requirements](#requirements)
|
||||
- [Install](#install)
|
||||
- [Basic usage](#basic-usage)
|
||||
- [Options](#options)
|
||||
- [Grid attributes](#grid-attributes)
|
||||
|
|
@ -70,7 +71,7 @@ Join gridstack.js on Slack: https://gridstackjs.troolee.com
|
|||
- [IE8 support](#ie8-support)
|
||||
- [Nested grids](#nested-grids)
|
||||
- [Changes](#changes)
|
||||
- [v0.2.4 (development version)](#v024-development-version)
|
||||
- [v0.2.4 (2016-02-15)](#v024-2016-02-15)
|
||||
- [v0.2.3 (2015-06-23)](#v023-2015-06-23)
|
||||
- [v0.2.2 (2014-12-23)](#v022-2014-12-23)
|
||||
- [v0.2.1 (2014-12-09)](#v021-2014-12-09)
|
||||
|
|
@ -100,6 +101,29 @@ Usage
|
|||
|
||||
Note: You can still use [underscore.js](http://underscorejs.org) (>= 1.7.0) instead of lodash.js
|
||||
|
||||
## Install
|
||||
|
||||
* Using CDN:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/gridstack.js/0.2.4/gridstack.min.css" />
|
||||
<script type="text/javascript" src='//cdnjs.cloudflare.com/ajax/libs/gridstack.js/0.2.4/gridstack.min.js'></script>
|
||||
```
|
||||
|
||||
* Using bower:
|
||||
|
||||
```bash
|
||||
$ bower install gridstack
|
||||
```
|
||||
|
||||
* Using npm:
|
||||
|
||||
```bash
|
||||
$ npm install gridstack
|
||||
```
|
||||
|
||||
You can download files from `dist` directory as well.
|
||||
|
||||
## Basic usage
|
||||
|
||||
```html
|
||||
|
|
@ -748,13 +772,15 @@ See example: [Nested grid demo](http://troolee.github.io/gridstack.js/demo/neste
|
|||
Changes
|
||||
=======
|
||||
|
||||
#### v0.2.4 (development version)
|
||||
#### v0.2.4 (2016-02-15)
|
||||
|
||||
- fix closure compiler/linter warnings
|
||||
- add `static_grid` option.
|
||||
- add `min_width`/`min_height` methods (Thanks to @cvillemure)
|
||||
- add `destroy` method (Thanks to @zspitzer)
|
||||
- add `placeholder_text` option (Thanks to @slauyama)
|
||||
- add `handle_class` option.
|
||||
- add `make_widget` method.
|
||||
- lodash v 4.x support (Thanks to Andy Robbins)
|
||||
|
||||
#### v0.2.3 (2015-06-23)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "gridstack",
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.5-dev",
|
||||
"homepage": "https://github.com/troolee/gridstack.js",
|
||||
"authors": [
|
||||
"Pavel Reznikov <pashka.reznikov@gmail.com>"
|
||||
|
|
|
|||
41
dist/gridstack.js
vendored
41
dist/gridstack.js
vendored
|
|
@ -1,8 +1,10 @@
|
|||
// gridstack.js 0.2.4-dev
|
||||
// http://troolee.github.io/gridstack.js/
|
||||
// (c) 2014-2016 Pavel Reznikov
|
||||
// gridstack.js may be freely distributed under the MIT license.
|
||||
|
||||
/**
|
||||
* gridstack.js 0.2.5-dev
|
||||
* http://troolee.github.io/gridstack.js/
|
||||
* (c) 2014-2016 Pavel Reznikov
|
||||
* gridstack.js may be freely distributed under the MIT license.
|
||||
* @preserve
|
||||
*/
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery', 'lodash', 'jquery-ui/core', 'jquery-ui/widget', 'jquery-ui/mouse', 'jquery-ui/draggable',
|
||||
|
|
@ -702,15 +704,16 @@
|
|||
|
||||
el
|
||||
.draggable(_.extend(this.opts.draggable, {
|
||||
containment: this.opts.is_nested ? this.container.parent() : null
|
||||
containment: this.opts.is_nested ? this.container.parent() : null,
|
||||
start: on_start_moving,
|
||||
stop: on_end_moving,
|
||||
drag: drag_or_resize
|
||||
}))
|
||||
.on('dragstart', on_start_moving)
|
||||
.on('dragstop', on_end_moving)
|
||||
.on('drag', drag_or_resize)
|
||||
.resizable(_.extend(this.opts.resizable, {}))
|
||||
.on('resizestart', on_start_moving)
|
||||
.on('resizestop', on_end_moving)
|
||||
.on('resize', drag_or_resize);
|
||||
.resizable(_.extend(this.opts.resizable, {
|
||||
start: on_start_moving,
|
||||
stop: on_end_moving,
|
||||
resize: drag_or_resize
|
||||
}));
|
||||
|
||||
if (node.no_move || this._is_one_column_mode()) {
|
||||
el.draggable('disable');
|
||||
|
|
@ -1003,22 +1006,12 @@
|
|||
|
||||
scope.GridStackUI.Utils = Utils;
|
||||
|
||||
function event_stop_propagate(event) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
$.fn.gridstack = function(opts) {
|
||||
return this.each(function() {
|
||||
var o = $(this);
|
||||
if (!o.data('gridstack')) {
|
||||
o
|
||||
.data('gridstack', new GridStack(this, opts))
|
||||
.on('dragstart', event_stop_propagate)
|
||||
.on('dragstop', event_stop_propagate)
|
||||
.on('drag', event_stop_propagate)
|
||||
.on('resizestart', event_stop_propagate)
|
||||
.on('resizestop', event_stop_propagate)
|
||||
.on('resize', event_stop_propagate)
|
||||
.on('change', event_stop_propagate);
|
||||
.data('gridstack', new GridStack(this, opts));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
9
dist/gridstack.min.js
vendored
9
dist/gridstack.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/gridstack.min.map
vendored
2
dist/gridstack.min.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "gridstack",
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.5-dev",
|
||||
"description": "gridstack.js is a jQuery plugin for widget layout",
|
||||
"main": "dist/gridstack.js",
|
||||
"repository": {
|
||||
|
|
@ -25,6 +25,7 @@
|
|||
"grunt-contrib-copy": "^0.8.2",
|
||||
"grunt-contrib-cssmin": "^0.14.0",
|
||||
"grunt-contrib-uglify": "^0.10.1",
|
||||
"grunt-sass": "^1.1.0"
|
||||
"grunt-sass": "^1.1.0",
|
||||
"grunt-doctoc": "^0.1.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
// gridstack.js 0.2.4-dev
|
||||
// http://troolee.github.io/gridstack.js/
|
||||
// (c) 2014-2016 Pavel Reznikov
|
||||
// gridstack.js may be freely distributed under the MIT license.
|
||||
|
||||
/**
|
||||
* gridstack.js 0.2.5-dev
|
||||
* http://troolee.github.io/gridstack.js/
|
||||
* (c) 2014-2016 Pavel Reznikov
|
||||
* gridstack.js may be freely distributed under the MIT license.
|
||||
* @preserve
|
||||
*/
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery', 'lodash', 'jquery-ui/core', 'jquery-ui/widget', 'jquery-ui/mouse', 'jquery-ui/draggable',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue