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', subpath = 'functions.js' ) }}"></script>
<link type="text/css" rel="stylesheet" href="{{ url_for( 'send_app_files', subpath = '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( {
url: "{{ url_for( 'submission_file_set_note', submission_id = submission_id, tenprint_id = file[ 'uuid' ], file_type = 'mark' ) }}",
dataType: "json",
method: "POST",
data: {
note: note
}
} );
var next_information = function()
{
window.location = "{{ url_for( 'submission_mark_pfsp', submission_id = submission_id, mark_id = file[ 'uuid' ] ) }}";
.text( "Do you really want to delete this mark?" )
modal: true,
buttons: {
url: "{{ url_for( 'submission_mark_delete', submission_id = submission_id, mark_id = file[ 'uuid' ] ) }}",
dataType: "json",
success: function( data )
{
$( "#delete_confirmation" ).remove();
window.location = "{{ url_for( 'submission_mark_list', submission_id = submission_id, mark_type = file[ 'file_type' ] ) }}";
},
error: function( data )
{
$( "#delete_confirmation" ).remove();
}
} );
},
},
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" %}

Marco De Donno
committed
{% include navigation %}
<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', file_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 mark</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
$( "#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_mark );
$( "#icnml_navigation_updatedonor" )
.addClass( "activated" );
$( "<a />" )
.attr( "href", "{{ url_for( 'submission_list' ) }}" )
.text( "Submissions" )
)
.append(
$( "<span />" ).text( ">" )
)
.append(
$( "<a />" )
.attr( "href", "{{ url_for( 'submission_upload_tplp', submission_id = submission_id ) }}" )
.text( nickname )
)
.append(
$( "<span />" ).text( ">" )
)
.append(
$( "<a />" )
.attr( "href", "{{ url_for( 'submission_mark_list', submission_id = submission_id ) }}" )
.text( "Marks" )
)
.append(
$( "<span />" ).text( ">" )
)
.append(
$( "<span />" ).text( filename )
);
</script>
</html>