Browse Source
show locale example and apply new locale right away
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
pull/5623/head
Georg Ehrke
8 years ago
No known key found for this signature in database
GPG Key ID: 9D98FD9380A1CB43
3 changed files with
18 additions and
1 deletions
-
settings/css/settings.scss
-
settings/js/settings/personalInfo.js
-
settings/templates/settings/personal/personal.info.php
|
|
|
@ -124,6 +124,10 @@ select { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#localeexample { |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
|
|
|
|
input { |
|
|
|
&#pass1, |
|
|
|
&#pass2, |
|
|
|
|
|
|
|
@ -312,7 +312,7 @@ $(document).ready(function () { |
|
|
|
value: selectedLocale |
|
|
|
}, |
|
|
|
success: function() { |
|
|
|
location.reload(); |
|
|
|
moment.locale(selectedLocale); |
|
|
|
}, |
|
|
|
fail: function() { |
|
|
|
OC.Notification.showTemporary(t('settings', 'An error occured while changing your locale. Please reload the page and try again.')); |
|
|
|
@ -441,4 +441,12 @@ $(document).ready(function () { |
|
|
|
}, user.displayName); |
|
|
|
}); |
|
|
|
|
|
|
|
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: moment().weekday(0).format('dddd')})); |
|
|
|
|
|
|
|
}, 1000); |
|
|
|
|
|
|
|
OC.Settings.updateAvatar = updateAvatar; |
|
|
|
@ -366,6 +366,11 @@ vendor_style('jcrop/css/jquery.Jcrop'); |
|
|
|
</option> |
|
|
|
<?php endforeach;?>
|
|
|
|
</select> |
|
|
|
<div id="localeexample"> |
|
|
|
<p id="localeexample-time"></p> |
|
|
|
<p id="localeexample-date"></p> |
|
|
|
<p id="localeexample-fdow"></p> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
<?php } ?>
|
|
|
|
</div> |
|
|
|
|