95433400da33b5bae4c4c8475f1305fc08510f66 jcasper Sat Jun 11 14:25:14 2016 -0700 Store the sort/filter state of jQuery-DataTables-enabled tables in hgSession and hgPublicSessions to the cart, without including that state in saved sessions. Block IE versions before 11 from seeing the DataTables table version, due to checkbox issues. Bonus: fix for a minor session deletion bug. refs #15312, #17509 diff --git src/hg/inc/cart.h src/hg/inc/cart.h index 07e0fe7..5048fa0 100644 --- src/hg/inc/cart.h +++ src/hg/inc/cart.h @@ -424,32 +424,37 @@ struct cart *cartForSession(char *cookieName, char **exclude, struct hash *oldVars); /* This gets the cart without writing any HTTP lines at all to stdout. */ void cartSetDbConnector(DbConnector connector); /* Set the connector that will be used by the cart to connect to the * database. Default connector is hConnectCart */ void cartSetDbDisconnector(DbDisconnect disconnector); /* Set the connector that will be used by the cart to disconnect from the * database. Default disconnector is hDisconnectCart */ /* Libified constants and code that originally belonged only to hgSession - * (now hgTracks uses them too): */ + * (now hgTracks uses them too), plus a couple for DataTables in hgSession + * and hgPublicSessions: */ #define hgSessionPrefix "hgS_" +#define hgPublicSessionsPrefix "hgPS_" +#define dataTableStateName "DataTableState" +#define hgSessionTableState hgSessionPrefix dataTableStateName +#define hgPublicSessionsTableState hgPublicSessionsPrefix dataTableStateName #define hgsOtherUserName hgSessionPrefix "otherUserName" #define hgsOtherUserSessionName hgSessionPrefix "otherUserSessionName" #define hgsDoOtherUser hgSessionPrefix "doOtherUser" #define hgsLoadUrlName hgSessionPrefix "loadUrlName" #define hgsDoLoadUrl hgSessionPrefix "doLoadUrl" #define namedSessionTable "namedSessionDb" void sessionTouchLastUse(struct sqlConnection *conn, char *encUserName, char *encSessionName); /* Increment namedSessionDb.useCount and update lastUse for this session. */ void cartLoadUserSession(struct sqlConnection *conn, char *sessionOwner,