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 {
|
input {
|
||||||
&#pass1,
|
&#pass1,
|
||||||
&#pass2,
|
&#pass2,
|
||||||
|
|
|
@ -312,7 +312,7 @@ $(document).ready(function () {
|
||||||
value: selectedLocale
|
value: selectedLocale
|
||||||
},
|
},
|
||||||
success: function() {
|
success: function() {
|
||||||
location.reload();
|
moment.locale(selectedLocale);
|
||||||
},
|
},
|
||||||
fail: function() {
|
fail: function() {
|
||||||
OC.Notification.showTemporary(t('settings', 'An error occured while changing your locale. Please reload the page and try again.'));
|
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);
|
}, 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;
|
OC.Settings.updateAvatar = updateAvatar;
|
||||||
|
|
|
@ -366,6 +366,11 @@ vendor_style('jcrop/css/jquery.Jcrop');
|
||||||
</option>
|
</option>
|
||||||
<?php endforeach;?>
|
<?php endforeach;?>
|
||||||
</select>
|
</select>
|
||||||
|
<div id="localeexample">
|
||||||
|
<p id="localeexample-time"></p>
|
||||||
|
<p id="localeexample-date"></p>
|
||||||
|
<p id="localeexample-fdow"></p>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue