Gitlab CSE Unil

Commit 7dde37e2 authored by M. Chardon's avatar M. Chardon
Browse files

correction bug frame

parent 48ad08c8
...@@ -1105,12 +1105,6 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1105,12 +1105,6 @@ Y.extend(ANNOTATION, Y.Base, {
this.apply_visibility_annot(); this.apply_visibility_annot();
}, },
cancel_edit: function (e, clickType) { cancel_edit: function (e, clickType) {
/*Y.log('cancel_edit : ' + clickType);
if (this.editor.currentannotation === this) {
Y.log('cancel_edit : mm');
} else {
Y.log('cancel_edit : different');
}*/
if (!(clickType === 'clickoutside' && this.editor.currentannotation === this)) { if (!(clickType === 'clickoutside' && this.editor.currentannotation === this)) {
var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref"); var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref");
var input = this.editor.get_dialogue_element('#' + this.divcartridge + "_editinput"); var input = this.editor.get_dialogue_element('#' + this.divcartridge + "_editinput");
...@@ -1122,6 +1116,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1122,6 +1116,7 @@ Y.extend(ANNOTATION, Y.Base, {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
divprincipale.detach(); divprincipale.detach();
} }
return;
}, },
hide_edit: function () { hide_edit: function () {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
...@@ -3062,17 +3057,17 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3062,17 +3057,17 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var diveditionframedisplay = Y.Node.create("<div style='display:inline-block;vertical-align:top;'></div>"); var diveditionframedisplay = Y.Node.create("<div style='display:inline-block;vertical-align:top;'></div>");
diveditionrenderdisplay.append(diveditioncolordisplay); diveditionrenderdisplay.append(diveditioncolordisplay);
diveditionrenderdisplay.append(diveditionframedisplay); diveditionrenderdisplay.append(diveditionframedisplay);
var diveditionwhitedisplay = Y.Node.create("<div style='margin:5px;background-color:#FFFFFF;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionwhitedisplay = Y.Node.create("<div style='margin:5px;background-color:white;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionwhitedisplay.on('click', this.change_color, this, 'white'); diveditionwhitedisplay.on('click', this.change_color, this, 'white');
var diveditionyellowdisplay = Y.Node.create("<div style='margin:5px;background-color:#FFCF35;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionyellowdisplay = Y.Node.create("<div style='margin:5px;background-color:orange;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionyellowdisplay.on('click', this.change_color, this, '#FFCF35'); diveditionyellowdisplay.on('click', this.change_color, this, 'orange');
var diveditionreddisplay = Y.Node.create("<div style='margin:5px;background-color:#EF4540;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionreddisplay = Y.Node.create("<div style='margin:5px;background-color:red;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionreddisplay.on('click', this.change_color, this, '#EF4540'); diveditionreddisplay.on('click', this.change_color, this, 'red');
var diveditiongreendisplay = Y.Node.create("<div style='margin:5px;background-color:#99CA3E;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditiongreendisplay = Y.Node.create("<div style='margin:5px;background-color:green;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditiongreendisplay.on('click', this.change_color, this, '#99CA3E'); diveditiongreendisplay.on('click', this.change_color, this, 'green');
var diveditionbluedisplay = Y.Node.create("<div style='margin:5px;background-color:#7D9FD3;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionbluedisplay = Y.Node.create("<div style='margin:5px;background-color:blue;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionbluedisplay.on('click', this.change_color, this, '#7D9FD3'); diveditionbluedisplay.on('click', this.change_color, this, 'blue');
var diveditionblackdisplay = Y.Node.create("<div style='margin:5px;background-color:#333333;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionblackdisplay = Y.Node.create("<div style='margin:5px;background-color:black;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionblackdisplay.on('click', this.change_color, this, 'black'); diveditionblackdisplay.on('click', this.change_color, this, 'black');
diveditioncolordisplay.append(diveditionwhitedisplay); diveditioncolordisplay.append(diveditionwhitedisplay);
diveditioncolordisplay.append(diveditionyellowdisplay); diveditioncolordisplay.append(diveditionyellowdisplay);
...@@ -3158,19 +3153,6 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3158,19 +3153,6 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
this.editor.save_current_page(); this.editor.save_current_page();
}, },
/*apply_visibility_annot: function () {
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value');
if (valref === '') {
if (this.editor.get('readonly')) {
divdisplay.setContent('');
} else {
divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp');
}
} else if (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);
...@@ -3288,9 +3270,13 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3288,9 +3270,13 @@ 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");
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) {
buttonplus.hide();
}
}, },
/** /**
* Delete an annotation * Delete an annotation
......
...@@ -1105,9 +1105,6 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1105,9 +1105,6 @@ Y.extend(ANNOTATION, Y.Base, {
this.apply_visibility_annot(); this.apply_visibility_annot();
}, },
cancel_edit: function (e, clickType) { cancel_edit: function (e, clickType) {
if (this.editor.currentannotation === this) {
} else {
}*/
if (!(clickType === 'clickoutside' && this.editor.currentannotation === this)) { if (!(clickType === 'clickoutside' && this.editor.currentannotation === this)) {
var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref"); var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref");
var input = this.editor.get_dialogue_element('#' + this.divcartridge + "_editinput"); var input = this.editor.get_dialogue_element('#' + this.divcartridge + "_editinput");
...@@ -1119,6 +1116,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1119,6 +1116,7 @@ Y.extend(ANNOTATION, Y.Base, {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
divprincipale.detach(); divprincipale.detach();
} }
return;
}, },
hide_edit: function () { hide_edit: function () {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
...@@ -3057,17 +3055,17 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3057,17 +3055,17 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var diveditionframedisplay = Y.Node.create("<div style='display:inline-block;vertical-align:top;'></div>"); var diveditionframedisplay = Y.Node.create("<div style='display:inline-block;vertical-align:top;'></div>");
diveditionrenderdisplay.append(diveditioncolordisplay); diveditionrenderdisplay.append(diveditioncolordisplay);
diveditionrenderdisplay.append(diveditionframedisplay); diveditionrenderdisplay.append(diveditionframedisplay);
var diveditionwhitedisplay = Y.Node.create("<div style='margin:5px;background-color:#FFFFFF;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionwhitedisplay = Y.Node.create("<div style='margin:5px;background-color:white;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionwhitedisplay.on('click', this.change_color, this, 'white'); diveditionwhitedisplay.on('click', this.change_color, this, 'white');
var diveditionyellowdisplay = Y.Node.create("<div style='margin:5px;background-color:#FFCF35;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionyellowdisplay = Y.Node.create("<div style='margin:5px;background-color:orange;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionyellowdisplay.on('click', this.change_color, this, '#FFCF35'); diveditionyellowdisplay.on('click', this.change_color, this, 'orange');
var diveditionreddisplay = Y.Node.create("<div style='margin:5px;background-color:#EF4540;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionreddisplay = Y.Node.create("<div style='margin:5px;background-color:red;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionreddisplay.on('click', this.change_color, this, '#EF4540'); diveditionreddisplay.on('click', this.change_color, this, 'red');
var diveditiongreendisplay = Y.Node.create("<div style='margin:5px;background-color:#99CA3E;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditiongreendisplay = Y.Node.create("<div style='margin:5px;background-color:green;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditiongreendisplay.on('click', this.change_color, this, '#99CA3E'); diveditiongreendisplay.on('click', this.change_color, this, 'green');
var diveditionbluedisplay = Y.Node.create("<div style='margin:5px;background-color:#7D9FD3;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionbluedisplay = Y.Node.create("<div style='margin:5px;background-color:blue;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionbluedisplay.on('click', this.change_color, this, '#7D9FD3'); diveditionbluedisplay.on('click', this.change_color, this, 'blue');
var diveditionblackdisplay = Y.Node.create("<div style='margin:5px;background-color:#333333;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionblackdisplay = Y.Node.create("<div style='margin:5px;background-color:black;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionblackdisplay.on('click', this.change_color, this, 'black'); diveditionblackdisplay.on('click', this.change_color, this, 'black');
diveditioncolordisplay.append(diveditionwhitedisplay); diveditioncolordisplay.append(diveditionwhitedisplay);
diveditioncolordisplay.append(diveditionyellowdisplay); diveditioncolordisplay.append(diveditionyellowdisplay);
...@@ -3153,19 +3151,6 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3153,19 +3151,6 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
this.editor.save_current_page(); this.editor.save_current_page();
}, },
/*apply_visibility_annot: function () {
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value');
if (valref === '') {
if (this.editor.get('readonly')) {
divdisplay.setContent('');
} else {
divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp');
}
} else if (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);
...@@ -3282,9 +3267,13 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -3282,9 +3267,13 @@ 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");
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) {
buttonplus.hide();
}
}, },
/** /**
* Delete an annotation * Delete an annotation
......
...@@ -564,12 +564,6 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -564,12 +564,6 @@ Y.extend(ANNOTATION, Y.Base, {
this.apply_visibility_annot(); this.apply_visibility_annot();
}, },
cancel_edit: function (e, clickType) { cancel_edit: function (e, clickType) {
/*Y.log('cancel_edit : ' + clickType);
if (this.editor.currentannotation === this) {
Y.log('cancel_edit : mm');
} else {
Y.log('cancel_edit : different');
}*/
if (!(clickType === 'clickoutside' && this.editor.currentannotation === this)) { if (!(clickType === 'clickoutside' && this.editor.currentannotation === this)) {
var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref"); var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref");
var input = this.editor.get_dialogue_element('#' + this.divcartridge + "_editinput"); var input = this.editor.get_dialogue_element('#' + this.divcartridge + "_editinput");
...@@ -581,6 +575,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -581,6 +575,7 @@ Y.extend(ANNOTATION, Y.Base, {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
divprincipale.detach(); divprincipale.detach();
} }
return;
}, },
hide_edit: function () { hide_edit: function () {
var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge); var divprincipale = this.editor.get_dialogue_element('#' + this.divcartridge);
......
...@@ -260,17 +260,17 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -260,17 +260,17 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
var diveditionframedisplay = Y.Node.create("<div style='display:inline-block;vertical-align:top;'></div>"); var diveditionframedisplay = Y.Node.create("<div style='display:inline-block;vertical-align:top;'></div>");
diveditionrenderdisplay.append(diveditioncolordisplay); diveditionrenderdisplay.append(diveditioncolordisplay);
diveditionrenderdisplay.append(diveditionframedisplay); diveditionrenderdisplay.append(diveditionframedisplay);
var diveditionwhitedisplay = Y.Node.create("<div style='margin:5px;background-color:#FFFFFF;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionwhitedisplay = Y.Node.create("<div style='margin:5px;background-color:white;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionwhitedisplay.on('click', this.change_color, this, 'white'); diveditionwhitedisplay.on('click', this.change_color, this, 'white');
var diveditionyellowdisplay = Y.Node.create("<div style='margin:5px;background-color:#FFCF35;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionyellowdisplay = Y.Node.create("<div style='margin:5px;background-color:orange;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionyellowdisplay.on('click', this.change_color, this, '#FFCF35'); diveditionyellowdisplay.on('click', this.change_color, this, 'orange');
var diveditionreddisplay = Y.Node.create("<div style='margin:5px;background-color:#EF4540;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionreddisplay = Y.Node.create("<div style='margin:5px;background-color:red;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionreddisplay.on('click', this.change_color, this, '#EF4540'); diveditionreddisplay.on('click', this.change_color, this, 'red');
var diveditiongreendisplay = Y.Node.create("<div style='margin:5px;background-color:#99CA3E;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditiongreendisplay = Y.Node.create("<div style='margin:5px;background-color:green;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditiongreendisplay.on('click', this.change_color, this, '#99CA3E'); diveditiongreendisplay.on('click', this.change_color, this, 'green');
var diveditionbluedisplay = Y.Node.create("<div style='margin:5px;background-color:#7D9FD3;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionbluedisplay = Y.Node.create("<div style='margin:5px;background-color:blue;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionbluedisplay.on('click', this.change_color, this, '#7D9FD3'); diveditionbluedisplay.on('click', this.change_color, this, 'blue');
var diveditionblackdisplay = Y.Node.create("<div style='margin:5px;background-color:#333333;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>"); var diveditionblackdisplay = Y.Node.create("<div style='margin:5px;background-color:black;border:2px solid #ccc;min-width:20px;min-height:20px;'></div>");
diveditionblackdisplay.on('click', this.change_color, this, 'black'); diveditionblackdisplay.on('click', this.change_color, this, 'black');
diveditioncolordisplay.append(diveditionwhitedisplay); diveditioncolordisplay.append(diveditionwhitedisplay);
diveditioncolordisplay.append(diveditionyellowdisplay); diveditioncolordisplay.append(diveditionyellowdisplay);
...@@ -356,19 +356,6 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -356,19 +356,6 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, {
this.editor.save_current_page(); this.editor.save_current_page();
}, },
/*apply_visibility_annot: function () {
var divdisplay = this.editor.get_dialogue_element('#' + this.divcartridge + "_display");
var valref = this.editor.get_dialogue_element('#' + this.divcartridge + "_valref").get('value');
if (valref === '') {
if (this.editor.get('readonly')) {
divdisplay.setContent('');
} else {
divdisplay.setContent('&nbsp;&nbsp;&nbsp;&nbsp');
}
} else if (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);
...@@ -486,9 +473,13 @@ Y.extend(ANNOTATIONFRAME, M.assignfeedback_editpdfplus.annotation, { ...@@ -486,9 +473,13 @@ 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");
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) {
buttonplus.hide();
}
}, },
/** /**
* Delete an annotation * Delete an 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