Merge pull request #1186 from nextcloud/stable10-backport1178
[stable10] Theming: Show loading spinner while uploading files
This commit is contained in:
commit
a2a17fc5d7
|
@ -9,12 +9,13 @@
|
||||||
#theming .theme-undo {
|
#theming .theme-undo {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
padding: 9px;
|
padding: 11px 5px;
|
||||||
vertical-align: bottom;
|
vertical-align: top;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
#theming .icon {
|
#theming .icon-loading-small:after {
|
||||||
display: inline-block;
|
margin: -10px 0 0 -10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#theming label span {
|
#theming label span {
|
||||||
|
@ -23,10 +24,11 @@
|
||||||
padding: 8px 0px;
|
padding: 8px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#theming .icon-upload {
|
#theming .icon-upload,
|
||||||
|
#theming .icon-loading-small {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
margin: 0;
|
margin: 2px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#theming_settings_msg {
|
div#theming_settings_msg {
|
||||||
|
|
|
@ -112,12 +112,15 @@ $(document).ready(function () {
|
||||||
done: function (e, response) {
|
done: function (e, response) {
|
||||||
preview('logoMime', response.result.data.name);
|
preview('logoMime', response.result.data.name);
|
||||||
OC.msg.finishedSaving('#theming_settings_msg', response.result);
|
OC.msg.finishedSaving('#theming_settings_msg', response.result);
|
||||||
|
$('label#uploadlogo').addClass('icon-upload').removeClass('icon-loading-small');
|
||||||
},
|
},
|
||||||
submit: function(e, response) {
|
submit: function(e, response) {
|
||||||
OC.msg.startSaving('#theming_settings_msg');
|
OC.msg.startSaving('#theming_settings_msg');
|
||||||
|
$('label#uploadlogo').removeClass('icon-upload').addClass('icon-loading-small');
|
||||||
},
|
},
|
||||||
fail: function (e, response){
|
fail: function (e, response){
|
||||||
OC.msg.finishedError('#theming_settings_msg', response._response.jqXHR.responseJSON.data.message);
|
OC.msg.finishedError('#theming_settings_msg', response._response.jqXHR.responseJSON.data.message);
|
||||||
|
$('label#uploadlogo').addClass('icon-upload').removeClass('icon-loading-small');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var uploadParamsLogin = {
|
var uploadParamsLogin = {
|
||||||
|
@ -126,11 +129,14 @@ $(document).ready(function () {
|
||||||
done: function (e, response) {
|
done: function (e, response) {
|
||||||
preview('backgroundMime', response.result.data.name);
|
preview('backgroundMime', response.result.data.name);
|
||||||
OC.msg.finishedSaving('#theming_settings_msg', response.result);
|
OC.msg.finishedSaving('#theming_settings_msg', response.result);
|
||||||
|
$('label#upload-login-background').addClass('icon-upload').removeClass('icon-loading-small');
|
||||||
},
|
},
|
||||||
submit: function(e, response) {
|
submit: function(e, response) {
|
||||||
OC.msg.startSaving('#theming_settings_msg');
|
OC.msg.startSaving('#theming_settings_msg');
|
||||||
|
$('label#upload-login-background').removeClass('icon-upload').addClass('icon-loading-small');
|
||||||
},
|
},
|
||||||
fail: function (e, response){
|
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);
|
OC.msg.finishedError('#theming_settings_msg', response._response.jqXHR.responseJSON.data.message);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue