Gitlab CSE Unil

Commit 9ce719e9 authored by M. Chardon's avatar M. Chardon
Browse files

vue lecture étudiante : propre, sans interaction et bouton

parent 779534ef
...@@ -805,7 +805,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -805,7 +805,7 @@ Y.extend(ANNOTATION, Y.Base, {
div += "</div>"; div += "</div>";
return Y.Node.create(div); return Y.Node.create(div);
}, },
get_div_cartridge_label: function (colorcartridge) { get_div_cartridge_label: function (colorcartridge, draggable) {
var divcartridge = "<div "; var divcartridge = "<div ";
divcartridge += "id='" + this.divcartridge + "_cartridge' "; divcartridge += "id='" + this.divcartridge + "_cartridge' ";
divcartridge += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_cartridge' "; divcartridge += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_cartridge' ";
...@@ -817,7 +817,12 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -817,7 +817,12 @@ Y.extend(ANNOTATION, Y.Base, {
divcartridge += "> "; divcartridge += "> ";
divcartridge += this.tooltype.cartridge; divcartridge += this.tooltype.cartridge;
divcartridge += "</div>"; divcartridge += "</div>";
return Y.Node.create(divcartridge); var divcartridgedisplay = Y.Node.create(divcartridge);
if (draggable && !this.editor.get('readonly')) {
divcartridgedisplay.on('mousedown', this.move_cartridge_begin, this);
return divcartridgedisplay;
}
return divcartridgedisplay;
}, },
get_div_input: function (colorcartridge) { get_div_input: function (colorcartridge) {
var divinput = "<div "; var divinput = "<div ";
...@@ -2987,11 +2992,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -2987,11 +2992,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var divdisplay = this.get_div_cartridge(colorcartridge); var divdisplay = this.get_div_cartridge(colorcartridge);
divdisplay.addClass('assignfeedback_editpdfplus_frame'); divdisplay.addClass('assignfeedback_editpdfplus_frame');
divdisplay.setStyles({'border-style': this.borderstyle}); divdisplay.setStyles({'border-style': this.borderstyle});
divdisplay.set('draggable', 'true'); //divdisplay.set('draggable', 'true');
// inscription entete // inscription entete
var divcartridge = this.get_div_cartridge_label(colorcartridge); var divcartridge = this.get_div_cartridge_label(colorcartridge, true);
divcartridge.on('mousedown', this.move_cartridge_begin, this);
divdisplay.append(divcartridge); divdisplay.append(divcartridge);
//creation input //creation input
...@@ -3147,18 +3151,18 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3147,18 +3151,18 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
this.editor.save_current_page(); this.editor.save_current_page();
}, },
/*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 valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value'); var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value');
if (valref === '') { if (valref === '') {
if (this.editor.get('readonly')) { if (this.editor.get('readonly')) {
divdisplay.setContent(''); divdisplay.setContent('');
} else { } else {
divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp'); divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp');
} }
} else if (valref !== '') { } else if (valref !== '') {
divdisplay.setContent(valref); divdisplay.setContent(valref);
} }
},*/ },*/
add_annot: function (e) { add_annot: function (e) {
this.editor.currentedit.parent_annot_element = this; this.editor.currentedit.parent_annot_element = this;
this.editor.handle_tool_button(e, TOOLTYPELIB.FRAME, 'ctbutton' + this.toolid, 1); this.editor.handle_tool_button(e, TOOLTYPELIB.FRAME, 'ctbutton' + this.toolid, 1);
...@@ -3502,8 +3506,7 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, { ...@@ -3502,8 +3506,7 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, {
divdisplay.addClass('assignfeedback_editpdfplus_verticalline'); divdisplay.addClass('assignfeedback_editpdfplus_verticalline');
// inscription entete // inscription entete
var divcartridge = this.get_div_cartridge_label(colorcartridge); var divcartridge = this.get_div_cartridge_label(colorcartridge, true);
divcartridge.on('mousedown', this.move_cartridge_begin, this);
divdisplay.append(divcartridge); divdisplay.append(divcartridge);
//creation input //creation input
......
...@@ -805,7 +805,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -805,7 +805,7 @@ Y.extend(ANNOTATION, Y.Base, {
div += "</div>"; div += "</div>";
return Y.Node.create(div); return Y.Node.create(div);
}, },
get_div_cartridge_label: function (colorcartridge) { get_div_cartridge_label: function (colorcartridge, draggable) {
var divcartridge = "<div "; var divcartridge = "<div ";
divcartridge += "id='" + this.divcartridge + "_cartridge' "; divcartridge += "id='" + this.divcartridge + "_cartridge' ";
divcartridge += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_cartridge' "; divcartridge += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_cartridge' ";
...@@ -817,7 +817,12 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -817,7 +817,12 @@ Y.extend(ANNOTATION, Y.Base, {
divcartridge += "> "; divcartridge += "> ";
divcartridge += this.tooltype.cartridge; divcartridge += this.tooltype.cartridge;
divcartridge += "</div>"; divcartridge += "</div>";
return Y.Node.create(divcartridge); var divcartridgedisplay = Y.Node.create(divcartridge);
if (draggable && !this.editor.get('readonly')) {
divcartridgedisplay.on('mousedown', this.move_cartridge_begin, this);
return divcartridgedisplay;
}
return divcartridgedisplay;
}, },
get_div_input: function (colorcartridge) { get_div_input: function (colorcartridge) {
var divinput = "<div "; var divinput = "<div ";
...@@ -2985,11 +2990,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -2985,11 +2990,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var divdisplay = this.get_div_cartridge(colorcartridge); var divdisplay = this.get_div_cartridge(colorcartridge);
divdisplay.addClass('assignfeedback_editpdfplus_frame'); divdisplay.addClass('assignfeedback_editpdfplus_frame');
divdisplay.setStyles({'border-style': this.borderstyle}); divdisplay.setStyles({'border-style': this.borderstyle});
divdisplay.set('draggable', 'true'); //divdisplay.set('draggable', 'true');
// inscription entete // inscription entete
var divcartridge = this.get_div_cartridge_label(colorcartridge); var divcartridge = this.get_div_cartridge_label(colorcartridge, true);
divcartridge.on('mousedown', this.move_cartridge_begin, this);
divdisplay.append(divcartridge); divdisplay.append(divcartridge);
//creation input //creation input
...@@ -3145,18 +3149,18 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3145,18 +3149,18 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
this.editor.save_current_page(); this.editor.save_current_page();
}, },
/*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 valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value'); var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value');
if (valref === '') { if (valref === '') {
if (this.editor.get('readonly')) { if (this.editor.get('readonly')) {
divdisplay.setContent(''); divdisplay.setContent('');
} else { } else {
divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp'); divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp');
} }
} else if (valref !== '') { } else if (valref !== '') {
divdisplay.setContent(valref); divdisplay.setContent(valref);
} }
},*/ },*/
add_annot: function (e) { add_annot: function (e) {
this.editor.currentedit.parent_annot_element = this; this.editor.currentedit.parent_annot_element = this;
this.editor.handle_tool_button(e, TOOLTYPELIB.FRAME, 'ctbutton' + this.toolid, 1); this.editor.handle_tool_button(e, TOOLTYPELIB.FRAME, 'ctbutton' + this.toolid, 1);
...@@ -3498,8 +3502,7 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, { ...@@ -3498,8 +3502,7 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, {
divdisplay.addClass('assignfeedback_editpdfplus_verticalline'); divdisplay.addClass('assignfeedback_editpdfplus_verticalline');
// inscription entete // inscription entete
var divcartridge = this.get_div_cartridge_label(colorcartridge); var divcartridge = this.get_div_cartridge_label(colorcartridge, true);
divcartridge.on('mousedown', this.move_cartridge_begin, this);
divdisplay.append(divcartridge); divdisplay.append(divcartridge);
//creation input //creation input
......
...@@ -264,7 +264,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -264,7 +264,7 @@ Y.extend(ANNOTATION, Y.Base, {
div += "</div>"; div += "</div>";
return Y.Node.create(div); return Y.Node.create(div);
}, },
get_div_cartridge_label: function (colorcartridge) { get_div_cartridge_label: function (colorcartridge, draggable) {
var divcartridge = "<div "; var divcartridge = "<div ";
divcartridge += "id='" + this.divcartridge + "_cartridge' "; divcartridge += "id='" + this.divcartridge + "_cartridge' ";
divcartridge += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_cartridge' "; divcartridge += "class='assignfeedback_editpdfplus_" + this.tooltypefamille.label + "_cartridge' ";
...@@ -276,7 +276,12 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -276,7 +276,12 @@ Y.extend(ANNOTATION, Y.Base, {
divcartridge += "> "; divcartridge += "> ";
divcartridge += this.tooltype.cartridge; divcartridge += this.tooltype.cartridge;
divcartridge += "</div>"; divcartridge += "</div>";
return Y.Node.create(divcartridge); var divcartridgedisplay = Y.Node.create(divcartridge);
if (draggable && !this.editor.get('readonly')) {
divcartridgedisplay.on('mousedown', this.move_cartridge_begin, this);
return divcartridgedisplay;
}
return divcartridgedisplay;
}, },
get_div_input: function (colorcartridge) { get_div_input: function (colorcartridge) {
var divinput = "<div "; var divinput = "<div ";
......
...@@ -198,11 +198,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -198,11 +198,10 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var divdisplay = this.get_div_cartridge(colorcartridge); var divdisplay = this.get_div_cartridge(colorcartridge);
divdisplay.addClass('assignfeedback_editpdfplus_frame'); divdisplay.addClass('assignfeedback_editpdfplus_frame');
divdisplay.setStyles({'border-style': this.borderstyle}); divdisplay.setStyles({'border-style': this.borderstyle});
divdisplay.set('draggable', 'true'); //divdisplay.set('draggable', 'true');
// inscription entete // inscription entete
var divcartridge = this.get_div_cartridge_label(colorcartridge); var divcartridge = this.get_div_cartridge_label(colorcartridge, true);
divcartridge.on('mousedown', this.move_cartridge_begin, this);
divdisplay.append(divcartridge); divdisplay.append(divcartridge);
//creation input //creation input
...@@ -358,18 +357,18 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -358,18 +357,18 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
this.editor.save_current_page(); this.editor.save_current_page();
}, },
/*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 valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value'); var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value');
if (valref === '') { if (valref === '') {
if (this.editor.get('readonly')) { if (this.editor.get('readonly')) {
divdisplay.setContent(''); divdisplay.setContent('');
} else { } else {
divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp'); divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp');
} }
} else if (valref !== '') { } else if (valref !== '') {
divdisplay.setContent(valref); divdisplay.setContent(valref);
} }
},*/ },*/
add_annot: function (e) { add_annot: function (e) {
this.editor.currentedit.parent_annot_element = this; this.editor.currentedit.parent_annot_element = this;
this.editor.handle_tool_button(e, TOOLTYPELIB.FRAME, 'ctbutton' + this.toolid, 1); this.editor.handle_tool_button(e, TOOLTYPELIB.FRAME, 'ctbutton' + this.toolid, 1);
......
...@@ -160,8 +160,7 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, { ...@@ -160,8 +160,7 @@ Y.extend(ANNOTATIONVERTICALLINE, M.assignfeedback_editpdfplus.annotation, {
divdisplay.addClass('assignfeedback_editpdfplus_verticalline'); divdisplay.addClass('assignfeedback_editpdfplus_verticalline');
// inscription entete // inscription entete
var divcartridge = this.get_div_cartridge_label(colorcartridge); var divcartridge = this.get_div_cartridge_label(colorcartridge, true);
divcartridge.on('mousedown', this.move_cartridge_begin, this);
divdisplay.append(divcartridge); divdisplay.append(divcartridge);
//creation input //creation input
......
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