TinyMCE 3.05 from azaozz. fixes #6195

git-svn-id: https://develop.svn.wordpress.org/trunk@7270 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-03-12 22:47:11 +00:00
parent 71827ccadf
commit af1a108e7e
27 changed files with 146 additions and 69 deletions

View File

@ -1 +1 @@
(function(){var DOM=tinymce.DOM;tinymce.create('tinymce.plugins.FullScreenPlugin',{init:function(ed,url){var t=this,s={},vp;t.editor=ed;ed.addCommand('mceFullScreen',function(){var win,de=document.documentElement;if(ed.getParam('fullscreen_is_enabled')){if(ed.getParam('fullscreen_new_window'))closeFullscreen();else{window.setTimeout(function(){tinymce.dom.Event.remove(window,'resize',t.resizeFunc);tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent({format:'raw'}),{format:'raw'});tinyMCE.remove(ed);DOM.remove('mce_fullscreen_container');de.style.overflow=ed.getParam('fullscreen_html_overflow');DOM.setStyle(document.body,'overflow',ed.getParam('fullscreen_overflow'));window.scrollTo(ed.getParam('fullscreen_scrollx'),ed.getParam('fullscreen_scrolly'));},10);}return;}if(ed.getParam('fullscreen_new_window')){win=window.open(url+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{win.resizeTo(screen.availWidth,screen.availHeight);}catch(e){}}else{s.fullscreen_overflow=DOM.getStyle(document.body,'overflow',1)||'auto';s.fullscreen_html_overflow=DOM.getStyle(de,'overflow',1);vp=DOM.getViewPort();s.fullscreen_scrollx=vp.x;s.fullscreen_scrolly=vp.y;if(tinymce.isOpera&&s.fullscreen_overflow=='visible')s.fullscreen_overflow='auto';if(tinymce.isIE&&s.fullscreen_overflow=='scroll')s.fullscreen_overflow='auto';if(s.fullscreen_overflow=='0px')s.fullscreen_overflow='';DOM.setStyle(document.body,'overflow','hidden');de.style.overflow='hidden';vp=DOM.getViewPort();window.scrollTo(0,0);if(tinymce.isIE)vp.h-=1;n=DOM.add(document.body,'div',{id:'mce_fullscreen_container',style:'position:absolute;top:0;left:0;width:'+vp.w+'px;height:'+vp.h+'px;z-index:150;'});DOM.add(n,'div',{id:'mce_fullscreen'});tinymce.each(ed.settings,function(v,n){s[n]=v;});s.id='mce_fullscreen';s.width=n.clientWidth;s.height=n.clientHeight-15;s.fullscreen_is_enabled=true;s.fullscreen_editor_id=ed.id;s.theme_advanced_resizing=false;s.save_onsavecallback=function(){ed.setContent(tinyMCE.get(s.id).getContent({format:'raw'}),{format:'raw'});ed.execCommand('mceSave');};tinymce.each(ed.getParam('fullscreen_settings'),function(v,k){s[k]=v;});if(s.theme_advanced_toolbar_location==='external')s.theme_advanced_toolbar_location='top';t.fullscreenEditor=new tinymce.Editor('mce_fullscreen',s);t.fullscreenEditor.onInit.add(function(){t.fullscreenEditor.setContent(ed.getContent());});t.fullscreenEditor.render();tinyMCE.add(t.fullscreenEditor);t.fullscreenElement=new tinymce.dom.Element('mce_fullscreen_container');t.fullscreenElement.update();t.resizeFunc=tinymce.dom.Event.add(window,'resize',function(){var vp=tinymce.DOM.getViewPort();t.fullscreenEditor.theme.resizeTo(vp.w,vp.h);});}});ed.addButton('fullscreen',{title:'fullscreen.desc',cmd:'mceFullScreen'});ed.onNodeChange.add(function(ed,cm){cm.setActive('fullscreen',ed.getParam('fullscreen_is_enabled'));});},getInfo:function(){return{longname:'Fullscreen',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('fullscreen',tinymce.plugins.FullScreenPlugin);})();
(function(){var DOM=tinymce.DOM;tinymce.create('tinymce.plugins.FullScreenPlugin',{init:function(ed,url){var t=this,s={},vp;t.editor=ed;ed.addCommand('mceFullScreen',function(){var win,de=document.documentElement;if(ed.getParam('fullscreen_is_enabled')){if(ed.getParam('fullscreen_new_window'))closeFullscreen();else{window.setTimeout(function(){tinymce.dom.Event.remove(window,'resize',t.resizeFunc);tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent({format:'raw'}),{format:'raw'});tinyMCE.remove(ed);DOM.remove('mce_fullscreen_container');de.style.overflow=ed.getParam('fullscreen_html_overflow');DOM.setStyle(document.body,'overflow',ed.getParam('fullscreen_overflow'));window.scrollTo(ed.getParam('fullscreen_scrollx'),ed.getParam('fullscreen_scrolly'));tinyMCE.settings=tinyMCE.oldSettings;},10);}return;}if(ed.getParam('fullscreen_new_window')){win=window.open(url+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{win.resizeTo(screen.availWidth,screen.availHeight);}catch(e){}}else{tinyMCE.oldSettings=tinyMCE.settings;s.fullscreen_overflow=DOM.getStyle(document.body,'overflow',1)||'auto';s.fullscreen_html_overflow=DOM.getStyle(de,'overflow',1);vp=DOM.getViewPort();s.fullscreen_scrollx=vp.x;s.fullscreen_scrolly=vp.y;if(tinymce.isOpera&&s.fullscreen_overflow=='visible')s.fullscreen_overflow='auto';if(tinymce.isIE&&s.fullscreen_overflow=='scroll')s.fullscreen_overflow='auto';if(s.fullscreen_overflow=='0px')s.fullscreen_overflow='';DOM.setStyle(document.body,'overflow','hidden');de.style.overflow='hidden';vp=DOM.getViewPort();window.scrollTo(0,0);if(tinymce.isIE)vp.h-=1;n=DOM.add(document.body,'div',{id:'mce_fullscreen_container',style:'position:absolute;top:0;left:0;width:'+vp.w+'px;height:'+vp.h+'px;z-index:150;'});DOM.add(n,'div',{id:'mce_fullscreen'});tinymce.each(ed.settings,function(v,n){s[n]=v;});s.id='mce_fullscreen';s.width=n.clientWidth;s.height=n.clientHeight-15;s.fullscreen_is_enabled=true;s.fullscreen_editor_id=ed.id;s.theme_advanced_resizing=false;s.save_onsavecallback=function(){ed.setContent(tinyMCE.get(s.id).getContent({format:'raw'}),{format:'raw'});ed.execCommand('mceSave');};tinymce.each(ed.getParam('fullscreen_settings'),function(v,k){s[k]=v;});if(s.theme_advanced_toolbar_location==='external')s.theme_advanced_toolbar_location='top';t.fullscreenEditor=new tinymce.Editor('mce_fullscreen',s);t.fullscreenEditor.onInit.add(function(){t.fullscreenEditor.setContent(ed.getContent());});t.fullscreenEditor.render();tinyMCE.add(t.fullscreenEditor);t.fullscreenElement=new tinymce.dom.Element('mce_fullscreen_container');t.fullscreenElement.update();t.resizeFunc=tinymce.dom.Event.add(window,'resize',function(){var vp=tinymce.DOM.getViewPort();t.fullscreenEditor.theme.resizeTo(vp.w,vp.h);});}});ed.addButton('fullscreen',{title:'fullscreen.desc',cmd:'mceFullScreen'});ed.onNodeChange.add(function(ed,cm){cm.setActive('fullscreen',ed.getParam('fullscreen_is_enabled'));});},getInfo:function(){return{longname:'Fullscreen',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('fullscreen',tinymce.plugins.FullScreenPlugin);})();

File diff suppressed because one or more lines are too long

View File

@ -180,6 +180,8 @@ function init() {
function insertMedia() {
var fe, f = document.forms[0], h;
tinyMCEPopup.restoreSelection();
if (!AutoValidator.validate(f)) {
alert(ed.getLang('invalid_data'));
return false;
@ -303,7 +305,7 @@ function getType(v) {
fo = ed.getParam("media_types", "flash=swf;flv=flv;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';');
// YouTube
if (v.match(/v=(.+)(.*)/)) {
if (v.match(/watch\?v=(.+)(.*)/)) {
f.width.value = '425';
f.height.value = '350';
f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1];

View File

@ -2,15 +2,14 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{#media_dlg.title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="js/media.js"></script>
<script type="text/javascript" src="../../utils/mctabs.js"></script>
<script type="text/javascript" src="../../utils/validate.js"></script>
<script type="text/javascript" src="../../utils/form_utils.js"></script>
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
<link href="css/media.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">tinyMCEPopup.onInit.add(function(){window.setTimeout(function(){document.getElementById('src').focus();},500);});</script>
<base target="_self" />
<base target="_self" />
</head>
<body style="display: none">
<form onsubmit="insertMedia();return false;" action="#">
@ -45,7 +44,7 @@
<td>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input id="src" name="src" type="text" value="" onchange="switchType(this.value);generatePreview();" /></td>
<td><input id="src" name="src" type="text" value="" class="mceFocus" onchange="switchType(this.value);generatePreview();" /></td>
<td id="filebrowsercontainer">&nbsp;</td>
</tr>
</table>
@ -144,6 +143,7 @@
<option value="showall">showall</option>
<option value="noborder">noborder</option>
<option value="exactfit">exactfit</option>
<option value="noscale">noscale</option>
</select>
</td>
</tr>
@ -816,7 +816,7 @@
</div>
<div style="float: right">
<input type="submit" id="insert" name="insert" value="{#insert}" onclick="insertMedia();" />
<input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
</div>
</form>

View File

@ -2,13 +2,12 @@
<head>
<title>{#paste.paste_text_desc}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="js/pastetext.js"></script>
<script type="text/javascript">tinyMCEPopup.onInit.add(function(){window.setTimeout(function(){document.getElementById('htmlSource').focus();},500);});</script>
<base target="_self" />
<base target="_self" />
</head>
<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
<form name="source" onsubmit="saveContent();">
<form name="source" onsubmit="saveContent();return false;" action="#">
<div style="float: left" class="title">{#paste.paste_text_desc}</div>
<div style="float: right">
@ -19,7 +18,7 @@
<div>{#paste_dlg.text_title}</div>
<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft"></textarea>
<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft" class="mceFocus"></textarea>
<div class="mceActionPanel">
<div style="float: left">
@ -27,7 +26,7 @@
</div>
<div style="float: right">
<input type="submit" name="insert" value="{#insert}" onclick="saveContent();" id="insert" />
<input type="submit" name="insert" value="{#insert}" id="insert" />
</div>
</div>
</form>

View File

@ -21,7 +21,7 @@
</div>
<div style="float: right">
<input type="submit" id="insert" name="insert" value="{#insert}" onclick="saveContent();" />
<input type="button" id="insert" name="insert" value="{#insert}" onclick="saveContent();" />
</div>
</div>
</form>

View File

@ -2,10 +2,9 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{#advanced_dlg.anchor_title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="js/anchor.js"></script>
<script type="text/javascript">tinyMCEPopup.onInit.add(function(){window.setTimeout(function(){document.getElementById('anchorName').focus();},500);});</script>
<base target="_self" />
<base target="_self" />
</head>
<body style="display: none">
<form onsubmit="AnchorDialog.update();return false;" action="#">
@ -15,7 +14,7 @@
</tr>
<tr>
<td nowrap="nowrap">{#advanced_dlg.anchor_name}:</td>
<td><input name="anchorName" type="text" id="anchorName" value="" style="width: 200px" /></td>
<td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" /></td>
</tr>
</table>
@ -25,7 +24,7 @@
</div>
<div style="float: right">
<input type="submit" id="insert" name="insert" value="{#update}" onclick="AnchorDialog.update();" />
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
</div>
</form>

View File

@ -8,6 +8,7 @@
<base target="_self" />
</head>
<body id="colorpicker" style="display: none">
<form onsubmit="insertAction();return false" action="#">
<div class="tabs">
<ul>
<li id="picker_tab" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
@ -61,14 +62,15 @@
<div class="mceActionPanel">
<div style="float: left">
<input type="button" id="insert" name="insert" value="{#apply}" onclick="insertAction();" />
<input type="submit" id="insert" name="insert" value="{#apply}" />
</div>
<div id="preview"></div>
<div id="previewblock">
<label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" maxlength="8" class="text" />
<label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" maxlength="8" class="text mceFocus" />
</div>
</div>
</form>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,6 @@
<script type="text/javascript" src="../../utils/mctabs.js"></script>
<script type="text/javascript" src="../../utils/form_utils.js"></script>
<script type="text/javascript" src="js/image.js"></script>
<script type="text/javascript">tinyMCEPopup.onInit.add(function(){window.setTimeout(function(){document.getElementById('src').focus();},500);});</script>
<base target="_self" />
</head>
<body id="image" style="display: none">
@ -19,12 +18,12 @@
<div class="panel_wrapper">
<div id="general_panel" class="panel current">
<table border="0" cellpadding="4" cellspacing="0">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td nowrap="nowrap"><label for="src">{#advanced_dlg.image_src}</label></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input id="src" name="src" type="text" value="" style="width: 200px" onchange="ImageDialog.getImageData();" /></td>
<td><input id="src" name="src" type="text" class="mceFocus" value="" style="width: 200px" onchange="ImageDialog.getImageData();" /></td>
<td id="srcbrowsercontainer">&nbsp;</td>
</tr>
</table></td>
@ -69,7 +68,7 @@
<td nowrap="nowrap"><label for="hspace">{#advanced_dlg.image_hspace}</label></td>
<td><input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
</tr>
<tr>
<tr>
<td nowrap="nowrap"><label for="class_name">{#class_name}</label></td>
<td><input type="text" id="class_name" name="class_name" style="width: 140px" value="" /></td>
</tr>
@ -83,7 +82,7 @@
</div>
<div style="float: right">
<input type="submit" id="insert" name="insert" value="{#insert}" onclick="ImageDialog.update();" />
<input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
</div>
</form>

View File

@ -55,6 +55,8 @@ var ImageDialog = {
update : function() {
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
tinyMCEPopup.restoreSelection();
if (f.src.value === '') {
if (ed.selection.getNode().nodeName == 'IMG') {
ed.dom.remove(ed.selection.getNode());

View File

@ -33,6 +33,8 @@ var LinkDialog = {
update : function() {
var f = document.forms[0], ed = tinyMCEPopup.editor, e, b;
tinyMCEPopup.restoreSelection();
// Remove element if there is no href
if (!f.href.value) {
e = ed.dom.getParent(ed.selection.getNode(), 'A');

View File

@ -2,13 +2,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{#advanced_dlg.link_title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="../../utils/mctabs.js"></script>
<script type="text/javascript" src="../../utils/form_utils.js"></script>
<script type="text/javascript" src="../../utils/validate.js"></script>
<script type="text/javascript" src="js/link.js"></script>
<script type="text/javascript">tinyMCEPopup.onInit.add(function(){window.setTimeout(function(){document.getElementById('href').focus();},500);});</script>
<base target="_self" />
<base target="_self" />
</head>
<body id="link" style="display: none">
<form onsubmit="LinkDialog.update();return false;" action="#">
@ -26,7 +25,7 @@
<td nowrap="nowrap"><label for="href">{#advanced_dlg.link_url}</label></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input id="href" name="href" type="text" value="" style="width: 200px" onchange="LinkDialog.checkPrefix(this);" /></td>
<td><input id="href" name="href" type="text" class="mceFocus" value="" style="width: 200px" onchange="LinkDialog.checkPrefix(this);" /></td>
<td id="hrefbrowsercontainer">&nbsp;</td>
</tr>
</table></td>
@ -57,7 +56,7 @@
</div>
<div style="float: right">
<input type="submit" id="insert" name="insert" value="{#insert}" onclick="LinkDialog.update();" />
<input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
</div>
</form>

View File

@ -1,6 +1,12 @@
body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
body {background:#FFF;}
body.mceForceColors {background:#FFF; color:#000;}
h1 {font-size: 2em}
h2 {font-size: 1.5em}
h3 {font-size: 1.17em}
h4 {font-size: 1em}
h5 {font-size: .83em}
h6 {font-size: .75em}
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;}
img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;}

View File

@ -22,8 +22,9 @@
.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
.defaultSkin td.mceToolbar {padding-top:1px; vertical-align:top}
.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC}
.defaultSkin .mceStatusbar {position:relative; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; padding:2px; color:#000; display:block}
.defaultSkin .mceStatusbar a.mceResize {display:block; position:absolute; top:0; right:0; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize}
.defaultSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
.defaultSkin .mceStatusbar div {float:left; margin:2px}
.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize}
.defaultSkin .mceStatusbar a:hover {text-decoration:underline}
.defaultSkin table.mceToolbar {margin-left:3px}
.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
@ -105,6 +106,18 @@
.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
.defaultSkin .mcePlaceHolder {border:1px dotted gray}
/* Formats */
.defaultSkin .mce_formatPreview a {font-size:10px}
.defaultSkin .mce_p span.mceText {}
.defaultSkin .mce_address span.mceText {font-style:italic}
.defaultSkin .mce_pre span.mceText {font-family:monospace}
.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
/* Theme */
.defaultSkin span.mce_bold {background-position:0 0}
.defaultSkin span.mce_italic {background-position:-60px 0}

View File

@ -1,6 +1,12 @@
body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
body {background:#FFF;}
body.mceForceColors {background:#FFF; color:#000;}
h1 {font-size: 2em}
h2 {font-size: 1.5em}
h3 {font-size: 1.17em}
h4 {font-size: 1em}
h5 {font-size: .83em}
h6 {font-size: .75em}
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(../default/img/items.gif) no-repeat bottom left;}
img.mceItemAnchor {width:12px; height:12px; background:url(../default/img/items.gif) no-repeat;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -19,8 +19,8 @@
.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD}
.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0}
.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD}
.o2k7Skin .mceStatusbar {display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px;}
.o2k7Skin .mceStatusbar div {float:left; padding:2px;}
.o2k7Skin .mceStatusbar {display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px}
.o2k7Skin .mceStatusbar div {float:left; padding:2px}
.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize}
.o2k7Skin .mceStatusbar a:hover {text-decoration:underline}
.o2k7Skin table.mceToolbar {margin-left:3px}
@ -107,6 +107,18 @@
.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
.o2k7Skin .mcePlaceHolder {border:1px dotted gray}
/* Formats */
.o2k7Skin .mce_formatPreview a {font-size:10px}
.o2k7Skin .mce_p span.mceText {}
.o2k7Skin .mce_address span.mceText {font-style:italic}
.o2k7Skin .mce_pre span.mceText {font-family:monospace}
.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
/* Theme */
.o2k7Skin span.mce_bold {background-position:0 0}
.o2k7Skin span.mce_italic {background-position:-60px 0}

View File

@ -0,0 +1,8 @@
/* Black */
.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton span.mceOpen, .o2k7SkinBlack .mceListBox .mceOpen {background-image:url(img/button_bg_black.png)}
.o2k7SkinBlack table, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF}
.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0}
.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0}
.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;}
.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)}
.o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#FFE7A1}

View File

@ -2,13 +2,12 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>{#advanced_dlg.code_title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="js/source_editor.js"></script>
<script type="text/javascript">tinyMCEPopup.onInit.add(function(){window.setTimeout(function(){document.getElementById('htmlSource').focus();},500);});</script>
<base target="_self" />
<base target="_self" />
</head>
<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
<form name="source" onsubmit="saveContent();" action="#">
<form name="source" onsubmit="saveContent();return false;" action="#">
<div style="float: left" class="title">{#advanced_dlg.code_title}</div>
<div id="wrapline" style="float: right">
@ -17,7 +16,7 @@
<br style="clear: both" />
<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px;" dir="ltr" wrap="off"></textarea>
<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px;" dir="ltr" wrap="off" class="mceFocus"></textarea>
<div class="mceActionPanel">
<div style="float: left">
@ -25,7 +24,7 @@
</div>
<div style="float: right">
<input type="submit" name="insert" value="{#update}" onclick="saveContent();" id="insert" />
<input type="submit" name="insert" value="{#update}" id="insert" />
</div>
</div>
</form>

File diff suppressed because one or more lines are too long

View File

@ -166,8 +166,11 @@ $old_cache_max = ( isset($initArray['old_cache_max']) ) ? (int) $initArray['old_
$initArray['disk_cache'] = $initArray['compress'] = $initArray['old_cache_max'] = null;
unset( $initArray['disk_cache'], $initArray['compress'], $initArray['old_cache_max'] );
$isIE5 = ( ( $msie = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) && ( (int) substr( $_SERVER['HTTP_USER_AGENT'], $msie + 5, 3 ) < 6 ) ) ? true : false;
if ( $isIE5 ) $compress = false;
// Anybody still using IE5/5.5? It can't handle gzip compressed js well.
if ( $msie = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) {
$ie_ver = (int) substr( $_SERVER['HTTP_USER_AGENT'] , $msie + 5, 3 );
if ( $ie_ver && $ie_ver < 6 ) $compress = false;
}
// Cache path, this is where the .gz files will be stored
$cache_path = ABSPATH . 'wp-content/uploads/js_cache';
@ -181,11 +184,11 @@ $theme = ( 'simple' == $initArray['theme'] ) ? 'simple' : 'advanced';
$language = isset($initArray['language']) ? substr( $initArray['language'], 0, 2 ) : 'en';
$enc = $cacheKey = $suffix = $mce_options = '';
// Check if supports gzip
// Check if browser supports gzip
if ( $compress && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
$encodings = explode( ',', strtolower( preg_replace('/\s+/', '', $_SERVER['HTTP_ACCEPT_ENCODING']) ) );
if ( (in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------']) ) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression') ) {
if ( (in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------']) ) && function_exists('ob_gzhandler') && (ini_get('zlib.output_compression') == false) ) {
$enc = in_array('x-gzip', $encodings) ? 'x-gzip' : 'gzip';
$cache_ext = '.gz';
}
@ -257,7 +260,7 @@ echo $content;
// Write file
if ( '' != $cacheKey ) {
if ( (int) $old_cache_max && is_dir($cache_path) ) {
if ( is_dir($cache_path) ) {
$old_cache = array();
$handle = opendir($cache_path);
@ -269,7 +272,7 @@ if ( '' != $cacheKey ) {
closedir($handle);
krsort($old_cache);
if ( 1 >= $old_cache_max ) $del_cache = $old_cache;
if ( 1 >= (int) $old_cache_max ) $del_cache = $old_cache;
else $del_cache = array_slice( $old_cache, ($old_cache_max - 1) );
foreach ( $del_cache as $key )

View File

@ -178,18 +178,13 @@ tinyMCEPopup = {
document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection);
t.restoreSelection();
// Call onInit
tinymce.each(t.listeners, function(o) {
o.func.call(o.scope, t.editor);
});
t.resizeToInnerSize();
if (t.isWindow)
window.focus();
else
// Set inline title
if (!t.isWindow)
t.editor.windowManager.setTitle(ti, t.id);
else
window.focus();
if (!tinymce.isIE && !t.isWindow) {
tinymce.dom.Event._add(document, 'focus', function() {
@ -202,12 +197,32 @@ tinyMCEPopup = {
e.onkeydown = tinyMCEPopup._accessHandler;
});
// Call onInit
// Init must be called before focus so the selection won't get lost by the focus call
tinymce.each(t.listeners, function(o) {
o.func.call(o.scope, t.editor);
});
// Move focus to window
window.focus();
if (t.getWindowArg('mce_auto_focus', true)) {
window.focus();
// Focus element with mceFocus class
tinymce.each(document.forms, function(f) {
tinymce.each(f.elements, function(e) {
if (t.dom.hasClass(e, 'mceFocus')) {
e.focus();
return false; // Break loop
}
});
});
}
document.onkeydown = tinyMCEPopup._closeWinKeyHandler;
},
_accessHandler : function(e) {
var e = e || window.event;
e = e || window.event;
if (e.keyCode == 13 || e.keyCode == 32) {
e = e.target || e.srcElement;
@ -219,6 +234,13 @@ tinyMCEPopup = {
}
},
_closeWinKeyHandler : function(e) {
e = e || window.event;
if (e.keyCode == 27)
tinyMCEPopup.close();
},
_wait : function() {
var t = this, ti;

View File

@ -1,5 +1,5 @@
/**
* $Id: form_utils.js 614 2008-02-20 17:57:57Z spocke $
* $Id: form_utils.js 673 2008-03-06 13:26:20Z spocke $
*
* Various form utilitiy functions.
*
@ -170,7 +170,7 @@ function convertHexToRGB(col) {
}
function trimSize(size) {
return size.replace(new RegExp('[^0-9%]', 'gi'), '');
return size.replace(/([0-9\.]+)px|(%|in|cm|mm|em|ex|pt|pc)/, '$1$2');
}
function getCSSSize(size) {
@ -179,7 +179,11 @@ function getCSSSize(size) {
if (size == "")
return "";
return size.indexOf('%') != -1 ? size : size + "px";
// Add px
if (/^[0-9]+$/.test(size))
size += 'px';
return size;
}
function getStyle(elm, attrib, style) {

View File

@ -1,5 +1,5 @@
/**
* $Id: validate.js 520 2008-01-07 16:30:32Z spocke $
* $Id: validate.js 673 2008-03-06 13:26:20Z spocke $
*
* Various form validation methods.
*
@ -31,7 +31,7 @@ var Validator = {
},
isSize : function(s) {
return this.test(s, '^[0-9]+(px|%)?$');
return this.test(s, '^[0-9]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
},
isId : function(s) {

View File

@ -33,10 +33,10 @@ class WP_Scripts {
$visual_editor = apply_filters('visual_editor', array('tiny_mce'));
$this->add( 'editor', false, $visual_editor, '20080218' );
$this->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080221' );
$this->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080312' );
// Modify this version when tinyMCE plugins are changed.
$mce_version = apply_filters('tiny_mce_version', '20080306');
$mce_version = apply_filters('tiny_mce_version', '20080312');
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );
$this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');