string / int strictness issue causing default size to not highlight button - fixed
This commit is contained in:
@@ -129,7 +129,7 @@
|
||||
{# rare event of empty folder, still need to show back button #}
|
||||
{% if folders and entry_data|length == 0 %}
|
||||
{% if cwd != root %}
|
||||
<figure class="px-1 dir entry" ecnt="1" dir="{{cwd|ParentPath}}">
|
||||
<figure class="px-1 dir entry" ecnt="1" dir="{{cwd|ParentPath}}" type="Directory">
|
||||
<span style="font-size:{{(size|int-22)/2}}px" class="fa-stack">
|
||||
<i style="color:grey" class="fas fa-folder fa-stack-2x"></i>
|
||||
<i class="fas fa-level-up-alt fa-flip-horizontal fa-stack-1x fa-inverse"></i>
|
||||
@@ -147,7 +147,7 @@
|
||||
{% for obj in entry_data %}
|
||||
{% if loop.index==1 and folders %}
|
||||
{% if cwd != root %}
|
||||
<figure class="px-1 dir entry" ecnt="{{loop.index}}" dir="{{cwd|ParentPath}}">
|
||||
<figure class="px-1 dir entry" ecnt="{{loop.index}}" dir="{{cwd|ParentPath}}" type="Directory">
|
||||
<span style="font-size:{{(size|int-22)/2}}px" class="fa-stack">
|
||||
<i style="color:grey" class="fas fa-folder fa-stack-2x"></i>
|
||||
<i class="fas fa-level-up-alt fa-flip-horizontal fa-stack-1x fa-inverse"></i>
|
||||
@@ -195,7 +195,7 @@
|
||||
{% endif %}
|
||||
{% if obj.type.name != "Directory" %}
|
||||
{% if (not folders) or ((obj.in_dir.in_path.path_prefix+'/'+obj.in_dir.rel_path+'/'+obj.name) | TopLevelFolderOf(cwd)) %}
|
||||
<figure id="{{obj.id}}" ecnt="{{loop.index}}" class="figure entry mx-1" path_type="{{obj.in_dir.in_path.type.name}}" size="{{obj.file_details.size_mb}}" hash="{{obj.file_details.hash}}" in_dir="{{obj.in_dir.in_path.path_prefix}}/{{obj.in_dir.rel_path}}" fname="{{obj.name}}" yr="{{obj.file_details.year}}" date="{{obj.file_details.year}}{{"%02d" % obj.file_details.month}}{{"%02d" % obj.file_details.day}}" pretty_date="{{obj.file_details.day}}/{{obj.file_details.month}}/{{obj.file_details.year}}">
|
||||
<figure id="{{obj.id}}" ecnt="{{loop.index}}" class="figure entry mx-1" path_type="{{obj.in_dir.in_path.type.name}}" size="{{obj.file_details.size_mb}}" hash="{{obj.file_details.hash}}" in_dir="{{obj.in_dir.in_path.path_prefix}}/{{obj.in_dir.rel_path}}" fname="{{obj.name}}" yr="{{obj.file_details.year}}" date="{{obj.file_details.year}}{{"%02d" % obj.file_details.month}}{{"%02d" % obj.file_details.day}}" pretty_date="{{obj.file_details.day}}/{{obj.file_details.month}}/{{obj.file_details.year}}" type="{{obj.type.name}}">
|
||||
{% if obj.type.name=="Image" %}
|
||||
<div style="position:relative; width:100%">
|
||||
<a href="{{obj.in_dir.in_path.path_prefix}}/{{obj.in_dir.rel_path}}/{{obj.name}}"><img class="thumb" height="{{size}}" src="data:image/jpeg;base64,{{obj.file_details.thumbnail}}"></img></a>
|
||||
@@ -230,7 +230,7 @@
|
||||
{% endif %}
|
||||
{# if this dir is the toplevel of the cwd, show the folder icon #}
|
||||
{% if dirname| TopLevelFolderOf(cwd) %}
|
||||
<figure class="px-1 dir entry" id={{obj.id}} ecnt={{loop.index}} dir="{{dirname}}">
|
||||
<figure class="px-1 dir entry" id={{obj.id}} ecnt={{loop.index}} dir="{{dirname}}" type="Directory">
|
||||
<i style="font-size:{{size|int-22}}px" class="fas fa-folder"></i>
|
||||
<figcaption class="figure-caption text-center text-wrap text-break">{{obj.name}}</figcaption>
|
||||
</figure class="figure">
|
||||
@@ -513,12 +513,27 @@ $.contextMenu({
|
||||
DoSel(e, e.currentTarget )
|
||||
|
||||
if( FiguresOrDirsOrBoth() == "figure" )
|
||||
{
|
||||
item_list = {
|
||||
details: { name: "Details..." },
|
||||
view: { name: "View File" },
|
||||
sep: "---",
|
||||
move: { name: "Move selected file(s) to new storage folder" },
|
||||
sep2: "---" }
|
||||
}
|
||||
if( e.currentTarget.getAttribute('type') == 'Image' )
|
||||
{
|
||||
item_list['rotate'] = {
|
||||
name: "Rotate",
|
||||
items: {
|
||||
"r90": { "name" : "90 degrees" },
|
||||
"r180": { "name" : "180 degrees" },
|
||||
"r270": { "name" : "270 degrees" }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
item_list['move'] = { name: "Move selected file(s) to new storage folder" }
|
||||
item_list['sep2'] = { sep: "---" }
|
||||
}
|
||||
else
|
||||
item_list = {}
|
||||
|
||||
@@ -537,7 +552,7 @@ $.contextMenu({
|
||||
} else {
|
||||
if (e.currentTarget.getAttribute('path_type') == 'Bin' )
|
||||
item_list['undel']= { name: "Restore selected file(s)" }
|
||||
else
|
||||
else if( e.currentTarget.getAttribute('type') != 'Directory' )
|
||||
item_list['del']= { name: "Delete Selected file(s)" }
|
||||
}
|
||||
|
||||
@@ -552,6 +567,9 @@ $.contextMenu({
|
||||
if( key == "move" ) { MoveDBox() }
|
||||
if( key == "del" ) { DelDBox('Delete') }
|
||||
if( key == "undel" ) { DelDBox('Restore') }
|
||||
if( key == "r90" ) { console.log('r90') }
|
||||
if( key == "r180" ) { console.log('r180') }
|
||||
if( key == "r270" ) { console.log('r270') }
|
||||
if( key.startsWith("ai")) { RunAIOnSeln(key) }
|
||||
},
|
||||
items: item_list
|
||||
|
||||
Reference in New Issue
Block a user