removed use of last_entry_in_db (boolean) and replaced with use of current/first_eid/last_eid in PA_USER_STATE so it persists across reloads/back buttons, and allows full use of ajax data retrieval in the background for the viewer (so fullscreen stays across page loads), and the next/prev buttons are set on the image load, not after they have been pressed "one too many times"

This commit is contained in:
2022-01-27 14:27:52 +11:00
parent 08ca9b4e74
commit 55724ccd59
5 changed files with 64 additions and 33 deletions

View File

@@ -28,8 +28,12 @@ create table PA_USER(
DEFAULT_FULLSCREEN Boolean,
constraint PK_PA_USER_ID primary key(ID) );
-- this should reference pa_user_id not pa_user_dn
create table PA_USER_STATE ( ID integer, PA_USER_DN varchar(128), PATH_TYPE varchar(16), NOO varchar(16), GROUPING varchar(16), HOW_MANY integer, ST_OFFSET integer, SIZE integer, FOLDERS Boolean, FULLSCREEN Boolean, ROOT varchar, CWD varchar, VIEW_EID integer, ORIG_PTYPE varchar, ORIG_SEARCH_TERM varchar, ORIG_URL varchar,
-- this is totally not 3rd normal form, but when I made it that, it was so complex, it was stupid
-- so for the little data here, I'm deliberately doing a redundant data structure
create table PA_USER_STATE ( ID integer, PA_USER_DN varchar(128), PATH_TYPE varchar(16), NOO varchar(16),
GROUPING varchar(16), HOW_MANY integer, ST_OFFSET integer, SIZE integer, FOLDERS Boolean,
FULLSCREEN Boolean, ROOT varchar, CWD varchar, VIEW_EID integer, ORIG_PTYPE varchar, ORIG_SEARCH_TERM varchar,
ORIG_URL varchar, CURRENT integer, FIRST_EID integer, LAST_EID integer,
constraint FK_PA_USER_DN foreign key (PA_USER_DN) references PA_USER(DN),
constraint PK_PA_USER_STATES_ID primary key(ID ) );