Browse files

fix problem when upload a torrent.

  • Loading branch information...
1 parent d26f435 commit 020248270b9721aa0f284a16b305116c5cffe454 @kebot kebot committed Jun 13, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 js/yaaw.js
View
8 js/yaaw.js
@@ -131,7 +131,6 @@ var YAAW = (function() {
holder.ondrop = function(e) {
$(this).removeClass("hover");
e.preventDefault();
-
var file = e.dataTransfer.files[0];
YAAW.add_task.upload(file);
return false;
@@ -291,7 +290,12 @@ var YAAW = (function() {
add_task: {
submit: function(_this) {
- var uri = $("#uri-input").val() || $("#uri-textarea").val().split("\n");
+ var uri = $("#uri-input").val();
+ if( uri == ""){
+ uri = $("#uri-textarea").val();
+ uri = (uri == "") ? uri : uri.split("\n");
+ }
+ // var uri = $("#uri-input").val() || $("#uri-textarea").val().split("\n");
var options = {}, options_save = {};
$("#add-task-option input[name]").each(function(i, n) {
var name = n.getAttribute("name");

0 comments on commit 0202482

Please sign in to comment.