Changeset 4799
- Timestamp:
- 01/25/07 01:20:47 (1 year ago)
- Files:
-
- trunk/wp-includes/js/tinymce/plugins/autosave/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js (modified) (8 diffs)
- trunk/wp-includes/js/tinymce/plugins/paste/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/about.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/css/editor_ui.css (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/editor_template.js (modified) (11 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/jscripts/source_editor.js (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/tiny_mce.js (modified) (53 diffs)
- trunk/wp-includes/js/tinymce/utils/editable_selects.js (added)
- trunk/wp-includes/js/tinymce/utils/form_utils.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/utils/mclayer.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/utils/mctabs.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/utils/validate.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/wp-mce-help.php (modified) (1 diff)
- trunk/wp-includes/script-loader.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/js/tinymce/plugins/autosave/editor_plugin.js
r4747 r4799 1 1 /** 2 * $Id: editor_plugin_src.js 1 26 2006-10-22 16:19:55Z spocke $2 * $Id: editor_plugin_src.js 162 2007-01-03 16:16:52Z spocke $ 3 3 * 4 4 * @author Moxiecode 5 * @copyright Copyright � 2004-200 6, Moxiecode Systems AB, All rights reserved.5 * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved. 6 6 */ 7 7 trunk/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js
r4747 r4799 1 1 /** 2 * $Id: editor_plugin_src.js 1 26 2006-10-22 16:19:55Z spocke $2 * $Id: editor_plugin_src.js 162 2007-01-03 16:16:52Z spocke $ 3 3 * 4 4 * @author Moxiecode 5 * @copyright Copyright � 2004-200 6, Moxiecode Systems AB, All rights reserved.5 * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved. 6 6 */ 7 7 trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js
r4747 r4799 1 1 /** 2 * $Id: editor_plugin_src.js 1 26 2006-10-22 16:19:55Z spocke $2 * $Id: editor_plugin_src.js 172 2007-01-09 11:37:11Z spocke $ 3 3 * 4 4 * Moxiecode DHTML Windows script. 5 5 * 6 6 * @author Moxiecode 7 * @copyright Copyright � 2004-200 6, Moxiecode Systems AB, All rights reserved.7 * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved. 8 8 */ 9 9 … … 67 67 68 68 var elm = document.getElementById(this.selectedInstance.editorId + '_parent'); 69 var pos = tinyMCE.getAbsPosition(elm); 69 70 if (tinyMCE.hasPlugin('fullscreen') && this.selectedInstance.getData('fullscreen').enabled) 71 pos = { absLeft: 0, absTop: 0 }; 72 else 73 pos = tinyMCE.getAbsPosition(elm); 70 74 71 75 // Center div in editor area … … 73 77 pos.absTop += Math.round((elm.firstChild.clientHeight / 2) - (height / 2)); 74 78 75 url += tinyMCE.settings['imp_version'] ? (url.indexOf('?')==-1?'?':'&') + 'ver=' + tinyMCE.settings['imp_version'] : ''; 79 url += tinyMCE.settings['imp_version'] ? (url.indexOf('?')==-1?'?':'&') + 'ver=' + tinyMCE.settings['imp_version'] : ''; // WordPress cache buster 76 80 77 81 mcWindows.open(url, mcWindows.idCounter++, "modal=yes,width=" + width+ ",height=" + height + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",statusbar=" + resizable + ",left=" + pos.absLeft + ",top=" + pos.absTop); … … 112 116 this.selectedWindow = null; 113 117 this.lastSelectedWindow = null; 114 this.zindex = 100 ;118 this.zindex = 1001; 115 119 this.mouseDownScreenX = 0; 116 120 this.mouseDownScreenY = 0; … … 324 328 // Blocks the document events by placing a image over the whole document 325 329 TinyMCE_Windows.prototype.setDocumentLock = function(state) { 330 var elm = document.getElementById('mcWindowEventBlocker'); 331 326 332 if (state) { 327 var elm = document.getElementById('mcWindowEventBlocker');328 333 if (elm == null) { 329 334 elm = document.createElement("div"); … … 349 354 elm.style.zIndex = mcWindows.zindex-1; 350 355 elm.style.display = "block"; 351 } else { 352 var elm = document.getElementById('mcWindowEventBlocker'); 353 356 } else if (elm != null) { 354 357 if (mcWindows.windows.length == 0) 355 358 elm.parentNode.removeChild(elm); … … 560 563 mcWindows.setDocumentLock(false); 561 564 562 tinyMCE.selectedInstance.getWin().focus(); 565 tinyMCE.selectedInstance.getWin().focus(); // WordPress: focus on the editor after closing a popup 563 566 }; 564 567 … … 579 582 height = height < 100 ? 100 : height; 580 583 581 this.wrapperIFrameElement.style.width = width+2;582 this.wrapperIFrameElement.style.height = height+2;584 this.wrapperIFrameElement.style.width = (width+2) + 'px'; 585 this.wrapperIFrameElement.style.height = (height+2) + 'px'; 583 586 this.wrapperIFrameElement.width = width+2; 584 587 this.wrapperIFrameElement.height = height+2; 585 this.winElement.style.width = width ;586 this.winElement.style.height = height ;588 this.winElement.style.width = width + 'px'; 589 this.winElement.style.height = height + 'px'; 587 590 588 591 height = height - this.deltaHeight; 589 592 590 this.containerElement.style.width = width; 591 592 this.iframeElement.style.width = width; 593 this.iframeElement.style.height = height; 594 this.bodyElement.style.width = width; 595 this.bodyElement.style.height = height; 596 this.headElement.style.width = width; 597 //this.statusElement.style.width = width; 593 this.containerElement.style.width = width + 'px'; 594 this.iframeElement.style.width = width + 'px'; 595 this.iframeElement.style.height = height + 'px'; 596 this.bodyElement.style.width = width + 'px'; 597 this.bodyElement.style.height = height + 'px'; 598 this.headElement.style.width = width + 'px'; 599 //this.statusElement.style.width = width + 'px'; 598 600 599 601 mcWindows.cancelEvent(e); trunk/wp-includes/js/tinymce/plugins/paste/editor_plugin.js
r4747 r4799 1 1 /** 2 * $Id: editor_plugin_src.js 1 26 2006-10-22 16:19:55Z spocke $2 * $Id: editor_plugin_src.js 162 2007-01-03 16:16:52Z spocke $ 3 3 * 4 4 * @author Moxiecode 5 * @copyright Copyright � 2004-200 6, Moxiecode Systems AB, All rights reserved.5 * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved. 6 6 */ 7 7 trunk/wp-includes/js/tinymce/themes/advanced/about.htm
r3664 r4799 22 22 <p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a> 23 23 by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p> 24 <p>Copyright © 2003-200 6, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>24 <p>Copyright © 2003-2007, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p> 25 25 <p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p> 26 26 trunk/wp-includes/js/tinymce/themes/advanced/css/editor_ui.css
r4506 r4799 1 1 /* This file contains the CSS data for the editor UI of TinyMCE instances */ 2 2 3 .mceToolbarTop a, .mceToolbarTop a:visited, .mceToolbarTop a:hover, .mceToolbarBottom a, .mceToolbarBottom a:visited, .mceToolbarBottom a:hover {border: 0; margin: 0; padding: 0;background: transparent;}3 .mceToolbarTop a, .mceToolbarTop a:visited, .mceToolbarTop a:hover, .mceToolbarBottom a, .mceToolbarBottom a:visited, .mceToolbarBottom a:hover {border: 0; margin: 0; padding: 0; background: transparent;} 4 4 .mceSeparatorLine {border: 0; padding: 0; margin-left: 4px; margin-right: 2px;} 5 5 .mceSelectList {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 7pt !important; font-weight: normal; margin-top: 3px; padding: 0; display: inline; vertical-align: top; background-color: #F0F0EE;} 6 6 .mceLabel, .mceLabelDisabled {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt;} 7 7 .mceLabel {color: #000000;} 8 .mceLabelDisabled {cursor: text; color: #999999;}9 .mceEditor {background: #F0F0EE; border: 1px solid #cccccc; padding: 0;margin: 0;}10 .mceEditorArea { font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; background: #FFFFFF; padding: 0; margin: 0;}11 .mceToolbarTop, .mceToolbarBottom {background: #F0F0EE; line-height: 1px;font-size: 1px;}8 .mceLabelDisabled {cursor: text; color: #999999;} 9 .mceEditor {background: #F0F0EE; border: 1px solid #cccccc; padding: 0; margin: 0;} 10 .mceEditorArea { font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; background: #FFFFFF; padding: 0; margin: 0; } 11 .mceToolbarTop, .mceToolbarBottom {background: #F0F0EE; line-height: 1px; font-size: 1px;} 12 12 .mceToolbarTop {border-bottom: 1px solid #cccccc; padding-bottom: 1px;} 13 13 .mceToolbarBottom {border-top: 1px solid #cccccc;} 14 .mceToolbarContainer {position: relative; left: 0; top: 0;display: block;}14 .mceToolbarContainer {position: relative; left: 0; top: 0; display: block;} 15 15 .mceStatusbarTop, .mceStatusbarBottom, .mceStatusbar {height: 20px;} 16 .mceStatusbarTop .mceStatusbarPathText, .mceStatusbarBottom .mceStatusbarPathText, .mceStatusbar .mceStatusbarPathText {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; padding: 2px; line-height: 16px;overflow: visible;}16 .mceStatusbarTop .mceStatusbarPathText, .mceStatusbarBottom .mceStatusbarPathText, .mceStatusbar .mceStatusbarPathText {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; padding: 2px; line-height: 16px; overflow: visible;} 17 17 .mceStatusbarTop {border-bottom: 1px solid #cccccc;} 18 18 .mceStatusbarBottom {border-top: 1px solid #cccccc;} 19 19 .mceStatusbar {border-bottom: 1px solid #cccccc;} 20 .mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover {text-decoration: none; font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt;color: #000000;}20 .mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover {text-decoration: none; font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; color: #000000;} 21 21 .mcePathItem:hover {text-decoration: underline;} 22 22 .mceStatusbarPathText {float: left;} 23 .mceStatusbarResize {float: right; background-image: url('../images/statusbar_resize.gif'); background-repeat: no-repeat; width: 11px; height: 20px;cursor: se-resize;}24 .mceResizeBox {width: 10px; height: 10px; display: none; border: 1px dotted gray; margin: 0;padding: 0;}23 .mceStatusbarResize {float: right; background-image: url('../images/statusbar_resize.gif'); background-repeat: no-repeat; width: 11px; height: 20px; cursor: se-resize;} 24 .mceResizeBox {width: 10px; height: 10px; display: none; border: 1px dotted gray; margin: 0; padding: 0;} 25 25 .mceEditorIframe {border: 0;} 26 26 27 27 /* Button CSS rules */ 28 28 29 a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {width: 20px; height: 20px; cursor: default; margin-top: 1px;margin-left: 1px;}29 a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {width: 20px; height: 20px; cursor: default; margin-top: 1px; margin-left: 1px;} 30 30 a.mceButtonDisabled img {border: 0 !important;} 31 31 a.mceButtonNormal img, a.mceButtonSelected img {border: 1px solid #F0F0EE !important;} 32 a.mceButtonSelected img {border: 1px solid #6779AA !important; background-color: #D4D5D8;}33 a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {border: 1px solid #0A246A !important; cursor: default;background-color: #B6BDD2;}34 a.mceButtonDisabled img {-moz-opacity:0.3; opacity: 0.3; border: 1px solid #F0F0EE !important;cursor: default;}35 a.mceTiledButton img {background-image: url('../images/buttons.gif'); background-repeat: no-repeat;}32 a.mceButtonSelected img {border: 1px solid #6779AA !important; background-color: #D4D5D8;} 33 a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {border: 1px solid #0A246A !important; cursor: default; background-color: #B6BDD2;} 34 a.mceButtonDisabled img {-moz-opacity:0.3; opacity: 0.3; border: 1px solid #F0F0EE !important; cursor: default;} 35 a.mceTiledButton img {background-image: url('../images/buttons.gif'); background-repeat: no-repeat;} 36 36 37 37 /* Menu button CSS rules */ 38 38 39 span.mceMenuButton img, span.mceMenuButtonSelected img {border: 1px solid #F0F0EE; margin-left: 1px;}40 span.mceMenuButtonSelected img {border: 1px solid #6779AA; background-color: #B6BDD2;}41 span.mceMenuButtonSelected img.mceMenuButton {border: 1px solid #F0F0EE; background-color: transparent;}42 span.mceMenuButton img.mceMenuButton, span.mceMenuButtonSelected img.mceMenuButton {border-left: 0; margin-left: 0;}43 span.mceMenuButton:hover img, span.mceMenuButtonSelected:hover img {border: 1px solid #0A246A; background-color: #B6BDD2;}39 span.mceMenuButton img, span.mceMenuButtonSelected img {border: 1px solid #F0F0EE; margin-left: 1px;} 40 span.mceMenuButtonSelected img {border: 1px solid #6779AA; background-color: #B6BDD2;} 41 span.mceMenuButtonSelected img.mceMenuButton {border: 1px solid #F0F0EE; background-color: transparent;} 42 span.mceMenuButton img.mceMenuButton, span.mceMenuButtonSelected img.mceMenuButton {border-left: 0; margin-left: 0;} 43 span.mceMenuButton:hover img, span.mceMenuButtonSelected:hover img {border: 1px solid #0A246A; background-color: #B6BDD2;} 44 44 span.mceMenuButton:hover img.mceMenuButton, span.mceMenuButtonSelected:hover img.mceMenuButton {border-left: 0;} 45 span.mceMenuButtonFocus img {border: 1px solid gray; border-right: 0; margin-left: 1px;background-color: #F5F4F2;}46 span.mceMenuButtonFocus img.mceMenuButton {border: 1px solid gray; border-left: 1px solid #F5F4F2;margin-left: 0;}47 span.mceMenuHover img {border: 1px solid #0A246A; background-color: #B6BDD2;}48 span.mceMenuButtonSelected.mceMenuHover img.mceMenuButton {border: 1px solid #0A246A; background-color: #B6BDD2;border-left: 0;}45 span.mceMenuButtonFocus img {border: 1px solid gray; border-right: 0; margin-left: 1px; background-color: #F5F4F2;} 46 span.mceMenuButtonFocus img.mceMenuButton {border: 1px solid gray; border-left: 1px solid #F5F4F2; margin-left: 0;} 47 span.mceMenuHover img {border: 1px solid #0A246A; background-color: #B6BDD2;} 48 span.mceMenuButtonSelected.mceMenuHover img.mceMenuButton {border: 1px solid #0A246A; background-color: #B6BDD2; border-left: 0;} 49 49 50 50 /* Menu */ 51 51 52 .mceMenu {position: absolute; left: 0; top: 0; display: none; z-index: 100; background-color: white; border: 1px solid gray;font-weight: normal;}53 .mceMenu a, .mceMenuTitle, .mceMenuDisabled {display: block; width: 100%; text-decoration: none; background-color: white; font-family: Tahoma, Verdana, Arial, Helvetica; font-size: 11px; line-height: 20px;color: black;}54 .mceMenu a:hover {background-color: #B6BDD2; color: black;text-decoration: none !important;}55 .mceMenu span {padding-left: 10px; padding-right: 10px; display: block;line-height: 20px;}56 .mceMenuSeparator {border-bottom: 1px solid gray; background-color: gray;height: 1px;}52 .mceMenu {position: absolute; left: 0; top: 0; display: none; z-index: 100; background-color: white; border: 1px solid gray; font-weight: normal;} 53 .mceMenu a, .mceMenuTitle, .mceMenuDisabled {display: block; width: 100%; text-decoration: none; background-color: white; font-family: Tahoma, Verdana, Arial, Helvetica; font-size: 11px; line-height: 20px; color: black;} 54 .mceMenu a:hover {background-color: #B6BDD2; color: black; text-decoration: none !important;} 55 .mceMenu span {padding-left: 10px; padding-right: 10px; display: block; line-height: 20px;} 56 .mceMenuSeparator {border-bottom: 1px solid gray; background-color: gray; height: 1px;} 57 57 .mceMenuTitle span {padding-left: 5px;} 58 .mceMenuTitle {background-color: #DDDDDD; font-weight: bold;}58 .mceMenuTitle {background-color: #DDDDDD; font-weight: bold;} 59 59 .mceMenuDisabled {color: gray;} 60 span.mceMenuSelectedItem {background-image: url('../images/menu_check.gif'); background-repeat: no-repeat; background-position: 5px 8px;padding-left: 20px;}60 span.mceMenuSelectedItem {background-image: url('../images/menu_check.gif'); background-repeat: no-repeat; background-position: 5px 8px; padding-left: 20px;} 61 61 span.mceMenuCheckItem {padding-left: 20px;} 62 span.mceMenuLine {display: block; position: absolute; left: 0; top: -1px; background-color: #F5F4F2; width: 30px; height: 1px; overflow: hidden; padding-left: 0;padding-right: 0;}63 .mceColors table, .mceColors td {margin: 0; padding: 2px;}64 a.mceMoreColors {width: 130px; margin: 0; padding: 0; margin-left: 3px; margin-bottom: 3px; text-align: center;border: 1px solid white;}65 .mceColorPreview {position: absolute; left: 0; top: 0; margin-left: 3px; margin-top: 15px; width: 16px; height: 4px;background-color: red;}62 span.mceMenuLine {display: block; position: absolute; left: 0; top: -1px; background-color: #F5F4F2; width: 30px; height: 1px; overflow: hidden; padding-left: 0; padding-right: 0;} 63 .mceColors table, .mceColors td {margin: 0; padding: 2px;} 64 a.mceMoreColors {width: 130px; margin: 0; padding: 0; margin-left: 3px; margin-bottom: 3px; text-align: center; border: 1px solid white;} 65 .mceColorPreview {position: absolute; overflow:hidden; left: 0; top: 0; margin-left: 3px; margin-top: 15px; width: 16px; height: 4px; background-color: red;} 66 66 a.mceMoreColors:hover {border: 1px solid #0A246A;} 67 .mceColors td a {width: 9px; height: 9px; overflow: hidden;border: 1px solid #808080;}67 .mceColors td a {width: 9px; height: 9px; overflow: hidden; border: 1px solid #808080;} 68 68 69 69 /* MSIE 6 specific rules */ 70 70 71 * html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px;margin-bottom: 1px;}72 * html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;}71 * html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;} 72 * html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;} 73 73 * html a.mceButtonDisabled {border: 1px solid #F0F0EE !important;} 74 * html a.mceButtonNormal, * html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;}75 * html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;}76 * html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2;cursor: default;}74 * html a.mceButtonNormal, * html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;} 75 * html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;} 76 * html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;} 77 77 * html .mceSelectList {margin-top: 2px;} 78 * html span.mceMenuButton, * html span.mceMenuButtonFocus {position: relative; left: 0;top: 0;}79 * html span.mceMenuButton img, * html span.mceMenuButtonSelected img, * html span.mceMenuButtonFocus img {position: relative; top: 1px;}78 * html span.mceMenuButton, * html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;} 79 * html span.mceMenuButton img, * html span.mceMenuButtonSelected img, * html span.mceMenuButtonFocus img {position: relative; top: 1px;} 80 80 * html a.mceMoreColors {width: 132px;} 81 * html .mceColors td a {width: 10px; height: 10px;}82 * html .mceColorPreview {margin-left: 2px; margin-top: 14px;}81 * html .mceColors td a {width: 10px; height: 10px;} 82 * html .mceColorPreview {margin-left: 2px; margin-top: 14px;} 83 83 84 84 /* MSIE 7 specific rules */ 85 85 86 *:first-child+html a.mceButtonNormal img, *:first-child+html a.mceButtonSelected img, *:first-child+html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px;margin-bottom: 1px;}87 *:first-child+html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;}86 *:first-child+html a.mceButtonNormal img, *:first-child+html a.mceButtonSelected img, *:first-child+html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;} 87 *:first-child+html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;} 88 88 *:first-child+html a.mceButtonDisabled {border: 1px solid #F0F0EE !important;} 89 *:first-child+html a.mceButtonNormal, *:first-child+html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;}90 *:first-child+html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;}91 *:first-child+html a.mceButtonNormal:hover, *:first-child+html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2;cursor: default;}89 *:first-child+html a.mceButtonNormal, *:first-child+html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;} 90 *:first-child+html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;} 91 *:first-child+html a.mceButtonNormal:hover, *:first-child+html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;} 92 92 *:first-child+html .mceSelectList {margin-top: 2px;} 93 *:first-child+html span.mceMenuButton, *:first-child+html span.mceMenuButtonFocus {position: relative; left: 0;top: 0;}94 *:first-child+html span.mceMenuButton img, *:first-child+html span.mceMenuButtonSelected img, *:first-child+html span.mceMenuButtonFocus img {position: relative; top: 1px;}93 *:first-child+html span.mceMenuButton, *:first-child+html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;} 94 *:first-child+html span.mceMenuButton img, *:first-child+html span.mceMenuButtonSelected img, *:first-child+html span.mceMenuButtonFocus img {position: relative; top: 1px;} 95 95 *:first-child+html a.mceMoreColors {width: 132px;} 96 *:first-child+html .mceColors td a {width: 10px; height: 10px;}97 *:first-child+html .mceColorPreview {margin: 0; padding-left: 4px; margin-top: 14px; width: 14px;}96 *:first-child+html .mceColors td a {width: 10px; height: 10px;} 97 *:first-child+html .mceColorPreview {margin: 0; padding-left: 4px; margin-top: 14px; width: 14px;} trunk/wp-includes/js/tinymce/themes/advanced/editor_template.js
r4506 r4799 1 1 /** 2 * $Id: editor_template_src.js 1 29 2006-10-23 09:45:17Z spocke $2 * $Id: editor_template_src.js 166 2007-01-05 10:31:50Z spocke $ 3 3 * 4 4 * @author Moxiecode 5 * @copyright Copyright � 2004-200 6, Moxiecode Systems AB, All rights reserved.5 * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved. 6 6 */ 7 7 … … 714 714 715 715 template['html'] = tinyMCE.replaceVar(template['html'], 'style_select_options', styleSelectHTML); 716 template['delta_width'] = 0; 717 template['delta_height'] = deltaHeight; 716 717 // Set to default values 718 if (!template['delta_width']) 719 template['delta_width'] = 0; 720 721 if (!template['delta_height']) 722 template['delta_height'] = deltaHeight; 718 723 719 724 return template; … … 733 738 }, 734 739 740 removeInstance : function(inst) { 741 var fcm = new TinyMCE_Layer(inst.editorId + '_fcMenu'); 742 743 fcm.remove(); 744 }, 745 735 746 _handleMenuEvent : function(e) { 736 747 var te = tinyMCE.isMSIE ? window.event.srcElement : e.target; … … 781 792 782 793 return false; 783 };784 785 function getAttrib(elm, name) {786 return elm.getAttribute(name) ? elm.getAttribute(name) : "";787 794 }; 788 795 … … 840 847 if (st != "") { 841 848 st = tinyMCE.serializeStyle(tinyMCE.parseStyle(st)); 842 nodeData += "style: " + st+ " ";849 nodeData += "style: " + tinyMCE.xmlEncode(st) + " "; 843 850 } 844 851 } … … 850 857 var face = tinyMCE.getAttrib(path[i], "face"); 851 858 if (face != "") 852 nodeData += "font: " + face+ " ";859 nodeData += "font: " + tinyMCE.xmlEncode(face) + " "; 853 860 854 861 var size = tinyMCE.getAttrib(path[i], "size"); 855 862 if (size != "") 856 nodeData += "size: " + size+ " ";863 nodeData += "size: " + tinyMCE.xmlEncode(size) + " "; 857 864 858 865 var color = tinyMCE.getAttrib(path[i], "color"); 859 866 if (color != "") 860 nodeData += "color: " + color+ " ";861 } 862 863 if ( getAttrib(path[i], 'id') != "") {867 nodeData += "color: " + tinyMCE.xmlEncode(color) + " "; 868 } 869 870 if (tinyMCE.getAttrib(path[i], 'id') != "") { 864 871 nodeData += "id: " + path[i].getAttribute('id') + " "; 865 872 } … … 869 876 nodeData += "class: " + className + " "; 870 877 871 if ( getAttrib(path[i], 'src') != "") {878 if (tinyMCE.getAttrib(path[i], 'src') != "") { 872 879 var src = tinyMCE.getAttrib(path[i], "mce_src"); 873 880 … … 875 882 src = tinyMCE.getAttrib(path[i], "src"); 876 883 877 nodeData += "src: " + src+ " ";878 } 879 880 if (path[i].nodeName == 'A' && getAttrib(path[i], 'href') != "") {884 nodeData += "src: " + tinyMCE.xmlEncode(src) + " "; 885 } 886 887 if (path[i].nodeName == 'A' && tinyMCE.getAttrib(path[i], 'href') != "") { 881 888 var href = tinyMCE.getAttrib(path[i], "mce_href"); 882 889 … … 884 891 href = tinyMCE.getAttrib(path[i], "href"); 885 892 886 nodeData += "href: " + href+ " ";893 nodeData += "href: " + tinyMCE.xmlEncode(href) + " "; 887 894 } 888 895 … … 895 902 if (nodeName == "a" && (anchor = tinyMCE.getAttrib(path[i], "name")) != "") { 896 903 nodeName = "a"; 897 nodeName += "#" + anchor;904 nodeName += "#" + tinyMCE.xmlEncode(anchor); 898 905 nodeData = ""; 899 906 } 900 907 901 if ( getAttrib(path[i], 'name').indexOf("mce_") != 0) {908 if (tinyMCE.getAttrib(path[i], 'name').indexOf("mce_") != 0) { 902 909 var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false); 903 910 if (className != "" && className.indexOf('mceItem') == -1) { … … 1125 1132 1126 1133 case "IMG": 1127 if ( getAttrib(node, 'name').indexOf('mce_') != 0 && tinyMCE.getAttrib(node, 'class').indexOf('mceItem') == -1) {1134 if (tinyMCE.getAttrib(node, 'name').indexOf('mce_') != 0 && tinyMCE.getAttrib(node, 'class').indexOf('mceItem') == -1) { 1128 1135 tinyMCE.switchClass(editor_id + '_image', 'mceButtonSelected'); 1129 1136 } trunk/wp-includes/js/tinymce/themes/advanced/jscripts/source_editor.js
r4506 r4799 26 26 s.wrap = val; 27 27 28 if (tinyMCE.isGecko ) {28 if (tinyMCE.isGecko || tinyMCE.isOpera) { 29 29 var v = s.value; 30 30 var n = s.cloneNode(false); … … 48 48 49 49 if (!tinyMCE.isMSIE) { 50 wHeight = self.innerHeight -80;51 wWidth = self.innerWidth -16;50 wHeight = self.innerHeight - 60; 51 wWidth = self.innerWidth - 16; 52 52 } else { 53 wHeight = document.body.clientHeight - 80;53 wHeight = document.body.clientHeight - 60; 54 54 wWidth = document.body.clientWidth - 16; 55 55 } … … 58 58 el.style.width = Math.abs(wWidth) + 'px'; 59 59 } 60 trunk/wp-includes/js/tinymce/tiny_mce.js
r4719 r4799 6 6 7 7 this.majorVersion = "2"; 8 this.minorVersion = "0. 8";9 this.releaseDate = "200 6-10-23";8 this.minorVersion = "0.9"; 9 this.releaseDate = "2007-01-09"; 10 10 11 11 this.instances = new Array(); … … 193 193 this._def("display_tab_class", ''); 194 194 this._def("gecko_spellcheck", false); 195 this._def("hide_selects_on_submit", true); 195 196 196 197 // Force strict loading mode to false on non Gecko browsers … … 243 244 this.uniqueURL = 'javascript:TINYMCE_UNIQUEURL();'; // Make unique URL non real URL 244 245 this.uniqueTag = '<div id="mceTMPElement" style="display: none">TMP</div>'; 245 this.callbacks = new Array('onInit', 'getInfo', 'getEditorTemplate', 'setupContent', 'onChange', 'onPageLoad', 'handleNodeChange', 'initInstance', 'execCommand', 'getControlHTML', 'handleEvent', 'cleanup' );246 this.callbacks = new Array('onInit', 'getInfo', 'getEditorTemplate', 'setupContent', 'onChange', 'onPageLoad', 'handleNodeChange', 'initInstance', 'execCommand', 'getControlHTML', 'handleEvent', 'cleanup', 'removeInstance'); 246 247 247 248 // Theme url … … 339 340 } 340 341 } 342 343 // Setup XML encoding regexps 344 this.xmlEncodeAposRe = new RegExp('[<>&"\']', 'g'); 345 this.xmlEncodeRe = new RegExp('[<>&"]', 'g'); 346 // this.xmlEncodeEnts = {'&':'&','"':'"',"'":''','<':'<','>':'>'}; 341 347 }, 342 348 … … 570 576 tinyMCE.undoLevels = n; 571 577 tinyMCE.undoIndex = n.length; 578 579 // Dispatch remove instance call 580 tinyMCE.dispatchCallback(ti, 'remove_instance_callback', 'removeInstance', ti); 572 581 573 582 return ti; … … 837 846 } 838 847 848 tinyMCE.selectedInstance = inst; 839 849 inst.switchSettings(); 840 850 … … 1016 1026 storeAwayURLs : function(s) { 1017 1027 // Remove all mce_src, mce_href and replace them with new ones 1018 //s = s.replace(new RegExp('mce_src\\s*=\\s*\"[^ >\"]*\"', 'gi'), '');1019 //s = s.replace(new RegExp('mce_href\\s*=\\s*\"[^ >\"]*\"', 'gi'), '');1028 // s = s.replace(new RegExp('mce_src\\s*=\\s*\"[^ >\"]*\"', 'gi'), ''); 1029 // s = s.replace(new RegExp('mce_href\\s*=\\s*\"[^ >\"]*\"', 'gi'), ''); 1020 1030 1021 1031 if (!s.match(/(mce_src|mce_href)/gi, s)) { … … 1039 1049 }, 1040 1050 1051 removeTinyMCEFormElements : function(form_obj) { 1052 var i, elementId; 1053 1054 // Skip form element removal 1055 if (!tinyMCE.getParam('hide_selects_on_submit')) 1056 return; 1057 1058 // Check if form is valid 1059 if (typeof(form_obj) == "undefined" || form_obj == null) 1060 return; 1061 1062 // If not a form, find the form 1063 if (form_obj.nodeName != "FORM") { 1064 if (form_obj.form) 1065 form_obj = form_obj.form; 1066 else 1067 form_obj = tinyMCE.getParentElement(form_obj, "form"); 1068 } 1069 1070 // Still nothing 1071 if (form_obj == null) 1072 return; 1073 1074 // Disable all UI form elements that TinyMCE created 1075 for (i=0; i<form_obj.elements.length; i++) { 1076 elementId = form_obj.elements[i].name ? form_obj.elements[i].name : form_obj.elements[i].id; 1077 1078 if (elementId.indexOf('mce_editor_') == 0) 1079 form_obj.elements[i].disabled = true; 1080 } 1081 }, 1082 1041 1083 handleEvent : function(e) { 1042 1084 var inst = tinyMCE.selectedInstance; … … 1087 1129 1088 1130 case "submit": 1131 tinyMCE.removeTinyMCEFormElements(tinyMCE.isMSIE ? window.event.srcElement : e.target); 1089 1132 tinyMCE.triggerSave(); 1090 1133 tinyMCE.isNotDirty = true; … … 1434 1477 1435 1478 submitPatch : function() { 1479 tinyMCE.removeTinyMCEFormElements(this); 1436 1480 tinyMCE.triggerSave(); 1437 1481 tinyMCE.isNotDirty = true; … … 1650 1694 1651 1695 triggerNodeChange : function(focus, setup_content) { 1696 var elm, inst, editorId, undoIndex = -1, undoLevels = -1, doc, anySelection = false; 1697 1652 1698 if (tinyMCE.selectedInstance) { 1653 var inst = tinyMCE.selectedInstance; 1654 var editorId = inst.editorId; 1655 var elm = (typeof(setup_content) != "undefined" && setup_content) ? tinyMCE.selectedElement : inst.getFocusElement(); 1656 var undoIndex = -1, doc; 1657 var undoLevels = -1; 1658 var anySelection = false; 1659 var selectedText = inst.selection.getSelectedText(); 1699 inst = tinyMCE.selectedInstance; 1700 elm = (typeof(setup_content) != "undefined" && setup_content) ? tinyMCE.selectedElement : inst.getFocusElement(); 1701 1702 /* if (elm == inst.lastTriggerEl) 1703 return; 1704 1705 inst.lastTriggerEl = elm;*/ 1706 1707 editorId = inst.editorId; 1708 selectedText = inst.selection.getSelectedText(); 1660 1709 1661 1710 if (tinyMCE.settings.auto_resize) … … 1754 1803 openWindow : function(template, args) { 1755 1804 var html, width, height, x, y, resizable, scrollbars, url; 1805 1806 args = !args ? {} : args; 1756 1807 1757 1808 args['mce_template_file'] = template['file']; … … 2257 2308 2258 2309 evalFunc : function(f, idx, a, o) { 2259 var s = '(', i; 2260 2261 for (i=idx; i<a.length; i++) { 2262 s += 'a[' + i + ']'; 2263 2264 if (i < a.length-1) 2265 s += ','; 2266 } 2267 2268 s += ');'; 2269 2270 return o ? eval("o." + f + s) : eval("f" + s); 2310 o = !o ? window : o; 2311 f = typeof(f) == 'function' ? f : o[f]; 2312 2313 return f.apply(o, Array.prototype.slice.call(a, idx)); 2271 2314 }, 2272 2315 … … 2290 2333 l = tinyMCE.getParam(p, ''); 2291 2334 2292 if (l != '' && (v = tinyMCE.evalFunc( typeof(l) == "function" ? l : eval(l), 3, a)) == s && m > 0)2335 if (l != '' && (v = tinyMCE.evalFunc(l, 3, a)) == s && m > 0) 2293 2336 return true; 2294 2337 … … 2313 2356 }, 2314 2357 2315 xmlEncode : function(s ) {2316 return s ? ('' + s).replace( new RegExp('[<>&"\']', 'g'), function (c, b) {2358 xmlEncode : function(s, skip_apos) { 2359 return s ? ('' + s).replace(!skip_apos ? this.xmlEncodeAposRe : this.xmlEncodeRe, function (c, b) { 2317 2360 switch (c) { 2318 2361 case '&': … … 2399 2442 entity_encoding : s.entity_encoding, 2400 2443 debug : s.cleanup_debug, 2401 url_converter : 'TinyMCE_Cleanup.prototype._urlConverter',2402 2444 indent : s.apply_source_formatting, 2403 2445 invalid_elements : s.invalid_elements, 2404 2446 verify_html : s.verify_html, 2405 fix_content_duplication : s.fix_content_duplication 2447 fix_content_duplication : s.fix_content_duplication, 2448 convert_fonts_to_spans : s.convert_fonts_to_spans 2406 2449 }); 2407 2450 … … 2594 2637 2595 2638 handleShortcut : function(e) { 2596 var i, s = this.shortcuts, o; 2639 var i, s, o; 2640 2641 // Normal key press, then ignore it 2642 if (!e.altKey && !e.ctrlKey) 2643 return false; 2644 2645 s = this.shortcuts; 2597 2646 2598 2647 for (i=0; i<s.length; i++) { … … 2703 2752 this.contentDocument = doc; // <-- Strange, unless this is applied Mozilla 1.3 breaks 2704 2753 2705 if (tinyMCE.execCommandCallback(this, 'execcommand_callback', 'execCommand', this.editorId, this.getBody(), command, user_interface, value)) 2706 return; 2754 // Don't dispatch key commands 2755 if (!/mceStartTyping|mceEndTyping/.test(command)) { 2756 if (tinyMCE.execCommandCallback(this, 'execcommand_callback', 'execCommand', this.editorId, this.getBody(), command, user_interface, value)) 2757 return; 2758 } 2707 2759 2708 2760 // Fix align on images … … 2814 2866 focusElm = tinyMCE.getParentElement(focusElm, 'A'); 2815 2867 2816 if (focusElm && this.getRng(0).endOffset > 0 && this.getRng(0).endOffset != focusElm.innerHTML.length) 2868 if (focusElm && this.getRng(0).endOffset > 0 && this.getRng(0).endOffset != focusElm.innerHTML.length) // WordPress mod to prevent unlinking if caret at start/end of link 2817 2869 this.selection.selectNode(focusElm, false); 2818 2870 } … … 2825 2877 2826 2878 return true; 2827 2828 case "FormatBlock":2829 if (!this.cleanup.isValid(value))2830 return true;2831 2832 this.getDoc().execCommand(command, user_interface, value);2833 tinyMCE.triggerNodeChange();2834 break;2835 2879 2836 2880 case "InsertUnorderedList": … … 2858 2902 this.execCommand("mceRemoveNode", false, elm); 2859 2903 } else { 2904 if (!this.cleanup.isValid(value)) 2905 return true; 2906 2860 2907 if (tinyMCE.isGecko && new RegExp('<(div|blockquote|code|dt|dd|dl|samp)>', 'gi').test(value)) 2861 2908 value = value.replace(/[^a-z]/gi, ''); … … 2916 2963 break; 2917 2964 2965 case "mceSetStyleInfo": 2918 2966 case "SetStyleInfo": 2919 2967 var rng = this.getRng(); … … 3247 3295 3248 3296 case "mceSetCSSClass": 3249 this.execCommand(" SetStyleInfo", false, {command : "setattrib", name : "class", value : value});3297 this.execCommand("mceSetStyleInfo", false, {command : "setattrib", name : "class", value : value}); 3250 3298 break; 3251 3299 … … 3479 3527 break; 3480 3528 3529 case "RemoveFormat": 3481 3530 case "removeformat": 3482 3531 var text = this.selection.getSelectedText(); … … 3495 3544 } 3496 3545 3497 this.execCommand(" SetStyleInfo", false, {command : "removeformat"});3546 this.execCommand("mceSetStyleInfo", false, {command : "removeformat"}); 3498 3547 } else { 3499 3548 this.getDoc().execCommand(command, user_interface, value); 3500 3549 3501 this.execCommand(" SetStyleInfo", false, {command : "removeformat"});3550 this.execCommand("mceSetStyleInfo", false, {command : "removeformat"}); 3502 3551 } 3503 3552 … … 3998 4047 val = tinyMCE.convertRGBToHex(val, true); 3999 4048 4049 val = val.replace(/\"/g, '\''); 4050 4000 4051 if (val != "url('')") 4001 4052 str += key.toLowerCase() + ": " + val + "; "; … … 4044 4095 var sizes = tinyMCE.getParam('font_size_style_values').replace(/\s+/, '').split(','); 4045 4096 4046 var h = doc.body.innerHTML;4097 /*var h = doc.body.innerHTML; 4047 4098 h = h.replace(/<span/gi, '<font'); 4048 4099 h = h.replace(/<\/span/gi, '</font'); 4049 tinyMCE.setInnerHTML(doc.body, h); 4050 4051 var s = doc.getElementsByTagName("font");4100 tinyMCE.setInnerHTML(doc.body, h);*/ 4101 4102 var s = tinyMCE.selectElements(doc, 'span,font'); 4052 4103 for (var i=0; i<s.length; i++) { 4053 4104 var size = tinyMCE.trim(s[i].style.fontSize).toLowerCase(); … … 4083 4134 var sizes = tinyMCE.getParam('font_size_style_values').replace(/\s+/, '').split(','); 4084 4135 4085 var h = doc.body.innerHTML;4136 /* var h = doc.body.innerHTML; 4086 4137 h = h.replace(/<font/gi, '<span'); 4087 4138 h = h.replace(/<\/font/gi, '</span'); 4088 tinyMCE.setInnerHTML(doc.body, h); 4139 tinyMCE.setInnerHTML(doc.body, h);*/ 4089 4140 4090 4141 var fsClasses = tinyMCE.getParam('font_size_classes'); … … 4094 4145 fsClasses = null; 4095 4146 4096 var s = doc.getElementsByTagName("span");4147 var s = tinyMCE.selectElements(doc, 'span,font'); 4097 4148 for (var i=0; i<s.length; i++) { 4098 4149 var fSize, fFace, fColor; … … 4183 4234 n = nl[i]; 4184 4235 4185 if ((p = tinyMCE.getParentElement(n, 'p, div,h1,h2,h3,h4,h5,h6')) != null) {4236 if ((p = tinyMCE.getParentElement(n, 'p,h1,h2,h3,h4,h5,h6')) != null) { 4186 4237 np = p.cloneNode(false); 4187 4238 np.removeAttribute('id'); … … 4381 4432 this.fillStr = s.entity_encoding == "named" ? " " : " "; 4382 4433 this.idCount = 0; 4434 this.xmlEncodeRe = new RegExp('[\u007F-\uFFFF<>&"]', 'g'); 4435 this.xmlEncodeAposRe = new RegExp('[\u007F-\uFFFF<>&"\']', 'g'); 4383 4436 }, 4384 4437 … … 4404 4457 isValid : function(n) { 4405 4458 this._setupRules(); // Will initialize cleanup rules 4459 4460 // Empty is true since it removes formatting 4461 if (!n) 4462 return true; 4406 4463 4407 4464 // Clean the name up a bit … … 4607 4664 var xd, el, i, l, cn, at, no, hc = false; 4608 4665 4609 if (t his._isDuplicate(n))4666 if (tinyMCE.isRealIE && this._isDuplicate(n)) 4610 4667 return; 4611 4668 … … 4650 4707 4651 4708 serializeNodeAsHTML : function(n, inn) { 4652 var en, no, h = '', i, l, t, st, r, cn, va = false, f = false, at, hc, cr ;4709 var en, no, h = '', i, l, t, st, r, cn, va = false, f = false, at, hc, cr, nn; 4653 4710 4654 4711 this._setupRules(); // Will initialize cleanup rules 4655 4712 4656 if (t his._isDuplicate(n))4713 if (tinyMCE.isRealIE && this._isDuplicate(n)) 4657 4714 return ''; 4658
