Changeset 18640
- Timestamp:
- 09/25/16 17:19:41 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MobileIndico/indico.js
r18639 r18640 1 var indico_url = "https://indico.scc.kit.edu/indico/";1 var default_url = "https://indico.scc.kit.edu/indico/"; 2 2 var default_event = 215; 3 3 … … 7 7 $('#debug').append("<pre>"+JSON.stringify(result,null,2)+"</pre>"); 8 8 9 $("#indico-link").attr("href", indico_url+"/event/"+ID)9 $("#indico-link").attr("href", default_url+"/event/"+ID) 10 10 11 11 var conf = result['results'][ID]; … … 231 231 ----------------------------------------------------------------------------------------------*/ 232 232 233 var ID = window.location.href.split("?")[1]; 233 var cmd = window.location.href.split("?")[1]; 234 235 var ID = cmd ? cmd.split("&").find(function(str){ return str.split("=")[0]=="id"; }) : null; 236 var URL = cmd ? cmd.split("&").find(function(str){ return str.split("=")[0]=="url"; }) : null; 234 237 235 238 if (ID) 236 ID = ID.split("&").find(function(str){ return str.split("=")[0]=="id"; }); 237 238 ID = !ID ? default_event : ID.split("=")[1]; 239 240 $.getJSON(indico_url+"/export/timetable/"+ID+".jsonp?callback=?"); 239 default_event = ID.split("=")[1]; 240 if (URL) 241 default_url = URL.split("=")[1]; 242 243 $.getJSON(default_url+"/export/timetable/"+default_event+".jsonp?callback=?"); 244 //$.getJSON(indico_url+"/export/event/"+ID+".jsonp?callback=?"); 245 // json.results[0].title 241 246 } 242 247
Note:
See TracChangeset
for help on using the changeset viewer.