MDL-56324 assignfeedback_editpdf: Revert erroneous commits
This reverts commits88d309dand3cd718e.
This commit is contained in:
+7
-14
@@ -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'),
|
||||
pageselect = editor.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
editor = this.get('editor');
|
||||
|
||||
this.hide();
|
||||
|
||||
editor.currentpage = parseInt(pageselect.get('value'), 10);
|
||||
if (comment.pageno !== editor.currentpage) {
|
||||
if (comment.pageno === editor.currentpage) {
|
||||
comment.drawable.nodes[0].one('textarea').focus();
|
||||
} else {
|
||||
// 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();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -4084,11 +4084,8 @@ EDITOR.prototype = {
|
||||
*/
|
||||
save_current_page: function() {
|
||||
var ajaxurl = AJAXBASE,
|
||||
pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT),
|
||||
config;
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10);
|
||||
|
||||
config = {
|
||||
method: 'post',
|
||||
context: this,
|
||||
@@ -4262,9 +4259,7 @@ EDITOR.prototype = {
|
||||
*/
|
||||
previous_page: function(e) {
|
||||
e.preventDefault();
|
||||
var pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10) - 1;
|
||||
this.currentpage--;
|
||||
if (this.currentpage < 0) {
|
||||
this.currentpage = 0;
|
||||
}
|
||||
@@ -4278,9 +4273,7 @@ EDITOR.prototype = {
|
||||
*/
|
||||
next_page: function(e) {
|
||||
e.preventDefault();
|
||||
var pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10) + 1;
|
||||
this.currentpage++;
|
||||
if (this.currentpage >= this.pages.length) {
|
||||
this.currentpage = this.pages.length - 1;
|
||||
}
|
||||
|
||||
+5
-5
File diff suppressed because one or more lines are too long
+7
-14
@@ -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'),
|
||||
pageselect = editor.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
editor = this.get('editor');
|
||||
|
||||
this.hide();
|
||||
|
||||
editor.currentpage = parseInt(pageselect.get('value'), 10);
|
||||
if (comment.pageno !== editor.currentpage) {
|
||||
if (comment.pageno === editor.currentpage) {
|
||||
comment.drawable.nodes[0].one('textarea').focus();
|
||||
} else {
|
||||
// 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();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -4084,11 +4084,8 @@ EDITOR.prototype = {
|
||||
*/
|
||||
save_current_page: function() {
|
||||
var ajaxurl = AJAXBASE,
|
||||
pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT),
|
||||
config;
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10);
|
||||
|
||||
config = {
|
||||
method: 'post',
|
||||
context: this,
|
||||
@@ -4262,9 +4259,7 @@ EDITOR.prototype = {
|
||||
*/
|
||||
previous_page: function(e) {
|
||||
e.preventDefault();
|
||||
var pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10) - 1;
|
||||
this.currentpage--;
|
||||
if (this.currentpage < 0) {
|
||||
this.currentpage = 0;
|
||||
}
|
||||
@@ -4278,9 +4273,7 @@ EDITOR.prototype = {
|
||||
*/
|
||||
next_page: function(e) {
|
||||
e.preventDefault();
|
||||
var pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10) + 1;
|
||||
this.currentpage++;
|
||||
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'),
|
||||
pageselect = editor.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
editor = this.get('editor');
|
||||
|
||||
this.hide();
|
||||
|
||||
editor.currentpage = parseInt(pageselect.get('value'), 10);
|
||||
if (comment.pageno !== editor.currentpage) {
|
||||
if (comment.pageno === editor.currentpage) {
|
||||
comment.drawable.nodes[0].one('textarea').focus();
|
||||
} else {
|
||||
// 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();
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
+2
-9
@@ -993,11 +993,8 @@ EDITOR.prototype = {
|
||||
*/
|
||||
save_current_page: function() {
|
||||
var ajaxurl = AJAXBASE,
|
||||
pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT),
|
||||
config;
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10);
|
||||
|
||||
config = {
|
||||
method: 'post',
|
||||
context: this,
|
||||
@@ -1171,9 +1168,7 @@ EDITOR.prototype = {
|
||||
*/
|
||||
previous_page: function(e) {
|
||||
e.preventDefault();
|
||||
var pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10) - 1;
|
||||
this.currentpage--;
|
||||
if (this.currentpage < 0) {
|
||||
this.currentpage = 0;
|
||||
}
|
||||
@@ -1187,9 +1182,7 @@ EDITOR.prototype = {
|
||||
*/
|
||||
next_page: function(e) {
|
||||
e.preventDefault();
|
||||
var pageselect = this.get_dialogue_element(SELECTOR.PAGESELECT);
|
||||
|
||||
this.currentpage = parseInt(pageselect.get('value'), 10) + 1;
|
||||
this.currentpage++;
|
||||
if (this.currentpage >= this.pages.length) {
|
||||
this.currentpage = this.pages.length - 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user