adding spinner while talking to the backend
This commit is contained in:
parent
a814361ca7
commit
010c4c2891
2 changed files with 7 additions and 2 deletions
|
@ -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; }
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue