Gitlab CSE Unil

Commit 8a960ed9 authored by M. Chardon's avatar M. Chardon
Browse files

selection d'une question/réponse dans les annotations

parent 15a2401d
...@@ -80,6 +80,7 @@ class annotation { ...@@ -80,6 +80,7 @@ class annotation {
/** @var int $parent_annot */ /** @var int $parent_annot */
public $parent_annot = 0; public $parent_annot = 0;
public $answerrequested = 0;
/** /**
* Convert a compatible stdClass into an instance of this class. * Convert a compatible stdClass into an instance of this class.
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
viewBox="0 0 16 16"
preserveAspectRatio="xMinYMid meet"
overflow="visible"
id="svg2"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="help_no.svg"
inkscape:export-filename="/var/www/html/moodle/mod/assign/feedback/editpdfplus/pix/help_no.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="808"
inkscape:window-height="480"
id="namedview6"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="8.0677966"
inkscape:cy="8"
inkscape:window-x="1084"
inkscape:window-y="166"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<path
d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6zM5.8 6.6c-.6 0-1-.4-1-1C4.7 4.5 5.9 3 8.1 3c1.4 0 3.4 1 3.4 2.6 0 .8-.5 1.5-1.5 1.9-1.5.5-.7 1.6-2 1.6-.6 0-1-.3-1-.9 0-1.2 1.2-1.8 1.2-3 0-.3-.1-.7-.5-.7s-.4.4-.4.7c-.1.9-.6 1.4-1.5 1.4zm2.1 6.5c-.8 0-1.5-.7-1.5-1.5S7 10 7.9 10c.8 0 1.5.7 1.5 1.5s-.7 1.6-1.5 1.6z"
fill="#999"
id="path4" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:0.6859504"
d="M 0.20338983,15.864407 C 15.932203,0.20338983 15.932203,0.20338983 15.932203,0.20338983"
id="path3338"
inkscape:connector-curvature="0" />
</svg>
...@@ -665,6 +665,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -665,6 +665,7 @@ Y.extend(ANNOTATION, Y.Base, {
shape_id: '', shape_id: '',
cartridgex: 0, cartridgex: 0,
cartridgey: 0, cartridgey: 0,
answerrequested: 0,
/** /**
* Initialise the annotation. * Initialise the annotation.
* *
...@@ -715,6 +716,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -715,6 +716,7 @@ Y.extend(ANNOTATION, Y.Base, {
this.borderstyle = config.borderstyle || 'solid'; this.borderstyle = config.borderstyle || 'solid';
this.parent_annot = config.parent_annot; this.parent_annot = config.parent_annot;
this.id = config.id; this.id = config.id;
this.answerrequested = parseInt(config.answerrequested, 10) || 0;
} }
this.tooltypefamille = this.editor.typetools[this.tooltype.type]; this.tooltypefamille = this.editor.typetools[this.tooltype.type];
}, },
...@@ -765,7 +767,8 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -765,7 +767,8 @@ Y.extend(ANNOTATION, Y.Base, {
borderstyle: this.borderstyle, borderstyle: this.borderstyle,
parent_annot: this.parent_annot, parent_annot: this.parent_annot,
divcartridge: this.divcartridge, divcartridge: this.divcartridge,
parent_annot_div: '' parent_annot_div: '',
answerrequested: parseInt(this.answerrequested)
}; };
}, },
get_color: function () { get_color: function () {
...@@ -881,6 +884,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -881,6 +884,7 @@ Y.extend(ANNOTATION, Y.Base, {
divconteneurdisplay.append(divinputdisplay); divconteneurdisplay.append(divinputdisplay);
divconteneurdisplay.append(inputvalref); divconteneurdisplay.append(inputvalref);
divconteneurdisplay.append(inputonof); divconteneurdisplay.append(inputonof);
divconteneurdisplay.append(this.get_input_question());
var readonly = this.editor.get('readonly'); var readonly = this.editor.get('readonly');
if (!readonly) { if (!readonly) {
...@@ -888,6 +892,9 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -888,6 +892,9 @@ Y.extend(ANNOTATION, Y.Base, {
divconteneurdisplay.append(this.get_button_visibility_right()); 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());
if (this.tooltype.reply === 1) {
divconteneurdisplay.append(this.get_button_question());
}
} }
return divconteneurdisplay; return divconteneurdisplay;
...@@ -910,19 +917,6 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -910,19 +917,6 @@ Y.extend(ANNOTATION, Y.Base, {
buttonvisibilitydisplay.on('click', this.change_visibility_annot, this, 'l'); 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);
...@@ -936,11 +930,18 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -936,11 +930,18 @@ Y.extend(ANNOTATION, Y.Base, {
return buttoncanceldisplay; return buttoncanceldisplay;
}, },
get_button_question: function () { get_button_question: function () {
var buttonquestion = "<button id='" + this.divcartridge + "_buttonquestion' ><img src='" + M.util.image_url('help', 'core') + "' /><img src='" + M.util.image_url('t/stop', 'core') + "' /></button>"; var buttonquestion = "<button id='" + this.divcartridge + "_buttonquestion' style='display:none;margin-left:10px;'><img src='" + M.util.image_url('help_no', 'assignfeedback_editpdfplus') + "' /></button>";
var buttonquestiondisplay = Y.Node.create(buttonquestion); var buttonquestiondisplay = Y.Node.create(buttonquestion);
buttonquestiondisplay.on('click', this.change_question_status, this); buttonquestiondisplay.on('click', this.change_question_status, this);
return buttonquestiondisplay; return buttonquestiondisplay;
}, },
get_input_question: function () {
var qst = 0;
if (this.answerrequested && this.answerrequested === 1) {
qst = 1;
}
return Y.Node.create("<input type='hidden' id='" + this.divcartridge + "_question' value='" + qst + "'/>");
},
get_valref: function () { get_valref: function () {
if (this.textannot && this.textannot.length > 0 && typeof this.textannot === 'string') { if (this.textannot && this.textannot.length > 0 && typeof this.textannot === 'string') {
return this.textannot; return this.textannot;
...@@ -953,20 +954,10 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -953,20 +954,10 @@ Y.extend(ANNOTATION, Y.Base, {
apply_visibility_annot: function () { apply_visibility_annot: function () {
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 buttonplusr = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_right"); var buttonplusr = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_right");
var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left"); var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left");
if (valref === '') {
if (this.editor.get('readonly')) {
divdisplay.setContent('');
} else {
divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp');
}
}
if (interrupt.get('value') === '1') { if (interrupt.get('value') === '1') {
if (valref !== '') {
divdisplay.setContent(valref.substr(0, 20));
}
if (buttonplusr) { if (buttonplusr) {
buttonplusr.show(); buttonplusr.show();
} }
...@@ -974,9 +965,6 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -974,9 +965,6 @@ Y.extend(ANNOTATION, Y.Base, {
buttonplusl.show(); buttonplusl.show();
} }
} else if (interrupt.get('value') === '0') { } else if (interrupt.get('value') === '0') {
if (valref !== '') {
divdisplay.setContent('...');
}
if (buttonplusr) { if (buttonplusr) {
buttonplusr.show(); buttonplusr.show();
} }
...@@ -984,9 +972,6 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -984,9 +972,6 @@ Y.extend(ANNOTATION, Y.Base, {
buttonplusl.hide(); buttonplusl.hide();
} }
} else { } else {
if (valref !== '') {
divdisplay.setContent(valref);
}
if (buttonplusr) { if (buttonplusr) {
buttonplusr.hide(); buttonplusr.hide();
} }
...@@ -994,10 +979,31 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -994,10 +979,31 @@ Y.extend(ANNOTATION, Y.Base, {
buttonplusl.show(); buttonplusl.show();
} }
} }
divdisplay.setContent(this.get_text_to_diplay_in_cartridge());
if (this.tooltypefamille.label === 'frame') { if (this.tooltypefamille.label === 'frame') {
buttonplusr.hide(); buttonplusr.hide();
buttonplusl.hide(); buttonplusl.hide();
} }
this.apply_question_status();
},
get_text_to_diplay_in_cartridge: function () {
var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value');
var interrupt = this.editor.get_dialogue_element('#' + this.divcartridge + "_onof");
var finalcontent = "";
if (valref === '' && !this.editor.get('readonly')) {
finalcontent = '&nbsp;&nbsp;&nbsp;&nbsp';
}
if (interrupt.get('value') === '1' && valref !== '') {
finalcontent = valref.substr(0, 20);
} else if (interrupt.get('value') === '0' && valref !== '') {
finalcontent = '...';
} else if (valref !== '') {
finalcontent = valref;
}
if (!this.editor.get('readonly') && this.answerrequested === 1) {
finalcontent += '&nbsp;<span style="color:red;">[?]</span>';
}
return finalcontent;
}, },
change_visibility_annot: function (e, sens) { change_visibility_annot: function (e, sens) {
var interrupt = this.editor.get_dialogue_element('#' + this.divcartridge + "_onof"); var interrupt = this.editor.get_dialogue_element('#' + this.divcartridge + "_onof");
...@@ -1013,7 +1019,29 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1013,7 +1019,29 @@ Y.extend(ANNOTATION, Y.Base, {
this.editor.save_current_page(); this.editor.save_current_page();
}, },
change_question_status: function () { change_question_status: function () {
//var buttonquestion = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonquestion"); var questionvalue = this.editor.get_dialogue_element('#' + this.divcartridge + "_question");
var value = parseInt(questionvalue.get('value'));
var finalvalue = 0;
if (value === 0) {
finalvalue = 1;
}
questionvalue.set('value', finalvalue);
this.answerrequested = finalvalue;
this.apply_question_status();
this.editor.save_current_page();
},
apply_question_status: function () {
var buttonquestion = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonquestion");
var questionvalue = this.editor.get_dialogue_element('#' + this.divcartridge + "_question");
var value = parseInt(questionvalue.get('value'));
if (buttonquestion) {
if (value === 1) {
buttonquestion.one('img').setAttribute('src', M.util.image_url('help', 'core'));
} else {
buttonquestion.one('img').setAttribute('src', M.util.image_url('help_no', 'assignfeedback_editpdfplus'));
}
}
return;
}, },
move_cartridge_begin: function (e) { move_cartridge_begin: function (e) {
e.preventDefault(); e.preventDefault();
...@@ -1116,6 +1144,8 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1116,6 +1144,8 @@ Y.extend(ANNOTATION, Y.Base, {
var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left"); 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 buttonquestion = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonquestion");
var buttonrotation = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonrotation");
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 (buttonplusr) { if (buttonplusr) {
...@@ -1124,9 +1154,15 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1124,9 +1154,15 @@ Y.extend(ANNOTATION, Y.Base, {
if (buttonplusl) { if (buttonplusl) {
buttonplusl.hide(); buttonplusl.hide();
} }
if (buttonrotation) {
buttonrotation.hide();
}
divedit.show(); divedit.show();
buttonsave.show(); buttonsave.show();
buttoncancel.show(); buttoncancel.show();
if (buttonquestion) {
buttonquestion.show();
}
divprincipale.setStyle('z-index', 1000); divprincipale.setStyle('z-index', 1000);
input.set('focus', 'on'); input.set('focus', 'on');
...@@ -1177,13 +1213,21 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1177,13 +1213,21 @@ Y.extend(ANNOTATION, Y.Base, {
var divedit = this.editor.get_dialogue_element('#' + this.divcartridge + "_edit"); var divedit = this.editor.get_dialogue_element('#' + this.divcartridge + "_edit");
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 buttonrotation = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonrotation");
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 (buttonrotation) {
buttonrotation.show();
}
divedit.hide(); divedit.hide();
buttonsave.hide(); buttonsave.hide();
buttoncancel.hide(); buttoncancel.hide();
if (buttonquestion) {
buttonquestion.hide();
}
divprincipale.setStyle('z-index', 1); divprincipale.setStyle('z-index', 1);
this.enabled_canvas_event(); this.enabled_canvas_event();
...@@ -2117,9 +2161,6 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -2117,9 +2161,6 @@ Y.extend(ANNOTATIONHIGHLIGHTPLUS, 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);
if (this.tooltype.reply===1) {
divconteneurdisplay.append(this.get_button_question());
}
//creation de la div d'edition //creation de la div d'edition
if (!this.editor.get('readonly')) { if (!this.editor.get('readonly')) {
...@@ -3755,36 +3796,20 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, { ...@@ -3755,36 +3796,20 @@ Y.extend(ANNOTATIONCOMMENTPLUS, M.assignfeedback_editpdfplus.annotation, {
return true; return true;
}, },
apply_visibility_annot: function () { apply_visibility_annot: function () {
ANNOTATIONCOMMENTPLUS.superclass.apply_visibility_annot.apply(this);
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 buttonplusr = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_right"); var buttonplusr = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_right");
var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left"); var buttonplusl = this.editor.get_dialogue_element('#' + this.divcartridge + "_buttonedit_left");
if (valref === '') { buttonplusr.one('img').setAttribute('src', M.util.image_url('t/down', 'core'));
if (this.editor.get('readonly')) { buttonplusl.one('img').setAttribute('src', M.util.image_url('t/up', 'core'));
divdisplay.setContent(''); if (interrupt.get('value') === '2'){
} else { divdisplay.setContent('<table><tr><td>' + this.get_text_to_diplay_in_cartridge().replace(/\n/g, "<br/>") + '</td></tr></table><br/>');
divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp'); } else if (interrupt.get('value') === '1'){
} buttonplusl.one('img').setAttribute('src', M.util.image_url('t/left', 'core'));
} } else if (interrupt.get('value') === '0'){
if (interrupt.get('value') === '0') { buttonplusr.one('img').setAttribute('src', M.util.image_url('t/right', 'core'));
if (valref !== '') {
divdisplay.setContent(valref.substr(0, 20));
}
if (buttonplusr) {
buttonplusr.one('img').setAttribute('src', M.util.image_url('t/down', 'core'));
buttonplusr.show();
}
buttonplusl.hide();
} else {
if (valref !== '') {
divdisplay.setContent('<table><tr><td>' + valref.replace(/\n/g, "<br/>") + '</td></tr></table><br/>');
}
if (buttonplusl) {
buttonplusl.one('img').setAttribute('src', M.util.image_url('t/up', 'core'));
buttonplusl.show();
}
buttonplusr.hide();
} }
}, },
save_annot: function () { save_annot: function () {
......
...@@ -665,6 +665,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -665,6 +665,7 @@ Y.extend(ANNOTATION, Y.Base, {
shape_id: '', shape_id: '',
cartridgex: 0, cartridgex: 0,
cartridgey: 0, cartridgey: 0,
answerrequested: 0,
/** /**
* Initialise the annotation. * Initialise the annotation.
* *
...@@ -715,6 +716,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -715,6 +716,7 @@ Y.extend(ANNOTATION, Y.Base, {
this.borderstyle = config.borderstyle || 'solid'; this.borderstyle = config.borderstyle || 'solid';
this.parent_annot = config.parent_annot; this.parent_annot = config.parent_annot;
this.id = config.id; this.id = config.id;
this.answerrequested = parseInt(config.answerrequested, 10) || 0;
} }
this.tooltypefamille = this.editor.typetools[this.tooltype.type]; this.tooltypefamille = this.editor.typetools[this.tooltype.type];
}, },
...@@ -765,7 +767,8 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -765,7 +767,8 @@ Y.extend(ANNOTATION, Y.Base, {
borderstyle: this.borderstyle, borderstyle: this.borderstyle,
parent_annot: this.parent_annot, parent_annot: this.parent_annot,
divcartridge: this.divcartridge, divcartridge: this.divcartridge,
parent_annot_div: '' parent_annot_div: '',
answerrequested: parseInt(this.answerrequested)
}; };
}, },
get_color: function () { get_color: function () {
...@@ -881,6 +884,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -881,6 +884,7 @@ Y.extend(ANNOTATION, Y.Base, {
divconteneurdisplay.append(divinputdisplay); divconteneurdisplay.append(divinputdisplay);
divconteneurdisplay.append(inputvalref); divconteneurdisplay.append(inputvalref);
divconteneurdisplay.append(inputonof); divconteneurdisplay.append(inputonof);
divconteneurdisplay.append(this.get_input_question());
var readonly = this.editor.get('readonly'); var readonly = this.editor.get('readonly');
if (!readonly) { if (!readonly) {
...@@ -888,6 +892,9 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -888,6 +892,9 @@ Y.extend(ANNOTATION, Y.Base, {
divconteneurdisplay.append(this.get_button_visibility_right()); 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());
if (this.tooltype.reply === 1) {
divconteneurdisplay.append(this.get_button_question());
}
} }
return divconteneurdisplay; return divconteneurdisplay;
...@@ -910,19 +917,6 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -910,19 +917,6 @@ Y.extend(ANNOTATION, Y.Base, {
buttonvisibilitydisplay.on('click', this.change_visibility_annot, this, 'l'); buttonvisibilitydisplay.on('click', this.change_visibility_annot, this, 'l');
return buttonvisibilitydisplay; return buttonvisibilitydisplay;
}, },
/*get_button_visibility: function () {
var buttonvisibility = "<button id='" + this.divcartridge + "_buttonedit' ";