more bootstrap 5 fixes
This commit is contained in:
@@ -298,7 +298,7 @@ function GetSelnAsDiv()
|
||||
'" class="px-1">' + $(this).children().parent().html() + '</div>'
|
||||
seln+='<input type="hidden" name="eid-'+index+'" value="'+$(this).attr('id')+'">'
|
||||
} )
|
||||
return '<div class="row col-lg-12">'+seln+'</div>'
|
||||
return '<div class="row col-12">'+seln+'</div>'
|
||||
}
|
||||
|
||||
function GetSelnAsData()
|
||||
@@ -319,10 +319,10 @@ function DelDBox(del_or_undel)
|
||||
{
|
||||
to_del = GetSelnAsData()
|
||||
$('#dbox-title').html(del_or_undel+' Selected File(s)')
|
||||
div ='<div class="row col-lg-12"><p class="col">' + del_or_undel + ' the following files?</p></div>'
|
||||
div ='<div class="row col-12"><p class="col">' + del_or_undel + ' the following files?</p></div>'
|
||||
div+=GetSelnAsDiv()
|
||||
div+=`<div class="row col-lg-12">
|
||||
<button onClick="$('#dbox').modal('hide')" class="btn btn-outline-secondary col-lg-2">Cancel</button>
|
||||
div+=`<div class="row col-12">
|
||||
<button onClick="$('#dbox').modal('hide')" class="btn btn-outline-secondary col-2">Cancel</button>
|
||||
`
|
||||
div+=`
|
||||
<button onClick="$('#dbox').modal('hide'); $.ajax({ type: 'POST', data: to_del, url:
|
||||
@@ -330,13 +330,13 @@ function DelDBox(del_or_undel)
|
||||
if( del_or_undel == "Delete" )
|
||||
div+=`
|
||||
'/delete_files',
|
||||
success: function(data){ window.location='/'; return false; } })" class="btn btn-outline-danger col-lg-2">Ok</button>
|
||||
success: function(data){ window.location='/'; return false; } })" class="btn btn-outline-danger col-2">Ok</button>
|
||||
</div>
|
||||
`
|
||||
else
|
||||
div+=`
|
||||
'/restore_files',
|
||||
success: function(data){ window.location='/'; return false; } })" class="btn btn-outline-success col-lg-2">Ok</button>
|
||||
success: function(data){ window.location='/'; return false; } })" class="btn btn-outline-success col-2">Ok</button>
|
||||
</div>
|
||||
`
|
||||
$('#dbox-content').html(div)
|
||||
@@ -346,23 +346,23 @@ function DelDBox(del_or_undel)
|
||||
function DetailsDBox()
|
||||
{
|
||||
$('#dbox-title').html('Details of Selected File(s)')
|
||||
var div ='<div class="row col-lg-12">'
|
||||
var div ='<div class="row col-12">'
|
||||
$('.highlight').each(function( index ) {
|
||||
div += "<div class='col-lg-3' style='background-color:lightgray'>Name:</div><div class='col-lg-9' style='background-color:lightgray'>" + $(this).attr('fname') + "</div>"
|
||||
div += "<div class='col-lg-3'>Date:</div><div class='col-lg-9'>" + $(this).attr('pretty_date') + "</div>"
|
||||
div += "<div class='col-3' style='background-color:lightgray'>Name:</div><div class='col-9' style='background-color:lightgray'>" + $(this).attr('fname') + "</div>"
|
||||
div += "<div class='col-3'>Date:</div><div class='col-9'>" + $(this).attr('pretty_date') + "</div>"
|
||||
dir = $(this).attr('in_dir')
|
||||
if( dir.slice(-1) != "/" )
|
||||
dir=dir.concat('/')
|
||||
div += "<div class='col-lg-3'>Dir:</div><div class='col-lg-9'>" + dir + "</div>"
|
||||
div += "<div class='col-lg-3'>Size:</div><div class='col-lg-9'>" + $(this).attr('size') + " MB</div>"
|
||||
div += "<div class='col-lg-3'>Hash:</div><div class='col-lg-9'>" + $(this).attr('hash') + "</div>"
|
||||
div += "<div class='col-lg-3'>Path Type:</div><div class='col-lg-9'>" + $(this).attr('path_type') + "</div>"
|
||||
div += "<div class='col-3'>Dir:</div><div class='col-9'>" + dir + "</div>"
|
||||
div += "<div class='col-3'>Size:</div><div class='col-9'>" + $(this).attr('size') + " MB</div>"
|
||||
div += "<div class='col-3'>Hash:</div><div class='col-9'>" + $(this).attr('hash') + "</div>"
|
||||
div += "<div class='col-3'>Path Type:</div><div class='col-9'>" + $(this).attr('path_type') + "</div>"
|
||||
} )
|
||||
div += `
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-row col-lg-12">
|
||||
<button onClick="$('#dbox').modal('hide'); return false;" class="btn btn-outline-secondary offset-lg-1 col-lg-2">Cancel</button>
|
||||
<div class="form-row col-12">
|
||||
<button onClick="$('#dbox').modal('hide'); return false;" class="btn btn-outline-secondary offset-1 col-2">Cancel</button>
|
||||
</div>
|
||||
`
|
||||
$('#dbox-content').html(div)
|
||||
@@ -406,10 +406,10 @@ function MoveDBox()
|
||||
{
|
||||
$('#dbox-title').html('Move Selected File(s) to new directory in Storage Path')
|
||||
div =`
|
||||
<div class="form-row col-lg-12">
|
||||
<div class="form-row col-12">
|
||||
<p class="col">Moving the following files?</p>
|
||||
</div>
|
||||
<form class="form form-control-inline col-lg-12" method="POST" action="/move_files">
|
||||
<form id="mv_fm" class="form form-control-inline col-12" method="POST" action="/move_files">
|
||||
`
|
||||
div+=GetSelnAsDiv()
|
||||
yr=$('.highlight').first().attr('yr')
|
||||
@@ -421,9 +421,10 @@ function MoveDBox()
|
||||
`
|
||||
sps={{StoragePathNames()|safe}}
|
||||
if( sps.length > 1 ) {
|
||||
div+= '<select name="storage_rp" style="border-radius:4px" class="table-primary">'
|
||||
{# 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">'
|
||||
for(p of sps) {
|
||||
div+= '<option>/'+p+'/</option>'
|
||||
div+= '<option>'+p+'</option>'
|
||||
}
|
||||
div+= '</select>'
|
||||
} else {
|
||||
@@ -440,9 +441,9 @@ function MoveDBox()
|
||||
<input type="text" name="suffix" class="form-control" placeholder="name"> </input>
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-row col-lg-12">
|
||||
<button onClick="$('#dbox').modal('hide'); return false;" class="btn btn-outline-secondary offset-lg-1 col-lg-2">Cancel</button>
|
||||
<button onClick="$('#dbox').modal('hide'); return false;" class="btn btn-outline-primary col-lg-2">Ok</button>
|
||||
<div class="form-row col-12">
|
||||
<button onClick="$('#dbox').modal('hide'); return false;" class="btn btn-outline-secondary offset-1 col-2">Cancel</button>
|
||||
<button onClick="$('#dbox').modal('hide'); $('#mv_fm').submit(); return false;" class="btn btn-outline-primary col-2">Ok</button>
|
||||
</div>
|
||||
</form>
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user