CC-3246: Hardware audio output cannot be switched off
- fixed
This commit is contained in:
parent
a24310e690
commit
c82394b7a0
airtime_mvc
application
public/js/airtime/preferences
|
@ -194,7 +194,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
if($form->isValid($post_data)){
|
||||
if(Application_Model_Preference::GetPlanLevel() == 'disabled'){// && $form->isValid($post_data['output_sound_device'])){
|
||||
if(Application_Model_Preference::GetPlanLevel() == 'disabled'){
|
||||
$values['output_sound_device'] = $form->getValue('output_sound_device');
|
||||
}
|
||||
|
||||
|
|
|
@ -68,9 +68,15 @@ class Application_Form_StreamSetting extends Zend_Form
|
|||
}
|
||||
|
||||
public function isValid($data){
|
||||
if($data['output_sound_device']){
|
||||
$this->populate(array("output_sound_device"=>$data['output_sound_device'], "icecast_vorbis_metadata"=>$data['icecast_vorbis_metadata'],
|
||||
"output_sound_device_type"=>$data['output_sound_device_type'], "streamFormat"=>$data['streamFormat']));
|
||||
if(isset($data['output_sound_device'])){
|
||||
$d = array();
|
||||
$d["output_sound_device"] = $data['output_sound_device'];
|
||||
$d["icecast_vorbis_metadata"] = $data['icecast_vorbis_metadata'];
|
||||
if(isset($data['output_sound_device_type'])){
|
||||
$d["output_sound_device_type"] = $data['output_sound_device_type'];
|
||||
}
|
||||
$d["streamFormat"] = $data['streamFormat'];
|
||||
$this->populate($d);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -125,6 +125,12 @@ $(document).ready(function() {
|
|||
rebuildStreamURL($(this))
|
||||
})
|
||||
|
||||
if(!$("#output_sound_device").is(':checked')){
|
||||
$("select[id=output_sound_device_type]").attr('disabled', 'disabled')
|
||||
}else{
|
||||
$("select[id=output_sound_device_type]").removeAttr('disabled')
|
||||
}
|
||||
|
||||
$("#output_sound_device").change(function(){
|
||||
if($(this).is(':checked')){
|
||||
$("select[id=output_sound_device_type]").removeAttr('disabled')
|
||||
|
|
Loading…
Reference in New Issue