]> git.mjollnir.org Git - moodle.git/commitdiff
Merging changes from MOODLE_14_STABLE
authorjulmis <julmis>
Thu, 26 Aug 2004 20:32:28 +0000 (20:32 +0000)
committerjulmis <julmis>
Thu, 26 Aug 2004 20:32:28 +0000 (20:32 +0000)
lib/editor/htmlarea.php
lib/weblib.php

index 104b8c69e5392ec19077b3669d2eabfc2275f3cc..d6392c43e4346318bf2bb23ddcef408c150ab9f1 100644 (file)
@@ -1321,14 +1321,17 @@ HTMLArea.prototype._createLink = function(link) {
     if (typeof link == "undefined") {
         link = this.getParentElement();
         if (link && !/^a$/i.test(link.tagName)) {
-            link = null;
-            var sel = this._getSelection();
-            var rng = this._createRange(sel);
-            var len = HTMLArea.is_ie ? rng.text.toString().length : sel.toString().length;
-            if(len < 1) {
-                alert("You must select text first!");
-                return false;
+            if(link.tagName.toLowerCase() != 'img') {
+                link = null;
+                var sel = this._getSelection();
+                var rng = this._createRange(sel);
+                var len = HTMLArea.is_ie ? rng.text.toString().length : sel.toString().length;
+                if(len < 1) {
+                    alert("You must select text first!");
+                    return false;
+                }
             }
+            link = null;
         }
     }
     if (link) {
index 93871024ae88a952d3ea2687c6734c4a829d2f69..19d590d139acd442b2a5acf20878d2e7cd11b075 100644 (file)
@@ -2607,8 +2607,6 @@ function print_speller_code ($usehtmleditor=false) {
         echo "\tspeller._editor=editor;\n";
         echo "\tspeller.openChecker();\n";
         echo "}\n";
-        echo "config.registerButton(\"spell-check\",  \"spell-check\", \"". $CFG->wwwroot ."/lib/speller/spell.gif\", false, spellClickHandler);\n";
-        echo "config.toolbar.push([\"spell-check\"]);\n";
     }
 }