Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/show hide options #534

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions Phone/lang/pt-br.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"create_group" : "Criar Grupo",
"add_someone" : "Adicionar usuário",
"find_someone" : "Encontrar usuário...",
"refresh_registration" : "Atualizar Autenticação",
"add_someone" : "Adicionar contato",
"find_someone" : "Encontrar contato...",
"refresh_registration" : "Recarregar configurações",
"configure_extension" : "Configurar Ramal",
"auto_answer" : "Auto Atendimento",
"do_no_disturb" : "Não Perturbe",
Expand All @@ -20,7 +20,7 @@
"eg_internal_subscribe_extension" : "p. ex.: 100 ou john",
"mobile_number" : "Telefone Celular",
"eg_mobile_number" : "p. ex.: +55 11 99999 9999 ",
"eg_email" : "p. ex.: Keyla.James@innovateasterisk.com",
"eg_email" : "p. ex.: Keyla.James@innovateasterisk",
"contact_number_1" : "Número de Contato 1",
"eg_contact_number_1" : "eg: +55 11 3234 1567",
"contact_number_2" : "Número de Contato 2",
Expand All @@ -29,7 +29,7 @@
"cancel" : "Cancelar",
"save" : "Salvar",
"reload_required" : "Atualização Necessária",
"alert_settings" : "Para aplicar estas configurações, a página deve ser atualizada, OK?",
"alert_settings" : "Para aplicar estas configurações, o webphone deve ser recarregado, OK?",
"account" : "Conta",
"audio_video" : "Áudio e Video",
"appearance" : "Aparência",
Expand All @@ -53,7 +53,7 @@
"quality" : "Qualidade",
"image_orientation" : "Orientação da Imagem",
"image_orientation_normal" : "Normal",
"image_orientation_mirror" : "Espelho",
"image_orientation_mirror" : "Espelhado",
"aspect_ratio" : "Proporção",
"preview" : "Pré-visualização",
"ringtone" : "Tom de Chamada",
Expand All @@ -66,23 +66,23 @@
"permission" : "Permissão",
"error" : "Erro",
"alert_media_devices" : "MediaDevices está nulo - Verifique se sua conexão é segura (HTTPS)",
"alert_error_user_media" : "Erro obtendo Media do Usuário (User Media).",
"alert_file_size" : "O arquivo é maior que 50MB, você não pode fazer upload dele.",
"alert_error_user_media" : "Erro ao obter Mídia do Usuário (User Media).",
"alert_file_size" : "O arquivo é maior que 50MB, upload cancelado.",
"alert_single_file" : "Selecione um único arquivo",
"alert_not_found" : "Este item não foi encontrado",
"edit" : "Editar",
"welcome" : "Bem vindo",
"accept" : "Aceitar",
"registered" : "Autenticado",
"registered" : "Registrado",
"registration_failed" : "Autenticação Falhou",
"unregistered" : "Desautenticado, tchau!",
"unregistered" : "Não registrado",
"connected_to_web_socket" : "Conectado ao Web Socket!",
"disconnected_from_web_socket" : "Disconectado do Web Socket!",
"web_socket_error" : "Erro de Web Socket",
"disconnected_from_web_socket" : "Desconectado do Web Socket!",
"web_socket_error" : "Erro de conexão com Web Socket",
"connecting_to_web_socket" : "Conectando ao Web Socket...",
"error_connecting_web_socket" : "Erro ao conectar ao servidor na porta WebSocket",
"sending_registration" : "Enviando Autenticação...",
"unsubscribing" : "Desinscrevendo...",
"unsubscribing" : "Cancelando inscrição...",
"disconnecting" : "Desconectando...",
"incoming_call" : "Chamada recebida",
"incoming_call_from" : "Chamada recebida de:",
Expand All @@ -96,7 +96,7 @@
"trying" : "Discando...",
"ringing" : "Chamando...",
"call_cancelled" : "Chamada Cancelada",
"call_ended" : "Chamada encerrada, tchau!",
"call_ended" : "Chamada encerrada!",
"yes" : "Sim",
"no" : "Não",
"receive_kilobits_per_second" : "Kilobits Recebidos por segundo",
Expand Down Expand Up @@ -144,7 +144,7 @@
"conference_call_ended" : "Conferência encerrada",
"conference_call_rejected" : "Conferência rejeitada",
"conference_call_terminated" : "Conferência terminada",
"null_session" : "Erro de sessão, Null",
"null_session" : "Erro de sessão nula",
"call_on_hold" : "Chamada em espera",
"send_dtmf" : "Enviar DTMF",
"switching_video_source" : "Alternando a fonte de vídeo",
Expand All @@ -165,7 +165,7 @@
"blank" : "Vazio",
"show_key_pad" : "Exibir teclado numérico",
"mute" : "Mudo",
"unmute" : "Desmutado",
"unmute" : "Mudo Inativado",
"start_call_recording" : "Iniciar gravação de chamada",
"stop_call_recording" : "Interromper gravação de chamada",
"transfer_call" : "Transferir Chamada",
Expand Down
30 changes: 20 additions & 10 deletions Phone/phone.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ let EnableRingtone = (getDbItem("EnableRingtone", "1") == "1");
let MaxBuddies = parseInt(getDbItem("MaxBuddies", 999)); // Sets the Maximum number of buddies the system will accept. Older ones get deleted. (Considered when(after) adding buddies)
let MaxBuddyAge = parseInt(getDbItem("MaxBuddyAge", 365)); // Sets the Maximum age in days (by latest activity). Older ones get deleted. (Considered when(after) adding buddies)
let AutoDeleteDefault = (getDbItem("AutoDeleteDefault", "1") == "1"); // For automatically created buddies (inbound and outbound), should the buddy be set to AutoDelete.
let EnableDoNotDisturb = (getDbItem("EnableDoNotDisturb", "1") == "1"); // Controls the visibility of the DND button
let EnableRecordAllCalls = (getDbItem("EnableRecordAllCalls", "1") == "1"); // Controls the visibility of the Recording Call button

let ChatEngine = getDbItem("ChatEngine", "SIMPLE"); // Select the chat engine XMPP | SIMPLE

Expand Down Expand Up @@ -588,6 +590,8 @@ $(document).ready(function () {
if(options.EnableTextExpressions !== undefined) EnableTextExpressions = options.EnableTextExpressions;
if(options.EnableTextDictate !== undefined) EnableTextDictate = options.EnableTextDictate;
if(options.EnableRingtone !== undefined) EnableRingtone = options.EnableRingtone;
if(options.EnableDoNotDisturb !== undefined) EnableDoNotDisturb = options.EnableDoNotDisturb;
if(options.EnableRecordAllCalls !== undefined) EnableRecordAllCalls = options.EnableRecordAllCalls;
if(options.MaxBuddies !== undefined) MaxBuddies = options.MaxBuddies;
if(options.MaxBuddyAge !== undefined) MaxBuddyAge = options.MaxBuddyAge;
if(options.ChatEngine !== undefined) ChatEngine = options.ChatEngine;
Expand Down Expand Up @@ -1782,23 +1786,29 @@ function ShowMyProfileMenu(obj){
else {
items.push({ icon: "fa fa-phone", text: lang.auto_answer, value: 5});
}
if(DoNotDisturbEnabled == true){
items.push({ icon: "fa fa-ban", text: lang.do_no_disturb + enabledHtml, value: 6});
}
else {
items.push({ icon: "fa fa-ban", text: lang.do_no_disturb, value: 6});

if (EnableDoNotDisturb == true) {
if(DoNotDisturbEnabled == true){
items.push({ icon: "fa fa-ban", text: lang.do_no_disturb + enabledHtml, value: 6});
}
else {
items.push({ icon: "fa fa-ban", text: lang.do_no_disturb, value: 6});
}
}

if(CallWaitingEnabled == true){
items.push({ icon: "fa fa-volume-control-phone", text: lang.call_waiting + enabledHtml, value: 7});
}
else {
items.push({ icon: "fa fa-volume-control-phone", text: lang.call_waiting, value: 7});
}
if(RecordAllCalls == true){
items.push({ icon: "fa fa-dot-circle-o", text: lang.record_all_calls + enabledHtml, value: 8});
}
else {
items.push({ icon: "fa fa-dot-circle-o", text: lang.record_all_calls, value: 8});

if (EnableRecordAllCalls == true) {
if (RecordAllCalls == true) {
items.push({icon: "fa fa-dot-circle-o", text: lang.record_all_calls + enabledHtml, value: 8});
} else {
items.push({icon: "fa fa-dot-circle-o", text: lang.record_all_calls, value: 8});
}
}

if(ChatEngine == "XMPP") {
Expand Down