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
34 changes: 17 additions & 17 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"preset": "node-style-guide",
"validateIndentation": 4,
"maximumLineLength": 120,
"jsDoc": {
"checkAnnotations": {
"preset": "jsdoc3",
"extra": {
"preserve": true
}
}
},
"requireCamelCaseOrUpperCaseIdentifiers": true,
"validateLineBreaks": false,
"requireTrailingComma": false,
"disallowTrailingWhitespace": true,
"requireCapitalizedComments": false,
"excludeFiles": ["dist/*.js", "demo/*", "spec/*"]
"preset": "node-style-guide",
"validateIndentation": 2,
"maximumLineLength": 180,
"jsDoc": {
"checkAnnotations": {
"preset": "jsdoc3",
"extra": {
"preserve": true
}
}
},
"requireCamelCaseOrUpperCaseIdentifiers": true,
"validateLineBreaks": false,
"requireTrailingComma": false,
"disallowTrailingWhitespace": true,
"requireCapitalizedComments": false,
"excludeFiles": ["dist/*.js", "demo/*", "spec/*"]
}
190 changes: 95 additions & 95 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,112 +1,112 @@
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jscs');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-protractor-runner');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-protractor-webdriver');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jscs');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-protractor-runner');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-protractor-webdriver');

grunt.initConfig({
sass: {
options: {
outputStyle: 'expanded'
},
dist: {
files: {
'dist/gridstack.css': 'src/gridstack.scss',
'dist/gridstack-extra.css': 'src/gridstack-extra.scss'
}
}
},
grunt.initConfig({
sass: {
options: {
outputStyle: 'expanded'
},
dist: {
files: {
'dist/gridstack.css': 'src/gridstack.scss',
'dist/gridstack-extra.css': 'src/gridstack-extra.scss'
}
}
},

cssmin: {
dist: {
files: {
'dist/gridstack.min.css': ['dist/gridstack.css'],
'dist/gridstack-extra.min.css': ['dist/gridstack-extra.css']
}
}
},
cssmin: {
dist: {
files: {
'dist/gridstack.min.css': ['dist/gridstack.css'],
'dist/gridstack-extra.min.css': ['dist/gridstack-extra.css']
}
}
},

copy: {
dist: {
files: {
'dist/gridstack.js': ['src/gridstack.js'],
'dist/gridstack.jQueryUI.js': ['src/gridstack.jQueryUI.js'],
}
}
},
copy: {
dist: {
files: {
'dist/gridstack.js': ['src/gridstack.js'],
'dist/gridstack.jQueryUI.js': ['src/gridstack.jQueryUI.js'],
}
}
},

uglify: {
options: {
sourceMap: true,
sourceMapName: 'dist/gridstack.min.map',
preserveComments: 'some'
},
dist: {
files: {
'dist/gridstack.min.js': ['src/gridstack.js'],
'dist/gridstack.jQueryUI.min.js': ['src/gridstack.jQueryUI.js'],
'dist/gridstack.all.js': ['src/gridstack.js', 'src/gridstack.jQueryUI.js']
}
}
},
uglify: {
options: {
sourceMap: true,
sourceMapName: 'dist/gridstack.min.map',
preserveComments: 'some'
},
dist: {
files: {
'dist/gridstack.min.js': ['src/gridstack.js'],
'dist/gridstack.jQueryUI.min.js': ['src/gridstack.jQueryUI.js'],
'dist/gridstack.all.js': ['src/gridstack.js', 'src/gridstack.jQueryUI.js']
}
}
},

jshint: {
all: ['src/*.js']
},
jshint: {
all: ['src/*.js']
},

jscs: {
all: ['*.js', 'src/*.js', ],
},
jscs: {
all: ['*.js', 'src/*.js', ],
},

watch: {
scripts: {
files: ['src/*.js'],
tasks: ['uglify', 'copy'],
options: {
},
},
styles: {
files: ['src/*.scss'],
tasks: ['sass', 'cssmin'],
options: {
},
}
watch: {
scripts: {
files: ['src/*.js'],
tasks: ['uglify', 'copy'],
options: {
},

protractor: {
options: {
configFile: 'protractor.conf.js',
},
all: {}
},
styles: {
files: ['src/*.scss'],
tasks: ['sass', 'cssmin'],
options: {
},
}
},

protractor: {
options: {
configFile: 'protractor.conf.js',
},
all: {}
},

connect: {
all: {
options: {
port: 8080,
hostname: 'localhost',
base: '.',
},
},
connect: {
all: {
options: {
port: 8080,
hostname: 'localhost',
base: '.',
},
},
},

protractor_webdriver: {
all: {
options: {
command: 'webdriver-manager start',
}
}
protractor_webdriver: {
all: {
options: {
command: 'webdriver-manager start',
}
});
}
}
});

grunt.registerTask('lint', ['jshint', 'jscs']);
grunt.registerTask('default', ['sass', 'cssmin', 'jshint', 'jscs', 'copy', 'uglify']);
grunt.registerTask('e2e-test', ['connect', 'protractor_webdriver', 'protractor']);
grunt.registerTask('lint', ['jshint', 'jscs']);
grunt.registerTask('default', ['sass', 'cssmin', 'jshint', 'jscs', 'copy', 'uglify']);
grunt.registerTask('e2e-test', ['connect', 'protractor_webdriver', 'protractor']);
};
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2017 Pavel Reznikov, Dylan Weiss
Copyright (c) 2014-2019 Dylan Weiss, Alain Dumesny, Pavel Reznikov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,21 @@ You can download source and build and use `dist` directory as well for latest no

```html
<div class="grid-stack">
<div class="grid-stack-item"
data-gs-x="0" data-gs-y="0"
data-gs-width="4" data-gs-height="2">
<div class="grid-stack-item-content"></div>
</div>
<div class="grid-stack-item"
data-gs-x="4" data-gs-y="0"
data-gs-width="4" data-gs-height="4">
<div class="grid-stack-item-content"></div>
</div>
<div class="grid-stack-item"
data-gs-x="0" data-gs-y="0"
data-gs-width="4" data-gs-height="2">
<div class="grid-stack-item-content"></div>
</div>
<div class="grid-stack-item"
data-gs-x="4" data-gs-y="0"
data-gs-width="4" data-gs-height="4">
<div class="grid-stack-item-content"></div>
</div>
</div>

<script type="text/javascript">
$(function () {
$('.grid-stack').gridstack();
$('.grid-stack').gridstack();
});
</script>
```
Expand Down Expand Up @@ -157,10 +157,10 @@ Also `alwaysShowResizeHandle` option may be useful:

```javascript
$(function () {
var options = {
alwaysShowResizeHandle: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
};
$('.grid-stack').gridstack(options);
var options = {
alwaysShowResizeHandle: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
};
$('.grid-stack').gridstack(options);
});
```

Expand Down Expand Up @@ -210,14 +210,14 @@ Here is a SASS code snippet which can make life easier (Thanks to @ascendantofra
```sass
.grid-stack > .grid-stack-item {

$gridstack-columns: 12;
$gridstack-columns: 12;

@for $i from 1 through $gridstack-columns {
&[data-gs-width='#{$i}'] { width: (100% / $gridstack-columns) * $i; }
&[data-gs-x='#{$i}'] { left: (100% / $gridstack-columns) * $i; }
&[data-gs-min-width='#{$i}'] { min-width: (100% / $gridstack-columns) * $i; }
&[data-gs-max-width='#{$i}'] { max-width: (100% / $gridstack-columns) * $i; }
}
@for $i from 1 through $gridstack-columns {
&[data-gs-width='#{$i}'] { width: (100% / $gridstack-columns) * $i; }
&[data-gs-x='#{$i}'] { left: (100% / $gridstack-columns) * $i; }
&[data-gs-min-width='#{$i}'] { min-width: (100% / $gridstack-columns) * $i; }
&[data-gs-max-width='#{$i}'] { max-width: (100% / $gridstack-columns) * $i; }
}
}
```

Expand Down Expand Up @@ -247,9 +247,9 @@ you can init gridstack like:

```javascript
$('.grid-stack').gridstack({
resizable: {
handles: 'e, se, s, sw, w'
}
resizable: {
handles: 'e, se, s, sw, w'
}
});
```

Expand Down Expand Up @@ -317,4 +317,4 @@ View our change log [here](https://github.com/gridstack/gridstack.js/tree/develo
The Team
========

gridstack.js is currently maintained by [Pavel Reznikov](https://github.com/troolee), [Dylan Weiss](https://github.com/radiolips) and [Alain Dumesny](https://github.com/adumesny). We appreciate [all contributors](https://github.com/gridstack/gridstack.js/graphs/contributors) for help.
gridstack.js is currently maintained by [Dylan Weiss](https://github.com/radiolips) and [Alain Dumesny](https://github.com/adumesny), originally created by [Pavel Reznikov](https://github.com/troolee). We appreciate [all contributors](https://github.com/gridstack/gridstack.js/graphs/contributors) for help.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
"test",
"tests"
]
}
}
Loading