X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftemplates%2Fsettings.tpl;h=c3852845701ea8ad9d225b08e5d6be9b69e8ade5;hb=1d0cb0f7d21504f00afe197aea482839ddd56cf6;hp=26c44f91c35803ac0f24126cf63452a59e075151;hpb=6eebfb2e137117fa82fcae4b5755863111b509fe;p=friendica.git diff --git a/view/templates/settings.tpl b/view/templates/settings.tpl index 26c44f91c3..c385284570 100644 --- a/view/templates/settings.tpl +++ b/view/templates/settings.tpl @@ -27,6 +27,7 @@ {{include file="field_input.tpl" field=$email}} {{include file="field_password.tpl" field=$password4}} {{include file="field_custom.tpl" field=$timezone}} +{{include file="field_select.tpl" field=$language}} {{include file="field_input.tpl" field=$defloc}} {{include file="field_checkbox.tpl" field=$allowloc}} @@ -147,7 +148,7 @@ (function(){ var elm = $("#id_{{$desktop_notifications.0}}_onoff"); var ckbox = $("#id_{{$desktop_notifications.0}}"); - + if (getNotificationPermission() === 'granted') { ckbox.val(1); elm.find(".off").addClass("hidden"); @@ -156,18 +157,18 @@ if (getNotificationPermission() === null) { elm.parent(".field.yesno").hide(); } - + $("#id_{{$desktop_notifications.0}}_onoff").on("click", function(e){ - + if (Notification.permission === 'granted') { localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied'); } else if (Notification.permission === 'denied') { localStorage.setItem('notification-permissions', 'denied'); - + ckbox.val(0); elm.find(".on").addClass("hidden"); elm.find(".off").removeClass("hidden"); - + } else if (Notification.permission === 'default') { Notification.requestPermission(function(choice) { if (choice === 'granted') { @@ -181,10 +182,10 @@ } }); } - + //console.log(getNotificationPermission()); - - + + }) })();