[tor-commits] [ooni-probe/develop] Include jquery as dep

isis at torproject.org isis at torproject.org
Wed Jun 26 01:02:11 UTC 2013


commit ccc53b5cd5d7cf1e96b9595b0e5d380ca6dd69e9
Author: Arturo Filastò <art at fuffa.org>
Date:   Wed May 8 19:10:58 2013 +0200

    Include jquery as dep
    
    Fix bug in ng-upload
---
 data/ui/app/index.html                  |    1 +
 data/ui/app/libs/ng-upload/ng-upload.js |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/data/ui/app/index.html b/data/ui/app/index.html
index c304066..5f3e376 100644
--- a/data/ui/app/index.html
+++ b/data/ui/app/index.html
@@ -28,6 +28,7 @@
 
   <script src="libs/angular/angular.js"></script>
   <script src="libs/angular-resource/angular-resource.js"></script>
+  <script src="libs/jquery/jquery.js"></script>
   <script src="libs/ng-upload/ng-upload.js"></script>
   <script src="scripts/app.js"></script>
   <script src="scripts/services.js"></script>
diff --git a/data/ui/app/libs/ng-upload/ng-upload.js b/data/ui/app/libs/ng-upload/ng-upload.js
index fae7a44..cedaa1f 100644
--- a/data/ui/app/libs/ng-upload/ng-upload.js
+++ b/data/ui/app/libs/ng-upload/ng-upload.js
@@ -38,7 +38,7 @@ angular.module('ngUpload', [])
         options.enableControls = attrs.uploadOptionsEnableControls;
 
         // submit the form - requires jQuery
-        var form = element.parents('form[ng-upload]') || element.parents('form.ng-upload'); 
+        var form = $(element).parents('form[ng-upload]') || $(element).parents('form.ng-upload'); 
 
         // Retrieve the callback function
         var fn = $parse(attrs.uploadSubmit);
@@ -104,4 +104,4 @@ angular.module('ngUpload', [])
         element.attr("encoding", "multipart/form-data");
       }
     };
-  }]);
\ No newline at end of file
+  }]);





More information about the tor-commits mailing list