Gitlab CSE Unil

Commit 15a2401d authored by M. Chardon's avatar M. Chardon
Browse files

3 positions d'affichage pour le cartouche

parent 2beb21e4
...@@ -70,7 +70,7 @@ class annotation { ...@@ -70,7 +70,7 @@ class annotation {
public $colour = 'yellow'; public $colour = 'yellow';
/** @var bool displaylock for displaying this annotation */ /** @var bool displaylock for displaying this annotation */
public $displaylock = 0; public $displaylock = 1;
/** @var bool displayrotation for displaying the sign of the annotation */ /** @var bool displayrotation for displaying the sign of the annotation */
public $displayrotation = 0; public $displayrotation = 0;
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<FIELD NAME="answerrequested" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/> <FIELD NAME="answerrequested" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="studentanswer" TYPE="char" LENGTH="500" NOTNULL="false" SEQUENCE="false"/> <FIELD NAME="studentanswer" TYPE="char" LENGTH="500" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="studentstatus" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false"/> <FIELD NAME="studentstatus" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="displaylock" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/> <FIELD NAME="displaylock" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>
<FIELD NAME="displayrotation" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/> <FIELD NAME="displayrotation" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="borderstyle" TYPE="char" LENGTH="20" NOTNULL="false" SEQUENCE="false"/> <FIELD NAME="borderstyle" TYPE="char" LENGTH="20" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="parent_annot" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="true"/> <FIELD NAME="parent_annot" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="true"/>
......
...@@ -115,7 +115,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -115,7 +115,7 @@ Y.extend(ANNOTATION, Y.Base, {
tooltypefamille: null, tooltypefamille: null,
divcartridge: '', divcartridge: '',
textannot: '', textannot: '',
displaylock: 0, displaylock: 1,
displayrotation: 0, displayrotation: 0,
borderstyle: '', borderstyle: '',
parent_annot: 0, parent_annot: 0,
...@@ -147,7 +147,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -147,7 +147,7 @@ Y.extend(ANNOTATION, Y.Base, {
this.drawable = false; this.drawable = false;
this.tooltype = config.tooltype; this.tooltype = config.tooltype;
this.textannot = config.parent_annot_element.textannot; this.textannot = config.parent_annot_element.textannot;
this.displaylock = config.parent_annot_element.displaylock; this.displaylock = parseInt(config.parent_annot_element.displaylock);
this.displayrotation = config.parent_annot_element.displayrotation; this.displayrotation = config.parent_annot_element.displayrotation;
this.borderstyle = config.parent_annot_element.borderstyle || 'solid'; this.borderstyle = config.parent_annot_element.borderstyle || 'solid';
this.parent_annot = config.parent_annot_element.id; this.parent_annot = config.parent_annot_element.id;
...@@ -169,7 +169,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -169,7 +169,7 @@ Y.extend(ANNOTATION, Y.Base, {
this.drawable = false; this.drawable = false;
this.tooltype = config.tooltype; this.tooltype = config.tooltype;
this.textannot = config.textannot; this.textannot = config.textannot;
this.displaylock = config.displaylock; this.displaylock = parseInt(config.displaylock);
this.displayrotation = config.displayrotation; this.displayrotation = config.displayrotation;
this.borderstyle = config.borderstyle || 'solid'; this.borderstyle = config.borderstyle || 'solid';
this.parent_annot = config.parent_annot; this.parent_annot = config.parent_annot;
...@@ -303,7 +303,6 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -303,7 +303,6 @@ Y.extend(ANNOTATION, Y.Base, {
divedition += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_edition' "; divedition += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_edition' ";
divedition += "style='display:none;'> "; divedition += "style='display:none;'> ";
divedition += "<textarea id='" + this.divcartridge + "_editinput' type='text' value=\"" + this.get_valref() + "\" >" + this.get_valref() + "</textarea>"; divedition += "<textarea id='" + this.divcartridge + "_editinput' type='text' value=\"" + this.get_valref() + "\" >" + this.get_valref() + "</textarea>";
//divedition += "<input id='" + this.divcartridge + "_editinput' type='text' value=\"" + this.get_valref() + "\" />";
divedition += "</div>"; divedition += "</div>";
var diveditiondisplay = Y.Node.create(divedition); var diveditiondisplay = Y.Node.create(divedition);
var propositions = this.tooltype.texts; var propositions = this.tooltype.texts;
...@@ -329,9 +328,9 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -329,9 +328,9 @@ Y.extend(ANNOTATION, Y.Base, {
var divinputdisplay = this.get_div_input(colorcartridge); var divinputdisplay = this.get_div_input(colorcartridge);
divinputdisplay.addClass('assignfeedback_editpdfplus_' + this.tooltypefamille.label + '_input'); divinputdisplay.addClass('assignfeedback_editpdfplus_' + this.tooltypefamille.label + '_input');
var inputvalref = this.get_input_valref(); var inputvalref = this.get_input_valref();
var onof = 0; var onof = 1;
if (this.displaylock === '1') { if (this.displaylock) {
onof = 1; onof = this.displaylock;
} }
var inputonof = Y.Node.create("<input type='hidden' id='" + this.divcartridge + "_onof' value=" + onof + " />"); var inputonof = Y.Node.create("<input type='hidden' id='" + this.divcartridge + "_onof' value=" + onof + " />");
var readonly = this.editor.get('readonly'); var readonly = this.editor.get('readonly');
...@@ -344,26 +343,45 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -344,26 +343,45 @@ Y.extend(ANNOTATION, Y.Base, {
var readonly = this.editor.get('readonly'); var readonly = this.editor.get('readonly');
if (!readonly) { if (!readonly) {
divconteneurdisplay.append(this.get_button_visibility()); divconteneurdisplay.append(this.get_button_visibility_left());
divconteneurdisplay.append(this.get_button_visibility_right());
divconteneurdisplay.append(this.get_button_save()); divconteneurdisplay.append(this.get_button_save());
divconteneurdisplay.append(this.get_button_cancel()); divconteneurdisplay.append(this.get_button_cancel());
} }
return divconteneurdisplay; return divconteneurdisplay;
}, },
get_button_visibility: function () { get_button_visibility_right: function () {
var buttonvisibility = "<button id='" + this.divcartridge + "_buttonedit' "; var buttonvisibility = "<button id='" + this.divcartridge + "_buttonedit_right' ";
buttonvisibility += "><img src='"; buttonvisibility += "><img src='";
if (this.displaylock === 1) { buttonvisibility += M.util.image_url('t/right', 'core');
buttonvisibility += M.util.image_url('t/left', 'core'); buttonvisibility += "' /></button>";
} else { var buttonvisibilitydisplay = Y.Node.create(buttonvisibility);
buttonvisibility += M.util.image_url('t/right', 'core'); buttonvisibilitydisplay.on('click', this.change_visibility_annot, this, 'r');
} return buttonvisibilitydisplay;
},
get_button_visibility_left: function () {
var buttonvisibility = "<button id='" + this.divcartridge + "_buttonedit_left' ";
buttonvisibility += "><img src='";
buttonvisibility += M.util.image_url('t/left', 'core');
buttonvisibility += "' /></button>"; buttonvisibility += "' /></button>";
var buttonvisibilitydisplay = Y.Node.create(buttonvisibility); var buttonvisibilitydisplay = Y.Node.create(buttonvisibility);
buttonvisibilitydisplay.on('click', this.change_visibility_annot, this); buttonvisibilitydisplay.on('click', this.change_visibility_annot, this, 'l');
return buttonvisibilitydisplay; return buttonvisibilitydisplay;
}, },
/*get_button_visibility: function () {
var buttonvisibility = "<button id='" + this.divcartridge + "_buttonedit' ";
buttonvisibility += "><img src='";
if (this.displaylock === 1) {
buttonvisibility += M.util.image_url('t/left', 'core');
} else {
buttonvisibility += M.util.image_url('t/right', 'core');
}
buttonvisibility += "' /></button>";
var buttonvisibilitydisplay = Y.Node.create(buttonvisibility);
buttonvisibilitydisplay.on('click', this.change_visibility_annot, this);
return buttonvisibilitydisplay;
},*/
get_button_save: function () { get_button_save: function () {
var buttonsave = "<button id='" + this.divcartridge + "_buttonsave' style='display:none;margin-left:110px;'><img src='" + M.util.image_url('t/check', 'core') + "' /></button>"; var buttonsave = "<button id='" + this.divcartridge + "_buttonsave' style='display:none;margin-left:110px;'><img src='" + M.util.image_url('t/check', 'core') + "' /></button>";
var buttonsavedisplay = Y.Node.create(buttonsave); var buttonsavedisplay = Y.Node.create(buttonsave);
...@@ -395,7 +413,8 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -395,7 +413,8 @@ Y.extend(ANNOTATION, Y.Base, {
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display"); var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
var interrupt = this.editor.get_dialogue_element('#' + this.divcartridge + "_onof"); var interrupt = this.editor.get_dialogue_element('#' + this.divcartridge + "_onof");
var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value'); var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value');
var buttonplus = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit"); var buttonplusr = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_right");
var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left");
if (valref === '') { if (valref === '') {
if (this.editor.get('readonly')) { if (this.editor.get('readonly')) {
divdisplay.setContent(''); divdisplay.setContent('');
...@@ -403,37 +422,52 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -403,37 +422,52 @@ Y.extend(ANNOTATION, Y.Base, {
divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp'); divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp');
} }
} }
if (interrupt.get('value') === '0') { if (interrupt.get('value') === '1') {
if (valref !== '') { if (valref !== '') {
divdisplay.setContent(valref.substr(0, 20)); divdisplay.setContent(valref.substr(0, 20));
} }
if (buttonplus) { if (buttonplusr) {
buttonplus.one('img').setAttribute('src', M.util.image_url('t/right', 'core')); buttonplusr.show();
}
if (buttonplusl) {
buttonplusl.show();
}
} else if (interrupt.get('value') === '0') {
if (valref !== '') {
divdisplay.setContent('...');
}
if (buttonplusr) {
buttonplusr.show();
}
if (buttonplusl) {
buttonplusl.hide();
} }
} else { } else {
if (valref !== '') { if (valref !== '') {
divdisplay.setContent(valref); divdisplay.setContent(valref);
} }
if (buttonplus) { if (buttonplusr) {
buttonplus.one('img').setAttribute('src', M.util.image_url('t/left', 'core')); buttonplusr.hide();
} }
if (buttonplusl) {
buttonplusl.show();
}
}
if (this.tooltypefamille.label === 'frame') {
buttonplusr.hide();
buttonplusl.hide();
} }
}, },
change_visibility_annot: function () { change_visibility_annot: function (e, sens) {
//var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
var interrupt = this.editor.get_dialogue_element('#' + this.divcartridge + "_onof"); var interrupt = this.editor.get_dialogue_element('#' + this.divcartridge + "_onof");
// var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value'); var finalvalue = parseInt(interrupt.get('value'));
//var buttonplus = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit"); if (sens === 'r') {
// if (valref === '') { finalvalue += 1;
// divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp');
// }
if (interrupt.get('value') === '0') {
interrupt.set('value', 1);
this.displaylock = 1;
} else { } else {
interrupt.set('value', 0); finalvalue -= 1;
this.displaylock = 2;
} }
interrupt.set('value', finalvalue);
this.displaylock = finalvalue;
this.apply_visibility_annot(); this.apply_visibility_annot();
this.editor.save_current_page(); this.editor.save_current_page();
}, },
...@@ -537,13 +571,17 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -537,13 +571,17 @@ 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 buttonplus = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit"); var buttonplusr = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_right");
var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left");
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 input = this.editor.get_dialogue_element('#' + this.divcartridge + "_editinput"); var input = this.editor.get_dialogue_element('#' + this.divcartridge + "_editinput");
divdisplay.hide(); divdisplay.hide();
if (buttonplus) { if (buttonplusr) {
buttonplus.hide(); buttonplusr.hide();
}
if (buttonplusl) {
buttonplusl.hide();
} }
divedit.show(); divedit.show();
buttonsave.show(); buttonsave.show();
...@@ -586,6 +624,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -586,6 +624,7 @@ Y.extend(ANNOTATION, Y.Base, {
input.set('value', result); input.set('value', result);
} }
this.hide_edit(); this.hide_edit();
this.apply_visibility_annot();
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
divprincipale.detach(); divprincipale.detach();
} }
...@@ -595,16 +634,12 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -595,16 +634,12 @@ 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 buttonplus = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit");
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");
if (divdisplay) { if (divdisplay) {
divdisplay.show(); divdisplay.show();
divdisplay.set('style', 'display:inline;color:' + this.get_color_cartridge() + ';'); divdisplay.set('style', 'display:inline;color:' + this.get_color_cartridge() + ';');
} }
if (buttonplus) {
buttonplus.show();
}
divedit.hide(); divedit.hide();
buttonsave.hide(); buttonsave.hide();
buttoncancel.hide(); buttoncancel.hide();
......
...@@ -149,48 +149,10 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -149,48 +149,10 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
//creation input //creation input
var divconteneurdisplay = this.get_div_container(colorcartridge); var divconteneurdisplay = this.get_div_container(colorcartridge);
divdisplay.append(divconteneurdisplay); divdisplay.append(divconteneurdisplay);
/*var divconteneur = "<div ";
divconteneur += "class='assignfeedback_editpdfplus_commentplus_conteneur' >";
divconteneur += "</div>";
var divconteneurdisplay = Y.Node.create(divconteneur);
var divinputdisplay = this.get_div_input(colorcartridge);
divinputdisplay.addClass('assignfeedback_editpdfplus_commentplus_input');
divinputdisplay.setStyles({'width': '200px'});
var inputvalref = this.get_input_valref();
var onof = 0;
if (this.displaylock === '1') {
onof = 1;
}
var inputonof = Y.Node.create("<input type='hidden' id='" + this.divcartridge + "_onof' value=" + onof + " />");
divinputdisplay.on('click', this.edit_annot, this);
var buttonvisibility = "<button id='" + this.divcartridge + "_buttonedit' ";
buttonvisibility += "><img src='";
if (this.displaylock === 1) {
buttonvisibility += M.util.image_url('t/up', 'core');
} else {
buttonvisibility += M.util.image_url('t/down', 'core');
}
buttonvisibility += "' /></button>";
var buttonvisibilitydisplay = Y.Node.create(buttonvisibility);
buttonvisibilitydisplay.on('click', this.change_visibility_annot, this);
var buttonsave = "<button id='" + this.divcartridge + "_buttonsave' style='display:none;margin-left:110px;'><img src='" + M.util.image_url('t/check', 'core') + "' /></button>";
var buttonsavedisplay = Y.Node.create(buttonsave);
buttonsavedisplay.on('click', this.save_annot, this, null);
var buttoncancel = "<button id='" + this.divcartridge + "_buttoncancel' style='display:none;'><img src='" + M.util.image_url('t/reset', 'core') + "' /></button>";
var buttoncanceldisplay = Y.Node.create(buttoncancel);
buttoncanceldisplay.on('click', this.cancel_edit, this);
divconteneurdisplay.append(divinputdisplay);
divconteneurdisplay.append(inputvalref);
divconteneurdisplay.append(inputonof);
divconteneurdisplay.append(buttonvisibilitydisplay);
divconteneurdisplay.append(buttonsavedisplay);
divconteneurdisplay.append(buttoncanceldisplay);
divdisplay.append(divconteneurdisplay);*/
//creation de la div d'edition //creation de la div d'edition
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition(); var diveditiondisplay = this.get_div_edition();
//diveditiondisplay.addClass('assignfeedback_editpdfplus_commentplus_edition');
divconteneurdisplay.append(diveditiondisplay); divconteneurdisplay.append(diveditiondisplay);
} }
...@@ -210,7 +172,8 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -210,7 +172,8 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display"); var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
var interrupt = this.editor.get_dialogue_element('#' + this.divcartridge + "_onof"); var interrupt = this.editor.get_dialogue_element('#' + this.divcartridge + "_onof");
var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value'); var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value');
var buttonplus = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit"); var buttonplusr = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_right");
var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left");
if (valref === '') { if (valref === '') {
if (this.editor.get('readonly')) { if (this.editor.get('readonly')) {
divdisplay.setContent(''); divdisplay.setContent('');
...@@ -222,16 +185,20 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -222,16 +185,20 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
if (valref !== '') { if (valref !== '') {
divdisplay.setContent(valref.substr(0, 20)); divdisplay.setContent(valref.substr(0, 20));
} }
if (buttonplus) { if (buttonplusr) {
buttonplus.one('img').setAttribute('src', M.util.image_url('t/down', 'core')); buttonplusr.one('img').setAttribute('src', M.util.image_url('t/down', 'core'));
buttonplusr.show();
} }
buttonplusl.hide();
} else { } else {
if (valref !== '') { if (valref !== '') {
divdisplay.setContent('<table><tr><td>' + valref.replace(/\n/g, "<br/>") + '</td></tr></table><br/>'); divdisplay.setContent('<table><tr><td>' + valref.replace(/\n/g, "<br/>") + '</td></tr></table><br/>');
} }
if (buttonplus) { if (buttonplusl) {
buttonplus.one('img').setAttribute('src', M.util.image_url('t/up', 'core')); buttonplusl.one('img').setAttribute('src', M.util.image_url('t/up', 'core'));
buttonplusl.show();
} }
buttonplusr.hide();
} }
}, },
save_annot: function () { save_annot: function () {
......
...@@ -293,8 +293,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -293,8 +293,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
this.apply_visibility_annot(); this.apply_visibility_annot();
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
var buttonplus = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit"); var buttonplusr = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_right");
buttonplus.hide(); var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left");
buttonplusr.hide();
buttonplusl.hide();
} }
} else { } else {
...@@ -473,13 +475,15 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -473,13 +475,15 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display"); var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
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");
var buttonplus = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit"); var buttonplusr = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_right");
var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left");
divdisplay.set('style', 'display:inline;color:' + this.get_color() + ';'); divdisplay.set('style', 'display:inline;color:' + this.get_color() + ';');
buttonrender.show(); buttonrender.show();
buttonadd.show(); buttonadd.show();
if (buttonplus) { if (buttonplusr) {
buttonplus.hide(); buttonplusr.hide();
} }
buttonplusl.hide();
}, },
/** /**
* Delete an annotation * Delete an annotation
......
...@@ -154,42 +154,6 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -154,42 +154,6 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, M.assignfeedback_editpdfplus.annotation, {
divdisplay.append(divcartridge); divdisplay.append(divcartridge);
//creation input //creation input
/*var divconteneur = "<div ";
divconteneur += "class='assignfeedback_editpdfplus_hightlightplus_conteneur' >";
divconteneur += "</div>";
var divconteneurdisplay = Y.Node.create(divconteneur);*/
//divconteneurdisplay.on('click', this.edit_annot, this);
/*var divinputdisplay = this.get_div_input(colorcartridge);
divinputdisplay.addClass('assignfeedback_editpdfplus_hightlightplus_input');
var inputvalref = this.get_input_valref();
var onof = 0;
if (this.displaylock === '1') {
onof = 1;
}
var inputonof = Y.Node.create("<input type='hidden' id='" + this.divcartridge + "_onof' value=" + onof + " />");
divinputdisplay.on('click', this.edit_annot, this);
var buttonvisibility = "<button id='" + this.divcartridge + "_buttonedit' ";
buttonvisibility += "><img src='";
if (this.displaylock === 1) {
buttonvisibility += M.util.image_url('t/left', 'core');
} else {
buttonvisibility += M.util.image_url('t/right', 'core');
}
buttonvisibility += "' /></button>";
var buttonvisibilitydisplay = Y.Node.create(buttonvisibility);
buttonvisibilitydisplay.on('click', this.change_visibility_annot, this);
var buttonsave = "<button id='" + this.divcartridge + "_buttonsave' style='display:none;margin-left:110px;'><img src='" + M.util.image_url('t/check', 'core') + "' /></button>";
var buttonsavedisplay = Y.Node.create(buttonsave);
buttonsavedisplay.on('click', this.save_annot, this, null);
var buttoncancel = "<button id='" + this.divcartridge + "_buttoncancel' style='display:none;'><img src='" + M.util.image_url('t/reset', 'core') + "' /></button>";
var buttoncanceldisplay = Y.Node.create(buttoncancel);
buttoncanceldisplay.on('click', this.cancel_edit, this);
divconteneurdisplay.append(divinputdisplay);
divconteneurdisplay.append(inputvalref);
divconteneurdisplay.append(inputonof);
divconteneurdisplay.append(buttonvisibilitydisplay);
divconteneurdisplay.append(buttonsavedisplay);
divconteneurdisplay.append(buttoncanceldisplay);*/
var divconteneurdisplay = this.get_div_container(colorcartridge); var divconteneurdisplay = this.get_div_container(colorcartridge);
divdisplay.append(divconteneurdisplay); divdisplay.append(divconteneurdisplay);
if (this.tooltype.reply===1) { if (this.tooltype.reply===1) {
...@@ -199,7 +163,6 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -199,7 +163,6 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, M.assignfeedback_editpdfplus.annotation, {
//creation de la div d'edition //creation de la div d'edition
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
var diveditiondisplay = this.get_div_edition(); var diveditiondisplay = this.get_div_edition();
//diveditiondisplay.addClass('assignfeedback_editpdfplus_hightlightplus_edition');
divconteneurdisplay.append(diveditiondisplay); divconteneurdisplay.append(diveditiondisplay);
} }
......
...@@ -158,44 +158,6 @@ Y.extend(ANNOTATIONSTAMPCOMMENT, M.assignfeedback_editpdfplus.annotation, { ...@@ -158,44 +158,6 @@ Y.extend(ANNOTATIONSTAMPCOMMENT, M.assignfeedback_editpdfplus.annotation, {
//creation input //creation input
var divconteneurdisplay = this.get_div_container(colorcartridge); var divconteneurdisplay = this.get_div_container(colorcartridge);
divdisplay.append(divconteneurdisplay); divdisplay.append(divconteneurdisplay);
/*var divconteneur = "<div ";
divconteneur += "class='assignfeedback_editpdfplus_stampcomment_conteneur' >";
divconteneur += "</div>";
var divconteneurdisplay = Y.Node.create(divconteneur);
var divinputdisplay = this.get_div_input(colorcartridge);
divinputdisplay.addClass('assignfeedback_editpdfplus_stampcomment_input');
var inputvalref = this.get_input_valref();
var onof = 0;
if (this.displaylock === '1') {
onof = 1;
}
var inputonof = Y.Node.create("<input type='hidden' id='" + this.divcartridge + "_onof' value=" + onof + " />");
divinputdisplay.on('click', this.edit_annot, this);
var buttonvisibility = "<button id='" + this.divcartridge + "_buttonedit' ";
buttonvisibility += "><img src='";