summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2012-07-18 02:52:13 -0400
committerJules Laplace <jules@okfoc.us>2012-07-18 02:52:13 -0400
commitdadaec11b1767429b94ba000fb2eb034326179c0 (patch)
tree83a9ee05c361daad7240ce3a2b4a3ba831dc4c35 /static
parentb9203e8a9c2a4126515b112236779a6e5a5350af (diff)
Drag
Diffstat (limited to 'static')
-rw-r--r--static/js/pichat.js18
-rw-r--r--static/js/pichat2.js18
-rw-r--r--static/js/src/drag.js18
3 files changed, 27 insertions, 27 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js
index 286edb9..1f1cf43 100644
--- a/static/js/pichat.js
+++ b/static/js/pichat.js
@@ -548,7 +548,7 @@ function dragTarget (target, callbacks) {
base.enter = function(e){
base.target.classList.add('over');
if ('enter' in callbacks) {
- callbacks.enter(Drag.imgSrc);
+ callbacks.enter(Drag.url);
}
return false;
}
@@ -557,21 +557,21 @@ function dragTarget (target, callbacks) {
e.preventDefault(); // Necessary. Allows us to drop.
}
if ('over' in callbacks) {
- callbacks.over(Drag.imgSrc);
+ callbacks.over(Drag.url);
}
return false;
}
base.leave = function(e){
base.target.classList.remove('over');
if ('leave' in callbacks) {
- callbacks.leave(Drag.imgSrc);
+ callbacks.leave(Drag.url);
}
return false;
}
base.end = function(e){
base.target.classList.remove('over');
if ('leave' in callbacks) {
- callbacks.leave(Drag.imgSrc);
+ callbacks.leave(Drag.url);
}
return false;
}
@@ -584,7 +584,7 @@ function dragTarget (target, callbacks) {
e.preventDefault();
}
if ('drop' in callbacks) {
- callbacks.drop(Drag.imgSrc);
+ callbacks.drop(Drag.url);
}
return false;
}
@@ -592,16 +592,16 @@ function dragTarget (target, callbacks) {
};
window.Drag = {
- 'imgSrc': "",
+ 'url': "",
'bindImages': function (){
- $('.unbound').each(function(index,img){
- img.addEventListener('dragstart', Drag.start, false);
+ $('img.unbound').each(function(img){
+ this.addEventListener('dragstart', Drag.start, false);
$(this).removeClass('unbound');
});
},
'start': function(e){
if (this.src) {
- Drag.imgSrc = this.src;
+ Drag.url = this.src;
}
}
}
diff --git a/static/js/pichat2.js b/static/js/pichat2.js
index 286edb9..1f1cf43 100644
--- a/static/js/pichat2.js
+++ b/static/js/pichat2.js
@@ -548,7 +548,7 @@ function dragTarget (target, callbacks) {
base.enter = function(e){
base.target.classList.add('over');
if ('enter' in callbacks) {
- callbacks.enter(Drag.imgSrc);
+ callbacks.enter(Drag.url);
}
return false;
}
@@ -557,21 +557,21 @@ function dragTarget (target, callbacks) {
e.preventDefault(); // Necessary. Allows us to drop.
}
if ('over' in callbacks) {
- callbacks.over(Drag.imgSrc);
+ callbacks.over(Drag.url);
}
return false;
}
base.leave = function(e){
base.target.classList.remove('over');
if ('leave' in callbacks) {
- callbacks.leave(Drag.imgSrc);
+ callbacks.leave(Drag.url);
}
return false;
}
base.end = function(e){
base.target.classList.remove('over');
if ('leave' in callbacks) {
- callbacks.leave(Drag.imgSrc);
+ callbacks.leave(Drag.url);
}
return false;
}
@@ -584,7 +584,7 @@ function dragTarget (target, callbacks) {
e.preventDefault();
}
if ('drop' in callbacks) {
- callbacks.drop(Drag.imgSrc);
+ callbacks.drop(Drag.url);
}
return false;
}
@@ -592,16 +592,16 @@ function dragTarget (target, callbacks) {
};
window.Drag = {
- 'imgSrc': "",
+ 'url': "",
'bindImages': function (){
- $('.unbound').each(function(index,img){
- img.addEventListener('dragstart', Drag.start, false);
+ $('img.unbound').each(function(img){
+ this.addEventListener('dragstart', Drag.start, false);
$(this).removeClass('unbound');
});
},
'start': function(e){
if (this.src) {
- Drag.imgSrc = this.src;
+ Drag.url = this.src;
}
}
}
diff --git a/static/js/src/drag.js b/static/js/src/drag.js
index f6738db..b48c365 100644
--- a/static/js/src/drag.js
+++ b/static/js/src/drag.js
@@ -16,7 +16,7 @@ function dragTarget (target, callbacks) {
base.enter = function(e){
base.target.classList.add('over');
if ('enter' in callbacks) {
- callbacks.enter(Drag.imgSrc);
+ callbacks.enter(Drag.url);
}
return false;
}
@@ -25,21 +25,21 @@ function dragTarget (target, callbacks) {
e.preventDefault(); // Necessary. Allows us to drop.
}
if ('over' in callbacks) {
- callbacks.over(Drag.imgSrc);
+ callbacks.over(Drag.url);
}
return false;
}
base.leave = function(e){
base.target.classList.remove('over');
if ('leave' in callbacks) {
- callbacks.leave(Drag.imgSrc);
+ callbacks.leave(Drag.url);
}
return false;
}
base.end = function(e){
base.target.classList.remove('over');
if ('leave' in callbacks) {
- callbacks.leave(Drag.imgSrc);
+ callbacks.leave(Drag.url);
}
return false;
}
@@ -52,7 +52,7 @@ function dragTarget (target, callbacks) {
e.preventDefault();
}
if ('drop' in callbacks) {
- callbacks.drop(Drag.imgSrc);
+ callbacks.drop(Drag.url);
}
return false;
}
@@ -60,16 +60,16 @@ function dragTarget (target, callbacks) {
};
window.Drag = {
- 'imgSrc': "",
+ 'url': "",
'bindImages': function (){
- $('.unbound').each(function(index,img){
- img.addEventListener('dragstart', Drag.start, false);
+ $('img.unbound').each(function(img){
+ this.addEventListener('dragstart', Drag.start, false);
$(this).removeClass('unbound');
});
},
'start': function(e){
if (this.src) {
- Drag.imgSrc = this.src;
+ Drag.url = this.src;
}
}
}