diff --git a/sites/all/modules/wysiwyg/CHANGELOG.txt b/sites/all/modules/wysiwyg/CHANGELOG.txt index ce8b5471a5fa8a94d4ddad6210f47442a798aff2..4c029e1485882ee4533220282f40149d572355de 100644 --- a/sites/all/modules/wysiwyg/CHANGELOG.txt +++ b/sites/all/modules/wysiwyg/CHANGELOG.txt @@ -1,4 +1,4 @@ -// $Id: CHANGELOG.txt,v 1.194 2010/04/07 21:18:20 sun Exp $ +// $Id: CHANGELOG.txt,v 1.202 2010/09/25 11:53:19 twod Exp $ Wysiwyg x.x-x.x, xxxx-xx-xx --------------------------- @@ -6,7 +6,6 @@ Wysiwyg x.x-x.x, xxxx-xx-xx Wysiwyg 7.x-3.x, xxxx-xx-xx --------------------------- -#752516 by nquocbao, sun: Fixed openwysiwyg version callback. #739558 by sun, TwoD: Updated for new #type text_format. #612954 by TwoD: Fixed broken editor settings. #585932 by sun: Ported to Drupal 7. @@ -14,6 +13,15 @@ Wysiwyg 7.x-3.x, xxxx-xx-xx Wysiwyg 6.x-3.x, xxxx-xx-xx --------------------------- +#651490 by TwoD: Fixed Whizzywig width. +#715228 by TwoD: Fixed TinyMCE image popups not launching for existing images. +#606952 by TwoD: Fixed inserting content in fullscreen TinyMCE. +#593008 by TwoD: Fixed third-party scripts breaking Wysiwyg. +#695398 by RichieB, Cl1mh4224rd, mcpuddin: Fixed TinyMCE 3.3.9.1 detection. +#737318 by dboune: Fixed CKEditor default skin depends on filesystem order. +#775608 by TwoD: Fixed FCKEditor crashes IE on save. +#824710 by TwoD: CKEditor not disabled upon enabling. +#752516 by nquocbao, sun: Fixed openwysiwyg version callback. #753536 by TwoD: Fixed version detection for Whizzywig. #752516 by nquocbao, sun: Fixed file stream warnings in version callbacks. #628110 by quicksketch, sun, markus_petrux: Added editor settings alter hook. diff --git a/sites/all/modules/wysiwyg/editors/ckeditor.inc b/sites/all/modules/wysiwyg/editors/ckeditor.inc index db13e18e361ebadee5f1261c950851f85f456655..cf314d0b4615cc0efd773d0e6c32bbe6dc2ccfc3 100644 --- a/sites/all/modules/wysiwyg/editors/ckeditor.inc +++ b/sites/all/modules/wysiwyg/editors/ckeditor.inc @@ -1,5 +1,5 @@ <?php -// $Id: ckeditor.inc,v 1.7 2010/04/02 14:05:36 sun Exp $ +// $Id: ckeditor.inc,v 1.8 2010/09/10 02:13:59 sun Exp $ /** * @file @@ -103,6 +103,7 @@ function wysiwyg_ckeditor_themes($editor, $profile) { } } closedir($dir_handle); + natcasesort($themes); return !empty($themes) ? $themes : array('default'); } else { diff --git a/sites/all/modules/wysiwyg/editors/js/fckeditor-2.6.js b/sites/all/modules/wysiwyg/editors/js/fckeditor-2.6.js index 1dac6fda50a283150b5cab83ff1f6eb02a9d58be..5c22c14d774c6c65b434a4548e0ac83402bd1e68 100644 --- a/sites/all/modules/wysiwyg/editors/js/fckeditor-2.6.js +++ b/sites/all/modules/wysiwyg/editors/js/fckeditor-2.6.js @@ -1,4 +1,4 @@ -// $Id: fckeditor-2.6.js,v 1.20 2010/02/06 15:27:32 sun Exp $ +// $Id: fckeditor-2.6.js,v 1.21 2010/09/10 02:06:48 sun Exp $ (function($) { /** @@ -43,11 +43,19 @@ Drupal.wysiwyg.editor.detach.fckeditor = function(context, params) { // deepest. Its parent is the iFrame containing the editor. var instanceScope = instance.EditingArea.Window.parent; instanceScope.FCKTools.RemoveEventListener(instance.GetParentForm(), 'submit', instance.UpdateLinkedField); - // Remove the editor instance. + // Run cleanups before forcing an unload of the iFrames or IE crashes. + // This also deletes the instance from the FCKeditorAPI.__Instances array. + instanceScope.FCKTools.RemoveEventListener(instanceScope, 'unload', instanceScope.FCKeditorAPI_Cleanup); + instanceScope.FCKTools.RemoveEventListener(instanceScope, 'beforeunload', instanceScope.FCKeditorAPI_ConfirmCleanup); + if (jQuery.isFunction(instanceScope.FCKIECleanup_Cleanup)) { + instanceScope.FCKIECleanup_Cleanup(); + } + instanceScope.FCKeditorAPI_ConfirmCleanup(); + instanceScope.FCKeditorAPI_Cleanup(); + // Remove the editor elements. $('#' + instanceName + '___Config').remove(); $('#' + instanceName + '___Frame').remove(); $('#' + instanceName).show(); - delete instance; } }; diff --git a/sites/all/modules/wysiwyg/editors/js/tinymce-2.js b/sites/all/modules/wysiwyg/editors/js/tinymce-2.js index 43902cabb633baa873af8d9f9651bf90f597b7ec..79095cb28d810b9887d008a3200698cd4fa804a9 100644 --- a/sites/all/modules/wysiwyg/editors/js/tinymce-2.js +++ b/sites/all/modules/wysiwyg/editors/js/tinymce-2.js @@ -1,4 +1,4 @@ -// $Id: tinymce-2.js,v 1.12 2010/02/10 21:18:10 twod Exp $ +// $Id: tinymce-2.js,v 1.13 2010/09/25 03:00:16 twod Exp $ (function($) { /** @@ -48,6 +48,11 @@ Drupal.wysiwyg.editor.attach.tinymce = function(context, params, settings) { for (var setting in settings) { tinyMCE.settings[setting] = settings[setting]; } + + // #715228: Remove extra mceItem class added by Wysiwyg < v2.1. + $field = $('#' + params.field); + $field.val($field.val().replace(/class=(['"].*?)\bmceItem\b(.*?['"])/ig, 'class=$1$2')); + // Attach editor. tinyMCE.execCommand('mceAddControl', true, params.field); }; diff --git a/sites/all/modules/wysiwyg/editors/js/tinymce-3.js b/sites/all/modules/wysiwyg/editors/js/tinymce-3.js index b1d528a22debb40c209aa32804b72c6bef6b9dfb..a406e48a1c7e0c602f69303729c99ebb31334654 100644 --- a/sites/all/modules/wysiwyg/editors/js/tinymce-3.js +++ b/sites/all/modules/wysiwyg/editors/js/tinymce-3.js @@ -1,4 +1,4 @@ -// $Id: tinymce-3.js,v 1.19 2010/02/10 21:18:10 twod Exp $ +// $Id: tinymce-3.js,v 1.21 2010/09/25 03:00:16 twod Exp $ (function($) { /** @@ -60,6 +60,11 @@ Drupal.wysiwyg.editor.attach.tinymce = function(context, params, settings) { $('#' + ed.editorContainer + ' table.mceLayout td.mceToolbar').append($toolbar); $('#' + ed.editorContainer + ' table.mceToolbar').remove(); }); + + // #715228: Remove extra mceItem class added by Wysiwyg < v2.1. + $field = $('#' + params.field); + $field.val($field.val().replace(/class=(['"].*?)\bmceItem\b(.*?['"])/ig, 'class=$1$2')); + // Attach editor. ed.render(); }; @@ -106,7 +111,9 @@ Drupal.wysiwyg.editor.instance.tinymce = { ed.addCommand(plugin, function() { if (typeof Drupal.wysiwyg.plugins[plugin].invoke == 'function') { var data = { format: 'html', node: ed.selection.getNode(), content: ed.selection.getContent() }; - Drupal.wysiwyg.plugins[plugin].invoke(data, pluginSettings, ed.id); + // TinyMCE creates a completely new instance for fullscreen mode. + var instanceId = ed.id == 'mce_fullscreen' ? ed.getParam('fullscreen_editor_id') : ed.id; + Drupal.wysiwyg.plugins[plugin].invoke(data, pluginSettings, instanceId); } }); @@ -163,9 +170,10 @@ Drupal.wysiwyg.editor.instance.tinymce = { }, openDialog: function(dialog, params) { - var editor = tinyMCE.get(this.field); + var instanceId = this.isFullscreen() ? 'mce_fullscreen' : this.field; + var editor = tinyMCE.get(instanceId); editor.windowManager.open({ - file: dialog.url + '/' + this.field, + file: dialog.url + '/' + instanceId, width: dialog.width, height: dialog.height, inline: 1 @@ -173,7 +181,8 @@ Drupal.wysiwyg.editor.instance.tinymce = { }, closeDialog: function(dialog) { - var editor = tinyMCE.get(this.field); + var instanceId = this.isFullscreen() ? 'mce_fullscreen' : this.field; + var editor = tinyMCE.get(instanceId); editor.windowManager.close(dialog); }, @@ -208,7 +217,13 @@ Drupal.wysiwyg.editor.instance.tinymce = { insert: function(content) { content = this.prepareContent(content); - tinyMCE.execInstanceCommand(this.field, 'mceInsertContent', false, content); + var instanceId = this.isFullscreen() ? 'mce_fullscreen' : this.field; + tinyMCE.execInstanceCommand(instanceId, 'mceInsertContent', false, content); + }, + + isFullscreen: function() { + // TinyMCE creates a completely new instance for fullscreen mode. + return tinyMCE.activeEditor.id == 'mce_fullscreen' && tinyMCE.activeEditor.getParam('fullscreen_editor_id') == this.field; } }; diff --git a/sites/all/modules/wysiwyg/editors/js/whizzywig-56.js b/sites/all/modules/wysiwyg/editors/js/whizzywig-56.js index 2b462060ec9359593f9bfb4f24f94fb10a7e3e0b..50fb2c000571c0532a331c5e002a27cb4f2b6313 100644 --- a/sites/all/modules/wysiwyg/editors/js/whizzywig-56.js +++ b/sites/all/modules/wysiwyg/editors/js/whizzywig-56.js @@ -1,4 +1,4 @@ -// $Id: whizzywig-56.js,v 1.1 2010/02/06 17:33:34 sun Exp $ +// $Id: whizzywig-56.js,v 1.2 2010/09/25 11:53:19 twod Exp $ var wysiwygWhizzywig = { currentField: null, fields: {} }; var buttonPath = null; @@ -70,6 +70,11 @@ Drupal.wysiwyg.editor.attach.whizzywig = function(context, params, settings) { // Create Whizzywig container. wysiwygWhizzywig.currentField = params.field; wysiwygWhizzywig.fields[wysiwygWhizzywig.currentField] = ''; + // Whizzywig needs to have the width set 'inline'. + $field = $('#' + params.field); + Drupal.wysiwyg.instances[params.field].originalWidth = $field.css('width'); + $field.css('width', $field.width() + 'px'); + // Attach editor. makeWhizzyWig(params.field, (settings.buttons ? settings.buttons : 'all')); // Whizzywig fails to detect and set initial textarea contents. @@ -98,6 +103,7 @@ Drupal.wysiwyg.editor.detach.whizzywig = function(context, params) { // Remove editor instance. $('#' + whizzies[id] + '-whizzywig').remove(); whizzies.splice(id, 1); + $field.css('width', Drupal.wysiwyg.instances[$field.attr('id')].originalWidth); }; if (typeof params != 'undefined') { diff --git a/sites/all/modules/wysiwyg/editors/js/whizzywig.js b/sites/all/modules/wysiwyg/editors/js/whizzywig.js index c3bf7c6d2131c9e7702e26c760c3d68d004fbee3..ef42e468aaf74b240e23a2f6fdda6fac47fdef41 100644 --- a/sites/all/modules/wysiwyg/editors/js/whizzywig.js +++ b/sites/all/modules/wysiwyg/editors/js/whizzywig.js @@ -1,4 +1,4 @@ -// $Id: whizzywig.js,v 1.6 2009/09/29 01:48:23 sun Exp $ +// $Id: whizzywig.js,v 1.7 2010/09/25 11:53:19 twod Exp $ var wysiwygWhizzywig = { currentField: null, fields: {} }; var buttonPath = null; @@ -61,6 +61,13 @@ Drupal.wysiwyg.editor.attach.whizzywig = function(context, params, settings) { // Create Whizzywig container. wysiwygWhizzywig.currentField = params.field; wysiwygWhizzywig.fields[wysiwygWhizzywig.currentField] = ''; + // Whizzywig needs to have the width set 'inline'. + $field = $('#' + params.field); + this.instances = this.instances || {}; + this.instances[params.field] = this.instances[params.field] || {}; + this.instances[params.field].originalWidth = $field.css('width'); + $field.css('width', $field.width() + 'px'); + // Attach editor. makeWhizzyWig(params.field, (settings.buttons ? settings.buttons : 'all')); // Whizzywig fails to detect and set initial textarea contents. @@ -89,6 +96,7 @@ Drupal.wysiwyg.editor.detach.whizzywig = function(context, params) { // Remove editor instance. $('#' + whizzies[id] + '-whizzywig').remove(); whizzies.splice(id, 1); + $field.css('width', Drupal.wysiwyg.instances[$field.attr('id')].originalWidth); }; if (typeof params != 'undefined') { diff --git a/sites/all/modules/wysiwyg/editors/tinymce.inc b/sites/all/modules/wysiwyg/editors/tinymce.inc index 17fdc77d918cd2fc12f73d6fd152e92277a9c389..9c05ad1f68a6e254f59650458491518d655b4931 100644 --- a/sites/all/modules/wysiwyg/editors/tinymce.inc +++ b/sites/all/modules/wysiwyg/editors/tinymce.inc @@ -1,5 +1,5 @@ <?php -// $Id: tinymce.inc,v 1.39 2010/04/02 14:05:36 sun Exp $ +// $Id: tinymce.inc,v 1.40 2010/09/25 00:12:34 twod Exp $ /** * @file @@ -86,8 +86,8 @@ function wysiwyg_tinymce_version($editor) { return; } $script = fopen($script, 'r'); - // Version is contained in the first 100 chars. - $line = fgets($script, 100); + // Version is contained in the first 200 chars. + $line = fgets($script, 200); // 2.x: this.majorVersion="2";this.minorVersion="1.3" // 3.x: majorVersion:'3',minorVersion:'2.0.1' if (preg_match('@majorVersion[=:]["\'](\d).+?minorVersion[=:]["\']([\d\.]+)@', $line, $version)) { diff --git a/sites/all/modules/wysiwyg/wysiwyg.info b/sites/all/modules/wysiwyg/wysiwyg.info index be2c727d8af96b4fa7ebcbe7a5540d8c15905b36..57946c9be5702faa3b7d513fac68a3c258d5fe84 100644 --- a/sites/all/modules/wysiwyg/wysiwyg.info +++ b/sites/all/modules/wysiwyg/wysiwyg.info @@ -12,9 +12,9 @@ files[] = wysiwyg.install files[] = wysiwyg.admin.inc files[] = wysiwyg.dialog.inc -; Information added by drupal.org packaging script on 2010-04-08 +; Information added by drupal.org packaging script on 2010-09-25 version = "7.x-2.x-dev" core = "7.x" project = "wysiwyg" -datestamp = "1270685982" +datestamp = "1285417346" diff --git a/sites/all/modules/wysiwyg/wysiwyg.install b/sites/all/modules/wysiwyg/wysiwyg.install index fdbab738a976cf2a2aae7faae29f68f79001eb9d..24508f1915df89f2385dcb9ed1ae14cbd1a0f51e 100644 --- a/sites/all/modules/wysiwyg/wysiwyg.install +++ b/sites/all/modules/wysiwyg/wysiwyg.install @@ -1,5 +1,5 @@ <?php -// $Id: wysiwyg.install,v 1.6 2009/09/26 05:37:56 sun Exp $ +// $Id: wysiwyg.install,v 1.7 2010/09/10 00:39:16 sun Exp $ /** * Implementation of hook_schema(). @@ -24,6 +24,7 @@ function wysiwyg_enable() { // Disable conflicting, obsolete editor integration modules whenever this // module is enabled. This is crude, but the only way to ensure no conflicts. module_disable(array( + 'ckeditor', 'editarea', 'editonpro', 'editor', diff --git a/sites/all/modules/wysiwyg/wysiwyg.js b/sites/all/modules/wysiwyg/wysiwyg.js index e3ae9b4c2db92fbf455c5311b03e5a11103518b4..14b49195a08207094ec3b2cad2fd03d719cee71f 100644 --- a/sites/all/modules/wysiwyg/wysiwyg.js +++ b/sites/all/modules/wysiwyg/wysiwyg.js @@ -1,4 +1,4 @@ -// $Id: wysiwyg.js,v 1.18 2009/11/14 03:35:29 twod Exp $ +// $Id: wysiwyg.js,v 1.19 2010/09/25 00:46:33 twod Exp $ (function($) { /** @@ -201,7 +201,7 @@ Drupal.wysiwygAttachToggleLink = function(context, params) { Drupal.wysiwyg.getParams = function(element, params) { var classes = element.className.split(' '); var params = params || {}; - for (var i in classes) { + for (var i = 0; i < classes.length; i++) { if (classes[i].substr(0, 8) == 'wysiwyg-') { var parts = classes[i].split('-'); var value = parts.slice(2).join('-');