Compare commits

...

3 Commits

3 changed files with 7 additions and 2 deletions

View File

@@ -631,10 +631,10 @@ def files_rbp():
# now we have reset the offset, etc. into the prefs, we can use a GET and this will be back/forward browser button safe # now we have reset the offset, etc. into the prefs, we can use a GET and this will be back/forward browser button safe
if request.method=='POST': if request.method=='POST':
redirect("/files_rbp") redirect("/files_rbp")
entries=GetEntries( OPT )
people = Person.query.all() people = Person.query.all()
move_paths = MovePathDetails() move_paths = MovePathDetails()
return render_template("files.html", page_title=f"View Files ({OPT.path_type} Path)", entry_data=entries, OPT=OPT, move_paths=move_paths ) query_data = GetQueryData( OPT )
return render_template("files.html", page_title=f"View Files ({OPT.path_type} Path)", OPT=OPT, people=people, move_paths=move_paths, query_data=query_data )
################################################################################ ################################################################################
# search -> GET version -> has search_term in the URL and is therefore able to # search -> GET version -> has search_term in the URL and is therefore able to

View File

@@ -471,6 +471,9 @@ function getDirEntries(dir_id, back)
dataType: 'json', // Expect JSON response dataType: 'json', // Expect JSON response
success: function(res) { success: function(res) {
document.entries=res document.entries=res
// rebuild entryList/pageList as each dir comes with new entries
entryList=res.map(obj => obj.id);
pageList=entryList.slice(0, OPT.howMany)
if( back ) if( back )
document.back_id = res[0].in_dir.eid document.back_id = res[0].in_dir.eid
drawPageOfFigures() drawPageOfFigures()

View File

@@ -156,6 +156,8 @@ function FaceToggle()
// also deals with fullsecreen if needed // also deals with fullsecreen if needed
function ViewImageOrVideo() function ViewImageOrVideo()
{ {
// can happen if no content to display
if( ! document.viewing ) return
if( document.viewing.type.name == 'Image' ) if( document.viewing.type.name == 'Image' )
{ {
im.src='../' + document.viewing.FullPathOnFS im.src='../' + document.viewing.FullPathOnFS