Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged

  • Loading branch information...
commit bcdfed7384b96a44bff9cbbbd8c1fb064d8841fc 1 parent 3173b7b
julmis authored
Showing with 19 additions and 7 deletions.
  1. +19 −7 lib/editor/htmlarea.php
View
26 lib/editor/htmlarea.php
@@ -145,7 +145,10 @@ function HTMLArea(textarea, config) {
"insertorderedlist", "insertunorderedlist", "outdent", "indent", "separator",
"forecolor", "hilitecolor", "separator",
"inserthorizontalrule", "createanchor", "createlink", "unlink", "insertimage", "inserttable",
- "insertsmile", "insertchar", "separator", "htmlmode", "separator", "popupeditor" ]
+ "insertsmile", "insertchar", "separator", "htmlmode", "separator", "popupeditor"<?php
+ if(!empty($CFG->aspellpath) && !empty($CFG->editorspelling)) {
+ echo ",\"spellcheck\"";
+ }?> ]
];
this.fontname = {
@@ -223,6 +226,9 @@ function cut_copy_paste(e, cmd, obj) {
lefttoright: [ "Direction left to right", "ed_left_to_right.gif", false, function(e) {e.execCommand("lefttoright");} ],
righttoleft: [ "Direction right to left", "ed_right_to_left.gif", false, function(e) {e.execCommand("righttoleft");} ],
insertsmile: ["Insert Smiley", "em.icon.smile.gif", false, function(e) {e.execCommand("insertsmile");} ],
+ <?php if(!empty($CFG->aspellpath) && !empty($CFG->editorspelling)) {
+ echo "spellcheck: [\"Spell-check\", \"spell-check.gif\", false, spellClickHandler ],\n";
+ }?>
insertchar: [ "Insert Char", "icon_ins_char.gif", false, function(e) {e.execCommand("insertchar");} ]
};
@@ -1336,7 +1342,7 @@ function (str, l1, l2, l3) {
outparam = {
f_anchors:anchors };
}
- this._popupDialog("link_std.php?id=<?php echo $id; ?>", function(param) {
+ this._popupDialog("link_std.php?id=<?php print(isset($id) && !empty($id)) ? $id : ''; ?>", function(param) {
if (!param)
return false;
var a = link;
@@ -1381,10 +1387,16 @@ function (str, l1, l2, l3) {
f_height : image.height
};
this._popupDialog("<?php
- if(isteacher($id)) {
- echo "insert_image.php?id=$id";
+ if(!empty($id)) {
+ if(isteacher($id)) {
+ echo "insert_image.php?id=";
+ print(isset($id) && !empty($id)) ? $id : "";
+ } else {
+ echo "insert_image_std.php?id=";
+ print(isset($id) && !empty($id)) ? $id : "";
+ }
} else {
- echo "insert_image_std.php?id=$id";
+ echo "insert_image_std.php?id=";
}?>", function(param) {
if (!param) { // user must have pressed Cancel
return false;
@@ -1609,12 +1621,12 @@ function (str, l1, l2, l3) {
HTMLArea._object = this;
if (HTMLArea.is_ie) {
{
- window.open(this.popupURL("fullscreen.php?id=<?php print($id);?>"), "ha_fullscreen",
+ window.open(this.popupURL("fullscreen.php?id=<?php print(isset($id) && !empty($id)) ? $id : '';?>"), "ha_fullscreen",
"toolbar=no,location=no,directories=no,status=no,menubar=no," +
"scrollbars=no,resizable=yes,width=800,height=600");
}
} else {
- window.open(this.popupURL("fullscreen.php?id=<?php print($id);?>"), "ha_fullscreen",
+ window.open(this.popupURL("fullscreen.php?id=<?php print(isset($id) && !empty($id)) ? $id : '';?>"), "ha_fullscreen",
"toolbar=no,menubar=no,personalbar=no,width=800,height=600," +
"scrollbars=no,resizable=yes");
}
Please sign in to comment.
Something went wrong with that request. Please try again.