mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
Merging changes from MOODLE_14_STABLE
This commit is contained in:
parent
bb5b23f48c
commit
af815ebd77
@ -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) {
|
||||
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user