Skip to content

Commit

Permalink
added readme and license
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Pękala committed Jun 10, 2014
0 parents commit 0b51a9e
Show file tree
Hide file tree
Showing 8 changed files with 22,186 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -0,0 +1,3 @@
.DS_Store
node_modules
index.html
39 changes: 39 additions & 0 deletions Gruntfile.js
@@ -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']);
};
21 changes: 21 additions & 0 deletions LICENSE
@@ -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.
54 changes: 54 additions & 0 deletions README.md
@@ -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>
```

0 comments on commit 0b51a9e

Please sign in to comment.