Created
December 21, 2012 04:13
-
-
Save sbrisko/4350623 to your computer and use it in GitHub Desktop.
manage output info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ManageOutputInformation(event) { | |
// this was only being called on stream change, now being triggered on any output change | |
var selection = $(this).val(); | |
var parent = $(this).parents('.live_output_settings'); | |
var id = selection.replace(/.*_(\d+)$/, "$1"); | |
// STREAM | |
var stream_controllers = ['channels', 'channel_profiles', 'stream_jobs', 'stream_job_profiles']; | |
if (stream_controllers.indexOf(page.controller) >= 0) { | |
ToggleOutputDependencies(parent,selection); | |
SetOutputDestructionStatus(selection,parent); | |
} | |
else { | |
// LIVE | |
// get the output object associated with the output and check to see if it current has a preset id | |
var output_object = GlobalOutputGroupsManager.find_output_by_id(parent.attr('id')); | |
if(!_.isNull(output_object.get_preset_id())){ | |
if($(this).data('changeable') !== true){ | |
$(document).trigger('output_settings_change',[output_object]); | |
} | |
} | |
// only call these if the input was from the stream selector of the output | |
if($(this).hasClass('content_source_select')) { | |
SetOutputStreamData(id,parent); | |
// SetOutputDestructionStatus(selection,parent); | |
ToggleStreamDependencies(id); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment