Newer
Older
<!DOCTYPE html>
<html>
<head>
{% for src in js %}
<script type="text/javascript" src="{{ src }}"></script>
{% endfor %}
{% for src in css %}
<link type="text/css" rel="stylesheet" href="{{ src }}">
{% endfor %}
<script type="text/javascript" src="{{ url_for( 'send_app_files', path = 'functions.js' ) }}"></script>
<link type="text/css" rel="stylesheet" href="{{ url_for( 'send_app_files', path = 'app.css' ) }}">
<style type="text/css">
.icnml_button {
margin-top: 50px;
}
.icnml_button > div > a {
width: 60%;
margin-bottom: 10px;
}
</style>
<script type="text/javascript">
baseurl = "{{ baseurl }}";
var password_local = decrypt( sessionStorage.getItem( "session_key" ), "{{ session_security_key }}" );
var nickname = decrypt( "{{ nickname }}", password_local );

Marco De Donno
committed
var filename = decrypt( "{{ file[ 'filename' ] }}", password_local );
var note = decrypt( "{{ file[ 'note' ] }}", password_local );
var update_note_db = function()
{
var note = $( '#file_note' ).val() || null;
note = encrypt( note, password_local );
$.ajax( {

Marco De Donno
committed
url: "{{ url_for( 'submission_file_set_note', id = submission_id, file = file[ 'uuid' ], t = 'latent' ) }}",
dataType: 'json',
method: 'POST',
data: {
note: note
}
} );
}
var next_information = function()
{
window.location = "{{ url_for( 'submission_latent_pfsp', id = submission_id, lid = file[ 'uuid' ] ) }}";
}
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
var delete_latent = function()
{
$( '<div />' )
.attr( 'id', 'delete_confirmation' )
.text( 'Do you really want to delete this latent?' )
.dialog( {
title: "Confirm latent deletion",
modal: true,
buttons: {
'OK': function()
{
$.ajax( {
url: "{{ url_for( 'submission_latent_delete', id = submission_id, lid = file[ 'uuid' ] ) }}",
dataType: 'json',
success: function( data )
{
$( '#delete_confirmation' ).remove();
window.location = "{{ url_for( 'submission_latent_list', id = submission_id, ltype = file[ 'file_type' ] ) }}";
},
error: function( data )
{
$( '#delete_confirmation' ).remove();
}
} );
},
'Cancel': function()
{
$( this ).dialog( 'close' );
},
},
close: function()
{
$( this ).remove();
}
} );
}
</script>
<style type="text/css">
img {
max-height:500px;
max-width:500px;
height:auto;
width:auto;
}
</style>
</head>
<body class="icnml_main_layout">
{% include "header.html" %}
{% include "navigations/submitter.html" %}
<div class="icnml_content">
<div class="icnml_lp_oneperpage">

Marco De Donno
committed
<form id="icnml_file_update_{{ file[ 'uuid' ] }}">
<div class="ui-widget-header ui-corner-top icnml_box_top">File '<span id="header_filename">-</span>'</div>
<div class="ui-widget-content ui-corner-bottom icnml_box_content">
<div class="icnml_lp_cardbox">
<div id="img_preview" class="icnml_img">
<img src="{{ url_for( 'image_file_serve', id = file[ 'uuid' ] ) }}">
</div>
<div>
<div class="icnml_box_fields">
<div>Name</div>
<div id="box_filename"></div>

Marco De Donno
committed
<div>{{ file[ 'format' ] }}</div>

Marco De Donno
committed
<div>{{ file[ 'resolution' ] }} dpi</div>

Marco De Donno
committed
<div>{{ file[ 'width' ] }} px</div>

Marco De Donno
committed
<div>{{ file[ 'height' ] }} px</div>

Marco De Donno
committed
<div>{{ file[ 'size' ] }} Mo</div>
<div id="file_{{ file[ 'uuid' ] }}_uploadtime">-</div>
<div><textarea rows="6" id="file_note"></textarea></div>
<div class="icnml_button">
<div id="next_button_div">
<a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" id="next_button">
<span class="ui-button-text" id="next_button_span_text">Next</span>
</a>
</div>
<div id="delete_button_div">
<a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" id="delete_button">
<span class="ui-button-text" id="delete_button_span_text">Delete latent</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
$( '#header_filename' ).text( filename );
$( '#box_filename' ).text( filename );
$( '#file_note' ).text( note );
$( "#file_note" ).on( 'change', update_note_db );
$( "#file_{{ file[ 'uuid' ] }}_uploadtime" )
.text( moment.utc( "{{ file[ 'creation_time' ] }}" ).local().format( "MMMM Do YYYY, HH:mm:ss" ) );
$( '#next_button' ).on( 'click', next_information );
$( '#delete_button' ).on( 'click', delete_latent );
$( '#icnml_navigation_updatedonor' )
.addClass( 'activated' );
$( '<a />' )
.attr( 'href', "{{ url_for( 'submission_list' ) }}" )
.text( "Submissions" )
)
.append(
$( '<span />' ).text( ">" )
)
.append(
.attr( 'href', "{{ url_for( 'submission_upload_tplp', id = submission_id ) }}" )
)
.append(
$( '<span />' ).text( ">" )
)
.append(
$( '<a />' )
.attr( 'href', "{{ url_for( 'submission_latent_list', id = submission_id ) }}" )
.text( "Latents" )
)
.append(
$( '<span />' ).text( ">" )
)
.append(
$( '<span />' ).text( filename )
</script>
</html>