correct client and requirements
authorcavaliet
Mon, 20 Oct 2014 10:55:20 +0200
changeset 44 76f2fa4eb4f7
parent 43 e27c3c1c57f1
child 45 8d2fb4ec85d7
child 46 7cff1f0a6882
correct client and requirements
client/app/app.js
requirements.txt
--- a/client/app/app.js	Mon Oct 20 01:31:33 2014 +0200
+++ b/client/app/app.js	Mon Oct 20 10:55:20 2014 +0200
@@ -18,7 +18,7 @@
             //console.log('dataApi',$resource, context);
             this.dataResource = $resource(context.urls.dataUrl);
         })
-        .service('dataModel', function(dataApi, context, $q) {
+        .service('dataModel', function(dataApi, context) {
             //console.log('dataModel',this,dataApi);
             if(typeof context.categories_json !== 'undefined' && context.categories_json) {
                 this.data = JSON.parse(context.categories_json);
@@ -101,12 +101,16 @@
             } else {
                 wsuri = 'ws://' + window.location.hostname + ':8090/annot';
             }
-            var eventCode = $location.search().event;
+            
+            var eventCode = context.event_code;
             if(typeof eventCode==='undefined' || eventCode===''){
-                eventCode = getURLParameter('event');
+                eventCode = $location.search().event;
                 if(typeof eventCode==='undefined' || eventCode===''){
-                    alert('le code de l\'événement doit être indiqué dans l\'url selon ?event=CODE_EVENEMENT.');
-                    return;
+                    eventCode = getURLParameter('event');
+                    if(typeof eventCode==='undefined' || eventCode===''){
+                        alert('le code de l\'événement doit être indiqué dans un paramètre de template u dans l\'url selon ?event=CODE_EVENEMENT.');
+                        return;
+                    }
                 }
             }
             wsuri = wsuri + '?event=' + eventCode;
--- a/requirements.txt	Mon Oct 20 01:31:33 2014 +0200
+++ b/requirements.txt	Mon Oct 20 10:55:20 2014 +0200
@@ -17,9 +17,9 @@
 python-dateutil==2.2
 python-mimeparse==0.1.4
 pytz==2014.7
-'requests>=2.4.3'
+requests>=2.4.3
 six==1.8.0
-txosc==0.2.0
+-e hg+https://bitbucket.org/IRI/txosc/get/tip.tar.gz#egg=txosc
 txpostgres==1.2.0
 wsgiref==0.1.2
 zope.interface==4.1.1