show loading spinner when loading table

This commit is contained in:
Max Ogden
2011-08-03 12:21:35 -04:00
parent db47d2e420
commit abfb0bbc7e
5 changed files with 7 additions and 2 deletions

View File

@@ -62,8 +62,9 @@ var costco = function() {
function updateDocs(editFunc) {
var dfd = $.Deferred();
util.notify("Updating documents...", {persist: true, loader: true});
util.notify("Download entire database into Recline. This could take a while...", {persist: true, loader: true});
couch.request({url: app.baseURL + "api/json"}).then(function(docs) {
util.notify("Updating " + docs.docs.length + " documents. This could take a while...", {persist: true, loader: true});
var toUpdate = costco.mapDocs(docs.docs, editFunc).edited;
costco.uploadDocs(toUpdate).then(
function(updatedDocs) {

View File

@@ -183,7 +183,9 @@ var recline = function() {
}
function initializeTable(offset) {
$('.large-loader').show();
couch.request({url: app.baseURL + 'api/headers'}).then(function ( headers ) {
$('.large-loader').hide();
app.headers = headers;
app.csvUrl = app.baseURL + 'api/csv?headers=' + escape(JSON.stringify(headers));