Compare commits
3 Commits
97e738dc13
...
4556afb3bb
| Author | SHA1 | Date | |
|---|---|---|---|
| 4556afb3bb | |||
| 0eee594206 | |||
| 78b112d050 |
2
TODO
2
TODO
@@ -11,7 +11,7 @@
|
|||||||
### major fix - go to everywhere I call GetEntries(), and redo the logic totally...
|
### major fix - go to everywhere I call GetEntries(), and redo the logic totally...
|
||||||
* client side:
|
* client side:
|
||||||
* for real chance to stop confusion, instead of removing deleted images from DOM, we should gray them out and put a big Del (red circle with line?) though it as overlay.
|
* for real chance to stop confusion, instead of removing deleted images from DOM, we should gray them out and put a big Del (red circle with line?) though it as overlay.
|
||||||
* Create another table is entry_ammendments - note the deletions, rotations, flips of specific eids - then reproduce that on the client side visually as needed
|
* Create another table of entry_ammendments - note the deletions, rotations, flips of specific eids - then reproduce that on the client side visually as needed
|
||||||
- at least grayed-out, to indicate a pending action is not complete.
|
- at least grayed-out, to indicate a pending action is not complete.
|
||||||
- When job that flips, rotates, deletes completes then lets update the query details (e.g. remove eids, or remove the ammendments)
|
- When job that flips, rotates, deletes completes then lets update the query details (e.g. remove eids, or remove the ammendments)
|
||||||
- this actually is quite an improvement, if someone is deleting 2 as per above, I will see that as a pending change in my unrelated query, ditto flips, etc.
|
- this actually is quite an improvement, if someone is deleting 2 as per above, I will see that as a pending change in my unrelated query, ditto flips, etc.
|
||||||
|
|||||||
3
files.py
3
files.py
@@ -461,6 +461,9 @@ def change_file_opts():
|
|||||||
else:
|
else:
|
||||||
OPT.folders=False
|
OPT.folders=False
|
||||||
# so create a new entryList, and handle that on the client
|
# so create a new entryList, and handle that on the client
|
||||||
|
if 'search' in request.referrer:
|
||||||
|
query_data = GetSearchQueryData( OPT )
|
||||||
|
else:
|
||||||
query_data = GetQueryData( OPT )
|
query_data = GetQueryData( OPT )
|
||||||
return make_response( jsonify( query_data=query_data ) )
|
return make_response( jsonify( query_data=query_data ) )
|
||||||
|
|
||||||
|
|||||||
@@ -567,7 +567,7 @@ function getPageFileList(res, viewingIdx)
|
|||||||
function getEntriesByIdSuccessHandler(res,pageNumber,successCallback,viewingIdx)
|
function getEntriesByIdSuccessHandler(res,pageNumber,successCallback,viewingIdx)
|
||||||
{
|
{
|
||||||
if( res.length != pageList.length )
|
if( res.length != pageList.length )
|
||||||
document.alert="<alert class='alert alert-warning'>WARNING: something in data has changed since viewing this page (likely someone deleted content in another view), strongly suggest a page reload to get the latest data</alert>"
|
document.alert="<alert class='alert alert-warning'>WARNING: something has changed since viewing this page (likely someone deleted content in another view), strongly suggest a page reload to get the latest data</alert>"
|
||||||
|
|
||||||
document.entries=res;
|
document.entries=res;
|
||||||
// cache this
|
// cache this
|
||||||
@@ -700,7 +700,11 @@ function isMobile() {
|
|||||||
// when we change one of the options (noo, how_many, folders) - then update '{how_many} files' str,
|
// when we change one of the options (noo, how_many, folders) - then update '{how_many} files' str,
|
||||||
// tweak noo menu for folders/flat view then reset the page contents based on current OPT values
|
// tweak noo menu for folders/flat view then reset the page contents based on current OPT values
|
||||||
function changeOPT(successCallback) {
|
function changeOPT(successCallback) {
|
||||||
|
var old_how_many=OPT.how_many
|
||||||
OPT.how_many=$('#how_many').val()
|
OPT.how_many=$('#how_many').val()
|
||||||
|
// if we change how_many invalidate page cache as page size is different now
|
||||||
|
if( OPT.how_many != old_how_many )
|
||||||
|
document.page.length=0
|
||||||
new_f=$('#folders').val()
|
new_f=$('#folders').val()
|
||||||
new_f=( new_f == 'True' )
|
new_f=( new_f == 'True' )
|
||||||
// if change to/from folders, also fix the noo menu
|
// if change to/from folders, also fix the noo menu
|
||||||
@@ -729,9 +733,10 @@ function changeOPT(successCallback) {
|
|||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
success: function(resp) {
|
success: function(resp) {
|
||||||
entryList=resp.query_data.entry_list
|
entryList=resp.query_data.entry_list
|
||||||
|
OPT.how_many=parseInt(OPT.how_many)
|
||||||
|
pageList=entryList.slice(0, OPT.how_many)
|
||||||
// put data back into booleans, ints, etc
|
// put data back into booleans, ints, etc
|
||||||
OPT.folders=( OPT.folders == 'True' )
|
OPT.folders=( OPT.folders == 'True' )
|
||||||
OPT.how_many=parseInt(OPT.how_many)
|
|
||||||
$('.how_many_text').html( ` ${OPT.how_many} files ` )
|
$('.how_many_text').html( ` ${OPT.how_many} files ` )
|
||||||
OPT.size=parseInt(OPT.size)
|
OPT.size=parseInt(OPT.size)
|
||||||
getPage(1,successCallback)
|
getPage(1,successCallback)
|
||||||
|
|||||||
Reference in New Issue
Block a user