move files now has bs toast pop for success and stays on the page you are on for more moves
This commit is contained in:
3
TODO
3
TODO
@@ -1,6 +1,5 @@
|
||||
### GENERAL
|
||||
* after move, instead of back to home page, go to an ammended view of the thumbs to keep moving
|
||||
- works in DEV, should explore bootstrap5 toast? (or a better 'status' update on POSTs, and get it to also increase/descrease the job counter as appropriate)
|
||||
* get all status messages to use toasts AND get func to also increase/descrease the job counter as appropriate)
|
||||
|
||||
* ignore face should ignore ALL matching faces (re: Declan)
|
||||
|
||||
|
||||
2
files.py
2
files.py
@@ -622,8 +622,6 @@ def move_files():
|
||||
for el in request.form:
|
||||
jex.append( JobExtra( name=f"{el}", value=request.form[el] ) )
|
||||
job=NewJob( "move_files", 0, None, jex )
|
||||
st.SetMessage( f"Created <a href=/job/{job.id}>Job #{job.id}</a> to move selected file(s)")
|
||||
# return redirect("/jobs")
|
||||
return make_response( jsonify( job_id=job.id, status="success" ) )
|
||||
|
||||
@login_required
|
||||
|
||||
@@ -62,7 +62,7 @@ function MoveSubmit()
|
||||
// remove the images being moved
|
||||
$("[name^=eid-]").each( function() { $('#'+$(this).attr('value')).remove() } )
|
||||
$('#dbox').modal('hide')
|
||||
$.ajax({ type: 'POST', data: $('#mv_fm').serialize(), url: '/move_files', success: function(data){ console.log(data); return false; } })
|
||||
$.ajax({ type: 'POST', data: $('#mv_fm').serialize(), url: '/move_files', success: function(data){ $('.toast-body').html( "Created <a class='link-light' href=/job/" + data.job_id + ">Job #" + data.job_id + "</a> to move selected file(s)" ); $('.toast').toast("show"); return false; } })
|
||||
}
|
||||
|
||||
// show the DBox for a move file, includes all thumbnails of selected files to move
|
||||
|
||||
@@ -168,6 +168,16 @@
|
||||
|
||||
{% if not InDBox %}
|
||||
{%block script_content %}{% endblock script_content %}
|
||||
<div class="position-fixed bottom-0 end-0 p-3" style="z-index: 11">
|
||||
<div id="status_toast" class="toast align-items-center text-white bg-success border-0" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="d-flex">
|
||||
<div class="toast-body">
|
||||
Hello, world! This is a toast message.
|
||||
</div>
|
||||
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user