29bf34411fc405b99032d38c463528b4361f28da chmalee Fri Jun 6 16:14:49 2025 -0700 Make hubSpace async requests use loginHost cgi-bin url, refs Max discussion diff --git src/hg/js/model/lib/cart.js src/hg/js/model/lib/cart.js index 40c91b0b6aa..e4cf677c02f 100644 --- src/hg/js/model/lib/cart.js +++ src/hg/js/model/lib/cart.js @@ -206,30 +206,37 @@ defaultErrorCallback: function (jqXHR, textStatus) { defaultErrorCallback(jqXHR, textStatus); }, cgi: function() { return cgiName; }, setCgi: function(newCgi) { // Sets the name of the CGI (e.g. hgIntegrator, hgChooseDb etc). // This must be called before cart.send. cgiName = newCgi; cgiUrl = cgiBinUrl + newCgi; }, + setCgiAndUrl: function(newUrl, cgiName) { + // Sets the full URL of the CGI (e.g. hgIntegrator, hgChooseDb etc). + // This must be called before cart.send. + cgiName = cgiName; + cgiUrl = newUrl; + }, + send: function(commandObj, successCallback, errorCallback) { // Queue up commandObj and callbacks, merging cgiVars with those of othere queued reqs. // successCallback and the optional errorCallback are functions(jqXHR, textStatus) // Throws [message, badValue] if something is not as expected. var cmdObjNoCgiVar = processCommandObj(commandObj); // If this request contained only cgiVars (empty cmdObjNoCgiVar) then let those // go out with other requests. Below, flush will make sure that at least one request // is sent out if there are cgiVars. if (! _.isEmpty(cmdObjNoCgiVar) || successCallback || errorCallback) { requestQueue.push({ commandObj: cmdObjNoCgiVar, successCallback: successCallback, errorCallback: errorCallback }); } },