show locale example and apply new locale right away
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
parent
fd41192bb4
commit
0cacdd3132
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue