diff --git a/mod/assign/feedback/editpdf/classes/renderer.php b/mod/assign/feedback/editpdf/classes/renderer.php index 9ca16b61da2..882fdc4d727 100644 --- a/mod/assign/feedback/editpdf/classes/renderer.php +++ b/mod/assign/feedback/editpdf/classes/renderer.php @@ -161,46 +161,46 @@ class assignfeedback_editpdf_renderer extends plugin_renderer_base { $navigation3 .= $this->render_toolbar_button('comment_expcol', 'expcolcomments', $this->get_shortcut('expcolcomments')); $navigation3 = html_writer::div($navigation3, 'navigation-expcol', array('role' => 'navigation')); - $toolbar1 = ''; - $toolbar2 = ''; - $toolbar3 = ''; - $toolbar4 = ''; + $toolbargroup = ''; $clearfix = html_writer::div('', 'clearfix'); if (!$widget->readonly) { - // Comments. + $toolbar1 = ''; $toolbar1 .= $this->render_toolbar_button('comment', 'comment', $this->get_shortcut('comment')); $toolbar1 .= $this->render_toolbar_button('background_colour_clear', 'commentcolour', $this->get_shortcut('commentcolour')); - $toolbar1 = html_writer::div($toolbar1, 'toolbar', array('role'=>'toolbar')); + $toolbar1 = html_writer::div($toolbar1, 'toolbar', array('role' => 'toolbar')); // Select Tool. + $toolbar2 = ''; $toolbar2 .= $this->render_toolbar_button('drag', 'drag', $this->get_shortcut('drag')); $toolbar2 .= $this->render_toolbar_button('select', 'select', $this->get_shortcut('select')); - $toolbar2 = html_writer::div($toolbar2, 'toolbar', array('role'=>'toolbar')); + $toolbar2 = html_writer::div($toolbar2, 'toolbar', array('role' => 'toolbar')); // Other Tools. - $toolbar3 = $this->render_toolbar_button('pen', 'pen', $this->get_shortcut('pen')); + $toolbar3 = ''; + $toolbar3 .= $this->render_toolbar_button('pen', 'pen', $this->get_shortcut('pen')); $toolbar3 .= $this->render_toolbar_button('line', 'line', $this->get_shortcut('line')); $toolbar3 .= $this->render_toolbar_button('rectangle', 'rectangle', $this->get_shortcut('rectangle')); $toolbar3 .= $this->render_toolbar_button('oval', 'oval', $this->get_shortcut('oval')); $toolbar3 .= $this->render_toolbar_button('highlight', 'highlight', $this->get_shortcut('highlight')); $toolbar3 .= $this->render_toolbar_button('background_colour_clear', 'annotationcolour', $this->get_shortcut('annotationcolour')); - $toolbar3 = html_writer::div($toolbar3, 'toolbar', array('role'=>'toolbar')); + $toolbar3 = html_writer::div($toolbar3, 'toolbar', array('role' => 'toolbar')); // Stamps. - $toolbar4 .= $this->render_toolbar_button('stamp', 'stamp', 'n'); + $toolbar4 = ''; + $toolbar4 .= $this->render_toolbar_button('stamp', 'stamp', $this->get_shortcut('stamp')); $toolbar4 .= $this->render_toolbar_button('background_colour_clear', 'currentstamp', $this->get_shortcut('currentstamp')); $toolbar4 = html_writer::div($toolbar4, 'toolbar', array('role'=>'toolbar')); + + // Add toolbars to toolbar_group in order of display, and float the toolbar_group right. + $toolbars = $toolbar1 . $toolbar2 . $toolbar3 . $toolbar4; + $toolbargroup = html_writer::div($toolbars, 'toolbar_group', array('role' => 'toolbar_group')); } - // Toobars written in reverse order because they are floated right. $pageheader = html_writer::div($navigation1 . $navigation2 . $navigation3 . - $toolbar4 . - $toolbar3 . - $toolbar2 . - $toolbar1 . + $toolbargroup . $clearfix, 'pageheader'); $body = $pageheader; diff --git a/mod/assign/feedback/editpdf/styles.css b/mod/assign/feedback/editpdf/styles.css index b23aa66c9c4..faa97216a18 100644 --- a/mod/assign/feedback/editpdf/styles.css +++ b/mod/assign/feedback/editpdf/styles.css @@ -167,6 +167,10 @@ float: left; } +.assignfeedback_editpdf_widget .toolbar_group { + float: right; +} + .assignfeedback_editpdf_widget .toolbar button { box-shadow: none; -moz-box-shadow: none; @@ -174,7 +178,7 @@ } .assignfeedback_editpdf_widget .toolbar { - float: right; + float: left; } .assignfeedback_editpdf_widget .navigation,