src/js/widgets/createAnnotationWidget.js
branchpopcorn-port
changeset 769 70464200b601
parent 764 628ae65defa7
child 773 b284013327fd
--- a/src/js/widgets/createAnnotationWidget.js	Fri Feb 03 11:08:05 2012 +0100
+++ b/src/js/widgets/createAnnotationWidget.js	Fri Feb 03 11:08:32 2012 +0100
@@ -268,6 +268,12 @@
   this.selector.find(".Ldt-createAnnotation-waitScreen").show();  
 };
 
+IriSP.createAnnotationWidget.prototype.showErrorScreen = function() {
+  this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide();
+  this.selector.find(".Ldt-createAnnotation-errorScreen").show();  
+};
+
+/** update show the final screen with links to share the created annotation */
 IriSP.createAnnotationWidget.prototype.showEndScreen = function(annotation) {
   this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide();
   
@@ -298,7 +304,7 @@
       this.selector.find(".Ldt-createAnnotation-Container")
                    .after(IriSP.templToHTML(IriSP.createAnnotation_errorMessage_template));
       textfield.css("background-color", "#d93c71");      
-    } else {
+    } else {      
       this.selector.find(".Ldt-createAnnotation-errorMessage").show();
     }
 
@@ -426,5 +432,7 @@
       error: 
               function(jqXHR, textStatus, errorThrown) { 
                             console.log("an error occured while contacting " 
-                            + url + " and sending " + jsonString + textStatus ); } });
+                            + url + " and sending " + jsonString + textStatus ); 
+                            debugger;
+                            _this.showErrorScreen(); } });
 };
\ No newline at end of file