Commit 05f93454 by Torkel Ödegaard

Moved angular-native-dragdrop to bower

parent f22bffe9
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
"angular": "~1.4.0", "angular": "~1.4.0",
"angular-route": "~1.4.0", "angular-route": "~1.4.0",
"angular-mocks": "~1.4.0", "angular-mocks": "~1.4.0",
"angular-sanitize": "~1.4.0" "angular-sanitize": "~1.4.0",
"angular-native-dragdrop": "~1.1.0"
} }
} }
require.config({ require.config({
urlArgs: 'bust=' + (new Date().getTime()), urlArgs: 'bust=' + (new Date().getTime()),
baseUrl: 'public/app', baseUrl: 'public/app',
...@@ -17,7 +16,7 @@ require.config({ ...@@ -17,7 +16,7 @@ require.config({
angular: '../vendor/angular/angular', angular: '../vendor/angular/angular',
'angular-route': '../vendor/angular-route/angular-route', 'angular-route': '../vendor/angular-route/angular-route',
'angular-sanitize': '../vendor/angular-sanitize/angular-sanitize', 'angular-sanitize': '../vendor/angular-sanitize/angular-sanitize',
'angular-dragdrop': '../vendor/angular-other/angular-dragdrop', 'angular-dragdrop': '../vendor/angular-native-dragdrop/draganddrop',
'angular-strap': '../vendor/angular-other/angular-strap', 'angular-strap': '../vendor/angular-other/angular-strap',
timepicker: '../vendor/angular-other/timepicker', timepicker: '../vendor/angular-other/timepicker',
datepicker: '../vendor/angular-other/datepicker', datepicker: '../vendor/angular-other/datepicker',
...@@ -101,5 +100,4 @@ require.config({ ...@@ -101,5 +100,4 @@ require.config({
'bootstrap-tagsinput': ['jquery'], 'bootstrap-tagsinput': ['jquery'],
}, },
waitSeconds: 60,
}); });
...@@ -21,7 +21,7 @@ require.config({ ...@@ -21,7 +21,7 @@ require.config({
'angular-route': '../vendor/angular-route/angular-route', 'angular-route': '../vendor/angular-route/angular-route',
'angular-sanitize': '../vendor/angular-sanitize/angular-sanitize', 'angular-sanitize': '../vendor/angular-sanitize/angular-sanitize',
angularMocks: '../vendor/angular-mocks/angular-mocks', angularMocks: '../vendor/angular-mocks/angular-mocks',
'angular-dragdrop': '../vendor/angular-other/angular-dragdrop', 'angular-dragdrop': '../vendor/angular-native-dragdrop/draganddrop',
'angular-strap': '../vendor/angular-other/angular-strap', 'angular-strap': '../vendor/angular-other/angular-strap',
timepicker: '../vendor/angular-other/timepicker', timepicker: '../vendor/angular-other/timepicker',
datepicker: '../vendor/angular-other/datepicker', datepicker: '../vendor/angular-other/datepicker',
......
{
"name": "angular-native-dragdrop",
"version": "1.1.0",
"homepage": "http://angular-dragdrop.github.io/angular-dragdrop",
"authors": [
"ganarajpr"
],
"description": "Angular HTML5 Drag and Drop directive written in pure with no dependency on JQuery.",
"main": "draganddrop.js",
"keywords": [
"angular",
"drag",
"drop",
"html5"
],
"dependencies": {
"angular": "~1.3"
},
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"_release": "1.1.0",
"_resolution": {
"type": "version",
"tag": "1.1.0",
"commit": "737981e86bd32a5432fa9edf09059ca3c0f22049"
},
"_source": "git://github.com/angular-dragdrop/angular-dragdrop.git",
"_target": "~1.1.0",
"_originalSource": "angular-native-dragdrop",
"_direct": true
}
\ No newline at end of file
/* jshint -W097 */
'use strict';
/* global require */
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var gulp = require('gulp');
gulp.task('lint', function() {
return gulp.src('./draganddrop.js')
.pipe(jshint())
.pipe(jshint.reporter(stylish));
});
gulp.task('default', ['lint']);
The MIT License
Copyright (c) 2015 Ganaraj P R, [Nebithi](http://www.nebithi.com)
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.
\ No newline at end of file
#Angular-DragDrop
[![Build status](http://img.shields.io/travis/angular-dragdrop/angular-dragdrop.svg?style=flat)](https://travis-ci.org/angular-dragdrop/angular-dragdrop)
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/ganarajpr/angular-dragdrop?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
Angular-DragDrop is a angular HTML5 Drag and Drop directive written in pure with no dependency on JQuery.
This is based on the work done by Jason Turim. While this [blog post](http://jasonturim.wordpress.com/2013/09/01/angularjs-drag-and-drop/) was the inspiration for creating a native Drag and Drop solution, the intention was to create something that was more generic.
This implementation is mainly different from the one posted in the blog in the following areas :
1. Angular-DragDrop does not create an isolate scope. This has huge benefits when it comes to working with other directives. **NOTE :** It also does not pollute the scope with any variables or functions.
2. It does not depend on any kind of an ID attribute ( being either present or generated on the fly ).
3. It allows one to create channels on which different drag and drop directive combinations can work on in the same page ( more on this later ) .
Pull requests are welcome.
[Documentation](http://angular-dragdrop.github.io/angular-dragdrop/)
#Looking for Active Contributors.
This repo needs active contributers and maintainers. If you are interested in being one of the people who would like to actively maintain this repo, please let me know.
The MIT License
Copyright (c) 2014 Ganaraj P R, [Nebithi](http://www.nebithi.com)
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.
{
"name": "angular-native-dragdrop",
"version": "1.0.8",
"homepage": "http://angular-dragdrop.github.io/angular-dragdrop",
"authors": [
"ganarajpr"
],
"description": "Angular HTML5 Drag and Drop directive written in pure with no dependency on JQuery.",
"main": "draganddrop.js",
"keywords": [
"angular",
"drag",
"drop",
"html5"
],
"dependencies": {
"angular": "~1.3"
},
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
body {
background-color: #f8f7f8;
}
.heading {
border-bottom: 1px solid #b7b7b7;
padding-bottom: 10px;
margin-bottom: 10px;
}
.topRow {
margin-bottom: 30px;
}
.on-drag-enter {
background-color : #677ba6;
}
.on-drag-enter-custom {
background-color : #d78cc7;
}
.on-drag-hover {
background-color : #3eb352;
}
.on-drag-hover-custom {
background-color : #d7a931;
}
\ No newline at end of file
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="utf-8" />
<title>Angular DragDrop (Demo)</title>
<script>document.write('<base href="' + document.location + '" />');</script>
<link rel="stylesheet" href="css/styles.css" />
<script data-require="angular.js@1.3.x" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.js" data-semver="1.3.14"></script>
<script src="http://pc035860.github.io/angular-highlightjs/angular-highlightjs.min.js"></script>
<script src="js/app.js"></script>
<script src="../draganddrop.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
</head>
<body >
<div class="container">
<div class="row topRow">
<h4 class="heading">
Drag and drop between the two lists.
</h4>
</div>
<h3>Beasts</h3>
<p>Left column of beasts is not draggable and accepts both beasts and priests</p>
<hr>
<div class="row" ng-controller="MainCtrl">
<div class="col-xs-6">
<ul ui-on-drop="onDrop($event,$data,men)" drag-enter-class="on-drag-enter-custom"
drop-channel="beasts,priests"
drop-validate="dropValidateHandler($drop, $event, $data)">
<li ui-draggable="false" drag="man" drag-channel="beasts"
on-drop-success="dropSuccessHandler($event,$index,men)"
ng-repeat="man in men track by $index">
{{man}}
</li>
</ul>
</div>
<div class="col-xs-6">
<ul ui-on-drop="onDrop($event,$data,women)"
drop-channel="beasts"
drop-validate="dropValidateHandler($drop, $event, $data)">
<li ui-draggable="true" drag="woman" drag-channel="beasts"
on-drop-success="dropSuccessHandler($event,$index,women)"
ng-repeat="woman in women track by $index">
{{woman}}
</li>
</ul>
</div>
</div>
<hr>
<h3>Priests</h3>
<hr>
<div class="row" ng-controller="MainCtrl">
<div class="col-xs-6">
<ul ui-on-drop="onDrop($event,$data,men)"
drop-channel="priests"
drop-validate="dropValidateHandler($drop, $event, $data)">
<li ui-draggable="true" drag="man"
drag-channel="priests"
on-drop-success="dropSuccessHandler($event,$index,men)"
ng-repeat="man in men track by $index">
{{man}}
</li>
</ul>
</div>
<div class="col-xs-6">
<ul ui-on-drop="onDrop($event,$data,women)"
drop-channel="priests"
drop-validate="dropValidateHandler($drop, $event, $data)">
<li ui-draggable="true" drag="woman"
drag-channel="priests"
on-drop-success="dropSuccessHandler($event,$index,women)"
ng-repeat="woman in women track by $index">
{{woman}}
</li>
</ul>
</div>
</div>
<hr>
<h3>Terrorists</h3>
<p>Each terrorist list item accepts a new terrorist. Shows inserting into a particular
position in an array.</p>
<hr>
<div class="row" ng-controller="MainCtrl">
<div class="col-xs-6">
<ul>
<li ui-draggable="true" drag="man"
drag-channel="terrorists2"
drop-validate="dropValidateHandler($drop, $event, $data)"
drag-hover-class="on-drag-hover-custom"
on-drop-success="dropSuccessHandler($event,$index,men)"
ui-on-drop="onDrop($event,$data,men,$index)" drop-channel="terrorists1"
ng-repeat="man in men track by $index">
{{man}}
</li>
</ul>
</div>
<div class="col-xs-6">
<ul>
<li ui-draggable="true" drag="woman"
drag-channel="terrorists1"
drop-validate="dropValidateHandler($drop, $event, $data)"
drag-hover-class="on-drag-hover-custom"
ui-on-drop="onDrop($event,$data,women,$index)" drop-channel="terrorists2"
on-drop-success="dropSuccessHandler($event,$index,women)"
ng-repeat="woman in women track by $index">
{{woman}}
</li>
</ul>
</div>
</div>
</div>
</body>
</html>
angular.module('app', [
'hljs',
'ang-drag-drop'
]).controller('MainCtrl', function($scope) {
$scope.men = [
'John',
'Jack',
'Mark',
'Ernie',
'Mike (Locked)'
];
$scope.women = [
'Jane',
'Jill',
'Betty',
'Mary'
];
$scope.addText = '';
$scope.dropValidateHandler = function($drop, $event, $data) {
if ($data === 'Mike (Locked)') {
return false;
}
if ($drop.element[0] === $event.srcElement.parentNode) {
// Don't allow moving to same container
return false;
}
return true;
};
$scope.dropSuccessHandler = function($event, index, array) {
array.splice(index, 1);
};
$scope.onDrop = function($event, $data, array, index) {
if (index !== undefined) {
array.splice(index, 0, $data);
} else {
array.push($data);
}
};
});
.content {
margin : 50px auto;
font-size: 1.0em;
line-height: 1.5em;
}
.content a{
color: #677BA6;
cursor: pointer;
}
body {
background-color: #f8f7f8;
}
.jumbotron h1,
.jumbotron p{
font-family: 'Open Sans';
}
.heading{
border-bottom: 1px solid #b7b7b7;
padding-bottom: 10px;
margin-bottom: 10px;
}
.ribbon{
position: fixed;
top : 0;
right : 0;
z-index: 2000;
}
\ No newline at end of file
{
"name": "angular-native-dragdrop",
"version": "1.0.8",
"description": "Angular HTML5 Drag and Drop directive written in pure with no dependency on JQuery.",
"main": "draganddrop.js",
"scripts": {
"test": "gulp"
},
"repository": {
"type": "git",
"url": "https://github.com/angular-dragdrop/angular-dragdrop.git"
},
"author": "ganarajpr",
"license": "MIT",
"bugs": {
"url": "https://github.com/angular-dragdrop/angular-dragdrop/issues"
},
"homepage": "http://angular-dragdrop.github.io/angular-dragdrop",
"devDependencies": {
"gulp": "^3.8.11",
"gulp-jshint": "^1.9.2",
"jshint-stylish": "^1.0.1"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment