TinyMCE 3.01. Props azaozz. fixes #5944

git-svn-id: http://svn.automattic.com/wordpress/trunk@6959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-02-21 21:40:25 +00:00
parent e92ee80901
commit e545cdadb1
28 changed files with 131 additions and 428 deletions

View File

@ -89,11 +89,9 @@ switchEditors = {
tinyMCE.triggerSave();
ta.style.height = tinyMCE.activeEditor.contentAreaContainer.offsetHeight + 6 + 'px';
if ( tinymce.isIE6 )
ta.style.width = tinyMCE.activeEditor.contentAreaContainer.offsetWidth - 12 + 'px';
ed.hide();
ta.value = this.pre_wpautop(ta.value);
ta.style.width = '100%';
qt.style.display = 'block';
ec.style.padding = '6px';

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.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=no,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;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({format:'raw',no_events:1}),{format:'raw',no_events:1});});t.fullscreenEditor.render();tinyMCE.add(t.fullscreenEditor);t.fullscreenElement=new tinymce.dom.Element('mce_fullscreen_container');t.fullscreenElement.update();}});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.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=no,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();}});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);})();

View File

@ -43,13 +43,20 @@
settings['fullscreen_is_enabled'] = true;
settings['fullscreen_editor_id'] = window.opener.tinyMCE.activeEditor.id;
settings['theme_advanced_resizing'] = false;
settings['strict_loading_mode'] = true;
settings.save_onsavecallback = function() {
window.opener.tinyMCE.activeEditor.setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
window.opener.tinyMCE.activeEditor.execCommand('mceSave');
window.close();
};
function unloadHandler(e) {
moveContent();
}
function moveContent() {
window.opener.tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent({format : 'raw'}));
window.opener.tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent());
}
function closeFullscreen() {
@ -80,9 +87,9 @@
<script type="text/javascript">
var e = document.getElementById('fullscreenarea');
e.value = window.opener.tinyMCE.activeEditor.getContent({format : 'raw'});
settings['width'] = window.innerWidth || document.body.clientWidth;
settings['height'] = (window.innerHeight || document.body.clientHeight) - 18;
e.value = window.opener.tinyMCE.activeEditor.getContent();
settings.width = window.innerWidth || document.body.clientWidth;
settings.height = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) - 18;
tinyMCE.init(settings);
</script>

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,6 @@
/* Clearlooks 2 */
/* Reset */
.clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
/* General */
.clearlooks2 div, .clearlooks2 span, .clearlooks2 a {position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@ function init() {
fe = ed.selection.getNode();
if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) {
pl = "x={" + fe.title + "};";
pl = fe.title;
switch (ed.dom.getAttrib(fe, 'class')) {
case 'mceItemFlash':
@ -63,7 +63,7 @@ function init() {
// Setup form
if (pl != "") {
pl = eval(pl);
pl = tinyMCEPopup.editor.plugins.media._parse(pl);
switch (type) {
case "flash":
@ -493,6 +493,9 @@ function getStr(p, n, d) {
var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
if (n == 'src')
v = tinyMCEPopup.editor.convertURL(v, 'src', null);
return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',");
}
@ -579,7 +582,7 @@ function generatePreview(c) {
return;
}
pl = eval('x={' + pl + '};');
pl = tinyMCEPopup.editor.plugins.media._parse(pl);
if (!pl.src) {
p.innerHTML = '';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{#advanced_dlg.charmap_title}</title>
@ -6,22 +7,22 @@
<script type="text/javascript" src="js/charmap.js"></script>
<base target="_self" />
</head>
<body style="display: none">
<table style="background:#fff;" align="center" border="0" cellspacing="0" cellpadding="2">
<body id="charmap" style="display:none">
<table align="center" border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="2" class="title">{#advanced_dlg.charmap_title}</td>
</tr>
<tr>
<td id="charmap" rowspan="2" align="left" valign="top">
<td id="charmapView" rowspan="2" align="left" valign="top">
<!-- Chars will be rendered here -->
</td>
<td width="100" align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100" style="height: 100px">
<table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px">
<tr>
<td class="charmapOver" style="font-size: 40px; height:80px;" id="codeV">&nbsp;</td>
<td id="codeV">&nbsp;</td>
</tr>
<tr>
<td style="font-size: 10px; font-family: Arial, Helvetica, sans-serif; text-align:center;" id="codeN">&nbsp;</td>
<td id="codeN">&nbsp;</td>
</tr>
</table>
</td>

File diff suppressed because one or more lines are too long

View File

@ -264,7 +264,7 @@ var charmap = [
];
tinyMCEPopup.onInit.add(function() {
tinyMCEPopup.dom.setHTML('charmap', renderCharMapHTML());
tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());
});
function renderCharMapHTML() {
@ -276,11 +276,8 @@ function renderCharMapHTML() {
if (charmap[i][2]==true) {
cols++;
html += ''
+ '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"'
+ ' onmouseover="this.className=\'charmapOver\';'
+ 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');"'
+ ' onmouseout="this.className=\'charmap\';"'
+ ' nowrap="nowrap" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');"><a style="text-decoration: none;" onfocus="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" href="javascript:insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + '">'
+ '<td class="charmap">'
+ '<a onmouseover="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" onfocus="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" href="javascript:void(0)" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + '">'
+ charmap[i][1]
+ '</a></td>';
if ((cols+1) % charsPerRow == 0)

View File

@ -56,8 +56,11 @@ var ImageDialog = {
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
if (f.src.value === '') {
ed.dom.remove(ed.selection.getNode());
ed.execCommand('mceRepaint');
if (ed.selection.getNode().nodeName == 'IMG') {
ed.dom.remove(ed.selection.getNode());
ed.execCommand('mceRepaint');
}
tinyMCEPopup.close();
return;
}
@ -69,9 +72,8 @@ var ImageDialog = {
border : nl.border.value,
align : getSelectValue(f, 'align')
});
} else {
} else
args.style = this.styleVal;
}
tinymce.extend(args, {
src : f.src.value,
@ -86,9 +88,10 @@ var ImageDialog = {
if (el && el.nodeName == 'IMG') {
ed.dom.setAttribs(el, args);
} else {
ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" src="javascript:;" />');
ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" src="javascript:;" />', {skip_undo : 1});
ed.dom.setAttribs('__mce_tmp', args);
ed.dom.setAttrib('__mce_tmp', 'id', '');
ed.undoManager.add();
}
tinyMCEPopup.close();

View File

@ -1,5 +1,5 @@
body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px; }
body {background:#FFF;}
body.mceContentBody {background:#FFF; color:#000;}
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceVisualAid {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

@ -58,10 +58,12 @@ a.pickcolor:hover span {background-color:#B2BBD0;}
a.pickcolor:hover span.disabled {}
/* Charmap */
table.charmap {border-style:solid; border-width:1px; border-color:#AAA;}
td.charmap, td.charmapOver {color:#000; border-color:#AAA; border-style:solid; border-width:1px; text-align:center; font-size:12px;}
td.charmapOver {background:#CCC; cursor:default;}
a.charmap {color:#000; text-decoration:none}
table.charmap {border:1px solid #AAA; text-align:center}
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
#charmap a {display:block; color:#000; text-decoration:none; border:0}
#charmap a:hover {background:#CCC;color:#2B6FB6}
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
/* Source */
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
@ -70,7 +72,7 @@ a.charmap {color:#000; text-decoration:none}
/* Tabs classes */
.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
.tabs ul {margin:0; padding:0; list-style:none;}
.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:18px;}
.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
@ -109,3 +111,4 @@ h3 {font-size:14px;}
#colorpicker #namedcolors {width:150px;}
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
#colorpicker #colornamecontainer {margin-top:5px;}
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}

View File

@ -1,5 +1,5 @@
/* Reset */
.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .text {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate}
.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .text {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
.defaultSkin table td {vertical-align:middle}
@ -28,6 +28,8 @@
.defaultSkin table.mceToolbar {margin-left:3px}
.defaultSkin span.icon, .defaultSkin img.icon {display:block; width:20px; height:20px}
.defaultSkin .icon {background:url(../../img/icons.gif) no-repeat 20px 20px}
.defaultSkin td.center table {margin:0 auto;}
.defaultSkin td.right table {margin:0 0 0 auto;}
/* Button */
.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px;}

View File

@ -1,5 +1,5 @@
body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
body {background:#FFF;}
body.mceContentBody {background:#FFF; color:#000;}
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceVisualAid {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;}

View File

@ -58,10 +58,12 @@ a.pickcolor:hover span {background-color:#B2BBD0;}
a.pickcolor:hover span.disabled {}
/* Charmap */
table.charmap {border-style:solid; border-width:1px; border-color:#AAA;}
td.charmap, td.charmapOver {color:#000; border-color:#AAA; border-style:solid; border-width:1px; text-align:center; font-size:12px;}
td.charmapOver {background:#CCC; cursor:default;}
a.charmap {color:#000; text-decoration:none}
table.charmap {border:1px solid #AAA; text-align:center}
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
#charmap a {display:block; color:#000; text-decoration:none; border:0}
#charmap a:hover {background:#CCC;color:#2B6FB6}
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
/* Source */
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
@ -70,7 +72,7 @@ a.charmap {color:#000; text-decoration:none}
/* Tabs classes */
.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;}
.tabs ul {margin:0; padding:0; list-style:none;}
.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:18px;}
.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;}

View File

@ -1,5 +1,5 @@
/* Reset */
.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .text {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate}
.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .text {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
.o2k7Skin table td {vertical-align:middle}
@ -29,6 +29,8 @@
.o2k7Skin .mceToolbar .mceToolbarEndListBox span {display:none}
.o2k7Skin span.icon, .o2k7Skin img.icon {display:block; width:20px; height:20px}
.o2k7Skin .icon {background:url(../../img/icons.gif) no-repeat 20px 20px}
.o2k7Skin td.center table {margin:0 auto;}
.o2k7Skin td.right table {margin:0 0 0 auto;}
/* Button */
.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px}

View File

@ -1,8 +1,8 @@
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
body {background:#FFF;}
body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px; }
body.mceContentBody {background:#FFF; color:#000;}
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceVisualAid {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;}
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;}
img {border:0;}
/* IE

View File

@ -49,8 +49,6 @@ cursor:pointer;
#insert:focus, #cancel:focus, input.button:focus, .updateButton:focus {
border: 1px solid #555;
}
/*#insert {background:url(img/fade-butt.png) 0 0;}
#cancel {background:url(img/fade-butt.png) 0 0;}*/
/* Browse */
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
@ -64,22 +62,25 @@ a.pickcolor:hover span {background-color:#B2BBD0;}
a.pickcolor:hover span.disabled {}
/* Charmap */
table.charmap {border-style:solid; border-width:1px; border-color:#AAA;}
td.charmap, td.charmapOver {color:#000; border-color:#AAA; border-style:solid; border-width:1px; text-align:center; font-size:12px;}
td.charmapOver {background:#CCC; cursor:default;}
a.charmap {color:#000; text-decoration:none}
table.charmap {border:1px solid #AAA; text-align:center}
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
#charmap a {display:block; color:#000; text-decoration:none; border:0}
#charmap a:hover {background:#CCC;color:#2B6FB6}
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
#charmap #charmapView {background-color:#fff;}
/* Source */
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
.mceActionPanel {margin-top:5px;background:transparent;}
.mceActionPanel {margin-top:5px;}
/* Tabs classes */
.tabs {width:100%; height:18px; line-height:normal; background: #eaf3ea url(../default/img/tabs.gif) repeat-x 0 -72px;}
.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
.tabs ul {margin:0; padding:0; list-style:none;}
.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:18px;}
.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;}
.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because one or more lines are too long

View File

@ -62,7 +62,7 @@ $plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste',
/*
The following filter takes an associative array of external plugins for TinyMCE in the form "name" => "url".
It adds the plugin's name (including the required dash) to TinyMCE's plugins init and the call to PluginManager to load the plugin.
It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin.
The url should be absolute and should include the js file name to be loaded.
Example: array( 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js' ).
If the plugin uses a button, it should be added with one of the "$mce_buttons" filters.
@ -71,7 +71,7 @@ $mce_external_plugins = apply_filters('mce_external_plugins', array());
$ext_plugins = "\n";
foreach ( $mce_external_plugins as $name => $url ) {
$plugins[] = '-' . $name;
$plugins[] = $name;
if ( $https ) str_replace('http://', 'https://', $url);
$ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n";
@ -150,7 +150,7 @@ ob_end_clean();
*/
// Settings for the gzip compression and cache
$cache_path = dirname(__FILE__); // Cache path, this is where the .gz files will be stored
$cache_path = dirname(__FILE__); // ABSPATH . 'wp-content/uploads/js_cache'; // Cache path, this is where the .gz files will be stored
$cache_ext = '.js';
$disk_cache = ( ! isset($initArray['disk_cache']) || false == $initArray['disk_cache'] ) ? false : true;
@ -160,14 +160,14 @@ $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;
$plugins = explode( ',', $initArray['plugins'] );
$theme = ( 'simple' == $initArray['theme'] ) ? 'simple' : 'advanced';
$language = isset($initArray['language']) ? substr( $initArray['language'], 0, 2 ) : 'en';
$enc = $cacheKey = $suffix = $mce_options = '';
// Custom extra javascripts to pack
$custom_js = array(); //$custom_js = apply_filters('tinymce_custom_js', array());
// Check if supports gzip
if ( $compress && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
$encodings = explode( ',', strtolower( preg_replace('/\s+/', '', $_SERVER['HTTP_ACCEPT_ENCODING']) ) );
@ -186,9 +186,6 @@ if ( $disk_cache && $cache_path ) {
foreach ( $initArray as $v )
$cacheKey .= $v;
foreach ( $custom_js as $file )
$cacheKey .= $file;
$cacheKey = md5( $cacheKey );
$cache_file = $cache_path . '/tinymce_' . $cacheKey . $cache_ext;
@ -233,10 +230,6 @@ $content .= getFileContents( 'themes/' . $theme . '/editor_template' . $suffix .
foreach ( $plugins as $plugin )
$content .= getFileContents( 'plugins/' . $plugin . '/editor_plugin' . $suffix . '.js' );
// Add custom files
foreach ( $custom_js as $file )
$content .= getFileContents($file);
// Add external plugins and init
$content .= $ext_plugins . 'tinyMCE.init({' . $mce_options . '});'; // $mce_deprecated2 .
@ -252,7 +245,8 @@ echo $content;
// Write file
if ( '' != $cacheKey && $cache_path ) {
if ( $old_cache_max ) {
$old_keys = getFileContents('tinymce_compressed' . $cache_ext . '_key');
$keys_file = $cache_path . '/tinymce_compressed' . $cache_ext . '_key';
$old_keys = getFileContents($keys_file);
if ( '' != $old_keys ) {
$keys_ar = explode( "\n", $old_keys );
@ -269,10 +263,9 @@ if ( '' != $cacheKey && $cache_path ) {
array_unshift( $keys_ar, $cacheKey );
$keys_ar = array_slice( $keys_ar, 0, $old_cache_max );
$cacheKey = trim( implode( "\n", $keys_ar ) );
}
putFileContents( 'tinymce_compressed' . $cache_ext . '_key', $cacheKey );
putFileContents( $keys_file, $cacheKey );
}
putFileContents( $cache_file, $content );

View File

@ -3,9 +3,20 @@ var tinymce = null, tinyMCEPopup, tinyMCE;
tinyMCEPopup = {
init : function() {
var t = this, w = t.getWin(), ti;
var t = this, w, ti, li, q, i, it;
// Find API
li = ('' + document.location.search).replace(/^\?/, '').split('&');
q = {};
for (i=0; i<li.length; i++) {
it = li[i].split('=');
q[unescape(it[0])] = unescape(it[1]);
}
if (q.mce_rdomain)
document.domain = q.mce_rdomain;
// Find window & API
w = t.getWin();
tinymce = w.tinymce;
tinyMCE = w.tinyMCE;
t.editor = tinymce.EditorManager.activeEditor;
@ -47,8 +58,11 @@ tinyMCEPopup = {
},
execCommand : function(cmd, ui, val, a) {
a = a || {};
a.skip_focus = 1;
this.restoreSelection();
return this.editor.execCommand(cmd, ui, val, a || {skip_focus : 1});
return this.editor.execCommand(cmd, ui, val, a);
},
resizeToInnerSize : function() {
@ -83,7 +97,7 @@ tinyMCEPopup = {
requireLangPack : function() {
var u = this.getWindowArg('plugin_url') || this.getWindowArg('theme_url');
if (u && u.indexOf('wp-includes') == -1 )
if (u && this.editor.settings.language && u.indexOf('wp-includes') == -1)
document.write('<script type="text/javascript" src="' + u + '/langs/' + this.editor.settings.language + '_dlg.js' + '"></script>');
},
@ -110,8 +124,16 @@ tinyMCEPopup = {
close : function() {
var t = this;
t.dom = null; // t.dom.doc = null; // Cleanup
t.editor.windowManager.close(window, t.id);
// To avoid domain relaxing issue in Opera
function close() {
t.editor.windowManager.close(window, t.id);
tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup
};
if (tinymce.isOpera)
t.getWin().setTimeout(close, 0);
else
close();
},
// Internal functions
@ -139,7 +161,7 @@ tinyMCEPopup = {
// Replace a=x with a="x" in IE
if (tinymce.isIE)
h = h.replace(/ (value|title|alt)=([^\s>]+)/gi, ' $1="$2"');
h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"')
document.body.innerHTML = t.editor.translate(h);
document.title = ti = t.editor.translate(ti);

View File

@ -1,5 +1,5 @@
/**
* $Id: form_utils.js 520 2008-01-07 16:30:32Z spocke $
* $Id: form_utils.js 614 2008-02-20 17:57:57Z spocke $
*
* Various form utilitiy functions.
*
@ -32,7 +32,9 @@ function setBrowserDisabled(id, state) {
lnk.removeAttribute("href");
tinyMCEPopup.dom.addClass(img, 'disabled');
} else {
lnk.setAttribute("href", lnk.getAttribute("realhref"));
if (lnk.getAttribute("realhref"))
lnk.setAttribute("href", lnk.getAttribute("realhref"));
tinyMCEPopup.dom.removeClass(img, 'disabled');
}
}

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, '20080208' );
$this->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080221' );
// Modify this version when tinyMCE plugins are changed.
$mce_version = apply_filters('tiny_mce_version', '20080209');
$mce_version = apply_filters('tiny_mce_version', '20080221');
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );
$this->localize( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) );
@ -187,7 +187,7 @@ class WP_Scripts {
'edit' => __('Edit'),
'cancel' => __('Cancel'),
));
$this->add( 'editor', '/wp-admin/js/editor.js', array('tiny_mce'), '20080208' );
$this->add( 'editor', '/wp-admin/js/editor.js', array('tiny_mce'), '20080221' );
}
}