Compare commits
5 Commits
d247ecec54
...
refactor-e
| Author | SHA1 | Date | |
|---|---|---|---|
| 74647bcdfb | |||
| 0ee55ee73d | |||
| 89e8c5d9f7 | |||
| 76b0745cc3 | |||
| bc2d4384c9 |
7
BUGs
7
BUGs
@@ -1,12 +1,5 @@
|
||||
### Next: 146
|
||||
BUG-143: if I skip next fast enough in files_ip, it can get the warning about changes to entry list... (would have though I disabled next page until loaded)
|
||||
BUG-142: after transforming, the face data is still in the old spots, really should delete it / make it recalc
|
||||
BUG-141: can currently try to flip a video (in a highlighted group)
|
||||
BUG-140: When db is restarted underneath PA, it crashes job mgr... It should just accept timeouts, and keep trying to reconnect every 2? mins
|
||||
BUG-125: when an image is highlighted, then post the contextmenu on a different image - the highlight does not move to the new image
|
||||
and the selected menu function processes the original or the new depending on the way the code works.
|
||||
There is a chance we need to change the document on click to a mouse down (or whatever the context menu
|
||||
uses for default), rather than just fix the highlight
|
||||
BUG-118: can move files from Bin path, but it leaves the del_file entry for it - need to remove it
|
||||
BUG-117: when search returns files that can be deleted and/or restored, the icon stays as delete and tries to delete!
|
||||
BUG-106: cant add trudy /pat? as refimgs via FaceDBox
|
||||
|
||||
@@ -682,7 +682,6 @@ function getPage(pageNumber, successCallback, viewingIdx=0)
|
||||
$('#ra').prop('disabled', true)
|
||||
const startIndex = (pageNumber - 1) * OPT.how_many;
|
||||
const endIndex = startIndex + OPT.how_many;
|
||||
console.log('pageNumber is: ' + pageNumber + ', about to make pageList from si=' +startIndex + ', to ei=' + endIndex )
|
||||
pageList = entryList.slice(startIndex, endIndex);
|
||||
|
||||
// set up data to send to server to get the entry data for entries in pageList
|
||||
@@ -760,6 +759,10 @@ function resetNextPrevButtons()
|
||||
// get list of eids for the next page, also make sure next/prev buttons make sense for page we are on
|
||||
function nextPage(successCallback)
|
||||
{
|
||||
// start with disabling more next presses until we are ready to process them
|
||||
$('.prev').prop('disabled', true).addClass('disabled');
|
||||
$('.next').prop('disabled', true).addClass('disabled');
|
||||
|
||||
// pageList[0] is the first entry on this page
|
||||
const currentPage=getPageNumberForId( pageList[0] )
|
||||
// should never happen / just return pageList unchanged
|
||||
@@ -775,6 +778,10 @@ function nextPage(successCallback)
|
||||
// get list of eids for the prev page, also make sure next/prev buttons make sense for page we are on
|
||||
function prevPage(successCallback)
|
||||
{
|
||||
// start with disabling more prev presses until we are ready to process them
|
||||
$('.prev').prop('disabled', true).addClass('disabled');
|
||||
$('.next').prop('disabled', true).addClass('disabled');
|
||||
|
||||
// pageList[0] is the first entry on this page
|
||||
const currentPage=getPageNumberForId( pageList[0] )
|
||||
// should never happen / just return pageList unchanged
|
||||
@@ -917,6 +924,12 @@ $.contextMenu({
|
||||
selector: '.entry',
|
||||
itemClickEvent: "click",
|
||||
build: function($triggerElement, e) {
|
||||
// if we are not in the highlight set, then move the highlight to this element
|
||||
if( ! $(e.currentTarget).is('.highlight') )
|
||||
{
|
||||
$('.highlight').removeClass('highlight');
|
||||
$(e.currentTarget).addClass('highlight')
|
||||
}
|
||||
// when right-clicking & no selection add one OR deal with ctrl/shift right-lick as it always changes seln
|
||||
if( NoSel() || e.ctrlKey || e.shiftKey )
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// can only have 1 ammendment per image, its grayed out for other changes
|
||||
function removeAmendment( id )
|
||||
{
|
||||
console.log( 'removing amendment for: ' + id )
|
||||
document.amendments=document.amendments.filter(obj => obj.eid !== id)
|
||||
}
|
||||
|
||||
@@ -11,11 +10,16 @@ function removeAmendment( id )
|
||||
function handleTransformImageJobCompleted(job, entry)
|
||||
{
|
||||
removeAmendment( entry.id )
|
||||
// update viewer and files* views, in case we view/go up without a new page load
|
||||
// force reload with timestamped version of im.src
|
||||
im.src=im.src + '?t=' + new Date().getTime();
|
||||
DrawImg()
|
||||
// update viewer if we are viewing an image
|
||||
if( document.viewing )
|
||||
{
|
||||
// force reload with timestamped version of im.src
|
||||
im.src=im.src + '?t=' + new Date().getTime();
|
||||
DrawImg()
|
||||
}
|
||||
|
||||
// ALWAYS update files* div as we could go back to this from a viewer, and
|
||||
// the thumbnail needs the updated data
|
||||
idx = entryList.indexOf(entry.id)
|
||||
// replace data for this entry now its been transformed
|
||||
document.entries[idx]=entry
|
||||
|
||||
2
main.py
2
main.py
@@ -66,8 +66,6 @@ app.config['LDAP_USER_DN'] = 'ou=users'
|
||||
app.config['LDAP_GROUP_DN'] = 'ou=groups'
|
||||
app.config['LDAP_USER_RDN_ATTR'] = 'uid'
|
||||
app.config['LDAP_USER_LOGIN_ATTR'] = 'uid'
|
||||
app.config['LDAP_BIND_USER_DN'] = None
|
||||
app.config['LDAP_BIND_USER_PASSWORD'] = None
|
||||
app.config['LDAP_GROUP_OBJECT_FILTER'] = '(objectclass=posixGroup)'
|
||||
app.config['LDAP_BIND_USER_DN'] = None
|
||||
app.config['LDAP_BIND_USER_PASSWORD'] = None
|
||||
|
||||
@@ -1897,6 +1897,11 @@ def JobTransformImage(job):
|
||||
amt=[jex.value for jex in job.extra if jex.name == "amt"][0]
|
||||
e=session.query(Entry).join(File).filter(Entry.id==id).first()
|
||||
PAprint( f"JobTransformImage: job={job.id}, id={id}, amt={amt}" )
|
||||
# cant transfer non-image, but may get here if multi-select includes non-Image
|
||||
if e.type.name != 'Image':
|
||||
removeEntryAmendment( job, id )
|
||||
FinishJob(job, "Cannot rotate file as it is not an Image","Failed")
|
||||
return
|
||||
|
||||
if amt == "fliph":
|
||||
AddLogForJob(job, f"INFO: Flipping {e.FullPathOnFS()} horizontally" )
|
||||
@@ -1920,6 +1925,8 @@ def JobTransformImage(job):
|
||||
e.file_details.hash = md5( job, e )
|
||||
PAprint( f"JobTransformImage DONE thumb: job={job.id}, id={id}, amt={amt}" )
|
||||
session.add(e)
|
||||
# any faces in this file are no longer valid, remove them
|
||||
session.query(FaceFileLink).filter(FaceFileLink.file_eid==e.id).delete()
|
||||
removeEntryAmendment( job, id )
|
||||
|
||||
FinishJob(job, "Finished Processesing image rotation/flip")
|
||||
|
||||
Reference in New Issue
Block a user