mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 21:21:50 +08:00
Merge pull request #368 from Ducz0r/lm-sci-811-fix
Fix sample types & groups when editing sample in samples table [SCI-811]
This commit is contained in:
commit
e76ba4fbad
1 changed files with 7 additions and 3 deletions
|
@ -225,7 +225,7 @@ function initPageTutorialSteps(pageFirstStepN, pageLastStepN, nextPagePath,
|
|||
* @return {Object} This
|
||||
*/
|
||||
$.fn.makeDropdownOptionsLinks = function(selectedIdx, urlParam) {
|
||||
selectedIdx = _.isUndefined(selectedIdx) ? 1 : selectedIdx;
|
||||
selectedIdx = _.isUndefined(selectedIdx) ? -1 : selectedIdx;
|
||||
|
||||
$(this).change(function() {
|
||||
window.location.href = addParam($(this).find('option:selected')
|
||||
|
@ -239,8 +239,12 @@ $.fn.makeDropdownOptionsLinks = function(selectedIdx, urlParam) {
|
|||
} else {
|
||||
$(this).attr('href', '#');
|
||||
}
|
||||
})
|
||||
.eq(selectedIdx).attr('selected', true);
|
||||
});
|
||||
var selectedOpt = $(this).find('option[value="' + selectedIdx + '"]');
|
||||
if (!selectedOpt.length) {
|
||||
selectedOpt = $(this).find('option').eq(1);
|
||||
}
|
||||
selectedOpt.attr('selected', true);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue