diff options
| author | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2012-12-30 20:04:41 -0500 |
|---|---|---|
| committer | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2012-12-30 20:04:41 -0500 |
| commit | 200ea4abd13eaffad5151eb62fc54a90e5346022 (patch) | |
| tree | d9fab334fc616449b3fe726c050ba1cdd96cc4c9 /static/js/src | |
| parent | fdb3b4169f8056922344e6735c77d1c7679a3953 (diff) | |
| parent | ab3c66a6db7c4c2dbc3795c3b11132a535a3aeb3 (diff) | |
Merge branch 'master' of /pichat/repo
Diffstat (limited to 'static/js/src')
| -rw-r--r-- | static/js/src/chat.js | 2 | ||||
| -rw-r--r-- | static/js/src/drag.js | 18 |
2 files changed, 12 insertions, 8 deletions
diff --git a/static/js/src/chat.js b/static/js/src/chat.js index 09954de..f24917c 100644 --- a/static/js/src/chat.js +++ b/static/js/src/chat.js @@ -166,7 +166,7 @@ function removeOldMessages(){ } } -window.TextEnabled = Preferences.getProperty("chat.textEnabled", "true") == "none"; +window.TextEnabled = Preferences.getProperty("chat.textEnabled", "true") == "true"; window.ImgsEnabled = Preferences.getProperty("chat.imgsEnabled", "true") == "true"; function muteSelector() { diff --git a/static/js/src/drag.js b/static/js/src/drag.js index b48c365..48b3266 100644 --- a/static/js/src/drag.js +++ b/static/js/src/drag.js @@ -45,17 +45,21 @@ function dragTarget (target, callbacks) { } base.drop = function(e){ base.target.classList.remove('over'); - if (e.stopPropagation) { - e.stopPropagation(); // stops the browser from redirecting. - } - if (e.preventDefault) { - e.preventDefault(); - } + e.stopPropagation(); // stops the browser from redirecting. + e.preventDefault(); if ('drop' in callbacks) { - callbacks.drop(Drag.url); + if (e.dataTransfer) { + var url = e.dataTransfer.getData("url"); + if (url) { + callbacks.drop(url); + } + } else { + callbacks.drop(Drag.url); + } } return false; } + base.init(); }; |
