diff --git a/TODO b/TODO index a5edaed..059e78a 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,6 @@ ## GENERAL * viewer: - buttons need tootltips to show shortcut key - - if DrawImg runs into a video, deal with it :) * files.py cleanup: class Option for dot-notation, or namespace??? diff --git a/templates/viewer.html b/templates/viewer.html index e3a18b1..57d8abb 100644 --- a/templates/viewer.html +++ b/templates/viewer.html @@ -30,6 +30,7 @@ e=new Object() e.name = "{{objs[id].name}}" e.url = "{{objs[id].FullPathOnFS()}}" + e.type = "{{objs[id].type.name}}" {% if objs[id].file_details.faces %} e.face_model="{{objs[id].file_details.faces[0].facefile_lnk.model_used}}" {% endif %} @@ -175,7 +176,7 @@ function ResizeVideo() { - $('#_v').height(window.innerHeight*gap) + $('#video').height(window.innerHeight*gap) } function FaceToggle() @@ -206,6 +207,32 @@ $('#_fmv').submit(); } + function ViewImageOrVideo() + { + if( objs[current].type == 'Image' ) + { + im.src='http://mara.ddp.net:5000/' + objs[current].url + $('#video').hide() + $('#figure').show() + if( fullscreen ) + { + console.log('going fs on image') + $('#canvas').get(0).requestFullscreen() + } + } + if( objs[current].type == 'Video' ) + { + $('#video').prop('src', 'http://mara.ddp.net:5000/' + objs[current].url ) + $('#figure').hide() + $('#video').show() + if( fullscreen ) + { + console.log('going fs on video') + $('#video').get(0).requestFullscreen() + } + } + } +