Corrected creation of annotation types in empty project
authorveltr
Mon, 10 Jun 2013 17:48:05 +0200
changeset 110 ebbb23d32748
parent 109 12a4ca0db163
child 111 c0e4d761bcb6
Corrected creation of annotation types in empty project
integration/js/edition.js
--- a/integration/js/edition.js	Mon Jun 10 17:14:17 2013 +0200
+++ b/integration/js/edition.js	Mon Jun 10 17:48:05 2013 +0200
@@ -29,8 +29,9 @@
 
         var anntypes = myProject.getAnnotationTypes().searchByTitle("chapitrage");
         if (!anntypes.length) {
-            chapterAnnType = new IriSP.AnnotationType(false, myProject);
+            chapterAnnType = new IriSP.Model.AnnotationType(false, myProject);
             chapterAnnType.title = "chapitrage";
+            myProject.getAnnotationTypes().push(chapterAnnType);
         } else {
             chapterAnnType = anntypes[0];
         }
@@ -45,8 +46,9 @@
         //load Annotations
         var anntypes = myProject.getAnnotationTypes().searchByTitle("annotations");
         if (!anntypes.length) {
-            annotationsAnnType = new IriSP.AnnotationType(false, myProject);
+            annotationsAnnType = new IriSP.Model.AnnotationType(false, myProject);
             annotationsAnnType.title = "annotations";
+            myProject.getAnnotationTypes().push(annotationsAnnType);
         } else {
             annotationsAnnType = anntypes[0];
         }