Commit 8f2c4cd6 authored by marc duez's avatar marc duez

sample_set.py: absolute url > consider browser path to always be at the root directory

fix bug with older browser who are not able to distinguish url and origin (i look at you stupid firefox32)
parent d10b65f3
Pipeline #151347 passed with stages
in 17 minutes and 17 seconds
...@@ -53,7 +53,7 @@ class SampleSet(object): ...@@ -53,7 +53,7 @@ class SampleSet(object):
if conf['fused_file'] is not None : if conf['fused_file'] is not None :
configs.append( configs.append(
str(A(conf['name'], str(A(conf['name'],
_href=http_origin + defs.BROWSER_PATH + "?sample_set_id=%d&config=%d" % (data['sample_set_id'], conf['id']), _type="text/html", _href=http_origin + "?sample_set_id=%d&config=%d" % (data['sample_set_id'], conf['id']), _type="text/html",
_onclick="event.preventDefault();event.stopPropagation();if( event.which == 2 ) { window.open(this.href); } else { myUrl.loadUrl(db, { 'sample_set_id' : '%d', 'config' : %d }, '%s' ); }" % (data['sample_set_id'], conf['id'], filename)))) _onclick="event.preventDefault();event.stopPropagation();if( event.which == 2 ) { window.open(this.href); } else { myUrl.loadUrl(db, { 'sample_set_id' : '%d', 'config' : %d }, '%s' ); }" % (data['sample_set_id'], conf['id'], filename))))
else: else:
configs.append(conf['name']) configs.append(conf['name'])
......
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
).select() :}} ).select() :}}
{{if row.fused_file.fused_file is not None :}} {{if row.fused_file.fused_file is not None :}}
<a class="button2" href="{{=http_origin}}{{=defs.BROWSER_PATH}}?sample_set_id={{=request.vars["id"]}}&config={{=row.config.id}}" type="text/html" <a class="button2" href="{{=http_origin}}?sample_set_id={{=request.vars["id"]}}&config={{=row.config.id}}" type="text/html"
onclick="event.preventDefault() onclick="event.preventDefault()
if( event.which == 2 ) { window.open(this.href) } if( event.which == 2 ) { window.open(this.href) }
else { myUrl.loadUrl(db, { 'sample_set_id' : '{{=request.vars["id"]}}' , 'config' : {{=row.config.id}} }, '{{=info["filename"]}}' ) }" > else { myUrl.loadUrl(db, { 'sample_set_id' : '{{=request.vars["id"]}}' , 'config' : {{=row.config.id}} }, '{{=info["filename"]}}' ) }" >
......
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