bb91983642454f19363543521e36ac836eb504e5 jcasper Mon Jun 3 12:59:53 2013 -0700 Collapsed staticDoc.js into one file, updated makefile/README to not clobber alpha on make user, refs #10888 diff --git src/hg/js/README src/hg/js/README index 4da035c..e91da3e 100644 --- src/hg/js/README +++ src/hg/js/README @@ -1,31 +1,30 @@ The js directory should hold all refereenced javascript files for normal browser CGIs. The contents includes the versions of jQuery package files mostly unmodified by UCSC, as well as several that are specific tothe browser. Files should be named for the CGI or the library that uses them: hgTracks.js included by hgTracks CGI. hui.js included by hui.c library code. utils.js common utilities included by multiple CGIs. -The "make alpha" command should place all files in JS_FILES in apache/htdocs/js/, -while "make" will place them in apache/htdocs-{user}/js if it exists, and otherwise -in apache/htdocs/js/{user}. The one exception is that "make" will place any files -listed in STATIC_FILES in apache/htdocs-{user}/js if it exists (with everything else), -and otherwise in apache/htdocs/js. This is because static documents are hard-coded to -look in /js. Files listed in both STATIC_FILES and JS_FILES will be placed in both -locations. +The "make alpha" command will place all files in JS_FILES and STATIC_FILES in +apache/htdocs/js/. "make user" will place both sets in apache/htdocs-{user}/js if it +exists, and otherwise will place JS_FILES in apache/htdocs/js/{user} and skip +STATIC_FILES. STATIC_FILES cannot be installed to apache/htdocs/js/{user} because +the static documents won't know to look there, and cannot be installed to htdocs/js +because that would require "make user" to clobber files placed by "make alpha". In order to avoid caching errors by client browsers, the CGIs reference these files by a symlink that contains the timestamp of the file. The symlink is created by the CGIs if not found. IMPORTANT: In for a user to test changes to javascript files on a named browser a setting must be added to the hg.conf file of that browser. For example for the browser "hgwdev-larrym", if apache/htdocs-larrym/ exists then the following line should appear in apache/cgi-bin-larrym/hg.conf: browser.documentRoot=/usr/local/apache/htdocs-larrym If that directory does not exist, then the following line must appear in apache/cgi-bin-larrym/hg.conf instead: browser.javaScriptDir=js/larrym