adding spinner while talking to the backend
This commit is contained in:
parent
a814361ca7
commit
010c4c2891
|
@ -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.success { background-image: url('../img/success.png'); background-repeat:no-repeat; }
|
||||||
span.error { background-image: url('../img/error.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.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.mountPoint, td.backend { width:10em; }
|
||||||
td.remove>img { visibility:hidden; padding-top:0.8em; }
|
td.remove>img { visibility:hidden; padding-top:0.8em; }
|
||||||
tr:hover>td.remove>img { visibility:visible; cursor:pointer; }
|
tr:hover>td.remove>img { visibility:visible; cursor:pointer; }
|
||||||
|
|
|
@ -58,6 +58,8 @@ OC.MountConfig={
|
||||||
}
|
}
|
||||||
users.push(applicable);
|
users.push(applicable);
|
||||||
}
|
}
|
||||||
|
statusSpan.removeClass();
|
||||||
|
statusSpan.addClass('pending');
|
||||||
$.ajax({type: 'POST',
|
$.ajax({type: 'POST',
|
||||||
url: OC.filePath('files_external', 'ajax', 'addMountPoint.php'),
|
url: OC.filePath('files_external', 'ajax', 'addMountPoint.php'),
|
||||||
data: {
|
data: {
|
||||||
|
@ -68,7 +70,7 @@ OC.MountConfig={
|
||||||
applicable: applicable,
|
applicable: applicable,
|
||||||
isPersonal: isPersonal
|
isPersonal: isPersonal
|
||||||
},
|
},
|
||||||
async: false,
|
async: true,
|
||||||
success: function(result) {
|
success: function(result) {
|
||||||
statusSpan.removeClass();
|
statusSpan.removeClass();
|
||||||
if (result && result.status == 'success' && result.data.message) {
|
if (result && result.status == 'success' && result.data.message) {
|
||||||
|
@ -116,6 +118,8 @@ OC.MountConfig={
|
||||||
var isPersonal = true;
|
var isPersonal = true;
|
||||||
var mountType = 'user';
|
var mountType = 'user';
|
||||||
var applicable = OC.currentUser;
|
var applicable = OC.currentUser;
|
||||||
|
statusSpan.removeClass();
|
||||||
|
statusSpan.addClass('pending');
|
||||||
$.ajax({type: 'POST',
|
$.ajax({type: 'POST',
|
||||||
url: OC.filePath('files_external', 'ajax', 'addMountPoint.php'),
|
url: OC.filePath('files_external', 'ajax', 'addMountPoint.php'),
|
||||||
data: {
|
data: {
|
||||||
|
@ -126,7 +130,7 @@ OC.MountConfig={
|
||||||
applicable: applicable,
|
applicable: applicable,
|
||||||
isPersonal: isPersonal
|
isPersonal: isPersonal
|
||||||
},
|
},
|
||||||
async: false,
|
async: true,
|
||||||
success: function(result) {
|
success: function(result) {
|
||||||
statusSpan.removeClass();
|
statusSpan.removeClass();
|
||||||
if (result && result.status == 'success' && result.data.message) {
|
if (result && result.status == 'success' && result.data.message) {
|
||||||
|
|
Loading…
Reference in New Issue