Skip to content

Commit

Permalink
Merge branch 'MDL-42029-master-nomerge' of git://github.com/mouneyrac…
Browse files Browse the repository at this point in the history
…/moodle

Conflicts:
	mod/assign/feedback/editpdf/lang/en/assignfeedback_editpdf.php
  • Loading branch information
Damyon Wiese committed Oct 16, 2013
2 parents 2ec2148 + ea6d867 commit fc69508
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
9 changes: 5 additions & 4 deletions mod/assign/feedback/editpdf/classes/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ public function render_assignfeedback_editpdf_widget(assignfeedback_editpdf_widg
$iconhtml = $this->pix_icon($nav_prev, $iconalt, 'assignfeedback_editpdf');
$navigation1 .= html_writer::tag('button', $iconhtml, array('disabled'=>'true',
'class'=>'navigate-previous-button', 'accesskey' => $this->get_shortcut('navigate-previous-button')));
$pageoptions = html_writer::tag('option', get_string('gotopage', 'assignfeedback_editpdf'), array('value'=>''));
$navigation1 .= html_writer::tag('select', $pageoptions, array('disabled'=>'true',
'class'=>'navigate-page-select', 'accesskey' => $this->get_shortcut('navigate-page-select')));
$navigation1 .= html_writer::tag('select', null, array('disabled'=>'true',
'aria-label' => get_string('gotopage', 'assignfeedback_editpdf'), 'class'=>'navigate-page-select',
'accesskey' => $this->get_shortcut('navigate-page-select')));
$iconalt = get_string('navigatenext', 'assignfeedback_editpdf');
$iconhtml = $this->pix_icon($nav_next, $iconalt, 'assignfeedback_editpdf');
$navigation1 .= html_writer::tag('button', $iconhtml, array('disabled'=>'true',
Expand Down Expand Up @@ -239,7 +239,8 @@ public function render_assignfeedback_editpdf_widget(assignfeedback_editpdf_widg
'deleteannotation',
'stamp',
'stamppicker',
'cannotopenpdf'
'cannotopenpdf',
'pagenumber'
), 'assignfeedback_editpdf');

return $html;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
$string['navigateprevious'] = 'Previous page';
$string['oval'] = 'Oval';
$string['output'] = 'Output:';
$string['pagenumber'] = 'Page {$a}';
$string['pagexofy'] = 'Page {$a->page} of {$a->total}';
$string['pen'] = 'Pen';
$string['pluginname'] = 'Annotate PDF';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3690,6 +3690,9 @@ EDITOR.prototype = {
this.loadingicon.hide();
drawingcanvas.setStyle('backgroundImage', 'url("' + page.url + '")');

// Update page select.
Y.one(SELECTOR.PAGESELECT).set('value', this.currentpage);

this.redraw();
},

Expand All @@ -3713,7 +3716,7 @@ EDITOR.prototype = {
for (i = 0; i < this.pages.length; i++) {
option = Y.Node.create('<option/>');
option.setAttribute('value', i);
option.setHTML((i+1));
option.setHTML(M.util.get_string('pagenumber', 'assignfeedback_editpdf', i+1));
pageselect.append(option);
}
}
Expand Down
Loading

0 comments on commit fc69508

Please sign in to comment.