mirror of
https://github.com/moodle/moodle.git
synced 2025-03-22 00:20:37 +01:00
Merge branch 'MDL-56324-master' of https://github.com/lucisgit/moodle
This commit is contained in:
commit
287a906645
@ -2298,18 +2298,18 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
|
||||
e.preventDefault();
|
||||
var target = e.target.ancestor('li'),
|
||||
comment = target.getData('comment'),
|
||||
editor = this.get('editor');
|
||||
editor = this.get('editor'),
|
||||
pageselect = editor.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.hide();
|
||||
|
||||
if (comment.pageno === editor.currentpage) {
|
||||
comment.drawable.nodes[0].one('textarea').focus();
|
||||
} else {
|
||||
editor.currentpage = parseInt(pageselect.get('value'), 10);
|
||||
if (comment.pageno !== editor.currentpage) {
|
||||
// Comment is on a different page.
|
||||
editor.currentpage = comment.pageno;
|
||||
editor.change_page();
|
||||
comment.drawable.nodes[0].one('textarea').focus();
|
||||
}
|
||||
comment.drawable.nodes[0].one('textarea').focus();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -4253,7 +4253,9 @@ EDITOR.prototype = {
|
||||
*/
|
||||
previous_page: function(e) {
|
||||
e.preventDefault();
|
||||
this.currentpage--;
|
||||
var pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10) - 1;
|
||||
if (this.currentpage < 0) {
|
||||
this.currentpage = 0;
|
||||
}
|
||||
@ -4267,7 +4269,9 @@ EDITOR.prototype = {
|
||||
*/
|
||||
next_page: function(e) {
|
||||
e.preventDefault();
|
||||
this.currentpage++;
|
||||
var pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10) + 1;
|
||||
if (this.currentpage >= this.pages.length) {
|
||||
this.currentpage = this.pages.length - 1;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -2298,18 +2298,18 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
|
||||
e.preventDefault();
|
||||
var target = e.target.ancestor('li'),
|
||||
comment = target.getData('comment'),
|
||||
editor = this.get('editor');
|
||||
editor = this.get('editor'),
|
||||
pageselect = editor.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.hide();
|
||||
|
||||
if (comment.pageno === editor.currentpage) {
|
||||
comment.drawable.nodes[0].one('textarea').focus();
|
||||
} else {
|
||||
editor.currentpage = parseInt(pageselect.get('value'), 10);
|
||||
if (comment.pageno !== editor.currentpage) {
|
||||
// Comment is on a different page.
|
||||
editor.currentpage = comment.pageno;
|
||||
editor.change_page();
|
||||
comment.drawable.nodes[0].one('textarea').focus();
|
||||
}
|
||||
comment.drawable.nodes[0].one('textarea').focus();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -4253,7 +4253,9 @@ EDITOR.prototype = {
|
||||
*/
|
||||
previous_page: function(e) {
|
||||
e.preventDefault();
|
||||
this.currentpage--;
|
||||
var pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10) - 1;
|
||||
if (this.currentpage < 0) {
|
||||
this.currentpage = 0;
|
||||
}
|
||||
@ -4267,7 +4269,9 @@ EDITOR.prototype = {
|
||||
*/
|
||||
next_page: function(e) {
|
||||
e.preventDefault();
|
||||
this.currentpage++;
|
||||
var pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10) + 1;
|
||||
if (this.currentpage >= this.pages.length) {
|
||||
this.currentpage = this.pages.length - 1;
|
||||
}
|
||||
|
@ -102,18 +102,18 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
|
||||
e.preventDefault();
|
||||
var target = e.target.ancestor('li'),
|
||||
comment = target.getData('comment'),
|
||||
editor = this.get('editor');
|
||||
editor = this.get('editor'),
|
||||
pageselect = editor.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.hide();
|
||||
|
||||
if (comment.pageno === editor.currentpage) {
|
||||
comment.drawable.nodes[0].one('textarea').focus();
|
||||
} else {
|
||||
editor.currentpage = parseInt(pageselect.get('value'), 10);
|
||||
if (comment.pageno !== editor.currentpage) {
|
||||
// Comment is on a different page.
|
||||
editor.currentpage = comment.pageno;
|
||||
editor.change_page();
|
||||
comment.drawable.nodes[0].one('textarea').focus();
|
||||
}
|
||||
comment.drawable.nodes[0].one('textarea').focus();
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1162,7 +1162,9 @@ EDITOR.prototype = {
|
||||
*/
|
||||
previous_page: function(e) {
|
||||
e.preventDefault();
|
||||
this.currentpage--;
|
||||
var pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10) - 1;
|
||||
if (this.currentpage < 0) {
|
||||
this.currentpage = 0;
|
||||
}
|
||||
@ -1176,7 +1178,9 @@ EDITOR.prototype = {
|
||||
*/
|
||||
next_page: function(e) {
|
||||
e.preventDefault();
|
||||
this.currentpage++;
|
||||
var pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10) + 1;
|
||||
if (this.currentpage >= this.pages.length) {
|
||||
this.currentpage = this.pages.length - 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user