70d2fa98f8f4fe8d805b2172bd26850d19c1a645 angie Mon Mar 23 15:17:04 2015 -0700 Code review feedback from Kate: libify inclusion of libs for new React framework. refs #14965 diff --git src/hg/inc/jsHelper.h src/hg/inc/jsHelper.h index 7691e31..bc8ca76 100644 --- src/hg/inc/jsHelper.h +++ src/hg/inc/jsHelper.h @@ -84,30 +84,34 @@ 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 * <script ...> tags if called repeatedly. * <noscript>...</noscript> tags are provided automatically. The noscript message may be specified via * the noScriptMsg parameter (the string may contain HTML markup). A default msg is provided * if noScriptMsg == NULL; noscript msg is suppressed if noScriptMsg == "" (this is useful * if you want to more carefully control where the message will appear on the page). */ +void jsIncludeReactLibs(); +/* Prints out <script src="..."> tags for external libraries including ReactJS & ImmutableJS + * and our own model libs, React mixins and components. */ + char *jsCheckAllOnClickHandler(char *idPrefix, boolean state); /* Returns javascript for use as an onclick attribute value to apply "check all"/"uncheck all" * to all checkboxes with given idPrefix. * state parameter determines whether to "check all" or "uncheck all" (TRUE means "check all"). */ void cgiMakeCheckAllSubmitButton(char *name, char *value, char *id, char *idPrefix, boolean state); /* Make submit button which uses javascript to apply check all or uncheck all to all * checkboxes with given idPrefix. * state parameter determines whether to "check all" or "uncheck all" (TRUE means "check all"). * id parameter may be NULL */ char *jsStripJavascript(char *str); /* Strip out anything that looks like javascript in html string. This function is designed to cleanup user input (e.g. to avoid XSS attacks). Returned string should be free'ed after use. */