7206132fbc62b1d3b563b67aa067ae8d6ab76e2b chmalee Fri Jun 6 15:54:08 2025 -0700 Refactor hubSpace UI a little in order to make getting the initial filelist over async rather than with the CGI load, refs Max discussion diff --git src/hg/js/hgMyData.js src/hg/js/hgMyData.js index 70a4e3719ff..e0ab03de997 100644 --- src/hg/js/hgMyData.js +++ src/hg/js/hgMyData.js @@ -1,1442 +1,1472 @@ /* jshint esnext: true */ var debugCartJson = true; function prettyFileSize(num) { if (!num) {return "0B";} if (num < (1024 * 1024)) { return `${(num/1024).toFixed(1)}KB`; } else if (num < (1024 * 1024 * 1024)) { return `${((num/1024)/1024).toFixed(1)}MB`; } else { return `${(((num/1024)/1024)/1024).toFixed(1)}GB`; } } function cgiEncode(value) { // copy of cheapgi.c:cgiEncode except we are explicitly leaving '/' characters: let splitVal = value.split('/'); splitVal.forEach((ele, ix) => { splitVal[ix] = encodeURIComponent(ele); }); return splitVal.join('/'); } function cgiDecode(value) { // decode an encoded value return decodeURIComponent(value); } function setDbSelectFromAutocomplete(selectEle, item) { // this has been bound to the