mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-05 22:44:22 +08:00
Merge pull request #399 from okriuchykhin/ok_SCI_811_v2
Fix changed sample type and sample group in sample edit [SCI-811]
This commit is contained in:
commit
8d4b2d7373
1 changed files with 2 additions and 2 deletions
|
@ -805,7 +805,7 @@ function createSampleTypeSelect(data, selected) {
|
||||||
$.each(data, function(i, val) {
|
$.each(data, function(i, val) {
|
||||||
var $option = $('<option></option>')
|
var $option = $('<option></option>')
|
||||||
.attr('value', val.id).text(val.name);
|
.attr('value', val.id).text(val.name);
|
||||||
if((i + 1) === selected) {
|
if(val.id === selected) {
|
||||||
$option.attr('selected', true);
|
$option.attr('selected', true);
|
||||||
}
|
}
|
||||||
$selectType.append($option);
|
$selectType.append($option);
|
||||||
|
@ -834,7 +834,7 @@ function createSampleGroupSelect(data, selected) {
|
||||||
var $option = $('<option></option>')
|
var $option = $('<option></option>')
|
||||||
.attr('value', val.id).text(val.name)
|
.attr('value', val.id).text(val.name)
|
||||||
.attr('data-content', $span.prop('outerHTML') + ' ' + val.name);
|
.attr('data-content', $span.prop('outerHTML') + ' ' + val.name);
|
||||||
if((i + 1) === selected) {
|
if(val.id === selected) {
|
||||||
$option.attr('selected', true);
|
$option.attr('selected', true);
|
||||||
}
|
}
|
||||||
$selectGroup.append($option);
|
$selectGroup.append($option);
|
||||||
|
|
Loading…
Reference in a new issue