diff --git a/TODO b/TODO index 65fd265..b7d0bbf 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,8 @@ ### +# +# consider how to better version jscript - across all html files, consistently +# mtime, didnt work anyway, my phone still wont pick up the change, it was adding any ?v= changed this (once) +# # 4 TEST everything (don't forget keybindings,e.g. delete) # going up from folder view shows different order? # diff --git a/files.py b/files.py index 1971a24..b69e6d5 100644 --- a/files.py +++ b/files.py @@ -461,7 +461,8 @@ def change_file_opts(): def file_list_ip(): OPT=States( request ) query_data = GetQueryData( OPT ) - return render_template("file_list.html", page_title='View File Details (Import Path)', query_data=query_data, OPT=OPT ) + js_vers = getVersions() + return render_template("file_list.html", page_title='View File Details (Import Path)', query_data=query_data, OPT=OPT, js_vers=js_vers ) ################################################################################ # /files -> show thumbnail view of files from import_path(s) @@ -482,7 +483,8 @@ def files_ip(): def files_sp(): OPT=States( request ) query_data = GetQueryData( OPT ) - return render_template("files.html", page_title=f"View Files ({OPT.path_type} Path)", OPT=OPT, query_data=query_data ) + js_vers = getVersions() + return render_template("files.html", page_title=f"View Files ({OPT.path_type} Path)", OPT=OPT, query_data=query_data, js_vers=js_vers ) ################################################################################ @@ -493,7 +495,8 @@ def files_sp(): def files_rbp(): OPT=States( request ) query_data = GetQueryData( OPT ) - return render_template("files.html", page_title=f"View Files ({OPT.path_type} Path)", OPT=OPT, query_data=query_data ) + js_vers = getVersions() + return render_template("files.html", page_title=f"View Files ({OPT.path_type} Path)", OPT=OPT, query_data=query_data, js_vers=js_vers ) ################################################################################ # search -> GET version -> has search_term in the URL and is therefore able to diff --git a/internal/js/files_support.js b/internal/js/files_support.js index 78fe650..f2d63b4 100644 --- a/internal/js/files_support.js +++ b/internal/js/files_support.js @@ -506,7 +506,7 @@ function drawPageOfFigures() else if( OPT.root_eid == 0 ) $('#figures').append( `No files in Path!` ) $('.figure').click( function(e) { DoSel(e, this ); SetButtonState(); return false; }); - $('.figure').dblclick( function(e) { dblClickToViewEntry( $(this).attr('id') ); setDisabledForViewingNextPrevBttons(); addViewerKeyHandler() } ) + $('.figure').dblclick( function(e) { startViewing( $(this).attr('id') ) } ) // for dir, getDirEntries 2nd param is back (or "up" a dir) $(".dir").click( function(e) { document.back_id=this.id; getDirEntries(this.id,false) } ) $(".back").click( function(e) { getDirEntries(this.id,true) } ) @@ -779,7 +779,7 @@ $.contextMenu({ return { callback: function( key, options) { if( key == "details" ) { DetailsDBox() } - if( key == "view" ) { dblClickToViewEntry( $(this).attr('id') ) } + if( key == "view" ) { startViewing( $(this).attr('id') ) } if( key == "move" ) { MoveDBox(move_paths) } if( key == "del" ) { DelDBox('Delete') } if( key == "undel") { DelDBox('Restore') } diff --git a/internal/js/view_support.js b/internal/js/view_support.js index 82cbd8b..95d2525 100644 --- a/internal/js/view_support.js +++ b/internal/js/view_support.js @@ -726,3 +726,12 @@ function nextImageInViewer() ViewImageOrVideo() } + +// wrapper func to start the viewer - needed as we have a dbl-click & View file +// to start the viewer +function startViewing(eid) +{ + dblClickToViewEntry( eid ); + setDisabledForViewingNextPrevBttons(); + addViewerKeyHandler() +} diff --git a/templates/file_list.html b/templates/file_list.html index 097c936..65aa261 100644 --- a/templates/file_list.html +++ b/templates/file_list.html @@ -1,5 +1,5 @@ {% extends "base.html" %} {% block main_content %} - +