Changeset 4799

Show
Ignore:
Timestamp:
01/25/07 01:20:47 (1 year ago)
Author:
ryan
Message:

TinyMCE 2.0.9. fixes #3564

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/js/tinymce/plugins/autosave/editor_plugin.js

    r4747 r4799  
    11/** 
    2  * $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $ 
     2 * $Id: editor_plugin_src.js 162 2007-01-03 16:16:52Z spocke $ 
    33 * 
    44 * @author Moxiecode 
    5  * @copyright Copyright � 2004-2006, Moxiecode Systems AB, All rights reserved. 
     5 * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved. 
    66 */ 
    77 
  • trunk/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js

    r4747 r4799  
    11/** 
    2  * $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $ 
     2 * $Id: editor_plugin_src.js 162 2007-01-03 16:16:52Z spocke $ 
    33 * 
    44 * @author Moxiecode 
    5  * @copyright Copyright � 2004-2006, Moxiecode Systems AB, All rights reserved. 
     5 * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved. 
    66 */ 
    77 
  • trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js

    r4747 r4799  
    11/** 
    2  * $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $ 
     2 * $Id: editor_plugin_src.js 172 2007-01-09 11:37:11Z spocke $ 
    33 * 
    44 * Moxiecode DHTML Windows script. 
    55 * 
    66 * @author Moxiecode 
    7  * @copyright Copyright � 2004-2006, Moxiecode Systems AB, All rights reserved. 
     7 * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved. 
    88 */ 
    99 
     
    6767 
    6868    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); 
    7074 
    7175    // Center div in editor area 
     
    7377    pos.absTop += Math.round((elm.firstChild.clientHeight / 2) - (height / 2)); 
    7478 
    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 
    7680 
    7781    mcWindows.open(url, mcWindows.idCounter++, "modal=yes,width=" + width+ ",height=" + height + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",statusbar=" + resizable + ",left=" + pos.absLeft + ",top=" + pos.absTop); 
     
    112116    this.selectedWindow = null; 
    113117    this.lastSelectedWindow = null; 
    114     this.zindex = 100
     118    this.zindex = 1001
    115119    this.mouseDownScreenX = 0; 
    116120    this.mouseDownScreenY = 0; 
     
    324328// Blocks the document events by placing a image over the whole document 
    325329TinyMCE_Windows.prototype.setDocumentLock = function(state) { 
     330    var elm = document.getElementById('mcWindowEventBlocker'); 
     331 
    326332    if (state) { 
    327         var elm = document.getElementById('mcWindowEventBlocker'); 
    328333        if (elm == null) { 
    329334            elm = document.createElement("div"); 
     
    349354        elm.style.zIndex = mcWindows.zindex-1; 
    350355        elm.style.display = "block"; 
    351     } else { 
    352         var elm = document.getElementById('mcWindowEventBlocker'); 
    353  
     356    } else if (elm != null) { 
    354357        if (mcWindows.windows.length == 0) 
    355358            elm.parentNode.removeChild(elm); 
     
    560563    mcWindows.setDocumentLock(false); 
    561564 
    562     tinyMCE.selectedInstance.getWin().focus(); 
     565    tinyMCE.selectedInstance.getWin().focus(); // WordPress: focus on the editor after closing a popup 
    563566}; 
    564567 
     
    579582            height = height < 100 ? 100 : height; 
    580583 
    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'
    583586            this.wrapperIFrameElement.width = width+2; 
    584587            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'
    587590 
    588591            height = height - this.deltaHeight; 
    589592 
    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'; 
    598600 
    599601            mcWindows.cancelEvent(e); 
  • trunk/wp-includes/js/tinymce/plugins/paste/editor_plugin.js

    r4747 r4799  
    11/** 
    2  * $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $ 
     2 * $Id: editor_plugin_src.js 162 2007-01-03 16:16:52Z spocke $ 
    33 * 
    44 * @author Moxiecode 
    5  * @copyright Copyright � 2004-2006, Moxiecode Systems AB, All rights reserved. 
     5 * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved. 
    66 */ 
    77 
  • trunk/wp-includes/js/tinymce/themes/advanced/about.htm

    r3664 r4799  
    2222                <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> 
    2323                by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p> 
    24                 <p>Copyright &copy; 2003-2006, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p> 
     24                <p>Copyright &copy; 2003-2007, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p> 
    2525                <p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p> 
    2626 
  • trunk/wp-includes/js/tinymce/themes/advanced/css/editor_ui.css

    r4506 r4799  
    11/* This file contains the CSS data for the editor UI of TinyMCE instances */ 
    22 
    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;} 
    44.mceSeparatorLine {border: 0; padding: 0; margin-left: 4px; margin-right: 2px;} 
    55.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;} 
    66.mceLabel, .mceLabelDisabled {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt;} 
    77.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;} 
    1212.mceToolbarTop {border-bottom: 1px solid #cccccc; padding-bottom: 1px;} 
    1313.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;} 
    1515.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;} 
    1717.mceStatusbarTop {border-bottom: 1px solid #cccccc;} 
    1818.mceStatusbarBottom {border-top: 1px solid #cccccc;} 
    1919.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;} 
    2121.mcePathItem:hover {text-decoration: underline;} 
    2222.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;} 
    2525.mceEditorIframe {border: 0;} 
    2626 
    2727/* Button CSS rules */ 
    2828 
    29 a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {width: 20px; height: 20px;  cursor: default;  margin-top: 1px; margin-left: 1px;} 
     29a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {width: 20px; height: 20px; cursor: default; margin-top: 1px; margin-left: 1px;} 
    3030a.mceButtonDisabled img {border: 0 !important;} 
    3131a.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;} 
     32a.mceButtonSelected img {border: 1px solid #6779AA !important; background-color: #D4D5D8;} 
     33a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {border: 1px solid #0A246A !important; cursor: default; background-color: #B6BDD2;} 
     34a.mceButtonDisabled img {-moz-opacity:0.3; opacity: 0.3; border: 1px solid #F0F0EE !important; cursor: default;} 
     35a.mceTiledButton img {background-image: url('../images/buttons.gif'); background-repeat: no-repeat;} 
    3636 
    3737/* Menu button CSS rules */ 
    3838 
    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;} 
     39span.mceMenuButton img, span.mceMenuButtonSelected img {border: 1px solid #F0F0EE; margin-left: 1px;} 
     40span.mceMenuButtonSelected img {border: 1px solid #6779AA; background-color: #B6BDD2;} 
     41span.mceMenuButtonSelected img.mceMenuButton {border: 1px solid #F0F0EE; background-color: transparent;} 
     42span.mceMenuButton img.mceMenuButton, span.mceMenuButtonSelected img.mceMenuButton {border-left: 0; margin-left: 0;} 
     43span.mceMenuButton:hover img, span.mceMenuButtonSelected:hover img {border: 1px solid #0A246A; background-color: #B6BDD2;} 
    4444span.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;} 
     45span.mceMenuButtonFocus img {border: 1px solid gray; border-right: 0; margin-left: 1px; background-color: #F5F4F2;} 
     46span.mceMenuButtonFocus img.mceMenuButton {border: 1px solid gray; border-left: 1px solid #F5F4F2; margin-left: 0;} 
     47span.mceMenuHover img {border: 1px solid #0A246A; background-color: #B6BDD2;} 
     48span.mceMenuButtonSelected.mceMenuHover img.mceMenuButton {border: 1px solid #0A246A; background-color: #B6BDD2; border-left: 0;} 
    4949 
    5050/* Menu */ 
    5151 
    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;} 
    5757.mceMenuTitle span {padding-left: 5px;} 
    58 .mceMenuTitle {background-color: #DDDDDD; font-weight: bold;} 
     58.mceMenuTitle {background-color: #DDDDDD; font-weight: bold;} 
    5959.mceMenuDisabled {color: gray;} 
    60 span.mceMenuSelectedItem {background-image: url('../images/menu_check.gif'); background-repeat: no-repeat;  background-position: 5px 8px; padding-left: 20px;} 
     60span.mceMenuSelectedItem {background-image: url('../images/menu_check.gif'); background-repeat: no-repeat; background-position: 5px 8px; padding-left: 20px;} 
    6161span.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;} 
     62span.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;} 
     64a.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;} 
    6666a.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;} 
    6868 
    6969/* MSIE 6 specific rules */ 
    7070 
    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;} 
    7373* 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;} 
    7777* 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;} 
    8080* 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;} 
    8383 
    8484/* MSIE 7 specific rules */ 
    8585 
    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;} 
    8888*: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;} 
    9292*: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;} 
    9595*: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  
    11/** 
    2  * $Id: editor_template_src.js 129 2006-10-23 09:45:17Z spocke $ 
     2 * $Id: editor_template_src.js 166 2007-01-05 10:31:50Z spocke $ 
    33 * 
    44 * @author Moxiecode 
    5  * @copyright Copyright � 2004-2006, Moxiecode Systems AB, All rights reserved. 
     5 * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved. 
    66 */ 
    77 
     
    714714 
    715715        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; 
    718723 
    719724        return template; 
     
    733738    }, 
    734739 
     740    removeInstance : function(inst) { 
     741        var fcm = new TinyMCE_Layer(inst.editorId + '_fcMenu'); 
     742 
     743        fcm.remove(); 
     744    }, 
     745 
    735746    _handleMenuEvent : function(e) { 
    736747        var te = tinyMCE.isMSIE ? window.event.srcElement : e.target; 
     
    781792 
    782793            return false; 
    783         }; 
    784  
    785         function getAttrib(elm, name) { 
    786             return elm.getAttribute(name) ? elm.getAttribute(name) : ""; 
    787794        }; 
    788795 
     
    840847                    if (st != "") { 
    841848                        st = tinyMCE.serializeStyle(tinyMCE.parseStyle(st)); 
    842                         nodeData += "style: " + st + " "; 
     849                        nodeData += "style: " + tinyMCE.xmlEncode(st) + " "; 
    843850                    } 
    844851                } 
     
    850857                    var face = tinyMCE.getAttrib(path[i], "face"); 
    851858                    if (face != "") 
    852                         nodeData += "font: " + face + " "; 
     859                        nodeData += "font: " + tinyMCE.xmlEncode(face) + " "; 
    853860 
    854861                    var size = tinyMCE.getAttrib(path[i], "size"); 
    855862                    if (size != "") 
    856                         nodeData += "size: " + size + " "; 
     863                        nodeData += "size: " + tinyMCE.xmlEncode(size) + " "; 
    857864 
    858865                    var color = tinyMCE.getAttrib(path[i], "color"); 
    859866                    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') != "") { 
    864871                    nodeData += "id: " + path[i].getAttribute('id') + " "; 
    865872                } 
     
    869876                    nodeData += "class: " + className + " "; 
    870877 
    871                 if (getAttrib(path[i], 'src') != "") { 
     878                if (tinyMCE.getAttrib(path[i], 'src') != "") { 
    872879                    var src = tinyMCE.getAttrib(path[i], "mce_src"); 
    873880 
     
    875882                         src = tinyMCE.getAttrib(path[i], "src"); 
    876883 
    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') != "") { 
    881888                    var href = tinyMCE.getAttrib(path[i], "mce_href"); 
    882889 
     
    884891                         href = tinyMCE.getAttrib(path[i], "href"); 
    885892 
    886                     nodeData += "href: " + href + " "; 
     893                    nodeData += "href: " + tinyMCE.xmlEncode(href) + " "; 
    887894                } 
    888895 
     
    895902                if (nodeName == "a" && (anchor = tinyMCE.getAttrib(path[i], "name")) != "") { 
    896903                    nodeName = "a"; 
    897                     nodeName += "#" + anchor
     904                    nodeName += "#" + tinyMCE.xmlEncode(anchor)
    898905                    nodeData = ""; 
    899906                } 
    900907 
    901                 if (getAttrib(path[i], 'name').indexOf("mce_") != 0) { 
     908                if (tinyMCE.getAttrib(path[i], 'name').indexOf("mce_") != 0) { 
    902909                    var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false); 
    903910                    if (className != "" && className.indexOf('mceItem') == -1) { 
     
    11251132 
    11261133                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) { 
    11281135                    tinyMCE.switchClass(editor_id + '_image', 'mceButtonSelected'); 
    11291136                } 
  • trunk/wp-includes/js/tinymce/themes/advanced/jscripts/source_editor.js

    r4506 r4799  
    2626    s.wrap = val; 
    2727 
    28     if (tinyMCE.isGecko) { 
     28    if (tinyMCE.isGecko || tinyMCE.isOpera) { 
    2929        var v = s.value; 
    3030        var n = s.cloneNode(false); 
     
    4848 
    4949    if (!tinyMCE.isMSIE) { 
    50          wHeight = self.innerHeight-80; 
    51          wWidth = self.innerWidth-16; 
     50         wHeight = self.innerHeight - 60; 
     51         wWidth = self.innerWidth - 16; 
    5252    } else { 
    53          wHeight = document.body.clientHeight - 80; 
     53         wHeight = document.body.clientHeight - 60; 
    5454         wWidth = document.body.clientWidth - 16; 
    5555    } 
     
    5858    el.style.width  = Math.abs(wWidth) + 'px'; 
    5959} 
    60  
  • trunk/wp-includes/js/tinymce/tiny_mce.js

    r4719 r4799  
    66 
    77    this.majorVersion = "2"; 
    8     this.minorVersion = "0.8"; 
    9     this.releaseDate = "2006-10-23"; 
     8    this.minorVersion = "0.9"; 
     9    this.releaseDate = "2007-01-09"; 
    1010 
    1111    this.instances = new Array(); 
     
    193193        this._def("display_tab_class", ''); 
    194194        this._def("gecko_spellcheck", false); 
     195        this._def("hide_selects_on_submit", true); 
    195196 
    196197        // Force strict loading mode to false on non Gecko browsers 
     
    243244        this.uniqueURL = 'javascript:TINYMCE_UNIQUEURL();'; // Make unique URL non real URL 
    244245        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'); 
    246247 
    247248        // Theme url 
     
    339340            } 
    340341        } 
     342 
     343        // Setup XML encoding regexps 
     344        this.xmlEncodeAposRe = new RegExp('[<>&"\']', 'g'); 
     345        this.xmlEncodeRe = new RegExp('[<>&"]', 'g'); 
     346//      this.xmlEncodeEnts = {'&':'&amp;','"':'&quot;',"'":'&#39;','<':'&lt;','>':'&gt;'}; 
    341347    }, 
    342348 
     
    570576        tinyMCE.undoLevels = n; 
    571577        tinyMCE.undoIndex = n.length; 
     578 
     579        // Dispatch remove instance call 
     580        tinyMCE.dispatchCallback(ti, 'remove_instance_callback', 'removeInstance', ti); 
    572581 
    573582        return ti; 
     
    837846        } 
    838847 
     848        tinyMCE.selectedInstance = inst; 
    839849        inst.switchSettings(); 
    840850 
     
    10161026    storeAwayURLs : function(s) { 
    10171027        // 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'), ''); 
    10201030 
    10211031        if (!s.match(/(mce_src|mce_href)/gi, s)) { 
     
    10391049    }, 
    10401050 
     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 
    10411083    handleEvent : function(e) { 
    10421084        var inst = tinyMCE.selectedInstance; 
     
    10871129 
    10881130            case "submit": 
     1131                tinyMCE.removeTinyMCEFormElements(tinyMCE.isMSIE ? window.event.srcElement : e.target); 
    10891132                tinyMCE.triggerSave(); 
    10901133                tinyMCE.isNotDirty = true; 
     
    14341477 
    14351478    submitPatch : function() { 
     1479        tinyMCE.removeTinyMCEFormElements(this); 
    14361480        tinyMCE.triggerSave(); 
    14371481        tinyMCE.isNotDirty = true; 
     
    16501694 
    16511695    triggerNodeChange : function(focus, setup_content) { 
     1696        var elm, inst, editorId, undoIndex = -1, undoLevels = -1, doc, anySelection = false; 
     1697 
    16521698        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(); 
    16601709 
    16611710            if (tinyMCE.settings.auto_resize) 
     
    17541803    openWindow : function(template, args) { 
    17551804        var html, width, height, x, y, resizable, scrollbars, url; 
     1805 
     1806        args = !args ? {} : args; 
    17561807 
    17571808        args['mce_template_file'] = template['file']; 
     
    22572308 
    22582309    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)); 
    22712314    }, 
    22722315 
     
    22902333        l = tinyMCE.getParam(p, ''); 
    22912334 
    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) 
    22932336            return true; 
    22942337 
     
    23132356    }, 
    23142357 
    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) { 
    23172360            switch (c) { 
    23182361                case '&': 
     
    23992442        entity_encoding : s.entity_encoding, 
    24002443        debug : s.cleanup_debug, 
    2401         url_converter : 'TinyMCE_Cleanup.prototype._urlConverter', 
    24022444        indent : s.apply_source_formatting, 
    24032445        invalid_elements : s.invalid_elements, 
    24042446        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 
    24062449    }); 
    24072450 
     
    25942637 
    25952638    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; 
    25972646 
    25982647        for (i=0; i<s.length; i++) { 
     
    27032752        this.contentDocument = doc; // <-- Strange, unless this is applied Mozilla 1.3 breaks 
    27042753 
    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        } 
    27072759 
    27082760        // Fix align on images 
     
    28142866                    focusElm = tinyMCE.getParentElement(focusElm, 'A'); 
    28152867 
    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 
    28172869                        this.selection.selectNode(focusElm, false); 
    28182870                } 
     
    28252877 
    28262878                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; 
    28352879 
    28362880            case "InsertUnorderedList": 
     
    28582902                        this.execCommand("mceRemoveNode", false, elm); 
    28592903                } else { 
     2904                    if (!this.cleanup.isValid(value)) 
     2905                        return true; 
     2906 
    28602907                    if (tinyMCE.isGecko && new RegExp('<(div|blockquote|code|dt|dd|dl|samp)>', 'gi').test(value)) 
    28612908                        value = value.replace(/[^a-z]/gi, ''); 
     
    29162963                break; 
    29172964 
     2965            case "mceSetStyleInfo": 
    29182966            case "SetStyleInfo": 
    29192967                var rng = this.getRng(); 
     
    32473295 
    32483296            case "mceSetCSSClass": 
    3249                 this.execCommand("SetStyleInfo", false, {command : "setattrib", name : "class", value : value}); 
     3297                this.execCommand("mceSetStyleInfo", false, {command : "setattrib", name : "class", value : value}); 
    32503298            break; 
    32513299 
     
    34793527                break; 
    34803528 
     3529            case "RemoveFormat": 
    34813530            case "removeformat": 
    34823531                var text = this.selection.getSelectedText(); 
     
    34953544                    } 
    34963545 
    3497                     this.execCommand("SetStyleInfo", false, {command : "removeformat"}); 
     3546                    this.execCommand("mceSetStyleInfo", false, {command : "removeformat"}); 
    34983547                } else { 
    34993548                    this.getDoc().execCommand(command, user_interface, value); 
    35003549 
    3501                     this.execCommand("SetStyleInfo", false, {command : "removeformat"}); 
     3550                    this.execCommand("mceSetStyleInfo", false, {command : "removeformat"}); 
    35023551                } 
    35033552 
     
    39984047                val = tinyMCE.convertRGBToHex(val, true); 
    39994048 
     4049            val = val.replace(/\"/g, '\''); 
     4050 
    40004051            if (val != "url('')") 
    40014052                str += key.toLowerCase() + ": " + val + "; "; 
     
    40444095    var sizes = tinyMCE.getParam('font_size_style_values').replace(/\s+/, '').split(','); 
    40454096 
    4046     var h = doc.body.innerHTML; 
     4097    /*var h = doc.body.innerHTML; 
    40474098    h = h.replace(/<span/gi, '<font'); 
    40484099    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'); 
    40524103    for (var i=0; i<s.length; i++) { 
    40534104        var size = tinyMCE.trim(s[i].style.fontSize).toLowerCase(); 
     
    40834134    var sizes = tinyMCE.getParam('font_size_style_values').replace(/\s+/, '').split(','); 
    40844135 
    4085   var h = doc.body.innerHTML; 
     4136/*    var h = doc.body.innerHTML; 
    40864137    h = h.replace(/<font/gi, '<span'); 
    40874138    h = h.replace(/<\/font/gi, '</span'); 
    4088     tinyMCE.setInnerHTML(doc.body, h); 
     4139    tinyMCE.setInnerHTML(doc.body, h);*/ 
    40894140 
    40904141    var fsClasses = tinyMCE.getParam('font_size_classes'); 
     
    40944145        fsClasses = null; 
    40954146 
    4096     var s = doc.getElementsByTagName("span"); 
     4147    var s = tinyMCE.selectElements(doc, 'span,font'); 
    40974148    for (var i=0; i<s.length; i++) { 
    40984149        var fSize, fFace, fColor; 
     
    41834234        n = nl[i]; 
    41844235 
    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) { 
    41864237            np = p.cloneNode(false); 
    41874238            np.removeAttribute('id'); 
     
    43814432        this.fillStr = s.entity_encoding == "named" ? "&nbsp;" : "&#160;"; 
    43824433        this.idCount = 0; 
     4434        this.xmlEncodeRe = new RegExp('[\u007F-\uFFFF<>&"]', 'g'); 
     4435        this.xmlEncodeAposRe = new RegExp('[\u007F-\uFFFF<>&"\']', 'g'); 
    43834436    }, 
    43844437 
     
    44044457    isValid : function(n) { 
    44054458        this._setupRules(); // Will initialize cleanup rules 
     4459 
     4460        // Empty is true since it removes formatting 
     4461        if (!n) 
     4462            return true; 
    44064463 
    44074464        // Clean the name up a bit 
     
    46074664        var xd, el, i, l, cn, at, no, hc = false; 
    46084665 
    4609         if (this._isDuplicate(n)) 
     4666        if (tinyMCE.isRealIE && this._isDuplicate(n)) 
    46104667            return; 
    46114668 
     
    46504707 
    46514708    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
    46534710 
    46544711        this._setupRules(); // Will initialize cleanup rules 
    46554712 
    4656         if (this._isDuplicate(n)) 
     4713        if (tinyMCE.isRealIE && this._isDuplicate(n)) 
    46574714            return ''; 
    4658