e47907296621d97a9d893556b3fb78ad4cbcc14b angie Fri Jun 14 11:19:21 2013 -0700 Libifying a javascript trick to detect that the back button has been pressed, and reload the page to redraw with the latest cart vars. refs #6152 diff --git src/hg/inc/jsHelper.h src/hg/inc/jsHelper.h index 5280025..d8d6dab 100644 --- src/hg/inc/jsHelper.h +++ src/hg/inc/jsHelper.h @@ -126,30 +126,34 @@ Returned string should be free'ed after use. */ void jsBeginCollapsibleSection(struct cart *cart, char *track, char *section, char *sectionTitle, boolean isOpenDefault); /* Make the hidden input, collapse/expand button and <TR id=...> needed for utils.js's * setTableRowVisibility(). Caller needs to have already created a <TABLE> and <FORM>. */ void jsBeginCollapsibleSectionFontSize(struct cart *cart, char *track, char *section, char *sectionTitle, boolean isOpenDefault, char *fontSize); /* Make the hidden input, collapse/expand button and <TR id=...> needed for utils.js's * setTableRowVisibility(). Caller needs to have already created a <TABLE> and <FORM>. */ void jsEndCollapsibleSection(); /* End the collapsible <TR id=...>. */ +void jsReloadOnBackButton(struct cart *cart); +/* Add some javascript to detect that the back button (or reload) has been pressed, + * and to resubmit in that case to redraw the page with the latest cart contents. */ + /* JSON Element code let's you build up a DOM like data structure in memory and then serialize it into html for communication with client side code. */ // supported types typedef enum _jsonElementType { jsonList = 0, jsonObject = 1, jsonNumber = 2, jsonDouble = 3, jsonBoolean = 4, jsonString = 5 } jsonElementType;