{% extends "webgateway/base_site.html" %}
{% comment %}
/**
* omero_image - django html template
*
* Copyright (c) 2007, 2008 Glencoe Software, Inc. All rights reserved.
*
* This software is distributed under the terms described by the LICENCE file
* you can find at the root of the distribution bundle, which states you are
* free to use it only for non commercial purposes.
* If the file is missing please request a copy by contacting
* jason@glencoesoftware.com.
*/
{% endcomment %}
{% block title %}
{{ block.super }} - Full Viewer
{% endblock %}
{% block extra_css %}
{{ block.super }}
{% endblock %}
{% block extra_js %}
{{ block.super }}
{% endblock %}
{% block full_body %}
Image Information
Image name:
Image date:
Dimensions (XY): px x px
Pixel size (XYZ): x x
Z-sections:
Timepoints:
Rendering Details
Channel Windows
default undo redo apply OK
{% if dataset.canWrite %}
SAVE
{% endif %}
{% endblock full_body %}
{% block content_script %}
$(document).ready(function () {
/* Prepare the viewport */
viewport = $.WeblitzViewport($('#weblitz-viewport'), '{{ viewport_server }}',{% block viewport_opts %}null{% endblock %});
viewport.bind('imageLoad', _refresh_cb);
/* Prepare the Zoom spin button */
$("INPUT.spin-button").SpinButton({min:0});
/* Bind zoom changes to the zoom button */
viewport.bind('zoom', function(e, percent) {
$("#wblitz-zoom").attr('value', ''+percent /*+'%'*/);
$(".popped").removeClass('popped');
});
/* Bind projection changes */
viewport.bind('projectionChange', projectionChange);
/* Bind model changes */
viewport.bind('modelChange', modelChange);
/* Bind channel changes */
viewport.bind('channelChange', channelChange);
/* Bind image changes */
viewport.bind('imageChange', imageChange);
/* Bind line plot changes */
viewport.bind('linePlotChange', linePlotChange);
/* Bind line plot position pick */
viewport.bind('linePlotPos', linePlotPos);
/* Prepare pop tools */
$(".popover > h1")
.prepend('
')
.click(function () {
var this_popped = $(this).parent().is('.popped');
$(".popped").removeClass('popped');
if (this_popped) {
$(this).parent().removeClass('popped');
} else {
$(this).parent().addClass('popped');
}
return false;
});
$(".popclose").click(function () {
$(".popped").removeClass('popped');
});
$("#weblitz-viewport").click(function () {
$(".popped").removeClass('popped');
})
.bind("imageChange", function () {
$(".popped").removeClass('popped');
});
/* Prepare the post-its */
var layout_pos = $("#weblitz-viewport").offset();
$(".postit").each(function () {
if (this.id == 'legend-postit') {
$(this).postit({noResize: false}).css($("#weblitz-viewport-vp").offset());
} else {
layout_pos.left += 20;
$(this).postit({noResize: true})
.css(layout_pos);
layout_pos.top += 20;
}
});
var legend_open = function () {
var d = $(this);
d.unbind('opening', legend_open);
/* Calculate the size for legend post-it */
var h = $('#weblitz-viewport-vp').height();
var w = ($('#weblitz-viewport-vp').width() - h) /2;
d.css('width', Math.max(w, 250));
if (d.height() > h) {
d.css('height', h);
}
d.trigger('jqResize');
};
$("#legend-postit").bind('opening', legend_open);
zindex_automator('.postit', 10);
/* Make (kind of) sure that closing the rendering defs window closes an eventually opened color picker */
$("#rdef-postit").bind('closed', function () {hidePicker(); viewport.back_to_bookmarked_channels(); syncRDCW();})
.bind('opening', viewport.bookmark_channels);
/* Load the selected image into the viewport */
{% if image %}
var did = '{{ dataset.id }}';
viewport.setQuality('0.9');
viewport.load({{ image.id }}, did.length ? parseInt(did) : null, location.search);
{% endif %}
/* Bind actions needed on window resize */
$(window).resize(calcResize);
$('input[@name=wblitz-quality]').click(function () {
viewport.setQuality(this.value);
});
/* And we're done! */
/* Set Window Initial Size */
window.resizeTo(1000,800);
if ($.browser.safari) setTimeout(1,calcResize);
else calcResize();
});
{% endblock content_script %}