|
@@ -16,7 +16,7 @@
|
16
|
16
|
{{ Form::open(array('action' => 'Objective2Controller@create' )) }}
|
17
|
17
|
<div id='outcomeGroup'>
|
18
|
18
|
<label> Associated Outcome</label>
|
19
|
|
- <div class="form-group col-md-11" id='outcomeForm'>
|
|
19
|
+ <div class="form-group col-md-11" id='outcomeForm='>
|
20
|
20
|
|
21
|
21
|
|
22
|
22
|
{{ Form::select('outcome[0]', $outcomes, null, ['class'=>'form-control selectpicker', 'id' =>'outcome[0]']) }}
|
|
@@ -40,7 +40,7 @@
|
40
|
40
|
<br>
|
41
|
41
|
|
42
|
42
|
|
43
|
|
- <input type ="hidden" id='{{ $programs[0]->name }}' name="program_id[]" value="{{$programs[0]->id}}">
|
|
43
|
+ <input type="hidden" id='{{ $programs[0]->name }}' name="program_id[]" value="{{$programs[0]->id}}">
|
44
|
44
|
<input type="checkbox" id="{{ $programs[0]->name }}" name="program_id[]" value="{{$programs[0]->id}}" disabled checked>
|
45
|
45
|
<label for="{{ $programs[0]->name }}"> {{ $programs[0]->name }} [{{ $programs[0]->school->name }}]</label><br>
|
46
|
46
|
|
|
@@ -65,18 +65,18 @@
|
65
|
65
|
<div class="panel-heading">
|
66
|
66
|
Edit
|
67
|
67
|
</div>
|
68
|
|
-
|
|
68
|
+
|
69
|
69
|
|
70
|
70
|
<div class="panel-body">
|
71
|
71
|
<button class="btn btn-md btn-secondary filterButton">
|
72
|
|
- <span class="glyphicon glyphicon-plus">
|
73
|
|
- </span>
|
74
|
|
- Filters
|
75
|
|
- </button>
|
|
72
|
+ <span class="glyphicon glyphicon-plus">
|
|
73
|
+ </span>
|
|
74
|
+ Filters
|
|
75
|
+ </button>
|
76
|
76
|
<div class='filterSection'>
|
77
|
|
-
|
|
77
|
+
|
78
|
78
|
{{ Form::open(array('action' => 'Objective2Controller@update')) }}
|
79
|
|
-
|
|
79
|
+
|
80
|
80
|
<div class="form-group">
|
81
|
81
|
{{ Form::label('program_id2', 'Associated Program')}}
|
82
|
82
|
<select id='select-program' class="form-control selectpicker" onchange='fetchAllObjectives("select-program", "assoc_outcomes_fetch")'>
|
|
@@ -88,10 +88,10 @@
|
88
|
88
|
<div class="form-group">
|
89
|
89
|
<label>Associated Outcome</label>
|
90
|
90
|
{{ Form::select('assoc_outcome_fetch', $outcomes, null, ['class'=>'form-control selectpicker', 'id'=>'assoc_outcomes_fetch', 'onchange'=>'fetchAllObjectives("select-program", "assoc_outcomes_fetch")']) }}
|
91
|
|
-
|
|
91
|
+
|
92
|
92
|
</div>
|
93
|
|
- </div>
|
94
|
|
- <hr>
|
|
93
|
+ </div>
|
|
94
|
+ <hr>
|
95
|
95
|
|
96
|
96
|
<div class="form-group">
|
97
|
97
|
{{ Form::label('objective_id', 'Objectives') }}
|
|
@@ -118,11 +118,11 @@
|
118
|
118
|
<label>Associated Outcome</label>
|
119
|
119
|
|
120
|
120
|
{{ Form::select("assoc_outcome[]", $outcomes, null, ['class'=>'form-control selectpicker', 'id'=>'assoc_outcome0']) }}
|
121
|
|
-<br><br>
|
|
121
|
+ <br><br>
|
122
|
122
|
</div>
|
123
|
|
-
|
|
123
|
+
|
124
|
124
|
</div>
|
125
|
|
-
|
|
125
|
+
|
126
|
126
|
<button id='button-add-assoc-outcome' class='btn btn-md btn-secondary' onclick='addAssoc()'>
|
127
|
127
|
<span class='glyphicon glyphicon-plus'>
|
128
|
128
|
|
|
@@ -137,8 +137,8 @@
|
137
|
137
|
<br>
|
138
|
138
|
|
139
|
139
|
|
140
|
|
- <input type ="hidden" id='assoc_program_id_{{ $programs[0]->id }}' name="program_id[]" value="{{$programs[0]->id}}">
|
141
|
|
-
|
|
140
|
+ <input type="hidden" id='assoc_program_id_{{ $programs[0]->id }}' name="program_id[]" value="{{$programs[0]->id}}">
|
|
141
|
+
|
142
|
142
|
<input type="checkbox" id="{{ $programs[0]->name }}" id="assoc_program_id_{{$programs[0]->id}}" name="program_id[]" value="{{$programs[0]->id}}" disabled checked>
|
143
|
143
|
<label for="{{ $programs[0]->name }}"> {{ $programs[0]->name }} [{{ $programs[0]->school->name }}]</label><br>
|
144
|
144
|
|
|
@@ -168,8 +168,8 @@
|
168
|
168
|
{{ Form::close() }}
|
169
|
169
|
|
170
|
170
|
<form action="/deleteObjective" method="POST" id='deleteObj'>
|
171
|
|
-
|
172
|
|
-
|
|
171
|
+
|
|
172
|
+
|
173
|
173
|
</form>
|
174
|
174
|
</div>
|
175
|
175
|
|
|
@@ -181,26 +181,24 @@
|
181
|
181
|
</div>
|
182
|
182
|
</div>
|
183
|
183
|
<script>
|
|
184
|
+ $('.filterSection').hide();
|
184
|
185
|
|
185
|
|
-$('.filterSection').hide();
|
186
|
|
-
|
187
|
|
- $('.filterButton').on('click', function()
|
188
|
|
-{
|
189
|
|
- var span = $(this).find('span');
|
190
|
|
- if(span.attr('class') == 'glyphicon glyphicon-plus'){
|
191
|
|
- span.attr('class','glyphicon glyphicon-minus');
|
192
|
|
- } else{
|
193
|
|
- span.attr('class','glyphicon glyphicon-plus');
|
194
|
|
-
|
195
|
|
- }
|
|
186
|
+ $('.filterButton').on('click', function() {
|
|
187
|
+ var span = $(this).find('span');
|
|
188
|
+ if (span.attr('class') == 'glyphicon glyphicon-plus') {
|
|
189
|
+ span.attr('class', 'glyphicon glyphicon-minus');
|
|
190
|
+ } else {
|
|
191
|
+ span.attr('class', 'glyphicon glyphicon-plus');
|
196
|
192
|
|
197
|
|
- $('.filterSection').toggle(533);
|
|
193
|
+ }
|
198
|
194
|
|
199
|
|
-});
|
|
195
|
+ $('.filterSection').toggle(533);
|
|
196
|
+
|
|
197
|
+ });
|
200
|
198
|
var outcomeHTML = document.getElementById('outcomeGroup').innerHTML;
|
201
|
199
|
var selectOptions = document.getElementById('outcome[0]').innerHTML;
|
202
|
200
|
var ran = false;
|
203
|
|
-
|
|
201
|
+
|
204
|
202
|
function fetchAllObjectives(program, outcome) {
|
205
|
203
|
var program_id_fetch = $('#' + program).find(':selected').val();
|
206
|
204
|
var outcome_fetch = $('#' + outcome).find(':selected').val();
|
|
@@ -433,15 +431,16 @@ $('.filterSection').hide();
|
433
|
431
|
'json'
|
434
|
432
|
);
|
435
|
433
|
}
|
436
|
|
-
|
|
434
|
+
|
437
|
435
|
|
438
|
436
|
function deleteLastAssoc() {
|
439
|
437
|
|
440
|
|
- div = document.getElementById('assocOutcomeForm' + (i).toString());
|
|
438
|
+ div = document.getElementById('assocOutcomeForm' + (counterAssoc - 1).toString());
|
441
|
439
|
div.remove();
|
442
|
|
- button = document.getElementById('closeAssoc' + (i).toString());
|
|
440
|
+ button = document.getElementById('closeAssoc' + (counterAssoc - 1).toString());
|
443
|
441
|
button.remove();
|
444
|
442
|
counterAssoc -= 1;
|
|
443
|
+ $('#counterAssoc').val(counterAssoc);
|
445
|
444
|
|
446
|
445
|
}
|
447
|
446
|
|
|
@@ -452,7 +451,8 @@ $('.filterSection').hide();
|
452
|
451
|
'class': "selectpicker form-control",
|
453
|
452
|
'name': "assoc_outcome[]",
|
454
|
453
|
'data-live-search': 'true',
|
455
|
|
- 'id': 'assoc_outcome' + counterAssoc.toString()
|
|
454
|
+ 'id': 'assoc_outcome' + counterAssoc.toString(),
|
|
455
|
+ 'onchange': 'fetchObjectiveForSelect("outcome' + counter + '", this.value, ' + counterAssoc + ')'
|
456
|
456
|
|
457
|
457
|
});
|
458
|
458
|
var $div = $('<div />', {
|
|
@@ -481,6 +481,8 @@ $('.filterSection').hide();
|
481
|
481
|
|
482
|
482
|
ran = true;
|
483
|
483
|
counterAssoc += 1;
|
|
484
|
+ $('#counterAssoc').val(counterAssoc);
|
|
485
|
+
|
484
|
486
|
|
485
|
487
|
|
486
|
488
|
}
|
|
@@ -502,7 +504,7 @@ fetchObjectiveForEditing();
|
502
|
504
|
// setCriterionStatus();
|
503
|
505
|
|
504
|
506
|
|
505
|
|
-
|
|
507
|
+
|
506
|
508
|
fetchAllObjectives("select-program", "assoc_outcomes_fetch")
|
507
|
509
|
|
508
|
510
|
|