Commit 2c0fb489 authored by Ryan Herbert's avatar Ryan Herbert Committed by marc duez

*.js url_params improve positionnal args

maintains the url to .../browser while still including positionnal
arguments without duplicating positionnal params by using absolute URLs.
Although it does make treatment of positionnal params hacky.
parent 43db8d90
......@@ -48,3 +48,5 @@ germline/germline-59.tar.gz
germline/IMGT_RELEASE
vidjil-algo
server/web2py/gluon/packages/dal/
......@@ -1117,8 +1117,10 @@ Database.prototype = {
*/
ajax_indicator_start: function() {
if (!(this.uploader.is_uploading())) {
$('#live-ajax-icon').empty();
var tgt = $('#live-ajax-icon');
$('#live-ajax-msg').empty();
tgt.empty();
$('<img/>', {src: '/images/ajax-loader.gif'}).appendTo($('<div/>', {class: 'active-container'}).appendTo(tgt));
$('body').css('cursor', 'wait');
}
},
......
......@@ -126,7 +126,12 @@ Url.prototype= {
}
}
var positionnal_params = url.pathname.substr(1).split('/');
var slash_params = url.pathname.substr(1).split('/');
var positionnal_params = [];
for (var k = 0; k < slash_params.length; k++) {
if(slash_params[k] !== 'browser')
positionnal_params.push(slash_params[k]);
}
var pos_param_keys = this.getPositionnalParams();
for (var j = 0; j < positionnal_params.length; j++) {
params[pos_param_keys[j]] = positionnal_params[j];
......@@ -159,7 +164,7 @@ Url.prototype= {
},
pushUrl: function(params) {
var new_url = "/" + params;
var new_url = '/browser/' + params;
try {
this.window.history.pushState('plop', 'plop', new_url);
} catch(error) {
......
......@@ -45,6 +45,13 @@ server {
## if you serve static files through https, copy here the section
## from the previous server instance to manage static files
location ~ ^/(css|js|images|test) {
root /usr/share/vidjil/browser/;
expires 1h;
error_page 405 = $1;
}
location /germline {
root /usr/share/vidjil/;
expires 1h;
......
......@@ -112,6 +112,21 @@ server {
## if you serve static files through https, copy here the section
## from the previous server instance to manage static files
location ~ ^/(css|js|images|test) {
root /usr/share/vidjil/browser/;
expires 1h;
error_page 405 = $uri;
}
location /browser {
rewrite /browser/([0-9]+)/([0-9]+)(/+) /browser/?set=$1&conf=$2 break;
root $CWD/../;
expires 1h;
error_page 405 = $uri;
}
location /germline {
root $CWD/../;
expires 1h;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment