|
@@ -96,7 +96,7 @@ $(document).ready(function()
|
96
|
96
|
|
97
|
97
|
$('.panel-group .panel-body').hide();
|
98
|
98
|
|
99
|
|
- // $('#outcome-display').parent().hide();
|
|
99
|
+ $('#outcome-display').parent().hide();
|
100
|
100
|
|
101
|
101
|
// --------------------------------------------------------------------------
|
102
|
102
|
// Functions
|
|
@@ -108,8 +108,9 @@ $(document).ready(function()
|
108
|
108
|
|
109
|
109
|
// When list item is clicked, load corresponding info
|
110
|
110
|
$('#expected-outcome .form-control').on('change', function(){
|
111
|
|
- //create the expected target in the database
|
|
111
|
+
|
112
|
112
|
program_id = {{$program->id}};
|
|
113
|
+
|
113
|
114
|
semester_id = $('#expected-outcome').data('semester-id');
|
114
|
115
|
$.post(
|
115
|
116
|
"../annual-plan-CreateOrEdit/{{$program->id}}",
|
|
@@ -118,6 +119,7 @@ $(document).ready(function()
|
118
|
119
|
semester_id: semester_id,
|
119
|
120
|
expected_target: $('#expected-outcome .form-control').val(),
|
120
|
121
|
},
|
|
122
|
+
|
121
|
123
|
)
|
122
|
124
|
|
123
|
125
|
});
|
|
@@ -177,12 +179,10 @@ $(document).ready(function()
|
177
|
179
|
|
178
|
180
|
|
179
|
181
|
var expected_target = json.expected_target;
|
180
|
|
- //check the data type of the expected target
|
181
|
|
- // console.log(expected_target);
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+ //check the data type of the expected target
|
182
|
185
|
//if the expected_target var is an empty array, set default value
|
183
|
|
- var created_at = new Date();
|
184
|
|
- created_at = created_at.getFullYear()+"-"+created_at.getMonth()+"-"+created_at.getDate()
|
185
|
|
- + " " + created_at.getHours() + ":" + created_at.getMinutes() + ":" + created_at.getSeconds();
|
186
|
186
|
if(expected_target.length == 0)
|
187
|
187
|
{
|
188
|
188
|
$('#expected-outcome .form-control').val(0);
|