@ -369,7 +369,7 @@ if ($renderizar) { ?>
GrvAudita($dbcon, $idProg, 'pbx_sip_ramais', 'INS', array(), $novo, $fields, array('id'), true);
InsereRotasRamais($dbcon, $rotas, $nome2);
InsereRamaisChf($dbcon, $nome2);
InsereRamaisChf($dbcon, $nome2, $org_id );
if ($sigame_interno == '') {
$sigame_interno2 = 'F';
@ -465,7 +465,7 @@ if ($renderizar) { ?>
GrvAudita($dbcon, $idProg, 'pbx_sip_ramais', 'UPD', $velho, $novo, $filds, array('id'), true);
InsereRotasRamais($dbcon, $rotas, $nome);
InsereRamaisChf($dbcon, $nome);
InsereRamaisChf($dbcon, $nome, $org_id );
if ($inseri_voice == 0) {
if (($v_nome != '') || ($v_email != '')) {
@ -700,11 +700,11 @@ if ($renderizar) { ?>
[
'titulo' => '',
'classes' => 'normal',
'tipo' => 'normal ',
'tipo' => 'titulo ',
'props' => [
[
'type' => 'radio',
'name' => 'tipoRota[' . [ $idRota] . ']',
'name' => 'tipoRota[' . $idRota . ']',
'class' => 'tipoRotaSim',
'value' => '1;' . $idRota,
'checked' => ($tipoAcesso == 1) ? true : false,
@ -714,11 +714,11 @@ if ($renderizar) { ?>
[
'titulo' => '',
'classes' => 'normal',
'tipo' => 'normal ',
'tipo' => 'titulo ',
'props' => [
[
'type' => 'radio',
'name' => 'tipoRota[' . [ $idRota] . ']',
'name' => 'tipoRota[' . $idRota . ']',
'class' => 'tipoRotaNao',
'value' => '0;' . $idRota,
'checked' => ($tipoAcesso == 0) ? true : false,
@ -728,11 +728,11 @@ if ($renderizar) { ?>
[
'titulo' => '',
'classes' => 'normal',
'tipo' => 'normal ',
'tipo' => 'titulo ',
'props' => [
[
'type' => 'radio',
'name' => 'tipoRota[' . [ $idRota] . ']',
'name' => 'tipoRota[' . $idRota . ']',
'class' => 'tipoRotaSenha',
'value' => '2;' . $idRota,
'checked' => ($tipoAcesso == 2) ? true : false,
@ -742,11 +742,11 @@ if ($renderizar) { ?>
[
'titulo' => '',
'classes' => 'normal',
'tipo' => 'normal ',
'tipo' => 'titulo ',
'props' => [
[
'type' => 'radio',
'name' => 'tipoRota[' . [ $idRota] . ']',
'name' => 'tipoRota[' . $idRota . ']',
'class' => 'tipoRotaAgente',
'value' => '3;' . $idRota,
'checked' => ($tipoAcesso == 3) ? true : false,
@ -831,7 +831,7 @@ if ($renderizar) { ?>
$optionsChefeSecretaria = [];
while ($dados5 = pg_fetch_array($result5)) {
$excecao = $dados5[0 ];
$excecao = $dados5[1 ];
$optionsChefeSecretaria[$excecao] = [
'label' => $excecao,
'attributes' => [],
@ -1022,7 +1022,7 @@ if ($renderizar) { ?>
'type' => 'number',
'min' => '0',
'step' => 'any',
'class' => 'validate[required,custom[onlyNumber],length[0,100]] ',
'required' => 'required ',
'id' => 'qtde2',
'value' => '1',
'size' => '5',
@ -1362,7 +1362,6 @@ if ($renderizar) { ?>
[
'name' => 'dispositivo',
'type' => 'text',
'class' => 'validate[optional,length[0,100]]',
'id' => 'dispositivo2',
'value' => ($acao == 'edita') ? $dispositivo : null,
'size' => '20',
@ -1389,7 +1388,6 @@ if ($renderizar) { ?>
'size' => '20',
'maxlength' => '20',
'pattern' => '\d+',
'required' => 'optional',
]
]
],
@ -1406,7 +1404,6 @@ if ($renderizar) { ?>
'size' => '20',
'maxlength' => '20',
'pattern' => '\d+',
'required' => 'optional',
]
]
]
@ -1425,11 +1422,10 @@ if ($renderizar) { ?>
'name' => 'sigame_nao_atende',
'type' => 'text',
'id' => 'sigame_nao_atende2',
'value' => ($acao == 'edita' ) ? $sigame_naoatende : null,
'value' => ($acao == "edita" ) ? $sigame_naoatende : null,
'size' => '20',
'maxlength' => '20',
'pattern' => '\d+',
'required' => 'optional',
]
]
],
@ -1442,11 +1438,10 @@ if ($renderizar) { ?>
'name' => 'sigame_ocupado',
'type' => 'text',
'id' => 'sigame_ocupado2',
'value' => ($acao == 'edita' ) ? $sigame_ocupado : null,
'value' => ($acao == "edita" ) ? $sigame_ocupado : null,
'size' => '20',
'maxlength' => '20',
'pattern' => '\d+',
'required' => 'optional',
]
]
],
@ -1528,7 +1523,7 @@ if ($renderizar) { ?>
'type' => 'checkbox',
'id' => 'gravacao_saida',
'value' => 'V',
'checked' => ($gravacao_saida == 'V' ) ? true : false,
'checked' => ($gravacao_saida == "V" ) ? true : false,
]
]
],
@ -1541,10 +1536,9 @@ if ($renderizar) { ?>
'name' => 'timeout',
'type' => 'text',
'id' => 'timeout',
'value' => ($acao == 'edita' ) ? $timeout : null,
'value' => ($acao == "edita" ) ? $timeout : null,
'size' => '10',
'maxlength' => '10',
'required' => 'optional',
'pattern' => '\d+',
]
]
@ -1589,7 +1583,6 @@ if ($renderizar) { ?>
[
'name' => 'v_numero',
'type' => 'text',
'required' => 'optional',
'id' => 'v_numero',
'value' => ($inseri_voice == 0) ? $v_numero : null,
'size' => '15',
@ -1604,7 +1597,6 @@ if ($renderizar) { ?>
[
'name' => 'v_nome',
'type' => 'text',
'required' => 'optional',
'id' => 'v_nome',
'value' => ($inseri_voice == 0) ? $v_nome : null,
'size' => '30',
@ -1619,7 +1611,6 @@ if ($renderizar) { ?>
[
'name' => 'v_senha',
'type' => 'password',
'required' => 'optional',
'id' => 'v_senha',
'value' => ($inseri_voice == 0) ? $v_senha : null,
'size' => '10',
@ -1641,9 +1632,8 @@ if ($renderizar) { ?>
'name' => 'v_email',
'autocomplete' => 'off',
'type' => 'text',
'required' => 'optional',
'id' => 'v_email3',
'value' => ($acao == 'edita' ) ? $v_email : null,
'value' => ($acao == "edita" ) ? $v_email : null,
'size' => '30',
]
]
@ -1658,7 +1648,7 @@ if ($renderizar) { ?>
'type' => 'checkbox',
'id' => 'envelope',
'value' => 'yes',
'checked' => (($inseri_voice == 0) & & ($envelope == 'yes' )) || ($inseri_voice != 0) ? true : false,
'checked' => (($inseri_voice == 0) & & ($envelope == "yes" )) || ($inseri_voice != 0) ? true : false,
]
]
],
@ -1672,7 +1662,7 @@ if ($renderizar) { ?>
'type' => 'checkbox',
'id' => 'attach',
'value' => 'yes',
'checked' => (($inseri_voice == 0) & & ($attach == 'yes' )) || ($inseri_voice != 0) ? true : false,
'checked' => (($inseri_voice == 0) & & ($attach == "yes" )) || ($inseri_voice != 0) ? true : false,
]
]
],
@ -1693,7 +1683,7 @@ if ($renderizar) { ?>
'type' => 'checkbox',
'id' => 'saycid',
'value' => 'yes',
'checked' => (($inseri_voice == 0) & & ($saycid == 'yes' )) || ($inseri_voice != 0) ? true : false,
'checked' => (($inseri_voice == 0) & & ($saycid == "yes" )) || ($inseri_voice != 0) ? true : false,
]
]
],
@ -1707,7 +1697,7 @@ if ($renderizar) { ?>
'type' => 'checkbox',
'id' => 'delete',
'value' => 'yes',
'checked' => (($inseri_voice == 0) & & ($delete == 'yes' )) || ($inseri_voice != 0) ? true : false,
'checked' => (($inseri_voice == 0) & & ($delete == "yes" )) || ($inseri_voice != 0) ? true : false,
]
]
],
@ -1799,6 +1789,10 @@ if ($renderizar) { ?>
'div-collapse-id' => 'collapseChefeSec',
'conteudo' => [
[
'abrir-div' => [
'class' => '',
'style' => 'margin-top: 35px;',
],
'titulo' => 'Ramal Secretária',
'tipo' => 'normal',
'classes' => 'toggle',
@ -1807,11 +1801,12 @@ if ($renderizar) { ?>
'name' => 'ramalSecretaria',
'type' => 'text',
'id' => 'ramalSecretaria',
'value' => ($acao == 'edita' ) ? $ramalSecretaria : null,
'value' => ($acao == "edita" ) ? $ramalSecretaria : null,
]
]
],
[
'fechar-div' => 'teste',
'titulo' => 'Exeções',
'classes' => 'toggle',
'tipo' => 'normal',
@ -1833,11 +1828,13 @@ if ($renderizar) { ?>
'name' => 'btIncluirRamalExecao',
'onClick' => 'incExcecao();',
'style' => 'cursor:pointer',
'value' => '& gt',
],
[
'name' => 'btExcluirExcessao',
'onClick' => 'remExcecao();',
'style' => 'cursor:pointer',
'value' => '& lt',
]
]
],
@ -1894,57 +1891,49 @@ if ($renderizar) { ?>
document.getElementById('marcaTodos').checked = 'checked';
}
function LimpaImagem() {
$('#imgSim').attr("src", "imgSite/bullet-link-active.gif");
$('#imgNao').attr("src", "imgSite/bullet-link-active.gif");
$('#imgSenha').attr("src", "imgSite/bullet-link-active.gif");
$('#imgAgente').attr("src", "imgSite/bullet-link-active.gif");
}
$("#simCheck").mouseover(function() {
$(this).css("cursor", "pointer");
});
$("#naoCheck").mouseover(function() {
$(this).css("cursor", "pointer");
});
$("#senhaCheck").mouseover(function() {
$(this).css("cursor", "pointer");
});
$("#agenteCheck").mouseover(function() {
$(this).css("cursor", "pointer");
});
document.addEventListener('DOMContentLoaded', function() {
var simCheck = document.getElementById('simCheck');
$(document).ready( function() {
$('#simCheck').click(function() {
$('.tipoRotaSim').attr("checked", true);
LimpaImagem() ;
$('#imgSim').attr("src", "imgSite/bullet-link-hover.gif");
simCheck.addEventListener('click', function() {
var tipoRotaSim = document.querySelectorAll('.tipoRotaSim');
for (var i = 0; i < tipoRotaSim.length ; i + + ) {
tipoRotaSim[i].checked = true;
}
});
});
$(document).ready(function() {
$('#naoCheck').click(function() {
$('.tipoRotaNao').attr("checked", true);
LimpaImagem();
$('#imgNao').attr("src", "imgSite/bullet-link-hover.gif");
});
document.addEventListener('DOMContentLoaded', function() {
var naoCheck = document.getElementById('naoCheck');
naoCheck.addEventListener('click', function() {
var tipoRotaNao = document.querySelectorAll('.tipoRotaNao');
for (var i = 0; i < tipoRotaNao.length ; i + + ) {
tipoRotaNao[i].checked = true;
}
})
});
$(document).ready(function() {
$('#senhaCheck').click(function() {
$('.tipoRotaSenha').attr("checked", true);
LimpaImagem();
$('#imgSenha').attr("src", "imgSite/bullet-link-hover.gif");
});
document.addEventListener('DOMContentLoaded', function() {
var senhaCheck = document.getElementById('senhaCheck');
senhaCheck.addEventListener('click', function() {
var tipoRotaSenha = document.querySelectorAll('.tipoRotaSenha');
for (var i = 0; i < tipoRotaSenha.length ; i + + ) {
tipoRotaSenha[i].checked = true;
}
})
});
$(document).ready(function() {
$('#agenteCheck').click(function() {
$('.tipoRotaAgente').attr("checked", true);
LimpaImagem();
$('#imgAgente').attr("src", "imgSite/bullet-link-hover.gif");
});
})
document.addEventListener('DOMContentLoaded', function() {
var agenteCheck = document.getElementById('agenteCheck');
agenteCheck.addEventListener('click', function() {
var tipoRotaAgente = document.querySelectorAll('.tipoRotaAgente');
for (var i = 0; i < tipoRotaAgente.length ; i + + ) {
tipoRotaAgente[i].checked = true;
}
})
});
< / script >
< / body >