b1e78a03a250b12c0f0ae1504920c5f2a61e705b
tdreszer
Fri May 23 13:29:09 2014 -0700
Extended last fix to a couple more places that were relying upon creating hidden inputs, where adding to the queued cart vars makes more sense. Related to but not exactly redmine #13304.
diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index ab8a445..708398c 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -2096,32 +2096,31 @@
success: catchErrorOrDispatch,
error: errorHandler,
cmd: cmd,
loadingId: showLoadingImage("imgTbl"),
cache: false
});
} else {
// do a full page refresh to update hgTracks image
jQuery('body').css('cursor', 'wait');
var ele;
if (document.TrackForm)
ele = document.TrackForm;
else
ele = document.TrackHeaderForm;
if (name)
- $(ele).append("");
+ cart.addVarsToQueue(['hgFind.matches'], [name]);
ele.submit();
}
}
}
} else if (cmd === 'zoomCodon' || cmd === 'zoomExon') {
var num, ajaxCmd, msg;
if (cmd === 'zoomCodon') {
msg = "Please enter the codon number to jump to:";
ajaxCmd = 'codonToPos';
} else {
msg = "Please enter the exon number to jump to:";
ajaxCmd = 'exonToPos';
}
rightClick.myPrompt(msg, function(results) {
$.ajax({
@@ -2294,33 +2293,32 @@
cart.setVars( [ id, id+"_sel" ], [ '[]', 0 ] );
} else if (tdbIsFolderContent(rec)) {
// supertrack children need to have _sel set to trigger superttrack reshaping
cart.setVars( [ id, id+"_sel" ], [ 'hide', 0 ] );
} else {
cart.setVars([id], ['hide']); // Others, just set vis hide.
}
$(document.getElementById('tr_' + id)).remove();
imageV2.afterImgChange(true);
} else if (!imageV2.mapIsUpdateable) {
jQuery('body').css('cursor', 'wait');
if (selectUpdated) {
// assert(document.TrackForm);
document.TrackForm.submit();
} else {
- // add a hidden with new visibility value
- var form = $(document.TrackHeaderForm);
- $("").appendTo(form);
+ // Add vis update to queue then submit
+ cart.addVarsToQueue([id], [cmd]);
document.TrackHeaderForm.submit();
}
} else {
imageV2.requestImgUpdate(id, id + "=" + cmd, "", cmd);
}
}
},
makeHitCallback: function (title)
{ // stub to avoid problem with a function closure w/n a loop
return function(menuItemClicked, menuObject) {
rightClick.hit(menuItemClicked, menuObject, title); return true;
};
},