|
@@ -17,6 +17,7 @@
|
|
|
|
|
|
var selectedClassId=0;
|
|
var selectedClassId=0;
|
|
var selectedClassName='';
|
|
var selectedClassName='';
|
|
|
|
+ var firstSubjectType=0;
|
|
<?php
|
|
<?php
|
|
if(isset($subjects)){
|
|
if(isset($subjects)){
|
|
foreach ($subjects as $type => $val){
|
|
foreach ($subjects as $type => $val){
|
|
@@ -52,7 +53,9 @@
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
?>
|
|
?>
|
|
- console.log(subject);
|
|
|
|
|
|
+
|
|
|
|
+ firstSubjectType=Object.keys(subject)[0];
|
|
|
|
+
|
|
function setSubject(type){
|
|
function setSubject(type){
|
|
var html='';
|
|
var html='';
|
|
if(subject[type].length>0){
|
|
if(subject[type].length>0){
|
|
@@ -62,7 +65,7 @@
|
|
}
|
|
}
|
|
$('#subjectId').html(html);
|
|
$('#subjectId').html(html);
|
|
}
|
|
}
|
|
- setSubject(1);
|
|
|
|
|
|
+ setSubject(firstSubjectType);
|
|
|
|
|
|
$('.goodTypeInput').click(function(){
|
|
$('.goodTypeInput').click(function(){
|
|
console.log($(this).val());
|
|
console.log($(this).val());
|