Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@
$(this).css('visibility', 'hidden');
}).hide();

{% if link_string %}
$("#link_info_popup_string").val(location.protocol + "//" + location.host + "{{ webclient_path }}?show={{ link_string }}");
{% endif %}

// We do this here and in batch_annotate panel
OME.initToolbarDropdowns();

});

</script>
Expand All @@ -54,11 +56,7 @@
<table>
<tr><td>
<!-- In 'batch_annotate' panel we have 'link_string'. In 'metadata_general' we use js to get value -->
<input type="text" size="30"
{% if link_string %}
value="{{ webclient_path }}?show={{ link_string }}"
{% endif %}
/>
<input type="text" size="30" id="link_info_popup_string" />
</td><td>
<img title="Close" src="{% static 'webgateway/img/close.gif' %}" />
</td></tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,7 @@
// show a link to the current object
$("#show_link_btn").click(function(){
$("#link_info_popup").show();
{% if webclient_path %}
var lnk = "{{ webclient_path }}";
{% else %}
var lnk = location.href.substring(0,location.href.length - location.search.length);
if (lnk.charAt( lnk.length-1 ) == "#") { lnk = lnk.substring(0, lnk.length-1)}
{% endif %}
var lnk = location.protocol + "//" + location.host + "{{ webclient_path }}";
var obj_type = "{{manager.obj_type}}";
if (obj_type === "acquisition") {
obj_type = "run";
Expand Down
5 changes: 2 additions & 3 deletions components/tools/OmeroWeb/omeroweb/webclient/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1537,8 +1537,7 @@ def load_metadata_details(request, c_type, c_id, conn=None, share_id=None,

context['figScripts'] = figScripts
context['template'] = template
context['webclient_path'] = request.build_absolute_uri(
reverse('webindex'))
context['webclient_path'] = reverse('webindex')
return context


Expand Down Expand Up @@ -2054,7 +2053,7 @@ def batch_annotate(request, conn=None, **kwargs):
context['differentGroups'] = True # E.g. don't run scripts etc
context['canDownload'] = manager.canDownload(objs)
context['template'] = "webclient/annotations/batch_annotate.html"
context['webclient_path'] = request.build_absolute_uri(reverse('webindex'))
context['webclient_path'] = reverse('webindex')
return context


Expand Down