Permalink
Browse files

working on bugs

  • Loading branch information...
1 parent 1b98ac5 commit fff3c53210aa22ec5c4cf6bc199b6c40f6105882 Javier de la Torre committed Dec 13, 2011
Showing with 10 additions and 3 deletions.
  1. +2 −0 .gitignore
  2. +8 −3 public/javascripts/editor/Models/SourcesOperations.js
View
@@ -3,3 +3,5 @@ db/*.sqlite3
log/*.log
tmp/**/*
public/assets/
+
+public/javascripts/editor/.DS_Store
@@ -29,7 +29,6 @@
$('span.qq-upload-file').text('Uploading...');
},
onComplete: function(id, fileName, responseJSON) {
-
var total_occurrences = {};
total_occurrences.points = new Array();
var sources = responseJSON.data.sources;
@@ -499,7 +498,7 @@
$.getJSON(url + query.replace(' ','+'),
function(result){
- var count = 0;
+ var count = 0;
switch(kind) {
case 'add_flickr': flickr_founded.push(result[0]); count = result[0].points.length; break;
default: gbif_founded.push(result[0]); count = result[0].points.length;
@@ -510,10 +509,16 @@
if (count>=1000) {
$(element).find('a.import_data').text('import first 1000');
}
+
onLoadedSource(element,result[0].points.length);
}
- );
+ ).error(function() {
+ $(element).find('span p').text('Sorry, the data provider is down.');
+ $(element).find('span.loading a').removeClass('import_data').addClass('enabled').addClass('retry').text('retry');
+
+
+ });
}

0 comments on commit fff3c53

Please sign in to comment.