equal
deleted
inserted
replaced
27 |
27 |
28 myMedia = myProject.getCurrentMedia(); |
28 myMedia = myProject.getCurrentMedia(); |
29 |
29 |
30 var anntypes = myProject.getAnnotationTypes().searchByTitle("chapitrage"); |
30 var anntypes = myProject.getAnnotationTypes().searchByTitle("chapitrage"); |
31 if (!anntypes.length) { |
31 if (!anntypes.length) { |
32 chapterAnnType = new IriSP.AnnotationType(false, myProject); |
32 chapterAnnType = new IriSP.Model.AnnotationType(false, myProject); |
33 chapterAnnType.title = "chapitrage"; |
33 chapterAnnType.title = "chapitrage"; |
|
34 myProject.getAnnotationTypes().push(chapterAnnType); |
34 } else { |
35 } else { |
35 chapterAnnType = anntypes[0]; |
36 chapterAnnType = anntypes[0]; |
36 } |
37 } |
37 |
38 |
38 //load Chapitre |
39 //load Chapitre |
43 renderChapter(); |
44 renderChapter(); |
44 |
45 |
45 //load Annotations |
46 //load Annotations |
46 var anntypes = myProject.getAnnotationTypes().searchByTitle("annotations"); |
47 var anntypes = myProject.getAnnotationTypes().searchByTitle("annotations"); |
47 if (!anntypes.length) { |
48 if (!anntypes.length) { |
48 annotationsAnnType = new IriSP.AnnotationType(false, myProject); |
49 annotationsAnnType = new IriSP.Model.AnnotationType(false, myProject); |
49 annotationsAnnType.title = "annotations"; |
50 annotationsAnnType.title = "annotations"; |
|
51 myProject.getAnnotationTypes().push(annotationsAnnType); |
50 } else { |
52 } else { |
51 annotationsAnnType = anntypes[0]; |
53 annotationsAnnType = anntypes[0]; |
52 } |
54 } |
53 |
55 |
54 annotations = annotationsAnnType.getAnnotations(); |
56 annotations = annotationsAnnType.getAnnotations(); |