Merging changes from MOODLE_14_STABLE

This commit is contained in:
julmis 2004-08-26 20:32:28 +00:00
parent bb5b23f48c
commit af815ebd77
2 changed files with 10 additions and 9 deletions

View 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) {

View 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";
}
}