Gitlab CSE Unil

Commit adf905b3 authored by M. Chardon's avatar M. Chardon
Browse files

visu étudiant des champs complets

parent d6f57803
...@@ -438,4 +438,15 @@ ul.assignfeedback_editpdfplus_menu { ...@@ -438,4 +438,15 @@ ul.assignfeedback_editpdfplus_menu {
.assignfeedback_editpdfplus_commentplus_edition > div > p { .assignfeedback_editpdfplus_commentplus_edition > div > p {
margin:0; margin:0;
width:195px; width:195px;
}
.assignfeedback_editpdfplus_highlightplus_visu,
.assignfeedback_editpdfplus_frame_visu,
.assignfeedback_editpdfplus_verticalline_visu,
.assignfeedback_editpdfplus_stampcomment_visu,
.assignfeedback_editpdfplus_commentplus_visu {
padding-left:2px;
padding-right:2px;
font-size:12px;
color:inherit;
cursor:default;
} }
\ No newline at end of file
...@@ -840,6 +840,8 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -840,6 +840,8 @@ Y.extend(ANNOTATION, Y.Base, {
var divinputdisplay = Y.Node.create(divinput); var divinputdisplay = Y.Node.create(divinput);
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
divinputdisplay.on('click', this.edit_annot, this); divinputdisplay.on('click', this.edit_annot, this);
} else {
divinputdisplay.on('click', this.view_annot, this);
} }
return divinputdisplay; return divinputdisplay;
}, },
...@@ -866,6 +868,16 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -866,6 +868,16 @@ Y.extend(ANNOTATION, Y.Base, {
} }
return diveditiondisplay; return diveditiondisplay;
}, },
get_div_visu: function (colorcartridge) {
var divvisu = "<div ";
divvisu += "id='" + this.divcartridge + "_visu' ";
divvisu += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_visu' ";
divvisu += "style='display:none;color:" + colorcartridge + ";'> ";
divvisu += this.get_valref().replace(/\n/g, "<br/>");
divvisu += "</div>";
var divvisudisplay = Y.Node.create(divvisu);
return divvisudisplay;
},
get_div_container: function (colorcartridge) { get_div_container: function (colorcartridge) {
var divconteneur = "<div "; var divconteneur = "<div ";
divconteneur += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_conteneur' >"; divconteneur += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_conteneur' >";
...@@ -1151,6 +1163,19 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1151,6 +1163,19 @@ Y.extend(ANNOTATION, Y.Base, {
draw_catridge: function (edit) { draw_catridge: function (edit) {
return true; return true;
}, },
view_annot: function (e) {
if (this.tooltype.type <= TOOLTYPE.COMMENTPLUS && !this.parent_annot_element) {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
var divvisu = this.editor.get_dialogue_element('#' + this.divcartridge + "_visu");
divdisplay.hide();
divvisu.show();
divprincipale.setStyle('z-index', 1000);
this.disabled_canvas_event();
divprincipale.on('clickoutside', this.hide_edit, this);
}
},
edit_annot: function (e) { edit_annot: function (e) {
if (this.tooltype.type <= TOOLTYPE.COMMENTPLUS && !this.parent_annot_element) { if (this.tooltype.type <= TOOLTYPE.COMMENTPLUS && !this.parent_annot_element) {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
...@@ -1231,6 +1256,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1231,6 +1256,7 @@ Y.extend(ANNOTATION, Y.Base, {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display"); var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
var divedit = this.editor.get_dialogue_element('#' + this.divcartridge + "_edit"); var divedit = this.editor.get_dialogue_element('#' + this.divcartridge + "_edit");
var divvisu = this.editor.get_dialogue_element('#' + this.divcartridge + "_visu");
var buttonsave = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonsave"); var buttonsave = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonsave");
var buttoncancel = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttoncancel"); var buttoncancel = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttoncancel");
var buttonquestion = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonquestion"); var buttonquestion = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonquestion");
...@@ -1248,6 +1274,9 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1248,6 +1274,9 @@ Y.extend(ANNOTATION, Y.Base, {
buttonsave.hide(); buttonsave.hide();
buttoncancel.hide(); buttoncancel.hide();
} }
if (divvisu) {
divvisu.hide();
}
if (buttonquestion) { if (buttonquestion) {
buttonquestion.hide(); buttonquestion.hide();
} }
...@@ -2193,6 +2222,9 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -2193,6 +2222,9 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition(); var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay); divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
} }
//positionnement de la div par rapport a l'annotation //positionnement de la div par rapport a l'annotation
...@@ -2751,6 +2783,9 @@ Y.extend(ANNOTATIONSTAMPCOMMENT, M.assignfeedback_editpdfplus.annotation, { ...@@ -2751,6 +2783,9 @@ Y.extend(ANNOTATIONSTAMPCOMMENT, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition(); var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay); divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
} }
//positionnement de la div par rapport a l'annotation //positionnement de la div par rapport a l'annotation
...@@ -3079,6 +3114,9 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3079,6 +3114,9 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var diveditiondisplay = this.get_div_edition(); var diveditiondisplay = this.get_div_edition();
//diveditiondisplay.addClass('assignfeedback_editpdfplus_frame_edition'); //diveditiondisplay.addClass('assignfeedback_editpdfplus_frame_edition');
divconteneurdisplay.append(diveditiondisplay); divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
} }
//creation de la div palette //creation de la div palette
...@@ -3308,8 +3346,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3308,8 +3346,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var buttonrender = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonpencil"); var buttonrender = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonpencil");
var buttonadd = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonadd"); var buttonadd = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonadd");
this.hide_picker(); this.hide_picker();
buttonrender.hide(); if (buttonrender) {
buttonadd.hide(); buttonrender.hide();
buttonadd.hide();
}
ANNOTATIONFRAME.superclass.edit_annot.call(this); ANNOTATIONFRAME.superclass.edit_annot.call(this);
} }
}, },
...@@ -3322,12 +3362,16 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3322,12 +3362,16 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left"); var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left");
if (divdisplay) { if (divdisplay) {
divdisplay.set('style', 'display:inline;color:' + this.get_color() + ';'); divdisplay.set('style', 'display:inline;color:' + this.get_color() + ';');
buttonrender.show(); if (buttonrender) {
buttonadd.show(); buttonrender.show();
buttonadd.show();
}
if (buttonplusr) { if (buttonplusr) {
buttonplusr.hide(); buttonplusr.hide();
} }
buttonplusl.hide(); if (buttonplusl) {
buttonplusl.hide();
}
} }
}, },
/** /**
...@@ -3556,6 +3600,9 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, { ...@@ -3556,6 +3600,9 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition(); var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay); divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
} }
//positionnement de la div par rapport a l'annotation //positionnement de la div par rapport a l'annotation
...@@ -3810,6 +3857,9 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -3810,6 +3857,9 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition(); var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay); divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
} }
divdisplay.setX(this.x + 20); divdisplay.setX(this.x + 20);
...@@ -3824,6 +3874,16 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -3824,6 +3874,16 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
} }
return true; return true;
}, },
/*get_div_visu: function (colorcartridge) {
var divvisu = "<div ";
divvisu += "id='" + this.divcartridge + "_visu' ";
divvisu += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_visu' ";
divvisu += "style='display:none;color:" + colorcartridge + ";'> ";
divvisu += '<table><tr><td>' + this.get_valref().replace(/\n/g, "<br/>") + '</td></tr></table><br/>';
divvisu += "</div>";
var divvisudisplay = Y.Node.create(divvisu);
return divvisudisplay;
},*/
apply_visibility_annot: function () { apply_visibility_annot: function () {
ANNOTATIONCOMMENTPLUS.superclass.apply_visibility_annot.apply(this); ANNOTATIONCOMMENTPLUS.superclass.apply_visibility_annot.apply(this);
......
...@@ -840,6 +840,8 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -840,6 +840,8 @@ Y.extend(ANNOTATION, Y.Base, {
var divinputdisplay = Y.Node.create(divinput); var divinputdisplay = Y.Node.create(divinput);
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
divinputdisplay.on('click', this.edit_annot, this); divinputdisplay.on('click', this.edit_annot, this);
} else {
divinputdisplay.on('click', this.view_annot, this);
} }
return divinputdisplay; return divinputdisplay;
}, },
...@@ -866,6 +868,16 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -866,6 +868,16 @@ Y.extend(ANNOTATION, Y.Base, {
} }
return diveditiondisplay; return diveditiondisplay;
}, },
get_div_visu: function (colorcartridge) {
var divvisu = "<div ";
divvisu += "id='" + this.divcartridge + "_visu' ";
divvisu += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_visu' ";
divvisu += "style='display:none;color:" + colorcartridge + ";'> ";
divvisu += this.get_valref().replace(/\n/g, "<br/>");
divvisu += "</div>";
var divvisudisplay = Y.Node.create(divvisu);
return divvisudisplay;
},
get_div_container: function (colorcartridge) { get_div_container: function (colorcartridge) {
var divconteneur = "<div "; var divconteneur = "<div ";
divconteneur += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_conteneur' >"; divconteneur += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_conteneur' >";
...@@ -1151,6 +1163,19 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1151,6 +1163,19 @@ Y.extend(ANNOTATION, Y.Base, {
draw_catridge: function (edit) { draw_catridge: function (edit) {
return true; return true;
}, },
view_annot: function (e) {
if (this.tooltype.type <= TOOLTYPE.COMMENTPLUS && !this.parent_annot_element) {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
var divvisu = this.editor.get_dialogue_element('#' + this.divcartridge + "_visu");
divdisplay.hide();
divvisu.show();
divprincipale.setStyle('z-index', 1000);
this.disabled_canvas_event();
divprincipale.on('clickoutside', this.hide_edit, this);
}
},
edit_annot: function (e) { edit_annot: function (e) {
if (this.tooltype.type <= TOOLTYPE.COMMENTPLUS && !this.parent_annot_element) { if (this.tooltype.type <= TOOLTYPE.COMMENTPLUS && !this.parent_annot_element) {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
...@@ -1231,6 +1256,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1231,6 +1256,7 @@ Y.extend(ANNOTATION, Y.Base, {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display"); var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
var divedit = this.editor.get_dialogue_element('#' + this.divcartridge + "_edit"); var divedit = this.editor.get_dialogue_element('#' + this.divcartridge + "_edit");
var divvisu = this.editor.get_dialogue_element('#' + this.divcartridge + "_visu");
var buttonsave = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonsave"); var buttonsave = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonsave");
var buttoncancel = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttoncancel"); var buttoncancel = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttoncancel");
var buttonquestion = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonquestion"); var buttonquestion = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonquestion");
...@@ -1248,6 +1274,9 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1248,6 +1274,9 @@ Y.extend(ANNOTATION, Y.Base, {
buttonsave.hide(); buttonsave.hide();
buttoncancel.hide(); buttoncancel.hide();
} }
if (divvisu) {
divvisu.hide();
}
if (buttonquestion) { if (buttonquestion) {
buttonquestion.hide(); buttonquestion.hide();
} }
...@@ -2193,6 +2222,9 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -2193,6 +2222,9 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition(); var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay); divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
} }
//positionnement de la div par rapport a l'annotation //positionnement de la div par rapport a l'annotation
...@@ -2751,6 +2783,9 @@ Y.extend(ANNOTATIONSTAMPCOMMENT, M.assignfeedback_editpdfplus.annotation, { ...@@ -2751,6 +2783,9 @@ Y.extend(ANNOTATIONSTAMPCOMMENT, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition(); var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay); divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
} }
//positionnement de la div par rapport a l'annotation //positionnement de la div par rapport a l'annotation
...@@ -3078,6 +3113,9 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3078,6 +3113,9 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var diveditiondisplay = this.get_div_edition(); var diveditiondisplay = this.get_div_edition();
//diveditiondisplay.addClass('assignfeedback_editpdfplus_frame_edition'); //diveditiondisplay.addClass('assignfeedback_editpdfplus_frame_edition');
divconteneurdisplay.append(diveditiondisplay); divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
} }
//creation de la div palette //creation de la div palette
...@@ -3307,8 +3345,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3307,8 +3345,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var buttonrender = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonpencil"); var buttonrender = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonpencil");
var buttonadd = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonadd"); var buttonadd = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonadd");
this.hide_picker(); this.hide_picker();
buttonrender.hide(); if (buttonrender) {
buttonadd.hide(); buttonrender.hide();
buttonadd.hide();
}
ANNOTATIONFRAME.superclass.edit_annot.call(this); ANNOTATIONFRAME.superclass.edit_annot.call(this);
} }
}, },
...@@ -3321,12 +3361,16 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3321,12 +3361,16 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left"); var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left");
if (divdisplay) { if (divdisplay) {
divdisplay.set('style', 'display:inline;color:' + this.get_color() + ';'); divdisplay.set('style', 'display:inline;color:' + this.get_color() + ';');
buttonrender.show(); if (buttonrender) {
buttonadd.show(); buttonrender.show();
buttonadd.show();
}
if (buttonplusr) { if (buttonplusr) {
buttonplusr.hide(); buttonplusr.hide();
} }
buttonplusl.hide(); if (buttonplusl) {
buttonplusl.hide();
}
} }
}, },
/** /**
...@@ -3555,6 +3599,9 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, { ...@@ -3555,6 +3599,9 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition(); var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay); divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
} }
//positionnement de la div par rapport a l'annotation //positionnement de la div par rapport a l'annotation
...@@ -3808,6 +3855,9 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -3808,6 +3855,9 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition(); var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay); divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
} }
divdisplay.setX(this.x + 20); divdisplay.setX(this.x + 20);
...@@ -3822,6 +3872,16 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -3822,6 +3872,16 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
} }
return true; return true;
}, },
/*get_div_visu: function (colorcartridge) {
var divvisu = "<div ";
divvisu += "id='" + this.divcartridge + "_visu' ";
divvisu += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_visu' ";
divvisu += "style='display:none;color:" + colorcartridge + ";'> ";
divvisu += '<table><tr><td>' + this.get_valref().replace(/\n/g, "<br/>") + '</td></tr></table><br/>';
divvisu += "</div>";
var divvisudisplay = Y.Node.create(divvisu);
return divvisudisplay;
},*/
apply_visibility_annot: function () { apply_visibility_annot: function () {
ANNOTATIONCOMMENTPLUS.superclass.apply_visibility_annot.apply(this); ANNOTATIONCOMMENTPLUS.superclass.apply_visibility_annot.apply(this);
......
...@@ -297,6 +297,8 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -297,6 +297,8 @@ Y.extend(ANNOTATION, Y.Base, {
var divinputdisplay = Y.Node.create(divinput); var divinputdisplay = Y.Node.create(divinput);
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
divinputdisplay.on('click', this.edit_annot, this); divinputdisplay.on('click', this.edit_annot, this);
} else {
divinputdisplay.on('click', this.view_annot, this);
} }
return divinputdisplay; return divinputdisplay;
}, },
...@@ -323,6 +325,16 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -323,6 +325,16 @@ Y.extend(ANNOTATION, Y.Base, {
} }
return diveditiondisplay; return diveditiondisplay;
}, },
get_div_visu: function (colorcartridge) {
var divvisu = "<div ";
divvisu += "id='" + this.divcartridge + "_visu' ";
divvisu += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_visu' ";
divvisu += "style='display:none;color:" + colorcartridge + ";'> ";
divvisu += this.get_valref().replace(/\n/g, "<br/>");
divvisu += "</div>";
var divvisudisplay = Y.Node.create(divvisu);
return divvisudisplay;
},
get_div_container: function (colorcartridge) { get_div_container: function (colorcartridge) {
var divconteneur = "<div "; var divconteneur = "<div ";
divconteneur += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_conteneur' >"; divconteneur += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_conteneur' >";
...@@ -608,6 +620,19 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -608,6 +620,19 @@ Y.extend(ANNOTATION, Y.Base, {
draw_catridge: function (edit) { draw_catridge: function (edit) {
return true; return true;
}, },
view_annot: function (e) {
if (this.tooltype.type <= TOOLTYPE.COMMENTPLUS && !this.parent_annot_element) {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
var divvisu = this.editor.get_dialogue_element('#' + this.divcartridge + "_visu");
divdisplay.hide();
divvisu.show();
divprincipale.setStyle('z-index', 1000);
this.disabled_canvas_event();
divprincipale.on('clickoutside', this.hide_edit, this);
}
},
edit_annot: function (e) { edit_annot: function (e) {
if (this.tooltype.type <= TOOLTYPE.COMMENTPLUS && !this.parent_annot_element) { if (this.tooltype.type <= TOOLTYPE.COMMENTPLUS && !this.parent_annot_element) {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
...@@ -688,6 +713,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -688,6 +713,7 @@ Y.extend(ANNOTATION, Y.Base, {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display"); var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
var divedit = this.editor.get_dialogue_element('#' + this.divcartridge + "_edit"); var divedit = this.editor.get_dialogue_element('#' + this.divcartridge + "_edit");
var divvisu = this.editor.get_dialogue_element('#' + this.divcartridge + "_visu");
var buttonsave = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonsave"); var buttonsave = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonsave");
var buttoncancel = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttoncancel"); var buttoncancel = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttoncancel");
var buttonquestion = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonquestion"); var buttonquestion = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonquestion");
...@@ -705,6 +731,9 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -705,6 +731,9 @@ Y.extend(ANNOTATION, Y.Base, {
buttonsave.hide();