From: scyrma
Date: Tue, 23 Sep 2008 04:10:39 +0000 (+0000)
Subject: MDL-14739: upgrade tinymce from 3.0.9 to 3.2.0.1. This fixes numerous bugs in TinyMCE...
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c0d551f05f6534033d2a380ff1d1e72ec5e0ee73;p=moodle.git
MDL-14739: upgrade tinymce from 3.0.9 to 3.2.0.1. This fixes numerous bugs in TinyMCE. Also removed some cruft, removed in previous
versions of the editor.
---
diff --git a/lib/editor/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js b/lib/editor/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js
index 0db894ca3a..64fc6f677b 100644
--- a/lib/editor/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js
+++ b/lib/editor/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js
@@ -103,7 +103,7 @@ var ImageDialog = {
if (tinyMCEPopup.getParam("accessibility_warnings", 1)) {
if (!f.alt.value) {
- tinyMCEPopup.editor.windowManager.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) {
+ tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) {
if (s)
t.insertAndClose();
});
diff --git a/lib/editor/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js b/lib/editor/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js
index 2efc1b731d..a89625014a 100644
--- a/lib/editor/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js
+++ b/lib/editor/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js
@@ -428,7 +428,6 @@ function setAllAttribs(elm) {
var target = getSelectValue(formObj, 'targetlist');
setAttrib(elm, 'href', href);
- setAttrib(elm, 'mce_href', href);
setAttrib(elm, 'title');
setAttrib(elm, 'target', target == '_self' ? '' : target);
setAttrib(elm, 'id');
@@ -464,7 +463,7 @@ function setAllAttribs(elm) {
function getSelectValue(form_obj, field_name) {
var elm = form_obj.elements[field_name];
- if (elm == null || elm.options == null)
+ if (!elm || elm.options == null || elm.selectedIndex == -1)
return "";
return elm.options[elm.selectedIndex].value;
diff --git a/lib/editor/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js b/lib/editor/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js
index 31423da173..727beb574e 100644
--- a/lib/editor/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js
+++ b/lib/editor/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js
@@ -1 +1 @@
-(function(){tinymce.create('tinymce.plugins.FullPagePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceFullPageProperties',function(){ed.windowManager.open({file:url+'/fullpage.htm',width:430+parseInt(ed.getLang('fullpage.delta_width',0)),height:495+parseInt(ed.getLang('fullpage.delta_height',0)),inline:1},{plugin_url:url,head_html:t.head});});ed.addButton('fullpage',{title:'fullpage.desc',cmd:'mceFullPageProperties'});ed.onBeforeSetContent.add(t._setContent,t);ed.onSetContent.add(t._setBodyAttribs,t);ed.onGetContent.add(t._getContent,t);},getInfo:function(){return{longname:'Fullpage',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_setBodyAttribs:function(ed,o){var bdattr,i,len,kv,k,v,t,attr=this.head.match(/body(.*?)>/i);if(attr&&attr[1]){bdattr=attr[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);for(i=0,len=bdattr.length;i',sp);t.head=c.substring(0,sp+1);ep=c.indexOf('
\n';t.foot='\n