b7b15a261ae3e28941a2891ee568c9b472fcda7e angie Wed Jul 30 14:44:14 2014 -0700 Added jsMakeSetClearContainer / jsEndContainer to jsHelper.c, and apppliedthem to a couple long lists of checkboxes in hgVai. While at it, I moved jsHelper.c's javascript-inlined-in-HTML out to a new .js file, jsHelper.js. diff --git src/hg/inc/jsHelper.h src/hg/inc/jsHelper.h index 1e85b8f..cdd18ea 100644 --- src/hg/inc/jsHelper.h +++ src/hg/inc/jsHelper.h @@ -66,30 +66,37 @@ /* Make a little javascript to check and uncheck radio buttons * according to new value. To use this you must have called * jsWriteFunctions somewhere, and also must use jsMakeTrackingRadioButton * to make the buttons. */ char *jsSetVerticalPosition(char *form); /* Returns a javascript statement for storing the vertical position of the * page; typically this would go just before a document submit. * jsInit must be called first. * Do not free return value! */ void jsMakeCheckboxGroupSetClearButton(char *buttonVar, boolean isSet); /* Make a button for setting or clearing a set of checkboxes with the same name. * Uses only javascript to change the checkboxes, no resubmit. */ +void jsMakeSetClearContainer(); +/* Begin a wrapper div with class setClearContainer, plus 'Set all' and 'Clear all' buttons. + * This should be followed by a bunch of checkboxes, and then a call to jsEndContainer. */ + +void jsEndContainer(); +/* End a wrapper div. */ + char *jsPressOnEnter(char *button); /* Returns a javascript statement that clicks button when the Enter key * has been pressed; typically this would go in a text input. * jsInit must be called first. * Do not free return value! */ void jsIncludeFile(char *fileName, char *noScriptMsg); /* Prints out html to include given javascript file from the js directory; suppresses redundant *