adding spinner while talking to the backend

This commit is contained in:
Thomas Mueller 2013-02-12 23:27:31 +01:00
parent a814361ca7
commit 010c4c2891
2 changed files with 7 additions and 2 deletions

View File

@ -2,6 +2,7 @@ td.status>span { display:inline-block; height:16px; width:16px; }
span.success { background-image: url('../img/success.png'); background-repeat:no-repeat; }
span.error { background-image: url('../img/error.png'); background-repeat:no-repeat; }
span.waiting { background-image: url('../img/waiting.png'); background-repeat:no-repeat; }
span.pending { background-image: url('%webroot%/core/img/loading.gif'); background-repeat:no-repeat; }
td.mountPoint, td.backend { width:10em; }
td.remove>img { visibility:hidden; padding-top:0.8em; }
tr:hover>td.remove>img { visibility:visible; cursor:pointer; }

View File

@ -58,6 +58,8 @@ OC.MountConfig={
}
users.push(applicable);
}
statusSpan.removeClass();
statusSpan.addClass('pending');
$.ajax({type: 'POST',
url: OC.filePath('files_external', 'ajax', 'addMountPoint.php'),
data: {
@ -68,7 +70,7 @@ OC.MountConfig={
applicable: applicable,
isPersonal: isPersonal
},
async: false,
async: true,
success: function(result) {
statusSpan.removeClass();
if (result && result.status == 'success' && result.data.message) {
@ -116,6 +118,8 @@ OC.MountConfig={
var isPersonal = true;
var mountType = 'user';
var applicable = OC.currentUser;
statusSpan.removeClass();
statusSpan.addClass('pending');
$.ajax({type: 'POST',
url: OC.filePath('files_external', 'ajax', 'addMountPoint.php'),
data: {
@ -126,7 +130,7 @@ OC.MountConfig={
applicable: applicable,
isPersonal: isPersonal
},
async: false,
async: true,
success: function(result) {
statusSpan.removeClass();
if (result && result.status == 'success' && result.data.message) {