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/hgPublicSessions/hgPublicSessions.c src/hg/hgPublicSessions/hgPublicSessions.c index c42dc7f..f70dc2b 100644 --- src/hg/hgPublicSessions/hgPublicSessions.c +++ src/hg/hgPublicSessions/hgPublicSessions.c @@ -6,30 +6,31 @@ #include "common.h" #include "linefile.h" #include "hash.h" #include "options.h" #include "jksql.h" #include "htmshell.h" #include "web.h" #include "cheapcgi.h" #include "cart.h" #include "hui.h" #include "ra.h" #include "dystring.h" #include "hPrint.h" #include "hgConfig.h" #include "sessionThumbnail.h" +#include "jsHelper.h" struct galleryEntry /* Holds data for a single session in the gallery*/ { struct galleryEntry *next; char *userName; char *realName; char *sessionName; char *settings; char *db; char *firstUse; char *imgPath; char *imgUri; struct dyString *sessionUrl; unsigned long useCount; @@ -120,78 +121,88 @@ "%s s left join gbMembers m on m.userName = s.userName where shared = 2%s limit 30" , namedSessionTable, otherConstraints); sr = sqlGetResult(conn, query); while ((row = sqlNextRow(sr)) != NULL) { gal = galLoad(row); slAddHead (&galList, gal); } sqlFreeResult(&sr); hDisconnectCentral(&conn); return galList; } -void doGalleryIncludes() -/* Print external links to the jquery js and css files used for this CGI. Unfortunately - * this conflicts a bit with the jquery we inherit from cartWebStart(). Hope - * to resolve that some day by figuring out what's preventing us from updating - * our jquery version elsewhere */ -{ -printf ("\n"); -printf ("\n"); -printf ("\n"); -} - - void galleryDisplay(struct galleryEntry *galList) /* Print a table containing the gallery data from galList */ { struct galleryEntry *thisSession = galList; /* Hide the orderable columns and disable ordering on the visible columns * https://datatables.net/reference/option/columnDefs for more info. * Then set up the ordering drop-down menu */ -printf ("\n"); + "}\n"); +printf("\n"); printf ("
\n"); printf ("Sort by:
\n"); -printf ("Screenshot | \n" "Session Properties | \n" "Creation Date | \n" "Use Count | \n" "
---|---|---|---|