fix icon url needing to be passed as a jinja2 var

This commit is contained in:
2021-09-05 22:23:08 +10:00
parent 9d094f9437
commit 479c6179c2
3 changed files with 8 additions and 4 deletions

1
BUGs
View File

@@ -1 +1,2 @@
### Next: 49
BUG-49: Move and Del DBoxes are showing thumbnails vertically not horizontally

View File

@@ -24,8 +24,10 @@ function RunAIOnSeln(person)
$.ajax({ type: 'POST', data: post_data, url: '/run_ai_on', success: function(data){ window.location='/'; return false; } })
}
function MoveDBox(sps)
function MoveDBox(sps, db_url)
{
console.log(sps)
console.log(db_url)
$('#dbox-title').html('Move Selected File(s) to new directory in Storage Path')
div =`
<div class="form-row col-12">
@@ -39,8 +41,9 @@ function MoveDBox(sps)
div+=`
<div class="input-group my-3">
<alert class="alert alert-primary my-auto py-1">
<svg width="20" height="20" fill="currentColor"><use xlink:href="{{url_for('internal', filename='icons.svg')}}#db"/></svg>
<svg width="20" height="20" fill="currentColor"><use xlink:href="
`
div+=db_url+'#db"/></svg>'
if( sps.length > 1 ) {
// NB: alert-primary here is a hack to get the bg the same color as the alert primary by
div+= '<select name="storage_rp" class="text-primary alert-primary py-1 border border-primary rounded">'

View File

@@ -58,7 +58,7 @@
<button id="next" {{nxt_disabled}} name="next" class="next sm-txt btn btn-outline-secondary">
<svg width="16" height="16" fill="currentColor"><use xlink:href="{{url_for('internal', filename='icons.svg')}}#next"/></svg>
</button>
<button id="move" disabled name="move" class="sm-txt btn btn-outline-primary ms-4" onClick="MoveDBox({{StoragePathNames()|safe}}); return false;">
<button id="move" disabled name="move" class="sm-txt btn btn-outline-primary ms-4" onClick="MoveDBox({{StoragePathNames()|safe}},'{{url_for('internal', filename='icons.svg')}}'); return false;">
<svg width="16" height="16" fill="currentColor"><use xlink:href="{{url_for('internal', filename='icons.svg')}}#folder_plus"/></svg>
</button>
{% if "files_rbp" in request.url %}
@@ -327,7 +327,7 @@ $.contextMenu({
callback: function( key, options) {
if( key == "details" ) { DetailsDBox() }
if( key == "view" ) { CallViewRoute( $(this).attr('id') ) }
if( key == "move" ) { MoveDBox({{StoragePathNames()|safe}}) }
if( key == "move" ) { MoveDBox({{StoragePathNames()|safe}}, "{{url_for('internal', filename='icons.svg')}}") }
if( key == "del" ) { DelDBox('Delete') }
if( key == "undel") { DelDBox('Restore') }
if( key == "r90" ) { Transform(90) }