@stop
@section('javascript')
// --------------------------------------------------------------------------
// Page load
// --------------------------------------------------------------------------
// Hide accordion panel contents by default
$('.panel-group .panel-body').hide();
$('#outcome-display').parent().hide();
fetchCriterionForEditing();
fetchObjectiveForSelect('outcome0', 'objectiveGroupFor0');
// setCriterionStatus();
fetchAllCriterion("select-program", "assoc_outcomes_fetch");
// --------------------------------------------------------------------------
// Functions
// --------------------------------------------------------------------------
$('#button-add-outcome').on('click', function(e) {
// Prevent the default action of the clicked item. In this case that is submit
e.preventDefault();
return false;
});
$('.filterButton').on('click', function(e) {
// Prevent the default action of the clicked item. In this case that is submit
e.preventDefault();
return false;
});
$('.button-add-objective-assoc').on('click', function(e) {
// Prevent the default action of the clicked item. In this case that is submit
e.preventDefault();
return false;
});
$('#button-add-outcome-assoc').on('click', function(e) {
// Prevent the default action of the clicked item. In this case that is submit
e.preventDefault();
return false;
});
$('.button-add-objective').on('click', function(e) {
// Prevent the default action of the clicked item. In this case that is submit
e.preventDefault();
return false;
});
// Fetch criterion info for editing
// --------------------------------------------------------------------------
// Events
// --------------------------------------------------------------------------
// When panel heading is clicked, toggle it
$('.panel-group .panel-heading').on('click', function()
{
$(this).next().stop().slideToggle();
})
//$('#outcome[0]').on('change', function(){
//$('.selectpicker').selectpicker('refresh');
//})
// When list item is clicked, load corresponding info
// When list item is clicked, load corresponding info
$('.selectpicker').on('change', function()
{
//alert($(this).find(':selected').val());
$('.selectpicker').selectpicker('refresh');
});
@stop