diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-08-11 05:54:08 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-09-16 19:02:18 +0000 |
commit | f922b2fd7072ace8211467e3627f2a44a5c09fe3 (patch) | |
tree | d218fb323c4445659576a70a5cfc8ea7af149a79 /apps/settings/js | |
parent | b9c002df0a3ab80c1612206cfb1f724d90e0da3a (diff) | |
download | nextcloud-server-f922b2fd7072ace8211467e3627f2a44a5c09fe3.tar.gz nextcloud-server-f922b2fd7072ace8211467e3627f2a44a5c09fe3.zip |
Remake locale saving with Vue
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/settings/js')
-rw-r--r-- | apps/settings/js/settings/personalInfo.js | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/apps/settings/js/settings/personalInfo.js b/apps/settings/js/settings/personalInfo.js index 4309b462e47..fa4b39ce1b9 100644 --- a/apps/settings/js/settings/personalInfo.js +++ b/apps/settings/js/settings/personalInfo.js @@ -108,62 +108,4 @@ window.addEventListener('DOMContentLoaded', function () { }); federationSettingsView.render(); - - var updateLanguage = function () { - if (OC.PasswordConfirmation.requiresPasswordConfirmation()) { - OC.PasswordConfirmation.requirePasswordConfirmation(updateLanguage); - return; - } - - var selectedLang = $("#languageinput").val(), - user = OC.getCurrentUser(); - - $.ajax({ - url: OC.linkToOCS('cloud/users', 2) + user['uid'], - method: 'PUT', - data: { - key: 'language', - value: selectedLang - }, - success: function() { - location.reload(); - }, - fail: function() { - OC.Notification.showTemporary(t('settings', 'An error occurred while changing your language. Please reload the page and try again.')); - } - }); - }; - $("#languageinput").change(updateLanguage); - - var updateLocale = function () { - if (OC.PasswordConfirmation.requiresPasswordConfirmation()) { - OC.PasswordConfirmation.requirePasswordConfirmation(updateLocale); - return; - } - - var selectedLocale = $("#localeinput").val(), - user = OC.getCurrentUser(); - - $.ajax({ - url: OC.linkToOCS('cloud/users', 2) + user.uid, - method: 'PUT', - data: { - key: 'locale', - value: selectedLocale - }, - success: function() { - moment.locale(selectedLocale); - }, - fail: function() { - OC.Notification.showTemporary(t('settings', 'An error occurred while changing your locale. Please reload the page and try again.')); - } - }); - }; - $("#localeinput").change(updateLocale); }); - -window.setInterval(function() { - $('#localeexample-time').text(moment().format('LTS')) - $('#localeexample-date').text(moment().format('L')) - $('#localeexample-fdow').text(t('settings', 'Week starts on {fdow}', { fdow: dayNames[firstDay] })) -}, 1000) |