Merge pull request #1186 from nextcloud/stable10-backport1178

[stable10] Theming: Show loading spinner while uploading files
This commit is contained in:
Roeland Jago Douma 2016-08-30 13:02:14 +02:00 committed by GitHub
commit a2a17fc5d7
2 changed files with 14 additions and 6 deletions

View File

@ -9,12 +9,13 @@
#theming .theme-undo {
cursor: pointer;
opacity: .5;
padding: 9px;
vertical-align: bottom;
padding: 11px 5px;
vertical-align: top;
display: inline-block;
}
#theming .icon {
display: inline-block;
#theming .icon-loading-small:after {
margin: -10px 0 0 -10px;
}
#theming label span {
@ -23,10 +24,11 @@
padding: 8px 0px;
}
#theming .icon-upload {
#theming .icon-upload,
#theming .icon-loading-small {
display: inline-flex;
padding: 8px;
margin: 0;
margin: 2px 0px;
}
div#theming_settings_msg {

View File

@ -112,12 +112,15 @@ $(document).ready(function () {
done: function (e, response) {
preview('logoMime', response.result.data.name);
OC.msg.finishedSaving('#theming_settings_msg', response.result);
$('label#uploadlogo').addClass('icon-upload').removeClass('icon-loading-small');
},
submit: function(e, response) {
OC.msg.startSaving('#theming_settings_msg');
$('label#uploadlogo').removeClass('icon-upload').addClass('icon-loading-small');
},
fail: function (e, response){
OC.msg.finishedError('#theming_settings_msg', response._response.jqXHR.responseJSON.data.message);
$('label#uploadlogo').addClass('icon-upload').removeClass('icon-loading-small');
}
};
var uploadParamsLogin = {
@ -126,11 +129,14 @@ $(document).ready(function () {
done: function (e, response) {
preview('backgroundMime', response.result.data.name);
OC.msg.finishedSaving('#theming_settings_msg', response.result);
$('label#upload-login-background').addClass('icon-upload').removeClass('icon-loading-small');
},
submit: function(e, response) {
OC.msg.startSaving('#theming_settings_msg');
$('label#upload-login-background').removeClass('icon-upload').addClass('icon-loading-small');
},
fail: function (e, response){
$('label#upload-login-background').removeClass('icon-loading-small').addClass('icon-upload');
OC.msg.finishedError('#theming_settings_msg', response._response.jqXHR.responseJSON.data.message);
}
};