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