Gitlab CSE Unil

Commit 4df2bfe6 authored by M. Chardon's avatar M. Chardon
Browse files

mise à niveau des boutons sur bootstrap4

parent 8cc2c1b8
This diff is collapsed.
This diff is collapsed.
define(["jquery","./annotation"],function(a,b){function c(){return b.call(this),this}return c.prototype=Object.create(b.prototype),c.prototype.initAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a),this.x=30,this.y=90},c.prototype.draw=function(b){if(b){var c="<div id='"+this.id+"'><i class='fa fa-commenting' aria-hidden='true' style='color:black;'></i></div>";b.append(c),a("#"+this.id).css("color",this.get_color()),a("#"+this.id).css("width",this.endx-this.x),a("#"+this.id).css("height",this.endy-this.y),a("#"+this.id).css("padding","0 2px"),a("#"+this.id).css("position","relative"),a("#"+this.id).css("left",this.x),a("#"+this.id).css("top",this.y)}this.draw_catridge(b)},c.prototype.draw_catridge=function(a){var b;if(!this.divcartridge||""===this.divcartridge){this.init_div_cartridge_id();var c=this.get_color_cartridge();b=this.get_div_cartridge(c,a),b.addClass("assignfeedback_editpdfplus_commentplus"),this.get_div_cartridge_label(c,b);var d=this.get_div_container(c,b);this.get_div_edition(d),this.cartridgex&&0!==this.cartridgex||(this.cartridgex=parseInt(this.tooltype.getToolTypeCartX(),10)),this.cartridgey&&0!==this.cartridgey||(this.cartridgey=parseInt(this.tooltype.getToolTypeCartY(),10)),b.css("left",this.x+20+this.cartridgex),b.css("top",this.y-20+this.cartridgey),this.apply_visibility_annot()}return!0},c});
\ No newline at end of file
define(["jquery","./annotation"],function(a,b){function c(){return b.call(this),this}return c.prototype=Object.create(b.prototype),c.prototype.initAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a),this.x=30,this.y=90},c.prototype.draw=function(b){if(b){var c=this.get_color_cartridge(),d="<div id='"+this.id+"'><i class='fa fa-commenting' aria-hidden='true' style='color:"+c+";'></i></div>";b.append(d),a("#"+this.id).css("color",this.get_color()),a("#"+this.id).css("width",this.endx-this.x),a("#"+this.id).css("height",this.endy-this.y),a("#"+this.id).css("padding","0 2px"),a("#"+this.id).css("position","relative"),a("#"+this.id).css("left",this.x),a("#"+this.id).css("top",this.y)}this.draw_catridge(b)},c.prototype.draw_catridge=function(a){var b;if(!this.divcartridge||""===this.divcartridge){this.init_div_cartridge_id();var c=this.get_color_cartridge();b=this.get_div_cartridge(c,a),b.addClass("assignfeedback_editpdfplus_commentplus"),this.get_div_cartridge_label(c,b);var d=this.get_div_container(c,b),e=this.get_toolbar();d.append(e),this.get_div_edition(d),this.cartridgex&&0!==this.cartridgex||(this.cartridgex=parseInt(this.tooltype.getToolTypeCartX(),10)),this.cartridgey&&0!==this.cartridgey||(this.cartridgey=parseInt(this.tooltype.getToolTypeCartY(),10)),b.css("left",this.x+20+this.cartridgex),b.css("top",this.y-20+this.cartridgey),this.apply_visibility_annot()}return!0},c});
\ No newline at end of file
define(["jquery","./annotation"],function(a,b){function c(){return b.call(this),this}return c.prototype=Object.create(b.prototype),c.prototype.initAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a),this.x=279,this.y=113,this.endx=435,this.endy=129,this.parent_annot=0,this.colour="#FF0000"},c.prototype.initChildAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a.tooltype),this.x=144,this.y=192,this.endx=296,this.endy=208,this.parent_annot=a.id,this.id="previsu_annot_child",this.colour="#FF0000"},c.prototype.draw=function(b){if(b){var c="<div id='"+this.id+"'></div>";b.append(c),a("#"+this.id).css("width",this.endx-this.x),a("#"+this.id).css("height",this.endy-this.y),a("#"+this.id).css("border","solid 2px red"),a("#"+this.id).css("position","relative"),a("#"+this.id).css("left",this.x),a("#"+this.id).css("top",this.y),a("#"+this.id).css("box-sizing","inherit")}return this.draw_catridge(b),this},c.prototype.draw_catridge=function(b){if(!this.parent_annot_element&&0===this.parent_annot){var c;if(!this.divcartridge||""===this.divcartridge){this.init_div_cartridge_id();var d=a("#"+this.id);d&&d.addClass("class_"+this.divcartridge);var e=this.get_color();c=this.get_div_cartridge(e,b),c.addClass("assignfeedback_editpdfplus_frame"),this.get_div_cartridge_label(e,c,!0);var f=this.get_div_container(e,c),g="<button id='"+this.divcartridge+"_buttonpencil' class='btn btn-default";this.adminDemo&&(g+=" disabled"),g+="' type='button'>",g+='<i class="fa fa-eyedropper" aria-hidden="true"></i>',g+="</button>";var h="<button id='"+this.divcartridge+"_buttonadd' class='btn btn-default";this.adminDemo&&(h+=" disabled"),h+="' type='button'>",h+='<i class="fa fa-plus" aria-hidden="true"></i>',h+="</button>",f.append(g),f.append(h),this.get_div_edition(f),this.cartridgex&&0!==this.cartridgex||(this.cartridgex=parseInt(this.tooltype.getToolTypeCartX(),10)),this.cartridgey&&0!==this.cartridgey||(this.cartridgey=parseInt(this.tooltype.getToolTypeCartY(),10)),c.css("left",this.cartridgex+15),c.css("top",this.y+this.cartridgey-12),this.apply_visibility_annot()}}return!0},c});
\ No newline at end of file
define(["jquery","./annotation"],function(a,b){function c(){return b.call(this),this}return c.prototype=Object.create(b.prototype),c.prototype.initAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a),this.x=279,this.y=113,this.endx=435,this.endy=129,this.parent_annot=0,this.colour="#FF0000"},c.prototype.initChildAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a.tooltype),this.x=144,this.y=192,this.endx=296,this.endy=208,this.parent_annot=a.id,this.id="previsu_annot_child",this.colour="#FF0000"},c.prototype.draw=function(b){if(b){var c="<div id='"+this.id+"'></div>";b.append(c),a("#"+this.id).css("width",this.endx-this.x),a("#"+this.id).css("height",this.endy-this.y),a("#"+this.id).css("border","solid 2px red"),a("#"+this.id).css("position","relative"),a("#"+this.id).css("left",this.x),a("#"+this.id).css("top",this.y),a("#"+this.id).css("box-sizing","inherit")}return this.draw_catridge(b),this},c.prototype.draw_catridge=function(b){if(!this.parent_annot_element&&0===this.parent_annot){var c;if(!this.divcartridge||""===this.divcartridge){this.init_div_cartridge_id();var d=a("#"+this.id);d&&d.addClass("class_"+this.divcartridge);var e=this.get_color();c=this.get_div_cartridge(e,b),c.addClass("assignfeedback_editpdfplus_frame"),this.get_div_cartridge_label(e,c,!0);var f=this.get_div_container(e,c),g=this.get_toolbar(),h="<button id='"+this.divcartridge+"_buttonpencil' class='btn btn-sm btn-outline-dark'";this.adminDemo&&(h+=" disabled"),h+=" type='button'>",h+='<i class="fa fa-eyedropper" aria-hidden="true"></i>',h+="</button>";var i=a(h),j="<button id='"+this.divcartridge+"_buttonadd' class='btn btn-sm btn-outline-dark'";this.adminDemo&&(j+=" disabled"),j+=" type='button'>",j+='<i class="fa fa-plus" aria-hidden="true"></i>',j+="</button>";var k=a(j);g.append(i),g.append(k),f.append(g),this.get_div_edition(f),this.cartridgex&&0!==this.cartridgex||(this.cartridgex=parseInt(this.tooltype.getToolTypeCartX(),10)),this.cartridgey&&0!==this.cartridgey||(this.cartridgey=parseInt(this.tooltype.getToolTypeCartY(),10)),c.css("left",this.cartridgex+15),c.css("top",this.y+this.cartridgey-12),this.apply_visibility_annot()}}return!0},c});
\ No newline at end of file
define(["jquery","./annotation"],function(a,b){function c(){return b.call(this),this}return c.prototype=Object.create(b.prototype),c.prototype.initAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a),this.x=83,this.y=84,this.endx=239,this.endy=100},c.prototype.draw=function(b){if(b){var c="<div id='"+this.id+"'></div>";b.append(c),a("#"+this.id).css("background-color",this.get_color()),a("#"+this.id).css("width",this.endx-this.x),a("#"+this.id).css("height",this.endy-this.y),a("#"+this.id).css("opacity",.5),a("#"+this.id).css("position","relative"),a("#"+this.id).css("left",this.x),a("#"+this.id).css("top",this.y)}this.draw_catridge(b)},c.prototype.draw_catridge=function(a){var b;if(!this.divcartridge||""===this.divcartridge){this.init_div_cartridge_id();var c=this.get_color_cartridge();b=this.get_div_cartridge(c,a),b.addClass("assignfeedback_editpdfplus_hightlightplus"),this.get_div_cartridge_label(c,b);var d=this.get_div_container(c,b);this.get_div_edition(d),this.cartridgex&&0!==this.cartridgex||(this.cartridgex=parseInt(this.tooltype.getToolTypeCartX(),10)),this.cartridgey&&0!==this.cartridgey||(this.cartridgey=parseInt(this.tooltype.getToolTypeCartY(),10)),b.css("left",this.x+this.cartridgex),b.css("top",this.y+this.cartridgey-15),this.apply_visibility_annot()}return!0},c});
\ No newline at end of file
define(["jquery","./annotation"],function(a,b){function c(){return b.call(this),this}return c.prototype=Object.create(b.prototype),c.prototype.initAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a),this.x=83,this.y=84,this.endx=239,this.endy=100},c.prototype.draw=function(b){if(b){var c="<div id='"+this.id+"'></div>";b.append(c),a("#"+this.id).css("background-color",this.get_color()),a("#"+this.id).css("width",this.endx-this.x),a("#"+this.id).css("height",this.endy-this.y),a("#"+this.id).css("opacity",.5),a("#"+this.id).css("position","relative"),a("#"+this.id).css("left",this.x),a("#"+this.id).css("top",this.y)}this.draw_catridge(b)},c.prototype.draw_catridge=function(a){var b;if(!this.divcartridge||""===this.divcartridge){this.init_div_cartridge_id();var c=this.get_color_cartridge();b=this.get_div_cartridge(c,a),b.addClass("assignfeedback_editpdfplus_hightlightplus"),this.get_div_cartridge_label(c,b);var d=this.get_div_container(c,b),e=this.get_toolbar();d.append(e),this.get_div_edition(d),this.cartridgex&&0!==this.cartridgex||(this.cartridgex=parseInt(this.tooltype.getToolTypeCartX(),10)),this.cartridgey&&0!==this.cartridgey||(this.cartridgey=parseInt(this.tooltype.getToolTypeCartY(),10)),b.css("left",this.x+this.cartridgex),b.css("top",this.y+this.cartridgey-15),this.apply_visibility_annot()}return!0},c});
\ No newline at end of file
define(["jquery","./annotation"],function(a,b){function c(){return b.call(this),this}return c.prototype=Object.create(b.prototype),c.prototype.initAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a),this.x=188,this.y=118,this.displayrotation=1},c.prototype.draw=function(b){if(b){this.shape_id="ct_stampcomment_"+(new Date).toJSON().replace(/:/g,"").replace(/\./g,"");var c='<i id="'+this.shape_id+'_img" class="fa fa-arrows-h fa-2x" aria-hidden="true"></i>';this.displayrotation>0&&(c='<i id="'+this.shape_id+'_img" class="fa fa-arrows-v fa-2x" aria-hidden="true"></i>');var d="<div id='"+this.id+"'>"+c+"</div>";b.append(d),a("#"+this.id).css("position","relative"),a("#"+this.id).css("left",this.x),a("#"+this.id).css("top",this.y)}this.draw_catridge(b)},c.prototype.draw_catridge=function(a){var b;if(!this.divcartridge||""===this.divcartridge){this.init_div_cartridge_id();var c=this.get_color_cartridge();b=this.get_div_cartridge(c,a),b.addClass("assignfeedback_editpdfplus_stampcomment"),this.get_div_cartridge_label(c,b);var d=this.get_div_container(c,b),e=0;this.displayrotation>0&&(e=1);var f="<input type='hidden' id='"+this.divcartridge+"_rotation' value="+e+" />";d.append(f);var g="<button id='"+this.divcartridge+"_buttonrotation' class='btn btn-default";this.adminDemo&&(g+=" disabled"),g+='\' type=\'button\'><i class="fa fa-refresh" aria-hidden="true"></i></button>',d.append(g),this.get_div_edition(d),this.cartridgex&&0!==this.cartridgex||(this.cartridgex=parseInt(this.tooltype.getToolTypeCartX(),10)),this.cartridgey&&0!==this.cartridgey||(this.cartridgey=parseInt(this.tooltype.getToolTypeCartY(),10)),b.css("left",this.x+this.cartridgex),b.css("top",this.y+this.cartridgey-30),this.apply_visibility_annot()}return!0},c});
\ No newline at end of file
define(["jquery","./annotation"],function(a,b){function c(){return b.call(this),this}return c.prototype=Object.create(b.prototype),c.prototype.initAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a),this.x=188,this.y=118,this.displayrotation=1},c.prototype.draw=function(b){if(b){var c=this.get_color_cartridge(),d="fa-arrows-h";this.displayrotation>0&&(d="fa-arrows-v"),this.shape_id="ct_stampcomment_"+(new Date).toJSON().replace(/:/g,"").replace(/\./g,"");var e='<i id="'+this.shape_id+'_img" class="fa '+d+' fa-2x" aria-hidden="true" style="color:'+c+';"></i>',f="<div id='"+this.id+"'>"+e+"</div>";b.append(f),a("#"+this.id).css("position","relative"),a("#"+this.id).css("left",this.x),a("#"+this.id).css("top",this.y)}this.draw_catridge(b)},c.prototype.draw_catridge=function(b){var c;if(!this.divcartridge||""===this.divcartridge){this.init_div_cartridge_id();var d=this.get_color_cartridge();c=this.get_div_cartridge(d,b),c.addClass("assignfeedback_editpdfplus_stampcomment"),this.get_div_cartridge_label(d,c);var e=this.get_div_container(d,c),f=this.get_toolbar(),g=0;this.displayrotation>0&&(g=1);var h="<input type='hidden' id='"+this.divcartridge+"_rotation' value="+g+" />";e.append(h);var i="<button id='"+this.divcartridge+"_buttonrotation' class='btn btn-sm btn-outline-dark'";this.adminDemo&&(i+=" disabled"),i+=' type=\'button\'><i class="fa fa-refresh" aria-hidden="true"></i></button>';var j=a(i);f.append(j),e.append(f),this.get_div_edition(e),this.cartridgex&&0!==this.cartridgex||(this.cartridgex=parseInt(this.tooltype.getToolTypeCartX(),10)),this.cartridgey&&0!==this.cartridgey||(this.cartridgey=parseInt(this.tooltype.getToolTypeCartY(),10)),c.css("left",this.x+this.cartridgex),c.css("top",this.y+this.cartridgey-30),this.apply_visibility_annot()}return!0},c});
\ No newline at end of file
define(["jquery","./annotation"],function(a,b){function c(){return b.call(this),this}return c.prototype=Object.create(b.prototype),c.prototype.initAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a),this.x=285,this.y=65,this.endy=175},c.prototype.draw=function(b){if(b){var c="<div id='"+this.id+"'></div>";b.append(c),a("#"+this.id).css("background-color",this.get_color()),a("#"+this.id).css("width",3),this.endy-this.y<=30&&(this.endy=this.y+30),a("#"+this.id).css("height",this.endy-this.y),a("#"+this.id).css("position","relative"),a("#"+this.id).css("left",this.x),a("#"+this.id).css("top",this.y),this.draw_catridge(b)}},c.prototype.draw_catridge=function(a){var b;if(!this.divcartridge||""===this.divcartridge){this.init_div_cartridge_id();var c=this.get_color_cartridge();b=this.get_div_cartridge(c,a),b.addClass("assignfeedback_editpdfplus_verticalline"),this.get_div_cartridge_label(c,b);var d=this.get_div_container(c,b);this.get_div_edition(d),this.cartridgex&&0!==this.cartridgex||(this.cartridgex=parseInt(this.tooltype.getToolTypeCartX(),10)),this.cartridgey&&0!==this.cartridgey||(this.cartridgey=parseInt(this.tooltype.getToolTypeCartY(),10)),b.css("left",this.x+this.cartridgex),b.css("top",this.y+this.cartridgey-109),this.apply_visibility_annot()}return!0},c});
\ No newline at end of file
define(["jquery","./annotation"],function(a,b){function c(){return b.call(this),this}return c.prototype=Object.create(b.prototype),c.prototype.initAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a),this.x=285,this.y=65,this.endy=175},c.prototype.draw=function(b){if(b){var c="<div id='"+this.id+"'></div>";b.append(c),a("#"+this.id).css("background-color",this.get_color()),a("#"+this.id).css("width",3),this.endy-this.y<=30&&(this.endy=this.y+30),a("#"+this.id).css("height",this.endy-this.y),a("#"+this.id).css("position","relative"),a("#"+this.id).css("left",this.x),a("#"+this.id).css("top",this.y),this.draw_catridge(b)}},c.prototype.draw_catridge=function(a){var b;if(!this.divcartridge||""===this.divcartridge){this.init_div_cartridge_id();var c=this.get_color_cartridge();b=this.get_div_cartridge(c,a),b.addClass("assignfeedback_editpdfplus_verticalline"),this.get_div_cartridge_label(c,b);var d=this.get_div_container(c,b),e=this.get_toolbar();d.append(e),this.get_div_edition(d),this.cartridgex&&0!==this.cartridgex||(this.cartridgex=parseInt(this.tooltype.getToolTypeCartX(),10)),this.cartridgey&&0!==this.cartridgey||(this.cartridgey=parseInt(this.tooltype.getToolTypeCartY(),10)),b.css("left",this.x+this.cartridgex),b.css("top",this.y+this.cartridgey-109),this.apply_visibility_annot()}return!0},c});
\ No newline at end of file
define(["./global"],function(a){function b(){return this._instanceID=d(),this}var c=0,d=function(){return++c};return b.getInstanceCount=function(){return c},b.prototype.getInstanceID=function(){return this._instanceID},b.id=-1,b.axis=-1,b.typetool=-1,b.type=null,b.colors="",b.cartridge="",b.cartridgeColor="",b.texts="",b.label="",b.reply=!0,b.enabled=!0,b.orderTool=1e3,b.prototype.init=function(a){this.id=parseInt(a.id,10)||0,this.axis=parseInt(a.axis,10)||0,this.type=a.type,this.colors=a.colors,this.cartridge=a.cartridge,this.cartridgeColor=a.cartridgeColor,this.texts=a.texts,this.label=a.label,this.reply=a.reply,this.enabled=a.enabled,this.orderTool=a.orderTool},b.prototype.initAdmin=function(a){this.id=parseInt(a.toolid,10)||0,this.axis=parseInt(a.axis,10)||0,this.typetool=a.typetool,this.label=a.button,this.enabled=a.enable,this.orderTool=a.orderTool},b.prototype.getToolTypeLabel=function(){return this.type.label},b.prototype.getToolTypeCartX=function(){return this.type.cartridgeX},b.prototype.getToolTypeCartY=function(){return this.type.cartridgeY},b.prototype.get_color=function(){var b=a.ANNOTATIONCOLOUR[this.colors];return b?(b=b.replace("rgb","rgba"),b=b.replace(")",",0.5)")):b=this.colors,b&&""!==b?b:this.type.get_color()},b.prototype.get_color_cartridge=function(){var b=a.ANNOTATIONCOLOUR[this.cartridgeColor];return b?(b=b.replace("rgb","rgba"),b=b.replace(")",",0.5)")):b=this.cartridgeColor,b&&""!==b?b:this.type.get_color_cartridge()},b.prototype.getButton=function(a){var b="btn-default",c="";1!==this.enabled&&(b="",c="background-image:none;background-color:#CCCCCC;"),this.id===a&&(b="btn-primary"),4!==this.typetool&&1!==this.typetool||(c+="text-decoration: underline;");var d=this.label;4!==this.typetool&&5!==this.typetool||(d="| "+d,4===this.typetool&&(d+=" |"));var e="<button class='btn "+b+" editpdlplus_tool' id='editpdlplus_tool_"+this.id+"' style='"+c+"' value='"+this.id+"' data-enable='"+this.enabled+"'>"+d+"</button>";return e},b.prototype.getButtonSortable=function(a){return"<li style='float: left;display: block;'>"+this.getButton(a)+"</li>"},b});
\ No newline at end of file
define(["./global"],function(a){function b(){return this._instanceID=d(),this}var c=0,d=function(){return++c};return b.getInstanceCount=function(){return c},b.prototype.getInstanceID=function(){return this._instanceID},b.id=-1,b.axis=-1,b.typetool=-1,b.type=null,b.colors="",b.cartridge="",b.cartridgeColor="",b.texts="",b.label="",b.reply=!0,b.enabled=!0,b.orderTool=1e3,b.prototype.init=function(a){this.id=parseInt(a.id,10)||0,this.axis=parseInt(a.axis,10)||0,this.type=a.type,this.colors=a.colors,this.cartridge=a.cartridge,this.cartridgeColor=a.cartridgeColor,this.texts=a.texts,this.label=a.label,this.reply=a.reply,this.enabled=a.enabled,this.orderTool=a.orderTool},b.prototype.initAdmin=function(a){this.id=parseInt(a.toolid,10)||0,this.axis=parseInt(a.axis,10)||0,this.typetool=a.typetool,this.label=a.button,this.enabled=a.enable,this.orderTool=a.orderTool},b.prototype.getToolTypeLabel=function(){return this.type.label},b.prototype.getToolTypeCartX=function(){return this.type.cartridgeX},b.prototype.getToolTypeCartY=function(){return this.type.cartridgeY},b.prototype.get_color=function(){var b=a.ANNOTATIONCOLOUR[this.colors];return b?(b=b.replace("rgb","rgba"),b=b.replace(")",",0.5)")):b=this.colors,b&&""!==b?b:this.type.get_color()},b.prototype.get_color_cartridge=function(){var b=a.ANNOTATIONCOLOUR[this.cartridgeColor];return b?(b=b.replace("rgb","rgba"),b=b.replace(")",",0.5)")):b=this.cartridgeColor,b&&""!==b?b:this.type.get_color_cartridge()},b.prototype.getButton=function(a){var b=" btn-sm",c="";1!==this.enabled&&(c="background-image:none;background-color:#CCCCCC;"),this.id===a&&(b="btn-primary"),4!==this.typetool&&1!==this.typetool||(c+="text-decoration: underline;");var d=this.label;4!==this.typetool&&5!==this.typetool||(d="| "+d,4===this.typetool&&(d+=" |"));var e="<button class='btn "+b+" editpdlplus_tool' id='editpdlplus_tool_"+this.id+"' style='"+c+"' value='"+this.id+"' data-enable='"+this.enabled+"'>"+d+"</button>";return e},b.prototype.getButtonSortable=function(a){return"<li style='float: left;display: block;'>"+this.getButton(a)+"</li>"},b});
\ No newline at end of file
......@@ -183,13 +183,15 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
var canBeDelete = $("#editpdlplus_axes option:selected").data('delete');
if (canBeDelete) {
if (parseInt(canBeDelete) > 0) {
$("#assignfeedback_editpdfplus_widget_admin_button_delaxis").addClass("disabled");
//$("#assignfeedback_editpdfplus_widget_admin_button_delaxis").addClass("disabled");
$('#assignfeedback_editpdfplus_widget_admin_button_delaxis').prop('disabled', true);
} else {
$("#assignfeedback_editpdfplus_widget_admin_button_delaxis").removeClass("disabled");
//$("#assignfeedback_editpdfplus_widget_admin_button_delaxis").removeClass("disabled");
$('#assignfeedback_editpdfplus_widget_admin_button_delaxis').removeAttr('disabled');
}
} else {
$("#editpdlplus_axes option[value='" + selectAxis + "']").data('delete', 0);
$("#assignfeedback_editpdfplus_widget_admin_button_delaxis").removeClass("disabled");
$('#assignfeedback_editpdfplus_widget_admin_button_delaxis').removeAttr('disabled');
}
} else {
$("#assignfeedback_editpdfplus_widget_admin_workspace").hide();
......@@ -218,7 +220,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
* Init too UI for select element
*/
AdminPanel.prototype.initToolUI = function () {
$(this.selectTool).removeClass("btn-default");
//$(this.selectTool).removeClass("btn-default");
$(this.selectTool).addClass("btn-primary");
initSortableToolBar();
......@@ -434,7 +436,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
$('#assignfeedback_editpdfplus_widget_admin_div_addaxis > .panel-body').html("");
$('#assignfeedback_editpdfplus_widget_admin_toolheader').hide();
$('#assignfeedback_editpdfplus_widget_admin_toolworkspace').hide();
$("#editpdlplus_axes").prop('disabled', 'disabled');
$("#editpdlplus_axes").prop('disabled', true);
var params = {};
fragment.loadFragment('assignfeedback_editpdfplus', 'axisadd', contextid, params)
.done(function (html, js) {
......@@ -453,7 +455,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
$('#assignfeedback_editpdfplus_widget_admin_div_editaxis > .panel-body').html("");
$('#assignfeedback_editpdfplus_widget_admin_toolheader').hide();
$('#assignfeedback_editpdfplus_widget_admin_toolworkspace').hide();
$("#editpdlplus_axes").prop('disabled', 'disabled');
$("#editpdlplus_axes").prop('disabled', true);
var axeid = $("#editpdlplus_axes option:selected").val();
var params = {axeid: axeid};
fragment.loadFragment('assignfeedback_editpdfplus', 'axisedit', contextid, params)
......@@ -475,7 +477,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
$('#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body').html("");
$('#assignfeedback_editpdfplus_widget_admin_toolheader').hide();
$('#assignfeedback_editpdfplus_widget_admin_toolworkspace').hide();
$("#editpdlplus_axes").prop('disabled', 'disabled');
$("#editpdlplus_axes").prop('disabled', true);
var axeid = $("#editpdlplus_axes option:selected").val();
var params = {axeid: axeid};
fragment.loadFragment('assignfeedback_editpdfplus', 'axisdel', contextid, params)
......@@ -543,7 +545,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
var axeOption = $("#editpdlplus_axes option[value='" + toolbar[0].axeid + "']");
axeOption.data('delete', 1);
var btr = $("#assignfeedback_editpdfplus_widget_admin_button_delaxis");
btr.addClass("disabled");
btr.prop("disabled", true);
$('#editpdlplus_tool_item').html("");
//maj toolbar
if (toolbar[0].toolid && toolbar[0].toolid > 0) {
......@@ -558,7 +560,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
var axeOption = $("#editpdlplus_axes option[value='" + axeid + "']");
axeOption.data('delete', 0);
var btr = $("#assignfeedback_editpdfplus_widget_admin_button_delaxis");
btr.removeClass("disabled");
btr.removeAttr("disabled");
}
$(".editpdlplus_tool").on("click", refreshToolView);
//maj visu
......@@ -586,13 +588,13 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
var selectid = $(this).val();
$(".editpdlplus_tool").each(function () {
$(this).removeClass("btn-primary");
$(this).removeClass("btn-default");
//$(this).removeClass("btn-default");
$(this).css("background-image", "");
$(this).css("background-color", "");
var enabled = $(this).data('enable');
if (enabled === 1 && $(this).val() !== selectid) {
$(this).addClass("btn-default");
} else if ($(this).val() !== selectid) {
/*if (enabled === 1 && $(this).val() !== selectid) {
$(this).addClass("btn-default");
} else*/ if (enabled !== 1 && $(this).val() !== selectid) {
$(this).css("background-image", "none");
$(this).css("background-color", "#CCCCCC");
}
......@@ -711,7 +713,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
$("#assignfeedback_editpdfplus_widget_admin_button_addtool").click();
});
$("#toolRemove").on("click", function () {
if (!$(this).hasClass("disabled")) {
if (!$(this).prop("disabled")) {
var form = $('#assignfeedback_editpdfplus_edit_tool');
var data = form.serialize();
ajax.call([
......@@ -742,7 +744,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
var axeOption = $("#editpdlplus_axes option[value='" + axeid + "']");
axeOption.data('delete', 0);
var btr = $("#assignfeedback_editpdfplus_widget_admin_button_delaxis");
btr.removeClass("disabled");
btr.removeAttr("disabled");
}
$('#toolworkspace').html("");
} else {
......@@ -771,7 +773,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
AdminPanel.prototype.openDivAddTool = function () {
$("#message_edit_tool").hide();
$('#editpdlplus_tool_item').html("");
$('.btn-primary').addClass("btn-default");
//$('.btn-primary').addClass("btn-default");
$('.editpdlplus_tool').removeClass("btn-primary");
var axeid = $("#editpdlplus_axes option:selected").val();
var params = {axisid: axeid};
......@@ -857,7 +859,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
var axeOption = $("#editpdlplus_axes option[value='" + axeid + "']");
axeOption.data('delete', 1);
var delAxBt = $("#assignfeedback_editpdfplus_widget_admin_button_delaxis");
delAxBt.addClass("disabled");
delAxBt.prop("disabled", true);
} else {
$("#message_edit_tool").show();
$("#message_edit_tool").html(toolbar[0].message);
......
......@@ -341,16 +341,15 @@ define(['jquery', './global'],
var diveditiondisplay = $("#" + this.divcartridge + "_edit");
var propositions = this.tooltype.texts;
if (propositions && propositions.length > 0) {
var divproposition = "<div id='" + this.divcartridge + "_edit_propositions'></div>";
diveditiondisplay.append(divproposition);
var divpropositiondisplay = $("#" + this.divcartridge + "_edit_propositions");
var divproposition = "<div class='btn-group-vertical aepp-toolbar-vertical'></div>";
var divpropositiondisplay = $(divproposition);
var propositionarray = propositions.split('","');
for (var i = 0; i < propositionarray.length; i++) {
var buttontmp = "<button class='btn btn-default";
var buttontmp = "<button class='btn btn-outline-dark'";
if (this.adminDemo === 1) {
buttontmp += ' disabled';
}
buttontmp += "' type='button' style='width:100%;font-size: x-small;'>"
buttontmp += " type='button'>"
+ propositionarray[i].replace(/"/g, "")
+ "</button>";
divpropositiondisplay.append(buttontmp);
......@@ -359,6 +358,7 @@ define(['jquery', './global'],
}
divpropositiondisplay.append("<br/>");
}
diveditiondisplay.append(divpropositiondisplay);
}
return diveditiondisplay;
};
......@@ -387,24 +387,35 @@ define(['jquery', './global'],
if (canevas) {
divconteneurdisplay.append(inputonof);
}
//var readonly = this.editor.get('readonly');
divconteneurdisplay.append(this.get_input_question());
//readonly = this.editor.get('readonly');
return divconteneurdisplay;
};
/**
* get the html node for toolbar on annotation
* @return node
*/
Annotation.prototype.get_toolbar = function () {
var divtoolbar = $("<div id='"
+ this.divcartridge
+ "_toolbar' class='btn-group btn-group-sm aepp-toolbar'></div>");
//var readonly = this.editor.get('readonly');
//if (!readonly) {
this.get_button_visibility_left(divconteneurdisplay);
this.get_button_visibility_right(divconteneurdisplay);
this.get_button_save(divconteneurdisplay);
this.get_button_cancel(divconteneurdisplay);
divtoolbar.append(this.get_button_visibility_left());
divtoolbar.append(this.get_button_visibility_right());
divtoolbar.append(this.get_button_save());
divtoolbar.append(this.get_button_cancel());
if (this.tooltype.reply === 1) {
this.get_button_question(divconteneurdisplay);
divtoolbar.append(this.get_button_question());
}
this.get_button_remove(divconteneurdisplay);
divtoolbar.append(this.get_button_remove());
//} else {
// divconteneurdisplay.append(this.get_button_student_status());
// divtoolbar.append(this.get_button_student_status());
//}
return divconteneurdisplay;
};
return divtoolbar;
}
;
/**
* get the html node for the hidden input to keep information about question state
......@@ -423,20 +434,17 @@ define(['jquery', './global'],
* @param {JQuery Entity} canevas
* @return {JQuery Entity} node
*/
Annotation.prototype.get_button_visibility_right = function (canevas) {
Annotation.prototype.get_button_visibility_right = function () {
var buttonvisibility = "<button id='"
+ this.divcartridge
+ "_buttonedit_right' class='btn btn-default";
+ "_buttonedit_right' class='btn btn-sm btn-outline-dark'";
if (this.adminDemo === 1) {
buttonvisibility += ' disabled';
}
buttonvisibility += "' type='button'>";
buttonvisibility += " type='button'>";
buttonvisibility += "<i class='fa fa-arrow-right' aria-hidden='true'></i>";
buttonvisibility += "</button>";
if (canevas) {
canevas.append(buttonvisibility);
}
var buttonvisibilitydisplay = $('#' + this.divcartridge + "_buttonedit_right");
var buttonvisibilitydisplay = $(buttonvisibility);
if (this.adminDemo < 1) {
//buttonvisibilitydisplay.on('click', this.change_visibility_annot('r'));
}
......@@ -448,20 +456,17 @@ define(['jquery', './global'],
* @param {JQuery Entity} canevas
* @return {JQuery Entity} node
*/
Annotation.prototype.get_button_visibility_left = function (canevas) {
Annotation.prototype.get_button_visibility_left = function () {
var buttonvisibility = "<button id='"
+ this.divcartridge
+ "_buttonedit_left' class='btn btn-default";
+ "_buttonedit_left' class='btn btn-sm btn-outline-dark'";
if (this.adminDemo === 1) {
buttonvisibility += ' disabled';
}
buttonvisibility += "' type='button'>";
buttonvisibility += " type='button'>";
buttonvisibility += "<i class='fa fa-arrow-left' aria-hidden='true'></i>";
buttonvisibility += "</button>";
if (canevas) {
canevas.append(buttonvisibility);
}
var buttonvisibilitydisplay = $('#' + this.divcartridge + "_buttonedit_left");
var buttonvisibilitydisplay = $(buttonvisibility);
if (this.adminDemo < 1) {
//buttonvisibilitydisplay.on('click', this.change_visibility_annot('l'));
}
......@@ -473,20 +478,17 @@ define(['jquery', './global'],
* @param {JQuery Entity} canevas
* @return {JQuery Entity} node
*/
Annotation.prototype.get_button_save = function (canevas) {
Annotation.prototype.get_button_save = function () {
var buttonsave = "<button id='"
+ this.divcartridge
+ "_buttonsave' style='display:none;margin-left:110px;' class='btn btn-default";
+ "_buttonsave' style='display:none;margin-left:110px;' class='btn btn-sm btn-outline-dark'";
if (this.adminDemo === 1) {
buttonsave += ' disabled';
}
buttonsave += "' type='button'>"
buttonsave += " type='button'>"
+ "<i class='fa fa-check' aria-hidden='true'></i>"
+ "</button>";
if (canevas) {
canevas.append(buttonsave);
}
var buttonsavedisplay = $('#' + this.divcartridge + "_buttonsave");
var buttonsavedisplay = $(buttonsave);
if (this.adminDemo < 1) {
buttonsavedisplay.on('click', this.save_annot);
}
......@@ -497,20 +499,17 @@ define(['jquery', './global'],
* @param {JQuery Entity} canevas
* @return {JQuery Entity} node
*/
Annotation.prototype.get_button_cancel = function (canevas) {
Annotation.prototype.get_button_cancel = function () {
var buttoncancel = "<button id='"
+ this.divcartridge
+ "_buttoncancel' style='display:none;' class='btn btn-default";
+ "_buttoncancel' style='display:none;' class='btn btn-sm btn-outline-dark'";
if (this.adminDemo === 1) {
buttoncancel += ' disabled';
}
buttoncancel += "' type='button'>"
buttoncancel += " type='button'>"
+ "<i class='fa fa-undo' aria-hidden='true'></i>"
+ "</button>";
if (canevas) {
canevas.append(buttoncancel);
}
var buttoncanceldisplay = $('#' + this.divcartridge + "_buttoncancel");
var buttoncanceldisplay = $(buttoncancel);
if (this.adminDemo < 1) {
//buttoncanceldisplay.on('click', this.cancel_edit, this);
}
......@@ -522,23 +521,20 @@ define(['jquery', './global'],
* @param {JQuery Entity} canevas
* @return {JQuery Entity} node
*/
Annotation.prototype.get_button_question = function (canevas) {
Annotation.prototype.get_button_question = function () {
var buttonquestion = "<button id='"
+ this.divcartridge
+ "_buttonquestion' style='display:none;margin-left:10px;' class='btn btn-default";
+ "_buttonquestion' style='display:none;margin-left:10px;' class='btn btn-sm btn-outline-dark'";
if (this.adminDemo === 1) {
buttonquestion += ' disabled';
}
buttonquestion += "' type='button'>"
buttonquestion += " type='button'>"
+ '<span class="fa-stack fa-lg" style="line-height: 1em;width: 1em;">'
+ '<i class="fa fa-question-circle-o fa-stack-1x"></i>'
+ '<i class="fa fa-ban fa-stack-1x text-danger"></i>'
+ '</span>'
+ "</button>";
if (canevas) {
canevas.append(buttonquestion);
}
var buttonquestiondisplay = $('#' + this.divcartridge + "_buttonquestion");
var buttonquestiondisplay = $(buttonquestion);
if (this.adminDemo < 1) {
//buttonquestiondisplay.on('click', this.change_question_status, this);
}
......@@ -550,20 +546,17 @@ define(['jquery', './global'],
* @param {JQuery Entity} canevas
* @return {JQuery Entity} node
*/
Annotation.prototype.get_button_remove = function (canevas) {
Annotation.prototype.get_button_remove = function () {
var buttontrash = "<button id='"
+ this.divcartridge
+ "_buttonremove' style='display:none;margin-left:10px;' class='btn btn-default";
+ "_buttonremove' style='display:none;margin-left:10px;' class='btn btn-sm btn-outline-dark'";
if (this.adminDemo === 1) {
buttontrash += ' disabled';
}
buttontrash += "' type='button'>"
buttontrash += " type='button'>"
+ "<i class='fa fa-trash' aria-hidden='true'></i>"
+ "</button>";
if (canevas) {
canevas.append(buttontrash);
}
var buttontrashdisplay = $('#' + this.divcartridge + "_buttonremove");
var buttontrashdisplay = $(buttontrash);
if (this.adminDemo < 1) {
//buttontrashdisplay.on('click', this.remove_by_trash, this);
}
......
......@@ -61,8 +61,11 @@ define(['jquery', './annotation'],
*/
AnnotationCommentplus.prototype.draw = function (canevas) {
if (canevas) {
var color = this.get_color_cartridge();
var divComment = "<div id='" + this.id + "'>"
+ "<i class='fa fa-commenting' aria-hidden='true' style='color:black;'></i>"
+ "<i class='fa fa-commenting' aria-hidden='true' style='color:"
+ color
+ ";'></i>"
+ "</div>";
canevas.append(divComment);
$("#" + this.id).css('color', this.get_color());
......@@ -98,6 +101,8 @@ define(['jquery', './annotation'],
//creation input
var divconteneurdisplay = this.get_div_container(colorcartridge, divdisplay);
var toolbar = this.get_toolbar();
divconteneurdisplay.append(toolbar);
//creation de la div d'edition
//if (!this.editor.get('readonly')) {
......
......@@ -122,31 +122,33 @@ define(['jquery', './annotation'],
//creation input
var divconteneurdisplay = this.get_div_container(colorcartridge, divdisplay);
var toolbar = this.get_toolbar();
//if (!this.editor.get('readonly')) {
var buttonrender = "<button id='"
+ this.divcartridge
+ "_buttonpencil' class='btn btn-default";
+ "_buttonpencil' class='btn btn-sm btn-outline-dark'";
if (this.adminDemo) {
buttonrender += " disabled";
}
buttonrender += "' type='button'>";
buttonrender += " type='button'>";
buttonrender += '<i class="fa fa-eyedropper" aria-hidden="true"></i>';
buttonrender += "</button>";
//var buttonrenderdisplay = Y.Node.create(buttonrender);
var buttonrenderdisplay = $(buttonrender);
//buttonrenderdisplay.on('click', this.display_picker, this);
var buttonadd = "<button id='"
+ this.divcartridge
+ "_buttonadd' class='btn btn-default";
+ "_buttonadd' class='btn btn-sm btn-outline-dark'";
if (this.adminDemo) {
buttonadd += " disabled";
}
buttonadd += "' type='button'>";
buttonadd += " type='button'>";
buttonadd += '<i class="fa fa-plus" aria-hidden="true"></i>';
buttonadd += "</button>";
//var buttonadddisplay = Y.Node.create(buttonadd);
var buttonadddisplay = $(buttonadd);
//buttonadddisplay.on('click', this.add_annot, this);
divconteneurdisplay.append(buttonrender);
divconteneurdisplay.append(buttonadd);
toolbar.append(buttonrenderdisplay);
toolbar.append(buttonadddisplay);
divconteneurdisplay.append(toolbar);
//}
//creation de la div d'edition
......
......@@ -98,6 +98,8 @@ define(['jquery', './annotation'],
//creation input
var divconteneurdisplay = this.get_div_container(colorcartridge, divdisplay);
var toolbar = this.get_toolbar();
divconteneurdisplay.append(toolbar);
//creation de la div d'edition
//if (!this.editor.get('readonly')) {
......
......@@ -61,15 +61,18 @@ define(['jquery', './annotation'],
*/
AnnotationStampcomment.prototype.draw = function (canevas) {
if (canevas) {
var color = this.get_color_cartridge();
var flecheIco = "fa-arrows-h";
if (this.displayrotation > 0) {
flecheIco = "fa-arrows-v";
}
this.shape_id = 'ct_stampcomment_' + (new Date().toJSON()).replace(/:/g, '').replace(/\./g, '');
var fleche = '<i id="'
+ this.shape_id
+ '_img" '
+ 'class="fa fa-arrows-h fa-2x" aria-hidden="true"></i>';
if (this.displayrotation > 0) {
fleche = '<i id="' + this.shape_id + '_img" '
+ 'class="fa fa-arrows-v fa-2x" aria-hidden="true"></i>';
}
+ 'class="fa ' + flecheIco + ' fa-2x" aria-hidden="true" style="color:'
+ color
+ ';"></i>';
var divStampComment = "<div id='" + this.id + "'>" + fleche + "</div>";
canevas.append(divStampComment);
$("#" + this.id).css('position', 'relative');
......@@ -101,6 +104,7 @@ define(['jquery', './annotation'],
//creation input
var divconteneurdisplay = this.get_div_container(colorcartridge, divdisplay);
var toolbar = this.get_toolbar();
//if (!this.editor.get('readonly')) {