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 {
.assignfeedback_editpdfplus_commentplus_edition > div > p {
margin:0;
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, {
var divinputdisplay = Y.Node.create(divinput);
if (!this.editor.get('readonly')) {
divinputdisplay.on('click', this.edit_annot, this);
} else {
divinputdisplay.on('click', this.view_annot, this);
}
return divinputdisplay;
},
......@@ -866,6 +868,16 @@ Y.extend(ANNOTATION, Y.Base, {
}
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) {
var divconteneur = "<div ";
divconteneur += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_conteneur' >";
......@@ -1151,6 +1163,19 @@ Y.extend(ANNOTATION, Y.Base, {
draw_catridge: function (edit) {
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) {
if (this.tooltype.type <= TOOLTYPE.COMMENTPLUS && !this.parent_annot_element) {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
......@@ -1231,6 +1256,7 @@ Y.extend(ANNOTATION, Y.Base, {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
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 buttoncancel = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttoncancel");
var buttonquestion = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonquestion");
......@@ -1248,6 +1274,9 @@ Y.extend(ANNOTATION, Y.Base, {
buttonsave.hide();
buttoncancel.hide();
}
if (divvisu) {
divvisu.hide();
}
if (buttonquestion) {
buttonquestion.hide();
}
......@@ -2193,6 +2222,9 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
//positionnement de la div par rapport a l'annotation
......@@ -2751,6 +2783,9 @@ Y.extend(ANNOTATIONSTAMPCOMMENT, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
//positionnement de la div par rapport a l'annotation
......@@ -3079,6 +3114,9 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var diveditiondisplay = this.get_div_edition();
//diveditiondisplay.addClass('assignfeedback_editpdfplus_frame_edition');
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
//creation de la div palette
......@@ -3308,8 +3346,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var buttonrender = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonpencil");
var buttonadd = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonadd");
this.hide_picker();
buttonrender.hide();
buttonadd.hide();
if (buttonrender) {
buttonrender.hide();
buttonadd.hide();
}
ANNOTATIONFRAME.superclass.edit_annot.call(this);
}
},
......@@ -3322,12 +3362,16 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left");
if (divdisplay) {
divdisplay.set('style', 'display:inline;color:' + this.get_color() + ';');
buttonrender.show();
buttonadd.show();
if (buttonrender) {
buttonrender.show();
buttonadd.show();
}
if (buttonplusr) {
buttonplusr.hide();
}
buttonplusl.hide();
if (buttonplusl) {
buttonplusl.hide();
}
}
},
/**
......@@ -3556,6 +3600,9 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
//positionnement de la div par rapport a l'annotation
......@@ -3810,6 +3857,9 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
divdisplay.setX(this.x + 20);
......@@ -3824,6 +3874,16 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
}
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 () {
ANNOTATIONCOMMENTPLUS.superclass.apply_visibility_annot.apply(this);
......
......@@ -840,6 +840,8 @@ Y.extend(ANNOTATION, Y.Base, {
var divinputdisplay = Y.Node.create(divinput);
if (!this.editor.get('readonly')) {
divinputdisplay.on('click', this.edit_annot, this);
} else {
divinputdisplay.on('click', this.view_annot, this);
}
return divinputdisplay;
},
......@@ -866,6 +868,16 @@ Y.extend(ANNOTATION, Y.Base, {
}
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) {
var divconteneur = "<div ";
divconteneur += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_conteneur' >";
......@@ -1151,6 +1163,19 @@ Y.extend(ANNOTATION, Y.Base, {
draw_catridge: function (edit) {
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) {
if (this.tooltype.type <= TOOLTYPE.COMMENTPLUS && !this.parent_annot_element) {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
......@@ -1231,6 +1256,7 @@ Y.extend(ANNOTATION, Y.Base, {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
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 buttoncancel = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttoncancel");
var buttonquestion = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonquestion");
......@@ -1248,6 +1274,9 @@ Y.extend(ANNOTATION, Y.Base, {
buttonsave.hide();
buttoncancel.hide();
}
if (divvisu) {
divvisu.hide();
}
if (buttonquestion) {
buttonquestion.hide();
}
......@@ -2193,6 +2222,9 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
//positionnement de la div par rapport a l'annotation
......@@ -2751,6 +2783,9 @@ Y.extend(ANNOTATIONSTAMPCOMMENT, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
//positionnement de la div par rapport a l'annotation
......@@ -3078,6 +3113,9 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var diveditiondisplay = this.get_div_edition();
//diveditiondisplay.addClass('assignfeedback_editpdfplus_frame_edition');
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
//creation de la div palette
......@@ -3307,8 +3345,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var buttonrender = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonpencil");
var buttonadd = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonadd");
this.hide_picker();
buttonrender.hide();
buttonadd.hide();
if (buttonrender) {
buttonrender.hide();
buttonadd.hide();
}
ANNOTATIONFRAME.superclass.edit_annot.call(this);
}
},
......@@ -3321,12 +3361,16 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left");
if (divdisplay) {
divdisplay.set('style', 'display:inline;color:' + this.get_color() + ';');
buttonrender.show();
buttonadd.show();
if (buttonrender) {
buttonrender.show();
buttonadd.show();
}
if (buttonplusr) {
buttonplusr.hide();
}
buttonplusl.hide();
if (buttonplusl) {
buttonplusl.hide();
}
}
},
/**
......@@ -3555,6 +3599,9 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
//positionnement de la div par rapport a l'annotation
......@@ -3808,6 +3855,9 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
divdisplay.setX(this.x + 20);
......@@ -3822,6 +3872,16 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
}
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 () {
ANNOTATIONCOMMENTPLUS.superclass.apply_visibility_annot.apply(this);
......
......@@ -297,6 +297,8 @@ Y.extend(ANNOTATION, Y.Base, {
var divinputdisplay = Y.Node.create(divinput);
if (!this.editor.get('readonly')) {
divinputdisplay.on('click', this.edit_annot, this);
} else {
divinputdisplay.on('click', this.view_annot, this);
}
return divinputdisplay;
},
......@@ -323,6 +325,16 @@ Y.extend(ANNOTATION, Y.Base, {
}
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) {
var divconteneur = "<div ";
divconteneur += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_conteneur' >";
......@@ -608,6 +620,19 @@ Y.extend(ANNOTATION, Y.Base, {
draw_catridge: function (edit) {
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) {
if (this.tooltype.type <= TOOLTYPE.COMMENTPLUS && !this.parent_annot_element) {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
......@@ -688,6 +713,7 @@ Y.extend(ANNOTATION, Y.Base, {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
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 buttoncancel = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttoncancel");
var buttonquestion = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonquestion");
......@@ -705,6 +731,9 @@ Y.extend(ANNOTATION, Y.Base, {
buttonsave.hide();
buttoncancel.hide();
}
if (divvisu) {
divvisu.hide();
}
if (buttonquestion) {
buttonquestion.hide();
}
......
......@@ -154,6 +154,9 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
divdisplay.setX(this.x + 20);
......
......@@ -236,6 +236,9 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var diveditiondisplay = this.get_div_edition();
//diveditiondisplay.addClass('assignfeedback_editpdfplus_frame_edition');
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
//creation de la div palette
......@@ -465,8 +468,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var buttonrender = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonpencil");
var buttonadd = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonadd");
this.hide_picker();
buttonrender.hide();
buttonadd.hide();
if (buttonrender) {
buttonrender.hide();
buttonadd.hide();
}
ANNOTATIONFRAME.superclass.edit_annot.call(this);
}
},
......@@ -479,12 +484,16 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left");
if (divdisplay) {
divdisplay.set('style', 'display:inline;color:' + this.get_color() + ';');
buttonrender.show();
buttonadd.show();
if (buttonrender) {
buttonrender.show();
buttonadd.show();
}
if (buttonplusr) {
buttonplusr.hide();
}
buttonplusl.hide();
if (buttonplusl) {
buttonplusl.hide();
}
}
},
/**
......
......@@ -161,6 +161,9 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
//positionnement de la div par rapport a l'annotation
......
......@@ -175,6 +175,9 @@ Y.extend(ANNOTATIONSTAMPCOMMENT, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
//positionnement de la div par rapport a l'annotation
......
......@@ -171,6 +171,9 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, {
if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition();
divconteneurdisplay.append(diveditiondisplay);
} else {
var divvisudisplay = this.get_div_visu(colorcartridge);
divconteneurdisplay.append(divvisudisplay);
}
//positionnement de la div par rapport a l'annotation
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment