diff --git a/mod/assign/feedback/editpdf/styles.css b/mod/assign/feedback/editpdf/styles.css index 7cee7dc99eefc..f09bd8e50815b 100644 --- a/mod/assign/feedback/editpdf/styles.css +++ b/mod/assign/feedback/editpdf/styles.css @@ -314,6 +314,12 @@ ul.assignfeedback_editpdf_menu { min-height: 1.2em; } +.assignfeedback_editpdf_widget .commentdrawable textarea:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + .assignfeedback_editpdf_widget .commentdrawable { display: inline-block; z-index: 1; diff --git a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js index 23f92bf5dc286..9e69f88e267f1 100644 --- a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js +++ b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js @@ -2562,6 +2562,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) { container.setAttribute('tabindex', '-1'); label.setAttribute('tabindex', '0'); node.setAttribute('tabindex', '-1'); + menu.setAttribute('tabindex', '0'); if (!this.editor.get('readonly')) { container.append(menu); @@ -2681,6 +2682,8 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) { if (node.collapse.delay) { node.collapse.delay.cancel(); } + // Give comment a tabindex to prevent focus outline being suppressed. + node.setAttribute('tabindex', '0'); // Expand comment and pass focus to it. node.expand(); node.focus(); @@ -2697,7 +2700,10 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) { label.setAttribute('tabindex', '0'); }, this); - // Always restore label tabindex when leaving. + // Always restore the default tabindex states when moving away. + node.on('blur', function() { + node.setAttribute('tabindex', '-1'); + }, this); label.on('blur', function() { label.setAttribute('tabindex', '0'); }, this); diff --git a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js index e85424fbbcfc0..f6ba2d3e5b388 100644 --- a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js +++ b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js @@ -1,9 +1,9 @@ YUI.add("moodle-assignfeedback_editpdf-editor",function(e,t){var n=M.cfg.wwwroot+"/mod/assign/feedback/editpdf/ajax.php",r=M.cfg.wwwroot+"/mod/assign/feedback/editpdf/ajax_progress.php",i={DIALOGUE:"assignfeedback_editpdf_widget"},s={PREVIOUSBUTTON:".navigate-previous-button",NEXTBUTTON:" .navigate-next-button",SEARCHCOMMENTSBUTTON:".searchcommentsbutton",EXPCOLCOMMENTSBUTTON:".expcolcommentsbutton",SEARCHFILTER:".assignfeedback_editpdf_commentsearch input",SEARCHCOMMENTSLIST:".assignfeedback_editpdf_commentsearch ul",PAGESELECT:".navigate-page-select",LOADINGICON:".loading",PROGRESSBARCONTAINER:".progress-info.progress-striped",DRAWINGREGION:".drawingregion",DRAWINGCANVAS:".drawingcanvas",SAVE:".savebutton",COMMENTCOLOURBUTTON:".commentcolourbutton",COMMENTMENU:".commentdrawable a",ANNOTATIONCOLOURBUTTON:".annotationcolourbutton",DELETEANNOTATIONBUTTON:".deleteannotationbutton",UNSAVEDCHANGESDIV:".assignfeedback_editpdf_unsavedchanges",UNSAVEDCHANGESINPUT:'input[name="assignfeedback_editpdf_haschanges"]',STAMPSBUTTON:".currentstampbutton",DIALOGUE:"."+i.DIALOGUE},o="rgba(200, 200, 255, 0.9)",u="rgba(200, 200, 255, 0.5)",a="rgb(51, 51, 51)",f={white:"rgb(255,255,255)",yellow:"rgb(255,236,174)",red:"rgb(249,181,179)",green:"rgb(214,234,178)",blue:"rgb(203,217,237)",clear:"rgba(255,255,255, 0)"},l={white:"rgb(255,255,255)",yellow:"rgb(255,207,53)",red:"rgb(239,69,64)",green:"rgb(152,202,62)",blue:"rgb(125,159,211)",black:"rgb(51,51,51)"},c=300,h={comment:".commentbutton",pen:".penbutton",line:".linebutton",rectangle:".rectanglebutton",oval:".ovalbutton",stamp:".stampbutton",select:".selectbutton",drag:".dragbutton",highlight:".highlightbutton"},p=4,d=function(e,t){this.x=parseInt(e,10),this.y=parseInt(t,10),this.clip=function(e){return this.xe.x+e.width&&(this.x=e.x+e.width),this.ye.y+e.height&&(this.y=e.y+e.height),this}};M.assignfeedback_editpdf=M.assignfeedback_editpdf||{},M.assignfeedback_editpdf.point=d;var v=function(e,t,n,r){this.x=e,this.y=t,this.width=n,this.height=r,this.bound=function(e){var t=0,n=0,r=0,i=0,s=0,o;for(s=0;sn||s===0)n=o.x;if(o.yi||s===0)i=o.y}return this.x=t,this.y=r,this.width=n-t,this.height=i-r,this},this.has_min_width=function(){return this.width>=5},this.has_min_height=function(){return this.height>=5},this.set_min_width=function(){this.width=5},this.set_min_height=function(){this.height=5}};M.assignfeedback_editpdf=M.assignfeedback_editpdf||{},M.assignfeedback_editpdf.rect=v;var m=function(){this.start=!1,this.end=!1,this.starttime=0,this.annotationstart=!1,this.tool="drag",this.commentcolour="yellow",this.annotationcolour="red",this.stamp="",this.path=[]};M.assignfeedback_editpdf=M.assignfeedback_editpdf||{},M.assignfeedback_editpdf.edit=m;var g=function(e){this.editor=e,this.shapes=[],this.nodes=[],this.erase=function(){if(this.shapes)while(this.shapes.length>0)this.editor.graphic.removeShape(this.shapes.pop());if(this.nodes)while(this.nodes.length>0)this.nodes.pop().remove()},this.scroll_update=function(e,t){var n,r,i;for(n=0;n'),f=e.Node.create('');a.setAttrs({alt:M.util.get_string("deleteannotation","assignfeedback_editpdf")}),a.setStyles({backgroundColor:"white"}),f.addClass("deleteannotationbutton"),f.append(a),n.append(f),f.setData("annotation",this),f.setStyle("zIndex","200"),f.on("click",this.remove,this),f.on("key",this.remove,"space,enter",this),f.setX(r[0]+t.x+t.width-18),f.setY(r[1]+t.y+6),this.drawable.nodes.push(f)}return this.drawable},draw:function(){return this.draw_highlight(),this.drawable},remove:function(e){var t,n;e.preventDefault(),t=this.editor.pages[this.editor.currentpage].annotations;for(n=0;n"),r.setStyles({position:"absolute",display:"inline-block",backgroundImage:"url("+this.editor.get_stamp_image_url(this.path)+")",width:this.endx-this.x,height:this.endy-this.y,backgroundSize:"100% 100%",zIndex:50}),n.append(r),r.setX(i.x),r.setY(i.y),t.store_position(r,i.x,i.y),this.editor.get("readonly")||(r.on("gesturemovestart",this.editor.edit_start,null,this.editor),r.on("gesturemove",this.editor.edit_move,null,this.editor),r.on("gesturemoveend",this.editor.edit_end,null,this.editor)),t.nodes.push(r),this.drawable=t,T.superclass.draw.apply(this)},draw_current_edit:function(t){var n=new M.assignfeedback_editpdf.rect,r=new M.assignfeedback_editpdf.drawable(this.editor),i=this.editor.get_dialogue_element(s.DRAWINGREGION),o,u;return n.bound([t.start,t.end]),u=this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(n.x,n.y)),o=e.Node.create("
"),o.setStyles({position:"absolute",display:"inline-block",backgroundImage:"url("+this.editor.get_stamp_image_url(t.stamp)+")",width:n.width,height:n.height,backgroundSize:"100% 100%",zIndex:50}),i.append(o),o.setX(u.x),o.setY(u.y),r.store_position(o,u.x,u.y),r.nodes.push(o),r},init_from_edit:function(e){var t=new M.assignfeedback_editpdf.rect;return t.bound([e.start,e.end]),t.width<40&&(t.width=40),t.height<40&&(t.height=40),this.gradeid=this.editor.get("gradeid"),this.pageno=this.editor.currentpage,this.x=t.x,this.y=t.y,this.endx=t.x+t.width,this.endy=t.y+t.height,this.colour=e.annotationcolour,this.path=e.stamp,!0},move:function(e,t){var n=e-this.x,r=t-this.y;this.x+=n,this.y+=r,this.endx+=n,this.endy+=r,this.drawable&&this.drawable.erase(),this.editor.drawables.push(this.draw())}}),M.assignfeedback_editpdf=M.assignfeedback_editpdf||{},M.assignfeedback_editpdf.annotationstamp=T;var N="Dropdown menu",C;C=function(e){e.draggable=!1,e.centered=!1,e.width="auto",e.visible=!1,e.footerContent="",C.superclass.constructor.apply(this,[e])},e.extend(C,M.core.dialogue,{initializer:function(t){var n,r,i,s;C.superclass.initializer.call(this,t),s=this.get("boundingBox"),s.addClass("assignfeedback_editpdf_dropdown"),n=this.get("buttonNode"),r=this.bodyNode,i=e.Node.create("

"),i.addClass("accesshide"),i.setHTML(this.get("headerText")),r.prepend(i),r.on("clickoutside",function(e){this.get("visible")&&e.target.get("id")!==n.get("id")&&e.target.ancestor().get("id")!==n.get("id")&&(e.preventDefault(),this.hide())},this),n.on("click",function(e){e.preventDefault(),this.show()},this),n.on("key",this.show,"enter,space",this)},show:function(){var t=this.get("buttonNode"),n=C.superclass.show.call(this);return this.align(t,[e.WidgetPositionAlign.TL,e.WidgetPositionAlign.BL]),n}},{NAME:N,ATTRS:{headerText:{value:""},buttonNode:{value:null}}}),e.Base.modifyAttrs(C,{modal:{getter:function(){return!1}}}),M.assignfeedback_editpdf=M.assignfeedback_editpdf||{},M.assignfeedback_editpdf.dropdown=C;var k="Colourpicker",L;L=function(e){L.superclass.constructor.apply(this,[e])},e.extend(L,M.assignfeedback_editpdf.dropdown,{initializer:function(t){var n=e.Node.create('