MDL-45119 editpdf: Do not load quick comments in read-only mode

This commit is contained in:
Andrew Nicols 2014-04-16 15:22:54 +08:00
parent 5344148b34
commit 8ae76e1388
4 changed files with 22 additions and 10 deletions

View file

@ -3210,8 +3210,10 @@ EDITOR.prototype = {
this.currentedit.start = false; this.currentedit.start = false;
this.currentedit.end = false; this.currentedit.end = false;
if (!this.get('readonly')) {
this.quicklist = new M.assignfeedback_editpdf.quickcommentlist(this); this.quicklist = new M.assignfeedback_editpdf.quickcommentlist(this);
} }
}
}, },
/** /**
@ -3467,7 +3469,9 @@ EDITOR.prototype = {
} }
// Update the ui. // Update the ui.
if (this.quicklist) {
this.quicklist.load(); this.quicklist.load();
}
this.setup_navigation(); this.setup_navigation();
this.setup_toolbar(); this.setup_toolbar();
this.change_page(); this.change_page();

View file

@ -3210,8 +3210,10 @@ EDITOR.prototype = {
this.currentedit.start = false; this.currentedit.start = false;
this.currentedit.end = false; this.currentedit.end = false;
if (!this.get('readonly')) {
this.quicklist = new M.assignfeedback_editpdf.quickcommentlist(this); this.quicklist = new M.assignfeedback_editpdf.quickcommentlist(this);
} }
}
}, },
/** /**
@ -3467,7 +3469,9 @@ EDITOR.prototype = {
} }
// Update the ui. // Update the ui.
if (this.quicklist) {
this.quicklist.load(); this.quicklist.load();
}
this.setup_navigation(); this.setup_navigation();
this.setup_toolbar(); this.setup_toolbar();
this.change_page(); this.change_page();

View file

@ -205,8 +205,10 @@ EDITOR.prototype = {
this.currentedit.start = false; this.currentedit.start = false;
this.currentedit.end = false; this.currentedit.end = false;
if (!this.get('readonly')) {
this.quicklist = new M.assignfeedback_editpdf.quickcommentlist(this); this.quicklist = new M.assignfeedback_editpdf.quickcommentlist(this);
} }
}
}, },
/** /**
@ -462,7 +464,9 @@ EDITOR.prototype = {
} }
// Update the ui. // Update the ui.
if (this.quicklist) {
this.quicklist.load(); this.quicklist.load();
}
this.setup_navigation(); this.setup_navigation();
this.setup_toolbar(); this.setup_toolbar();
this.change_page(); this.change_page();