Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kamil Pękala
committed
Jun 10, 2014
0 parents
commit 0b51a9e
Showing
8 changed files
with
22,186 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
node_modules | ||
index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module.exports = function(grunt){ | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
// grunt.loadNpmTasks('grunt-karma'); | ||
|
||
grunt.initConfig({ | ||
uglify: { | ||
target: { | ||
files: { | ||
'src/angular-sortable-view.min.js': ['src/angular-sortable-view.js'] | ||
} | ||
} | ||
}, | ||
jshint: { | ||
all: [ | ||
'src/angular-sortable-view.js', | ||
'Gruntfile.js' | ||
] | ||
}//, | ||
// karma: { | ||
// unit: { | ||
// configFile: 'karma.conf.js', | ||
// singleRun: true, | ||
// }, | ||
// travis: { | ||
// configFile: 'karma.conf.js', | ||
// singleRun: true, | ||
// browsers: [ | ||
// 'Firefox' | ||
// ] | ||
// } | ||
// } | ||
}); | ||
|
||
grunt.registerTask('min', 'Minify javascript source code', 'uglify'); | ||
// grunt.registerTask('test', 'Run unit tests', ['jshint', 'min', 'karma:unit']); | ||
// grunt.registerTask('default', ['test']); | ||
// grunt.registerTask('travis', ['jshint', 'min', 'karma:travis']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2014 kamilkp | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
angular-sortable-view v0.0.1 | ||
================= | ||
|
||
Simple (multi)sortable view for AngularJS. No jQuery nor jQueryUI required | ||
|
||
Demo: http://kamilkp.github.io/angular-sortable-view/ | ||
|
||
You can find the source code for this demo on branch "gh-pages". | ||
|
||
###DESCRIPTION: | ||
|
||
This is a simple library written as a module for [https://github.com/angular/angular.js](AngularJS) for sorting elements in the UI. It supports both single elements list, and multiple connected lists, where an element can be moved from one to another. | ||
|
||
This library requires ***no dependencies whatsoever*** (except angular.js of course), so ***you no longer need to include jQuery and jQueryUI and angularUI*** which altogether gives the size of around ***340kB minified***. Whereas the [https://github.com/kamilkp/angular-sortable-view](Angular-sortable-view) is only ***5kB minified!*** | ||
|
||
The API is declarative. So if you need to specity a handle for sortables just place a `sv-handle` attribue on the given element. See the examples below: | ||
|
||
###Example of single sortable list | ||
|
||
```html | ||
<div sv-root sv-part="modelArray"> | ||
<div ng-repeat="item in modelArray" sv-element> | ||
<div>{{item}}</div> | ||
</div> | ||
</div> | ||
``` | ||
|
||
###Example of multiple sortable lists | ||
|
||
```html | ||
<div sv-root> | ||
<div sv-part="modelArray1"> | ||
<div ng-repeat="item in modelArray1" sv-element> | ||
<div>{{item}}</div> | ||
</div> | ||
</div> | ||
<div sv-part="modelArray2"> | ||
<div ng-repeat="item in modelArray2" sv-element> | ||
<div>{{item}}</div> | ||
</div> | ||
</div> | ||
</div> | ||
``` | ||
|
||
###Using handles | ||
|
||
```html | ||
<div sv-root sv-part="modelArray"> | ||
<div ng-repeat="item in modelArray" sv-element> | ||
<div>{{item}}</div> | ||
<span sv-handle></span> | ||
</div> | ||
</div> | ||
``` |
Oops, something went wrong.