af730d9e24c0642fe39657f890bc117ed015ccbf
galt
Wed Feb 15 01:12:26 2017 -0800
CSP code cleanup. Using new var-args versions of functions jsInlineF and jsOnEventByIdF to avoid using lots of fixed-size local javascript strings.
diff --git src/hg/hgCustom/hgCustom.c src/hg/hgCustom/hgCustom.c
index 50cbbea..0caef77 100644
--- src/hg/hgCustom/hgCustom.c
+++ src/hg/hgCustom/hgCustom.c
@@ -562,34 +562,32 @@
printf("
");
printf("\n",
"add custom tracks");
-char javascript[1024];
-safef(javascript, sizeof javascript,
+// This submits mainForm with a hidden input that tells hgCustom to show add tracks page:
+jsOnEventByIdF("click", "addTracksButton",
"var $form = $(\"form[name='mainForm']\"); "
"$form.append(\"\"); "
"$form.submit();"
, hgCtDoAdd);
-// This submits mainForm with a hidden input that tells hgCustom to show add tracks page:
-jsOnEventById("click", "addTracksButton", javascript);
puts("
");
puts("");
puts("");
cgiTableRowEnd();
cgiTableEnd();
// This vertically aligns the 'add tracks' button with the other-CGI select
jsInline(
"function fitUnder($el1, $el2) { "
" var off1 = $el1.offset(); "
" var off2 = $el2.offset(); "
" off2.left = off1.left; "