TinyMCE 3.0 RC1. First cut, eexpect regressions. Props azaozz. see #5674
git-svn-id: http://svn.automattic.com/wordpress/trunk@6632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@ -67,6 +67,10 @@ function wpautop($pee, $br = 1) {
|
||||
$pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee);
|
||||
$pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
|
||||
$pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines
|
||||
if ( strpos($pee, '<object') !== false ) {
|
||||
$pee = preg_replace('|\s*<param([^>]*)>\s*|', "<param$1>", $pee); // no pee inside object/embed
|
||||
$pee = preg_replace('|\s*</embed>\s*|', '</embed>', $pee);
|
||||
}
|
||||
$pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates
|
||||
$pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end
|
||||
$pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace
|
||||
|
@ -952,7 +952,7 @@ function the_editor($content, $id = 'content', $prev_id = 'title') {
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0 )
|
||||
if ( typeof tinyMCE != "undefined" )
|
||||
document.getElementById('editor-toolbar').style.display = 'block';
|
||||
// ]]>
|
||||
</script>
|
||||
@ -967,7 +967,7 @@ function the_editor($content, $id = 'content', $prev_id = 'title') {
|
||||
<?php if ( 'html' != $wp_default_editor ) : ?>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0 )
|
||||
if ( typeof tinyMCE != "undefined" )
|
||||
document.getElementById("quicktags").style.display="none";
|
||||
// ]]>
|
||||
</script>
|
||||
|
@ -1,41 +1,154 @@
|
||||
// UK lang variables
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
bold_desc : 'Bold (Ctrl+B)',
|
||||
italic_desc : 'Italic (Ctrl+I)',
|
||||
underline_desc : 'Underline (Ctrl+U)',
|
||||
striketrough_desc : 'Strikethrough',
|
||||
justifyleft_desc : 'Align left',
|
||||
justifycenter_desc : 'Align center',
|
||||
justifyright_desc : 'Align right',
|
||||
justifyfull_desc : 'Align full',
|
||||
bullist_desc : 'Unordered list',
|
||||
numlist_desc : 'Ordered list',
|
||||
outdent_desc : 'Outdent',
|
||||
indent_desc : 'Indent',
|
||||
undo_desc : 'Undo (Ctrl+Z)',
|
||||
redo_desc : 'Redo (Ctrl+Y)',
|
||||
link_desc : 'Insert/edit link',
|
||||
unlink_desc : 'Unlink',
|
||||
image_desc : 'Insert/edit image',
|
||||
cleanup_desc : 'Cleanup messy code',
|
||||
focus_alert : 'A editor instance must be focused before using this command.',
|
||||
edit_confirm : 'Do you want to use the WYSIWYG mode for this textarea?',
|
||||
insert_link_title : 'Insert/edit link',
|
||||
insert : 'Insert',
|
||||
update : 'Update',
|
||||
cancel : 'Cancel',
|
||||
insert_link_url : 'Link URL',
|
||||
insert_link_target : 'Target',
|
||||
insert_link_target_same : 'Open link in the same window',
|
||||
insert_link_target_blank : 'Open link in a new window',
|
||||
insert_image_title : 'Insert/edit image',
|
||||
insert_image_src : 'Image URL',
|
||||
insert_image_alt : 'Image description',
|
||||
help_desc : 'Help',
|
||||
bold_img : "bold.gif",
|
||||
italic_img : "italic.gif",
|
||||
underline_img : "underline.gif",
|
||||
clipboard_msg : 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?',
|
||||
popup_blocked : 'Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.'
|
||||
});
|
||||
tinyMCE.addI18n({en:{
|
||||
common:{
|
||||
edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
|
||||
apply:"Apply",
|
||||
insert:"Insert",
|
||||
update:"Update",
|
||||
cancel:"Cancel",
|
||||
close:"Close",
|
||||
browse:"Browse",
|
||||
class_name:"Class",
|
||||
not_set:"-- Not set --",
|
||||
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
|
||||
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
|
||||
popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
|
||||
invalid_data:"Error: Invalid values entered, these are marked in red.",
|
||||
more_colors:"More colors"
|
||||
},
|
||||
contextmenu:{
|
||||
align:"Alignment",
|
||||
left:"Left",
|
||||
center:"Center",
|
||||
right:"Right",
|
||||
full:"Full"
|
||||
},
|
||||
insertdatetime:{
|
||||
date_fmt:"%Y-%m-%d",
|
||||
time_fmt:"%H:%M:%S",
|
||||
insertdate_desc:"Insert date",
|
||||
inserttime_desc:"Insert time",
|
||||
months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
|
||||
months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
|
||||
day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
|
||||
day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"
|
||||
},
|
||||
print:{
|
||||
print_desc:"Print"
|
||||
},
|
||||
preview:{
|
||||
preview_desc:"Preview"
|
||||
},
|
||||
directionality:{
|
||||
ltr_desc:"Direction left to right",
|
||||
rtl_desc:"Direction right to left"
|
||||
},
|
||||
layer:{
|
||||
insertlayer_desc:"Insert new layer",
|
||||
forward_desc:"Move forward",
|
||||
backward_desc:"Move backward",
|
||||
absolute_desc:"Toggle absolute positioning",
|
||||
content:"New layer..."
|
||||
},
|
||||
save:{
|
||||
save_desc:"Save",
|
||||
cancel_desc:"Cancel all changes"
|
||||
},
|
||||
nonbreaking:{
|
||||
nonbreaking_desc:"Insert non-breaking space character"
|
||||
},
|
||||
iespell:{
|
||||
iespell_desc:"Run spell checking",
|
||||
download:"ieSpell not detected. Do you want to install it now?"
|
||||
},
|
||||
advhr:{
|
||||
advhr_desc:"Horizontale rule"
|
||||
},
|
||||
emotions:{
|
||||
emotions_desc:"Emotions"
|
||||
},
|
||||
searchreplace:{
|
||||
search_desc:"Find",
|
||||
replace_desc:"Find/Replace"
|
||||
},
|
||||
advimage:{
|
||||
image_desc:"Insert/edit image"
|
||||
},
|
||||
advlink:{
|
||||
link_desc:"Insert/edit link"
|
||||
},
|
||||
xhtmlxtras:{
|
||||
cite_desc:"Citation",
|
||||
abbr_desc:"Abbreviation",
|
||||
acronym_desc:"Acronym",
|
||||
del_desc:"Deletion",
|
||||
ins_desc:"Insertion",
|
||||
attribs_desc:"Insert/Edit Attributes"
|
||||
},
|
||||
style:{
|
||||
desc:"Edit CSS Style"
|
||||
},
|
||||
paste:{
|
||||
paste_text_desc:"Paste as Plain Text",
|
||||
paste_word_desc:"Paste from Word",
|
||||
selectall_desc:"Select All"
|
||||
},
|
||||
paste_dlg:{
|
||||
text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
|
||||
text_linebreaks:"Keep linebreaks",
|
||||
word_title:"Use CTRL+V on your keyboard to paste the text into the window."
|
||||
},
|
||||
table:{
|
||||
desc:"Inserts a new table",
|
||||
row_before_desc:"Insert row before",
|
||||
row_after_desc:"Insert row after",
|
||||
delete_row_desc:"Delete row",
|
||||
col_before_desc:"Insert column before",
|
||||
col_after_desc:"Insert column after",
|
||||
delete_col_desc:"Remove column",
|
||||
split_cells_desc:"Split merged table cells",
|
||||
merge_cells_desc:"Merge table cells",
|
||||
row_desc:"Table row properties",
|
||||
cell_desc:"Table cell properties",
|
||||
props_desc:"Table properties",
|
||||
paste_row_before_desc:"Paste table row before",
|
||||
paste_row_after_desc:"Paste table row after",
|
||||
cut_row_desc:"Cut table row",
|
||||
copy_row_desc:"Copy table row",
|
||||
del:"Delete table",
|
||||
row:"Row",
|
||||
col:"Column",
|
||||
cell:"Cell"
|
||||
},
|
||||
autosave:{
|
||||
unload_msg:"The changes you made will be lost if you navigate away from this page."
|
||||
},
|
||||
fullscreen:{
|
||||
desc:"Toggle fullscreen mode"
|
||||
},
|
||||
media:{
|
||||
desc:"Insert / edit embedded media",
|
||||
edit:"Edit embedded media"
|
||||
},
|
||||
fullpage:{
|
||||
desc:"Document properties"
|
||||
},
|
||||
template:{
|
||||
desc:"Insert predefined template content"
|
||||
},
|
||||
visualchars:{
|
||||
desc:"Visual control characters on/off."
|
||||
},
|
||||
spellchecker:{
|
||||
desc:"Toggle spellchecker",
|
||||
menu:"Spellchecker settings",
|
||||
ignore_word:"Ignore word",
|
||||
ignore_words:"Ignore all",
|
||||
langs:"Languages",
|
||||
wait:"Please wait...",
|
||||
sug:"Suggestions",
|
||||
no_sug:"No suggestions",
|
||||
no_mpell:"No misspellings found."
|
||||
},
|
||||
pagebreak:{
|
||||
desc:"Insert page break."
|
||||
}}});
|
@ -1,46 +1,51 @@
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
|
||||
* $Id$
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('autosave');
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.AutoSavePlugin', {
|
||||
init : function(ed, url) {
|
||||
var t = this;
|
||||
|
||||
var TinyMCE_AutoSavePlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Auto save',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
t.editor = ed;
|
||||
|
||||
// Private plugin internal methods
|
||||
window.onbeforeunload = tinymce.plugins.AutoSavePlugin._beforeUnloadHandler;
|
||||
},
|
||||
|
||||
_beforeUnloadHandler : function() {
|
||||
var n, inst, anyDirty = false, msg = tinyMCE.getLang("lang_autosave_unload_msg");
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Auto save',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
if (tinyMCE.getParam("fullscreen_is_enabled"))
|
||||
return;
|
||||
// Private plugin internal methods
|
||||
|
||||
for (n in tinyMCE.instances) {
|
||||
inst = tinyMCE.instances[n];
|
||||
'static' : {
|
||||
_beforeUnloadHandler : function() {
|
||||
var msg;
|
||||
|
||||
if (!tinyMCE.isInstance(inst))
|
||||
continue;
|
||||
tinymce.each(tinyMCE.editors, function(ed) {
|
||||
if (ed.getParam("fullscreen_is_enabled"))
|
||||
return;
|
||||
|
||||
if (ed.isDirty()) {
|
||||
msg = ed.getLang("autosave.unload_msg");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (inst.isDirty())
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
window.onbeforeunload = TinyMCE_AutoSavePlugin._beforeUnloadHandler;
|
||||
|
||||
tinyMCE.addPlugin("autosave", TinyMCE_AutoSavePlugin);
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSavePlugin);
|
||||
})();
|
@ -1,90 +1,79 @@
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
|
||||
* $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('directionality');
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.Directionality', {
|
||||
init : function(ed, url) {
|
||||
var t = this;
|
||||
|
||||
var TinyMCE_DirectionalityPlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Directionality',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
t.editor = ed;
|
||||
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "ltr":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_directionality_ltr_desc', '{$pluginurl}/images/ltr.gif', 'mceDirectionLTR');
|
||||
ed.addCommand('mceDirectionLTR', function() {
|
||||
var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
|
||||
|
||||
case "rtl":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_directionality_rtl_desc', '{$pluginurl}/images/rtl.gif', 'mceDirectionRTL');
|
||||
if (e) {
|
||||
if (ed.dom.getAttrib(e, "dir") != "ltr")
|
||||
ed.dom.setAttrib(e, "dir", "ltr");
|
||||
else
|
||||
ed.dom.setAttrib(e, "dir", "");
|
||||
}
|
||||
|
||||
ed.nodeChanged();
|
||||
});
|
||||
|
||||
ed.addCommand('mceDirectionRTL', function() {
|
||||
var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
|
||||
|
||||
if (e) {
|
||||
if (ed.dom.getAttrib(e, "dir") != "rtl")
|
||||
ed.dom.setAttrib(e, "dir", "rtl");
|
||||
else
|
||||
ed.dom.setAttrib(e, "dir", "");
|
||||
}
|
||||
|
||||
ed.nodeChanged();
|
||||
});
|
||||
|
||||
ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'});
|
||||
ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'});
|
||||
|
||||
ed.onNodeChange.add(t._nodeChange, t);
|
||||
},
|
||||
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Directionality',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
// Private methods
|
||||
|
||||
_nodeChange : function(ed, cm, n) {
|
||||
var dom = ed.dom, dir;
|
||||
|
||||
n = dom.getParent(n, dom.isBlock);
|
||||
if (!n) {
|
||||
cm.setDisabled('ltr', 1);
|
||||
cm.setDisabled('rtl', 1);
|
||||
return;
|
||||
}
|
||||
|
||||
dir = dom.getAttrib(n, 'dir');
|
||||
cm.setActive('ltr', dir == "ltr");
|
||||
cm.setDisabled('ltr', 0);
|
||||
cm.setActive('rtl', dir == "rtl");
|
||||
cm.setDisabled('rtl', 0);
|
||||
}
|
||||
});
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceDirectionLTR":
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
|
||||
|
||||
if (elm)
|
||||
elm.setAttribute("dir", "ltr");
|
||||
|
||||
tinyMCE.triggerNodeChange(false);
|
||||
return true;
|
||||
|
||||
case "mceDirectionRTL":
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
|
||||
|
||||
if (elm)
|
||||
elm.setAttribute("dir", "rtl");
|
||||
|
||||
tinyMCE.triggerNodeChange(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
},
|
||||
|
||||
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
function getAttrib(elm, name) {
|
||||
return elm.getAttribute(name) ? elm.getAttribute(name) : "";
|
||||
}
|
||||
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
var elm = tinyMCE.getParentElement(node, "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
|
||||
if (!elm) {
|
||||
tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonDisabled');
|
||||
tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonDisabled');
|
||||
return true;
|
||||
}
|
||||
|
||||
tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonNormal');
|
||||
tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonNormal');
|
||||
|
||||
var dir = getAttrib(elm, "dir");
|
||||
if (dir == "ltr" || dir == "")
|
||||
tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonSelected');
|
||||
else
|
||||
tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonSelected');
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCE.addPlugin("directionality", TinyMCE_DirectionalityPlugin);
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality);
|
||||
})();
|
@ -1,69 +1,69 @@
|
||||
/* Window classes */
|
||||
|
||||
.mceWindow {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border: 1px solid black;
|
||||
background-color: #D4D0C8;
|
||||
}
|
||||
|
||||
.mceWindowHead {
|
||||
background-color: #334F8D;
|
||||
width: 100%;
|
||||
height: 18px;
|
||||
cursor: move;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mceWindowBody {
|
||||
clear: both;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.mceWindowStatusbar {
|
||||
background-color: #D4D0C8;
|
||||
height: 12px;
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
|
||||
.mceWindowTitle {
|
||||
float: left;
|
||||
font-family: "MS Sans Serif";
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
line-height: 18px;
|
||||
color: white;
|
||||
margin-left: 2px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mceWindowHeadTools {
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.mceWindowClose, .mceWindowMinimize, .mceWindowMaximize {
|
||||
display: block;
|
||||
float: right;
|
||||
overflow: hidden;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.mceWindowClose {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.mceWindowMinimize {
|
||||
}
|
||||
|
||||
.mceWindowMaximize {
|
||||
}
|
||||
|
||||
.mceWindowResize {
|
||||
display: block;
|
||||
float: right;
|
||||
overflow: hidden;
|
||||
cursor: se-resize;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
/* Window classes */
|
||||
|
||||
.mceWindow {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border: 1px solid black;
|
||||
background-color: #D4D0C8;
|
||||
}
|
||||
|
||||
.mceWindowHead {
|
||||
background-color: #334F8D;
|
||||
width: 100%;
|
||||
height: 18px;
|
||||
cursor: move;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mceWindowBody {
|
||||
clear: both;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.mceWindowStatusbar {
|
||||
background-color: #D4D0C8;
|
||||
height: 12px;
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
|
||||
.mceWindowTitle {
|
||||
float: left;
|
||||
font-family: "MS Sans Serif";
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
line-height: 18px;
|
||||
color: white;
|
||||
margin-left: 2px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mceWindowHeadTools {
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.mceWindowClose, .mceWindowMinimize, .mceWindowMaximize {
|
||||
display: block;
|
||||
float: right;
|
||||
overflow: hidden;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.mceWindowClose {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.mceWindowMinimize {
|
||||
}
|
||||
|
||||
.mceWindowMaximize {
|
||||
}
|
||||
|
||||
.mceWindowResize {
|
||||
display: block;
|
||||
float: right;
|
||||
overflow: hidden;
|
||||
cursor: se-resize;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
After Width: | Height: | Size: 818 B |
After Width: | Height: | Size: 280 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 915 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 769 B |
After Width: | Height: | Size: 92 B |
@ -0,0 +1,87 @@
|
||||
/* Clearlooks 2 */
|
||||
|
||||
/* 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}
|
||||
.clearlooks2 {position:absolute}
|
||||
.clearlooks2 .wrapper {position:static}
|
||||
.mceEventBlocker {position:absolute; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
|
||||
.clearlooks2 .placeholder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; filter:alpha(opacity=50)}
|
||||
|
||||
/* Top */
|
||||
.clearlooks2 .top, .clearlooks2 .top div {top:0; width:100%; height:23px}
|
||||
.clearlooks2 .top .left {width:6px; background:url(img/corners.gif)}
|
||||
.clearlooks2 .top .center {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)}
|
||||
.clearlooks2 .top .right {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0}
|
||||
.clearlooks2 .top span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold}
|
||||
.clearlooks2 .focus .top .left {background:url(img/corners.gif) -6px 0}
|
||||
.clearlooks2 .focus .top .center {background:url(img/horizontal.gif) 0 -23px}
|
||||
.clearlooks2 .focus .top .right {background:url(img/corners.gif) -18px 0}
|
||||
.clearlooks2 .focus .top span {color:#FFF}
|
||||
|
||||
/* Middle */
|
||||
.clearlooks2 .middle, .clearlooks2 .middle div {top:0}
|
||||
.clearlooks2 .middle {width:100%; height:100%; clip:rect(23px auto auto auto)}
|
||||
.clearlooks2 .middle .left {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0}
|
||||
.clearlooks2 .middle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
|
||||
.clearlooks2 .middle .right {right:0; width:5px; height:100%; background:url(img/vertical.gif)}
|
||||
|
||||
/* Bottom */
|
||||
.clearlooks2 .bottom, .clearlooks2 .bottom div {height:6px}
|
||||
.clearlooks2 .bottom {left:0; bottom:0; width:100%}
|
||||
.clearlooks2 .bottom div {top:0}
|
||||
.clearlooks2 .bottom .left {left:0; width:5px; background:url(img/corners.gif) -34px -6px}
|
||||
.clearlooks2 .bottom .center {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px}
|
||||
.clearlooks2 .bottom .right {right:0; width:5px; background: url(img/corners.gif) -34px 0}
|
||||
.clearlooks2 .bottom span {display:none}
|
||||
.clearlooks2 .statusbar .bottom, .clearlooks2 .statusbar .bottom div {height:23px}
|
||||
.clearlooks2 .statusbar .bottom .left {background:url(img/corners.gif) -29px 0}
|
||||
.clearlooks2 .statusbar .bottom .center {background:url(img/horizontal.gif) 0 -52px}
|
||||
.clearlooks2 .statusbar .bottom .right {background:url(img/corners.gif) -24px 0}
|
||||
.clearlooks2 .statusbar .bottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
|
||||
|
||||
/* Actions */
|
||||
.clearlooks2 a {width:29px; height:16px; top:3px;}
|
||||
.clearlooks2 .close {right:6px; background:url(img/buttons.gif) -87px 0}
|
||||
.clearlooks2 .min {display:none; right:68px; background:url(img/buttons.gif) 0 0}
|
||||
.clearlooks2 .med {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
|
||||
.clearlooks2 .max {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
|
||||
.clearlooks2 .move {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
|
||||
.clearlooks2 .movable .move {display:block}
|
||||
.clearlooks2 .focus .close {right:6px; background:url(img/buttons.gif) -87px -16px}
|
||||
.clearlooks2 .focus .min {right:68px; background:url(img/buttons.gif) 0 -16px}
|
||||
.clearlooks2 .focus .med {right:37px; background:url(img/buttons.gif) -29px -16px}
|
||||
.clearlooks2 .focus .max {right:37px; background:url(img/buttons.gif) -58px -16px}
|
||||
.clearlooks2 .focus .close:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
|
||||
.clearlooks2 .focus .close:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
|
||||
.clearlooks2 .focus .min:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
|
||||
.clearlooks2 .focus .med:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
|
||||
.clearlooks2 .focus .max:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
|
||||
|
||||
/* Resize */
|
||||
.clearlooks2 .resize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
|
||||
.clearlooks2 .resizable .resize {display:block}
|
||||
.clearlooks2 .resizable .min, .clearlooks2 .max {display:none}
|
||||
.clearlooks2 .minimizable .min {display:block}
|
||||
.clearlooks2 .maximizable .max {display:block}
|
||||
.clearlooks2 .maximized .med {display:block}
|
||||
.clearlooks2 .maximized .max {display:none}
|
||||
.clearlooks2 a.resize-n {top:0; left:0; width:100%; cursor:n-resize}
|
||||
.clearlooks2 a.resize-nw {top:0; left:0; cursor:nw-resize}
|
||||
.clearlooks2 a.resize-ne {top:0; right:0; cursor:ne-resize}
|
||||
.clearlooks2 a.resize-w {top:0; left:0; height:100%; cursor:w-resize;}
|
||||
.clearlooks2 a.resize-e {top:0; right:0; height:100%; cursor:e-resize}
|
||||
.clearlooks2 a.resize-s {bottom:0; left:0; width:100%; cursor:s-resize}
|
||||
.clearlooks2 a.resize-sw {bottom:0; left:0; cursor:sw-resize}
|
||||
.clearlooks2 a.resize-se {bottom:0; right:0; cursor:se-resize}
|
||||
|
||||
/* Alert/Confirm */
|
||||
.clearlooks2 .button {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
|
||||
.clearlooks2 .middle .icon {left:15px; top:35px; width:32px; height:32px}
|
||||
.clearlooks2 .alert .middle span, .clearlooks2 .confirm .middle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
|
||||
.clearlooks2 a:hover {font-weight:bold;}
|
||||
.clearlooks2 .alert .middle, .clearlooks2 .confirm .middle {background:#D6D7D5}
|
||||
.clearlooks2 .alert .ok {left:50%; top:auto; margin-left: -40px}
|
||||
.clearlooks2 .alert .icon {background:url(img/alert.gif)}
|
||||
.clearlooks2 .confirm .ok {left:50%; top:auto; margin-left: -90px}
|
||||
.clearlooks2 .confirm .cancel {left:50%; top:auto}
|
||||
.clearlooks2 .confirm .icon {background:url(img/confirm.gif)}
|
387
wp-includes/js/tinymce/plugins/inlinepopups/template.htm
Normal file
@ -0,0 +1,387 @@
|
||||
<!-- <!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>Template for dialogs</title>
|
||||
<link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="mceEditor">
|
||||
<div class="clearlooks2" style="width:400px; height:100px; left:10px;">
|
||||
<div class="wrapper">
|
||||
<div class="top">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Blured</span>
|
||||
</div>
|
||||
|
||||
<div class="middle">
|
||||
<div class="left"></div>
|
||||
<span>Content</span>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
|
||||
<div class="bottom">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Statusbar text.</span>
|
||||
</div>
|
||||
|
||||
<a class="move" href="#"></a>
|
||||
<a class="min" href="#"></a>
|
||||
<a class="max" href="#"></a>
|
||||
<a class="med" href="#"></a>
|
||||
<a class="close" href="#"></a>
|
||||
<a class="resize resize-n" href="#"></a>
|
||||
<a class="resize resize-s" href="#"></a>
|
||||
<a class="resize resize-w" href="#"></a>
|
||||
<a class="resize resize-e" href="#"></a>
|
||||
<a class="resize resize-nw" href="#"></a>
|
||||
<a class="resize resize-ne" href="#"></a>
|
||||
<a class="resize resize-sw" href="#"></a>
|
||||
<a class="resize resize-se" href="#"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearlooks2" style="width:400px; height:100px; left:420px;">
|
||||
<div class="wrapper movable focus">
|
||||
<div class="top">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Focused</span>
|
||||
</div>
|
||||
|
||||
<div class="middle">
|
||||
<div class="left"></div>
|
||||
<span>Content</span>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
|
||||
<div class="bottom">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Statusbar text.</span>
|
||||
</div>
|
||||
|
||||
<a class="move" href="#"></a>
|
||||
<a class="min" href="#"></a>
|
||||
<a class="max" href="#"></a>
|
||||
<a class="med" href="#"></a>
|
||||
<a class="close" href="#"></a>
|
||||
<a class="resize resize-n" href="#"></a>
|
||||
<a class="resize resize-s" href="#"></a>
|
||||
<a class="resize resize-w" href="#"></a>
|
||||
<a class="resize resize-e" href="#"></a>
|
||||
<a class="resize resize-nw" href="#"></a>
|
||||
<a class="resize resize-ne" href="#"></a>
|
||||
<a class="resize resize-sw" href="#"></a>
|
||||
<a class="resize resize-se" href="#"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearlooks2" style="width:400px; height:100px; left:10px; top:120px;">
|
||||
<div class="wrapper movable focus statusbar">
|
||||
<div class="top">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Statusbar</span>
|
||||
</div>
|
||||
|
||||
<div class="middle">
|
||||
<div class="left"></div>
|
||||
<span>Content</span>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
|
||||
<div class="bottom">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Statusbar text.</span>
|
||||
</div>
|
||||
|
||||
<a class="move" href="#"></a>
|
||||
<a class="min" href="#"></a>
|
||||
<a class="max" href="#"></a>
|
||||
<a class="med" href="#"></a>
|
||||
<a class="close" href="#"></a>
|
||||
<a class="resize resize-n" href="#"></a>
|
||||
<a class="resize resize-s" href="#"></a>
|
||||
<a class="resize resize-w" href="#"></a>
|
||||
<a class="resize resize-e" href="#"></a>
|
||||
<a class="resize resize-nw" href="#"></a>
|
||||
<a class="resize resize-ne" href="#"></a>
|
||||
<a class="resize resize-sw" href="#"></a>
|
||||
<a class="resize resize-se" href="#"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearlooks2" style="width:400px; height:100px; left:420px; top:120px;">
|
||||
<div class="wrapper movable focus statusbar resizable">
|
||||
<div class="top">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Statusbar, Resizable</span>
|
||||
</div>
|
||||
|
||||
<div class="middle">
|
||||
<div class="left"></div>
|
||||
<span>Content</span>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
|
||||
<div class="bottom">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Statusbar text.</span>
|
||||
</div>
|
||||
|
||||
<a class="move" href="#"></a>
|
||||
<a class="min" href="#"></a>
|
||||
<a class="max" href="#"></a>
|
||||
<a class="med" href="#"></a>
|
||||
<a class="close" href="#"></a>
|
||||
<a class="resize resize-n" href="#"></a>
|
||||
<a class="resize resize-s" href="#"></a>
|
||||
<a class="resize resize-w" href="#"></a>
|
||||
<a class="resize resize-e" href="#"></a>
|
||||
<a class="resize resize-nw" href="#"></a>
|
||||
<a class="resize resize-ne" href="#"></a>
|
||||
<a class="resize resize-sw" href="#"></a>
|
||||
<a class="resize resize-se" href="#"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearlooks2" style="width:400px; height:100px; left:10px; top:230px;">
|
||||
<div class="wrapper movable focus resizable maximizable">
|
||||
<div class="top">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Resizable, Maximizable</span>
|
||||
</div>
|
||||
|
||||
<div class="middle">
|
||||
<div class="left"></div>
|
||||
<span>Content</span>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
|
||||
<div class="bottom">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Statusbar text.</span>
|
||||
</div>
|
||||
|
||||
<a class="move" href="#"></a>
|
||||
<a class="min" href="#"></a>
|
||||
<a class="max" href="#"></a>
|
||||
<a class="med" href="#"></a>
|
||||
<a class="close" href="#"></a>
|
||||
<a class="resize resize-n" href="#"></a>
|
||||
<a class="resize resize-s" href="#"></a>
|
||||
<a class="resize resize-w" href="#"></a>
|
||||
<a class="resize resize-e" href="#"></a>
|
||||
<a class="resize resize-nw" href="#"></a>
|
||||
<a class="resize resize-ne" href="#"></a>
|
||||
<a class="resize resize-sw" href="#"></a>
|
||||
<a class="resize resize-se" href="#"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearlooks2" style="width:400px; height:100px; left:420px; top:230px;">
|
||||
<div class="wrapper movable statusbar resizable maximizable">
|
||||
<div class="top">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Blurred, Maximizable, Statusbar, Resizable</span>
|
||||
</div>
|
||||
|
||||
<div class="middle">
|
||||
<div class="left"></div>
|
||||
<span>Content</span>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
|
||||
<div class="bottom">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Statusbar text.</span>
|
||||
</div>
|
||||
|
||||
<a class="move" href="#"></a>
|
||||
<a class="min" href="#"></a>
|
||||
<a class="max" href="#"></a>
|
||||
<a class="med" href="#"></a>
|
||||
<a class="close" href="#"></a>
|
||||
<a class="resize resize-n" href="#"></a>
|
||||
<a class="resize resize-s" href="#"></a>
|
||||
<a class="resize resize-w" href="#"></a>
|
||||
<a class="resize resize-e" href="#"></a>
|
||||
<a class="resize resize-nw" href="#"></a>
|
||||
<a class="resize resize-ne" href="#"></a>
|
||||
<a class="resize resize-sw" href="#"></a>
|
||||
<a class="resize resize-se" href="#"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearlooks2" style="width:400px; height:100px; left:10px; top:340px;">
|
||||
<div class="wrapper movable focus resizable maximized minimizable maximizable">
|
||||
<div class="top">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Maximized, Maximizable, Minimizable, Focused</span>
|
||||
</div>
|
||||
|
||||
<div class="middle">
|
||||
<div class="left"></div>
|
||||
<span>Content</span>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
|
||||
<div class="bottom">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Statusbar text.</span>
|
||||
</div>
|
||||
|
||||
<a class="move" href="#"></a>
|
||||
<a class="min" href="#"></a>
|
||||
<a class="max" href="#"></a>
|
||||
<a class="med" href="#"></a>
|
||||
<a class="close" href="#"></a>
|
||||
<a class="resize resize-n" href="#"></a>
|
||||
<a class="resize resize-s" href="#"></a>
|
||||
<a class="resize resize-w" href="#"></a>
|
||||
<a class="resize resize-e" href="#"></a>
|
||||
<a class="resize resize-nw" href="#"></a>
|
||||
<a class="resize resize-ne" href="#"></a>
|
||||
<a class="resize resize-sw" href="#"></a>
|
||||
<a class="resize resize-se" href="#"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearlooks2" style="width:400px; height:100px; left:420px; top:340px;">
|
||||
<div class="wrapper movable statusbar resizable maximized minimizable maximizable">
|
||||
<div class="top">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Maximized, Maximizable, Minimizable</span>
|
||||
</div>
|
||||
|
||||
<div class="middle">
|
||||
<div class="left"></div>
|
||||
<span>Content</span>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
|
||||
<div class="bottom">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Statusbar text.</span>
|
||||
</div>
|
||||
|
||||
<a class="move" href="#"></a>
|
||||
<a class="min" href="#"></a>
|
||||
<a class="med" href="#"></a>
|
||||
<a class="max" href="#"></a>
|
||||
<a class="close" href="#"></a>
|
||||
<a class="resize resize-n" href="#"></a>
|
||||
<a class="resize resize-s" href="#"></a>
|
||||
<a class="resize resize-w" href="#"></a>
|
||||
<a class="resize resize-e" href="#"></a>
|
||||
<a class="resize resize-nw" href="#"></a>
|
||||
<a class="resize resize-ne" href="#"></a>
|
||||
<a class="resize resize-sw" href="#"></a>
|
||||
<a class="resize resize-se" href="#"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearlooks2" style="width:400px; height:130px; left:10px; top:450px;">
|
||||
<div class="wrapper movable focus modal alert">
|
||||
<div class="top">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Alert</span>
|
||||
</div>
|
||||
|
||||
<div class="middle">
|
||||
<div class="left"></div>
|
||||
<span>
|
||||
This is a very long error message. This is a very long error message.
|
||||
This is a very long error message. This is a very long error message.
|
||||
This is a very long error message. This is a very long error message.
|
||||
This is a very long error message. This is a very long error message.
|
||||
This is a very long error message. This is a very long error message.
|
||||
This is a very long error message. This is a very long error message.
|
||||
</span>
|
||||
<div class="right"></div>
|
||||
<div class="icon"></div>
|
||||
</div>
|
||||
|
||||
<div class="bottom">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
|
||||
<a class="move" href="#"></a>
|
||||
<a class="button ok" href="#">Ok</a>
|
||||
<a class="close" href="#"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearlooks2" style="width:400px; height:130px; left:420px; top:450px;">
|
||||
<div class="wrapper movable focus modal confirm">
|
||||
<div class="top">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
<span>Confirm</span>
|
||||
</div>
|
||||
|
||||
<div class="middle">
|
||||
<div class="left"></div>
|
||||
<span>
|
||||
This is a very long error message. This is a very long error message.
|
||||
This is a very long error message. This is a very long error message.
|
||||
This is a very long error message. This is a very long error message.
|
||||
This is a very long error message. This is a very long error message.
|
||||
This is a very long error message. This is a very long error message.
|
||||
This is a very long error message. This is a very long error message.
|
||||
</span>
|
||||
<div class="right"></div>
|
||||
<div class="icon"></div>
|
||||
</div>
|
||||
|
||||
<div class="bottom">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
|
||||
<a class="move" href="#"></a>
|
||||
<a class="button ok" href="#">Ok</a>
|
||||
<a class="button cancel" href="#">Cancel</a>
|
||||
<a class="close" href="#"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
6
wp-includes/js/tinymce/plugins/media/css/content.css
Normal file
@ -0,0 +1,6 @@
|
||||
.mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc;}
|
||||
.mceItemShockWave {background-image: url(../img/shockwave.gif);}
|
||||
.mceItemFlash {background-image:url(../img/flash.gif);}
|
||||
.mceItemQuickTime {background-image:url(../img/quicktime.gif);}
|
||||
.mceItemWindowsMedia {background-image:url(../img/windowsmedia.gif);}
|
||||
.mceItemRealMedia {background-image:url(../img/realmedia.gif);}
|
68
wp-includes/js/tinymce/plugins/media/css/media.css
Normal file
@ -0,0 +1,68 @@
|
||||
#id, #name, #hspace, #vspace, #class_name, #align {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
#hspace, #vspace {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
#flash_base, #flash_flashvars {
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
#width, #height {
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
#src, #media_type {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
#class {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
#prev {
|
||||
margin: 0;
|
||||
border: 1px solid black;
|
||||
width: 99%;
|
||||
height: 230px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.panel_wrapper div.current {
|
||||
height: 390px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mceAddSelectValue {
|
||||
background-color: #DDDDDD;
|
||||
}
|
||||
|
||||
#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume {
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume {
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks {
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle {
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
#qt_qtsrc {
|
||||
width: 200px;
|
||||
}
|
323
wp-includes/js/tinymce/plugins/media/editor_plugin.js
Normal file
@ -0,0 +1,323 @@
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
(function() {
|
||||
var each = tinymce.each;
|
||||
|
||||
tinymce.create('tinymce.plugins.MediaPlugin', {
|
||||
init : function(ed, url) {
|
||||
var t = this;
|
||||
|
||||
t.editor = ed;
|
||||
t.url = url;
|
||||
|
||||
function isMediaElm(n) {
|
||||
return /^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);
|
||||
};
|
||||
|
||||
// Register commands
|
||||
ed.addCommand('mceMedia', function() {
|
||||
ed.windowManager.open({
|
||||
file : url + '/media.htm',
|
||||
width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
|
||||
height : 470 + parseInt(ed.getLang('media.delta_height', 0)),
|
||||
inline : 1
|
||||
}, {
|
||||
plugin_url : url
|
||||
});
|
||||
});
|
||||
|
||||
// Register buttons
|
||||
ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
|
||||
|
||||
ed.onNodeChange.add(function(ed, cm, n) {
|
||||
cm.setActive('media', n.nodeName == 'IMG' && isMediaElm(n));
|
||||
});
|
||||
|
||||
ed.onInit.add(function() {
|
||||
var lo = {
|
||||
mceItemFlash : 'flash',
|
||||
mceItemShockWave : 'shockwave',
|
||||
mceItemWindowsMedia : 'windowsmedia',
|
||||
mceItemQuickTime : 'quicktime',
|
||||
mceItemRealMedia : 'realmedia'
|
||||
};
|
||||
|
||||
ed.dom.loadCSS(url + "/css/content.css");
|
||||
|
||||
if (ed.theme.onResolveName) {
|
||||
ed.theme.onResolveName.add(function(th, o) {
|
||||
if (o.name == 'img') {
|
||||
each(lo, function(v, k) {
|
||||
if (ed.dom.hasClass(o.node, k)) {
|
||||
o.name = v;
|
||||
o.title = ed.dom.getAttrib(o.node, 'title');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (ed && ed.plugins.contextmenu) {
|
||||
ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
|
||||
if (e.nodeName == 'IMG' && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)) {
|
||||
m.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
ed.onBeforeSetContent.add(function(ed, o) {
|
||||
var h = o.content;
|
||||
|
||||
h = h.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi, function(a, b, c) {
|
||||
var o = eval("({" + c + "})");
|
||||
|
||||
return '<img class="mceItem' + b + '" title="' + ed.dom.encode(c) + '" src="' + url + '/img/trans.gif" width="' + o.width + '" height="' + o.height + '" />'
|
||||
});
|
||||
|
||||
h = h.replace(/<object([^>]*)>/gi, '<div class="mceItemObject" $1>');
|
||||
h = h.replace(/<embed([^>]*)>/gi, '<div class="mceItemEmbed" $1>');
|
||||
h = h.replace(/<\/(object|embed)([^>]*)>/gi, '</div>');
|
||||
h = h.replace(/<param([^>]*)>/gi, function(a, b) {return '<div ' + b.replace(/value=/g, '_value=') + ' class="mceItemParam"></div>'});
|
||||
h = h.replace(/\/ class=\"mceItemParam\"><\/div>/gi, 'class="mceItemParam"></div>');
|
||||
|
||||
o.content = h;
|
||||
});
|
||||
|
||||
ed.onSetContent.add(function() {
|
||||
t._divsToImgs(ed.getBody());
|
||||
});
|
||||
|
||||
ed.onPreProcess.add(function(ed, o) {
|
||||
var dom = ed.dom;
|
||||
|
||||
if (o.set) {
|
||||
t._divsToImgs(o.node);
|
||||
|
||||
each(dom.select('IMG', o.node), function(n) {
|
||||
var p;
|
||||
|
||||
if (isMediaElm(n)) {
|
||||
p = t._parse(n.title);
|
||||
dom.setAttrib(n, 'width', dom.getAttrib(n, 'width', p.width || 100));
|
||||
dom.setAttrib(n, 'height', dom.getAttrib(n, 'height', p.height || 100));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (o.get) {
|
||||
each(dom.select('IMG', o.node), function(n) {
|
||||
var ci, cb, mt;
|
||||
|
||||
if (ed.getParam('media_use_script')) {
|
||||
if (isMediaElm(n))
|
||||
n.className = n.className.replace(/mceItem/g, 'mceTemp');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
switch (n.className) {
|
||||
case 'mceItemFlash':
|
||||
ci = 'd27cdb6e-ae6d-11cf-96b8-444553540000';
|
||||
cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
|
||||
mt = 'application/x-shockwave-flash';
|
||||
break;
|
||||
|
||||
case 'mceItemShockWave':
|
||||
ci = '166b1bca-3f9c-11cf-8075-444553540000';
|
||||
cb = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
|
||||
mt = 'application/x-director';
|
||||
break;
|
||||
|
||||
case 'mceItemWindowsMedia':
|
||||
ci = ed.getParam('media_wmp6_compatible') ? '05589fa1-c356-11ce-bf01-00aa0055595a' : '6bf52a52-394a-11d3-b153-00c04f79faa6';
|
||||
cb = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
|
||||
mt = 'application/x-mplayer2';
|
||||
break;
|
||||
|
||||
case 'mceItemQuickTime':
|
||||
ci = '02bf25d5-8c17-4b23-bc80-d3488abddc6b';
|
||||
cb = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
|
||||
mt = 'video/quicktime';
|
||||
break;
|
||||
|
||||
case 'mceItemRealMedia':
|
||||
ci = 'cfcdaa03-8be4-11cf-b84b-0020afbbccfa';
|
||||
cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
|
||||
mt = 'audio/x-pn-realaudio-plugin';
|
||||
break;
|
||||
}
|
||||
|
||||
if (ci) {
|
||||
dom.replace(t._buildObj({
|
||||
classid : ci,
|
||||
codebase : cb,
|
||||
type : mt
|
||||
}, n), n);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
ed.onPostProcess.add(function(ed, o) {
|
||||
o.content = o.content.replace(/_value=/g, 'value=');
|
||||
});
|
||||
|
||||
if (ed.getParam('media_use_script')) {
|
||||
function getAttr(s, n) {
|
||||
n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s);
|
||||
|
||||
return n ? ed.dom.decode(n[1]) : '';
|
||||
};
|
||||
|
||||
ed.onPostProcess.add(function(ed, o) {
|
||||
o.content = o.content.replace(/<img[^>]+>/g, function(im) {
|
||||
var cl = getAttr(im, 'class');
|
||||
|
||||
if (/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)) {
|
||||
at = t._parse(getAttr(im, 'title'));
|
||||
at.width = getAttr(im, 'width');
|
||||
at.height = getAttr(im, 'height');
|
||||
im = '<script type="text/javascript">write' + cl.substring(7) + '({' + t._serialize(at) + '});</script>';
|
||||
}
|
||||
|
||||
return im;
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Media',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
// Private methods
|
||||
|
||||
_buildObj : function(o, n) {
|
||||
var ob, ed = this.editor, dom = ed.dom, p = this._parse(n.title);
|
||||
|
||||
p.width = o.width = dom.getAttrib(n, 'width') || 100;
|
||||
p.height = o.height = dom.getAttrib(n, 'height') || 100;
|
||||
|
||||
ob = dom.create('div', {
|
||||
mce_name : 'object',
|
||||
classid : "clsid:" + o.classid,
|
||||
codebase : o.codebase,
|
||||
width : o.width,
|
||||
height : o.height
|
||||
});
|
||||
|
||||
if (p.src)
|
||||
p.src = ed.convertURL(p.src, 'src', n);
|
||||
|
||||
each (p, function(v, k) {
|
||||
if (v && !/^(width|height|codebase|classid)$/.test(k))
|
||||
dom.add(ob, 'div', {mce_name : 'param', name : k, '_value' : v});
|
||||
});
|
||||
|
||||
dom.add(ob, 'div', tinymce.extend({mce_name : 'embed', type : o.type}, p));
|
||||
|
||||
return ob;
|
||||
},
|
||||
|
||||
_divsToImgs : function(p) {
|
||||
var t = this, dom = t.editor.dom, im, ci;
|
||||
|
||||
each(dom.select('div', p), function(n) {
|
||||
// Convert object into image
|
||||
if (dom.getAttrib(n, 'class') == 'mceItemObject') {
|
||||
ci = dom.getAttrib(n, "classid").toLowerCase().replace(/\s+/g, '');
|
||||
|
||||
switch (ci) {
|
||||
case 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':
|
||||
dom.replace(t._createImg('mceItemFlash', n), n);
|
||||
break;
|
||||
|
||||
case 'clsid:166b1bca-3f9c-11cf-8075-444553540000':
|
||||
dom.replace(t._createImg('mceItemShockWave', n), n);
|
||||
break;
|
||||
|
||||
case 'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':
|
||||
case 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':
|
||||
case 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':
|
||||
dom.replace(t._createImg('mceItemWindowsMedia', n), n);
|
||||
break;
|
||||
|
||||
case 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':
|
||||
dom.replace(t._createImg('mceItemQuickTime', n), n);
|
||||
break;
|
||||
|
||||
case 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':
|
||||
dom.replace(t._createImg('mceItemRealMedia', n), n);
|
||||
break;
|
||||
|
||||
default:
|
||||
dom.replace(t._createImg('mceItemFlash', n), n);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_createImg : function(cl, n) {
|
||||
var im, dom = this.editor.dom, pa = {}, ti = '';
|
||||
|
||||
// Create image
|
||||
im = dom.create('img', {
|
||||
src : this.url + '/img/trans.gif',
|
||||
width : dom.getAttrib(n, 'width') || 100,
|
||||
height : dom.getAttrib(n, 'height') || 100,
|
||||
'class' : cl
|
||||
});
|
||||
|
||||
// Setup base parameters
|
||||
each(['id', 'name', 'width', 'height', 'bgcolor', 'align'], function(n) {
|
||||
var v = dom.getAttrib(n, 'align');
|
||||
|
||||
if (v)
|
||||
pa[v] = v;
|
||||
});
|
||||
|
||||
// Add optional parameters
|
||||
each(dom.select('div', n), function(n) {
|
||||
if (dom.hasClass(n, 'mceItemParam'))
|
||||
pa[dom.getAttrib(n, 'name')] = dom.getAttrib(n, '_value');
|
||||
});
|
||||
|
||||
// Use src not movie
|
||||
if (pa.movie) {
|
||||
pa.src = pa.movie;
|
||||
delete pa.movie;
|
||||
}
|
||||
|
||||
delete pa.width;
|
||||
delete pa.height;
|
||||
|
||||
im.title = this._serialize(pa);
|
||||
|
||||
return im;
|
||||
},
|
||||
|
||||
_parse : function(s) {
|
||||
return tinymce.util.JSON.parse('{' + s + '}');
|
||||
},
|
||||
|
||||
_serialize : function(o) {
|
||||
return tinymce.util.JSON.serialize(o).replace(/[{}]/g, '');
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
|
||||
})();
|
BIN
wp-includes/js/tinymce/plugins/media/img/flash.gif
Normal file
After Width: | Height: | Size: 241 B |
BIN
wp-includes/js/tinymce/plugins/media/img/flv_player.swf
Normal file
BIN
wp-includes/js/tinymce/plugins/media/img/quicktime.gif
Normal file
After Width: | Height: | Size: 303 B |
BIN
wp-includes/js/tinymce/plugins/media/img/realmedia.gif
Normal file
After Width: | Height: | Size: 439 B |
BIN
wp-includes/js/tinymce/plugins/media/img/shockwave.gif
Normal file
After Width: | Height: | Size: 387 B |
BIN
wp-includes/js/tinymce/plugins/media/img/trans.gif
Normal file
After Width: | Height: | Size: 43 B |
BIN
wp-includes/js/tinymce/plugins/media/img/windowsmedia.gif
Normal file
After Width: | Height: | Size: 415 B |
73
wp-includes/js/tinymce/plugins/media/js/embed.js
Normal file
@ -0,0 +1,73 @@
|
||||
/**
|
||||
* This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
|
||||
*/
|
||||
|
||||
function writeFlash(p) {
|
||||
writeEmbed(
|
||||
'D27CDB6E-AE6D-11cf-96B8-444553540000',
|
||||
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
|
||||
'application/x-shockwave-flash',
|
||||
p
|
||||
);
|
||||
}
|
||||
|
||||
function writeShockWave(p) {
|
||||
writeEmbed(
|
||||
'166B1BCA-3F9C-11CF-8075-444553540000',
|
||||
'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
|
||||
'application/x-director',
|
||||
p
|
||||
);
|
||||
}
|
||||
|
||||
function writeQuickTime(p) {
|
||||
writeEmbed(
|
||||
'02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
|
||||
'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
|
||||
'video/quicktime',
|
||||
p
|
||||
);
|
||||
}
|
||||
|
||||
function writeRealMedia(p) {
|
||||
writeEmbed(
|
||||
'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
|
||||
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
|
||||
'audio/x-pn-realaudio-plugin',
|
||||
p
|
||||
);
|
||||
}
|
||||
|
||||
function writeWindowsMedia(p) {
|
||||
p.url = p.src;
|
||||
writeEmbed(
|
||||
'6BF52A52-394A-11D3-B153-00C04F79FAA6',
|
||||
'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
|
||||
'application/x-mplayer2',
|
||||
p
|
||||
);
|
||||
}
|
||||
|
||||
function writeEmbed(cls, cb, mt, p) {
|
||||
var h = '', n;
|
||||
|
||||
h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
|
||||
h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
|
||||
h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
|
||||
h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
|
||||
h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
|
||||
h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
|
||||
h += '>';
|
||||
|
||||
for (n in p)
|
||||
h += '<param name="' + n + '" value="' + p[n] + '">';
|
||||
|
||||
h += '<embed type="' + mt + '"';
|
||||
|
||||
for (n in p)
|
||||
h += n + '="' + p[n] + '" ';
|
||||
|
||||
h += '></embed></object>';
|
||||
|
||||
document.write(h);
|
||||
}
|
616
wp-includes/js/tinymce/plugins/media/js/media.js
Normal file
@ -0,0 +1,616 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var oldWidth, oldHeight, ed, url;
|
||||
|
||||
if (url = tinyMCEPopup.getParam("media_external_list_url"))
|
||||
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
||||
|
||||
function init() {
|
||||
var pl = "", f, val;
|
||||
var type = "flash", fe, i;
|
||||
|
||||
ed = tinyMCEPopup.editor;
|
||||
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
f = document.forms[0]
|
||||
|
||||
fe = ed.selection.getNode();
|
||||
if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) {
|
||||
pl = "x={" + fe.title + "};";
|
||||
|
||||
switch (ed.dom.getAttrib(fe, 'class')) {
|
||||
case 'mceItemFlash':
|
||||
type = 'flash';
|
||||
break;
|
||||
|
||||
case 'mceItemFlashVideo':
|
||||
type = 'flv';
|
||||
break;
|
||||
|
||||
case 'mceItemShockWave':
|
||||
type = 'shockwave';
|
||||
break;
|
||||
|
||||
case 'mceItemWindowsMedia':
|
||||
type = 'wmp';
|
||||
break;
|
||||
|
||||
case 'mceItemQuickTime':
|
||||
type = 'qt';
|
||||
break;
|
||||
|
||||
case 'mceItemRealMedia':
|
||||
type = 'rmp';
|
||||
break;
|
||||
}
|
||||
|
||||
document.forms[0].insert.value = ed.getLang('update', 'Insert', true);
|
||||
}
|
||||
|
||||
document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
|
||||
document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media');
|
||||
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
||||
|
||||
var html = getMediaListHTML('medialist','src','media','media');
|
||||
if (html == "")
|
||||
document.getElementById("linklistrow").style.display = 'none';
|
||||
else
|
||||
document.getElementById("linklistcontainer").innerHTML = html;
|
||||
|
||||
// Resize some elements
|
||||
if (isVisible('filebrowser'))
|
||||
document.getElementById('src').style.width = '230px';
|
||||
|
||||
// Setup form
|
||||
if (pl != "") {
|
||||
pl = eval(pl);
|
||||
|
||||
switch (type) {
|
||||
case "flash":
|
||||
setBool(pl, 'flash', 'play');
|
||||
setBool(pl, 'flash', 'loop');
|
||||
setBool(pl, 'flash', 'menu');
|
||||
setBool(pl, 'flash', 'swliveconnect');
|
||||
setStr(pl, 'flash', 'quality');
|
||||
setStr(pl, 'flash', 'scale');
|
||||
setStr(pl, 'flash', 'salign');
|
||||
setStr(pl, 'flash', 'wmode');
|
||||
setStr(pl, 'flash', 'base');
|
||||
setStr(pl, 'flash', 'flashvars');
|
||||
break;
|
||||
|
||||
case "qt":
|
||||
setBool(pl, 'qt', 'loop');
|
||||
setBool(pl, 'qt', 'autoplay');
|
||||
setBool(pl, 'qt', 'cache');
|
||||
setBool(pl, 'qt', 'controller');
|
||||
setBool(pl, 'qt', 'correction');
|
||||
setBool(pl, 'qt', 'enablejavascript');
|
||||
setBool(pl, 'qt', 'kioskmode');
|
||||
setBool(pl, 'qt', 'autohref');
|
||||
setBool(pl, 'qt', 'playeveryframe');
|
||||
setBool(pl, 'qt', 'tarsetcache');
|
||||
setStr(pl, 'qt', 'scale');
|
||||
setStr(pl, 'qt', 'starttime');
|
||||
setStr(pl, 'qt', 'endtime');
|
||||
setStr(pl, 'qt', 'tarset');
|
||||
setStr(pl, 'qt', 'qtsrcchokespeed');
|
||||
setStr(pl, 'qt', 'volume');
|
||||
setStr(pl, 'qt', 'qtsrc');
|
||||
break;
|
||||
|
||||
case "shockwave":
|
||||
setBool(pl, 'shockwave', 'sound');
|
||||
setBool(pl, 'shockwave', 'progress');
|
||||
setBool(pl, 'shockwave', 'autostart');
|
||||
setBool(pl, 'shockwave', 'swliveconnect');
|
||||
setStr(pl, 'shockwave', 'swvolume');
|
||||
setStr(pl, 'shockwave', 'swstretchstyle');
|
||||
setStr(pl, 'shockwave', 'swstretchhalign');
|
||||
setStr(pl, 'shockwave', 'swstretchvalign');
|
||||
break;
|
||||
|
||||
case "wmp":
|
||||
setBool(pl, 'wmp', 'autostart');
|
||||
setBool(pl, 'wmp', 'enabled');
|
||||
setBool(pl, 'wmp', 'enablecontextmenu');
|
||||
setBool(pl, 'wmp', 'fullscreen');
|
||||
setBool(pl, 'wmp', 'invokeurls');
|
||||
setBool(pl, 'wmp', 'mute');
|
||||
setBool(pl, 'wmp', 'stretchtofit');
|
||||
setBool(pl, 'wmp', 'windowlessvideo');
|
||||
setStr(pl, 'wmp', 'balance');
|
||||
setStr(pl, 'wmp', 'baseurl');
|
||||
setStr(pl, 'wmp', 'captioningid');
|
||||
setStr(pl, 'wmp', 'currentmarker');
|
||||
setStr(pl, 'wmp', 'currentposition');
|
||||
setStr(pl, 'wmp', 'defaultframe');
|
||||
setStr(pl, 'wmp', 'playcount');
|
||||
setStr(pl, 'wmp', 'rate');
|
||||
setStr(pl, 'wmp', 'uimode');
|
||||
setStr(pl, 'wmp', 'volume');
|
||||
break;
|
||||
|
||||
case "rmp":
|
||||
setBool(pl, 'rmp', 'autostart');
|
||||
setBool(pl, 'rmp', 'loop');
|
||||
setBool(pl, 'rmp', 'autogotourl');
|
||||
setBool(pl, 'rmp', 'center');
|
||||
setBool(pl, 'rmp', 'imagestatus');
|
||||
setBool(pl, 'rmp', 'maintainaspect');
|
||||
setBool(pl, 'rmp', 'nojava');
|
||||
setBool(pl, 'rmp', 'prefetch');
|
||||
setBool(pl, 'rmp', 'shuffle');
|
||||
setStr(pl, 'rmp', 'console');
|
||||
setStr(pl, 'rmp', 'controls');
|
||||
setStr(pl, 'rmp', 'numloop');
|
||||
setStr(pl, 'rmp', 'scriptcallbacks');
|
||||
break;
|
||||
}
|
||||
|
||||
setStr(pl, null, 'src');
|
||||
setStr(pl, null, 'id');
|
||||
setStr(pl, null, 'name');
|
||||
setStr(pl, null, 'vspace');
|
||||
setStr(pl, null, 'hspace');
|
||||
setStr(pl, null, 'bgcolor');
|
||||
setStr(pl, null, 'align');
|
||||
setStr(pl, null, 'width');
|
||||
setStr(pl, null, 'height');
|
||||
|
||||
if ((val = ed.dom.getAttrib(fe, "width")) != "")
|
||||
pl.width = f.width.value = val;
|
||||
|
||||
if ((val = ed.dom.getAttrib(fe, "height")) != "")
|
||||
pl.height = f.height.value = val;
|
||||
|
||||
oldWidth = pl.width ? parseInt(pl.width) : 0;
|
||||
oldHeight = pl.height ? parseInt(pl.height) : 0;
|
||||
} else
|
||||
oldWidth = oldHeight = 0;
|
||||
|
||||
selectByValue(f, 'media_type', type);
|
||||
changedType(type);
|
||||
updateColor('bgcolor_pick', 'bgcolor');
|
||||
|
||||
TinyMCE_EditableSelects.init();
|
||||
generatePreview();
|
||||
}
|
||||
|
||||
function insertMedia() {
|
||||
var fe, f = document.forms[0], h;
|
||||
|
||||
if (!AutoValidator.validate(f)) {
|
||||
alert(ed.getLang('invalid_data'));
|
||||
return false;
|
||||
}
|
||||
|
||||
f.width.value = f.width.value == "" ? 100 : f.width.value;
|
||||
f.height.value = f.height.value == "" ? 100 : f.height.value;
|
||||
|
||||
fe = ed.selection.getNode();
|
||||
if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) {
|
||||
switch (f.media_type.options[f.media_type.selectedIndex].value) {
|
||||
case "flash":
|
||||
fe.className = "mceItemFlash";
|
||||
break;
|
||||
|
||||
case "flv":
|
||||
fe.className = "mceItemFlashVideo";
|
||||
break;
|
||||
|
||||
case "shockwave":
|
||||
fe.className = "mceItemShockWave";
|
||||
break;
|
||||
|
||||
case "qt":
|
||||
fe.className = "mceItemQuickTime";
|
||||
break;
|
||||
|
||||
case "wmp":
|
||||
fe.className = "mceItemWindowsMedia";
|
||||
break;
|
||||
|
||||
case "rmp":
|
||||
fe.className = "mceItemRealMedia";
|
||||
break;
|
||||
}
|
||||
|
||||
if (fe.width != f.width.value || fe.height != f.height.height)
|
||||
ed.execCommand('mceRepaint');
|
||||
|
||||
fe.title = serializeParameters();
|
||||
fe.width = f.width.value;
|
||||
fe.height = f.height.value;
|
||||
fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : '');
|
||||
fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : '');
|
||||
fe.align = f.align.options[f.align.selectedIndex].value;
|
||||
} else {
|
||||
h = '<img src="' + tinyMCEPopup.getWindowArg("plugin_url") + '/img/trans.gif"' ;
|
||||
|
||||
switch (f.media_type.options[f.media_type.selectedIndex].value) {
|
||||
case "flash":
|
||||
h += ' class="mceItemFlash"';
|
||||
break;
|
||||
|
||||
case "flv":
|
||||
h += ' class="mceItemFlashVideo"';
|
||||
break;
|
||||
|
||||
case "shockwave":
|
||||
h += ' class="mceItemShockWave"';
|
||||
break;
|
||||
|
||||
case "qt":
|
||||
h += ' class="mceItemQuickTime"';
|
||||
break;
|
||||
|
||||
case "wmp":
|
||||
h += ' class="mceItemWindowsMedia"';
|
||||
break;
|
||||
|
||||
case "rmp":
|
||||
h += ' class="mceItemRealMedia"';
|
||||
break;
|
||||
}
|
||||
|
||||
h += ' title="' + serializeParameters() + '"';
|
||||
h += ' width="' + f.width.value + '"';
|
||||
h += ' height="' + f.height.value + '"';
|
||||
h += ' align="' + f.align.options[f.align.selectedIndex].value + '"';
|
||||
|
||||
h += ' />';
|
||||
|
||||
ed.execCommand('mceInsertContent', false, h);
|
||||
}
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function updatePreview() {
|
||||
var f = document.forms[0], type;
|
||||
|
||||
f.width.value = f.width.value || '320';
|
||||
f.height.value = f.height.value || '240';
|
||||
|
||||
type = getType(f.src.value);
|
||||
selectByValue(f, 'media_type', type);
|
||||
changedType(type);
|
||||
generatePreview();
|
||||
}
|
||||
|
||||
function getMediaListHTML() {
|
||||
if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
|
||||
var html = "";
|
||||
|
||||
html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;updatePreview();">';
|
||||
html += '<option value="">---</option>';
|
||||
|
||||
for (var i=0; i<tinyMCEMediaList.length; i++)
|
||||
html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
|
||||
|
||||
html += '</select>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function getType(v) {
|
||||
var fo, i, c, el, x, f = document.forms[0];
|
||||
|
||||
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=(.+)(.*)/)) {
|
||||
f.width.value = '425';
|
||||
f.height.value = '350';
|
||||
f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1];
|
||||
return 'flash';
|
||||
}
|
||||
|
||||
// Google video
|
||||
if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) {
|
||||
f.width.value = '425';
|
||||
f.height.value = '326';
|
||||
f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en';
|
||||
return 'flash';
|
||||
}
|
||||
|
||||
for (i=0; i<fo.length; i++) {
|
||||
c = fo[i].split('=');
|
||||
|
||||
el = c[1].split(',');
|
||||
for (x=0; x<el.length; x++)
|
||||
if (v.indexOf('.' + el[x]) != -1)
|
||||
return c[0];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function switchType(v) {
|
||||
var t = getType(v), d = document, f = d.forms[0];
|
||||
|
||||
if (!t)
|
||||
return;
|
||||
|
||||
selectByValue(d.forms[0], 'media_type', t);
|
||||
changedType(t);
|
||||
|
||||
// Update qtsrc also
|
||||
if (t == 'qt' && f.src.value.toLowerCase().indexOf('rtsp://') != -1) {
|
||||
alert(ed.getLang("media_qt_stream_warn"));
|
||||
|
||||
if (f.qt_qtsrc.value == '')
|
||||
f.qt_qtsrc.value = f.src.value;
|
||||
}
|
||||
}
|
||||
|
||||
function changedType(t) {
|
||||
var d = document;
|
||||
|
||||
d.getElementById('flash_options').style.display = 'none';
|
||||
d.getElementById('flv_options').style.display = 'none';
|
||||
d.getElementById('qt_options').style.display = 'none';
|
||||
d.getElementById('shockwave_options').style.display = 'none';
|
||||
d.getElementById('wmp_options').style.display = 'none';
|
||||
d.getElementById('rmp_options').style.display = 'none';
|
||||
d.getElementById(t + '_options').style.display = 'block';
|
||||
}
|
||||
|
||||
function serializeParameters() {
|
||||
var d = document, f = d.forms[0], s = '';
|
||||
|
||||
switch (f.media_type.options[f.media_type.selectedIndex].value) {
|
||||
case "flash":
|
||||
s += getBool('flash', 'play', true);
|
||||
s += getBool('flash', 'loop', true);
|
||||
s += getBool('flash', 'menu', true);
|
||||
s += getBool('flash', 'swliveconnect', false);
|
||||
s += getStr('flash', 'quality');
|
||||
s += getStr('flash', 'scale');
|
||||
s += getStr('flash', 'salign');
|
||||
s += getStr('flash', 'wmode');
|
||||
s += getStr('flash', 'base');
|
||||
s += getStr('flash', 'flashvars');
|
||||
break;
|
||||
|
||||
case "qt":
|
||||
s += getBool('qt', 'loop', false);
|
||||
s += getBool('qt', 'autoplay', true);
|
||||
s += getBool('qt', 'cache', false);
|
||||
s += getBool('qt', 'controller', true);
|
||||
s += getBool('qt', 'correction', false, 'none', 'full');
|
||||
s += getBool('qt', 'enablejavascript', false);
|
||||
s += getBool('qt', 'kioskmode', false);
|
||||
s += getBool('qt', 'autohref', false);
|
||||
s += getBool('qt', 'playeveryframe', false);
|
||||
s += getBool('qt', 'targetcache', false);
|
||||
s += getStr('qt', 'scale');
|
||||
s += getStr('qt', 'starttime');
|
||||
s += getStr('qt', 'endtime');
|
||||
s += getStr('qt', 'target');
|
||||
s += getStr('qt', 'qtsrcchokespeed');
|
||||
s += getStr('qt', 'volume');
|
||||
s += getStr('qt', 'qtsrc');
|
||||
break;
|
||||
|
||||
case "shockwave":
|
||||
s += getBool('shockwave', 'sound');
|
||||
s += getBool('shockwave', 'progress');
|
||||
s += getBool('shockwave', 'autostart');
|
||||
s += getBool('shockwave', 'swliveconnect');
|
||||
s += getStr('shockwave', 'swvolume');
|
||||
s += getStr('shockwave', 'swstretchstyle');
|
||||
s += getStr('shockwave', 'swstretchhalign');
|
||||
s += getStr('shockwave', 'swstretchvalign');
|
||||
break;
|
||||
|
||||
case "wmp":
|
||||
s += getBool('wmp', 'autostart', true);
|
||||
s += getBool('wmp', 'enabled', false);
|
||||
s += getBool('wmp', 'enablecontextmenu', true);
|
||||
s += getBool('wmp', 'fullscreen', false);
|
||||
s += getBool('wmp', 'invokeurls', true);
|
||||
s += getBool('wmp', 'mute', false);
|
||||
s += getBool('wmp', 'stretchtofit', false);
|
||||
s += getBool('wmp', 'windowlessvideo', false);
|
||||
s += getStr('wmp', 'balance');
|
||||
s += getStr('wmp', 'baseurl');
|
||||
s += getStr('wmp', 'captioningid');
|
||||
s += getStr('wmp', 'currentmarker');
|
||||
s += getStr('wmp', 'currentposition');
|
||||
s += getStr('wmp', 'defaultframe');
|
||||
s += getStr('wmp', 'playcount');
|
||||
s += getStr('wmp', 'rate');
|
||||
s += getStr('wmp', 'uimode');
|
||||
s += getStr('wmp', 'volume');
|
||||
break;
|
||||
|
||||
case "rmp":
|
||||
s += getBool('rmp', 'autostart', false);
|
||||
s += getBool('rmp', 'loop', false);
|
||||
s += getBool('rmp', 'autogotourl', true);
|
||||
s += getBool('rmp', 'center', false);
|
||||
s += getBool('rmp', 'imagestatus', true);
|
||||
s += getBool('rmp', 'maintainaspect', false);
|
||||
s += getBool('rmp', 'nojava', false);
|
||||
s += getBool('rmp', 'prefetch', false);
|
||||
s += getBool('rmp', 'shuffle', false);
|
||||
s += getStr('rmp', 'console');
|
||||
s += getStr('rmp', 'controls');
|
||||
s += getStr('rmp', 'numloop');
|
||||
s += getStr('rmp', 'scriptcallbacks');
|
||||
break;
|
||||
}
|
||||
|
||||
s += getStr(null, 'id');
|
||||
s += getStr(null, 'name');
|
||||
s += getStr(null, 'src');
|
||||
s += getStr(null, 'align');
|
||||
s += getStr(null, 'bgcolor');
|
||||
s += getInt(null, 'vspace');
|
||||
s += getInt(null, 'hspace');
|
||||
s += getStr(null, 'width');
|
||||
s += getStr(null, 'height');
|
||||
|
||||
s = s.length > 0 ? s.substring(0, s.length - 1) : s;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
function setBool(pl, p, n) {
|
||||
if (typeof(pl[n]) == "undefined")
|
||||
return;
|
||||
|
||||
document.forms[0].elements[p + "_" + n].checked = pl[n];
|
||||
}
|
||||
|
||||
function setStr(pl, p, n) {
|
||||
var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n];
|
||||
|
||||
if (typeof(pl[n]) == "undefined")
|
||||
return;
|
||||
|
||||
if (e.type == "text")
|
||||
e.value = pl[n];
|
||||
else
|
||||
selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]);
|
||||
}
|
||||
|
||||
function getBool(p, n, d, tv, fv) {
|
||||
var v = document.forms[0].elements[p + "_" + n].checked;
|
||||
|
||||
tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'";
|
||||
fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'";
|
||||
|
||||
return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ',');
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',");
|
||||
}
|
||||
|
||||
function getInt(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;
|
||||
|
||||
return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ",");
|
||||
}
|
||||
|
||||
function jsEncode(s) {
|
||||
s = s.replace(new RegExp('\\\\', 'g'), '\\\\');
|
||||
s = s.replace(new RegExp('"', 'g'), '\\"');
|
||||
s = s.replace(new RegExp("'", 'g'), "\\'");
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
function generatePreview(c) {
|
||||
var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh;
|
||||
|
||||
p.innerHTML = '<!-- x --->';
|
||||
|
||||
nw = parseInt(f.width.value);
|
||||
nh = parseInt(f.height.value);
|
||||
|
||||
if (f.width.value != "" && f.height.value != "") {
|
||||
if (f.constrain.checked) {
|
||||
if (c == 'width' && oldWidth != 0) {
|
||||
wp = nw / oldWidth;
|
||||
nh = Math.round(wp * nh);
|
||||
f.height.value = nh;
|
||||
} else if (c == 'height' && oldHeight != 0) {
|
||||
hp = nh / oldHeight;
|
||||
nw = Math.round(hp * nw);
|
||||
f.width.value = nw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (f.width.value != "")
|
||||
oldWidth = nw;
|
||||
|
||||
if (f.height.value != "")
|
||||
oldHeight = nh;
|
||||
|
||||
// After constrain
|
||||
pl = serializeParameters();
|
||||
|
||||
switch (f.media_type.options[f.media_type.selectedIndex].value) {
|
||||
case "flash":
|
||||
cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';
|
||||
codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
|
||||
type = 'application/x-shockwave-flash';
|
||||
break;
|
||||
|
||||
case "shockwave":
|
||||
cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000';
|
||||
codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
|
||||
type = 'application/x-director';
|
||||
break;
|
||||
|
||||
case "qt":
|
||||
cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';
|
||||
codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
|
||||
type = 'video/quicktime';
|
||||
break;
|
||||
|
||||
case "wmp":
|
||||
cls = ed.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6';
|
||||
codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
|
||||
type = 'application/x-mplayer2';
|
||||
break;
|
||||
|
||||
case "rmp":
|
||||
cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';
|
||||
codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
|
||||
type = 'audio/x-pn-realaudio-plugin';
|
||||
break;
|
||||
}
|
||||
|
||||
if (pl == '') {
|
||||
p.innerHTML = '';
|
||||
return;
|
||||
}
|
||||
|
||||
pl = eval('x={' + pl + '};');
|
||||
|
||||
if (!pl.src) {
|
||||
p.innerHTML = '';
|
||||
return;
|
||||
}
|
||||
|
||||
pl.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(pl.src);
|
||||
pl.width = !pl.width ? 100 : pl.width;
|
||||
pl.height = !pl.height ? 100 : pl.height;
|
||||
pl.id = !pl.id ? 'obj' : pl.id;
|
||||
pl.name = !pl.name ? 'eobj' : pl.name;
|
||||
pl.align = !pl.align ? '' : pl.align;
|
||||
|
||||
h += '<object classid="clsid:' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';
|
||||
|
||||
for (n in pl) {
|
||||
h += '<param name="' + n + '" value="' + pl[n] + '">';
|
||||
|
||||
// Add extra url parameter if it's an absolute URL
|
||||
if (n == 'src' && pl[n].indexOf('://') != -1)
|
||||
h += '<param name="url" value="' + pl[n] + '" />';
|
||||
}
|
||||
|
||||
h += '<embed type="' + type + '" ';
|
||||
|
||||
for (n in pl)
|
||||
h += n + '="' + pl[n] + '" ';
|
||||
|
||||
h += '></embed></object>';
|
||||
|
||||
p.innerHTML = "<!-- x --->" + h;
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
103
wp-includes/js/tinymce/plugins/media/langs/en_dlg.js
Normal file
@ -0,0 +1,103 @@
|
||||
tinyMCE.addI18n('en.media_dlg',{
|
||||
title:"Insert / edit embedded media",
|
||||
general:"General",
|
||||
advanced:"Advanced",
|
||||
file:"File/URL",
|
||||
list:"List",
|
||||
size:"Dimensions",
|
||||
preview:"Preview",
|
||||
constrain_proportions:"Constrain proportions",
|
||||
type:"Type",
|
||||
id:"Id",
|
||||
name:"Name",
|
||||
class_name:"Class",
|
||||
vspace:"V-Space",
|
||||
hspace:"H-Space",
|
||||
play:"Auto play",
|
||||
loop:"Loop",
|
||||
menu:"Show menu",
|
||||
quality:"Quality",
|
||||
scale:"Scale",
|
||||
align:"Align",
|
||||
salign:"SAlign",
|
||||
wmode:"WMode",
|
||||
bgcolor:"Background",
|
||||
base:"Base",
|
||||
flashvars:"Flashvars",
|
||||
liveconnect:"SWLiveConnect",
|
||||
autohref:"AutoHREF",
|
||||
cache:"Cache",
|
||||
hidden:"Hidden",
|
||||
controller:"Controller",
|
||||
kioskmode:"Kiosk mode",
|
||||
playeveryframe:"Play every frame",
|
||||
targetcache:"Target cache",
|
||||
correction:"No correction",
|
||||
enablejavascript:"Enable JavaScript",
|
||||
starttime:"Start time",
|
||||
endtime:"End time",
|
||||
href:"Href",
|
||||
qtsrcchokespeed:"Choke speed",
|
||||
target:"Target",
|
||||
volume:"Volume",
|
||||
autostart:"Auto start",
|
||||
enabled:"Enabled",
|
||||
fullscreen:"Fullscreen",
|
||||
invokeurls:"Invoke URLs",
|
||||
mute:"Mute",
|
||||
stretchtofit:"Stretch to fit",
|
||||
windowlessvideo:"Windowless video",
|
||||
balance:"Balance",
|
||||
baseurl:"Base URL",
|
||||
captioningid:"Captioning id",
|
||||
currentmarker:"Current marker",
|
||||
currentposition:"Current position",
|
||||
defaultframe:"Default frame",
|
||||
playcount:"Play count",
|
||||
rate:"Rate",
|
||||
uimode:"UI Mode",
|
||||
flash_options:"Flash options",
|
||||
qt_options:"Quicktime options",
|
||||
wmp_options:"Windows media player options",
|
||||
rmp_options:"Real media player options",
|
||||
shockwave_options:"Shockwave options",
|
||||
autogotourl:"Auto goto URL",
|
||||
center:"Center",
|
||||
imagestatus:"Image status",
|
||||
maintainaspect:"Maintain aspect",
|
||||
nojava:"No java",
|
||||
prefetch:"Prefetch",
|
||||
shuffle:"Shuffle",
|
||||
console:"Console",
|
||||
numloop:"Num loops",
|
||||
controls:"Controls",
|
||||
scriptcallbacks:"Script callbacks",
|
||||
swstretchstyle:"Stretch style",
|
||||
swstretchhalign:"Stretch H-Align",
|
||||
swstretchvalign:"Stretch V-Align",
|
||||
sound:"Sound",
|
||||
progress:"Progress",
|
||||
qtsrc:"QT Src",
|
||||
qt_stream_warn:"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",
|
||||
align_top:"Top",
|
||||
align_right:"Right",
|
||||
align_bottom:"Bottom",
|
||||
align_left:"Left",
|
||||
align_center:"Center",
|
||||
align_top_left:"Top left",
|
||||
align_top_right:"Top right",
|
||||
align_bottom_left:"Bottom left",
|
||||
align_bottom_right:"Bottom right",
|
||||
flv_options:"Flash video options",
|
||||
flv_scalemode:"Scale mode",
|
||||
flv_buffer:"Buffer",
|
||||
flv_startimage:"Start image",
|
||||
flv_starttime:"Start time",
|
||||
flv_defaultvolume:"Default volumne",
|
||||
flv_hiddengui:"Hidden GUI",
|
||||
flv_autostart:"Auto start",
|
||||
flv_loop:"Loop",
|
||||
flv_showscalemodes:"Show scale modes",
|
||||
flv_smoothvideo:"Smooth video",
|
||||
flv_jscallback:"JS Callback"
|
||||
});
|
823
wp-includes/js/tinymce/plugins/media/media.htm
Normal file
@ -0,0 +1,823 @@
|
||||
<!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>{#media_dlg.title}</title>
|
||||
<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" />
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body style="display: none">
|
||||
<form onsubmit="insertMedia();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');generatePreview();" onmousedown="return false;">{#media_dlg.general}</a></span></li>
|
||||
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#media_dlg.advanced}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{#media_dlg.general}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td><label for="media_type">{#media_dlg.type}</label></td>
|
||||
<td>
|
||||
<select id="media_type" name="media_type" onchange="changedType(this.value);generatePreview();">
|
||||
<option value="flash">Flash</option>
|
||||
<!-- <option value="flv">Flash video (FLV)</option> -->
|
||||
<option value="qt">Quicktime</option>
|
||||
<option value="shockwave">Shockware</option>
|
||||
<option value="wmp">Windows Media</option>
|
||||
<option value="rmp">Real Media</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="src">{#media_dlg.file}</label></td>
|
||||
<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 id="filebrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="linklistrow">
|
||||
<td><label for="linklist">{#media_dlg.list}</label></td>
|
||||
<td id="linklistcontainer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="width">{#media_dlg.size}</label></td>
|
||||
<td>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="text" id="width" name="width" value="" class="size" onchange="generatePreview('width');" /> x <input type="text" id="height" name="height" value="" class="size" onchange="generatePreview('height');" /></td>
|
||||
<td> <input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
|
||||
<td><label id="constrainlabel" for="constrain">{#media_dlg.constrain_proportions}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{#media_dlg.preview}</legend>
|
||||
<div id="prev"></div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="advanced_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{#media_dlg.advanced}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td><label for="id">{#media_dlg.id}</label></td>
|
||||
<td><input type="text" id="id" name="id" onchange="generatePreview();" /></td>
|
||||
<td><label for="name">{#media_dlg.name}</label></td>
|
||||
<td><input type="text" id="name" name="name" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="align">{#media_dlg.align}</label></td>
|
||||
<td>
|
||||
<select id="align" name="align" onchange="generatePreview();">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="top">{#media_dlg.align_top}</option>
|
||||
<option value="right">{#media_dlg.align_right}</option>
|
||||
<option value="bottom">{#media_dlg.align_bottom}</option>
|
||||
<option value="left">{#media_dlg.align_left}</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="bgcolor">{#media_dlg.bgcolor}</label></td>
|
||||
<td>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');generatePreview();" /></td>
|
||||
<td id="bgcolor_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="vspace">{#media_dlg.vspace}</label></td>
|
||||
<td><input type="text" id="vspace" name="vspace" class="number" onchange="generatePreview();" /></td>
|
||||
<td><label for="hspace">{#media_dlg.hspace}</label></td>
|
||||
<td><input type="text" id="hspace" name="hspace" class="number" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="flash_options">
|
||||
<legend>{#media_dlg.flash_options}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td><label for="flash_quality">{#media_dlg.quality}</label></td>
|
||||
<td>
|
||||
<select id="flash_quality" name="flash_quality" onchange="generatePreview();">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="high">high</option>
|
||||
<option value="low">low</option>
|
||||
<option value="autolow">autolow</option>
|
||||
<option value="autohigh">autohigh</option>
|
||||
<option value="best">best</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="flash_scale">{#media_dlg.scale}</label></td>
|
||||
<td>
|
||||
<select id="flash_scale" name="flash_scale" onchange="generatePreview();">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="showall">showall</option>
|
||||
<option value="noborder">noborder</option>
|
||||
<option value="exactfit">exactfit</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="flash_wmode">{#media_dlg.wmode}</label></td>
|
||||
<td>
|
||||
<select id="flash_wmode" name="flash_wmode" onchange="generatePreview();">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="window">window</option>
|
||||
<option value="opaque">opaque</option>
|
||||
<option value="transparent">transparent</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="flash_salign">{#media_dlg.salign}</label></td>
|
||||
<td>
|
||||
<select id="flash_salign" name="flash_salign" onchange="generatePreview();">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="l">{#media_dlg.align_left}</option>
|
||||
<option value="t">{#media_dlg.align_top}</option>
|
||||
<option value="r">{#media_dlg.align_right}</option>
|
||||
<option value="b">{#media_dlg.align_bottom}</option>
|
||||
<option value="tl">{#media_dlg.align_top_left}</option>
|
||||
<option value="tr">{#media_dlg.align_top_right}</option>
|
||||
<option value="bl">{#media_dlg.align_bottom_left}</option>
|
||||
<option value="br">{#media_dlg.align_bottom_right}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="flash_play">{#media_dlg.play}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="flash_loop">{#media_dlg.loop}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="flash_menu">{#media_dlg.menu}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="generatePreview();" /></td>
|
||||
<td><label for="flash_swliveconnect">{#media_dlg.liveconnect}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="flash_base">{#media_dlg.base}</label></td>
|
||||
<td><input type="text" id="flash_base" name="flash_base" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="flash_flashvars">{#media_dlg.flashvars}</label></td>
|
||||
<td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="flv_options">
|
||||
<legend>{#media_dlg.flv_options}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td><label for="flv_scalemode">{#media_dlg.flv_scalemode}</label></td>
|
||||
<td>
|
||||
<select id="flv_scalemode" name="flv_scalemode" onchange="generatePreview();">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="none">none</option>
|
||||
<option value="double">double</option>
|
||||
<option value="full">full</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="flv_buffer">{#media_dlg.flv_buffer}</label></td>
|
||||
<td><input type="text" id="flv_buffer" name="flv_buffer" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="flv_startimage">{#media_dlg.flv_startimage}</label></td>
|
||||
<td><input type="text" id="flv_startimage" name="flv_startimage" onchange="generatePreview();" /></td>
|
||||
|
||||
<td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td>
|
||||
<td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="flv_defaultvolume">{#media_dlg.flv_defaultvolume}</label></td>
|
||||
<td><input type="text" id="flv_defaultvolume" name="flv_defaultvolume" onchange="generatePreview();" /></td>
|
||||
|
||||
<td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td>
|
||||
<td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="flv_hiddengui" name="flv_hiddengui" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="flv_hiddengui">{#media_dlg.flv_hiddengui}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="flv_autostart" name="flv_autostart" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="flv_autostart">{#media_dlg.flv_autostart}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="flv_loop" name="flv_loop" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="flv_loop">{#media_dlg.flv_loop}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="flv_showscalemodes" name="flv_showscalemodes" onchange="generatePreview();" /></td>
|
||||
<td><label for="flv_showscalemodes">{#media_dlg.flv_showscalemodes}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="flv_smoothvideo" name="flash_flv_flv_smoothvideosmoothvideo" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="flv_smoothvideo">{#media_dlg.flv_smoothvideo}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="flv_jscallback" name="flv_jscallback" onchange="generatePreview();" /></td>
|
||||
<td><label for="flv_jscallback">{#media_dlg.flv_jscallback}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="qt_options">
|
||||
<legend>{#media_dlg.qt_options}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="qt_loop" name="qt_loop" onchange="generatePreview();" /></td>
|
||||
<td><label for="qt_loop">{#media_dlg.loop}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="qt_autoplay" name="qt_autoplay" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="qt_autoplay">{#media_dlg.play}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="qt_cache" name="qt_cache" onchange="generatePreview();" /></td>
|
||||
<td><label for="qt_cache">{#media_dlg.cache}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="qt_controller" name="qt_controller" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="qt_controller">{#media_dlg.controller}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="qt_correction" name="qt_correction" onchange="generatePreview();" /></td>
|
||||
<td><label for="qt_correction">{#media_dlg.correction}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="qt_enablejavascript" name="qt_enablejavascript" onchange="generatePreview();" /></td>
|
||||
<td><label for="qt_enablejavascript">{#media_dlg.enablejavascript}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="qt_kioskmode" name="qt_kioskmode" onchange="generatePreview();" /></td>
|
||||
<td><label for="qt_kioskmode">{#media_dlg.kioskmode}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="qt_autohref" name="qt_autohref" onchange="generatePreview();" /></td>
|
||||
<td><label for="qt_autohref">{#media_dlg.autohref}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="qt_playeveryframe" name="qt_playeveryframe" onchange="generatePreview();" /></td>
|
||||
<td><label for="qt_playeveryframe">{#media_dlg.playeveryframe}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="qt_targetcache" name="qt_targetcache" onchange="generatePreview();" /></td>
|
||||
<td><label for="qt_targetcache">{#media_dlg.targetcache}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="qt_scale">{#media_dlg.scale}</label></td>
|
||||
<td><select id="qt_scale" name="qt_scale" class="mceEditableSelect" onchange="generatePreview();">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="tofit">tofit</option>
|
||||
<option value="aspect">aspect</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="qt_starttime">{#media_dlg.starttime}</label></td>
|
||||
<td><input type="text" id="qt_starttime" name="qt_starttime" onchange="generatePreview();" /></td>
|
||||
|
||||
<td><label for="qt_endtime">{#media_dlg.endtime}</label></td>
|
||||
<td><input type="text" id="qt_endtime" name="qt_endtime" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="qt_target">{#media_dlg.target}</label></td>
|
||||
<td><input type="text" id="qt_target" name="qt_target" onchange="generatePreview();" /></td>
|
||||
|
||||
<td><label for="qt_href">{#media_dlg.href}</label></td>
|
||||
<td><input type="text" id="qt_href" name="qt_href" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="qt_qtsrcchokespeed">{#media_dlg.qtsrcchokespeed}</label></td>
|
||||
<td><input type="text" id="qt_qtsrcchokespeed" name="qt_qtsrcchokespeed" onchange="generatePreview();" /></td>
|
||||
|
||||
<td><label for="qt_volume">{#media_dlg.volume}</label></td>
|
||||
<td><input type="text" id="qt_volume" name="qt_volume" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="qt_qtsrc">{#media_dlg.qtsrc}</label></td>
|
||||
<td colspan="4">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input type="text" id="qt_qtsrc" name="qt_qtsrc" onchange="generatePreview();" /></td>
|
||||
<td id="qtsrcfilebrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="wmp_options">
|
||||
<legend>{#media_dlg.wmp_options}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="wmp_autostart" name="wmp_autostart" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="wmp_autostart">{#media_dlg.autostart}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="wmp_enabled" name="wmp_enabled" onchange="generatePreview();" /></td>
|
||||
<td><label for="wmp_enabled">{#media_dlg.enabled}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="wmp_enablecontextmenu" name="wmp_enablecontextmenu" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="wmp_enablecontextmenu">{#media_dlg.menu}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="wmp_fullscreen" name="wmp_fullscreen" onchange="generatePreview();" /></td>
|
||||
<td><label for="wmp_fullscreen">{#media_dlg.fullscreen}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="wmp_invokeurls" name="wmp_invokeurls" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="wmp_invokeurls">{#media_dlg.invokeurls}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="wmp_mute" name="wmp_mute" onchange="generatePreview();" /></td>
|
||||
<td><label for="wmp_mute">{#media_dlg.mute}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="wmp_stretchtofit" name="wmp_stretchtofit" onchange="generatePreview();" /></td>
|
||||
<td><label for="wmp_stretchtofit">{#media_dlg.stretchtofit}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="wmp_windowlessvideo" name="wmp_windowlessvideo" onchange="generatePreview();" /></td>
|
||||
<td><label for="wmp_windowlessvideo">{#media_dlg.windowlessvideo}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="wmp_balance">{#media_dlg.balance}</label></td>
|
||||
<td><input type="text" id="wmp_balance" name="wmp_balance" onchange="generatePreview();" /></td>
|
||||
|
||||
<td><label for="wmp_baseurl">{#media_dlg.baseurl}</label></td>
|
||||
<td><input type="text" id="wmp_baseurl" name="wmp_baseurl" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="wmp_captioningid">{#media_dlg.captioningid}</label></td>
|
||||
<td><input type="text" id="wmp_captioningid" name="wmp_captioningid" onchange="generatePreview();" /></td>
|
||||
|
||||
<td><label for="wmp_currentmarker">{#media_dlg.currentmarker}</label></td>
|
||||
<td><input type="text" id="wmp_currentmarker" name="wmp_currentmarker" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="wmp_currentposition">{#media_dlg.currentposition}</label></td>
|
||||
<td><input type="text" id="wmp_currentposition" name="wmp_currentposition" onchange="generatePreview();" /></td>
|
||||
|
||||
<td><label for="wmp_defaultframe">{#media_dlg.defaultframe}</label></td>
|
||||
<td><input type="text" id="wmp_defaultframe" name="wmp_defaultframe" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="wmp_playcount">{#media_dlg.playcount}</label></td>
|
||||
<td><input type="text" id="wmp_playcount" name="wmp_playcount" onchange="generatePreview();" /></td>
|
||||
|
||||
<td><label for="wmp_rate">{#media_dlg.rate}</label></td>
|
||||
<td><input type="text" id="wmp_rate" name="wmp_rate" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="wmp_uimode">{#media_dlg.uimode}</label></td>
|
||||
<td><input type="text" id="wmp_uimode" name="wmp_uimode" onchange="generatePreview();" /></td>
|
||||
|
||||
<td><label for="wmp_volume">{#media_dlg.volume}</label></td>
|
||||
<td><input type="text" id="wmp_volume" name="wmp_volume" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="rmp_options">
|
||||
<legend>{#media_dlg.rmp_options}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="rmp_autostart" name="rmp_autostart" onchange="generatePreview();" /></td>
|
||||
<td><label for="rmp_autostart">{#media_dlg.autostart}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="rmp_loop" name="rmp_loop" onchange="generatePreview();" /></td>
|
||||
<td><label for="rmp_loop">{#media_dlg.loop}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="rmp_autogotourl" name="rmp_autogotourl" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="rmp_autogotourl">{#media_dlg.autogotourl}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="rmp_center" name="rmp_center" onchange="generatePreview();" /></td>
|
||||
<td><label for="rmp_center">{#media_dlg.center}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="rmp_imagestatus" name="rmp_imagestatus" checked="checked" onchange="generatePreview();" /></td>
|
||||
<td><label for="rmp_imagestatus">{#media_dlg.imagestatus}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="rmp_maintainaspect" name="rmp_maintainaspect" onchange="generatePreview();" /></td>
|
||||
<td><label for="rmp_maintainaspect">{#media_dlg.maintainaspect}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="rmp_nojava" name="rmp_nojava" onchange="generatePreview();" /></td>
|
||||
<td><label for="rmp_nojava">{#media_dlg.nojava}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="rmp_prefetch" name="rmp_prefetch" onchange="generatePreview();" /></td>
|
||||
<td><label for="rmp_prefetch">{#media_dlg.prefetch}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="rmp_shuffle" name="rmp_shuffle" onchange="generatePreview();" /></td>
|
||||
<td><label for="rmp_shuffle">{#media_dlg.shuffle}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="rmp_console">{#media_dlg.console}</label></td>
|
||||
<td><input type="text" id="rmp_console" name="rmp_console" onchange="generatePreview();" /></td>
|
||||
|
||||
<td><label for="rmp_controls">{#media_dlg.controls}</label></td>
|
||||
<td><input type="text" id="rmp_controls" name="rmp_controls" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="rmp_numloop">{#media_dlg.numloop}</label></td>
|
||||
<td><input type="text" id="rmp_numloop" name="rmp_numloop" onchange="generatePreview();" /></td>
|
||||
|
||||
<td><label for="rmp_scriptcallbacks">{#media_dlg.scriptcallbacks}</label></td>
|
||||
<td><input type="text" id="rmp_scriptcallbacks" name="rmp_scriptcallbacks" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="shockwave_options">
|
||||
<legend>{#media_dlg.shockwave_options}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td><label for="shockwave_swstretchstyle">{#media_dlg.swstretchstyle}</label></td>
|
||||
<td>
|
||||
<select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="generatePreview();">
|
||||
<option value="none">{#not_set}</option>
|
||||
<option value="meet">Meet</option>
|
||||
<option value="fill">Fill</option>
|
||||
<option value="stage">Stage</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="shockwave_swvolume">{#media_dlg.volume}</label></td>
|
||||
<td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="generatePreview();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="shockwave_swstretchhalign">{#media_dlg.swstretchhalign}</label></td>
|
||||
<td>
|
||||
<select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="generatePreview();">
|
||||
<option value="none">{#not_set}</option>
|
||||
<option value="left">{#media_dlg.align_left}</option>
|
||||
<option value="center">{#media_dlg.align_center}</option>
|
||||
<option value="right">{#media_dlg.align_right}</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="shockwave_swstretchvalign">{#media_dlg.swstretchvalign}</label></td>
|
||||
<td>
|
||||
<select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="generatePreview();">
|
||||
<option value="none">{#not_set}</option>
|
||||
<option value="meet">Meet</option>
|
||||
<option value="fill">Fill</option>
|
||||
<option value="stage">Stage</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="generatePreview();" checked="checked" /></td>
|
||||
<td><label for="shockwave_autostart">{#media_dlg.autostart}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="generatePreview();" checked="checked" /></td>
|
||||
<td><label for="shockwave_sound">{#media_dlg.sound}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="generatePreview();" /></td>
|
||||
<td><label for="shockwave_swliveconnect">{#media_dlg.liveconnect}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="generatePreview();" checked="checked" /></td>
|
||||
<td><label for="shockwave_progress">{#media_dlg.progress}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div style="float: left">
|
||||
<input type="button" id="insert" name="insert" value="{#insert}" onclick="insertMedia();" />
|
||||
</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -1,19 +1,22 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>blank_page</title>
|
||||
<script language="javascript">
|
||||
function init() {
|
||||
document.body.contentEditable = true;
|
||||
document.designMode = 'on';
|
||||
parent.initIframe(document);
|
||||
window.focus();
|
||||
}
|
||||
</script>
|
||||
<link href="css/blank.css" rel="stylesheet" type="text/css" />
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body onload="init();">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<title>blank_page</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link href="css/blank.css" rel="stylesheet" type="text/css" />
|
||||
<base target="_self" />
|
||||
<script type="text/javascript">
|
||||
function init() {
|
||||
if (parent.tinymce.isIE)
|
||||
document.body.contentEditable = true;
|
||||
else
|
||||
document.designMode = 'on';
|
||||
|
||||
parent.initIframe(document);
|
||||
window.focus();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,13 +1,14 @@
|
||||
body {
|
||||
background-color: #FFFFFF;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
scrollbar-3dlight-color: #F0F0EE;
|
||||
scrollbar-arrow-color: #676662;
|
||||
scrollbar-base-color: #F0F0EE;
|
||||
scrollbar-darkshadow-color: #DDDDDD;
|
||||
scrollbar-face-color: #E0E0DD;
|
||||
scrollbar-highlight-color: #F0F0EE;
|
||||
scrollbar-shadow-color: #F0F0EE;
|
||||
scrollbar-track-color: #F5F5F5;
|
||||
}
|
||||
html, body {height:98%}
|
||||
body {
|
||||
background-color: #FFFFFF;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
scrollbar-3dlight-color: #F0F0EE;
|
||||
scrollbar-arrow-color: #676662;
|
||||
scrollbar-base-color: #F0F0EE;
|
||||
scrollbar-darkshadow-color: #DDDDDD;
|
||||
scrollbar-face-color: #E0E0DD;
|
||||
scrollbar-highlight-color: #F0F0EE;
|
||||
scrollbar-shadow-color: #F0F0EE;
|
||||
scrollbar-track-color: #F5F5F5;
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
.sourceIframe {
|
||||
border: 1px solid #808080;
|
||||
}
|
||||
.sourceIframe {
|
||||
border: 1px solid #808080;
|
||||
}
|
||||
|
@ -1,395 +1,383 @@
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
|
||||
* $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('paste');
|
||||
(function() {
|
||||
var Event = tinymce.dom.Event;
|
||||
|
||||
var TinyMCE_PastePlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Paste text/word',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
tinymce.create('tinymce.plugins.PastePlugin', {
|
||||
init : function(ed, url) {
|
||||
var t = this;
|
||||
|
||||
initInstance : function(inst) {
|
||||
if (tinyMCE.isMSIE && tinyMCE.getParam("paste_auto_cleanup_on_paste", false))
|
||||
tinyMCE.addEvent(inst.getBody(), "paste", TinyMCE_PastePlugin._handlePasteEvent);
|
||||
},
|
||||
t.editor = ed;
|
||||
|
||||
handleEvent : function(e) {
|
||||
// Force paste dialog if non IE browser
|
||||
if (!tinyMCE.isRealIE && tinyMCE.getParam("paste_auto_cleanup_on_paste", false) && e.ctrlKey && e.keyCode == 86 && e.type == "keydown") {
|
||||
window.setTimeout('tinyMCE.selectedInstance.execCommand("mcePasteText",true)', 1);
|
||||
return tinyMCE.cancelEvent(e);
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "pastetext":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_paste_text_desc', '{$pluginurl}/images/pastetext.gif', 'mcePasteText', true);
|
||||
|
||||
case "pasteword":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_paste_word_desc', '{$pluginurl}/images/pasteword.gif', 'mcePasteWord', true);
|
||||
|
||||
case "selectall":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_selectall_desc', '{$pluginurl}/images/selectall.gif', 'mceSelectAll', true);
|
||||
}
|
||||
|
||||
return '';
|
||||
},
|
||||
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
switch (command) {
|
||||
case "mcePasteText":
|
||||
if (user_interface) {
|
||||
if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false))
|
||||
TinyMCE_PastePlugin._insertText(clipboardData.getData("Text"), true);
|
||||
else {
|
||||
var template = new Array();
|
||||
template['file'] = '../../plugins/paste/pastetext.htm'; // Relative to theme
|
||||
template['width'] = 450;
|
||||
template['height'] = 400;
|
||||
var plain_text = "";
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'});
|
||||
}
|
||||
// Register commands
|
||||
ed.addCommand('mcePasteText', function(ui, v) {
|
||||
if (ui) {
|
||||
ed.windowManager.open({
|
||||
file : url + '/pastetext.htm',
|
||||
width : 450,
|
||||
height : 400,
|
||||
inline : 1
|
||||
}, {
|
||||
plugin_url : url
|
||||
});
|
||||
} else
|
||||
TinyMCE_PastePlugin._insertText(value['html'], value['linebreaks']);
|
||||
t._insertText(v.html, v.linebreaks);
|
||||
});
|
||||
|
||||
return true;
|
||||
|
||||
case "mcePasteWord":
|
||||
if (user_interface) {
|
||||
if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false)) {
|
||||
TinyMCE_PastePlugin._insertWordContent(TinyMCE_PastePlugin._clipboardHTML());
|
||||
} else {
|
||||
var template = new Array();
|
||||
template['file'] = '../../plugins/paste/pasteword.htm'; // Relative to theme
|
||||
template['width'] = 450;
|
||||
template['height'] = 400;
|
||||
var plain_text = "";
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'});
|
||||
}
|
||||
ed.addCommand('mcePasteWord', function(ui, v) {
|
||||
if (ui) {
|
||||
ed.windowManager.open({
|
||||
file : url + '/pasteword.htm',
|
||||
width : 450,
|
||||
height : 400,
|
||||
inline : 1
|
||||
}, {
|
||||
plugin_url : url
|
||||
});
|
||||
} else
|
||||
TinyMCE_PastePlugin._insertWordContent(value);
|
||||
t._insertWordContent(v);
|
||||
});
|
||||
|
||||
return true;
|
||||
ed.addCommand('mceSelectAll', function() {
|
||||
ed.execCommand('selectall');
|
||||
});
|
||||
|
||||
case "mceSelectAll":
|
||||
tinyMCE.execInstanceCommand(editor_id, 'selectall');
|
||||
return true;
|
||||
// Register buttons
|
||||
ed.addButton('pastetext', {title : 'paste.paste_text_desc', cmd : 'mcePasteText', ui : true});
|
||||
ed.addButton('pasteword', {title : 'paste.paste_word_desc', cmd : 'mcePasteWord', ui : true});
|
||||
ed.addButton('selectall', {title : 'paste.selectall_desc', cmd : 'mceSelectAll'});
|
||||
|
||||
}
|
||||
if (ed.getParam("paste_auto_cleanup_on_paste", false)) {
|
||||
ed.onPaste.add(function(ed, e) {
|
||||
return t._handlePasteEvent(e)
|
||||
});
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
},
|
||||
if (!tinymce.isIE && ed.getParam("paste_auto_cleanup_on_paste", false)) {
|
||||
// Force paste dialog if non IE browser
|
||||
ed.onKeyDown.add(function(ed, e) {
|
||||
if (e.ctrlKey && e.keyCode == 86) {
|
||||
window.setTimeout(function() {
|
||||
ed.execCommand("mcePasteText", true);
|
||||
}, 1);
|
||||
|
||||
// Private plugin internal methods
|
||||
Event.cancel(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_handlePasteEvent : function(e) {
|
||||
switch (e.type) {
|
||||
case "paste":
|
||||
var html = TinyMCE_PastePlugin._clipboardHTML();
|
||||
var r, inst = tinyMCE.selectedInstance;
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Paste text/word',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
// Removes italic, strong etc, the if was needed due to bug #1437114
|
||||
if (inst && (r = inst.getRng()) && r.text.length > 0)
|
||||
tinyMCE.execCommand('delete');
|
||||
// Private methods
|
||||
|
||||
if (html && html.length > 0)
|
||||
tinyMCE.execCommand('mcePasteWord', false, html);
|
||||
_handlePasteEvent : function(e) {
|
||||
var html = this._clipboardHTML(), ed = this.editor, sel = ed.selection, r;
|
||||
|
||||
tinyMCE.cancelEvent(e);
|
||||
return false;
|
||||
}
|
||||
// Removes italic, strong etc, the if was needed due to bug #1437114
|
||||
if (ed && (r = sel.getRng()) && r.text.length > 0)
|
||||
ed.execCommand('delete');
|
||||
|
||||
return true;
|
||||
},
|
||||
if (html && html.length > 0)
|
||||
ed.execCommand('mcePasteWord', false, html);
|
||||
|
||||
_insertText : function(content, bLinebreaks) {
|
||||
if (content && content.length > 0) {
|
||||
if (bLinebreaks) {
|
||||
// Special paragraph treatment
|
||||
if (tinyMCE.getParam("paste_create_paragraphs", true)) {
|
||||
var rl = tinyMCE.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');
|
||||
for (var i=0; i<rl.length; i+=2)
|
||||
content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);
|
||||
return Event.cancel(e);
|
||||
},
|
||||
|
||||
content = tinyMCE.regexpReplace(content, "\r\n\r\n", "</p><p>", "gi");
|
||||
content = tinyMCE.regexpReplace(content, "\r\r", "</p><p>", "gi");
|
||||
content = tinyMCE.regexpReplace(content, "\n\n", "</p><p>", "gi");
|
||||
_insertText : function(content, bLinebreaks) {
|
||||
if (content && content.length > 0) {
|
||||
if (bLinebreaks) {
|
||||
// Special paragraph treatment
|
||||
if (this.editor.getParam("paste_create_paragraphs", true)) {
|
||||
var rl = this.editor.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');
|
||||
for (var i=0; i<rl.length; i+=2)
|
||||
content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);
|
||||
|
||||
// Has paragraphs
|
||||
if ((pos = content.indexOf('</p><p>')) != -1) {
|
||||
tinyMCE.execCommand("Delete");
|
||||
content = content.replace(/\r\n\r\n/g, '</p><p>');
|
||||
content = content.replace(/\r\r/g, '</p><p>');
|
||||
content = content.replace(/\n\n/g, '</p><p>');
|
||||
|
||||
var node = tinyMCE.selectedInstance.getFocusElement();
|
||||
// Has paragraphs
|
||||
if ((pos = content.indexOf('</p><p>')) != -1) {
|
||||
this.editor.execCommand("Delete");
|
||||
|
||||
// Get list of elements to break
|
||||
var breakElms = new Array();
|
||||
var node = this.editor.selection.getNode();
|
||||
|
||||
do {
|
||||
if (node.nodeType == 1) {
|
||||
// Don't break tables and break at body
|
||||
if (node.nodeName == "TD" || node.nodeName == "BODY")
|
||||
break;
|
||||
|
||||
breakElms[breakElms.length] = node;
|
||||
// Get list of elements to break
|
||||
var breakElms = [];
|
||||
|
||||
do {
|
||||
if (node.nodeType == 1) {
|
||||
// Don't break tables and break at body
|
||||
if (node.nodeName == "TD" || node.nodeName == "BODY")
|
||||
break;
|
||||
|
||||
breakElms[breakElms.length] = node;
|
||||
}
|
||||
} while(node = node.parentNode);
|
||||
|
||||
var before = "", after = "</p>";
|
||||
before += content.substring(0, pos);
|
||||
|
||||
for (var i=0; i<breakElms.length; i++) {
|
||||
before += "</" + breakElms[i].nodeName + ">";
|
||||
after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">";
|
||||
}
|
||||
} while(node = node.parentNode);
|
||||
|
||||
var before = "", after = "</p>";
|
||||
before += content.substring(0, pos);
|
||||
|
||||
for (var i=0; i<breakElms.length; i++) {
|
||||
before += "</" + breakElms[i].nodeName + ">";
|
||||
after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">";
|
||||
before += "<p>";
|
||||
content = before + content.substring(pos+7) + after;
|
||||
}
|
||||
|
||||
before += "<p>";
|
||||
content = before + content.substring(pos+7) + after;
|
||||
}
|
||||
|
||||
if (this.editor.getParam("paste_create_linebreaks", true)) {
|
||||
content = content.replace(/\r\n/g, '<br />');
|
||||
content = content.replace(/\r/g, '<br />');
|
||||
content = content.replace(/\n/g, '<br />');
|
||||
}
|
||||
}
|
||||
|
||||
this.editor.execCommand("mceInsertRawHTML", false, content);
|
||||
}
|
||||
},
|
||||
|
||||
if (tinyMCE.getParam("paste_create_linebreaks", true)) {
|
||||
content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi");
|
||||
content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi");
|
||||
content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi");
|
||||
_insertWordContent : function(content) {
|
||||
var t = this, ed = t.editor;
|
||||
|
||||
if (content && content.length > 0) {
|
||||
// Cleanup Word content
|
||||
var bull = String.fromCharCode(8226);
|
||||
var middot = String.fromCharCode(183);
|
||||
var cb;
|
||||
|
||||
if ((cb = this.editor.getParam("paste_insert_word_content_callback", "")) != "")
|
||||
content = eval(cb + "('before', content)");
|
||||
|
||||
var rl = this.editor.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');
|
||||
for (var i=0; i<rl.length; i+=2)
|
||||
content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);
|
||||
|
||||
if (this.editor.getParam("paste_convert_headers_to_strong", false)) {
|
||||
content = content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>', 'gi'), '<p><b>$1</b></p>');
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCE.execCommand("mceInsertRawHTML", false, content);
|
||||
}
|
||||
},
|
||||
|
||||
_insertWordContent : function(content) {
|
||||
if (content && content.length > 0) {
|
||||
// Cleanup Word content
|
||||
content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--");
|
||||
content = content.replace(new RegExp(bull + "(.*?)<BR>", "gi"), "<p>" + middot + "$1</p>");
|
||||
content = content.replace(new RegExp('<SPAN style="mso-list: Ignore">', 'gi'), "<span>" + bull); // Covert to bull list
|
||||
content = content.replace(/<o:p><\/o:p>/gi, "");
|
||||
content = content.replace(new RegExp('<br style="page-break-before: always;.*>', 'gi'), '-- page break --'); // Replace pagebreaks
|
||||
content = content.replace(new RegExp('<(!--)([^>]*)(--)>', 'g'), ""); // Word comments
|
||||
|
||||
if (this.editor.getParam("paste_remove_spans", true))
|
||||
content = content.replace(/<\/?span[^>]*>/gi, "");
|
||||
|
||||
if (this.editor.getParam("paste_remove_styles", true))
|
||||
content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3");
|
||||
|
||||
content = content.replace(/<\/?font[^>]*>/gi, "");
|
||||
|
||||
// Strips class attributes.
|
||||
switch (this.editor.getParam("paste_strip_class_attributes", "all")) {
|
||||
case "all":
|
||||
content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");
|
||||
break;
|
||||
|
||||
case "mso":
|
||||
content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3");
|
||||
break;
|
||||
}
|
||||
|
||||
content = content.replace(new RegExp('href="?' + this._reEscape("" + document.location) + '', 'gi'), 'href="' + this.editor.documentBaseURI.getURI());
|
||||
content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
|
||||
content = content.replace(/<\\?\?xml[^>]*>/gi, "");
|
||||
content = content.replace(/<\/?\w+:[^>]*>/gi, "");
|
||||
content = content.replace(/-- page break --\s*<p> <\/p>/gi, ""); // Remove pagebreaks
|
||||
content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks
|
||||
|
||||
// content = content.replace(/\/? */gi, "");
|
||||
// content = content.replace(/<p> <\/p>/gi, '');
|
||||
|
||||
if (!this.editor.getParam('force_p_newlines')) {
|
||||
content = content.replace('', '' ,'gi');
|
||||
content = content.replace('</p>', '<br /><br />' ,'gi');
|
||||
}
|
||||
|
||||
if (!tinymce.isIE && !this.editor.getParam('force_p_newlines')) {
|
||||
content = content.replace(/<\/?p[^>]*>/gi, "");
|
||||
}
|
||||
|
||||
content = content.replace(/<\/?div[^>]*>/gi, "");
|
||||
|
||||
// Convert all middlot lists to UL lists
|
||||
if (this.editor.getParam("paste_convert_middot_lists", true)) {
|
||||
var div = ed.dom.create("div", null, content);
|
||||
|
||||
// Convert all middot paragraphs to li elements
|
||||
var className = this.editor.getParam("paste_unindented_list_class", "unIndentedList");
|
||||
|
||||
while (this._convertMiddots(div, "--list--")) ; // bull
|
||||
while (this._convertMiddots(div, middot, className)) ; // Middot
|
||||
while (this._convertMiddots(div, bull)) ; // bull
|
||||
|
||||
content = div.innerHTML;
|
||||
}
|
||||
|
||||
// Replace all headers with strong and fix some other issues
|
||||
if (this.editor.getParam("paste_convert_headers_to_strong", false)) {
|
||||
content = content.replace(/<h[1-6]> <\/h[1-6]>/gi, '<p> </p>');
|
||||
content = content.replace(/<h[1-6]>/gi, '<p><b>');
|
||||
content = content.replace(/<\/h[1-6]>/gi, '</b></p>');
|
||||
content = content.replace(/<b> <\/b>/gi, '<b> </b>');
|
||||
content = content.replace(/^( )*/gi, '');
|
||||
}
|
||||
|
||||
content = content.replace(/--list--/gi, ""); // Remove --list--
|
||||
|
||||
if ((cb = this.editor.getParam("paste_insert_word_content_callback", "")) != "")
|
||||
content = eval(cb + "('after', content)");
|
||||
|
||||
// Insert cleaned content
|
||||
this.editor.execCommand("mceInsertContent", false, content);
|
||||
|
||||
if (this.editor.getParam('paste_force_cleanup_wordpaste', true)) {
|
||||
var ed = this.editor;
|
||||
|
||||
window.setTimeout(function() {
|
||||
ed.execCommand("mceCleanup");
|
||||
}, 1); // Do normal cleanup detached from this thread
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_reEscape : function(s) {
|
||||
var l = "?.\\*[](){}+^$:";
|
||||
var o = "";
|
||||
|
||||
for (var i=0; i<s.length; i++) {
|
||||
var c = s.charAt(i);
|
||||
|
||||
if (l.indexOf(c) != -1)
|
||||
o += '\\' + c;
|
||||
else
|
||||
o += c;
|
||||
}
|
||||
|
||||
return o;
|
||||
},
|
||||
|
||||
_convertMiddots : function(div, search, class_name) {
|
||||
var mdot = String.fromCharCode(183);
|
||||
var bull = String.fromCharCode(8226);
|
||||
var middot = String.fromCharCode(183);
|
||||
var cb;
|
||||
|
||||
if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "")
|
||||
content = eval(cb + "('before', content)");
|
||||
var nodes = div.getElementsByTagName("p");
|
||||
var prevul;
|
||||
for (var i=0; i<nodes.length; i++) {
|
||||
var p = nodes[i];
|
||||
|
||||
var rl = tinyMCE.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');
|
||||
for (var i=0; i<rl.length; i+=2)
|
||||
content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);
|
||||
// Is middot
|
||||
if (p.innerHTML.indexOf(search) == 0) {
|
||||
var ul = document.createElement("ul");
|
||||
|
||||
if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) {
|
||||
content = content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>', 'gi'), '<p><b>$1</b></p>');
|
||||
}
|
||||
if (class_name)
|
||||
ul.className = class_name;
|
||||
|
||||
content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--");
|
||||
content = content.replace(new RegExp(bull + "(.*?)<BR>", "gi"), "<p>" + middot + "$1</p>");
|
||||
content = content.replace(new RegExp('<SPAN style="mso-list: Ignore">', 'gi'), "<span>" + bull); // Covert to bull list
|
||||
content = content.replace(/<o:p><\/o:p>/gi, "");
|
||||
content = content.replace(new RegExp('<br style="page-break-before: always;.*>', 'gi'), '-- page break --'); // Replace pagebreaks
|
||||
content = content.replace(new RegExp('<(!--)([^>]*)(--)>', 'g'), ""); // Word comments
|
||||
|
||||
if (tinyMCE.getParam("paste_remove_spans", true))
|
||||
content = content.replace(/<\/?span[^>]*>/gi, "");
|
||||
|
||||
if (tinyMCE.getParam("paste_remove_styles", true))
|
||||
content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3");
|
||||
|
||||
content = content.replace(/<\/?font[^>]*>/gi, "");
|
||||
|
||||
// Strips class attributes.
|
||||
switch (tinyMCE.getParam("paste_strip_class_attributes", "all")) {
|
||||
case "all":
|
||||
content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");
|
||||
break;
|
||||
|
||||
case "mso":
|
||||
content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3");
|
||||
break;
|
||||
}
|
||||
|
||||
content = content.replace(new RegExp('href="?' + TinyMCE_PastePlugin._reEscape("" + document.location) + '', 'gi'), 'href="' + tinyMCE.settings['document_base_url']);
|
||||
content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
|
||||
content = content.replace(/<\\?\?xml[^>]*>/gi, "");
|
||||
content = content.replace(/<\/?\w+:[^>]*>/gi, "");
|
||||
content = content.replace(/-- page break --\s*<p> <\/p>/gi, ""); // Remove pagebreaks
|
||||
content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks
|
||||
|
||||
// content = content.replace(/\/? */gi, "");
|
||||
// content = content.replace(/<p> <\/p>/gi, '');
|
||||
|
||||
if (!tinyMCE.settings['force_p_newlines']) {
|
||||
content = content.replace('', '' ,'gi');
|
||||
content = content.replace('</p>', '<br /><br />' ,'gi');
|
||||
}
|
||||
|
||||
if (!tinyMCE.isMSIE && !tinyMCE.settings['force_p_newlines']) {
|
||||
content = content.replace(/<\/?p[^>]*>/gi, "");
|
||||
}
|
||||
|
||||
content = content.replace(/<\/?div[^>]*>/gi, "");
|
||||
|
||||
// Convert all middlot lists to UL lists
|
||||
if (tinyMCE.getParam("paste_convert_middot_lists", true)) {
|
||||
var div = document.createElement("div");
|
||||
div.innerHTML = content;
|
||||
|
||||
// Convert all middot paragraphs to li elements
|
||||
var className = tinyMCE.getParam("paste_unindented_list_class", "unIndentedList");
|
||||
|
||||
while (TinyMCE_PastePlugin._convertMiddots(div, "--list--")) ; // bull
|
||||
while (TinyMCE_PastePlugin._convertMiddots(div, middot, className)) ; // Middot
|
||||
while (TinyMCE_PastePlugin._convertMiddots(div, bull)) ; // bull
|
||||
|
||||
content = div.innerHTML;
|
||||
}
|
||||
|
||||
// Replace all headers with strong and fix some other issues
|
||||
if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) {
|
||||
content = content.replace(/<h[1-6]> <\/h[1-6]>/gi, '<p> </p>');
|
||||
content = content.replace(/<h[1-6]>/gi, '<p><b>');
|
||||
content = content.replace(/<\/h[1-6]>/gi, '</b></p>');
|
||||
content = content.replace(/<b> <\/b>/gi, '<b> </b>');
|
||||
content = content.replace(/^( )*/gi, '');
|
||||
}
|
||||
|
||||
content = content.replace(/--list--/gi, ""); // Remove --list--
|
||||
|
||||
if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "")
|
||||
content = eval(cb + "('after', content)");
|
||||
|
||||
// Insert cleaned content
|
||||
tinyMCE.execCommand("mceInsertContent", false, content);
|
||||
|
||||
if (tinyMCE.getParam('paste_force_cleanup_wordpaste', true))
|
||||
window.setTimeout('tinyMCE.execCommand("mceCleanup");', 1); // Do normal cleanup detached from this thread
|
||||
}
|
||||
},
|
||||
|
||||
_reEscape : function(s) {
|
||||
var l = "?.\\*[](){}+^$:";
|
||||
var o = "";
|
||||
|
||||
for (var i=0; i<s.length; i++) {
|
||||
var c = s.charAt(i);
|
||||
|
||||
if (l.indexOf(c) != -1)
|
||||
o += '\\' + c;
|
||||
else
|
||||
o += c;
|
||||
}
|
||||
|
||||
return o;
|
||||
},
|
||||
|
||||
_convertMiddots : function(div, search, class_name) {
|
||||
var mdot = String.fromCharCode(183);
|
||||
var bull = String.fromCharCode(8226);
|
||||
|
||||
var nodes = div.getElementsByTagName("p");
|
||||
var prevul;
|
||||
for (var i=0; i<nodes.length; i++) {
|
||||
var p = nodes[i];
|
||||
|
||||
// Is middot
|
||||
if (p.innerHTML.indexOf(search) == 0) {
|
||||
var ul = document.createElement("ul");
|
||||
|
||||
if (class_name)
|
||||
ul.className = class_name;
|
||||
|
||||
// Add the first one
|
||||
var li = document.createElement("li");
|
||||
li.innerHTML = p.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), '');
|
||||
ul.appendChild(li);
|
||||
|
||||
// Add the rest
|
||||
var np = p.nextSibling;
|
||||
while (np) {
|
||||
// If the node is whitespace, then
|
||||
// ignore it and continue on.
|
||||
if (np.nodeType == 3 && new RegExp('^\\s$', 'm').test(np.nodeValue)) {
|
||||
np = np.nextSibling;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (search == mdot) {
|
||||
if (np.nodeType == 1 && new RegExp('^o(\\s+| )').test(np.innerHTML)) {
|
||||
// Second level of nesting
|
||||
if (!prevul) {
|
||||
prevul = ul;
|
||||
ul = document.createElement("ul");
|
||||
prevul.appendChild(ul);
|
||||
}
|
||||
np.innerHTML = np.innerHTML.replace(/^o/, '');
|
||||
} else {
|
||||
// Pop the stack if we're going back up to the first level
|
||||
if (prevul) {
|
||||
ul = prevul;
|
||||
prevul = null;
|
||||
}
|
||||
// Not element or middot paragraph
|
||||
if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0)
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// Not element or middot paragraph
|
||||
if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
var cp = np.nextSibling;
|
||||
// Add the first one
|
||||
var li = document.createElement("li");
|
||||
li.innerHTML = np.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), '');
|
||||
np.parentNode.removeChild(np);
|
||||
li.innerHTML = p.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), '');
|
||||
ul.appendChild(li);
|
||||
np = cp;
|
||||
|
||||
// Add the rest
|
||||
var np = p.nextSibling;
|
||||
while (np) {
|
||||
// If the node is whitespace, then
|
||||
// ignore it and continue on.
|
||||
if (np.nodeType == 3 && new RegExp('^\\s$', 'm').test(np.nodeValue)) {
|
||||
np = np.nextSibling;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (search == mdot) {
|
||||
if (np.nodeType == 1 && new RegExp('^o(\\s+| )').test(np.innerHTML)) {
|
||||
// Second level of nesting
|
||||
if (!prevul) {
|
||||
prevul = ul;
|
||||
ul = document.createElement("ul");
|
||||
prevul.appendChild(ul);
|
||||
}
|
||||
np.innerHTML = np.innerHTML.replace(/^o/, '');
|
||||
} else {
|
||||
// Pop the stack if we're going back up to the first level
|
||||
if (prevul) {
|
||||
ul = prevul;
|
||||
prevul = null;
|
||||
}
|
||||
// Not element or middot paragraph
|
||||
if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0)
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// Not element or middot paragraph
|
||||
if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
var cp = np.nextSibling;
|
||||
var li = document.createElement("li");
|
||||
li.innerHTML = np.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), '');
|
||||
np.parentNode.removeChild(np);
|
||||
ul.appendChild(li);
|
||||
np = cp;
|
||||
}
|
||||
|
||||
p.parentNode.replaceChild(ul, p);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
_clipboardHTML : function() {
|
||||
var div = document.getElementById('_TinyMCE_clipboardHTML');
|
||||
|
||||
if (!div) {
|
||||
var div = document.createElement('DIV');
|
||||
div.id = '_TinyMCE_clipboardHTML';
|
||||
|
||||
with (div.style) {
|
||||
visibility = 'hidden';
|
||||
overflow = 'hidden';
|
||||
position = 'absolute';
|
||||
width = 1;
|
||||
height = 1;
|
||||
}
|
||||
|
||||
p.parentNode.replaceChild(ul, p);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
_clipboardHTML : function() {
|
||||
var div = document.getElementById('_TinyMCE_clipboardHTML');
|
||||
|
||||
if (!div) {
|
||||
var div = document.createElement('DIV');
|
||||
div.id = '_TinyMCE_clipboardHTML';
|
||||
|
||||
with (div.style) {
|
||||
visibility = 'hidden';
|
||||
overflow = 'hidden';
|
||||
position = 'absolute';
|
||||
width = 1;
|
||||
height = 1;
|
||||
document.body.appendChild(div);
|
||||
}
|
||||
|
||||
document.body.appendChild(div);
|
||||
div.innerHTML = '';
|
||||
var rng = document.body.createTextRange();
|
||||
rng.moveToElementText(div);
|
||||
rng.execCommand('Paste');
|
||||
var html = div.innerHTML;
|
||||
div.innerHTML = '';
|
||||
return html;
|
||||
}
|
||||
});
|
||||
|
||||
div.innerHTML = '';
|
||||
var rng = document.body.createTextRange();
|
||||
rng.moveToElementText(div);
|
||||
rng.execCommand('Paste');
|
||||
var html = div.innerHTML;
|
||||
div.innerHTML = '';
|
||||
return html;
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCE.addPlugin("paste", TinyMCE_PastePlugin);
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('paste', tinymce.plugins.PastePlugin);
|
||||
})();
|
42
wp-includes/js/tinymce/plugins/paste/js/pastetext.js
Normal file
@ -0,0 +1,42 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
function saveContent() {
|
||||
if (document.forms[0].htmlSource.value == '') {
|
||||
tinyMCEPopup.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
tinyMCEPopup.execCommand('mcePasteText', false, {
|
||||
html : document.forms[0].htmlSource.value,
|
||||
linebreaks : document.forms[0].linebreaks.checked
|
||||
});
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function onLoadInit() {
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
// Remove Gecko spellchecking
|
||||
if (tinymce.isGecko)
|
||||
document.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck");
|
||||
|
||||
resizeInputs();
|
||||
}
|
||||
|
||||
var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
|
||||
|
||||
function resizeInputs() {
|
||||
if (!tinymce.isIE) {
|
||||
wHeight = self.innerHeight-80;
|
||||
wWidth = self.innerWidth-17;
|
||||
} else {
|
||||
wHeight = document.body.clientHeight-80;
|
||||
wWidth = document.body.clientWidth-17;
|
||||
}
|
||||
|
||||
document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
|
||||
document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px';
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(onLoadInit);
|
56
wp-includes/js/tinymce/plugins/paste/js/pasteword.js
Normal file
@ -0,0 +1,56 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
function saveContent() {
|
||||
var html = document.getElementById("frmData").contentWindow.document.body.innerHTML;
|
||||
|
||||
if (html == ''){
|
||||
tinyMCEPopup.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
tinyMCEPopup.execCommand('mcePasteWord', false, html);
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function onLoadInit() {
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
// Fix for endless reloading in FF
|
||||
window.setTimeout('createIFrame();', 10);
|
||||
}
|
||||
|
||||
function createIFrame() {
|
||||
document.getElementById('iframecontainer').innerHTML = '<iframe id="frmData" name="frmData" class="sourceIframe" src="blank.htm" height="280" width="400" frameborder="0" style="background-color:#FFFFFF; width:100%;" dir="ltr" wrap="soft"></iframe>';
|
||||
}
|
||||
|
||||
var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
|
||||
|
||||
function initIframe(doc) {
|
||||
var dir = tinyMCEPopup.editor.settings.directionality;
|
||||
|
||||
doc.body.dir = dir;
|
||||
|
||||
// Remove Gecko spellchecking
|
||||
if (tinymce.isGecko)
|
||||
doc.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck");
|
||||
|
||||
resizeInputs();
|
||||
}
|
||||
|
||||
function resizeInputs() {
|
||||
if (!tinymce.isIE) {
|
||||
wHeight = self.innerHeight - 80;
|
||||
wWidth = self.innerWidth - 18;
|
||||
} else {
|
||||
wHeight = document.body.clientHeight - 80;
|
||||
wWidth = document.body.clientWidth - 18;
|
||||
}
|
||||
|
||||
var elm = document.getElementById('frmData');
|
||||
if (elm) {
|
||||
elm.style.height = Math.abs(wHeight) + 'px';
|
||||
elm.style.width = Math.abs(wWidth) + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(onLoadInit);
|
5
wp-includes/js/tinymce/plugins/paste/langs/en_dlg.js
Normal file
@ -0,0 +1,5 @@
|
||||
tinyMCE.addI18n('en.paste_dlg',{
|
||||
text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
|
||||
text_linebreaks:"Keep linebreaks",
|
||||
word_title:"Use CTRL+V on your keyboard to paste the text into the window."
|
||||
});
|
@ -1,34 +1,34 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{$lang_paste_text_desc}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="jscripts/pastetext.js"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body onload="tinyMCEPopup.executeOnLoad('onLoadInit();');" onresize="resizeInputs();" style="display: none">
|
||||
<form name="source" onsubmit="saveContent();">
|
||||
<div style="float: left" class="title">{$lang_paste_text_desc}</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{$lang_paste_text_linebreaks}</label>
|
||||
</div>
|
||||
|
||||
<br style="clear: both" />
|
||||
|
||||
<div>{$lang_paste_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>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div style="float: left">
|
||||
<input type="button" name="insert" value="{$lang_insert}" onclick="saveContent();" id="insert" />
|
||||
</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="button" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<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="js/pastetext.js"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
|
||||
<form name="source" onsubmit="saveContent();">
|
||||
<div style="float: left" class="title">{#paste.paste_text_desc}</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{#paste_dlg.text_linebreaks}</label>
|
||||
</div>
|
||||
|
||||
<br style="clear: both" />
|
||||
|
||||
<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>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div style="float: left">
|
||||
<input type="button" name="insert" value="{#insert}" onclick="saveContent();" id="insert" />
|
||||
</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -1,29 +1,29 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>{$lang_paste_word_desc}</title>
|
||||
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="jscripts/pasteword.js"></script>
|
||||
<link href="css/pasteword.css" rel="stylesheet" type="text/css" />
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body onload="tinyMCEPopup.executeOnLoad('onLoadInit();');" onresize="resizeInputs();" style="display: none">
|
||||
<form name="source" onsubmit="saveContent();" action="#">
|
||||
<div class="title">{$lang_paste_word_desc}</div>
|
||||
|
||||
<div>{$lang_paste_word_title}</div>
|
||||
|
||||
<div id="iframecontainer"></div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div style="float: left">
|
||||
<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="saveContent();" />
|
||||
</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>{#paste.paste_word_desc}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/pasteword.js"></script>
|
||||
<link href="css/pasteword.css" rel="stylesheet" type="text/css" />
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
|
||||
<form name="source" onsubmit="saveContent();" action="#">
|
||||
<div class="title">{#paste.paste_word_desc}</div>
|
||||
|
||||
<div>{#paste_dlg.word_title}</div>
|
||||
|
||||
<div id="iframecontainer"></div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div style="float: left">
|
||||
<input type="button" id="insert" name="insert" value="{#insert}" onclick="saveContent();" />
|
||||
</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
1
wp-includes/js/tinymce/plugins/safari/blank.htm
Normal file
@ -0,0 +1 @@
|
||||
<!-- WebKit -->
|
401
wp-includes/js/tinymce/plugins/safari/editor_plugin.js
Normal file
@ -0,0 +1,401 @@
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 264 2007-04-26 20:53:09Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
(function() {
|
||||
var Event = tinymce.dom.Event, grep = tinymce.grep, each = tinymce.each, inArray = tinymce.inArray, isOldWebKit = tinymce.isOldWebKit;
|
||||
|
||||
tinymce.create('tinymce.plugins.Safari', {
|
||||
init : function(ed) {
|
||||
var t = this, dom;
|
||||
|
||||
// Ignore on non webkit
|
||||
if (!tinymce.isWebKit)
|
||||
return;
|
||||
|
||||
t.editor = ed;
|
||||
t.webKitFontSizes = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', '-webkit-xxx-large'];
|
||||
t.namedFontSizes = ['xx-small', 'x-small','small','medium','large','x-large', 'xx-large'];
|
||||
|
||||
// Safari will crash if the build in createlink command is used
|
||||
/* ed.addCommand('CreateLink', function(u, v) {
|
||||
ed.execCommand("mceInsertContent", false, '<a href="' + dom.encode(v) + '">' + ed.selection.getContent() + '</a>');
|
||||
});*/
|
||||
|
||||
// Workaround for FormatBlock bug, http://bugs.webkit.org/show_bug.cgi?id=16004
|
||||
ed.addCommand('FormatBlock', function(u, v) {
|
||||
var dom = ed.dom, e = dom.getParent(ed.selection.getNode(), dom.isBlock);
|
||||
|
||||
if (e)
|
||||
dom.replace(dom.create(v), e, 1);
|
||||
else
|
||||
ed.getDoc().execCommand("FormatBlock", false, v);
|
||||
});
|
||||
|
||||
// Workaround for InsertHTML bug, http://bugs.webkit.org/show_bug.cgi?id=16382
|
||||
ed.addCommand('mceInsertContent', function(u, v) {
|
||||
ed.getDoc().execCommand("InsertText", false, 'mce_marker');
|
||||
ed.getBody().innerHTML = ed.getBody().innerHTML.replace(/mce_marker/g, v + '<span id="_mce_tmp">XX</span>');
|
||||
ed.selection.select(ed.dom.get('_mce_tmp'));
|
||||
ed.getDoc().execCommand("Delete", false, ' ');
|
||||
});
|
||||
|
||||
// Workaround for List ID bug, http://bugs.webkit.org/show_bug.cgi?id=16004
|
||||
/* function addList(c) {
|
||||
var cb = Event.add(ed.getDoc(), 'DOMNodeInserted', function(e) {
|
||||
e = e.target;
|
||||
|
||||
if (e.nodeName == 'OL' || e.nodeName == 'UL')
|
||||
e.id = '';
|
||||
});
|
||||
|
||||
ed.getDoc().execCommand(c, false, false);
|
||||
Event.remove(ed.getDoc(), 'DOMNodeInserted', cb);
|
||||
};
|
||||
|
||||
ed.addCommand('InsertUnorderedList', function() {addList('InsertUnorderedList');});
|
||||
ed.addCommand('InsertOrderedList', function() {addList('InsertOrderedList');});*/
|
||||
|
||||
// Safari returns incorrect values
|
||||
ed.addQueryValueHandler('FontSize', function(u, v) {
|
||||
var e, v;
|
||||
|
||||
// Check for the real font size at the start of selection
|
||||
if ((e = ed.dom.getParent(ed.selection.getStart(), 'span')) && (v = e.style.fontSize))
|
||||
return tinymce.inArray(t.namedFontSizes, v) + 1;
|
||||
|
||||
// Check for the real font size at the end of selection
|
||||
if ((e = ed.dom.getParent(ed.selection.getEnd(), 'span')) && (v = e.style.fontSize))
|
||||
return tinymce.inArray(t.namedFontSizes, v) + 1;
|
||||
|
||||
// Return default value it's better than nothing right!
|
||||
return ed.getDoc().queryCommandValue('FontSize');
|
||||
});
|
||||
|
||||
// Safari returns incorrect values
|
||||
ed.addQueryValueHandler('FontName', function(u, v) {
|
||||
var e, v;
|
||||
|
||||
// Check for the real font name at the start of selection
|
||||
if ((e = ed.dom.getParent(ed.selection.getStart(), 'span')) && (v = e.style.fontFamily))
|
||||
return v.replace(/, /g, ',');
|
||||
|
||||
// Check for the real font name at the end of selection
|
||||
if ((e = ed.dom.getParent(ed.selection.getEnd(), 'span')) && (v = e.style.fontFamily))
|
||||
return v.replace(/, /g, ',');
|
||||
|
||||
// Return default value it's better than nothing right!
|
||||
return ed.getDoc().queryCommandValue('FontName');
|
||||
});
|
||||
|
||||
// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250
|
||||
ed.onClick.add(function(ed, e) {
|
||||
e = e.target;
|
||||
|
||||
if (e.nodeName == 'IMG') {
|
||||
t.selElm = e;
|
||||
ed.selection.select(e);
|
||||
} else
|
||||
t.selElm = null;
|
||||
});
|
||||
|
||||
ed.onBeforeExecCommand.add(function(ed, c, b) {
|
||||
var r = t.bookmarkRng;
|
||||
|
||||
// Restore selection
|
||||
if (r) {
|
||||
ed.selection.setRng(r);
|
||||
t.bookmarkRng = null;
|
||||
//console.debug('restore', r.startContainer, r.startOffset, r.endContainer, r.endOffset);
|
||||
}
|
||||
});
|
||||
|
||||
ed.onInit.add(function() {
|
||||
t._fixWebKitSpans();
|
||||
|
||||
ed.windowManager.onOpen.add(function() {
|
||||
var r = ed.selection.getRng();
|
||||
|
||||
// Store selection if valid
|
||||
if (r.startContainer != ed.getDoc()) {
|
||||
t.bookmarkRng = r.cloneRange();
|
||||
//console.debug('store', r.startContainer, r.startOffset, r.endContainer, r.endOffset);
|
||||
}
|
||||
});
|
||||
|
||||
ed.windowManager.onClose.add(function() {
|
||||
t.bookmarkRng = null;
|
||||
});
|
||||
|
||||
if (isOldWebKit)
|
||||
t._patchSafari2x(ed);
|
||||
});
|
||||
|
||||
ed.onSetContent.add(function() {
|
||||
dom = ed.dom;
|
||||
|
||||
// Convert strong,b,em,u,strike to spans
|
||||
each(['strong','b','em','u','strike','sub','sup','a'], function(v) {
|
||||
each(grep(dom.select(v)).reverse(), function(n) {
|
||||
var nn = n.nodeName.toLowerCase(), st;
|
||||
|
||||
// Convert anchors into images
|
||||
if (nn == 'a') {
|
||||
if (n.name)
|
||||
dom.replace(dom.create('img', {mce_name : 'a', name : n.name, 'class' : 'mceItemAnchor'}), n);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
switch (nn) {
|
||||
case 'b':
|
||||
case 'strong':
|
||||
if (nn == 'b')
|
||||
nn = 'strong';
|
||||
|
||||
st = 'font-weight: bold;';
|
||||
break;
|
||||
|
||||
case 'em':
|
||||
st = 'font-style: italic;';
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
st = 'text-decoration: underline;';
|
||||
break;
|
||||
|
||||
case 'sub':
|
||||
st = 'vertical-align: sub;';
|
||||
break;
|
||||
|
||||
case 'sup':
|
||||
st = 'vertical-align: super;';
|
||||
break;
|
||||
|
||||
case 'strike':
|
||||
st = 'text-decoration: line-through;';
|
||||
break;
|
||||
}
|
||||
|
||||
dom.replace(dom.create('span', {mce_name : nn, style : st, 'class' : 'Apple-style-span'}), n, 1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
ed.onPreProcess.add(function(ed, o) {
|
||||
dom = ed.dom;
|
||||
|
||||
each(grep(o.node.getElementsByTagName('span')).reverse(), function(n) {
|
||||
var v, bg;
|
||||
|
||||
if (o.get) {
|
||||
if (dom.hasClass(n, 'Apple-style-span')) {
|
||||
bg = n.style.backgroundColor;
|
||||
|
||||
switch (dom.getAttrib(n, 'mce_name')) {
|
||||
case 'font':
|
||||
if (!ed.settings.convert_fonts_to_spans)
|
||||
dom.setAttrib(n, 'style', '');
|
||||
break;
|
||||
|
||||
case 'strong':
|
||||
case 'em':
|
||||
case 'sub':
|
||||
case 'sup':
|
||||
dom.setAttrib(n, 'style', '');
|
||||
break;
|
||||
|
||||
case 'strike':
|
||||
case 'u':
|
||||
if (!ed.settings.inline_styles)
|
||||
dom.setAttrib(n, 'style', '');
|
||||
else
|
||||
dom.setAttrib(n, 'mce_name', '');
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
if (!ed.settings.inline_styles)
|
||||
dom.setAttrib(n, 'style', '');
|
||||
}
|
||||
|
||||
|
||||
if (bg)
|
||||
n.style.backgroundColor = bg;
|
||||
}
|
||||
}
|
||||
|
||||
if (dom.hasClass(n, 'mceItemRemoved'))
|
||||
dom.remove(n, 1);
|
||||
});
|
||||
});
|
||||
|
||||
ed.onPostProcess.add(function(ed, o) {
|
||||
// Safari adds BR at end of all block elements
|
||||
o.content = o.content.replace(/<br \/><\/(h[1-6]|div|p|address|pre)>/g, '</$1>');
|
||||
|
||||
// Safari adds id="undefined" to HR elements
|
||||
o.content = o.content.replace(/ id=\"undefined\"/g, '');
|
||||
});
|
||||
},
|
||||
|
||||
_fixWebKitSpans : function() {
|
||||
var t = this, ed = t.editor;
|
||||
|
||||
if (!isOldWebKit) {
|
||||
// Use mutator events on new WebKit
|
||||
Event.add(ed.getDoc(), 'DOMNodeInserted', function(e) {
|
||||
e = e.target;
|
||||
|
||||
if (e && e.nodeType == 1)
|
||||
t._fixAppleSpan(e);
|
||||
});
|
||||
} else {
|
||||
// Do post command processing in old WebKit since the browser crashes on Mutator events :(
|
||||
ed.onExecCommand.add(function() {
|
||||
each(ed.dom.select('span'), function(n) {
|
||||
t._fixAppleSpan(n);
|
||||
});
|
||||
|
||||
ed.nodeChanged();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_fixAppleSpan : function(e) {
|
||||
var ed = this.editor, dom = ed.dom, fz = this.webKitFontSizes, fzn = this.namedFontSizes, s = ed.settings, st, p;
|
||||
|
||||
if (dom.getAttrib(e, 'mce_fixed'))
|
||||
return;
|
||||
|
||||
// Handle Apple style spans
|
||||
if (e.nodeName == 'SPAN' && e.className == 'Apple-style-span') {
|
||||
st = e.style;
|
||||
|
||||
if (!s.convert_fonts_to_spans) {
|
||||
if (st.fontSize) {
|
||||
dom.setAttrib(e, 'mce_name', 'font');
|
||||
dom.setAttrib(e, 'size', inArray(fz, st.fontSize) + 1);
|
||||
}
|
||||
|
||||
if (st.fontFamily) {
|
||||
dom.setAttrib(e, 'mce_name', 'font');
|
||||
dom.setAttrib(e, 'face', st.fontFamily);
|
||||
}
|
||||
|
||||
if (st.color) {
|
||||
dom.setAttrib(e, 'mce_name', 'font');
|
||||
dom.setAttrib(e, 'color', dom.toHex(st.color));
|
||||
}
|
||||
|
||||
if (st.backgroundColor) {
|
||||
dom.setAttrib(e, 'mce_name', 'font');
|
||||
dom.setStyle(e, 'background-color', st.backgroundColor);
|
||||
}
|
||||
} else {
|
||||
if (st.fontSize)
|
||||
dom.setStyle(e, 'fontSize', fzn[inArray(fz, st.fontSize)]);
|
||||
}
|
||||
|
||||
if (st.fontWeight == 'bold')
|
||||
dom.setAttrib(e, 'mce_name', 'strong');
|
||||
|
||||
if (st.fontStyle == 'italic')
|
||||
dom.setAttrib(e, 'mce_name', 'em');
|
||||
|
||||
if (st.textDecoration == 'underline')
|
||||
dom.setAttrib(e, 'mce_name', 'u');
|
||||
|
||||
if (st.textDecoration == 'line-through')
|
||||
dom.setAttrib(e, 'mce_name', 'strike');
|
||||
|
||||
if (st.verticalAlign == 'super')
|
||||
dom.setAttrib(e, 'mce_name', 'sup');
|
||||
|
||||
if (st.verticalAlign == 'sub')
|
||||
dom.setAttrib(e, 'mce_name', 'sub');
|
||||
|
||||
dom.setAttrib(e, 'mce_fixed', '1');
|
||||
}
|
||||
},
|
||||
|
||||
_patchSafari2x : function(ed) {
|
||||
var t = this, setContent, getNode, dom = ed.dom, lr;
|
||||
|
||||
// Inline dialogs
|
||||
if (ed.windowManager.onBeforeOpen) {
|
||||
ed.windowManager.onBeforeOpen.add(function() {
|
||||
r = ed.selection.getRng();
|
||||
});
|
||||
}
|
||||
|
||||
// Fake select on 2.x
|
||||
ed.selection.select = function(n) {
|
||||
this.getSel().setBaseAndExtent(n, 0, n, 1);
|
||||
};
|
||||
|
||||
getNode = ed.selection.getNode;
|
||||
ed.selection.getNode = function() {
|
||||
return t.selElm || getNode.call(this);
|
||||
};
|
||||
|
||||
// Fake range on Safari 2.x
|
||||
ed.selection.getRng = function() {
|
||||
var t = this, s = t.getSel(), d = ed.getDoc(), r, rb, ra, di;
|
||||
|
||||
// Fake range on Safari 2.x
|
||||
if (s.anchorNode) {
|
||||
r = d.createRange();
|
||||
|
||||
try {
|
||||
// Setup before range
|
||||
rb = d.createRange();
|
||||
rb.setStart(s.anchorNode, s.anchorOffset);
|
||||
rb.collapse(1);
|
||||
|
||||
// Setup after range
|
||||
ra = d.createRange();
|
||||
ra.setStart(s.focusNode, s.focusOffset);
|
||||
ra.collapse(1);
|
||||
|
||||
// Setup start/end points by comparing locations
|
||||
di = rb.compareBoundaryPoints(rb.START_TO_END, ra) < 0;
|
||||
r.setStart(di ? s.anchorNode : s.focusNode, di ? s.anchorOffset : s.focusOffset);
|
||||
r.setEnd(di ? s.focusNode : s.anchorNode, di ? s.focusOffset : s.anchorOffset);
|
||||
|
||||
lr = r;
|
||||
} catch (ex) {
|
||||
// Sometimes fails, at least we tried to do it by the book. I hope Safari 2.x will go disappear soooon!!!
|
||||
}
|
||||
}
|
||||
|
||||
return r || lr;
|
||||
};
|
||||
|
||||
// Fix setContent so it works
|
||||
setContent = ed.selection.setContent;
|
||||
ed.selection.setContent = function(h, s) {
|
||||
var r = this.getRng(), b;
|
||||
|
||||
try {
|
||||
setContent.call(this, h, s);
|
||||
} catch (ex) {
|
||||
// Workaround for Safari 2.x
|
||||
b = dom.create('body');
|
||||
b.innerHTML = h;
|
||||
|
||||
each(b.childNodes, function(n) {
|
||||
r.insertNode(n.cloneNode(true));
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('safari', tinymce.plugins.Safari);
|
||||
})();
|
||||
|
@ -0,0 +1,158 @@
|
||||
<?php
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
class GoogleSpell extends SpellChecker {
|
||||
/**
|
||||
* Spellchecks an array of words.
|
||||
*
|
||||
* @param {String} $lang Language code like sv or en.
|
||||
* @param {Array} $words Array of words to spellcheck.
|
||||
* @return {Array} Array of misspelled words.
|
||||
*/
|
||||
function &checkWords($lang, $words) {
|
||||
$wordstr = implode(' ', $words);
|
||||
$matches = $this->_getMatches($lang, $wordstr);
|
||||
$words = array();
|
||||
|
||||
for ($i=0; $i<count($matches); $i++)
|
||||
$words[] = $this->_unhtmlentities(mb_substr($wordstr, $matches[$i][1], $matches[$i][2], "UTF-8"));
|
||||
|
||||
return $words;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns suggestions of for a specific word.
|
||||
*
|
||||
* @param {String} $lang Language code like sv or en.
|
||||
* @param {String} $word Specific word to get suggestions for.
|
||||
* @return {Array} Array of suggestions for the specified word.
|
||||
*/
|
||||
function &getSuggestions($lang, $word) {
|
||||
$sug = array();
|
||||
$osug = array();
|
||||
$matches = $this->_getMatches($lang, $word);
|
||||
|
||||
if (count($matches) > 0)
|
||||
$sug = explode("\t", utf8_encode($this->_unhtmlentities($matches[0][4])));
|
||||
|
||||
// Remove empty
|
||||
foreach ($sug as $item) {
|
||||
if ($item)
|
||||
$osug[] = $item;
|
||||
}
|
||||
|
||||
return $osug;
|
||||
}
|
||||
|
||||
function &_getMatches($lang, $str) {
|
||||
$server = "www.google.com";
|
||||
$port = 443;
|
||||
$path = "/tbproxy/spell?lang=" . $lang . "&hl=en";
|
||||
$host = "www.google.com";
|
||||
$url = "https://" . $server;
|
||||
|
||||
// Setup XML request
|
||||
$xml = '<?xml version="1.0" encoding="utf-8" ?><spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1"><text>' . $str . '</text></spellrequest>';
|
||||
|
||||
$header = "POST ".$path." HTTP/1.0 \r\n";
|
||||
$header .= "MIME-Version: 1.0 \r\n";
|
||||
$header .= "Content-type: application/PTI26 \r\n";
|
||||
$header .= "Content-length: ".strlen($xml)." \r\n";
|
||||
$header .= "Content-transfer-encoding: text \r\n";
|
||||
$header .= "Request-number: 1 \r\n";
|
||||
$header .= "Document-type: Request \r\n";
|
||||
$header .= "Interface-Version: Test 1.4 \r\n";
|
||||
$header .= "Connection: close \r\n\r\n";
|
||||
$header .= $xml;
|
||||
|
||||
// Use curl if it exists
|
||||
if (function_exists('curl_init')) {
|
||||
// Use curl
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL,$url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
$xml = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
} else {
|
||||
// Use raw sockets
|
||||
$fp = fsockopen("ssl://" . $server, $port, $errno, $errstr, 30);
|
||||
if ($fp) {
|
||||
// Send request
|
||||
fwrite($fp, $header);
|
||||
|
||||
// Read response
|
||||
$xml = "";
|
||||
while (!feof($fp))
|
||||
$xml .= fgets($fp, 128);
|
||||
|
||||
fclose($fp);
|
||||
} else
|
||||
echo "Could not open SSL connection to google.";
|
||||
}
|
||||
|
||||
// Grab and parse content
|
||||
$matches = array();
|
||||
preg_match_all('/<c o="([^"]*)" l="([^"]*)" s="([^"]*)">([^<]*)<\/c>/', $xml, $matches, PREG_SET_ORDER);
|
||||
|
||||
return $matches;
|
||||
}
|
||||
|
||||
function _unhtmlentities($string) {
|
||||
$string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
|
||||
$string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string);
|
||||
|
||||
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
|
||||
$trans_tbl = array_flip($trans_tbl);
|
||||
|
||||
return strtr($string, $trans_tbl);
|
||||
}
|
||||
}
|
||||
|
||||
// Patch in multibyte support
|
||||
if (!function_exists('mb_substr')) {
|
||||
function mb_substr($str, $start, $len = '', $encoding="UTF-8"){
|
||||
$limit = strlen($str);
|
||||
|
||||
for ($s = 0; $start > 0;--$start) {// found the real start
|
||||
if ($s >= $limit)
|
||||
break;
|
||||
|
||||
if ($str[$s] <= "\x7F")
|
||||
++$s;
|
||||
else {
|
||||
++$s; // skip length
|
||||
|
||||
while ($str[$s] >= "\x80" && $str[$s] <= "\xBF")
|
||||
++$s;
|
||||
}
|
||||
}
|
||||
|
||||
if ($len == '')
|
||||
return substr($str, $s);
|
||||
else
|
||||
for ($e = $s; $len > 0; --$len) {//found the real end
|
||||
if ($e >= $limit)
|
||||
break;
|
||||
|
||||
if ($str[$e] <= "\x7F")
|
||||
++$e;
|
||||
else {
|
||||
++$e;//skip length
|
||||
|
||||
while ($str[$e] >= "\x80" && $str[$e] <= "\xBF" && $e < $limit)
|
||||
++$e;
|
||||
}
|
||||
}
|
||||
|
||||
return substr($str, $s, $e - $s);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
class PSpell extends SpellChecker {
|
||||
/**
|
||||
* Spellchecks an array of words.
|
||||
*
|
||||
* @param {String} $lang Language code like sv or en.
|
||||
* @param {Array} $words Array of words to spellcheck.
|
||||
* @return {Array} Array of misspelled words.
|
||||
*/
|
||||
function &checkWords($lang, $words) {
|
||||
$plink = $this->_getPLink($lang);
|
||||
|
||||
$outWords = array();
|
||||
foreach ($words as $word) {
|
||||
if (!pspell_check($plink, trim($word)))
|
||||
$outWords[] = utf8_encode($word);
|
||||
}
|
||||
|
||||
return $outWords;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns suggestions of for a specific word.
|
||||
*
|
||||
* @param {String} $lang Language code like sv or en.
|
||||
* @param {String} $word Specific word to get suggestions for.
|
||||
* @return {Array} Array of suggestions for the specified word.
|
||||
*/
|
||||
function &getSuggestions($lang, $word) {
|
||||
$words = pspell_suggest($this->_getPLink($lang), $word);
|
||||
|
||||
for ($i=0; $i<count($words); $i++)
|
||||
$words[$i] = utf8_encode($words[$i]);
|
||||
|
||||
return $words;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a link for pspell.
|
||||
*/
|
||||
function &_getPLink($lang) {
|
||||
// Check for native PSpell support
|
||||
if (!function_exists("pspell_new"))
|
||||
$this->throwError("PSpell support not found in PHP installation.");
|
||||
|
||||
// Setup PSpell link
|
||||
$plink = pspell_new(
|
||||
$lang,
|
||||
$this->_config['PSpell.spelling'],
|
||||
$this->_config['PSpell.jargon'],
|
||||
$this->_config['PSpell.encoding'],
|
||||
$this->_config['PSpell.mode']
|
||||
);
|
||||
|
||||
// Setup PSpell link
|
||||
/* if (!$plink) {
|
||||
$pspellConfig = pspell_config_create(
|
||||
$lang,
|
||||
$this->_config['PSpell.spelling'],
|
||||
$this->_config['PSpell.jargon'],
|
||||
$this->_config['PSpell.encoding']
|
||||
);
|
||||
|
||||
$plink = pspell_new_config($pspell_config);
|
||||
}*/
|
||||
|
||||
if (!$plink)
|
||||
$this->throwError("No PSpell link found opened.");
|
||||
|
||||
return $plink;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
class PSpellShell extends SpellChecker {
|
||||
/**
|
||||
* Spellchecks an array of words.
|
||||
*
|
||||
* @param {String} $lang Language code like sv or en.
|
||||
* @param {Array} $words Array of words to spellcheck.
|
||||
* @return {Array} Array of misspelled words.
|
||||
*/
|
||||
function &checkWords($lang, $words) {
|
||||
$cmd = $this->_getCMD($lang);
|
||||
|
||||
if ($fh = fopen($this->_tmpfile, "w")) {
|
||||
fwrite($fh, "!\n");
|
||||
|
||||
foreach($words as $key => $value)
|
||||
fwrite($fh, "^" . $value . "\n");
|
||||
|
||||
fclose($fh);
|
||||
} else
|
||||
$this->throwError("PSpell support was not found.");
|
||||
|
||||
$data = shell_exec($cmd);
|
||||
@unlink($this->_tmpfile);
|
||||
|
||||
$returnData = array();
|
||||
$dataArr = preg_split("/[\r\n]/", $data, -1, PREG_SPLIT_NO_EMPTY);
|
||||
|
||||
foreach ($dataArr as $dstr) {
|
||||
$matches = array();
|
||||
|
||||
// Skip this line.
|
||||
if (strpos($dstr, "@") === 0)
|
||||
continue;
|
||||
|
||||
preg_match("/\& ([^ ]+) .*/i", $dstr, $matches);
|
||||
|
||||
if (!empty($matches[1]))
|
||||
$returnData[] = utf8_encode(trim($matches[1]));
|
||||
}
|
||||
|
||||
return $returnData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns suggestions of for a specific word.
|
||||
*
|
||||
* @param {String} $lang Language code like sv or en.
|
||||
* @param {String} $word Specific word to get suggestions for.
|
||||
* @return {Array} Array of suggestions for the specified word.
|
||||
*/
|
||||
function &getSuggestions($lang, $word) {
|
||||
$cmd = $this->_getCMD($lang);
|
||||
|
||||
if (function_exists("mb_convert_encoding"))
|
||||
$word = mb_convert_encoding($word, "ISO-8859-1", mb_detect_encoding($word, "UTF-8"));
|
||||
else
|
||||
$word = utf8_encode($word);
|
||||
|
||||
if ($fh = fopen($this->_tmpfile, "w")) {
|
||||
fwrite($fh, "!\n");
|
||||
fwrite($fh, "^$word\n");
|
||||
fclose($fh);
|
||||
} else
|
||||
$this->throwError("Error opening tmp file.");
|
||||
|
||||
$data = shell_exec($cmd);
|
||||
@unlink($this->_tmpfile);
|
||||
|
||||
$returnData = array();
|
||||
$dataArr = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY);
|
||||
|
||||
foreach($dataArr as $dstr) {
|
||||
$matches = array();
|
||||
|
||||
// Skip this line.
|
||||
if (strpos($dstr, "@") === 0)
|
||||
continue;
|
||||
|
||||
preg_match("/\&[^:]+:(.*)/i", $dstr, $matches);
|
||||
|
||||
if (!empty($matches[1])) {
|
||||
$words = array_slice(explode(',', $matches[1]), 0, 10);
|
||||
|
||||
for ($i=0; $i<count($words); $i++)
|
||||
$words[$i] = trim($words[$i]);
|
||||
|
||||
return $words;
|
||||
}
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
function _getCMD($lang) {
|
||||
$this->_tmpfile = tempnam($this->_config['PSpellShell.tmp'], "tinyspell");
|
||||
|
||||
if(preg_match("#win#i", php_uname()))
|
||||
return $this->_config['PSpellShell.aspell'] . " -a --lang=". $lang . " --encoding=utf-8 -H < " . $this->_tmpfile . " 2>&1";
|
||||
|
||||
return "cat ". $this->_tmpfile ." | " . $this->_config['PSpellShell.aspell'] . " -a --encoding=utf-8 -H --lang=". $lang;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
class SpellChecker {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param $config Configuration name/value array.
|
||||
*/
|
||||
function SpellChecker(&$config) {
|
||||
$this->_config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple loopback function everything that gets in will be send back.
|
||||
*
|
||||
* @param $args.. Arguments.
|
||||
* @return {Array} Array of all input arguments.
|
||||
*/
|
||||
function &loopback(/* args.. */) {
|
||||
return func_get_args();
|
||||
}
|
||||
|
||||
/**
|
||||
* Spellchecks an array of words.
|
||||
*
|
||||
* @param {String} $lang Language code like sv or en.
|
||||
* @param {Array} $words Array of words to spellcheck.
|
||||
* @return {Array} Array of misspelled words.
|
||||
*/
|
||||
function &checkWords($lang, $words) {
|
||||
return $words;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns suggestions of for a specific word.
|
||||
*
|
||||
* @param {String} $lang Language code like sv or en.
|
||||
* @param {String} $word Specific word to get suggestions for.
|
||||
* @return {Array} Array of suggestions for the specified word.
|
||||
*/
|
||||
function &getSuggestions($lang, $word) {
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws an error message back to the user. This will stop all execution.
|
||||
*
|
||||
* @param {String} $str Message to send back to user.
|
||||
*/
|
||||
function throwError($str) {
|
||||
die('{"result":null,"id":null,"error":{"errstr":"' . addslashes($str) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,595 @@
|
||||
<?php
|
||||
/**
|
||||
* $Id: JSON.php 40 2007-06-18 11:43:15Z spocke $
|
||||
*
|
||||
* @package MCManager.utils
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
define('JSON_BOOL', 1);
|
||||
define('JSON_INT', 2);
|
||||
define('JSON_STR', 3);
|
||||
define('JSON_FLOAT', 4);
|
||||
define('JSON_NULL', 5);
|
||||
define('JSON_START_OBJ', 6);
|
||||
define('JSON_END_OBJ', 7);
|
||||
define('JSON_START_ARRAY', 8);
|
||||
define('JSON_END_ARRAY', 9);
|
||||
define('JSON_KEY', 10);
|
||||
define('JSON_SKIP', 11);
|
||||
|
||||
define('JSON_IN_ARRAY', 30);
|
||||
define('JSON_IN_OBJECT', 40);
|
||||
define('JSON_IN_BETWEEN', 50);
|
||||
|
||||
class Moxiecode_JSONReader {
|
||||
var $_data, $_len, $_pos;
|
||||
var $_value, $_token;
|
||||
var $_location, $_lastLocations;
|
||||
var $_needProp;
|
||||
|
||||
function Moxiecode_JSONReader($data) {
|
||||
$this->_data = $data;
|
||||
$this->_len = strlen($data);
|
||||
$this->_pos = -1;
|
||||
$this->_location = JSON_IN_BETWEEN;
|
||||
$this->_lastLocations = array();
|
||||
$this->_needProp = false;
|
||||
}
|
||||
|
||||
function getToken() {
|
||||
return $this->_token;
|
||||
}
|
||||
|
||||
function getLocation() {
|
||||
return $this->_location;
|
||||
}
|
||||
|
||||
function getTokenName() {
|
||||
switch ($this->_token) {
|
||||
case JSON_BOOL:
|
||||
return 'JSON_BOOL';
|
||||
|
||||
case JSON_INT:
|
||||
return 'JSON_INT';
|
||||
|
||||
case JSON_STR:
|
||||
return 'JSON_STR';
|
||||
|
||||
case JSON_FLOAT:
|
||||
return 'JSON_FLOAT';
|
||||
|
||||
case JSON_NULL:
|
||||
return 'JSON_NULL';
|
||||
|
||||
case JSON_START_OBJ:
|
||||
return 'JSON_START_OBJ';
|
||||
|
||||
case JSON_END_OBJ:
|
||||
return 'JSON_END_OBJ';
|
||||
|
||||
case JSON_START_ARRAY:
|
||||
return 'JSON_START_ARRAY';
|
||||
|
||||
case JSON_END_ARRAY:
|
||||
return 'JSON_END_ARRAY';
|
||||
|
||||
case JSON_KEY:
|
||||
return 'JSON_KEY';
|
||||
}
|
||||
|
||||
return 'UNKNOWN';
|
||||
}
|
||||
|
||||
function getValue() {
|
||||
return $this->_value;
|
||||
}
|
||||
|
||||
function readToken() {
|
||||
$chr = $this->read();
|
||||
|
||||
if ($chr != null) {
|
||||
switch ($chr) {
|
||||
case '[':
|
||||
$this->_lastLocation[] = $this->_location;
|
||||
$this->_location = JSON_IN_ARRAY;
|
||||
$this->_token = JSON_START_ARRAY;
|
||||
$this->_value = null;
|
||||
$this->readAway();
|
||||
return true;
|
||||
|
||||
case ']':
|
||||
$this->_location = array_pop($this->_lastLocation);
|
||||
$this->_token = JSON_END_ARRAY;
|
||||
$this->_value = null;
|
||||
$this->readAway();
|
||||
|
||||
if ($this->_location == JSON_IN_OBJECT)
|
||||
$this->_needProp = true;
|
||||
|
||||
return true;
|
||||
|
||||
case '{':
|
||||
$this->_lastLocation[] = $this->_location;
|
||||
$this->_location = JSON_IN_OBJECT;
|
||||
$this->_needProp = true;
|
||||
$this->_token = JSON_START_OBJ;
|
||||
$this->_value = null;
|
||||
$this->readAway();
|
||||
return true;
|
||||
|
||||
case '}':
|
||||
$this->_location = array_pop($this->_lastLocation);
|
||||
$this->_token = JSON_END_OBJ;
|
||||
$this->_value = null;
|
||||
$this->readAway();
|
||||
|
||||
if ($this->_location == JSON_IN_OBJECT)
|
||||
$this->_needProp = true;
|
||||
|
||||
return true;
|
||||
|
||||
// String
|
||||
case '"':
|
||||
case '\'':
|
||||
return $this->_readString($chr);
|
||||
|
||||
// Null
|
||||
case 'n':
|
||||
return $this->_readNull();
|
||||
|
||||
// Bool
|
||||
case 't':
|
||||
case 'f':
|
||||
return $this->_readBool($chr);
|
||||
|
||||
default:
|
||||
// Is number
|
||||
if (is_numeric($chr) || $chr == '-' || $chr == '.')
|
||||
return $this->_readNumber($chr);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function _readBool($chr) {
|
||||
$this->_token = JSON_BOOL;
|
||||
$this->_value = $chr == 't';
|
||||
|
||||
if ($chr == 't')
|
||||
$this->skip(3); // rue
|
||||
else
|
||||
$this->skip(4); // alse
|
||||
|
||||
$this->readAway();
|
||||
|
||||
if ($this->_location == JSON_IN_OBJECT && !$this->_needProp)
|
||||
$this->_needProp = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function _readNull() {
|
||||
$this->_token = JSON_NULL;
|
||||
$this->_value = null;
|
||||
|
||||
$this->skip(3); // ull
|
||||
$this->readAway();
|
||||
|
||||
if ($this->_location == JSON_IN_OBJECT && !$this->_needProp)
|
||||
$this->_needProp = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function _readString($quote) {
|
||||
$output = "";
|
||||
$this->_token = JSON_STR;
|
||||
$endString = false;
|
||||
|
||||
while (($chr = $this->peek()) != -1) {
|
||||
switch ($chr) {
|
||||
case '\\':
|
||||
// Read away slash
|
||||
$this->read();
|
||||
|
||||
// Read escape code
|
||||
$chr = $this->read();
|
||||
switch ($chr) {
|
||||
case 't':
|
||||
$output .= "\t";
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
$output .= "\b";
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
$output .= "\f";
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
$output .= "\r";
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
$output .= "\n";
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
$output .= $this->_int2utf8(hexdec($this->read(4)));
|
||||
break;
|
||||
|
||||
default:
|
||||
$output .= $chr;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case '\'':
|
||||
case '"':
|
||||
if ($chr == $quote)
|
||||
$endString = true;
|
||||
|
||||
$chr = $this->read();
|
||||
if ($chr != -1 && $chr != $quote)
|
||||
$output .= $chr;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
$output .= $this->read();
|
||||
}
|
||||
|
||||
// String terminated
|
||||
if ($endString)
|
||||
break;
|
||||
}
|
||||
|
||||
$this->readAway();
|
||||
$this->_value = $output;
|
||||
|
||||
// Needed a property
|
||||
if ($this->_needProp) {
|
||||
$this->_token = JSON_KEY;
|
||||
$this->_needProp = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($this->_location == JSON_IN_OBJECT && !$this->_needProp)
|
||||
$this->_needProp = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function _int2utf8($int) {
|
||||
$int = intval($int);
|
||||
|
||||
switch ($int) {
|
||||
case 0:
|
||||
return chr(0);
|
||||
|
||||
case ($int & 0x7F):
|
||||
return chr($int);
|
||||
|
||||
case ($int & 0x7FF):
|
||||
return chr(0xC0 | (($int >> 6) & 0x1F)) . chr(0x80 | ($int & 0x3F));
|
||||
|
||||
case ($int & 0xFFFF):
|
||||
return chr(0xE0 | (($int >> 12) & 0x0F)) . chr(0x80 | (($int >> 6) & 0x3F)) . chr (0x80 | ($int & 0x3F));
|
||||
|
||||
case ($int & 0x1FFFFF):
|
||||
return chr(0xF0 | ($int >> 18)) . chr(0x80 | (($int >> 12) & 0x3F)) . chr(0x80 | (($int >> 6) & 0x3F)) . chr(0x80 | ($int & 0x3F));
|
||||
}
|
||||
}
|
||||
|
||||
function _readNumber($start) {
|
||||
$value = "";
|
||||
$isFloat = false;
|
||||
|
||||
$this->_token = JSON_INT;
|
||||
$value .= $start;
|
||||
|
||||
while (($chr = $this->peek()) != -1) {
|
||||
if (is_numeric($chr) || $chr == '-' || $chr == '.') {
|
||||
if ($chr == '.')
|
||||
$isFloat = true;
|
||||
|
||||
$value .= $this->read();
|
||||
} else
|
||||
break;
|
||||
}
|
||||
|
||||
$this->readAway();
|
||||
|
||||
if ($isFloat) {
|
||||
$this->_token = JSON_FLOAT;
|
||||
$this->_value = floatval($value);
|
||||
} else
|
||||
$this->_value = intval($value);
|
||||
|
||||
if ($this->_location == JSON_IN_OBJECT && !$this->_needProp)
|
||||
$this->_needProp = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function readAway() {
|
||||
while (($chr = $this->peek()) != null) {
|
||||
if ($chr != ':' && $chr != ',' && $chr != ' ')
|
||||
return;
|
||||
|
||||
$this->read();
|
||||
}
|
||||
}
|
||||
|
||||
function read($len = 1) {
|
||||
if ($this->_pos < $this->_len) {
|
||||
if ($len > 1) {
|
||||
$str = substr($this->_data, $this->_pos + 1, $len);
|
||||
$this->_pos += $len;
|
||||
|
||||
return $str;
|
||||
} else
|
||||
return $this->_data[++$this->_pos];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function skip($len) {
|
||||
$this->_pos += $len;
|
||||
}
|
||||
|
||||
function peek() {
|
||||
if ($this->_pos < $this->_len)
|
||||
return $this->_data[$this->_pos + 1];
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class handles JSON stuff.
|
||||
*
|
||||
* @package MCManager.utils
|
||||
*/
|
||||
class Moxiecode_JSON {
|
||||
function Moxiecode_JSON() {
|
||||
}
|
||||
|
||||
function decode($input) {
|
||||
$reader = new Moxiecode_JSONReader($input);
|
||||
|
||||
return $this->readValue($reader);
|
||||
}
|
||||
|
||||
function readValue(&$reader) {
|
||||
$this->data = array();
|
||||
$this->parents = array();
|
||||
$this->cur =& $this->data;
|
||||
$key = null;
|
||||
$loc = JSON_IN_ARRAY;
|
||||
|
||||
while ($reader->readToken()) {
|
||||
switch ($reader->getToken()) {
|
||||
case JSON_STR:
|
||||
case JSON_INT:
|
||||
case JSON_BOOL:
|
||||
case JSON_FLOAT:
|
||||
case JSON_NULL:
|
||||
switch ($reader->getLocation()) {
|
||||
case JSON_IN_OBJECT:
|
||||
$this->cur[$key] = $reader->getValue();
|
||||
break;
|
||||
|
||||
case JSON_IN_ARRAY:
|
||||
$this->cur[] = $reader->getValue();
|
||||
break;
|
||||
|
||||
default:
|
||||
return $reader->getValue();
|
||||
}
|
||||
break;
|
||||
|
||||
case JSON_KEY:
|
||||
$key = $reader->getValue();
|
||||
break;
|
||||
|
||||
case JSON_START_OBJ:
|
||||
case JSON_START_ARRAY:
|
||||
if ($loc == JSON_IN_OBJECT)
|
||||
$this->addArray($key);
|
||||
else
|
||||
$this->addArray(null);
|
||||
|
||||
$cur =& $obj;
|
||||
|
||||
$loc = $reader->getLocation();
|
||||
break;
|
||||
|
||||
case JSON_END_OBJ:
|
||||
case JSON_END_ARRAY:
|
||||
$loc = $reader->getLocation();
|
||||
|
||||
if (count($this->parents) > 0) {
|
||||
$this->cur =& $this->parents[count($this->parents) - 1];
|
||||
array_pop($this->parents);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->data[0];
|
||||
}
|
||||
|
||||
// This method was needed since PHP is crapy and doesn't have pointers/references
|
||||
function addArray($key) {
|
||||
$this->parents[] =& $this->cur;
|
||||
$ar = array();
|
||||
|
||||
if ($key)
|
||||
$this->cur[$key] =& $ar;
|
||||
else
|
||||
$this->cur[] =& $ar;
|
||||
|
||||
$this->cur =& $ar;
|
||||
}
|
||||
|
||||
function getDelim($index, &$reader) {
|
||||
switch ($reader->getLocation()) {
|
||||
case JSON_IN_ARRAY:
|
||||
case JSON_IN_OBJECT:
|
||||
if ($index > 0)
|
||||
return ",";
|
||||
break;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function encode($input) {
|
||||
switch (gettype($input)) {
|
||||
case 'boolean':
|
||||
return $input ? 'true' : 'false';
|
||||
|
||||
case 'integer':
|
||||
return (int) $input;
|
||||
|
||||
case 'float':
|
||||
case 'double':
|
||||
return (float) $input;
|
||||
|
||||
case 'NULL':
|
||||
return 'null';
|
||||
|
||||
case 'string':
|
||||
return $this->encodeString($input);
|
||||
|
||||
case 'array':
|
||||
return $this->_encodeArray($input);
|
||||
|
||||
case 'object':
|
||||
return $this->_encodeArray(get_object_vars($input));
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function encodeString($input) {
|
||||
// Needs to be escaped
|
||||
if (preg_match('/[^a-zA-Z0-9]/', $input)) {
|
||||
$output = '';
|
||||
|
||||
for ($i=0; $i<strlen($input); $i++) {
|
||||
switch ($input[$i]) {
|
||||
case "\b":
|
||||
$output .= "\\b";
|
||||
break;
|
||||
|
||||
case "\t":
|
||||
$output .= "\\t";
|
||||
break;
|
||||
|
||||
case "\f":
|
||||
$output .= "\\f";
|
||||
break;
|
||||
|
||||
case "\r":
|
||||
$output .= "\\r";
|
||||
break;
|
||||
|
||||
case "\n":
|
||||
$output .= "\\n";
|
||||
break;
|
||||
|
||||
case '\\':
|
||||
$output .= "\\\\";
|
||||
break;
|
||||
|
||||
case '\'':
|
||||
$output .= "\\'";
|
||||
break;
|
||||
|
||||
case '"':
|
||||
$output .= '\"';
|
||||
break;
|
||||
|
||||
default:
|
||||
$byte = ord($input[$i]);
|
||||
|
||||
if (($byte & 0xE0) == 0xC0) {
|
||||
$char = pack('C*', $byte, ord($input[$i + 1]));
|
||||
$i += 1;
|
||||
$output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
|
||||
} if (($byte & 0xF0) == 0xE0) {
|
||||
$char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2]));
|
||||
$i += 2;
|
||||
$output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
|
||||
} if (($byte & 0xF8) == 0xF0) {
|
||||
$char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2], ord($input[$i + 3])));
|
||||
$i += 3;
|
||||
$output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
|
||||
} if (($byte & 0xFC) == 0xF8) {
|
||||
$char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2], ord($input[$i + 3]), ord($input[$i + 4])));
|
||||
$i += 4;
|
||||
$output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
|
||||
} if (($byte & 0xFE) == 0xFC) {
|
||||
$char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2], ord($input[$i + 3]), ord($input[$i + 4]), ord($input[$i + 5])));
|
||||
$i += 5;
|
||||
$output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
|
||||
} else if ($byte < 128)
|
||||
$output .= $input[$i];
|
||||
}
|
||||
}
|
||||
|
||||
return '"' . $output . '"';
|
||||
}
|
||||
|
||||
return '"' . $input . '"';
|
||||
}
|
||||
|
||||
function _utf82utf16($utf8) {
|
||||
if (function_exists('mb_convert_encoding'))
|
||||
return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
|
||||
|
||||
switch (strlen($utf8)) {
|
||||
case 1:
|
||||
return $utf8;
|
||||
|
||||
case 2:
|
||||
return chr(0x07 & (ord($utf8[0]) >> 2)) . chr((0xC0 & (ord($utf8[0]) << 6)) | (0x3F & ord($utf8[1])));
|
||||
|
||||
case 3:
|
||||
return chr((0xF0 & (ord($utf8[0]) << 4)) | (0x0F & (ord($utf8[1]) >> 2))) . chr((0xC0 & (ord($utf8[1]) << 6)) | (0x7F & ord($utf8[2])));
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function _encodeArray($input) {
|
||||
$output = '';
|
||||
$isIndexed = true;
|
||||
|
||||
$keys = array_keys($input);
|
||||
for ($i=0; $i<count($keys); $i++) {
|
||||
if (!is_int($keys[$i])) {
|
||||
$output .= $this->encodeString($keys[$i]) . ':' . $this->encode($input[$keys[$i]]);
|
||||
$isIndexed = false;
|
||||
} else
|
||||
$output .= $this->encode($input[$keys[$i]]);
|
||||
|
||||
if ($i != count($keys) - 1)
|
||||
$output .= ',';
|
||||
}
|
||||
|
||||
return $isIndexed ? '[' . $output . ']' : '{' . $output . '}';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,268 @@
|
||||
<?php
|
||||
/**
|
||||
* $Id: Logger.class.php 10 2007-05-27 10:55:12Z spocke $
|
||||
*
|
||||
* @package MCFileManager.filesystems
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2005, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
// File type contstants
|
||||
define('MC_LOGGER_DEBUG', 0);
|
||||
define('MC_LOGGER_INFO', 10);
|
||||
define('MC_LOGGER_WARN', 20);
|
||||
define('MC_LOGGER_ERROR', 30);
|
||||
define('MC_LOGGER_FATAL', 40);
|
||||
|
||||
/**
|
||||
* Logging utility class. This class handles basic logging with levels, log rotation and custom log formats. It's
|
||||
* designed to be compact but still powerful and flexible.
|
||||
*/
|
||||
class Moxiecode_Logger {
|
||||
// Private fields
|
||||
var $_path;
|
||||
var $_filename;
|
||||
var $_maxSize;
|
||||
var $_maxFiles;
|
||||
var $_maxSizeBytes;
|
||||
var $_level;
|
||||
var $_format;
|
||||
|
||||
/**
|
||||
* Constructs a new logger instance.
|
||||
*/
|
||||
function Moxiecode_Logger() {
|
||||
$this->_path = "";
|
||||
$this->_filename = "{level}.log";
|
||||
$this->setMaxSize("100k");
|
||||
$this->_maxFiles = 10;
|
||||
$this->_level = MC_LOGGER_DEBUG;
|
||||
$this->_format = "[{time}] [{level}] {message}";
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the current log level, use the MC_LOGGER constants.
|
||||
*
|
||||
* @param int $level Log level instance for example MC_LOGGER_DEBUG.
|
||||
*/
|
||||
function setLevel($level) {
|
||||
if (is_string($level)) {
|
||||
switch (strtolower($level)) {
|
||||
case "debug":
|
||||
$level = MC_LOGGER_DEBUG;
|
||||
break;
|
||||
|
||||
case "info":
|
||||
$level = MC_LOGGER_INFO;
|
||||
break;
|
||||
|
||||
case "warn":
|
||||
case "warning":
|
||||
$level = MC_LOGGER_WARN;
|
||||
break;
|
||||
|
||||
case "error":
|
||||
$level = MC_LOGGER_ERROR;
|
||||
break;
|
||||
|
||||
case "fatal":
|
||||
$level = MC_LOGGER_FATAL;
|
||||
break;
|
||||
|
||||
default:
|
||||
$level = MC_LOGGER_FATAL;
|
||||
}
|
||||
}
|
||||
|
||||
$this->_level = $level;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current log level for example MC_LOGGER_DEBUG.
|
||||
*
|
||||
* @return int Current log level for example MC_LOGGER_DEBUG.
|
||||
*/
|
||||
function getLevel() {
|
||||
return $this->_level;
|
||||
}
|
||||
|
||||
function setPath($path) {
|
||||
$this->_path = $path;
|
||||
}
|
||||
|
||||
function getPath() {
|
||||
return $this->_path;
|
||||
}
|
||||
|
||||
function setFileName($file_name) {
|
||||
$this->_filename = $file_name;
|
||||
}
|
||||
|
||||
function getFileName() {
|
||||
return $this->_filename;
|
||||
}
|
||||
|
||||
function setFormat($format) {
|
||||
$this->_format = $format;
|
||||
}
|
||||
|
||||
function getFormat() {
|
||||
return $this->_format;
|
||||
}
|
||||
|
||||
function setMaxSize($size) {
|
||||
// Fix log max size
|
||||
$logMaxSizeBytes = intval(preg_replace("/[^0-9]/", "", $size));
|
||||
|
||||
// Is KB
|
||||
if (strpos((strtolower($size)), "k") > 0)
|
||||
$logMaxSizeBytes *= 1024;
|
||||
|
||||
// Is MB
|
||||
if (strpos((strtolower($size)), "m") > 0)
|
||||
$logMaxSizeBytes *= (1024 * 1024);
|
||||
|
||||
$this->_maxSizeBytes = $logMaxSizeBytes;
|
||||
$this->_maxSize = $size;
|
||||
}
|
||||
|
||||
function getMaxSize() {
|
||||
return $this->_maxSize;
|
||||
}
|
||||
|
||||
function setMaxFiles($max_files) {
|
||||
$this->_maxFiles = $max_files;
|
||||
}
|
||||
|
||||
function getMaxFiles() {
|
||||
return $this->_maxFiles;
|
||||
}
|
||||
|
||||
function debug($msg) {
|
||||
$args = func_get_args();
|
||||
$this->_logMsg(MC_LOGGER_DEBUG, implode(', ', $args));
|
||||
}
|
||||
|
||||
function info($msg) {
|
||||
$args = func_get_args();
|
||||
$this->_logMsg(MC_LOGGER_INFO, implode(', ', $args));
|
||||
}
|
||||
|
||||
function warn($msg) {
|
||||
$args = func_get_args();
|
||||
$this->_logMsg(MC_LOGGER_WARN, implode(', ', $args));
|
||||
}
|
||||
|
||||
function error($msg) {
|
||||
$args = func_get_args();
|
||||
$this->_logMsg(MC_LOGGER_ERROR, implode(', ', $args));
|
||||
}
|
||||
|
||||
function fatal($msg) {
|
||||
$args = func_get_args();
|
||||
$this->_logMsg(MC_LOGGER_FATAL, implode(', ', $args));
|
||||
}
|
||||
|
||||
function isDebugEnabled() {
|
||||
return $this->_level >= MC_LOGGER_DEBUG;
|
||||
}
|
||||
|
||||
function isInfoEnabled() {
|
||||
return $this->_level >= MC_LOGGER_INFO;
|
||||
}
|
||||
|
||||
function isWarnEnabled() {
|
||||
return $this->_level >= MC_LOGGER_WARN;
|
||||
}
|
||||
|
||||
function isErrorEnabled() {
|
||||
return $this->_level >= MC_LOGGER_ERROR;
|
||||
}
|
||||
|
||||
function isFatalEnabled() {
|
||||
return $this->_level >= MC_LOGGER_FATAL;
|
||||
}
|
||||
|
||||
function _logMsg($level, $message) {
|
||||
$roll = false;
|
||||
|
||||
if ($level < $this->_level)
|
||||
return;
|
||||
|
||||
$logFile = $this->toOSPath($this->_path . "/" . $this->_filename);
|
||||
|
||||
switch ($level) {
|
||||
case MC_LOGGER_DEBUG:
|
||||
$levelName = "DEBUG";
|
||||
break;
|
||||
|
||||
case MC_LOGGER_INFO:
|
||||
$levelName = "INFO";
|
||||
break;
|
||||
|
||||
case MC_LOGGER_WARN:
|
||||
$levelName = "WARN";
|
||||
break;
|
||||
|
||||
case MC_LOGGER_ERROR:
|
||||
$levelName = "ERROR";
|
||||
break;
|
||||
|
||||
case MC_LOGGER_FATAL:
|
||||
$levelName = "FATAL";
|
||||
break;
|
||||
}
|
||||
|
||||
$logFile = str_replace('{level}', strtolower($levelName), $logFile);
|
||||
|
||||
$text = $this->_format;
|
||||
$text = str_replace('{time}', date("Y-m-d H:i:s"), $text);
|
||||
$text = str_replace('{level}', strtolower($levelName), $text);
|
||||
$text = str_replace('{message}', $message, $text);
|
||||
$message = $text . "\r\n";
|
||||
|
||||
// Check filesize
|
||||
if (file_exists($logFile)) {
|
||||
$size = @filesize($logFile);
|
||||
|
||||
if ($size + strlen($message) > $this->_maxSizeBytes)
|
||||
$roll = true;
|
||||
}
|
||||
|
||||
// Roll if the size is right
|
||||
if ($roll) {
|
||||
for ($i=$this->_maxFiles-1; $i>=1; $i--) {
|
||||
$rfile = $this->toOSPath($logFile . "." . $i);
|
||||
$nfile = $this->toOSPath($logFile . "." . ($i+1));
|
||||
|
||||
if (@file_exists($rfile))
|
||||
@rename($rfile, $nfile);
|
||||
}
|
||||
|
||||
@rename($logFile, $this->toOSPath($logFile . ".1"));
|
||||
|
||||
// Delete last logfile
|
||||
$delfile = $this->toOSPath($logFile . "." . ($this->_maxFiles + 1));
|
||||
if (@file_exists($delfile))
|
||||
@unlink($delfile);
|
||||
}
|
||||
|
||||
// Append log line
|
||||
if (($fp = @fopen($logFile, "a")) != null) {
|
||||
@fputs($fp, $message);
|
||||
@fflush($fp);
|
||||
@fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a Unix path to OS specific path.
|
||||
*
|
||||
* @param String $path Unix path to convert.
|
||||
*/
|
||||
function toOSPath($path) {
|
||||
return str_replace("/", DIRECTORY_SEPARATOR, $path);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,24 +1,21 @@
|
||||
<?php
|
||||
$spellCheckerConfig = array();
|
||||
|
||||
// Spellchecker class use
|
||||
// require_once("classes/TinyPspellShell.class.php"); // Command line pspell
|
||||
require_once("classes/TinyGoogleSpell.class.php"); // Google web service
|
||||
// require_once("classes/TinyPspell.class.php"); // Internal PHP version
|
||||
|
||||
// General settings
|
||||
$spellCheckerConfig['enabled'] = true;
|
||||
$config['general.engine'] = 'GoogleSpell';
|
||||
//$config['general.engine'] = 'PSpell';
|
||||
//$config['general.engine'] = 'PSpellShell';
|
||||
|
||||
// Default settings
|
||||
$spellCheckerConfig['default.language'] = 'en';
|
||||
$spellCheckerConfig['default.mode'] = PSPELL_FAST;
|
||||
// PSpell settings
|
||||
$config['PSpell.mode'] = PSPELL_FAST;
|
||||
$config['PSpell.spelling'] = "";
|
||||
$config['PSpell.jargon'] = "";
|
||||
$config['PSpell.encoding'] = "";
|
||||
|
||||
// Normaly not required to configure
|
||||
$spellCheckerConfig['default.spelling'] = "";
|
||||
$spellCheckerConfig['default.jargon'] = "";
|
||||
$spellCheckerConfig['default.encoding'] = "";
|
||||
// PSpellShell settings
|
||||
$config['PSpellShell.mode'] = PSPELL_FAST;
|
||||
$config['PSpellShell.aspell'] = '/usr/bin/aspell';
|
||||
$config['PSpellShell.tmp'] = '/tmp';
|
||||
|
||||
// Pspell shell specific settings
|
||||
$spellCheckerConfig['tinypspellshell.aspell'] = '/usr/bin/aspell';
|
||||
$spellCheckerConfig['tinypspellshell.tmp'] = '/tmp';
|
||||
// Windows PSpellShell settings
|
||||
//$config['PSpellShell.aspell'] = '"c:\Program Files\Aspell\bin\aspell.exe"';
|
||||
//$config['PSpellShell.tmp'] = 'c:/temp';
|
||||
?>
|
||||
|
@ -1,4 +1 @@
|
||||
.mceItemHiddenSpellWord {
|
||||
background: url('../images/wline.gif') repeat-x bottom left;
|
||||
cursor: default;
|
||||
}
|
||||
.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;}
|
||||
|
@ -1,35 +1,35 @@
|
||||
.mceMsgBox {
|
||||
border: 1px solid gray;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.mceMsgBox span {
|
||||
vertical-align: top;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
/* Misc */
|
||||
|
||||
.mceBlockBox {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
filter:progid:DXImageTransform.Microsoft.Alpha(style=0, opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
opacity: 0.6;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.mceMsgBox {
|
||||
display: none;
|
||||
z-index: 101;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
font-family: Arial, Verdana, Tahoma, Helvetica;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
background-color: #FFF;
|
||||
}
|
||||
.mceMsgBox {
|
||||
border: 1px solid gray;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.mceMsgBox span {
|
||||
vertical-align: top;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
/* Misc */
|
||||
|
||||
.mceBlockBox {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
filter:progid:DXImageTransform.Microsoft.Alpha(style=0, opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
opacity: 0.6;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.mceMsgBox {
|
||||
display: none;
|
||||
z-index: 101;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
font-family: Arial, Verdana, Tahoma, Helvetica;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
@ -1,551 +1,190 @@
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 289 2007-05-28 09:12:16Z spocke $
|
||||
* $Id: editor_plugin_src.js 425 2007-11-21 15:17:39Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
tinyMCE.importPluginLanguagePack('spellchecker', 'en,fr,sv,nn,nb');
|
||||
|
||||
// Plucin static class
|
||||
var TinyMCE_SpellCheckerPlugin = {
|
||||
_contextMenu : new TinyMCE_Menu(),
|
||||
_menu : new TinyMCE_Menu(),
|
||||
_counter : 0,
|
||||
_ajaxPage : '/tinyspell.php',
|
||||
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Spellchecker PHP',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
|
||||
version : "1.0.5"
|
||||
};
|
||||
},
|
||||
|
||||
handleEvent : function(e) {
|
||||
var elm = tinyMCE.isMSIE ? e.srcElement : e.target;
|
||||
var inst = tinyMCE.selectedInstance, args = '';
|
||||
var self = TinyMCE_SpellCheckerPlugin;
|
||||
var cm = self._contextMenu;
|
||||
var p, p2, x, y, sx, sy, h, elm;
|
||||
|
||||
// Handle click on word
|
||||
if ((e.type == "click" || e.type == "contextmenu") && elm) {
|
||||
do {
|
||||
if (tinyMCE.getAttrib(elm, 'class') == "mceItemHiddenSpellWord") {
|
||||
inst.spellCheckerElm = elm;
|
||||
|
||||
// Setup arguments
|
||||
args += 'id=' + inst.editorId + "|" + (++self._counter);
|
||||
args += '&cmd=suggest&check=' + encodeURIComponent(elm.innerHTML);
|
||||
args += '&lang=' + escape(inst.spellCheckerLang);
|
||||
|
||||
elm = inst.spellCheckerElm;
|
||||
p = tinyMCE.getAbsPosition(inst.iframeElement);
|
||||
p2 = tinyMCE.getAbsPosition(elm);
|
||||
h = parseInt(elm.offsetHeight);
|
||||
sx = inst.getBody().scrollLeft;
|
||||
sy = inst.getBody().scrollTop;
|
||||
x = p.absLeft + p2.absLeft - sx;
|
||||
y = p.absTop + p2.absTop - sy + h;
|
||||
|
||||
cm.clear();
|
||||
cm.addTitle(tinyMCE.getLang('lang_spellchecker_wait', '', true));
|
||||
cm.show();
|
||||
cm.moveTo(x, y);
|
||||
|
||||
inst.selection.selectNode(elm, false, false);
|
||||
|
||||
self._sendAjax(self.baseURL + self._ajaxPage, self._ajaxResponse, 'post', args);
|
||||
|
||||
tinyMCE.cancelEvent(e);
|
||||
return false;
|
||||
}
|
||||
} while ((elm = elm.parentNode));
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
initInstance : function(inst) {
|
||||
var self = TinyMCE_SpellCheckerPlugin, m = self._menu, cm = self._contextMenu, e;
|
||||
|
||||
tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/spellchecker/css/content.css");
|
||||
|
||||
if (!tinyMCE.hasMenu('spellcheckercontextmenu')) {
|
||||
tinyMCE.importCSS(document, tinyMCE.baseURL + "/plugins/spellchecker/css/spellchecker.css");
|
||||
|
||||
cm.init({drop_menu : false});
|
||||
tinyMCE.addMenu('spellcheckercontextmenu', cm);
|
||||
}
|
||||
|
||||
if (!tinyMCE.hasMenu('spellcheckermenu')) {
|
||||
m.init({});
|
||||
tinyMCE.addMenu('spellcheckermenu', m);
|
||||
}
|
||||
|
||||
inst.spellCheckerLang = 'en';
|
||||
self._buildSettingsMenu(inst, null);
|
||||
|
||||
e = self._getBlockBoxLayer(inst).create('div', 'mceBlockBox', document.getElementById(inst.editorId + '_parent'));
|
||||
self._getMsgBoxLayer(inst).create('div', 'mceMsgBox', document.getElementById(inst.editorId + '_parent'));
|
||||
},
|
||||
|
||||
_getMsgBoxLayer : function(inst) {
|
||||
if (!inst.spellCheckerMsgBoxL)
|
||||
inst.spellCheckerMsgBoxL = new TinyMCE_Layer(inst.editorId + '_spellcheckerMsgBox', false);
|
||||
|
||||
return inst.spellCheckerMsgBoxL;
|
||||
},
|
||||
|
||||
_getBlockBoxLayer : function(inst) {
|
||||
if (!inst.spellCheckerBoxL)
|
||||
inst.spellCheckerBoxL = new TinyMCE_Layer(inst.editorId + '_spellcheckerBlockBox', false);
|
||||
|
||||
return inst.spellCheckerBoxL;
|
||||
},
|
||||
|
||||
_buildSettingsMenu : function(inst, lang) {
|
||||
var i, ar = tinyMCE.getParam('spellchecker_languages', '+English=en').split(','), p;
|
||||
var self = TinyMCE_SpellCheckerPlugin, m = self._menu, c;
|
||||
|
||||
m.clear();
|
||||
m.addTitle(tinyMCE.getLang('lang_spellchecker_langs', '', true));
|
||||
|
||||
for (i=0; i<ar.length; i++) {
|
||||
if (ar[i] != '') {
|
||||
p = ar[i].split('=');
|
||||
c = 'mceMenuCheckItem';
|
||||
|
||||
if (p[0].charAt(0) == '+') {
|
||||
p[0] = p[0].substring(1);
|
||||
|
||||
if (lang == null) {
|
||||
c = 'mceMenuSelectedItem';
|
||||
inst.spellCheckerLang = p[1];
|
||||
}
|
||||
}
|
||||
|
||||
if (lang == p[1])
|
||||
c = 'mceMenuSelectedItem';
|
||||
|
||||
m.add({text : p[0], js : "tinyMCE.execInstanceCommand('" + inst.editorId + "','mceSpellCheckerSetLang',false,'" + p[1] + "');", class_name : c});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setupContent : function(editor_id, body, doc) {
|
||||
TinyMCE_SpellCheckerPlugin._removeWords(doc, null, true);
|
||||
},
|
||||
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "spellchecker":
|
||||
return TinyMCE_SpellCheckerPlugin._getMenuButtonHTML(cn, 'lang_spellchecker_desc', '{$pluginurl}/images/spellchecker.gif', 'lang_spellchecker_desc', 'mceSpellCheckerMenu', 'mceSpellCheck');
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the HTML code for a normal button control.
|
||||
*
|
||||
* @param {string} id Button control id, this will be the suffix for the element id, the prefix is the editor id.
|
||||
* @param {string} lang Language variable key name to insert as the title/alt of the button image.
|
||||
* @param {string} img Image URL to insert, {$themeurl} and {$pluginurl} will be replaced.
|
||||
* @param {string} mlang Language variable key name to insert as the title/alt of the menu button image.
|
||||
* @param {string} mid Menu by id to display when the menu button is pressed.
|
||||
* @param {string} cmd Command to execute when the user clicks the button.
|
||||
* @param {string} ui Optional user interface boolean for command.
|
||||
* @param {string} val Optional value for command.
|
||||
* @return HTML code for a normal button based in input information.
|
||||
* @type string
|
||||
*/
|
||||
_getMenuButtonHTML : function(id, lang, img, mlang, mid, cmd, ui, val) {
|
||||
var h = '', m, x;
|
||||
|
||||
cmd = 'tinyMCE.hideMenus();tinyMCE.execInstanceCommand(\'{$editor_id}\',\'' + cmd + '\'';
|
||||
|
||||
if (typeof(ui) != "undefined" && ui != null)
|
||||
cmd += ',' + ui;
|
||||
|
||||
if (typeof(val) != "undefined" && val != null)
|
||||
cmd += ",'" + val + "'";
|
||||
|
||||
cmd += ');';
|
||||
|
||||
// Use tilemaps when enabled and found and never in MSIE since it loads the tile each time from cache if cahce is disabled
|
||||
if (tinyMCE.getParam('button_tile_map') && (!tinyMCE.isMSIE || tinyMCE.isOpera) && (m = tinyMCE.buttonMap[id]) != null && (tinyMCE.getParam("language") == "en" || img.indexOf('$lang') == -1)) {
|
||||
// Tiled button
|
||||
x = 0 - (m * 20) == 0 ? '0' : 0 - (m * 20);
|
||||
h += '<a id="{$editor_id}_' + id + '" href="javascript:' + cmd + '" onclick="' + cmd + 'return false;" onmousedown="return false;" class="mceTiledButton mceButtonNormal" target="_self">';
|
||||
h += '<img src="{$themeurl}/images/spacer.gif" style="background-position: ' + x + 'px 0" title="{$' + lang + '}" />';
|
||||
h += '<img src="{$themeurl}/images/button_menu.gif" title="{$' + lang + '}" class="mceMenuButton" onclick="' + mcmd + 'return false;" />';
|
||||
h += '</a>';
|
||||
} else {
|
||||
if (tinyMCE.isMSIE && !tinyMCE.isOpera)
|
||||
h += '<span id="{$editor_id}_' + id + '" class="mceMenuButton" onmouseover="tinyMCE.plugins.spellchecker._menuButtonEvent(\'over\',this);" onmouseout="tinyMCE.plugins.spellchecker._menuButtonEvent(\'out\',this);">';
|
||||
else
|
||||
h += '<span id="{$editor_id}_' + id + '" class="mceMenuButton">';
|
||||
|
||||
h += '<a href="javascript:' + cmd + '" onclick="' + cmd + 'return false;" onmousedown="return false;" class="mceMenuButtonNormal" target="_self">';
|
||||
h += '<img src="' + img + '" title="{$' + lang + '}" /></a>';
|
||||
h += '<a href="#" onclick="tinyMCE.plugins.spellchecker._toggleMenu(\'{$editor_id}\',\'' + mid + '\');return false;" onmousedown="return false;"><img src="{$themeurl}/images/button_menu.gif" title="{$' + lang + '}" class="mceMenuButton" />';
|
||||
h += '</a></span>';
|
||||
}
|
||||
|
||||
return h;
|
||||
},
|
||||
|
||||
_menuButtonEvent : function(e, o) {
|
||||
var t = this;
|
||||
|
||||
// Give IE some time since it's buggy!! :(
|
||||
window.setTimeout(function() {
|
||||
t._menuButtonEvent2(e, o);
|
||||
}, 1);
|
||||
},
|
||||
|
||||
_menuButtonEvent2 : function(e, o) {
|
||||
if (o.className == 'mceMenuButtonFocus')
|
||||
return;
|
||||
|
||||
if (e == 'over')
|
||||
o.className = o.className + ' mceMenuHover';
|
||||
else
|
||||
o.className = o.className.replace(/\s.*$/, '');
|
||||
},
|
||||
|
||||
_toggleMenu : function(editor_id, id) {
|
||||
var self = TinyMCE_SpellCheckerPlugin;
|
||||
var e = document.getElementById(editor_id + '_spellchecker');
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
|
||||
if (self._menu.isVisible()) {
|
||||
tinyMCE.hideMenus();
|
||||
return;
|
||||
}
|
||||
|
||||
tinyMCE.lastMenuBtnClass = e.className.replace(/\s.*$/, '');
|
||||
tinyMCE.switchClass(editor_id + '_spellchecker', 'mceMenuButtonFocus');
|
||||
|
||||
self._menu.moveRelativeTo(e, 'bl');
|
||||
self._menu.moveBy(tinyMCE.isMSIE && !tinyMCE.isOpera ? 0 : 1, -1);
|
||||
|
||||
if (tinyMCE.isOpera)
|
||||
self._menu.moveBy(0, -2);
|
||||
|
||||
self._onMenuEvent(inst, self._menu, 'show');
|
||||
|
||||
self._menu.show();
|
||||
|
||||
tinyMCE.lastSelectedMenuBtn = editor_id + '_spellchecker';
|
||||
},
|
||||
|
||||
_onMenuEvent : function(inst, m, n) {
|
||||
TinyMCE_SpellCheckerPlugin._buildSettingsMenu(inst, inst.spellCheckerLang);
|
||||
},
|
||||
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
var inst = tinyMCE.getInstanceById(editor_id), self = TinyMCE_SpellCheckerPlugin, args = '', co, bb, mb, nl, i, e, mbs;
|
||||
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceSpellCheck":
|
||||
if (!inst.spellcheckerOn) {
|
||||
inst.spellCheckerBookmark = inst.selection.getBookmark();
|
||||
|
||||
// Fix for IE bug: #1610184
|
||||
if (tinyMCE.isRealIE)
|
||||
tinyMCE.setInnerHTML(inst.getBody(), inst.getBody().innerHTML);
|
||||
|
||||
// Setup arguments
|
||||
args += 'id=' + inst.editorId + "|" + (++self._counter);
|
||||
args += '&cmd=spell&check=' + encodeURIComponent(self._getWordList(inst.getBody())).replace(/\'/g, '%27');
|
||||
args += '&lang=' + escape(inst.spellCheckerLang);
|
||||
|
||||
co = document.getElementById(inst.editorId + '_parent').firstChild;
|
||||
bb = self._getBlockBoxLayer(inst);
|
||||
bb.moveRelativeTo(co, 'tl');
|
||||
bb.resizeTo(co.offsetWidth, co.offsetHeight);
|
||||
bb.show();
|
||||
|
||||
// Setup message box
|
||||
mb = self._getMsgBoxLayer(inst);
|
||||
e = mb.getElement();
|
||||
|
||||
if (e.childNodes[0])
|
||||
e.removeChild(e.childNodes[0]);
|
||||
|
||||
mbs = document.createElement("span");
|
||||
mbs.innerHTML = '<span>' + tinyMCE.getLang('lang_spellchecker_swait', '', true) + '</span>';
|
||||
e.appendChild(mbs);
|
||||
|
||||
mb.show();
|
||||
mb.moveRelativeTo(co, 'cc');
|
||||
|
||||
if (tinyMCE.isMSIE && !tinyMCE.isOpera) {
|
||||
nl = co.getElementsByTagName('select');
|
||||
for (i=0; i<nl.length; i++)
|
||||
nl[i].disabled = true;
|
||||
}
|
||||
|
||||
inst.spellcheckerOn = true;
|
||||
tinyMCE.switchClass(editor_id + '_spellchecker', 'mceMenuButtonSelected');
|
||||
|
||||
self._sendAjax(self.baseURL + self._ajaxPage, self._ajaxResponse, 'post', args);
|
||||
} else {
|
||||
self._removeWords(inst.getDoc());
|
||||
inst.spellcheckerOn = false;
|
||||
tinyMCE.switchClass(editor_id + '_spellchecker', 'mceMenuButton');
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
case "mceSpellCheckReplace":
|
||||
if (inst.spellCheckerElm)
|
||||
tinyMCE.setOuterHTML(inst.spellCheckerElm, value);
|
||||
|
||||
self._checkDone(inst);
|
||||
self._contextMenu.hide();
|
||||
self._menu.hide();
|
||||
|
||||
return true;
|
||||
|
||||
case "mceSpellCheckIgnore":
|
||||
if (inst.spellCheckerElm)
|
||||
self._removeWord(inst.spellCheckerElm);
|
||||
|
||||
self._checkDone(inst);
|
||||
self._contextMenu.hide();
|
||||
self._menu.hide();
|
||||
return true;
|
||||
|
||||
case "mceSpellCheckIgnoreAll":
|
||||
if (inst.spellCheckerElm)
|
||||
self._removeWords(inst.getDoc(), inst.spellCheckerElm.innerHTML);
|
||||
|
||||
self._checkDone(inst);
|
||||
self._contextMenu.hide();
|
||||
self._menu.hide();
|
||||
return true;
|
||||
|
||||
case "mceSpellCheckerSetLang":
|
||||
tinyMCE.hideMenus();
|
||||
inst.spellCheckerLang = value;
|
||||
self._removeWords(inst.getDoc());
|
||||
inst.spellcheckerOn = false;
|
||||
tinyMCE.switchClass(editor_id + '_spellchecker', 'mceMenuButton');
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
},
|
||||
|
||||
cleanup : function(type, content, inst) {
|
||||
switch (type) {
|
||||
case "get_from_editor_dom":
|
||||
TinyMCE_SpellCheckerPlugin._removeWords(content, null, true);
|
||||
inst.spellcheckerOn = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return content;
|
||||
},
|
||||
|
||||
// Private plugin specific methods
|
||||
|
||||
_displayUI : function(inst) {
|
||||
var self = TinyMCE_SpellCheckerPlugin;
|
||||
var bb = self._getBlockBoxLayer(inst);
|
||||
var mb = self._getMsgBoxLayer(inst);
|
||||
var nl, i;
|
||||
var co = document.getElementById(inst.editorId + '_parent').firstChild;
|
||||
|
||||
if (tinyMCE.isMSIE && !tinyMCE.isOpera) {
|
||||
nl = co.getElementsByTagName('select');
|
||||
for (i=0; i<nl.length; i++)
|
||||
nl[i].disabled = false;
|
||||
}
|
||||
|
||||
bb.hide();
|
||||
|
||||
// Boom, crash in FF if focus isn't else were
|
||||
// el.style.display='none' on a opacity element seems to crash it
|
||||
mb.hide();
|
||||
},
|
||||
|
||||
_ajaxResponse : function(xml, text) {
|
||||
var el = xml ? xml.documentElement : null;
|
||||
var inst = tinyMCE.selectedInstance, self = TinyMCE_SpellCheckerPlugin;
|
||||
var cmd = el ? el.getAttribute("cmd") : null, err, id = el ? el.getAttribute("id") : null;
|
||||
|
||||
if (id)
|
||||
inst = tinyMCE.getInstanceById(id.substring(0, id.indexOf('|')));
|
||||
|
||||
// Workaround for crash in Gecko
|
||||
if (tinyMCE.isGecko)
|
||||
window.focus();
|
||||
|
||||
self._displayUI(inst);
|
||||
|
||||
// Restore the selection again
|
||||
if (tinyMCE.isGecko) {
|
||||
inst.getWin().focus();
|
||||
inst.selection.moveToBookmark(inst.spellCheckerBookmark);
|
||||
}
|
||||
|
||||
// Ignore suggestions for other ajax responses
|
||||
if (cmd == "suggest" && id != inst.editorId + "|" + self._counter)
|
||||
return;
|
||||
|
||||
if (!el) {
|
||||
text = '' + text;
|
||||
|
||||
if (text.length > 500)
|
||||
text = text.substring(500);
|
||||
|
||||
inst.spellcheckerOn = false;
|
||||
tinyMCE.switchClass(inst.editorId + '_spellchecker', 'mceMenuButton');
|
||||
alert("Could not execute AJAX call, server didn't return valid a XML.\nResponse: " + text);
|
||||
return;
|
||||
}
|
||||
|
||||
err = el.getAttribute("error");
|
||||
|
||||
if (err == "true") {
|
||||
inst.spellcheckerOn = false;
|
||||
tinyMCE.switchClass(inst.editorId + '_spellchecker', 'mceMenuButton');
|
||||
alert(el.getAttribute("msg"));
|
||||
return;
|
||||
}
|
||||
|
||||
switch (cmd) {
|
||||
case "spell":
|
||||
if (xml.documentElement.firstChild) {
|
||||
self._markWords(inst.getDoc(), inst.getBody(), decodeURIComponent(el.firstChild.nodeValue).split('+'));
|
||||
inst.selection.moveToBookmark(inst.spellCheckerBookmark);
|
||||
|
||||
if(tinyMCE.getParam('spellchecker_report_misspellings', false))
|
||||
alert(tinyMCE.getLang('lang_spellchecker_mpell_found', '', true, {words : self._countWords(inst)}));
|
||||
(function() {
|
||||
var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM;
|
||||
|
||||
tinymce.create('tinymce.plugins.SpellcheckerPlugin', {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Spellchecker',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
|
||||
version : "2.0b2"
|
||||
};
|
||||
},
|
||||
|
||||
init : function(ed, url) {
|
||||
var t = this, cm;
|
||||
|
||||
t.url = url;
|
||||
t.editor = ed;
|
||||
|
||||
// Register commands
|
||||
ed.addCommand('mceSpellCheck', function() {
|
||||
if (!t.active) {
|
||||
ed.setProgressState(1);
|
||||
t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) {
|
||||
if (r.length > 0) {
|
||||
t.active = 1;
|
||||
t._markWords(r);
|
||||
ed.setProgressState(0);
|
||||
ed.nodeChanged();
|
||||
} else {
|
||||
ed.setProgressState(0);
|
||||
ed.windowManager.alert('spellchecker.no_mpell');
|
||||
}
|
||||
});
|
||||
} else
|
||||
alert(tinyMCE.getLang('lang_spellchecker_no_mpell', '', true));
|
||||
t._done();
|
||||
});
|
||||
|
||||
self._checkDone(inst);
|
||||
ed.onInit.add(function() {
|
||||
ed.dom.loadCSS(url + '/css/content.css');
|
||||
});
|
||||
|
||||
// Odd stuff FF removed useCSS, disable state for it
|
||||
inst.useCSS = false;
|
||||
ed.onClick.add(t._showMenu, t);
|
||||
ed.onContextMenu.add(t._showMenu, t);
|
||||
ed.onBeforeGetContent.add(function() {
|
||||
if (t.active)
|
||||
t._removeWords();
|
||||
});
|
||||
|
||||
break;
|
||||
ed.onNodeChange.add(function(ed, cm) {
|
||||
cm.setActive('spellchecker', t.active);
|
||||
});
|
||||
|
||||
case "suggest":
|
||||
self._buildMenu(el.firstChild ? decodeURIComponent(el.firstChild.nodeValue).split('+') : null, 10);
|
||||
self._contextMenu.show();
|
||||
break;
|
||||
}
|
||||
},
|
||||
ed.onSetContent.add(function() {
|
||||
t._done();
|
||||
});
|
||||
|
||||
_getWordSeparators : function() {
|
||||
var i, re = '', ch = tinyMCE.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');
|
||||
ed.onBeforeGetContent.add(function() {
|
||||
t._done();
|
||||
});
|
||||
|
||||
for (i=0; i<ch.length; i++)
|
||||
re += '\\' + ch.charAt(i);
|
||||
ed.onBeforeExecCommand.add(function(ed, cmd) {
|
||||
if (cmd == 'mceFullScreen')
|
||||
t._done();
|
||||
});
|
||||
|
||||
return re;
|
||||
},
|
||||
// Find selected language
|
||||
t.languages = {};
|
||||
each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv').split(','), function(v) {
|
||||
v = v.split('=');
|
||||
|
||||
_getWordList : function(n) {
|
||||
var i, x, s, nv = '', nl = tinyMCE.getNodeTree(n, [], 3), wl = [];
|
||||
var re = TinyMCE_SpellCheckerPlugin._getWordSeparators();
|
||||
|
||||
for (i=0; i<nl.length; i++) {
|
||||
if (!new RegExp('/SCRIPT|STYLE/').test(nl[i].parentNode.nodeName))
|
||||
nv += nl[i].nodeValue + " ";
|
||||
}
|
||||
|
||||
nv = nv.replace(new RegExp('([0-9]|[' + re + '])', 'g'), ' ');
|
||||
nv = tinyMCE.trim(nv.replace(/(\s+)/g, ' '));
|
||||
|
||||
nl = nv.split(/\s+/);
|
||||
for (i=0; i<nl.length; i++) {
|
||||
s = false;
|
||||
for (x=0; x<wl.length; x++) {
|
||||
if (wl[x] == nl[i]) {
|
||||
s = true;
|
||||
break;
|
||||
if (v[0].indexOf('+') === 0) {
|
||||
v[0] = v[0].substring(1);
|
||||
t.selectedLang = v[1];
|
||||
}
|
||||
|
||||
t.languages[v[0]] = v[1];
|
||||
});
|
||||
},
|
||||
|
||||
createControl : function(n, cm) {
|
||||
var t = this, c, ed = t.editor;
|
||||
|
||||
if (n == 'spellchecker') {
|
||||
c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
|
||||
|
||||
c.onRenderMenu.add(function(c, m) {
|
||||
m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
||||
each(t.languages, function(v, k) {
|
||||
var o = {icon : 1}, mi;
|
||||
|
||||
o.onclick = function() {
|
||||
mi.setSelected(1);
|
||||
t.selectedItem.setSelected(0);
|
||||
t.selectedItem = mi;
|
||||
t.selectedLang = v;
|
||||
};
|
||||
|
||||
o.title = k;
|
||||
mi = m.add(o);
|
||||
mi.setSelected(v == t.selectedLang);
|
||||
|
||||
if (v == t.selectedLang)
|
||||
t.selectedItem = mi;
|
||||
})
|
||||
});
|
||||
|
||||
return c;
|
||||
}
|
||||
},
|
||||
|
||||
if (!s && nl[i].length > 0)
|
||||
wl[wl.length] = nl[i];
|
||||
}
|
||||
// Internal functions
|
||||
|
||||
return wl.join(' ');
|
||||
},
|
||||
_walk : function(n, f) {
|
||||
var d = this.editor.getDoc(), w;
|
||||
|
||||
_removeWords : function(doc, word, cleanup) {
|
||||
var i, c, nl = doc.getElementsByTagName("span");
|
||||
var self = TinyMCE_SpellCheckerPlugin;
|
||||
var inst = tinyMCE.selectedInstance, b = inst ? inst.selection.getBookmark() : null;
|
||||
if (d.createTreeWalker) {
|
||||
w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false);
|
||||
|
||||
word = typeof(word) == 'undefined' ? null : word;
|
||||
while ((n = w.nextNode()) != null)
|
||||
f.call(this, n);
|
||||
} else
|
||||
tinymce.walk(n, f, 'childNodes');
|
||||
},
|
||||
|
||||
for (i=nl.length-1; i>=0; i--) {
|
||||
c = tinyMCE.getAttrib(nl[i], 'class');
|
||||
_getSeparators : function() {
|
||||
var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');
|
||||
|
||||
if ((c == 'mceItemHiddenSpellWord' || c == 'mceItemHidden') && (word == null || nl[i].innerHTML == word))
|
||||
self._removeWord(nl[i]);
|
||||
}
|
||||
// Build word separator regexp
|
||||
for (i=0; i<str.length; i++)
|
||||
re += '\\' + str.charAt(i);
|
||||
|
||||
if (b && !cleanup)
|
||||
inst.selection.moveToBookmark(b);
|
||||
},
|
||||
return re;
|
||||
},
|
||||
|
||||
_checkDone : function(inst) {
|
||||
var self = TinyMCE_SpellCheckerPlugin;
|
||||
var w = self._countWords(inst);
|
||||
_getWords : function() {
|
||||
var ed = this.editor, wl = [], tx = '', lo = {};
|
||||
|
||||
if (w == 0) {
|
||||
self._removeWords(inst.getDoc());
|
||||
inst.spellcheckerOn = false;
|
||||
tinyMCE.switchClass(inst.editorId + '_spellchecker', 'mceMenuButton');
|
||||
}
|
||||
},
|
||||
// Get area text
|
||||
this._walk(ed.getBody(), function(n) {
|
||||
if (n.nodeType == 3)
|
||||
tx += n.nodeValue + ' ';
|
||||
});
|
||||
|
||||
_countWords : function(inst) {
|
||||
var i, w = 0, nl = inst.getDoc().getElementsByTagName("span"), c;
|
||||
var self = TinyMCE_SpellCheckerPlugin;
|
||||
// Split words by separator
|
||||
tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');
|
||||
tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));
|
||||
|
||||
for (i=nl.length-1; i>=0; i--) {
|
||||
c = tinyMCE.getAttrib(nl[i], 'class');
|
||||
// Build word array and remove duplicates
|
||||
each(tx.split(' '), function(v) {
|
||||
if (!lo[v]) {
|
||||
wl.push(v);
|
||||
lo[v] = 1;
|
||||
}
|
||||
});
|
||||
|
||||
if (c == 'mceItemHiddenSpellWord')
|
||||
w++;
|
||||
}
|
||||
return wl;
|
||||
},
|
||||
|
||||
return w;
|
||||
},
|
||||
_removeWords : function(w) {
|
||||
var ed = this.editor, dom = ed.dom, se = ed.selection, b = se.getBookmark();
|
||||
|
||||
_removeWord : function(e) {
|
||||
if (e != null)
|
||||
tinyMCE.setOuterHTML(e, e.innerHTML);
|
||||
},
|
||||
each(dom.select('span').reverse(), function(n) {
|
||||
if (n && (dom.hasClass(n, 'mceItemHiddenSpellWord') || dom.hasClass(n, 'mceItemHidden'))) {
|
||||
if (!w || dom.decode(n.innerHTML) == w)
|
||||
dom.remove(n, 1);
|
||||
}
|
||||
});
|
||||
|
||||
_markWords : function(doc, n, wl) {
|
||||
var i, nv, nn, nl = tinyMCE.getNodeTree(n, new Array(), 3);
|
||||
var r1, r2, r3, r4, r5, w = '';
|
||||
var re = TinyMCE_SpellCheckerPlugin._getWordSeparators();
|
||||
se.moveToBookmark(b);
|
||||
},
|
||||
|
||||
for (i=0; i<wl.length; i++) {
|
||||
if (wl[i].length > 0)
|
||||
w += wl[i] + ((i == wl.length-1) ? '' : '|');
|
||||
}
|
||||
_markWords : function(wl) {
|
||||
var r1, r2, r3, r4, r5, w = '', ed = this.editor, re = this._getSeparators(), dom = ed.dom, nl = [];
|
||||
var se = ed.selection, b = se.getBookmark();
|
||||
|
||||
for (i=0; i<nl.length; i++) {
|
||||
nv = nl[i].nodeValue;
|
||||
each(wl, function(v) {
|
||||
w += (w ? '|' : '') + v;
|
||||
});
|
||||
|
||||
r1 = new RegExp('([' + re + '])(' + w + ')([' + re + '])', 'g');
|
||||
r2 = new RegExp('^(' + w + ')', 'g');
|
||||
@ -553,78 +192,145 @@ var TinyMCE_SpellCheckerPlugin = {
|
||||
r4 = new RegExp('^(' + w + ')([' + re + ']?)$', 'g');
|
||||
r5 = new RegExp('(' + w + ')([' + re + '])', 'g');
|
||||
|
||||
if (r1.test(nv) || r2.test(nv) || r3.test(nv) || r4.test(nv)) {
|
||||
nv = tinyMCE.xmlEncode(nv).replace(''', "'");
|
||||
nv = nv.replace(r5, '<span class="mceItemHiddenSpellWord">$1</span>$2');
|
||||
nv = nv.replace(r3, '<span class="mceItemHiddenSpellWord">$1</span>$2');
|
||||
// Collect all text nodes
|
||||
this._walk(this.editor.getBody(), function(n) {
|
||||
if (n.nodeType == 3) {
|
||||
nl.push(n);
|
||||
}
|
||||
});
|
||||
|
||||
nn = doc.createElement('span');
|
||||
nn.className = "mceItemHidden";
|
||||
nn.innerHTML = nv;
|
||||
// Wrap incorrect words in spans
|
||||
each(nl, function(n) {
|
||||
var v;
|
||||
|
||||
// Remove old text node
|
||||
nl[i].parentNode.replaceChild(nn, nl[i]);
|
||||
if (n.nodeType == 3) {
|
||||
v = n.nodeValue;
|
||||
|
||||
if (r1.test(v) || r2.test(v) || r3.test(v) || r4.test(v)) {
|
||||
v = dom.encode(v);
|
||||
v = v.replace(r5, '<span class="mceItemHiddenSpellWord">$1</span>$2');
|
||||
v = v.replace(r3, '<span class="mceItemHiddenSpellWord">$1</span>$2');
|
||||
|
||||
dom.replace(dom.create('span', {'class' : 'mceItemHidden'}, v), n);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
se.moveToBookmark(b);
|
||||
},
|
||||
|
||||
_showMenu : function(ed, e) {
|
||||
var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin());
|
||||
|
||||
if (!m) {
|
||||
p1 = DOM.getPos(ed.getContentAreaContainer());
|
||||
//p2 = DOM.getPos(ed.getContainer());
|
||||
|
||||
m = ed.controlManager.createDropMenu('spellcheckermenu', {
|
||||
offset_x : p1.x,
|
||||
offset_y : p1.y,
|
||||
'class' : 'noIcons'
|
||||
});
|
||||
|
||||
t._menu = m;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_buildMenu : function(sg, max) {
|
||||
var i, self = TinyMCE_SpellCheckerPlugin, cm = self._contextMenu;
|
||||
if (dom.hasClass(e.target, 'mceItemHiddenSpellWord')) {
|
||||
m.removeAll();
|
||||
m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
||||
|
||||
cm.clear();
|
||||
t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) {
|
||||
m.removeAll();
|
||||
|
||||
if (sg != null) {
|
||||
cm.addTitle(tinyMCE.getLang('lang_spellchecker_sug', '', true));
|
||||
if (r.length > 0) {
|
||||
m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
||||
each(r, function(v) {
|
||||
m.add({title : v, onclick : function() {
|
||||
dom.replace(ed.getDoc().createTextNode(v), e.target);
|
||||
t._checkDone();
|
||||
}});
|
||||
});
|
||||
|
||||
for (i=0; i<sg.length && i<max; i++)
|
||||
cm.addItem(sg[i], 'tinyMCE.execCommand("mceSpellCheckReplace",false,"' + sg[i] + '");');
|
||||
m.addSeparator();
|
||||
} else
|
||||
m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
||||
|
||||
cm.addSeparator();
|
||||
} else
|
||||
cm.addTitle(tinyMCE.getLang('lang_spellchecker_no_sug', '', true));
|
||||
m.add({
|
||||
title : 'spellchecker.ignore_word',
|
||||
onclick : function() {
|
||||
dom.remove(e.target, 1);
|
||||
t._checkDone();
|
||||
}
|
||||
});
|
||||
|
||||
cm.addItem(tinyMCE.getLang('lang_spellchecker_ignore_word', '', true), 'tinyMCE.execCommand(\'mceSpellCheckIgnore\');');
|
||||
cm.addItem(tinyMCE.getLang('lang_spellchecker_ignore_words', '', true), 'tinyMCE.execCommand(\'mceSpellCheckIgnoreAll\');');
|
||||
m.add({
|
||||
title : 'spellchecker.ignore_words',
|
||||
onclick : function() {
|
||||
t._removeWords(dom.decode(e.target.innerHTML));
|
||||
t._checkDone();
|
||||
}
|
||||
});
|
||||
|
||||
cm.update();
|
||||
},
|
||||
m.update();
|
||||
});
|
||||
|
||||
_getAjaxHTTP : function() {
|
||||
try {
|
||||
return new ActiveXObject('Msxml2.XMLHTTP')
|
||||
} catch (e) {
|
||||
try {
|
||||
return new ActiveXObject('Microsoft.XMLHTTP')
|
||||
} catch (e) {
|
||||
return new XMLHttpRequest();
|
||||
ed.selection.select(e.target);
|
||||
p1 = dom.getPos(e.target);
|
||||
m.showMenu(p1.x, p1.y + e.target.offsetHeight - vp.y);
|
||||
|
||||
return tinymce.dom.Event.cancel(e);
|
||||
} else
|
||||
m.hideMenu();
|
||||
},
|
||||
|
||||
_checkDone : function() {
|
||||
var t = this, ed = t.editor, dom = ed.dom, o;
|
||||
|
||||
each(dom.select('span'), function(n) {
|
||||
if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) {
|
||||
o = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (!o)
|
||||
t._done();
|
||||
},
|
||||
|
||||
_done : function() {
|
||||
var t = this, la = t.active;
|
||||
|
||||
t.active = 0;
|
||||
t._removeWords();
|
||||
|
||||
if (t._menu)
|
||||
t._menu.hideMenu();
|
||||
|
||||
if (la)
|
||||
t.editor.nodeChanged();
|
||||
},
|
||||
|
||||
_sendRPC : function(m, p, cb) {
|
||||
var t = this, url = t.editor.getParam("spellchecker_rpc_url", this.url+'/rpc.php');
|
||||
|
||||
if (url == '{backend}') {
|
||||
alert('Please specify: spellchecker_rpc_url');
|
||||
return;
|
||||
}
|
||||
|
||||
JSONRequest.sendRPC({
|
||||
url : url,
|
||||
method : m,
|
||||
params : p,
|
||||
success : cb,
|
||||
error : function(e, x) {
|
||||
t.editor.setProgressState(0);
|
||||
t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText));
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* Perform AJAX call.
|
||||
*
|
||||
* @param {string} u URL of AJAX service.
|
||||
* @param {function} f Function to call when response arrives.
|
||||
* @param {string} m Request method post or get.
|
||||
* @param {Array} a Array with arguments to send.
|
||||
*/
|
||||
_sendAjax : function(u, f, m, a) {
|
||||
var x = TinyMCE_SpellCheckerPlugin._getAjaxHTTP();
|
||||
|
||||
x.open(m, u, true);
|
||||
|
||||
x.onreadystatechange = function() {
|
||||
if (x.readyState == 4)
|
||||
f(x.responseXML, x.responseText);
|
||||
};
|
||||
|
||||
if (m == 'post')
|
||||
x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
|
||||
x.send(a);
|
||||
}
|
||||
};
|
||||
|
||||
// Register plugin
|
||||
tinyMCE.addPlugin('spellchecker', TinyMCE_SpellCheckerPlugin);
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin);
|
||||
})();
|
BIN
wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif
Normal file
After Width: | Height: | Size: 46 B |
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* general.php
|
||||
*
|
||||
* @package MCManager.includes
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
@error_reporting(E_ALL ^ E_NOTICE);
|
||||
$config = array();
|
||||
|
||||
require_once(dirname(__FILE__) . "/../classes/utils/Logger.php");
|
||||
require_once(dirname(__FILE__) . "/../classes/utils/JSON.php");
|
||||
require_once(dirname(__FILE__) . "/../config.php");
|
||||
require_once(dirname(__FILE__) . "/../classes/SpellChecker.php");
|
||||
|
||||
if (isset($config['general.engine']))
|
||||
require_once(dirname(__FILE__) . "/../classes/" . $config["general.engine"] . ".php");
|
||||
|
||||
/**
|
||||
* Returns an request value by name without magic quoting.
|
||||
*
|
||||
* @param String $name Name of parameter to get.
|
||||
* @param String $default_value Default value to return if value not found.
|
||||
* @return String request value by name without magic quoting or default value.
|
||||
*/
|
||||
function getRequestParam($name, $default_value = false, $sanitize = false) {
|
||||
if (!isset($_REQUEST[$name]))
|
||||
return $default_value;
|
||||
|
||||
if (is_array($_REQUEST[$name])) {
|
||||
$newarray = array();
|
||||
|
||||
foreach ($_REQUEST[$name] as $name => $value)
|
||||
$newarray[formatParam($name, $sanitize)] = formatParam($value, $sanitize);
|
||||
|
||||
return $newarray;
|
||||
}
|
||||
|
||||
return formatParam($_REQUEST[$name], $sanitize);
|
||||
}
|
||||
|
||||
function &getLogger() {
|
||||
global $mcLogger, $man;
|
||||
|
||||
if (isset($man))
|
||||
$mcLogger = $man->getLogger();
|
||||
|
||||
if (!$mcLogger) {
|
||||
$mcLogger = new Moxiecode_Logger();
|
||||
|
||||
// Set logger options
|
||||
$mcLogger->setPath(dirname(__FILE__) . "/../logs");
|
||||
$mcLogger->setMaxSize("100kb");
|
||||
$mcLogger->setMaxFiles("10");
|
||||
$mcLogger->setFormat("{time} - {message}");
|
||||
}
|
||||
|
||||
return $mcLogger;
|
||||
}
|
||||
|
||||
function debug($msg) {
|
||||
$args = func_get_args();
|
||||
|
||||
$log = getLogger();
|
||||
$log->debug(implode(', ', $args));
|
||||
}
|
||||
|
||||
function info($msg) {
|
||||
$args = func_get_args();
|
||||
|
||||
$log = getLogger();
|
||||
$log->info(implode(', ', $args));
|
||||
}
|
||||
|
||||
function error($msg) {
|
||||
$args = func_get_args();
|
||||
|
||||
$log = getLogger();
|
||||
$log->error(implode(', ', $args));
|
||||
}
|
||||
|
||||
function warn($msg) {
|
||||
$args = func_get_args();
|
||||
|
||||
$log = getLogger();
|
||||
$log->warn(implode(', ', $args));
|
||||
}
|
||||
|
||||
function fatal($msg) {
|
||||
$args = func_get_args();
|
||||
|
||||
$log = getLogger();
|
||||
$log->fatal(implode(', ', $args));
|
||||
}
|
||||
|
||||
?>
|
75
wp-includes/js/tinymce/plugins/spellchecker/rpc.php
Normal file
@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* $Id: rpc.php 354 2007-11-05 20:48:49Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
require_once("./includes/general.php");
|
||||
|
||||
// Set RPC response headers
|
||||
header('Content-Type: text/plain');
|
||||
header('Content-Encoding: UTF-8');
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
$raw = "";
|
||||
|
||||
// Try param
|
||||
if (isset($_POST["json_data"]))
|
||||
$raw = getRequestParam("json_data");
|
||||
|
||||
// Try globals array
|
||||
if (!$raw && isset($_GLOBALS) && isset($_GLOBALS["HTTP_RAW_POST_DATA"]))
|
||||
$raw = $_GLOBALS["HTTP_RAW_POST_DATA"];
|
||||
|
||||
// Try globals variable
|
||||
if (!$raw && isset($HTTP_RAW_POST_DATA))
|
||||
$raw = $HTTP_RAW_POST_DATA;
|
||||
|
||||
// Try stream
|
||||
if (!$raw) {
|
||||
if (!function_exists('file_get_contents')) {
|
||||
$fp = fopen("php://input", "r");
|
||||
if ($fp) {
|
||||
$raw = "";
|
||||
|
||||
while (!feof($fp))
|
||||
$raw = fread($fp, 1024);
|
||||
|
||||
fclose($fp);
|
||||
}
|
||||
} else
|
||||
$raw = "" . file_get_contents("php://input");
|
||||
}
|
||||
|
||||
// No input data
|
||||
if (!$raw)
|
||||
die('{"result":null,"id":null,"error":{"errstr":"Could not get raw post data.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
|
||||
|
||||
// Get JSON data
|
||||
$json = new Moxiecode_JSON();
|
||||
$input = $json->decode($raw);
|
||||
|
||||
// Execute RPC
|
||||
if (isset($config['general.engine'])) {
|
||||
$spellchecker = new $config['general.engine']($config);
|
||||
$result = call_user_func_array(array($spellchecker, $input['method']), $input['params']);
|
||||
} else
|
||||
die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
|
||||
|
||||
// Request and response id should always be the same
|
||||
$output = array(
|
||||
"id" => $input->id,
|
||||
"result" => $result,
|
||||
"error" => null
|
||||
);
|
||||
|
||||
// Return JSON encoded string
|
||||
echo $json->encode($output);
|
||||
|
||||
?>
|
@ -1,5 +1,5 @@
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('wordpress', 'en');
|
||||
//tinyMCE.importPluginLanguagePack('wordpress', 'en');
|
||||
|
||||
var TinyMCE_wordpressPlugin = {
|
||||
getInfo : function() {
|
||||
@ -287,6 +287,10 @@ var TinyMCE_wordpressPlugin = {
|
||||
saveCallback : function(el, content, body) {
|
||||
// We have a TON of cleanup to do.
|
||||
|
||||
if ( tinyMCE.activeEditor.isHidden() ) {
|
||||
// return content;
|
||||
}
|
||||
|
||||
// Mark </p> if it has any attributes.
|
||||
content = content.replace(new RegExp('(<p[^>]+>.*?)</p>', 'mg'), '$1</p#>');
|
||||
|
||||
@ -294,7 +298,7 @@ var TinyMCE_wordpressPlugin = {
|
||||
// content = content.replace(new RegExp('&', 'g'), '&');
|
||||
|
||||
// Get it ready for wpautop.
|
||||
content = content.replace(new RegExp('\\s*<p>', 'mgi'), '');
|
||||
content = content.replace(new RegExp('\\s*<p>', 'mgi'), '');
|
||||
content = content.replace(new RegExp('\\s*</p>\\s*', 'mgi'), '\n\n');
|
||||
content = content.replace(new RegExp('\\n\\s*\\n', 'mgi'), '\n\n');
|
||||
content = content.replace(new RegExp('\\s*<br ?/?>\\s*', 'gi'), '\n');
|
||||
@ -304,7 +308,12 @@ var TinyMCE_wordpressPlugin = {
|
||||
content = content.replace(new RegExp('\\s*<(('+blocklist+') ?[^>]*)\\s*>', 'mg'), '\n<$1>');
|
||||
content = content.replace(new RegExp('\\s*</('+blocklist+')>\\s*', 'mg'), '</$1>\n');
|
||||
content = content.replace(new RegExp('<li>', 'g'), '\t<li>');
|
||||
|
||||
|
||||
if ( content.indexOf('<object') != -1 ) {
|
||||
content = content.replace(new RegExp('\\s*<param([^>]*)>\\s*', 'g'), "<param$1>"); // no pee inside object/embed
|
||||
content = content.replace(new RegExp('\\s*</embed>\\s*', 'g'), '</embed>');
|
||||
}
|
||||
|
||||
// Unmark special paragraph closing tags
|
||||
content = content.replace(new RegExp('</p#>', 'g'), '</p>\n');
|
||||
content = content.replace(new RegExp('\\s*(<p[^>]+>.*</p>)', 'mg'), '\n$1');
|
||||
@ -365,7 +374,7 @@ var TinyMCE_wordpressPlugin = {
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCE.addPlugin("wordpress", TinyMCE_wordpressPlugin);
|
||||
//tinyMCE.addPlugin("wordpress", TinyMCE_wordpressPlugin);
|
||||
|
||||
/* This little hack protects our More and Page placeholders from the removeformat command */
|
||||
tinyMCE.orgExecCommand = tinyMCE.execCommand;
|
||||
@ -476,7 +485,7 @@ function switchEditors(id) {
|
||||
var ta = document.getElementById(id);
|
||||
var pdr = ta.parentNode;
|
||||
|
||||
if ( inst ) {
|
||||
if ( ! inst.isHidden(id) ) {
|
||||
edToggle(H, P);
|
||||
|
||||
if ( tinyMCE.isMSIE && !tinyMCE.isOpera ) {
|
||||
@ -492,19 +501,19 @@ function switchEditors(id) {
|
||||
var table = document.getElementById(inst.editorId + '_parent').getElementsByTagName('table')[0];
|
||||
var y1 = table.offsetTop + table.offsetHeight;
|
||||
|
||||
if ( TinyMCE_AdvancedTheme._getCookie("TinyMCE_" + inst.editorId + "_height") == null ) {
|
||||
if ( tinymce.util.Cookie.get("TinyMCE_" + inst.editorId + "_height") == null ) {
|
||||
var expires = new Date();
|
||||
expires.setTime(expires.getTime() + 3600000 * 24 * 30);
|
||||
var offset = tinyMCE.isMSIE ? 1 : 2;
|
||||
TinyMCE_AdvancedTheme._setCookie("TinyMCE_" + inst.editorId + "_height", "" + (table.offsetHeight - offset), expires);
|
||||
tinymce.util.Cookie.set("TinyMCE_" + inst.editorId + "_height", "" + (table.offsetHeight - offset), expires);
|
||||
}
|
||||
|
||||
// Unload the rich editor
|
||||
inst.triggerSave(false, false);
|
||||
htm = inst.formElement.value;
|
||||
tinyMCE.removeMCEControl(id);
|
||||
document.getElementById(id).value = htm;
|
||||
--tinyMCE.idCounter;
|
||||
// inst.triggerSave(false, false);
|
||||
// inst.formElement.value;
|
||||
inst.hide(); // tinyMCE.removeMCEControl(id);
|
||||
// document.getElementById(id).value = htm;
|
||||
// --tinyMCE.idCounter;
|
||||
|
||||
// Reveal Quicktags and textarea
|
||||
qt.style.display = 'block';
|
||||
@ -543,14 +552,14 @@ function switchEditors(id) {
|
||||
ta.parentNode.style.paddingRight = '0px';
|
||||
|
||||
// Load the rich editor with formatted html
|
||||
if ( tinyMCE.isMSIE ) {
|
||||
//if ( tinyMCE.isMSIE ) {
|
||||
// ta.value = wpautop(ta.value);
|
||||
// tinyMCE.addMCEControl(ta, id);
|
||||
//} else {
|
||||
ta.value = wpautop(ta.value);
|
||||
tinyMCE.addMCEControl(ta, id);
|
||||
} else {
|
||||
htm = wpautop(ta.value);
|
||||
tinyMCE.addMCEControl(ta, id);
|
||||
tinyMCE.getInstanceById(id).execCommand('mceSetContent', null, htm);
|
||||
}
|
||||
inst.show() // tinyMCE.addMCEControl(ta, id);
|
||||
//tinyMCE.getInstanceById(id).execCommand('mceSetContent', null, htm);
|
||||
//}
|
||||
|
||||
if ( tinyMCE.isMSIE && !tinyMCE.isOpera ) {
|
||||
} else {
|
||||
|
@ -1,81 +1,81 @@
|
||||
.mce_plugin_wordpress_more {
|
||||
border: 0px;
|
||||
border-top: 1px dotted #cccccc;
|
||||
display:block;
|
||||
background-color: #ffffff;
|
||||
margin-top:15px;
|
||||
background-image: url(images/more_bug.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: right top;
|
||||
}
|
||||
|
||||
.mce_plugin_wordpress_page {
|
||||
border: 0px;
|
||||
border-top: 1px dotted #cccccc;
|
||||
display:block;
|
||||
background-color: #ffffff;
|
||||
margin-top:15px;
|
||||
background-image: url(images/page_bug.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: right top;
|
||||
}
|
||||
|
||||
/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
|
||||
/* You can extend this CSS by adding your own CSS file with the the content_css option */
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
font: 1em/1.3em Georgia, "Times New Roman", Times, serif;
|
||||
padding: .5em;
|
||||
}
|
||||
|
||||
td {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: "Courier New", fixed;
|
||||
font-size: 11px;
|
||||
line-height: 13px;
|
||||
}
|
||||
|
||||
.mceVisualAid {
|
||||
border: 1px dashed #BBBBBB !important;
|
||||
}
|
||||
|
||||
.mceItemAnchor {
|
||||
width: 12px;
|
||||
line-height: 6px;
|
||||
overflow: hidden;
|
||||
padding-left: 12px;
|
||||
background-position: bottom;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
/* Important is needed in Gecko browsers inorder to style links */
|
||||
/*
|
||||
a {
|
||||
color: green !important;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Style selection range colors in Gecko browsers */
|
||||
/*
|
||||
::-moz-selection {
|
||||
background-color: red;
|
||||
color: green;
|
||||
}
|
||||
*/
|
||||
|
||||
/* MSIE specific */
|
||||
|
||||
* html body {
|
||||
scrollbar-3dlight-color: #F0F0EE;
|
||||
scrollbar-arrow-color: #676662;
|
||||
scrollbar-base-color: #F0F0EE;
|
||||
scrollbar-darkshadow-color: #DDDDDD;
|
||||
scrollbar-face-color: #E0E0DD;
|
||||
scrollbar-highlight-color: #F0F0EE;
|
||||
scrollbar-shadow-color: #F0F0EE;
|
||||
scrollbar-track-color: #F5F5F5;
|
||||
.mce_plugin_wordpress_more {
|
||||
border: 0px;
|
||||
border-top: 1px dotted #cccccc;
|
||||
display:block;
|
||||
background-color: #ffffff;
|
||||
margin-top:15px;
|
||||
background-image: url(images/more_bug.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: right top;
|
||||
}
|
||||
|
||||
.mce_plugin_wordpress_page {
|
||||
border: 0px;
|
||||
border-top: 1px dotted #cccccc;
|
||||
display:block;
|
||||
background-color: #ffffff;
|
||||
margin-top:15px;
|
||||
background-image: url(images/page_bug.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: right top;
|
||||
}
|
||||
|
||||
/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
|
||||
/* You can extend this CSS by adding your own CSS file with the the content_css option */
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
font: 1em/1.3em Georgia, "Times New Roman", Times, serif;
|
||||
padding: .5em;
|
||||
}
|
||||
|
||||
td {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: "Courier New", fixed;
|
||||
font-size: 11px;
|
||||
line-height: 13px;
|
||||
}
|
||||
|
||||
.mceVisualAid {
|
||||
border: 1px dashed #BBBBBB !important;
|
||||
}
|
||||
|
||||
.mceItemAnchor {
|
||||
width: 12px;
|
||||
line-height: 6px;
|
||||
overflow: hidden;
|
||||
padding-left: 12px;
|
||||
background-position: bottom;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
/* Important is needed in Gecko browsers inorder to style links */
|
||||
/*
|
||||
a {
|
||||
color: green !important;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Style selection range colors in Gecko browsers */
|
||||
/*
|
||||
::-moz-selection {
|
||||
background-color: red;
|
||||
color: green;
|
||||
}
|
||||
*/
|
||||
|
||||
/* MSIE specific */
|
||||
|
||||
* html body {
|
||||
scrollbar-3dlight-color: #F0F0EE;
|
||||
scrollbar-arrow-color: #676662;
|
||||
scrollbar-base-color: #F0F0EE;
|
||||
scrollbar-darkshadow-color: #DDDDDD;
|
||||
scrollbar-face-color: #E0E0DD;
|
||||
scrollbar-highlight-color: #F0F0EE;
|
||||
scrollbar-shadow-color: #F0F0EE;
|
||||
scrollbar-track-color: #F5F5F5;
|
||||
}
|
@ -1,35 +1,39 @@
|
||||
<!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>{$lang_about_title}</title>
|
||||
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="jscripts/about.js"></script>
|
||||
<base target="_self" />
|
||||
<title>{#advanced_dlg.about_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="js/about.js"></script>
|
||||
</head>
|
||||
<body id="about" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
|
||||
<body id="about" style="display: none">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_about}</a></span></li>
|
||||
<li id="help_tab"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{$lang_help}</a></span></li>
|
||||
<li id="plugins_tab"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{$lang_plugins}</a></span></li>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
|
||||
<li id="help_tab" style="display:none"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
|
||||
<li id="plugins_tab"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<h3>{$lang_about_title}</h3>
|
||||
<p>Version: {$tinymce_version} ({$tinymce_releasedate})</p>
|
||||
<h3>{#advanced_dlg.about_title}</h3>
|
||||
<p>Version: <span id="version"></span> (<span id="date"></span>)</p>
|
||||
<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>
|
||||
by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
|
||||
<p>Copyright © 2003-2007, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
|
||||
<p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
|
||||
|
||||
<div id="buttoncontainer"></div>
|
||||
<div id="buttoncontainer">
|
||||
<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
|
||||
<a href="http://sourceforge.net/projects/tinymce/" target="_blank"><img src="http://sourceforge.net/sflogo.php?group_id=103281" alt="Hosted By Sourceforge" border="0" /></a>
|
||||
<a href="http://www.freshmeat.net/projects/tinymce" target="_blank"><img src="http://tinymce.moxiecode.com/images/fm.gif" alt="Also on freshmeat" border="0" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="plugins_panel" class="panel">
|
||||
<div id="pluginscontainer">
|
||||
<h3>{$lang_loaded_plugins}</h3>
|
||||
<h3>{#advanced_dlg.about_loaded}</h3>
|
||||
|
||||
<div id="plugintablecontainer">
|
||||
</div>
|
||||
@ -45,7 +49,7 @@
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div style="float: right">
|
||||
<input type="button" id="cancel" name="cancel" value="{$lang_close}" onclick="tinyMCEPopup.close();" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -1,33 +1,32 @@
|
||||
<!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>{$lang_insert_anchor_title}</title>
|
||||
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="jscripts/anchor.js"></script>
|
||||
<title>{#advanced_dlg.anchor_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/anchor.js"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
|
||||
<form onsubmit="insertAnchor();return false;" action="#">
|
||||
|
||||
<body style="display: none">
|
||||
<form onsubmit="AnchorDialog.update();return false;" action="#">
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td colspan="2" class="title">{$lang_insert_anchor_title}</td>
|
||||
<td colspan="2" class="title">{#advanced_dlg.anchor_title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap="nowrap">{$lang_insert_anchor_name}:</td>
|
||||
<td nowrap="nowrap">{#advanced_dlg.anchor_name}:</td>
|
||||
<td><input name="anchorName" type="text" id="anchorName" value="" style="width: 200px" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div style="float: left">
|
||||
<input type="button" id="insert" name="insert" value="{$lang_update}" onclick="insertAnchor();" />
|
||||
<input type="button" id="insert" name="insert" value="{#update}" onclick="AnchorDialog.update();" />
|
||||
</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,19 +1,19 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{$lang_theme_charmap_title}</title>
|
||||
<title>{#advanced_dlg.charmap_title}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="jscripts/charmap.js"></script>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/charmap.js"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
|
||||
<body style="display: none">
|
||||
<table align="center" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td colspan="2" class="title">{$lang_theme_charmap_title}</td>
|
||||
<td colspan="2" class="title">{#advanced_dlg.charmap_title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2" align="left" valign="top">
|
||||
<script language="javascript" type="text/javascript">renderCharMapHTML();</script>
|
||||
<td id="charmap" 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">
|
||||
|
@ -1,27 +1,27 @@
|
||||
<!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>{$lang_theme_colorpicker_title}</title>
|
||||
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="jscripts/color_picker.js"></script>
|
||||
<link href="css/colorpicker.css" rel="stylesheet" type="text/css" />
|
||||
<title>{#advanced_dlg.colorpicker_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="js/color_picker.js"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
|
||||
<body id="colorpicker" style="display: none">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="picker_tab" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{$lang_color_picker_tab}</a></span></li>
|
||||
<li id="rgb_tab"><span><a href="#" onclick="generateWebColors();mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{$lang_web_colors_tab}</a></span></li>
|
||||
<li id="named_tab"><span><a href="#" onclick="generateNamedColors();javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{$lang_named_colors_tab}</a></span></li>
|
||||
<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>
|
||||
<li id="rgb_tab"><span><a href="javascript:;" onclick="generateWebColors();mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
|
||||
<li id="named_tab"><span><a href="javascript:;" onclick="generateNamedColors();javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="picker_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{$lang_color_picker}</legend>
|
||||
<legend>{#advanced_dlg.colorpicker_picker_title}</legend>
|
||||
<div id="picker">
|
||||
<img id="colorpicker" src="images/colors.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" />
|
||||
<img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" />
|
||||
|
||||
<div id="light">
|
||||
<!-- Will be filled with divs -->
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
<div id="rgb_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{$lang_web_colors}</legend>
|
||||
<legend>{#advanced_dlg.colorpicker_palette_title}</legend>
|
||||
<div id="webcolors">
|
||||
<!-- Gets filled with web safe colors-->
|
||||
</div>
|
||||
@ -45,7 +45,7 @@
|
||||
|
||||
<div id="named_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{$lang_named_colors}</legend>
|
||||
<legend>{#advanced_dlg.colorpicker_named_title}</legend>
|
||||
<div id="namedcolors">
|
||||
<!-- Gets filled with named colors-->
|
||||
</div>
|
||||
@ -53,7 +53,7 @@
|
||||
<br style="clear: both" />
|
||||
|
||||
<div id="colornamecontainer">
|
||||
{$lang_color_name} <span id="colorname"></span>
|
||||
{#advanced_dlg.colorpicker_name} <span id="colorname"></span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
@ -61,13 +61,13 @@
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div style="float: left">
|
||||
<input type="button" id="insert" name="insert" value="{$lang_theme_colorpicker_apply}" onclick="insertAction();" />
|
||||
<input type="button" id="insert" name="insert" value="{#apply}" onclick="insertAction();" />
|
||||
</div>
|
||||
|
||||
<div id="preview"></div>
|
||||
|
||||
<div id="previewblock">
|
||||
<label for="color">{$lang_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" />
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -1,53 +1,53 @@
|
||||
/* Colorpicker dialog specific CSS */
|
||||
|
||||
#preview {
|
||||
float: right;
|
||||
width: 50px;
|
||||
height: 14px;
|
||||
line-height: 1px;
|
||||
border: 1px solid black;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
#colorpicker {
|
||||
float: left;
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
#light {
|
||||
border: 1px solid gray;
|
||||
margin-left: 5px;
|
||||
float: left;
|
||||
width: 15px;
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
#light div {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#previewblock {
|
||||
float: right;
|
||||
padding-left: 10px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.panel_wrapper div.current {
|
||||
height: 175px;
|
||||
}
|
||||
|
||||
#namedcolors {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
#namedcolors a {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 10px; height: 10px;
|
||||
margin: 1px 1px 0 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#colornamecontainer {
|
||||
margin-top: 5px;
|
||||
/* Colorpicker dialog specific CSS */
|
||||
|
||||
#preview {
|
||||
float: right;
|
||||
width: 50px;
|
||||
height: 14px;
|
||||
line-height: 1px;
|
||||
border: 1px solid black;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
#colorpicker {
|
||||
float: left;
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
#light {
|
||||
border: 1px solid gray;
|
||||
margin-left: 5px;
|
||||
float: left;
|
||||
width: 15px;
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
#light div {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#previewblock {
|
||||
float: right;
|
||||
padding-left: 10px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.panel_wrapper div.current {
|
||||
height: 175px;
|
||||
}
|
||||
|
||||
#namedcolors {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
#namedcolors a {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 10px; height: 10px;
|
||||
margin: 1px 1px 0 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#colornamecontainer {
|
||||
margin-top: 5px;
|
||||
}
|
@ -1,58 +1,58 @@
|
||||
/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
|
||||
/* You can extend this CSS by adding your own CSS file with the the content_css option */
|
||||
|
||||
body, td, pre {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.mceVisualAid {
|
||||
border: 1px dashed #BBBBBB !important;
|
||||
}
|
||||
|
||||
div.mceVisualAid {
|
||||
background-image:url('../images/spacer.gif');
|
||||
visibility: visible !important;
|
||||
}
|
||||
|
||||
.mceItemAnchor {
|
||||
width: 12px;
|
||||
line-height: 6px;
|
||||
overflow: hidden;
|
||||
padding-left: 12px;
|
||||
background-image: url('../images/anchor_symbol.gif');
|
||||
background-position: bottom;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
/* Important is needed in Gecko browsers inorder to style links */
|
||||
/*
|
||||
a {
|
||||
color: green !important;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Style selection range colors in Gecko browsers */
|
||||
/*
|
||||
::-moz-selection {
|
||||
background-color: red;
|
||||
color: green;
|
||||
}
|
||||
*/
|
||||
|
||||
/* MSIE specific */
|
||||
|
||||
* html body {
|
||||
scrollbar-3dlight-color: #F0F0EE;
|
||||
scrollbar-arrow-color: #676662;
|
||||
scrollbar-base-color: #F0F0EE;
|
||||
scrollbar-darkshadow-color: #DDDDDD;
|
||||
scrollbar-face-color: #E0E0DD;
|
||||
scrollbar-highlight-color: #F0F0EE;
|
||||
scrollbar-shadow-color: #F0F0EE;
|
||||
scrollbar-track-color: #F5F5F5;
|
||||
}
|
||||
/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
|
||||
/* You can extend this CSS by adding your own CSS file with the the content_css option */
|
||||
|
||||
body, td, pre {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.mceVisualAid {
|
||||
border: 1px dashed #BBBBBB !important;
|
||||
}
|
||||
|
||||
div.mceVisualAid {
|
||||
background-image:url('../images/spacer.gif');
|
||||
visibility: visible !important;
|
||||
}
|
||||
|
||||
.mceItemAnchor {
|
||||
width: 12px;
|
||||
line-height: 6px;
|
||||
overflow: hidden;
|
||||
padding-left: 12px;
|
||||
background-image: url('../images/anchor_symbol.gif');
|
||||
background-position: bottom;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
/* Important is needed in Gecko browsers inorder to style links */
|
||||
/*
|
||||
a {
|
||||
color: green !important;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Style selection range colors in Gecko browsers */
|
||||
/*
|
||||
::-moz-selection {
|
||||
background-color: red;
|
||||
color: green;
|
||||
}
|
||||
*/
|
||||
|
||||
/* MSIE specific */
|
||||
|
||||
* html body {
|
||||
scrollbar-3dlight-color: #F0F0EE;
|
||||
scrollbar-arrow-color: #676662;
|
||||
scrollbar-base-color: #F0F0EE;
|
||||
scrollbar-darkshadow-color: #DDDDDD;
|
||||
scrollbar-face-color: #E0E0DD;
|
||||
scrollbar-highlight-color: #F0F0EE;
|
||||
scrollbar-shadow-color: #F0F0EE;
|
||||
scrollbar-track-color: #F5F5F5;
|
||||
}
|
||||
|
@ -1,358 +1,358 @@
|
||||
/* This file contains the CSS data for all popups in TinyMCE */
|
||||
|
||||
body {
|
||||
background-color: #F0F0EE;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
scrollbar-3dlight-color: #F0F0EE;
|
||||
scrollbar-arrow-color: #676662;
|
||||
scrollbar-base-color: #F0F0EE;
|
||||
scrollbar-darkshadow-color: #DDDDDD;
|
||||
scrollbar-face-color: #E0E0DD;
|
||||
scrollbar-highlight-color: #F0F0EE;
|
||||
scrollbar-shadow-color: #F0F0EE;
|
||||
scrollbar-track-color: #F5F5F5;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
td {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
input {
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #cccccc;
|
||||
}
|
||||
|
||||
td, input, select, textarea {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
input, select, textarea {
|
||||
border: 1px solid #808080;
|
||||
}
|
||||
|
||||
.input_noborder {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#insert, .updateButton {
|
||||
font-weight: bold;
|
||||
width: 90px;
|
||||
height: 21px;
|
||||
border: 0;
|
||||
background-image: url('../images/insert_button_bg.gif');
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#cancel {
|
||||
font-weight: bold;
|
||||
width: 90px;
|
||||
height: 21px;
|
||||
border: 0;
|
||||
background-image: url('../images/cancel_button_bg.gif');
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Mozilla only style */
|
||||
html>body #insert, html>body #cancel {
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #2B6FB6;
|
||||
}
|
||||
|
||||
table.charmap {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #AAAAAA;
|
||||
}
|
||||
|
||||
td.charmap, td.charmapOver {
|
||||
color: #000000;
|
||||
border-color: #AAAAAA;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
td.charmapOver {
|
||||
background-color: #CCCCCC;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
a.charmap {
|
||||
color: #000000;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.wordWrapCode {
|
||||
vertical-align: middle;
|
||||
border: 1px none #000000;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
input.radio {
|
||||
border: 1px none #000000;
|
||||
background-color: transparent;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
input.checkbox {
|
||||
border: 1px none #000000;
|
||||
background-color: transparent;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected {
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
.mceButtonNormal {
|
||||
border-top: 1px solid;
|
||||
border-left: 1px solid;
|
||||
border-bottom: 1px solid;
|
||||
border-right: 1px solid;
|
||||
border-color: #F0F0EE;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.mceButtonOver {
|
||||
border: 1px solid #0A246A;
|
||||
cursor: default;
|
||||
background-color: #B6BDD2;
|
||||
}
|
||||
|
||||
.mceButtonDown {
|
||||
cursor: default;
|
||||
border: 1px solid #0A246A;
|
||||
background-color: #8592B5;
|
||||
}
|
||||
|
||||
.mceButtonDisabled {
|
||||
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
|
||||
-moz-opacity:0.3;
|
||||
opacity: 0.3;
|
||||
border-top: 1px solid;
|
||||
border-left: 1px solid;
|
||||
border-bottom: 1px solid;
|
||||
border-right: 1px solid;
|
||||
border-color: #F0F0EE;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.mceActionPanel {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* Tabs classes */
|
||||
|
||||
.tabs {
|
||||
float: left;
|
||||
width: 100%;
|
||||
line-height: normal;
|
||||
background-image: url("../images/xp/tabs_bg.gif");
|
||||
}
|
||||
|
||||
.tabs ul {
|
||||
margin: 0;
|
||||
padding: 0 0 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.tabs li {
|
||||
float: left;
|
||||
background: url("../images/xp/tab_bg.gif") no-repeat left top;
|
||||
margin: 0;
|
||||
margin-left: 0;
|
||||
margin-right: 2px;
|
||||
padding: 0 0 0 10px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.tabs li.current {
|
||||
background: url("../images/xp/tab_sel_bg.gif") no-repeat left top;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.tabs span {
|
||||
float: left;
|
||||
display: block;
|
||||
background: url("../images/xp/tab_end.gif") no-repeat right top;
|
||||
padding: 0px 10px 0 0;
|
||||
}
|
||||
|
||||
.tabs .current span {
|
||||
background: url("../images/xp/tab_sel_end.gif") no-repeat right top;
|
||||
}
|
||||
|
||||
.tabs a {
|
||||
text-decoration: none;
|
||||
font-family: Verdana, Arial;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.tabs a:link, .tabs a:visited, .tabs a:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.tabs a:hover {
|
||||
}
|
||||
|
||||
.tabs .current {
|
||||
}
|
||||
|
||||
.tabs .current a, .tabs .current a:link, .tabs .current a:visited {
|
||||
}
|
||||
|
||||
.panel_wrapper div.panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.panel_wrapper div.current {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
overflow: visible; /* Should be auto but that breaks Safari */
|
||||
}
|
||||
|
||||
.panel_wrapper {
|
||||
border: 1px solid #919B9C;
|
||||
border-top: 0px;
|
||||
padding: 10px;
|
||||
padding-top: 5px;
|
||||
clear: both;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #919B9C;
|
||||
font-family: Verdana, Arial;
|
||||
font-size: 10px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
legend {
|
||||
color: #2B6FB6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.properties {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.properties .column1 {
|
||||
}
|
||||
|
||||
.properties .column2 {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
a:link, a:visited {
|
||||
color: black;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #2B6FB6;
|
||||
}
|
||||
|
||||
#plugintable thead {
|
||||
font-weight: bold;
|
||||
background-color: #DDDDDD;
|
||||
}
|
||||
|
||||
#plugintable, #about #plugintable td {
|
||||
border: 1px solid #919B9C;
|
||||
}
|
||||
|
||||
#plugintable {
|
||||
width: 99%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#pluginscontainer {
|
||||
height: 290px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* MSIE Specific styles */
|
||||
|
||||
* html .panel_wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.column {
|
||||
float: left;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4 {
|
||||
color: #2B6FB6;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#link .panel_wrapper, #link div.current {
|
||||
height: 125px;
|
||||
}
|
||||
|
||||
#image .panel_wrapper, #image div.current {
|
||||
height: 190px;
|
||||
}
|
||||
|
||||
label.msg { display: none; }
|
||||
label.invalid { color: #EE0000; display: inline; }
|
||||
input.invalid { border: 1px solid #EE0000; }
|
||||
|
||||
/* Disables the advanced tab in the table plugin. */
|
||||
/*
|
||||
#table #advanced_tab {
|
||||
display: none;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Disables the border input field and label in the table plugin. */
|
||||
/*
|
||||
#table #border, #table #borderlabel {
|
||||
display: none;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Below this line is WordPress customizations */
|
||||
#insert, #cancel, .submitbutton {
|
||||
font: 11px Verdana, Arial, Helvetica, sans-serif;
|
||||
height: auto;
|
||||
width: auto;
|
||||
background-color: transparent;
|
||||
background-image: url(../../../../../../wp-admin/images/fade-butt.png);
|
||||
background-repeat: repeat;
|
||||
border: 3px double;
|
||||
border-right-color: rgb(153, 153, 153);
|
||||
border-bottom-color: rgb(153, 153, 153);
|
||||
border-left-color: rgb(204, 204, 204);
|
||||
border-top-color: rgb(204, 204, 204);
|
||||
color: rgb(51, 51, 51);
|
||||
padding: 0.1em 0.5em;
|
||||
}
|
||||
|
||||
#insert:active, #cancel:active, .submitbutton:active {
|
||||
background: #f4f4f4;
|
||||
border-left-color: #999;
|
||||
border-top-color: #999;
|
||||
}
|
||||
|
||||
#styleSelectRow {
|
||||
display: none;
|
||||
/* This file contains the CSS data for all popups in TinyMCE */
|
||||
|
||||
body {
|
||||
background-color: #F0F0EE;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
scrollbar-3dlight-color: #F0F0EE;
|
||||
scrollbar-arrow-color: #676662;
|
||||
scrollbar-base-color: #F0F0EE;
|
||||
scrollbar-darkshadow-color: #DDDDDD;
|
||||
scrollbar-face-color: #E0E0DD;
|
||||
scrollbar-highlight-color: #F0F0EE;
|
||||
scrollbar-shadow-color: #F0F0EE;
|
||||
scrollbar-track-color: #F5F5F5;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
td {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
input {
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #cccccc;
|
||||
}
|
||||
|
||||
td, input, select, textarea {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
input, select, textarea {
|
||||
border: 1px solid #808080;
|
||||
}
|
||||
|
||||
.input_noborder {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#insert, .updateButton {
|
||||
font-weight: bold;
|
||||
width: 90px;
|
||||
height: 21px;
|
||||
border: 0;
|
||||
background-image: url('../images/insert_button_bg.gif');
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#cancel {
|
||||
font-weight: bold;
|
||||
width: 90px;
|
||||
height: 21px;
|
||||
border: 0;
|
||||
background-image: url('../images/cancel_button_bg.gif');
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Mozilla only style */
|
||||
html>body #insert, html>body #cancel {
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #2B6FB6;
|
||||
}
|
||||
|
||||
table.charmap {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #AAAAAA;
|
||||
}
|
||||
|
||||
td.charmap, td.charmapOver {
|
||||
color: #000000;
|
||||
border-color: #AAAAAA;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
td.charmapOver {
|
||||
background-color: #CCCCCC;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
a.charmap {
|
||||
color: #000000;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.wordWrapCode {
|
||||
vertical-align: middle;
|
||||
border: 1px none #000000;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
input.radio {
|
||||
border: 1px none #000000;
|
||||
background-color: transparent;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
input.checkbox {
|
||||
border: 1px none #000000;
|
||||
background-color: transparent;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected {
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
.mceButtonNormal {
|
||||
border-top: 1px solid;
|
||||
border-left: 1px solid;
|
||||
border-bottom: 1px solid;
|
||||
border-right: 1px solid;
|
||||
border-color: #F0F0EE;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.mceButtonOver {
|
||||
border: 1px solid #0A246A;
|
||||
cursor: default;
|
||||
background-color: #B6BDD2;
|
||||
}
|
||||
|
||||
.mceButtonDown {
|
||||
cursor: default;
|
||||
border: 1px solid #0A246A;
|
||||
background-color: #8592B5;
|
||||
}
|
||||
|
||||
.mceButtonDisabled {
|
||||
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
|
||||
-moz-opacity:0.3;
|
||||
opacity: 0.3;
|
||||
border-top: 1px solid;
|
||||
border-left: 1px solid;
|
||||
border-bottom: 1px solid;
|
||||
border-right: 1px solid;
|
||||
border-color: #F0F0EE;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.mceActionPanel {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* Tabs classes */
|
||||
|
||||
.tabs {
|
||||
float: left;
|
||||
width: 100%;
|
||||
line-height: normal;
|
||||
background-image: url("../images/xp/tabs_bg.gif");
|
||||
}
|
||||
|
||||
.tabs ul {
|
||||
margin: 0;
|
||||
padding: 0 0 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.tabs li {
|
||||
float: left;
|
||||
background: url("../images/xp/tab_bg.gif") no-repeat left top;
|
||||
margin: 0;
|
||||
margin-left: 0;
|
||||
margin-right: 2px;
|
||||
padding: 0 0 0 10px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.tabs li.current {
|
||||
background: url("../images/xp/tab_sel_bg.gif") no-repeat left top;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.tabs span {
|
||||
float: left;
|
||||
display: block;
|
||||
background: url("../images/xp/tab_end.gif") no-repeat right top;
|
||||
padding: 0px 10px 0 0;
|
||||
}
|
||||
|
||||
.tabs .current span {
|
||||
background: url("../images/xp/tab_sel_end.gif") no-repeat right top;
|
||||
}
|
||||
|
||||
.tabs a {
|
||||
text-decoration: none;
|
||||
font-family: Verdana, Arial;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.tabs a:link, .tabs a:visited, .tabs a:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.tabs a:hover {
|
||||
}
|
||||
|
||||
.tabs .current {
|
||||
}
|
||||
|
||||
.tabs .current a, .tabs .current a:link, .tabs .current a:visited {
|
||||
}
|
||||
|
||||
.panel_wrapper div.panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.panel_wrapper div.current {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
overflow: visible; /* Should be auto but that breaks Safari */
|
||||
}
|
||||
|
||||
.panel_wrapper {
|
||||
border: 1px solid #919B9C;
|
||||
border-top: 0px;
|
||||
padding: 10px;
|
||||
padding-top: 5px;
|
||||
clear: both;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #919B9C;
|
||||
font-family: Verdana, Arial;
|
||||
font-size: 10px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
legend {
|
||||
color: #2B6FB6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.properties {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.properties .column1 {
|
||||
}
|
||||
|
||||
.properties .column2 {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
a:link, a:visited {
|
||||
color: black;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #2B6FB6;
|
||||
}
|
||||
|
||||
#plugintable thead {
|
||||
font-weight: bold;
|
||||
background-color: #DDDDDD;
|
||||
}
|
||||
|
||||
#plugintable, #about #plugintable td {
|
||||
border: 1px solid #919B9C;
|
||||
}
|
||||
|
||||
#plugintable {
|
||||
width: 99%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#pluginscontainer {
|
||||
height: 290px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* MSIE Specific styles */
|
||||
|
||||
* html .panel_wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.column {
|
||||
float: left;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4 {
|
||||
color: #2B6FB6;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#link .panel_wrapper, #link div.current {
|
||||
height: 125px;
|
||||
}
|
||||
|
||||
#image .panel_wrapper, #image div.current {
|
||||
height: 190px;
|
||||
}
|
||||
|
||||
label.msg { display: none; }
|
||||
label.invalid { color: #EE0000; display: inline; }
|
||||
input.invalid { border: 1px solid #EE0000; }
|
||||
|
||||
/* Disables the advanced tab in the table plugin. */
|
||||
/*
|
||||
#table #advanced_tab {
|
||||
display: none;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Disables the border input field and label in the table plugin. */
|
||||
/*
|
||||
#table #border, #table #borderlabel {
|
||||
display: none;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Below this line is WordPress customizations */
|
||||
#insert, #cancel, .submitbutton {
|
||||
font: 11px Verdana, Arial, Helvetica, sans-serif;
|
||||
height: auto;
|
||||
width: auto;
|
||||
background-color: transparent;
|
||||
background-image: url(../../../../../../wp-admin/images/fade-butt.png);
|
||||
background-repeat: repeat;
|
||||
border: 3px double;
|
||||
border-right-color: rgb(153, 153, 153);
|
||||
border-bottom-color: rgb(153, 153, 153);
|
||||
border-left-color: rgb(204, 204, 204);
|
||||
border-top-color: rgb(204, 204, 204);
|
||||
color: rgb(51, 51, 51);
|
||||
padding: 0.1em 0.5em;
|
||||
}
|
||||
|
||||
#insert:active, #cancel:active, .submitbutton:active {
|
||||
background: #f4f4f4;
|
||||
border-left-color: #999;
|
||||
border-top-color: #999;
|
||||
}
|
||||
|
||||
#styleSelectRow {
|
||||
display: none;
|
||||
}
|
@ -1,18 +1,18 @@
|
||||
<!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>{$lang_insert_image_title}</title>
|
||||
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="jscripts/image.js"></script>
|
||||
<title>{#advanced_dlg.image_title}</title>
|
||||
<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="js/image.js"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<!-- WordPress: extra onload stuff is WP -->
|
||||
<body id="image" onload="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';document.getElementById('src').focus();" style="display: none">
|
||||
<form onsubmit="insertImage();return false;" action="#">
|
||||
<body id="image" style="display: none">
|
||||
<form onsubmit="ImageDialog.update();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_insert_image_title}</a></span></li>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.image_title}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -20,81 +20,65 @@
|
||||
<div id="general_panel" class="panel current">
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap"><label for="src">{$lang_insert_image_src}</label></td>
|
||||
<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="getImageData();" /></td>
|
||||
<td><input id="src" name="src" type="text" value="" style="width: 200px" onchange="ImageDialog.getImageData();" /></td>
|
||||
<td id="srcbrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<!-- Image list -->
|
||||
<script language="javascript">
|
||||
if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) {
|
||||
var html = "";
|
||||
|
||||
html += '<tr><td><label for="image_list">{$lang_image_list}</label></td>';
|
||||
html += '<td><select id="image_list" name="image_list" style="width: 200px" onchange="this.form.src.value=this.options[this.selectedIndex].value;resetImageData();getImageData();">';
|
||||
html += '<option value="">---</option>';
|
||||
|
||||
for (var i=0; i<tinyMCEImageList.length; i++)
|
||||
html += '<option value="' + tinyMCEImageList[i][1] + '">' + tinyMCEImageList[i][0] + '</option>';
|
||||
|
||||
html += '</select></td></tr>';
|
||||
|
||||
document.write(html);
|
||||
}
|
||||
</script>
|
||||
<!-- /Image list -->
|
||||
<tr>
|
||||
<td><label for="image_list">{#advanced_dlg.image_list}</label></td>
|
||||
<td><select id="image_list" name="image_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap="nowrap"><label for="alt">{$lang_insert_image_alt}</label></td>
|
||||
<td nowrap="nowrap"><label for="alt">{#advanced_dlg.image_alt}</label></td>
|
||||
<td><input id="alt" name="alt" type="text" value="" style="width: 200px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap="nowrap"><label for="align">{$lang_insert_image_align}</label></td>
|
||||
<td><select id="align" name="align">
|
||||
<option value="">{$lang_insert_image_align_default}</option>
|
||||
<option value="baseline">{$lang_insert_image_align_baseline}</option>
|
||||
<option value="top">{$lang_insert_image_align_top}</option>
|
||||
<option value="middle">{$lang_insert_image_align_middle}</option>
|
||||
<option value="bottom">{$lang_insert_image_align_bottom}</option>
|
||||
<option value="texttop">{$lang_insert_image_align_texttop}</option>
|
||||
<option value="absmiddle">{$lang_insert_image_align_absmiddle}</option>
|
||||
<option value="absbottom">{$lang_insert_image_align_absbottom}</option>
|
||||
<option value="left">{$lang_insert_image_align_left}</option>
|
||||
<option value="right">{$lang_insert_image_align_right}</option>
|
||||
<td nowrap="nowrap"><label for="align">{#advanced_dlg.image_align}</label></td>
|
||||
<td><select id="align" name="align" onchange="ImageDialog.updateStyle();">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="baseline">{#advanced_dlg.image_align_baseline}</option>
|
||||
<option value="top">{#advanced_dlg.image_align_top}</option>
|
||||
<option value="middle">{#advanced_dlg.image_align_middle}</option>
|
||||
<option value="bottom">{#advanced_dlg.image_align_bottom}</option>
|
||||
<option value="text-top">{#advanced_dlg.image_align_texttop}</option>
|
||||
<option value="text-bottom">{#advanced_dlg.image_align_textbottom}</option>
|
||||
<option value="left">{#advanced_dlg.image_align_left}</option>
|
||||
<option value="right">{#advanced_dlg.image_align_right}</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap="nowrap"><label for="width">{$lang_insert_image_dimensions}</label></td>
|
||||
<td nowrap="nowrap"><label for="width">{#advanced_dlg.image_dimensions}</label></td>
|
||||
<td><input id="width" name="width" type="text" value="" size="3" maxlength="5" />
|
||||
x
|
||||
<input id="height" name="height" type="text" value="" size="3" maxlength="5" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap="nowrap"><label for="border">{$lang_insert_image_border}</label></td>
|
||||
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" /></td>
|
||||
<td nowrap="nowrap"><label for="border">{#advanced_dlg.image_border}</label></td>
|
||||
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap="nowrap"><label for="vspace">{$lang_insert_image_vspace}</label></td>
|
||||
<td><input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3" /></td>
|
||||
<td nowrap="nowrap"><label for="vspace">{#advanced_dlg.image_vspace}</label></td>
|
||||
<td><input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap="nowrap"><label for="hspace">{$lang_insert_image_hspace}</label></td>
|
||||
<td><input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3" /></td>
|
||||
<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>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<!-- WordPress: buttons reversed! -->
|
||||
<div style="float: left">
|
||||
<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
|
||||
<input type="button" id="insert" name="insert" value="{#insert}" onclick="ImageDialog.update();" />
|
||||
</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="submit" id="insert" name="insert" value="{$lang_insert}" onclick="insertImage();" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
BIN
wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
wp-includes/js/tinymce/themes/advanced/img/icons.gif
Normal file
After Width: | Height: | Size: 11 KiB |
76
wp-includes/js/tinymce/themes/advanced/js/about.js
Normal file
@ -0,0 +1,76 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
function init() {
|
||||
var ed, tcont;
|
||||
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
ed = tinyMCEPopup.editor;
|
||||
|
||||
// Give FF some time
|
||||
window.setTimeout('insertHelpIFrame();', 10);
|
||||
|
||||
tcont = document.getElementById('plugintablecontainer');
|
||||
document.getElementById('plugins_tab').style.display = 'none';
|
||||
|
||||
var html = "";
|
||||
html += '<table id="plugintable">';
|
||||
html += '<thead>';
|
||||
html += '<tr>';
|
||||
html += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>';
|
||||
html += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>';
|
||||
html += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>';
|
||||
html += '</tr>';
|
||||
html += '</thead>';
|
||||
html += '<tbody>';
|
||||
|
||||
tinymce.each(ed.plugins, function(p, n) {
|
||||
var info;
|
||||
|
||||
if (!p.getInfo)
|
||||
return;
|
||||
|
||||
html += '<tr>';
|
||||
|
||||
info = p.getInfo();
|
||||
|
||||
if (info.infourl != null && info.infourl != '')
|
||||
html += '<td width="50%" title="' + n + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>';
|
||||
else
|
||||
html += '<td width="50%" title="' + n + '">' + info.longname + '</td>';
|
||||
|
||||
if (info.authorurl != null && info.authorurl != '')
|
||||
html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>';
|
||||
else
|
||||
html += '<td width="35%">' + info.author + '</td>';
|
||||
|
||||
html += '<td width="15%">' + info.version + '</td>';
|
||||
html += '</tr>';
|
||||
|
||||
document.getElementById('plugins_tab').style.display = '';
|
||||
|
||||
});
|
||||
|
||||
html += '</tbody>';
|
||||
html += '</table>';
|
||||
|
||||
tcont.innerHTML = html;
|
||||
|
||||
tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
|
||||
tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;
|
||||
}
|
||||
|
||||
function insertHelpIFrame() {
|
||||
var html;
|
||||
|
||||
if (tinyMCEPopup.getParam('docs_url')) {
|
||||
html = '<iframe width="100%" height="300" src="' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '"></iframe>';
|
||||
document.getElementById('iframecontainer').innerHTML = html;
|
||||
document.getElementById('help_tab').style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
||||
|
||||
// For modal dialogs in IE
|
||||
if (tinymce.isIE)
|
||||
document.write('<base target="_self" />');
|
33
wp-includes/js/tinymce/themes/advanced/js/anchor.js
Normal file
@ -0,0 +1,33 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var AnchorDialog = {
|
||||
init : function(ed) {
|
||||
var action, elm, f = document.forms[0];
|
||||
|
||||
this.editor = ed;
|
||||
elm = ed.dom.getParent(ed.selection.getNode(), 'A,IMG');
|
||||
v = ed.dom.getAttrib(elm, 'name');
|
||||
|
||||
if (v)
|
||||
f.anchorName.value = v;
|
||||
|
||||
f.insert.value = ed.getLang(elm ? 'update' : 'insert');
|
||||
},
|
||||
|
||||
update : function() {
|
||||
var ed = this.editor;
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
ed.selection.collapse(1);
|
||||
|
||||
// Webkit acts weird if empty inline element is inserted so we need to use a image instead
|
||||
if (tinymce.isWebKit)
|
||||
ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('img', {mce_name : 'a', name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}));
|
||||
else
|
||||
ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}, ''));
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);
|
327
wp-includes/js/tinymce/themes/advanced/js/charmap.js
Normal file
@ -0,0 +1,327 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var charmap = [
|
||||
[' ', ' ', true, 'no-break space'],
|
||||
['&', '&', true, 'ampersand'],
|
||||
['"', '"', true, 'quotation mark'],
|
||||
// finance
|
||||
['¢', '¢', true, 'cent sign'],
|
||||
['€', '€', true, 'euro sign'],
|
||||
['£', '£', true, 'pound sign'],
|
||||
['¥', '¥', true, 'yen sign'],
|
||||
// signs
|
||||
['©', '©', true, 'copyright sign'],
|
||||
['®', '®', true, 'registered sign'],
|
||||
['™', '™', true, 'trade mark sign'],
|
||||
['‰', '‰', true, 'per mille sign'],
|
||||
['µ', 'µ', true, 'micro sign'],
|
||||
['·', '·', true, 'middle dot'],
|
||||
['•', '•', true, 'bullet'],
|
||||
['…', '…', true, 'three dot leader'],
|
||||
['′', '′', true, 'minutes / feet'],
|
||||
['″', '″', true, 'seconds / inches'],
|
||||
['§', '§', true, 'section sign'],
|
||||
['¶', '¶', true, 'paragraph sign'],
|
||||
['ß', 'ß', true, 'sharp s / ess-zed'],
|
||||
// quotations
|
||||
['‹', '‹', true, 'single left-pointing angle quotation mark'],
|
||||
['›', '›', true, 'single right-pointing angle quotation mark'],
|
||||
['«', '«', true, 'left pointing guillemet'],
|
||||
['»', '»', true, 'right pointing guillemet'],
|
||||
['‘', '‘', true, 'left single quotation mark'],
|
||||
['’', '’', true, 'right single quotation mark'],
|
||||
['“', '“', true, 'left double quotation mark'],
|
||||
['”', '”', true, 'right double quotation mark'],
|
||||
['‚', '‚', true, 'single low-9 quotation mark'],
|
||||
['„', '„', true, 'double low-9 quotation mark'],
|
||||
['<', '<', true, 'less-than sign'],
|
||||
['>', '>', true, 'greater-than sign'],
|
||||
['≤', '≤', true, 'less-than or equal to'],
|
||||
['≥', '≥', true, 'greater-than or equal to'],
|
||||
['–', '–', true, 'en dash'],
|
||||
['—', '—', true, 'em dash'],
|
||||
['¯', '¯', true, 'macron'],
|
||||
['‾', '‾', true, 'overline'],
|
||||
['¤', '¤', true, 'currency sign'],
|
||||
['¦', '¦', true, 'broken bar'],
|
||||
['¨', '¨', true, 'diaeresis'],
|
||||
['¡', '¡', true, 'inverted exclamation mark'],
|
||||
['¿', '¿', true, 'turned question mark'],
|
||||
['ˆ', 'ˆ', true, 'circumflex accent'],
|
||||
['˜', '˜', true, 'small tilde'],
|
||||
['°', '°', true, 'degree sign'],
|
||||
['−', '−', true, 'minus sign'],
|
||||
['±', '±', true, 'plus-minus sign'],
|
||||
['÷', '÷', true, 'division sign'],
|
||||
['⁄', '⁄', true, 'fraction slash'],
|
||||
['×', '×', true, 'multiplication sign'],
|
||||
['¹', '¹', true, 'superscript one'],
|
||||
['²', '²', true, 'superscript two'],
|
||||
['³', '³', true, 'superscript three'],
|
||||
['¼', '¼', true, 'fraction one quarter'],
|
||||
['½', '½', true, 'fraction one half'],
|
||||
['¾', '¾', true, 'fraction three quarters'],
|
||||
// math / logical
|
||||
['ƒ', 'ƒ', true, 'function / florin'],
|
||||
['∫', '∫', true, 'integral'],
|
||||
['∑', '∑', true, 'n-ary sumation'],
|
||||
['∞', '∞', true, 'infinity'],
|
||||
['√', '√', true, 'square root'],
|
||||
['∼', '∼', false,'similar to'],
|
||||
['≅', '≅', false,'approximately equal to'],
|
||||
['≈', '≈', true, 'almost equal to'],
|
||||
['≠', '≠', true, 'not equal to'],
|
||||
['≡', '≡', true, 'identical to'],
|
||||
['∈', '∈', false,'element of'],
|
||||
['∉', '∉', false,'not an element of'],
|
||||
['∋', '∋', false,'contains as member'],
|
||||
['∏', '∏', true, 'n-ary product'],
|
||||
['∧', '∧', false,'logical and'],
|
||||
['∨', '∨', false,'logical or'],
|
||||
['¬', '¬', true, 'not sign'],
|
||||
['∩', '∩', true, 'intersection'],
|
||||
['∪', '∪', false,'union'],
|
||||
['∂', '∂', true, 'partial differential'],
|
||||
['∀', '∀', false,'for all'],
|
||||
['∃', '∃', false,'there exists'],
|
||||
['∅', '∅', false,'diameter'],
|
||||
['∇', '∇', false,'backward difference'],
|
||||
['∗', '∗', false,'asterisk operator'],
|
||||
['∝', '∝', false,'proportional to'],
|
||||
['∠', '∠', false,'angle'],
|
||||
// undefined
|
||||
['´', '´', true, 'acute accent'],
|
||||
['¸', '¸', true, 'cedilla'],
|
||||
['ª', 'ª', true, 'feminine ordinal indicator'],
|
||||
['º', 'º', true, 'masculine ordinal indicator'],
|
||||
['†', '†', true, 'dagger'],
|
||||
['‡', '‡', true, 'double dagger'],
|
||||
// alphabetical special chars
|
||||
['À', 'À', true, 'A - grave'],
|
||||
['Á', 'Á', true, 'A - acute'],
|
||||
['Â', 'Â', true, 'A - circumflex'],
|
||||
['Ã', 'Ã', true, 'A - tilde'],
|
||||
['Ä', 'Ä', true, 'A - diaeresis'],
|
||||
['Å', 'Å', true, 'A - ring above'],
|
||||
['Æ', 'Æ', true, 'ligature AE'],
|
||||
['Ç', 'Ç', true, 'C - cedilla'],
|
||||
['È', 'È', true, 'E - grave'],
|
||||
['É', 'É', true, 'E - acute'],
|
||||
['Ê', 'Ê', true, 'E - circumflex'],
|
||||
['Ë', 'Ë', true, 'E - diaeresis'],
|
||||
['Ì', 'Ì', true, 'I - grave'],
|
||||
['Í', 'Í', true, 'I - acute'],
|
||||
['Î', 'Î', true, 'I - circumflex'],
|
||||
['Ï', 'Ï', true, 'I - diaeresis'],
|
||||
['Ð', 'Ð', true, 'ETH'],
|
||||
['Ñ', 'Ñ', true, 'N - tilde'],
|
||||
['Ò', 'Ò', true, 'O - grave'],
|
||||
['Ó', 'Ó', true, 'O - acute'],
|
||||
['Ô', 'Ô', true, 'O - circumflex'],
|
||||
['Õ', 'Õ', true, 'O - tilde'],
|
||||
['Ö', 'Ö', true, 'O - diaeresis'],
|
||||
['Ø', 'Ø', true, 'O - slash'],
|
||||
['Œ', 'Œ', true, 'ligature OE'],
|
||||
['Š', 'Š', true, 'S - caron'],
|
||||
['Ù', 'Ù', true, 'U - grave'],
|
||||
['Ú', 'Ú', true, 'U - acute'],
|
||||
['Û', 'Û', true, 'U - circumflex'],
|
||||
['Ü', 'Ü', true, 'U - diaeresis'],
|
||||
['Ý', 'Ý', true, 'Y - acute'],
|
||||
['Ÿ', 'Ÿ', true, 'Y - diaeresis'],
|
||||
['Þ', 'Þ', true, 'THORN'],
|
||||
['à', 'à', true, 'a - grave'],
|
||||
['á', 'á', true, 'a - acute'],
|
||||
['â', 'â', true, 'a - circumflex'],
|
||||
['ã', 'ã', true, 'a - tilde'],
|
||||
['ä', 'ä', true, 'a - diaeresis'],
|
||||
['å', 'å', true, 'a - ring above'],
|
||||
['æ', 'æ', true, 'ligature ae'],
|
||||
['ç', 'ç', true, 'c - cedilla'],
|
||||
['è', 'è', true, 'e - grave'],
|
||||
['é', 'é', true, 'e - acute'],
|
||||
['ê', 'ê', true, 'e - circumflex'],
|
||||
['ë', 'ë', true, 'e - diaeresis'],
|
||||
['ì', 'ì', true, 'i - grave'],
|
||||
['í', 'í', true, 'i - acute'],
|
||||
['î', 'î', true, 'i - circumflex'],
|
||||
['ï', 'ï', true, 'i - diaeresis'],
|
||||
['ð', 'ð', true, 'eth'],
|
||||
['ñ', 'ñ', true, 'n - tilde'],
|
||||
['ò', 'ò', true, 'o - grave'],
|
||||
['ó', 'ó', true, 'o - acute'],
|
||||
['ô', 'ô', true, 'o - circumflex'],
|
||||
['õ', 'õ', true, 'o - tilde'],
|
||||
['ö', 'ö', true, 'o - diaeresis'],
|
||||
['ø', 'ø', true, 'o slash'],
|
||||
['œ', 'œ', true, 'ligature oe'],
|
||||
['š', 'š', true, 's - caron'],
|
||||
['ù', 'ù', true, 'u - grave'],
|
||||
['ú', 'ú', true, 'u - acute'],
|
||||
['û', 'û', true, 'u - circumflex'],
|
||||
['ü', 'ü', true, 'u - diaeresis'],
|
||||
['ý', 'ý', true, 'y - acute'],
|
||||
['þ', 'þ', true, 'thorn'],
|
||||
['ÿ', 'ÿ', true, 'y - diaeresis'],
|
||||
['Α', 'Α', true, 'Alpha'],
|
||||
['Β', 'Β', true, 'Beta'],
|
||||
['Γ', 'Γ', true, 'Gamma'],
|
||||
['Δ', 'Δ', true, 'Delta'],
|
||||
['Ε', 'Ε', true, 'Epsilon'],
|
||||
['Ζ', 'Ζ', true, 'Zeta'],
|
||||
['Η', 'Η', true, 'Eta'],
|
||||
['Θ', 'Θ', true, 'Theta'],
|
||||
['Ι', 'Ι', true, 'Iota'],
|
||||
['Κ', 'Κ', true, 'Kappa'],
|
||||
['Λ', 'Λ', true, 'Lambda'],
|
||||
['Μ', 'Μ', true, 'Mu'],
|
||||
['Ν', 'Ν', true, 'Nu'],
|
||||
['Ξ', 'Ξ', true, 'Xi'],
|
||||
['Ο', 'Ο', true, 'Omicron'],
|
||||
['Π', 'Π', true, 'Pi'],
|
||||
['Ρ', 'Ρ', true, 'Rho'],
|
||||
['Σ', 'Σ', true, 'Sigma'],
|
||||
['Τ', 'Τ', true, 'Tau'],
|
||||
['Υ', 'Υ', true, 'Upsilon'],
|
||||
['Φ', 'Φ', true, 'Phi'],
|
||||
['Χ', 'Χ', true, 'Chi'],
|
||||
['Ψ', 'Ψ', true, 'Psi'],
|
||||
['Ω', 'Ω', true, 'Omega'],
|
||||
['α', 'α', true, 'alpha'],
|
||||
['β', 'β', true, 'beta'],
|
||||
['γ', 'γ', true, 'gamma'],
|
||||
['δ', 'δ', true, 'delta'],
|
||||
['ε', 'ε', true, 'epsilon'],
|
||||
['ζ', 'ζ', true, 'zeta'],
|
||||
['η', 'η', true, 'eta'],
|
||||
['θ', 'θ', true, 'theta'],
|
||||
['ι', 'ι', true, 'iota'],
|
||||
['κ', 'κ', true, 'kappa'],
|
||||
['λ', 'λ', true, 'lambda'],
|
||||
['μ', 'μ', true, 'mu'],
|
||||
['ν', 'ν', true, 'nu'],
|
||||
['ξ', 'ξ', true, 'xi'],
|
||||
['ο', 'ο', true, 'omicron'],
|
||||
['π', 'π', true, 'pi'],
|
||||
['ρ', 'ρ', true, 'rho'],
|
||||
['ς', 'ς', true, 'final sigma'],
|
||||
['σ', 'σ', true, 'sigma'],
|
||||
['τ', 'τ', true, 'tau'],
|
||||
['υ', 'υ', true, 'upsilon'],
|
||||
['φ', 'φ', true, 'phi'],
|
||||
['χ', 'χ', true, 'chi'],
|
||||
['ψ', 'ψ', true, 'psi'],
|
||||
['ω', 'ω', true, 'omega'],
|
||||
// symbols
|
||||
['ℵ', 'ℵ', false,'alef symbol'],
|
||||
['ϖ', 'ϖ', false,'pi symbol'],
|
||||
['ℜ', 'ℜ', false,'real part symbol'],
|
||||
['ϑ','ϑ', false,'theta symbol'],
|
||||
['ϒ', 'ϒ', false,'upsilon - hook symbol'],
|
||||
['℘', '℘', false,'Weierstrass p'],
|
||||
['ℑ', 'ℑ', false,'imaginary part'],
|
||||
// arrows
|
||||
['←', '←', true, 'leftwards arrow'],
|
||||
['↑', '↑', true, 'upwards arrow'],
|
||||
['→', '→', true, 'rightwards arrow'],
|
||||
['↓', '↓', true, 'downwards arrow'],
|
||||
['↔', '↔', true, 'left right arrow'],
|
||||
['↵', '↵', false,'carriage return'],
|
||||
['⇐', '⇐', false,'leftwards double arrow'],
|
||||
['⇑', '⇑', false,'upwards double arrow'],
|
||||
['⇒', '⇒', false,'rightwards double arrow'],
|
||||
['⇓', '⇓', false,'downwards double arrow'],
|
||||
['⇔', '⇔', false,'left right double arrow'],
|
||||
['∴', '∴', false,'therefore'],
|
||||
['⊂', '⊂', false,'subset of'],
|
||||
['⊃', '⊃', false,'superset of'],
|
||||
['⊄', '⊄', false,'not a subset of'],
|
||||
['⊆', '⊆', false,'subset of or equal to'],
|
||||
['⊇', '⊇', false,'superset of or equal to'],
|
||||
['⊕', '⊕', false,'circled plus'],
|
||||
['⊗', '⊗', false,'circled times'],
|
||||
['⊥', '⊥', false,'perpendicular'],
|
||||
['⋅', '⋅', false,'dot operator'],
|
||||
['⌈', '⌈', false,'left ceiling'],
|
||||
['⌉', '⌉', false,'right ceiling'],
|
||||
['⌊', '⌊', false,'left floor'],
|
||||
['⌋', '⌋', false,'right floor'],
|
||||
['⟨', '〈', false,'left-pointing angle bracket'],
|
||||
['⟩', '〉', false,'right-pointing angle bracket'],
|
||||
['◊', '◊', true,'lozenge'],
|
||||
['♠', '♠', false,'black spade suit'],
|
||||
['♣', '♣', true, 'black club suit'],
|
||||
['♥', '♥', true, 'black heart suit'],
|
||||
['♦', '♦', true, 'black diamond suit'],
|
||||
[' ', ' ', false,'en space'],
|
||||
[' ', ' ', false,'em space'],
|
||||
[' ', ' ', false,'thin space'],
|
||||
['‌', '‌', false,'zero width non-joiner'],
|
||||
['‍', '‍', false,'zero width joiner'],
|
||||
['‎', '‎', false,'left-to-right mark'],
|
||||
['‏', '‏', false,'right-to-left mark'],
|
||||
['­', '­', false,'soft hyphen']
|
||||
];
|
||||
|
||||
tinyMCEPopup.onInit.add(function() {
|
||||
tinyMCEPopup.dom.setHTML('charmap', renderCharMapHTML());
|
||||
});
|
||||
|
||||
function renderCharMapHTML() {
|
||||
var charsPerRow = 20, tdWidth=20, tdHeight=20, i;
|
||||
var html = '<table border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) + '"><tr height="' + tdHeight + '">';
|
||||
var cols=-1;
|
||||
|
||||
for (i=0; i<charmap.length; i++) {
|
||||
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] + '">'
|
||||
+ charmap[i][1]
|
||||
+ '</a></td>';
|
||||
if ((cols+1) % charsPerRow == 0)
|
||||
html += '</tr><tr height="' + tdHeight + '">';
|
||||
}
|
||||
}
|
||||
|
||||
if (cols % charsPerRow > 0) {
|
||||
var padd = charsPerRow - (cols % charsPerRow);
|
||||
for (var i=0; i<padd-1; i++)
|
||||
html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"> </td>';
|
||||
}
|
||||
|
||||
html += '</tr></table>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function insertChar(chr) {
|
||||
tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';');
|
||||
|
||||
// Refocus in window
|
||||
if (tinyMCEPopup.isWindow)
|
||||
window.focus();
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function previewChar(codeA, codeB, codeN) {
|
||||
var elmA = document.getElementById('codeA');
|
||||
var elmB = document.getElementById('codeB');
|
||||
var elmV = document.getElementById('codeV');
|
||||
var elmN = document.getElementById('codeN');
|
||||
|
||||
if (codeA=='#160;') {
|
||||
elmV.innerHTML = '__';
|
||||
} else {
|
||||
elmV.innerHTML = '&' + codeA;
|
||||
}
|
||||
|
||||
elmB.innerHTML = '&' + codeA;
|
||||
elmA.innerHTML = '&' + codeB;
|
||||
elmN.innerHTML = codeN;
|
||||
}
|
245
wp-includes/js/tinymce/themes/advanced/js/color_picker.js
Normal file
@ -0,0 +1,245 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
|
||||
|
||||
var colors = new Array(
|
||||
"#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
|
||||
"#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
|
||||
"#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
|
||||
"#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
|
||||
"#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
|
||||
"#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
|
||||
"#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
|
||||
"#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
|
||||
"#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
|
||||
"#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
|
||||
"#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
|
||||
"#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
|
||||
"#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
|
||||
"#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
|
||||
"#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
|
||||
"#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
|
||||
"#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
|
||||
"#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
|
||||
"#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
|
||||
"#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
|
||||
"#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
|
||||
"#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
|
||||
"#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
|
||||
"#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
|
||||
"#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
|
||||
"#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
|
||||
"#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
|
||||
);
|
||||
|
||||
var named = {
|
||||
'#F0F8FF':'AliceBlue','#FAEBD7':'AntiqueWhite','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
|
||||
'#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'BlanchedAlmond','#0000FF':'Blue','#8A2BE2':'BlueViolet','#A52A2A':'Brown',
|
||||
'#DEB887':'BurlyWood','#5F9EA0':'CadetBlue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'CornflowerBlue',
|
||||
'#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'DarkBlue','#008B8B':'DarkCyan','#B8860B':'DarkGoldenRod',
|
||||
'#A9A9A9':'DarkGray','#A9A9A9':'DarkGrey','#006400':'DarkGreen','#BDB76B':'DarkKhaki','#8B008B':'DarkMagenta','#556B2F':'DarkOliveGreen',
|
||||
'#FF8C00':'Darkorange','#9932CC':'DarkOrchid','#8B0000':'DarkRed','#E9967A':'DarkSalmon','#8FBC8F':'DarkSeaGreen','#483D8B':'DarkSlateBlue',
|
||||
'#2F4F4F':'DarkSlateGray','#2F4F4F':'DarkSlateGrey','#00CED1':'DarkTurquoise','#9400D3':'DarkViolet','#FF1493':'DeepPink','#00BFFF':'DeepSkyBlue',
|
||||
'#696969':'DimGray','#696969':'DimGrey','#1E90FF':'DodgerBlue','#B22222':'FireBrick','#FFFAF0':'FloralWhite','#228B22':'ForestGreen',
|
||||
'#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'GhostWhite','#FFD700':'Gold','#DAA520':'GoldenRod','#808080':'Gray','#808080':'Grey',
|
||||
'#008000':'Green','#ADFF2F':'GreenYellow','#F0FFF0':'HoneyDew','#FF69B4':'HotPink','#CD5C5C':'IndianRed','#4B0082':'Indigo','#FFFFF0':'Ivory',
|
||||
'#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'LavenderBlush','#7CFC00':'LawnGreen','#FFFACD':'LemonChiffon','#ADD8E6':'LightBlue',
|
||||
'#F08080':'LightCoral','#E0FFFF':'LightCyan','#FAFAD2':'LightGoldenRodYellow','#D3D3D3':'LightGray','#D3D3D3':'LightGrey','#90EE90':'LightGreen',
|
||||
'#FFB6C1':'LightPink','#FFA07A':'LightSalmon','#20B2AA':'LightSeaGreen','#87CEFA':'LightSkyBlue','#778899':'LightSlateGray','#778899':'LightSlateGrey',
|
||||
'#B0C4DE':'LightSteelBlue','#FFFFE0':'LightYellow','#00FF00':'Lime','#32CD32':'LimeGreen','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
|
||||
'#66CDAA':'MediumAquaMarine','#0000CD':'MediumBlue','#BA55D3':'MediumOrchid','#9370D8':'MediumPurple','#3CB371':'MediumSeaGreen','#7B68EE':'MediumSlateBlue',
|
||||
'#00FA9A':'MediumSpringGreen','#48D1CC':'MediumTurquoise','#C71585':'MediumVioletRed','#191970':'MidnightBlue','#F5FFFA':'MintCream','#FFE4E1':'MistyRose','#FFE4B5':'Moccasin',
|
||||
'#FFDEAD':'NavajoWhite','#000080':'Navy','#FDF5E6':'OldLace','#808000':'Olive','#6B8E23':'OliveDrab','#FFA500':'Orange','#FF4500':'OrangeRed','#DA70D6':'Orchid',
|
||||
'#EEE8AA':'PaleGoldenRod','#98FB98':'PaleGreen','#AFEEEE':'PaleTurquoise','#D87093':'PaleVioletRed','#FFEFD5':'PapayaWhip','#FFDAB9':'PeachPuff',
|
||||
'#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'PowderBlue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'RosyBrown','#4169E1':'RoyalBlue',
|
||||
'#8B4513':'SaddleBrown','#FA8072':'Salmon','#F4A460':'SandyBrown','#2E8B57':'SeaGreen','#FFF5EE':'SeaShell','#A0522D':'Sienna','#C0C0C0':'Silver',
|
||||
'#87CEEB':'SkyBlue','#6A5ACD':'SlateBlue','#708090':'SlateGray','#708090':'SlateGrey','#FFFAFA':'Snow','#00FF7F':'SpringGreen',
|
||||
'#4682B4':'SteelBlue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
|
||||
'#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'WhiteSmoke','#FFFF00':'Yellow','#9ACD32':'YellowGreen'
|
||||
};
|
||||
|
||||
function init() {
|
||||
var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color'));
|
||||
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
generatePicker();
|
||||
|
||||
if (inputColor) {
|
||||
changeFinalColor(inputColor);
|
||||
|
||||
col = convertHexToRGB(inputColor);
|
||||
|
||||
if (col)
|
||||
updateLight(col.r, col.g, col.b);
|
||||
}
|
||||
}
|
||||
|
||||
function insertAction() {
|
||||
var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
if (f)
|
||||
f(color);
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function showColor(color, name) {
|
||||
if (name)
|
||||
document.getElementById("colorname").innerHTML = name;
|
||||
|
||||
document.getElementById("preview").style.backgroundColor = color;
|
||||
document.getElementById("color").value = color.toLowerCase();
|
||||
}
|
||||
|
||||
function convertRGBToHex(col) {
|
||||
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
|
||||
|
||||
if (!col)
|
||||
return col;
|
||||
|
||||
var rgb = col.replace(re, "$1,$2,$3").split(',');
|
||||
if (rgb.length == 3) {
|
||||
r = parseInt(rgb[0]).toString(16);
|
||||
g = parseInt(rgb[1]).toString(16);
|
||||
b = parseInt(rgb[2]).toString(16);
|
||||
|
||||
r = r.length == 1 ? '0' + r : r;
|
||||
g = g.length == 1 ? '0' + g : g;
|
||||
b = b.length == 1 ? '0' + b : b;
|
||||
|
||||
return "#" + r + g + b;
|
||||
}
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
function convertHexToRGB(col) {
|
||||
if (col.indexOf('#') != -1) {
|
||||
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
|
||||
|
||||
r = parseInt(col.substring(0, 2), 16);
|
||||
g = parseInt(col.substring(2, 4), 16);
|
||||
b = parseInt(col.substring(4, 6), 16);
|
||||
|
||||
return {r : r, g : g, b : b};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function generatePicker() {
|
||||
var el = document.getElementById('light'), h = '', i;
|
||||
|
||||
for (i = 0; i < detail; i++){
|
||||
h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
|
||||
+ ' onclick="changeFinalColor(this.style.backgroundColor)"'
|
||||
+ ' onmousedown="isMouseDown = true; return false;"'
|
||||
+ ' onmouseup="isMouseDown = false;"'
|
||||
+ ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
|
||||
+ ' onmouseover="isMouseOver = true;"'
|
||||
+ ' onmouseout="isMouseOver = false;"'
|
||||
+ '></div>';
|
||||
}
|
||||
|
||||
el.innerHTML = h;
|
||||
}
|
||||
|
||||
function generateWebColors() {
|
||||
var el = document.getElementById('webcolors'), h = '', i;
|
||||
|
||||
if (el.className == 'generated')
|
||||
return;
|
||||
|
||||
h += '<table border="0" cellspacing="1" cellpadding="0">'
|
||||
+ '<tr>';
|
||||
|
||||
for (i=0; i<colors.length; i++) {
|
||||
h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
|
||||
+ '<a href="javascript:insertAction();" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">'
|
||||
+ '</a></td>';
|
||||
if ((i+1) % 18 == 0)
|
||||
h += '</tr><tr>';
|
||||
}
|
||||
|
||||
h += '</table>';
|
||||
|
||||
el.innerHTML = h;
|
||||
el.className = 'generated';
|
||||
}
|
||||
|
||||
function generateNamedColors() {
|
||||
var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
|
||||
|
||||
if (el.className == 'generated')
|
||||
return;
|
||||
|
||||
for (n in named) {
|
||||
v = named[n];
|
||||
h += '<a href="javascript:insertAction();" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '"><!-- IE --></a>'
|
||||
}
|
||||
|
||||
el.innerHTML = h;
|
||||
el.className = 'generated';
|
||||
}
|
||||
|
||||
function dechex(n) {
|
||||
return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
|
||||
}
|
||||
|
||||
function computeColor(e) {
|
||||
var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB;
|
||||
|
||||
x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0);
|
||||
y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0);
|
||||
|
||||
partWidth = document.getElementById('colors').width / 6;
|
||||
partDetail = detail / 2;
|
||||
imHeight = document.getElementById('colors').height;
|
||||
|
||||
r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
|
||||
g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
|
||||
b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
|
||||
|
||||
coef = (imHeight - y) / imHeight;
|
||||
r = 128 + (r - 128) * coef;
|
||||
g = 128 + (g - 128) * coef;
|
||||
b = 128 + (b - 128) * coef;
|
||||
|
||||
changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
|
||||
updateLight(r, g, b);
|
||||
}
|
||||
|
||||
function updateLight(r, g, b) {
|
||||
var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
|
||||
|
||||
for (i=0; i<detail; i++) {
|
||||
if ((i>=0) && (i<partDetail)) {
|
||||
finalCoef = i / partDetail;
|
||||
finalR = dechex(255 - (255 - r) * finalCoef);
|
||||
finalG = dechex(255 - (255 - g) * finalCoef);
|
||||
finalB = dechex(255 - (255 - b) * finalCoef);
|
||||
} else {
|
||||
finalCoef = 2 - i / partDetail;
|
||||
finalR = dechex(r * finalCoef);
|
||||
finalG = dechex(g * finalCoef);
|
||||
finalB = dechex(b * finalCoef);
|
||||
}
|
||||
|
||||
color = finalR + finalG + finalB;
|
||||
|
||||
document.getElementById('gs' + i).style.backgroundColor = '#'+color;
|
||||
}
|
||||
}
|
||||
|
||||
function changeFinalColor(color) {
|
||||
if (color.indexOf('#') == -1)
|
||||
color = convertRGBToHex(color);
|
||||
|
||||
document.getElementById('preview').style.backgroundColor = color;
|
||||
document.getElementById('color').value = color;
|
||||
}
|
||||
|
||||
tinyMCEPopup.onInit.add(init);
|
239
wp-includes/js/tinymce/themes/advanced/js/image.js
Normal file
@ -0,0 +1,239 @@
|
||||
var ImageDialog = {
|
||||
preInit : function() {
|
||||
var url;
|
||||
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
if (url = tinyMCEPopup.getParam("external_image_list_url"))
|
||||
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
||||
},
|
||||
|
||||
init : function() {
|
||||
var f = document.forms[0], ed = tinyMCEPopup.editor;
|
||||
|
||||
// Setup browse button
|
||||
document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
|
||||
if (isVisible('srcbrowser'))
|
||||
document.getElementById('src').style.width = '180px';
|
||||
|
||||
e = ed.selection.getNode();
|
||||
|
||||
this.fillFileList('image_list', 'tinyMCEImageList');
|
||||
|
||||
if (e.nodeName == 'IMG') {
|
||||
f.src.value = ed.dom.getAttrib(e, 'src');
|
||||
f.alt.value = ed.dom.getAttrib(e, 'alt');
|
||||
f.border.value = this.getAttrib(e, 'border');
|
||||
f.vspace.value = this.getAttrib(e, 'vspace');
|
||||
f.hspace.value = this.getAttrib(e, 'hspace');
|
||||
f.width.value = ed.dom.getAttrib(e, 'width');
|
||||
f.height.value = ed.dom.getAttrib(e, 'height');
|
||||
f.insert.value = ed.getLang('update');
|
||||
this.styleVal = ed.dom.getAttrib(e, 'style');
|
||||
selectByValue(f, 'image_list', f.src.value);
|
||||
selectByValue(f, 'align', this.getAttrib(e, 'align'));
|
||||
this.updateStyle();
|
||||
}
|
||||
},
|
||||
|
||||
fillFileList : function(id, l) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
||||
|
||||
l = window[l];
|
||||
|
||||
if (l && l.length > 0) {
|
||||
lst.options[lst.options.length] = new Option('', '');
|
||||
|
||||
tinymce.each(l, function(o) {
|
||||
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
||||
});
|
||||
} else
|
||||
dom.remove(dom.getParent(id, 'tr'));
|
||||
},
|
||||
|
||||
update : function() {
|
||||
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');
|
||||
tinyMCEPopup.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ed.settings.inline_styles) {
|
||||
args = tinymce.extend(args, {
|
||||
vspace : nl.vspace.value,
|
||||
hspace : nl.hspace.value,
|
||||
border : nl.border.value,
|
||||
align : getSelectValue(f, 'align')
|
||||
});
|
||||
} else
|
||||
args.style = this.styleVal;
|
||||
|
||||
tinymce.extend(args, {
|
||||
src : f.src.value,
|
||||
alt : f.alt.value,
|
||||
width : f.width.value,
|
||||
height : f.height.value
|
||||
});
|
||||
|
||||
el = ed.selection.getNode();
|
||||
|
||||
if (el && el.nodeName == 'IMG') {
|
||||
ed.dom.setAttribs(el, args);
|
||||
} else {
|
||||
ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" src="javascript:;" />');
|
||||
ed.dom.setAttribs('__mce_tmp', args);
|
||||
ed.dom.setAttrib('__mce_tmp', 'id', '');
|
||||
}
|
||||
|
||||
tinyMCEPopup.close();
|
||||
},
|
||||
|
||||
updateStyle : function() {
|
||||
var dom = tinyMCEPopup.dom, st, v, f = document.forms[0];
|
||||
|
||||
if (tinyMCEPopup.editor.settings.inline_styles) {
|
||||
st = tinyMCEPopup.dom.parseStyle(this.styleVal);
|
||||
|
||||
// Handle align
|
||||
v = getSelectValue(f, 'align');
|
||||
if (v) {
|
||||
if (v == 'left' || v == 'right') {
|
||||
st['float'] = v;
|
||||
delete st['vertical-align'];
|
||||
} else {
|
||||
st['vertical-align'] = v;
|
||||
delete st['float'];
|
||||
}
|
||||
} else {
|
||||
delete st['float'];
|
||||
delete st['vertical-align'];
|
||||
}
|
||||
|
||||
// Handle border
|
||||
v = f.border.value;
|
||||
if (v || v == '0') {
|
||||
if (v == '0')
|
||||
st['border'] = '0';
|
||||
else
|
||||
st['border'] = v + 'px solid black';
|
||||
} else
|
||||
delete st['border'];
|
||||
|
||||
// Handle hspace
|
||||
v = f.hspace.value;
|
||||
if (v) {
|
||||
delete st['margin'];
|
||||
st['margin-left'] = v + 'px';
|
||||
st['margin-right'] = v + 'px';
|
||||
} else {
|
||||
delete st['margin-left'];
|
||||
delete st['margin-right'];
|
||||
}
|
||||
|
||||
// Handle vspace
|
||||
v = f.vspace.value;
|
||||
if (v) {
|
||||
delete st['margin'];
|
||||
st['margin-top'] = v + 'px';
|
||||
st['margin-bottom'] = v + 'px';
|
||||
} else {
|
||||
delete st['margin-top'];
|
||||
delete st['margin-bottom'];
|
||||
}
|
||||
|
||||
// Merge
|
||||
st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st));
|
||||
this.styleVal = dom.serializeStyle(st);
|
||||
}
|
||||
},
|
||||
|
||||
getAttrib : function(e, at) {
|
||||
var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
|
||||
|
||||
if (ed.settings.inline_styles) {
|
||||
switch (at) {
|
||||
case 'align':
|
||||
if (v = dom.getStyle(e, 'float'))
|
||||
return v;
|
||||
|
||||
if (v = dom.getStyle(e, 'vertical-align'))
|
||||
return v;
|
||||
|
||||
break;
|
||||
|
||||
case 'hspace':
|
||||
v = dom.getStyle(e, 'margin-left')
|
||||
v2 = dom.getStyle(e, 'margin-right');
|
||||
if (v && v == v2)
|
||||
return parseInt(v.replace(/[^0-9]/g, ''));
|
||||
|
||||
break;
|
||||
|
||||
case 'vspace':
|
||||
v = dom.getStyle(e, 'margin-top')
|
||||
v2 = dom.getStyle(e, 'margin-bottom');
|
||||
if (v && v == v2)
|
||||
return parseInt(v.replace(/[^0-9]/g, ''));
|
||||
|
||||
break;
|
||||
|
||||
case 'border':
|
||||
v = 0;
|
||||
|
||||
tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
|
||||
sv = dom.getStyle(e, 'border-' + sv + '-width');
|
||||
|
||||
// False or not the same as prev
|
||||
if (!sv || (sv != v && v !== 0)) {
|
||||
v = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sv)
|
||||
v = sv;
|
||||
});
|
||||
|
||||
if (v)
|
||||
return parseInt(v.replace(/[^0-9]/g, ''));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (v = dom.getAttrib(e, at))
|
||||
return v;
|
||||
|
||||
return '';
|
||||
},
|
||||
|
||||
resetImageData : function() {
|
||||
var f = document.forms[0];
|
||||
|
||||
f.width.value = f.height.value = "";
|
||||
},
|
||||
|
||||
updateImageData : function() {
|
||||
var f = document.forms[0], t = ImageDialog;
|
||||
|
||||
if (f.width.value == "")
|
||||
f.width.value = t.preloadImg.width;
|
||||
|
||||
if (f.height.value == "")
|
||||
f.height.value = t.preloadImg.height;
|
||||
},
|
||||
|
||||
getImageData : function() {
|
||||
var f = document.forms[0];
|
||||
|
||||
this.preloadImg = new Image();
|
||||
this.preloadImg.onload = this.updateImageData;
|
||||
this.preloadImg.onerror = this.resetImageData;
|
||||
this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value);
|
||||
}
|
||||
};
|
||||
|
||||
ImageDialog.preInit();
|
||||
tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
|
124
wp-includes/js/tinymce/themes/advanced/js/link.js
Normal file
@ -0,0 +1,124 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var LinkDialog = {
|
||||
preInit : function() {
|
||||
var url;
|
||||
|
||||
if (url = tinyMCEPopup.getParam("external_link_list_url"))
|
||||
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
||||
},
|
||||
|
||||
init : function() {
|
||||
var f = document.forms[0], ed = tinyMCEPopup.editor;
|
||||
|
||||
// Setup browse button
|
||||
document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link');
|
||||
if (isVisible('hrefbrowser'))
|
||||
document.getElementById('href').style.width = '180px';
|
||||
|
||||
this.fillClassList('class_list');
|
||||
this.fillFileList('link_list', 'tinyMCELinkList');
|
||||
this.fillTargetList('target_list');
|
||||
|
||||
if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) {
|
||||
f.href.value = ed.dom.getAttrib(e, 'href');
|
||||
f.linktitle.value = ed.dom.getAttrib(e, 'title');
|
||||
f.insert.value = ed.getLang('update');
|
||||
selectByValue(f, 'link_list', f.href.value);
|
||||
selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target'));
|
||||
selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class'));
|
||||
}
|
||||
},
|
||||
|
||||
update : function() {
|
||||
var f = document.forms[0], ed = tinyMCEPopup.editor, e, b;
|
||||
|
||||
// Remove element if there is no href
|
||||
if (!f.href.value) {
|
||||
e = ed.dom.getParent(ed.selection.getNode(), 'A');
|
||||
if (e) {
|
||||
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
||||
b = ed.selection.getBookmark();
|
||||
ed.dom.remove(e, 1);
|
||||
ed.selection.moveToBookmark(b);
|
||||
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
||||
tinyMCEPopup.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ed.execCommand('mceInsertLink', false, {
|
||||
href : f.href.value,
|
||||
title : f.linktitle.value,
|
||||
target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null,
|
||||
'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null
|
||||
});
|
||||
|
||||
tinyMCEPopup.close();
|
||||
},
|
||||
|
||||
checkPrefix : function(n) {
|
||||
if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
|
||||
n.value = 'mailto:' + n.value;
|
||||
|
||||
if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
|
||||
n.value = 'http://' + n.value;
|
||||
},
|
||||
|
||||
fillFileList : function(id, l) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
||||
|
||||
l = window[l];
|
||||
|
||||
if (l && l.length > 0) {
|
||||
lst.options[lst.options.length] = new Option('', '');
|
||||
|
||||
tinymce.each(l, function(o) {
|
||||
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
||||
});
|
||||
} else
|
||||
dom.remove(dom.getParent(id, 'tr'));
|
||||
},
|
||||
|
||||
fillClassList : function(id) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
||||
|
||||
if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
|
||||
cl = [];
|
||||
|
||||
tinymce.each(v.split(';'), function(v) {
|
||||
var p = v.split('=');
|
||||
|
||||
cl.push({'title' : p[0], 'class' : p[1]});
|
||||
});
|
||||
} else
|
||||
cl = tinyMCEPopup.editor.dom.getClasses();
|
||||
|
||||
if (cl.length > 0) {
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
||||
|
||||
tinymce.each(cl, function(o) {
|
||||
lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
|
||||
});
|
||||
} else
|
||||
dom.remove(dom.getParent(id, 'tr'));
|
||||
},
|
||||
|
||||
fillTargetList : function(id) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v;
|
||||
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self');
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank');
|
||||
|
||||
if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) {
|
||||
tinymce.each(v.split(','), function(v) {
|
||||
v = v.split('=');
|
||||
html += '<option value="' + v[1] + '">' + v[0] + '</option>';
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
LinkDialog.preInit();
|
||||
tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog);
|
62
wp-includes/js/tinymce/themes/advanced/js/source_editor.js
Normal file
@ -0,0 +1,62 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
tinyMCEPopup.onInit.add(onLoadInit);
|
||||
|
||||
function saveContent() {
|
||||
tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value);
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function onLoadInit() {
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
// Remove Gecko spellchecking
|
||||
if (tinymce.isGecko)
|
||||
document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
|
||||
|
||||
document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent();
|
||||
|
||||
if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
|
||||
setWrap('soft');
|
||||
document.getElementById('wraped').checked = true;
|
||||
}
|
||||
|
||||
resizeInputs();
|
||||
}
|
||||
|
||||
function setWrap(val) {
|
||||
var v, n, s = document.getElementById('htmlSource');
|
||||
|
||||
s.wrap = val;
|
||||
|
||||
if (!tinymce.isIE) {
|
||||
v = s.value;
|
||||
n = s.cloneNode(false);
|
||||
n.setAttribute("wrap", val);
|
||||
s.parentNode.replaceChild(n, s);
|
||||
n.value = v;
|
||||
}
|
||||
}
|
||||
|
||||
function toggleWordWrap(elm) {
|
||||
if (elm.checked)
|
||||
setWrap('soft');
|
||||
else
|
||||
setWrap('off');
|
||||
}
|
||||
|
||||
var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
|
||||
|
||||
function resizeInputs() {
|
||||
var el = document.getElementById('htmlSource');
|
||||
|
||||
if (!tinymce.isIE) {
|
||||
wHeight = self.innerHeight - 65;
|
||||
wWidth = self.innerWidth - 16;
|
||||
} else {
|
||||
wHeight = document.body.clientHeight - 70;
|
||||
wWidth = document.body.clientWidth - 16;
|
||||
}
|
||||
|
||||
el.style.height = Math.abs(wHeight) + 'px';
|
||||
el.style.width = Math.abs(wWidth) + 'px';
|
||||
}
|
@ -1,93 +1,62 @@
|
||||
// UK lang variables
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
theme_style_select : '-- Styles --',
|
||||
theme_code_desc : 'Edit HTML Source',
|
||||
theme_code_title : 'HTML Source Editor',
|
||||
theme_code_wordwrap : 'Word wrap',
|
||||
theme_sub_desc : 'Subscript',
|
||||
theme_sup_desc : 'Superscript',
|
||||
theme_hr_desc : 'Insert horizontal ruler',
|
||||
theme_removeformat_desc : 'Remove formatting',
|
||||
theme_custom1_desc : 'Your custom description here',
|
||||
insert_image_border : 'Border',
|
||||
insert_image_dimensions : 'Dimensions',
|
||||
insert_image_vspace : 'Vertical space',
|
||||
insert_image_hspace : 'Horizontal space',
|
||||
insert_image_align : 'Alignment',
|
||||
insert_image_align_default : '-- Not set --',
|
||||
insert_image_align_baseline : 'Baseline',
|
||||
insert_image_align_top : 'Top',
|
||||
insert_image_align_middle : 'Middle',
|
||||
insert_image_align_bottom : 'Bottom',
|
||||
insert_image_align_texttop : 'TextTop',
|
||||
insert_image_align_absmiddle : 'Absolute Middle',
|
||||
insert_image_align_absbottom : 'Absolute Bottom',
|
||||
insert_image_align_left : 'Left',
|
||||
insert_image_align_right : 'Right',
|
||||
theme_font_size : '-- Font size --',
|
||||
theme_fontdefault : '-- Font family --',
|
||||
theme_block : '-- Format --',
|
||||
theme_paragraph : 'Paragraph',
|
||||
theme_div : 'Div',
|
||||
theme_address : 'Address',
|
||||
theme_pre : 'Preformatted',
|
||||
theme_h1 : 'Heading 1',
|
||||
theme_h2 : 'Heading 2',
|
||||
theme_h3 : 'Heading 3',
|
||||
theme_h4 : 'Heading 4',
|
||||
theme_h5 : 'Heading 5',
|
||||
theme_h6 : 'Heading 6',
|
||||
theme_blockquote : 'Blockquote',
|
||||
theme_code : 'Code',
|
||||
theme_samp : 'Code sample',
|
||||
theme_dt : 'Definition term ',
|
||||
theme_dd : 'Definition description',
|
||||
theme_colorpicker_title : 'Select a color',
|
||||
theme_colorpicker_apply : 'Apply',
|
||||
theme_forecolor_desc : 'Select text color',
|
||||
theme_backcolor_desc : 'Select background color',
|
||||
theme_charmap_title : 'Select custom character',
|
||||
theme_charmap_desc : 'Insert custom character',
|
||||
theme_visualaid_desc : 'Toggle guidelines/invisible elements',
|
||||
insert_anchor_title : 'Insert/edit anchor',
|
||||
insert_anchor_name : 'Anchor name',
|
||||
theme_anchor_desc : 'Insert/edit anchor',
|
||||
theme_insert_link_titlefield : 'Title',
|
||||
theme_clipboard_msg : 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?',
|
||||
theme_path : 'Path',
|
||||
cut_desc : 'Cut',
|
||||
copy_desc : 'Copy',
|
||||
paste_desc : 'Paste',
|
||||
link_list : 'Link list',
|
||||
image_list : 'Image list',
|
||||
browse : 'Browse',
|
||||
image_props_desc : 'Image properties',
|
||||
newdocument_desc : 'New document',
|
||||
class_name : 'Class',
|
||||
newdocument : 'Are you sure you want clear all contents?',
|
||||
about_title : 'About TinyMCE',
|
||||
about : 'About',
|
||||
license : 'License',
|
||||
plugins : 'Plugins',
|
||||
plugin : 'Plugin',
|
||||
author : 'Author',
|
||||
version : 'Version',
|
||||
loaded_plugins : 'Loaded plugins',
|
||||
help : 'Help',
|
||||
not_set : '-- Not set --',
|
||||
close : 'Close',
|
||||
toolbar_focus : 'Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X',
|
||||
invalid_data : 'Error: Invalid values entered, these are marked in red.',
|
||||
more_colors : 'More colors',
|
||||
color_picker_tab : 'Picker',
|
||||
color_picker : 'Color picker',
|
||||
web_colors_tab : 'Palette',
|
||||
web_colors : 'Palette colors',
|
||||
named_colors_tab : 'Named',
|
||||
named_colors : 'Named colors',
|
||||
color : 'Color:',
|
||||
color_name : 'Name:',
|
||||
is_email : 'The URL you entered seems to be an email address, do you want to add the required mailto: prefix?',
|
||||
is_external : 'The URL you entered seems to external link, do you want to add the required http:// prefix?'
|
||||
});
|
||||
tinyMCE.addI18n('en.advanced',{
|
||||
style_select:"Styles",
|
||||
font_size:"Font size",
|
||||
fontdefault:"Font family",
|
||||
block:"Format",
|
||||
paragraph:"Paragraph",
|
||||
div:"Div",
|
||||
address:"Address",
|
||||
pre:"Preformatted",
|
||||
h1:"Heading 1",
|
||||
h2:"Heading 2",
|
||||
h3:"Heading 3",
|
||||
h4:"Heading 4",
|
||||
h5:"Heading 5",
|
||||
h6:"Heading 6",
|
||||
blockquote:"Blockquote",
|
||||
code:"Code",
|
||||
samp:"Code sample",
|
||||
dt:"Definition term ",
|
||||
dd:"Definition description",
|
||||
bold_desc:"Bold (Ctrl+B)",
|
||||
italic_desc:"Italic (Ctrl+I)",
|
||||
underline_desc:"Underline (Ctrl+U)",
|
||||
striketrough_desc:"Strikethrough",
|
||||
justifyleft_desc:"Align left",
|
||||
justifycenter_desc:"Align center",
|
||||
justifyright_desc:"Align right",
|
||||
justifyfull_desc:"Align full",
|
||||
bullist_desc:"Unordered list",
|
||||
numlist_desc:"Ordered list",
|
||||
outdent_desc:"Outdent",
|
||||
indent_desc:"Indent",
|
||||
undo_desc:"Undo (Ctrl+Z)",
|
||||
redo_desc:"Redo (Ctrl+Y)",
|
||||
link_desc:"Insert/edit link",
|
||||
unlink_desc:"Unlink",
|
||||
image_desc:"Insert/edit image",
|
||||
cleanup_desc:"Cleanup messy code",
|
||||
code_desc:"Edit HTML Source",
|
||||
sub_desc:"Subscript",
|
||||
sup_desc:"Superscript",
|
||||
hr_desc:"Insert horizontal ruler",
|
||||
removeformat_desc:"Remove formatting",
|
||||
custom1_desc:"Your custom description here",
|
||||
forecolor_desc:"Select text color",
|
||||
backcolor_desc:"Select background color",
|
||||
charmap_desc:"Insert custom character",
|
||||
visualaid_desc:"Toggle guidelines/invisible elements",
|
||||
anchor_desc:"Insert/edit anchor",
|
||||
cut_desc:"Cut",
|
||||
copy_desc:"Copy",
|
||||
paste_desc:"Paste",
|
||||
image_props_desc:"Image properties",
|
||||
newdocument_desc:"New document",
|
||||
help_desc:"Help",
|
||||
blockquote_desc:"Blockquote",
|
||||
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?",
|
||||
path:"Path",
|
||||
newdocument:"Are you sure you want clear all contents?",
|
||||
toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",
|
||||
more_colors:"More colors"
|
||||
});
|
51
wp-includes/js/tinymce/themes/advanced/langs/en_dlg.js
Normal file
@ -0,0 +1,51 @@
|
||||
tinyMCE.addI18n('en.advanced_dlg',{
|
||||
about_title:"About TinyMCE",
|
||||
about_general:"About",
|
||||
about_help:"Help",
|
||||
about_license:"License",
|
||||
about_plugins:"Plugins",
|
||||
about_plugin:"Plugin",
|
||||
about_author:"Author",
|
||||
about_version:"Version",
|
||||
about_loaded:"Loaded plugins",
|
||||
anchor_title:"Insert/edit anchor",
|
||||
anchor_name:"Anchor name",
|
||||
code_title:"HTML Source Editor",
|
||||
code_wordwrap:"Word wrap",
|
||||
colorpicker_title:"Select a color",
|
||||
colorpicker_picker_tab:"Picker",
|
||||
colorpicker_picker_title:"Color picker",
|
||||
colorpicker_palette_tab:"Palette",
|
||||
colorpicker_palette_title:"Palette colors",
|
||||
colorpicker_named_tab:"Named",
|
||||
colorpicker_named_title:"Named colors",
|
||||
colorpicker_color:"Color:",
|
||||
colorpicker_name:"Name:",
|
||||
charmap_title:"Select custom character",
|
||||
image_title:"Insert/edit image",
|
||||
image_src:"Image URL",
|
||||
image_alt:"Image description",
|
||||
image_list:"Image list",
|
||||
image_border:"Border",
|
||||
image_dimensions:"Dimensions",
|
||||
image_vspace:"Vertical space",
|
||||
image_hspace:"Horizontal space",
|
||||
image_align:"Alignment",
|
||||
image_align_baseline:"Baseline",
|
||||
image_align_top:"Top",
|
||||
image_align_middle:"Middle",
|
||||
image_align_bottom:"Bottom",
|
||||
image_align_texttop:"Text top",
|
||||
image_align_textbottom:"Text bottom",
|
||||
image_align_left:"Left",
|
||||
image_align_right:"Right",
|
||||
link_title:"Insert/edit link",
|
||||
link_url:"Link URL",
|
||||
link_target:"Target",
|
||||
link_target_same:"Open link in the same window",
|
||||
link_target_blank:"Open link in a new window",
|
||||
link_titlefield:"Title",
|
||||
link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
|
||||
link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?",
|
||||
link_list:"Link list"
|
||||
});
|
@ -1,19 +1,19 @@
|
||||
<!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>{$lang_insert_link_title}</title>
|
||||
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="../../utils/validate.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="jscripts/link.js"></script>
|
||||
<title>{#advanced_dlg.link_title}</title>
|
||||
<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>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<!-- WordPress: onload after the init();'); -->
|
||||
<body id="link" onload="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';document.getElementById('href').focus();" style="display: none">
|
||||
<form onsubmit="insertLink();return false;" action="#">
|
||||
<body id="link" style="display: none">
|
||||
<form onsubmit="LinkDialog.update();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_insert_link_title}</a></span></li>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.link_title}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -22,80 +22,41 @@
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap"><label for="href">{$lang_insert_link_url}</label></td>
|
||||
<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="checkPrefix(this);" /></td>
|
||||
<td><input id="href" name="href" type="text" value="" style="width: 200px" onchange="LinkDialog.checkPrefix(this);" /></td>
|
||||
<td id="hrefbrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<!-- Link list -->
|
||||
<script language="javascript">
|
||||
if (typeof(tinyMCELinkList) != "undefined" && tinyMCELinkList.length > 0) {
|
||||
var html = "";
|
||||
|
||||
html += '<tr><td><label for="link_list">{$lang_link_list}</label></td>';
|
||||
html += '<td><select id="link_list" name="link_list" style="width: 200px" onchange="this.form.href.value=this.options[this.selectedIndex].value;">';
|
||||
html += '<option value="">---</option>';
|
||||
|
||||
for (var i=0; i<tinyMCELinkList.length; i++)
|
||||
html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
|
||||
|
||||
html += '</select></td></tr>';
|
||||
|
||||
document.write(html);
|
||||
}
|
||||
</script>
|
||||
<!-- /Link list -->
|
||||
<tr>
|
||||
<td><label for="link_list">{#advanced_dlg.link_list}</label></td>
|
||||
<td><select id="link_list" name="link_list" onchange="document.getElementById('href').value=this.options[this.selectedIndex].value;"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label id="targetlistlabel" for="targetlist">{#advanced_dlg.link_target}</label></td>
|
||||
<td><select id="target_list" name="target_list"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap="nowrap"><label for="target">{$lang_insert_link_target}</label></td>
|
||||
<td><select id="target" name="target" style="width: 200px">
|
||||
<option value="_self">{$lang_insert_link_target_same}</option>
|
||||
<option value="_blank">{$lang_insert_link_target_blank}</option>
|
||||
<script language="javascript">
|
||||
var html = "";
|
||||
var targets = tinyMCE.getParam('theme_advanced_link_targets', '').split(';');
|
||||
|
||||
for (var i=0; i<targets.length; i++) {
|
||||
var key, value;
|
||||
|
||||
if (targets[i] == "")
|
||||
continue;
|
||||
|
||||
key = targets[i].split('=')[0];
|
||||
value = targets[i].split('=')[1];
|
||||
|
||||
html += '<option value="' + value + '">' + key + '</option>';
|
||||
}
|
||||
|
||||
document.write(html);
|
||||
</script>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap="nowrap"><label for="linktitle">{$lang_theme_insert_link_titlefield}</label></td>
|
||||
<td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px"></td>
|
||||
</tr>
|
||||
<tr id="styleSelectRow">
|
||||
<td><label for="styleSelect">{$lang_class_name}</label></td>
|
||||
<td>
|
||||
<select id="styleSelect" name="styleSelect">
|
||||
<option value="" selected>{$lang_theme_style_select}</option>
|
||||
</select></td>
|
||||
<td nowrap="nowrap"><label for="linktitle">{#advanced_dlg.link_titlefield}</label></td>
|
||||
<td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="class_list">{#class_name}</label></td>
|
||||
<td><select id="class_list" name="class_list"></select></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<!-- WordPress: Buttons are reversed! -->
|
||||
<div style="float: left">
|
||||
<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
|
||||
<input type="button" id="insert" name="insert" value="{#insert}" onclick="LinkDialog.update();" />
|
||||
</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="submit" id="insert" name="insert" value="{$lang_insert}" onclick="insertLink();" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -0,0 +1,18 @@
|
||||
body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
body {background:#FFF;}
|
||||
.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;}
|
||||
img {border:0;}
|
||||
|
||||
/* IE */
|
||||
* html body {
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
}
|
111
wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css
Normal file
@ -0,0 +1,111 @@
|
||||
/* Generic */
|
||||
body {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDDDDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
background:#F0F0EE;
|
||||
padding:0;
|
||||
margin:8px 8px 0 8px;
|
||||
}
|
||||
|
||||
html {background:#F0F0EE;}
|
||||
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
textarea {resize:none;outline:none;}
|
||||
a:link, a:visited {color:black;}
|
||||
a:hover {color:#2B6FB6;}
|
||||
|
||||
/* Forms */
|
||||
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
||||
legend {color:#2B6FB6; font-weight:bold;}
|
||||
label.msg {display:none;}
|
||||
label.invalid {color:#EE0000; display:inline;}
|
||||
input.invalid {border:1px solid #EE0000;}
|
||||
input {background:#FFF; border:1px solid #CCC;}
|
||||
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
input, select, textarea {border:1px solid #808080;}
|
||||
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
.input_noborder {border:0;}
|
||||
|
||||
/* Buttons */
|
||||
#insert, #cancel, input.button, .updateButton {
|
||||
border:0; margin:0; padding:0;
|
||||
font-weight:bold;
|
||||
width:94px; height:26px;
|
||||
background:url(img/buttons.png) 0 -26px;
|
||||
cursor:pointer;
|
||||
padding-bottom:2px;
|
||||
}
|
||||
|
||||
#insert {background:url(img/buttons.png) 0 -52px;}
|
||||
#cancel {background:url(img/buttons.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;}
|
||||
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
||||
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
||||
a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);}
|
||||
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
||||
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
||||
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
||||
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}
|
||||
|
||||
/* Source */
|
||||
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
||||
.mceActionPanel {margin-top:5px;}
|
||||
|
||||
/* 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.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;}
|
||||
|
||||
/* Panels */
|
||||
.panel_wrapper div.panel {display:none;}
|
||||
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
||||
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
|
||||
|
||||
/* Columns */
|
||||
.column {float:left;}
|
||||
.properties {width:100%;}
|
||||
.properties .column1 {}
|
||||
.properties .column2 {text-align:left;}
|
||||
|
||||
/* Titles */
|
||||
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
||||
h3 {font-size:14px;}
|
||||
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
||||
|
||||
/* Dialog specific */
|
||||
#link .panel_wrapper, #link div.current {height:125px;}
|
||||
#image .panel_wrapper, #image div.current {height:200px;}
|
||||
#plugintable thead {font-weight:bold; background:#DDD;}
|
||||
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
||||
#plugintable {width:96%; margin-top:10px;}
|
||||
#pluginscontainer {height:290px; overflow:auto;}
|
||||
#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
|
||||
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
||||
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
||||
#colorpicker #light div {overflow:hidden;}
|
||||
#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
|
||||
#colorpicker .panel_wrapper div.current {height:175px;}
|
||||
#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;}
|
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 70 B |
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 70 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
193
wp-includes/js/tinymce/themes/advanced/skins/default/ui.css
Normal file
@ -0,0 +1,193 @@
|
||||
/* Reset */
|
||||
.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline}
|
||||
.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}
|
||||
|
||||
/* Containers */
|
||||
.defaultSkin table {background:#F0F0EE}
|
||||
.defaultSkin iframe {display:block; background:#FFF}
|
||||
.defaultSkin .mceToolbar {height:26px}
|
||||
.defaultSkin .left {text-align:left}
|
||||
.defaultSkin .right {text-align:right}
|
||||
|
||||
/* External */
|
||||
.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;}
|
||||
.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
||||
.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
|
||||
|
||||
/* Layout */
|
||||
.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
|
||||
.defaultSkin table.mceLayout tr.first td {border-top:1px solid #CCC}
|
||||
.defaultSkin table.mceLayout tr.last td {border-bottom:1px solid #CCC}
|
||||
.defaultSkin table.mceToolbar, .defaultSkin tr.first .mceToolbar tr td, .defaultSkin tr.last .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.resize {display:block; position:absolute; top:0; right:0; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px}
|
||||
.defaultSkin .mceStatusbar a:hover {text-decoration:underline}
|
||||
.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}
|
||||
|
||||
/* Button */
|
||||
.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px;}
|
||||
.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
|
||||
.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
|
||||
.defaultSkin .mceButtonDisabled .icon {opacity:0.3; filter:alpha(opacity=30)}
|
||||
|
||||
/* Separator */
|
||||
.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
|
||||
|
||||
/* ListBox */
|
||||
.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
|
||||
.defaultSkin .mceListBox .text {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
|
||||
.defaultSkin .mceListBox .open {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
|
||||
.defaultSkin table.mceListBoxEnabled:hover .text, .defaultSkin .mceListBoxHover .text, .defaultSkin .mceListBoxSelected .text {border:1px solid #A2ABC0; border-right:0; background:#FFF}
|
||||
.defaultSkin table.mceListBoxEnabled:hover .open, .defaultSkin .mceListBoxHover .open, .defaultSkin .mceListBoxSelected .open {background-color:#FFF; border:1px solid #A2ABC0}
|
||||
.defaultSkin .mceListBoxDisabled a.text {color:gray; background-color:transparent;}
|
||||
.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
|
||||
.defaultSkin .mceOldBoxModel .mceListBox .text {height:22px}
|
||||
.defaultSkin .mceOldBoxModel .mceListBox .open {width:11px; height:22px;}
|
||||
.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
|
||||
|
||||
/* SplitButton */
|
||||
.defaultSkin .mceSplitButton {width:32px; height:20px}
|
||||
.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
|
||||
.defaultSkin .mceSplitButton a.action {width:20px; border:1px solid #F0F0EE; border-right:0;}
|
||||
.defaultSkin .mceSplitButton span.action {width:20px; background:url(../../img/icons.gif) 20px 20px;}
|
||||
.defaultSkin .mceSplitButton a.open {width:9px; border:1px solid #F0F0EE;}
|
||||
.defaultSkin .mceSplitButton span.open {width:9px; background:url(../../img/icons.gif) -741px 0;}
|
||||
.defaultSkin table.mceSplitButtonEnabled:hover a.action, .defaultSkin .mceSplitButtonHover a.action, .defaultSkin .mceSplitButtonSelected a.action {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
|
||||
.defaultSkin table.mceSplitButtonEnabled:hover a.open, .defaultSkin .mceSplitButtonHover a.open, .defaultSkin .mceSplitButtonSelected a.open {border:1px solid #0A246A;}
|
||||
.defaultSkin table.mceSplitButtonEnabled:hover span.open, .defaultSkin .mceSplitButtonHover span.open, .defaultSkin .mceSplitButtonSelected span.open {background-color:#B2BBD0}
|
||||
.defaultSkin .mceSplitButtonDisabled .action, .defaultSkin .mceSplitButtonDisabled span.open {opacity:0.3; filter:alpha(opacity=30)}
|
||||
.defaultSkin .mceSplitButtonActive a.action {border:1px solid #0A246A; background-color:#C2CBE0}
|
||||
.defaultSkin .mceSplitButtonActive a.open {border-left:0;}
|
||||
|
||||
/* ColorSplitButton */
|
||||
.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
|
||||
.defaultSkin .mceColorSplitMenu td {padding:2px}
|
||||
.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
|
||||
.defaultSkin .mceColorSplitMenu td.morecolors {padding:1px 3px 1px 1px}
|
||||
.defaultSkin .mceColorSplitMenu a.morecolors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
||||
.defaultSkin .mceColorSplitMenu a.morecolors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
||||
.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
|
||||
.defaultSkin .mceColorPreview {position:absolute; top:15px; left:2px; width:16px; height:4px; overflow:hidden}
|
||||
|
||||
/* Menu */
|
||||
.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8}
|
||||
.defaultSkin .noIcons span.icon {width:0;}
|
||||
.defaultSkin .noIcons a .text {padding-left:10px}
|
||||
.defaultSkin .mceMenu table {background:#FFF}
|
||||
.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
|
||||
.defaultSkin .mceMenu td {height:20px}
|
||||
.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
|
||||
.defaultSkin .mceMenu .text {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
|
||||
.defaultSkin .mceMenu span.text, .defaultSkin .mceMenu .preview {font-size:11px}
|
||||
.defaultSkin .mceMenu pre.text {font-family:Monospace}
|
||||
.defaultSkin .mceMenu .icon {position:absolute; top:0; left:0; width:22px;}
|
||||
.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
|
||||
.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
|
||||
.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
|
||||
.defaultSkin .mceMenuItemTitle span.text {color:#000; font-weight:bold; padding-left:4px}
|
||||
.defaultSkin .mceMenuItemDisabled .text {color:#888}
|
||||
.defaultSkin .mceMenuItemSelected .icon {background:url(img/menu_check.gif)}
|
||||
.defaultSkin .noIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
|
||||
.defaultSkin .mceMenu span.mceMenuLine {display:none}
|
||||
.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
|
||||
|
||||
/* Progress,Resize */
|
||||
.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; filter:alpha(opacity=50); background:#FFF}
|
||||
.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}
|
||||
|
||||
/* Theme */
|
||||
.defaultSkin span.bold {background-position:0 0}
|
||||
.defaultSkin span.italic {background-position:-60px 0}
|
||||
.defaultSkin span.underline {background-position:-140px 0}
|
||||
.defaultSkin span.strikethrough {background-position:-120px 0}
|
||||
.defaultSkin span.undo {background-position:-160px 0}
|
||||
.defaultSkin span.redo {background-position:-100px 0}
|
||||
.defaultSkin span.cleanup {background-position:-40px 0}
|
||||
.defaultSkin span.bullist {background-position:-20px 0}
|
||||
.defaultSkin span.numlist {background-position:-80px 0}
|
||||
.defaultSkin span.justifyleft {background-position:-460px 0}
|
||||
.defaultSkin span.justifyright {background-position:-480px 0}
|
||||
.defaultSkin span.justifycenter {background-position:-420px 0}
|
||||
.defaultSkin span.justifyfull {background-position:-440px 0}
|
||||
.defaultSkin span.anchor {background-position:-200px 0}
|
||||
.defaultSkin span.indent {background-position:-400px 0}
|
||||
.defaultSkin span.outdent {background-position:-540px 0}
|
||||
.defaultSkin span.link {background-position:-500px 0}
|
||||
.defaultSkin span.unlink {background-position:-640px 0}
|
||||
.defaultSkin span.sub {background-position:-600px 0}
|
||||
.defaultSkin span.sup {background-position:-620px 0}
|
||||
.defaultSkin span.removeformat {background-position:-580px 0}
|
||||
.defaultSkin span.newdocument {background-position:-520px 0}
|
||||
.defaultSkin span.image {background-position:-380px 0}
|
||||
.defaultSkin span.help {background-position:-340px 0}
|
||||
.defaultSkin span.code {background-position:-260px 0}
|
||||
.defaultSkin span.hr {background-position:-360px 0}
|
||||
.defaultSkin span.visualaid {background-position:-660px 0}
|
||||
.defaultSkin span.charmap {background-position:-240px 0}
|
||||
.defaultSkin span.paste {background-position:-560px 0}
|
||||
.defaultSkin span.copy {background-position:-700px 0}
|
||||
.defaultSkin span.cut {background-position:-680px 0}
|
||||
.defaultSkin span.blockquote {background-position:-220px 0}
|
||||
.defaultSkin .forecolor span.action {background-position:-720px 0}
|
||||
.defaultSkin .backcolor span.action {background-position:-760px 0}
|
||||
.defaultSkin .forecolorpicker {background-position:-720px 0}
|
||||
.defaultSkin .backcolorpicker {background-position:-760px 0}
|
||||
|
||||
/* Plugins */
|
||||
.defaultSkin span.advhr {background-position:-0px -20px}
|
||||
.defaultSkin span.ltr {background-position:-20px -20px}
|
||||
.defaultSkin span.rtl {background-position:-40px -20px}
|
||||
.defaultSkin span.emotions {background-position:-60px -20px}
|
||||
.defaultSkin span.fullpage {background-position:-80px -20px}
|
||||
.defaultSkin span.fullscreen {background-position:-100px -20px}
|
||||
.defaultSkin span.iespell {background-position:-120px -20px}
|
||||
.defaultSkin span.insertdate {background-position:-140px -20px}
|
||||
.defaultSkin span.inserttime {background-position:-160px -20px}
|
||||
.defaultSkin span.absolute {background-position:-180px -20px}
|
||||
.defaultSkin span.backward {background-position:-200px -20px}
|
||||
.defaultSkin span.forward {background-position:-220px -20px}
|
||||
.defaultSkin span.insert_layer {background-position:-240px -20px}
|
||||
.defaultSkin span.insertlayer {background-position:-260px -20px}
|
||||
.defaultSkin span.movebackward {background-position:-280px -20px}
|
||||
.defaultSkin span.moveforward {background-position:-300px -20px}
|
||||
.defaultSkin span.media {background-position:-320px -20px}
|
||||
.defaultSkin span.nonbreaking {background-position:-340px -20px}
|
||||
.defaultSkin span.pastetext {background-position:-360px -20px}
|
||||
.defaultSkin span.pasteword {background-position:-380px -20px}
|
||||
.defaultSkin span.selectall {background-position:-400px -20px}
|
||||
.defaultSkin span.preview {background-position:-420px -20px}
|
||||
.defaultSkin span.print {background-position:-440px -20px}
|
||||
.defaultSkin span.cancel {background-position:-460px -20px}
|
||||
.defaultSkin span.save {background-position:-480px -20px}
|
||||
.defaultSkin span.replace {background-position:-500px -20px}
|
||||
.defaultSkin span.search {background-position:-520px -20px}
|
||||
.defaultSkin span.styleprops {background-position:-560px -20px}
|
||||
.defaultSkin span.table {background-position:-580px -20px}
|
||||
.defaultSkin span.cell_props {background-position:-600px -20px}
|
||||
.defaultSkin span.delete_table {background-position:-620px -20px}
|
||||
.defaultSkin span.delete_col {background-position:-640px -20px}
|
||||
.defaultSkin span.delete_row {background-position:-660px -20px}
|
||||
.defaultSkin span.col_after {background-position:-680px -20px}
|
||||
.defaultSkin span.col_before {background-position:-700px -20px}
|
||||
.defaultSkin span.row_after {background-position:-720px -20px}
|
||||
.defaultSkin span.row_before {background-position:-740px -20px}
|
||||
.defaultSkin span.merge_cells {background-position:-760px -20px}
|
||||
.defaultSkin span.table_props {background-position:-980px -20px}
|
||||
.defaultSkin span.row_props {background-position:-780px -20px}
|
||||
.defaultSkin span.split_cells {background-position:-800px -20px}
|
||||
.defaultSkin span.template {background-position:-820px -20px}
|
||||
.defaultSkin span.visualchars {background-position:-840px -20px}
|
||||
.defaultSkin span.abbr {background-position:-860px -20px}
|
||||
.defaultSkin span.acronym {background-position:-880px -20px}
|
||||
.defaultSkin span.attribs {background-position:-900px -20px}
|
||||
.defaultSkin span.cite {background-position:-920px -20px}
|
||||
.defaultSkin span.del {background-position:-940px -20px}
|
||||
.defaultSkin span.ins {background-position:-960px -20px}
|
||||
.defaultSkin span.pagebreak {background-position:0 -40px}
|
||||
.defaultSkin .spellchecker span.action {background-position:-540px -20px}
|
@ -0,0 +1,18 @@
|
||||
body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
body {background:#FFF;}
|
||||
.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;}
|
||||
img {border:0;}
|
||||
|
||||
/* IE */
|
||||
* html body {
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
}
|
111
wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css
Normal file
@ -0,0 +1,111 @@
|
||||
/* Generic */
|
||||
body {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDDDDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
background:#F0F0EE;
|
||||
padding:0;
|
||||
margin:8px 8px 0 8px;
|
||||
}
|
||||
|
||||
html {background:#F0F0EE;}
|
||||
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
textarea {resize:none;outline:none;}
|
||||
a:link, a:visited {color:black;}
|
||||
a:hover {color:#2B6FB6;}
|
||||
|
||||
/* Forms */
|
||||
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
||||
legend {color:#2B6FB6; font-weight:bold;}
|
||||
label.msg {display:none;}
|
||||
label.invalid {color:#EE0000; display:inline;}
|
||||
input.invalid {border:1px solid #EE0000;}
|
||||
input {background:#FFF; border:1px solid #CCC;}
|
||||
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
input, select, textarea {border:1px solid #808080;}
|
||||
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
.input_noborder {border:0;}
|
||||
|
||||
/* Buttons */
|
||||
#insert, #cancel, input.button, .updateButton {
|
||||
border:0; margin:0; padding:0;
|
||||
font-weight:bold;
|
||||
width:94px; height:26px;
|
||||
background:url(../default/img/buttons.png) 0 -26px;
|
||||
cursor:pointer;
|
||||
padding-bottom:2px;
|
||||
}
|
||||
|
||||
#insert {background:url(../default/img/buttons.png) 0 -52px;}
|
||||
#cancel {background:url(../default/img/buttons.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;}
|
||||
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
||||
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
||||
a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);}
|
||||
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
||||
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
||||
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
||||
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}
|
||||
|
||||
/* Source */
|
||||
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
||||
.mceActionPanel {margin-top:5px;}
|
||||
|
||||
/* 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.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 a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
||||
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
||||
|
||||
/* Panels */
|
||||
.panel_wrapper div.panel {display:none;}
|
||||
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
||||
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
|
||||
|
||||
/* Columns */
|
||||
.column {float:left;}
|
||||
.properties {width:100%;}
|
||||
.properties .column1 {}
|
||||
.properties .column2 {text-align:left;}
|
||||
|
||||
/* Titles */
|
||||
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
||||
h3 {font-size:14px;}
|
||||
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
||||
|
||||
/* Dialog specific */
|
||||
#link .panel_wrapper, #link div.current {height:125px;}
|
||||
#image .panel_wrapper, #image div.current {height:200px;}
|
||||
#plugintable thead {font-weight:bold; background:#DDD;}
|
||||
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
||||
#plugintable {width:96%; margin-top:10px;}
|
||||
#pluginscontainer {height:290px; overflow:auto;}
|
||||
#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
|
||||
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
||||
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
||||
#colorpicker #light div {overflow:hidden;}
|
||||
#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
|
||||
#colorpicker .panel_wrapper div.current {height:175px;}
|
||||
#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;}
|
After Width: | Height: | Size: 5.7 KiB |
193
wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css
Normal file
@ -0,0 +1,193 @@
|
||||
/* Reset */
|
||||
.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline}
|
||||
.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}
|
||||
|
||||
/* Containers */
|
||||
.o2k7Skin table {background:#E5EFFD}
|
||||
.o2k7Skin iframe {display:block; background:#FFF}
|
||||
.o2k7Skin .mceToolbar {height:26px}
|
||||
|
||||
/* External */
|
||||
.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none}
|
||||
.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
||||
.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
|
||||
|
||||
/* Layout */
|
||||
.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD}
|
||||
.o2k7Skin table.mceLayout tr.first td {border-top:1px solid #ABC6DD}
|
||||
.o2k7Skin table.mceLayout tr.last td {border-bottom:1px solid #ABC6DD}
|
||||
.o2k7Skin table.mceToolbar, .o2k7Skin tr.first .mceToolbar tr td, .o2k7Skin tr.last .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 a.resize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px}
|
||||
.o2k7Skin .mceStatusbar a:hover {text-decoration:underline}
|
||||
.o2k7Skin table.mceToolbar {margin-left:3px}
|
||||
.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; }
|
||||
.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px}
|
||||
.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}
|
||||
|
||||
/* Button */
|
||||
.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px}
|
||||
.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px}
|
||||
.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px}
|
||||
.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
|
||||
.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px}
|
||||
.o2k7Skin .mceButtonDisabled .icon {opacity:0.3; filter:alpha(opacity=30)}
|
||||
|
||||
/* Separator */
|
||||
.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
|
||||
|
||||
/* ListBox */
|
||||
.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block}
|
||||
.o2k7Skin .mceListBox .text {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
|
||||
.o2k7Skin .mceListBox .open {width:14px; height:22px; background:url(img/button_bg.png) -66px 0; margin-right:2px}
|
||||
.o2k7Skin table.mceListBoxEnabled:hover .text, .o2k7Skin .mceListBoxHover .text, .o2k7Skin .mceListBoxSelected .text {background:#FFF}
|
||||
.o2k7Skin table.mceListBoxEnabled:hover .open, .o2k7Skin .mceListBoxHover .open, .o2k7Skin .mceListBoxSelected .open {background-position:-66px -22px}
|
||||
.o2k7Skin .mceListBoxDisabled .text {color:gray}
|
||||
.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
|
||||
.o2k7Skin .mceOldBoxModel .mceListBox .text {height:22px}
|
||||
.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;}
|
||||
|
||||
/* SplitButton */
|
||||
.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px}
|
||||
.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)}
|
||||
.o2k7Skin .mceSplitButton a.action {width:22px}
|
||||
.o2k7Skin .mceSplitButton span.action {width:22px; background:url(../../img/icons.gif) 20px 20px}
|
||||
.o2k7Skin .mceSplitButton a.open {width:10px}
|
||||
.o2k7Skin .mceSplitButton span.open {width:10px; background:url(img/button_bg.png) -44px 0}
|
||||
.o2k7Skin table.mceSplitButtonEnabled:hover a.action, .o2k7Skin .mceSplitButtonHover a.action, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px}
|
||||
.o2k7Skin table.mceSplitButtonEnabled:hover span.open, .o2k7Skin .mceSplitButtonHover span.open, .o2k7Skin .mceSplitButtonSelected span.open {background-position:-44px -44px}
|
||||
.o2k7Skin .mceSplitButtonDisabled .action {opacity:0.3; filter:alpha(opacity=30)}
|
||||
.o2k7Skin .mceSplitButtonActive {background-position:0 -44px}
|
||||
|
||||
/* ColorSplitButton */
|
||||
.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
|
||||
.o2k7Skin .mceColorSplitMenu td {padding:2px}
|
||||
.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
|
||||
.o2k7Skin .mceColorSplitMenu td.morecolors {padding:1px 3px 1px 1px}
|
||||
.o2k7Skin .mceColorSplitMenu a.morecolors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
||||
.o2k7Skin .mceColorSplitMenu a.morecolors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
||||
.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A}
|
||||
.o2k7Skin .mceColorPreview {position:absolute; top:15px; left:2px; width:16px; height:4px; overflow:hidden}
|
||||
|
||||
/* Menu */
|
||||
.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD}
|
||||
.o2k7Skin .noIcons span.icon {width:0;}
|
||||
.o2k7Skin .noIcons a .text {padding-left:10px}
|
||||
.o2k7Skin .mceMenu table {background:#FFF}
|
||||
.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block}
|
||||
.o2k7Skin .mceMenu td {height:20px}
|
||||
.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0}
|
||||
.o2k7Skin .mceMenu .text {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
|
||||
.o2k7Skin .mceMenu span.text, .o2k7Skin .mceMenu .preview {font-size:11px}
|
||||
.o2k7Skin .mceMenu pre.text {font-family:Monospace}
|
||||
.o2k7Skin .mceMenu .icon {position:absolute; top:0; left:0; width:22px;}
|
||||
.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
|
||||
.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px}
|
||||
.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD}
|
||||
.o2k7Skin .mceMenuItemTitle span.text {color:#000; font-weight:bold; padding-left:4px}
|
||||
.o2k7Skin .mceMenuItemDisabled .text {color:#888}
|
||||
.o2k7Skin .mceMenuItemSelected .icon {background:url(../default/img/menu_check.gif)}
|
||||
.o2k7Skin .noIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center}
|
||||
.o2k7Skin .mceMenu span.mceMenuLine {display:none}
|
||||
.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;}
|
||||
|
||||
/* Progress,Resize */
|
||||
.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; filter:alpha(opacity=50); background:#FFF}
|
||||
.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}
|
||||
|
||||
/* Theme */
|
||||
.o2k7Skin span.bold {background-position:0 0}
|
||||
.o2k7Skin span.italic {background-position:-60px 0}
|
||||
.o2k7Skin span.underline {background-position:-140px 0}
|
||||
.o2k7Skin span.strikethrough {background-position:-120px 0}
|
||||
.o2k7Skin span.undo {background-position:-160px 0}
|
||||
.o2k7Skin span.redo {background-position:-100px 0}
|
||||
.o2k7Skin span.cleanup {background-position:-40px 0}
|
||||
.o2k7Skin span.bullist {background-position:-20px 0}
|
||||
.o2k7Skin span.numlist {background-position:-80px 0}
|
||||
.o2k7Skin span.justifyleft {background-position:-460px 0}
|
||||
.o2k7Skin span.justifyright {background-position:-480px 0}
|
||||
.o2k7Skin span.justifycenter {background-position:-420px 0}
|
||||
.o2k7Skin span.justifyfull {background-position:-440px 0}
|
||||
.o2k7Skin span.anchor {background-position:-200px 0}
|
||||
.o2k7Skin span.indent {background-position:-400px 0}
|
||||
.o2k7Skin span.outdent {background-position:-540px 0}
|
||||
.o2k7Skin span.link {background-position:-500px 0}
|
||||
.o2k7Skin span.unlink {background-position:-640px 0}
|
||||
.o2k7Skin span.sub {background-position:-600px 0}
|
||||
.o2k7Skin span.sup {background-position:-620px 0}
|
||||
.o2k7Skin span.removeformat {background-position:-580px 0}
|
||||
.o2k7Skin span.newdocument {background-position:-520px 0}
|
||||
.o2k7Skin span.image {background-position:-380px 0}
|
||||
.o2k7Skin span.help {background-position:-340px 0}
|
||||
.o2k7Skin span.code {background-position:-260px 0}
|
||||
.o2k7Skin span.hr {background-position:-360px 0}
|
||||
.o2k7Skin span.visualaid {background-position:-660px 0}
|
||||
.o2k7Skin span.charmap {background-position:-240px 0}
|
||||
.o2k7Skin span.paste {background-position:-560px 0}
|
||||
.o2k7Skin span.copy {background-position:-700px 0}
|
||||
.o2k7Skin span.cut {background-position:-680px 0}
|
||||
.o2k7Skin span.blockquote {background-position:-220px 0}
|
||||
.o2k7Skin .forecolor span.action {background-position:-720px 0}
|
||||
.o2k7Skin .backcolor span.action {background-position:-760px 0}
|
||||
.o2k7Skin .forecolorpicker {background-position:-720px 0}
|
||||
.o2k7Skin .backcolorpicker {background-position:-760px 0}
|
||||
|
||||
/* Plugins */
|
||||
.o2k7Skin span.advhr {background-position:-0px -20px}
|
||||
.o2k7Skin span.ltr {background-position:-20px -20px}
|
||||
.o2k7Skin span.rtl {background-position:-40px -20px}
|
||||
.o2k7Skin span.emotions {background-position:-60px -20px}
|
||||
.o2k7Skin span.fullpage {background-position:-80px -20px}
|
||||
.o2k7Skin span.fullscreen {background-position:-100px -20px}
|
||||
.o2k7Skin span.iespell {background-position:-120px -20px}
|
||||
.o2k7Skin span.insertdate {background-position:-140px -20px}
|
||||
.o2k7Skin span.inserttime {background-position:-160px -20px}
|
||||
.o2k7Skin span.absolute {background-position:-180px -20px}
|
||||
.o2k7Skin span.backward {background-position:-200px -20px}
|
||||
.o2k7Skin span.forward {background-position:-220px -20px}
|
||||
.o2k7Skin span.insert_layer {background-position:-240px -20px}
|
||||
.o2k7Skin span.insertlayer {background-position:-260px -20px}
|
||||
.o2k7Skin span.movebackward {background-position:-280px -20px}
|
||||
.o2k7Skin span.moveforward {background-position:-300px -20px}
|
||||
.o2k7Skin span.media {background-position:-320px -20px}
|
||||
.o2k7Skin span.nonbreaking {background-position:-340px -20px}
|
||||
.o2k7Skin span.pastetext {background-position:-360px -20px}
|
||||
.o2k7Skin span.pasteword {background-position:-380px -20px}
|
||||
.o2k7Skin span.selectall {background-position:-400px -20px}
|
||||
.o2k7Skin span.preview {background-position:-420px -20px}
|
||||
.o2k7Skin span.print {background-position:-440px -20px}
|
||||
.o2k7Skin span.cancel {background-position:-460px -20px}
|
||||
.o2k7Skin span.save {background-position:-480px -20px}
|
||||
.o2k7Skin span.replace {background-position:-500px -20px}
|
||||
.o2k7Skin span.search {background-position:-520px -20px}
|
||||
.o2k7Skin span.styleprops {background-position:-560px -20px}
|
||||
.o2k7Skin span.table {background-position:-580px -20px}
|
||||
.o2k7Skin span.cell_props {background-position:-600px -20px}
|
||||
.o2k7Skin span.delete_table {background-position:-620px -20px}
|
||||
.o2k7Skin span.delete_col {background-position:-640px -20px}
|
||||
.o2k7Skin span.delete_row {background-position:-660px -20px}
|
||||
.o2k7Skin span.col_after {background-position:-680px -20px}
|
||||
.o2k7Skin span.col_before {background-position:-700px -20px}
|
||||
.o2k7Skin span.row_after {background-position:-720px -20px}
|
||||
.o2k7Skin span.row_before {background-position:-740px -20px}
|
||||
.o2k7Skin span.merge_cells {background-position:-760px -20px}
|
||||
.o2k7Skin span.table_props {background-position:-980px -20px}
|
||||
.o2k7Skin span.row_props {background-position:-780px -20px}
|
||||
.o2k7Skin span.split_cells {background-position:-800px -20px}
|
||||
.o2k7Skin span.template {background-position:-820px -20px}
|
||||
.o2k7Skin span.visualchars {background-position:-840px -20px}
|
||||
.o2k7Skin span.abbr {background-position:-860px -20px}
|
||||
.o2k7Skin span.acronym {background-position:-880px -20px}
|
||||
.o2k7Skin span.attribs {background-position:-900px -20px}
|
||||
.o2k7Skin span.cite {background-position:-920px -20px}
|
||||
.o2k7Skin span.del {background-position:-940px -20px}
|
||||
.o2k7Skin span.ins {background-position:-960px -20px}
|
||||
.o2k7Skin span.pagebreak {background-position:0 -40px}
|
||||
.o2k7Skin .spellchecker span.action {background-position:-540px -20px}
|
@ -1,32 +1,30 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>{$lang_theme_code_title}</title>
|
||||
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="jscripts/source_editor.js"></script>
|
||||
<title>{#advanced_dlg.code_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/source_editor.js"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<!-- WordPress: extra onload stuff is WP! -->
|
||||
<body onload="tinyMCEPopup.executeOnLoad('onLoadInit();');document.body.style.display='';document.getElementById('htmlSource').focus();" onresize="resizeInputs();" style="display: none">
|
||||
<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
|
||||
<form name="source" onsubmit="saveContent();" action="#">
|
||||
<div style="float: left" class="title">{$lang_theme_code_title}</div>
|
||||
<div style="float: left" class="title">{#advanced_dlg.code_title}</div>
|
||||
|
||||
<div id="wrapline" style="float: right">
|
||||
<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{$lang_theme_code_wordwrap}</label>
|
||||
<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{#advanced_dlg.code_wordwrap}</label>
|
||||
</div>
|
||||
|
||||
<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"></textarea>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<!-- WordPress: reversed buttons! -->
|
||||
<div style="float: left">
|
||||
<input type="button" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
|
||||
<input type="button" name="insert" value="{#update}" onclick="saveContent();" id="insert" />
|
||||
</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="submit" name="insert" value="{$lang_update}" onclick="saveContent();" id="insert" />
|
||||
<input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
16080
wp-includes/js/tinymce/tiny_mce.js
vendored
@ -27,14 +27,14 @@
|
||||
|
||||
$invalid_elements = apply_filters('mce_invalid_elements', '');
|
||||
|
||||
$plugins = array('inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress');
|
||||
$plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress', 'media' );
|
||||
$plugins = apply_filters('mce_plugins', $plugins);
|
||||
$plugins = implode($plugins, ',');
|
||||
|
||||
$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'outdent', 'indent', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'separator', 'link', 'unlink', 'image', 'wp_more', 'separator', 'spellchecker', 'separator', 'wp_help', 'wp_adv', 'wp_adv_start', 'formatselect', 'underline', 'justifyfull', 'forecolor', 'separator', 'pastetext', 'pasteword', 'separator', 'removeformat', 'cleanup', 'separator', 'charmap', 'separator', 'undo', 'redo', 'wp_adv_end'));
|
||||
$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'outdent', 'indent', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'separator', 'link', 'unlink', 'image', 'wp_more', 'separator', 'spellchecker', 'separator', 'wp_help', 'wp_adv', 'wp_adv_start', 'wp_adv_end'));
|
||||
$mce_buttons = implode($mce_buttons, ',');
|
||||
|
||||
$mce_buttons_2 = apply_filters('mce_buttons_2', array());
|
||||
$mce_buttons_2 = apply_filters('mce_buttons_2', array('formatselect', 'underline', 'justifyfull', 'forecolor', 'media', 'separator', 'pastetext', 'pasteword', 'separator', 'removeformat', 'cleanup', 'separator', 'charmap', 'separator', 'undo', 'redo'));
|
||||
$mce_buttons_2 = implode($mce_buttons_2, ',');
|
||||
|
||||
$mce_buttons_3 = apply_filters('mce_buttons_3', array());
|
||||
@ -54,25 +54,34 @@
|
||||
$mce_locale = ( '' == get_locale() ) ? 'en' : strtolower(get_locale());
|
||||
?>
|
||||
|
||||
/*
|
||||
wpEditorInit = function() {
|
||||
// Activate tinyMCE if it's the user's default editor
|
||||
if ( ( 'undefined' == typeof wpTinyMCEConfig ) || 'tinymce' == wpTinyMCEConfig.defaultEditor )
|
||||
tinyMCE.execCommand("mceAddControl", true, 'content');
|
||||
tinyMCE.execCommand('mceAddControl', false, 'content');
|
||||
};
|
||||
*/
|
||||
|
||||
wpEditorInit = function() {
|
||||
if ( ( 'undefined' != typeof wpTinyMCEConfig ) && 'tinymce' != wpTinyMCEConfig.defaultEditor )
|
||||
tinyMCE.get('content').hide();
|
||||
}
|
||||
|
||||
initArray = {
|
||||
mode : "specific_textareas",
|
||||
editor_selector : "mceEditor",
|
||||
mode : "exact",
|
||||
elements : "content",
|
||||
// editor_selector : "mceEditor",
|
||||
oninit : "wpEditorInit",
|
||||
width : "100%",
|
||||
theme : "advanced",
|
||||
skin : "o2k7",
|
||||
theme_advanced_buttons1 : "<?php echo $mce_buttons; ?>",
|
||||
theme_advanced_buttons2 : "<?php echo $mce_buttons_2; ?>",
|
||||
theme_advanced_buttons3 : "<?php echo $mce_buttons_3; ?>",
|
||||
language : "<?php echo $mce_locale; ?>",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "left",
|
||||
theme_advanced_path_location : "bottom",
|
||||
theme_advanced_statusbar_location : "bottom",
|
||||
theme_advanced_resizing : true,
|
||||
browsers : "<?php echo $mce_browsers; ?>",
|
||||
dialog_type : "modal",
|
||||
|
@ -9,9 +9,14 @@
|
||||
* enables the browser to do two requests instead of one for each .js file.
|
||||
* Notice: This script defaults the button_tile_map option to true for extra performance.
|
||||
*/
|
||||
|
||||
@require_once('../../../wp-config.php'); // For get_bloginfo().
|
||||
|
||||
|
||||
@require_once('../../../wp-config.php'); // For get_bloginfo().
|
||||
?>
|
||||
var scriptURL = '<?php echo get_bloginfo('wpurl') . '/' . WPINC; ?>/js/tinymce/tiny_mce.js';
|
||||
document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + scriptURL + '"></script>');
|
||||
<?php
|
||||
exit; // tiny_mce_gzip.php needs changes, but also it's much easier to test the js when it's not in one big file
|
||||
|
||||
// Get input
|
||||
$plugins = explode(',', getParam("plugins", ""));
|
||||
$languages = explode(',', getParam("languages", ""));
|
||||
|
435
wp-includes/js/tinymce/tiny_mce_popup.js
vendored
@ -1,294 +1,221 @@
|
||||
// Some global instances, this will be filled later
|
||||
var tinyMCE = null, tinyMCELang = null;
|
||||
|
||||
function TinyMCE_Popup() {
|
||||
};
|
||||
|
||||
TinyMCE_Popup.prototype = {
|
||||
findWin : function(w) {
|
||||
var c;
|
||||
|
||||
// Check parents
|
||||
c = w;
|
||||
while (c && (c = c.parent) != null) {
|
||||
if (typeof(c.tinyMCE) != "undefined")
|
||||
return c;
|
||||
}
|
||||
|
||||
// Check openers
|
||||
c = w;
|
||||
while (c && (c = c.opener) != null) {
|
||||
if (typeof(c.tinyMCE) != "undefined")
|
||||
return c;
|
||||
}
|
||||
|
||||
// Try top
|
||||
if (typeof(top.tinyMCE) != "undefined")
|
||||
return top;
|
||||
|
||||
return null;
|
||||
},
|
||||
// Some global instances
|
||||
var tinymce = null, tinyMCEPopup, tinyMCE;
|
||||
|
||||
tinyMCEPopup = {
|
||||
init : function() {
|
||||
var win = window.opener ? window.opener : window.dialogArguments, c;
|
||||
var inst, re, title, divElm;
|
||||
var t = this, w = t.getWin(), ti;
|
||||
|
||||
if (!win)
|
||||
win = this.findWin(window);
|
||||
// Find API
|
||||
tinymce = w.tinymce;
|
||||
tinyMCE = w.tinyMCE;
|
||||
t.editor = tinymce.EditorManager.activeEditor;
|
||||
t.params = t.editor.windowManager.params;
|
||||
|
||||
if (!win) {
|
||||
alert("tinyMCE object reference not found from popup.");
|
||||
return;
|
||||
}
|
||||
// Setup local DOM
|
||||
t.dom = t.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document);
|
||||
t.dom.loadCSS(t.editor.settings.popup_css);
|
||||
|
||||
window.opener = win;
|
||||
this.windowOpener = win;
|
||||
this.onLoadEval = "";
|
||||
|
||||
// Setup parent references
|
||||
tinyMCE = win.tinyMCE;
|
||||
tinyMCELang = win.tinyMCELang;
|
||||
|
||||
inst = tinyMCE.selectedInstance;
|
||||
this.isWindow = tinyMCE.getWindowArg('mce_inside_iframe', false) == false;
|
||||
this.storeSelection = (tinyMCE.isRealIE) && !this.isWindow && tinyMCE.getWindowArg('mce_store_selection', true);
|
||||
|
||||
if (this.isWindow)
|
||||
window.focus();
|
||||
|
||||
// Store selection
|
||||
if (this.storeSelection)
|
||||
inst.selectionBookmark = inst.selection.getBookmark(true);
|
||||
|
||||
// Setup dir
|
||||
if (tinyMCELang.lang_dir)
|
||||
document.dir = tinyMCELang.lang_dir;
|
||||
|
||||
// Setup title
|
||||
re = new RegExp('{|\\\$|}', 'g');
|
||||
title = document.title.replace(re, "");
|
||||
if (typeof(tinyMCELang[title]) != "undefined") {
|
||||
divElm = document.createElement("div");
|
||||
divElm.innerHTML = tinyMCELang[title];
|
||||
document.title = divElm.innerHTML;
|
||||
|
||||
if (typeof(tinyMCE.setWindowTitle) != 'undefined')
|
||||
tinyMCE.setWindowTitle(window, divElm.innerHTML);
|
||||
}
|
||||
|
||||
// Output Popup CSS class
|
||||
document.write('<link href="' + tinyMCE.getParam("popups_css") + '" rel="stylesheet" type="text/css">');
|
||||
|
||||
if (tinyMCE.getParam("popups_css_add")) {
|
||||
c = tinyMCE.getParam("popups_css_add");
|
||||
|
||||
// Is relative
|
||||
if (c.indexOf('://') == -1 && c.charAt(0) != '/')
|
||||
c = tinyMCE.documentBasePath + "/" + c;
|
||||
|
||||
document.write('<link href="' + c + '" rel="stylesheet" type="text/css">');
|
||||
}
|
||||
|
||||
tinyMCE.addEvent(window, "load", this.onLoad);
|
||||
},
|
||||
|
||||
onLoad : function() {
|
||||
var dir, i, elms, body = document.body;
|
||||
|
||||
if (tinyMCE.getWindowArg('mce_replacevariables', true))
|
||||
body.innerHTML = tinyMCE.applyTemplate(body.innerHTML, tinyMCE.windowArgs);
|
||||
|
||||
dir = tinyMCE.selectedInstance.settings.directionality;
|
||||
if (dir == "rtl" && document.forms && document.forms.length > 0) {
|
||||
elms = document.forms[0].elements;
|
||||
for (i=0; i<elms.length; i++) {
|
||||
if ((elms[i].type == "text" || elms[i].type == "textarea") && elms[i].getAttribute("dir") != "ltr")
|
||||
elms[i].dir = dir;
|
||||
// Setup on init listeners
|
||||
t.listeners = [];
|
||||
t.onInit = {
|
||||
add : function(f, s) {
|
||||
t.listeners.push({func : f, scope : s});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (body.style.display == 'none')
|
||||
body.style.display = 'block';
|
||||
|
||||
// Execute real onload (Opera fix)
|
||||
if (tinyMCEPopup.onLoadEval !== '')
|
||||
eval(tinyMCEPopup.onLoadEval);
|
||||
t.isWindow = !t.getWindowArg('mce_inline');
|
||||
t.id = t.getWindowArg('mce_window_id');
|
||||
t.editor.windowManager.onOpen.dispatch(t.editor.windowManager, window);
|
||||
},
|
||||
|
||||
executeOnLoad : function(str) {
|
||||
if (tinyMCE.isOpera)
|
||||
this.onLoadEval = str;
|
||||
else
|
||||
eval(str);
|
||||
getWin : function() {
|
||||
return window.dialogArguments || opener || parent || top;
|
||||
},
|
||||
|
||||
getWindowArg : function(n, dv) {
|
||||
var v = this.params[n];
|
||||
|
||||
return tinymce.is(v) ? v : dv;
|
||||
},
|
||||
|
||||
getParam : function(n, dv) {
|
||||
return this.editor.getParam(n, dv);
|
||||
},
|
||||
|
||||
getLang : function(n, dv) {
|
||||
return this.editor.getLang(n, dv);
|
||||
},
|
||||
|
||||
execCommand : function(cmd, ui, val) {
|
||||
this.restoreSelection();
|
||||
return this.editor.execCommand(cmd, ui, val);
|
||||
},
|
||||
|
||||
resizeToInnerSize : function() {
|
||||
var i, doc, body, oldMargin, wrapper, iframe, nodes, dx, dy;
|
||||
var t = this, n, b = document.body, vp = t.dom.getViewPort(window), dw, dh;
|
||||
|
||||
// Netscape 7.1 workaround
|
||||
if (this.isWindow && tinyMCE.isNS71) {
|
||||
window.resizeBy(0, 10);
|
||||
return;
|
||||
}
|
||||
dw = t.getWindowArg('mce_width') - vp.w;
|
||||
dh = t.getWindowArg('mce_height') - vp.h;
|
||||
|
||||
if (this.isWindow) {
|
||||
doc = document;
|
||||
body = doc.body;
|
||||
|
||||
if (body.style.display == 'none')
|
||||
body.style.display = 'block';
|
||||
|
||||
// Remove margin
|
||||
oldMargin = body.style.margin;
|
||||
body.style.margin = '0';
|
||||
|
||||
// Create wrapper
|
||||
wrapper = doc.createElement("div");
|
||||
wrapper.id = 'mcBodyWrapper';
|
||||
wrapper.style.display = 'none';
|
||||
wrapper.style.margin = '0';
|
||||
|
||||
// Wrap body elements
|
||||
nodes = doc.body.childNodes;
|
||||
for (i=nodes.length-1; i>=0; i--) {
|
||||
if (wrapper.hasChildNodes())
|
||||
wrapper.insertBefore(nodes[i].cloneNode(true), wrapper.firstChild);
|
||||
else
|
||||
wrapper.appendChild(nodes[i].cloneNode(true));
|
||||
|
||||
nodes[i].parentNode.removeChild(nodes[i]);
|
||||
}
|
||||
|
||||
// Add wrapper
|
||||
doc.body.appendChild(wrapper);
|
||||
|
||||
// Create iframe
|
||||
iframe = document.createElement("iframe");
|
||||
iframe.id = "mcWinIframe";
|
||||
iframe.src = document.location.href.toLowerCase().indexOf('https') == -1 ? "about:blank" : tinyMCE.settings.default_document;
|
||||
iframe.width = "100%";
|
||||
iframe.height = "100%";
|
||||
iframe.style.margin = '0';
|
||||
|
||||
// Add iframe
|
||||
doc.body.appendChild(iframe);
|
||||
|
||||
// Measure iframe
|
||||
iframe = document.getElementById('mcWinIframe');
|
||||
dx = tinyMCE.getWindowArg('mce_width') - iframe.clientWidth;
|
||||
dy = tinyMCE.getWindowArg('mce_height') - iframe.clientHeight;
|
||||
|
||||
// Resize window
|
||||
// tinyMCE.debug(tinyMCE.getWindowArg('mce_width') + "," + tinyMCE.getWindowArg('mce_height') + " - " + dx + "," + dy);
|
||||
window.resizeBy(dx, dy);
|
||||
|
||||
// Hide iframe and show wrapper
|
||||
body.style.margin = oldMargin;
|
||||
iframe.style.display = 'none';
|
||||
wrapper.style.display = 'block';
|
||||
}
|
||||
if (t.isWindow)
|
||||
window.resizeBy(dw, dh);
|
||||
else
|
||||
t.editor.windowManager.resizeBy(dw, dh, t.id);
|
||||
},
|
||||
|
||||
resizeToContent : function() {
|
||||
var isMSIE = (navigator.appName == "Microsoft Internet Explorer");
|
||||
var isOpera = (navigator.userAgent.indexOf("Opera") != -1);
|
||||
var elm, width, height, x, y, dx, dy;
|
||||
|
||||
if (isOpera)
|
||||
return;
|
||||
|
||||
if (isMSIE) {
|
||||
try { window.resizeTo(10, 10); } catch (e) {}
|
||||
|
||||
elm = document.body;
|
||||
width = elm.offsetWidth;
|
||||
height = elm.offsetHeight;
|
||||
dx = (elm.scrollWidth - width) + 4;
|
||||
dy = elm.scrollHeight - height;
|
||||
|
||||
try { window.resizeBy(dx, dy); } catch (e) {}
|
||||
} else {
|
||||
window.scrollBy(1000, 1000);
|
||||
if (window.scrollX > 0 || window.scrollY > 0) {
|
||||
window.resizeBy(window.innerWidth * 2, window.innerHeight * 2);
|
||||
window.sizeToContent();
|
||||
window.scrollTo(0, 0);
|
||||
x = parseInt(screen.width / 2.0) - (window.outerWidth / 2.0);
|
||||
y = parseInt(screen.height / 2.0) - (window.outerHeight / 2.0);
|
||||
window.moveTo(x, y);
|
||||
}
|
||||
}
|
||||
executeOnLoad : function(s) {
|
||||
this.onInit.add(function() {
|
||||
eval(s);
|
||||
});
|
||||
},
|
||||
|
||||
getWindowArg : function(name, default_value) {
|
||||
return tinyMCE.getWindowArg(name, default_value);
|
||||
storeSelection : function() {
|
||||
this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark('simple');
|
||||
},
|
||||
|
||||
restoreSelection : function() {
|
||||
var inst;
|
||||
var t = tinyMCEPopup;
|
||||
|
||||
if (this.storeSelection) {
|
||||
inst = tinyMCE.selectedInstance;
|
||||
|
||||
inst.getWin().focus();
|
||||
|
||||
if (inst.selectionBookmark)
|
||||
inst.selection.moveToBookmark(inst.selectionBookmark);
|
||||
}
|
||||
if (!t.isWindow && tinymce.isIE)
|
||||
t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark);
|
||||
},
|
||||
|
||||
execCommand : function(command, user_interface, value) {
|
||||
var inst = tinyMCE.selectedInstance;
|
||||
requireLangPack : function() {
|
||||
var u = this.getWindowArg('plugin_url') || this.getWindowArg('theme_url');
|
||||
|
||||
this.restoreSelection();
|
||||
inst.execCommand(command, user_interface, value);
|
||||
|
||||
// Store selection
|
||||
if (this.storeSelection)
|
||||
inst.selectionBookmark = inst.selection.getBookmark(true);
|
||||
},
|
||||
|
||||
close : function() {
|
||||
tinyMCE.closeWindow(window);
|
||||
if (u)
|
||||
document.write('<script type="text/javascript" src="' + u + '/langs/' + this.editor.settings.language + '_dlg.js' + '"></script>');
|
||||
},
|
||||
|
||||
pickColor : function(e, element_id) {
|
||||
tinyMCE.selectedInstance.execCommand('mceColorPicker', true, {
|
||||
element_id : element_id,
|
||||
document : document,
|
||||
window : window,
|
||||
store_selection : false
|
||||
this.execCommand('mceColorPicker', true, {
|
||||
color : document.getElementById(element_id).value,
|
||||
func : function(c) {
|
||||
document.getElementById(element_id).value = c;
|
||||
|
||||
if (tinymce.is(document.getElementById(element_id).onchange, 'function'))
|
||||
document.getElementById(element_id).onchange();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
openBrowser : function(element_id, type, option) {
|
||||
var cb = tinyMCE.getParam(option, tinyMCE.getParam("file_browser_callback"));
|
||||
var url = document.getElementById(element_id).value;
|
||||
|
||||
tinyMCE.setWindowArg("window", window);
|
||||
tinyMCE.setWindowArg("document", document);
|
||||
|
||||
// Call to external callback
|
||||
if (eval('typeof(tinyMCEPopup.windowOpener.' + cb + ')') == "undefined")
|
||||
alert("Callback function: " + cb + " could not be found.");
|
||||
else
|
||||
eval("tinyMCEPopup.windowOpener." + cb + "(element_id, url, type, window);");
|
||||
tinyMCEPopup.restoreSelection();
|
||||
this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window);
|
||||
},
|
||||
|
||||
importClass : function(c) {
|
||||
var n;
|
||||
close : function() {
|
||||
var t = this;
|
||||
|
||||
window[c] = function() {};
|
||||
t.dom = t.dom.doc = null; // Cleanup
|
||||
t.editor.windowManager.close(window, t.id);
|
||||
},
|
||||
|
||||
for (n in window.opener[c].prototype)
|
||||
window[c].prototype[n] = window.opener[c].prototype[n];
|
||||
// Internal functions
|
||||
|
||||
window[c].constructor = window.opener[c].constructor;
|
||||
_restoreSelection : function() {
|
||||
var e = window.event.srcElement;
|
||||
|
||||
if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button'))
|
||||
tinyMCEPopup.restoreSelection();
|
||||
},
|
||||
|
||||
/* _restoreSelection : function() {
|
||||
var e = window.event.srcElement;
|
||||
|
||||
// If user focus a non text input or textarea
|
||||
if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text')
|
||||
tinyMCEPopup.restoreSelection();
|
||||
},*/
|
||||
|
||||
_onDOMLoaded : function() {
|
||||
var t = this, ti = document.title, bm, h;
|
||||
|
||||
// Translate page
|
||||
h = document.body.innerHTML;
|
||||
|
||||
// Replace a=x with a="x" in IE
|
||||
if (tinymce.isIE)
|
||||
h = h.replace(/ (value|title|alt)=([^\s>]+)/gi, ' $1="$2"');
|
||||
|
||||
document.body.innerHTML = t.editor.translate(h);
|
||||
document.title = ti = t.editor.translate(ti);
|
||||
document.body.style.display = '';
|
||||
|
||||
// Restore selection in IE when focus is placed on a non textarea or input element of the type text
|
||||
if (tinymce.isIE)
|
||||
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
|
||||
t.editor.windowManager.setTitle(ti, t.id);
|
||||
|
||||
if (!tinymce.isIE && !t.isWindow) {
|
||||
tinymce.dom.Event._add(document, 'focus', function() {
|
||||
t.editor.windowManager.focus(t.id)
|
||||
});
|
||||
}
|
||||
|
||||
// Patch for accessibility
|
||||
tinymce.each(t.dom.select('select'), function(e) {
|
||||
e.onkeydown = tinyMCEPopup._accessHandler;
|
||||
});
|
||||
|
||||
// Move focus to window
|
||||
window.focus();
|
||||
},
|
||||
|
||||
_accessHandler : function(e) {
|
||||
var e = e || window.event;
|
||||
|
||||
if (e.keyCode == 13 || e.keyCode == 32) {
|
||||
e = e.target || e.srcElement;
|
||||
|
||||
if (e.onchange)
|
||||
e.onchange();
|
||||
|
||||
return tinymce.dom.Event.cancel(e);
|
||||
}
|
||||
},
|
||||
|
||||
_wait : function() {
|
||||
var t = this, ti;
|
||||
|
||||
if (tinymce.isIE && document.location.protocol != 'https:') {
|
||||
// Fake DOMContentLoaded on IE
|
||||
document.write('<script id=__ie_onload defer src=\'javascript:""\';><\/script>');
|
||||
document.getElementById("__ie_onload").onreadystatechange = function() {
|
||||
if (this.readyState == "complete") {
|
||||
t._onDOMLoaded();
|
||||
document.getElementById("__ie_onload").onreadystatechange = null; // Prevent leak
|
||||
}
|
||||
};
|
||||
} else {
|
||||
if (tinymce.isIE || tinymce.isWebKit) {
|
||||
ti = setInterval(function() {
|
||||
if (/loaded|complete/.test(document.readyState)) {
|
||||
clearInterval(ti);
|
||||
t._onDOMLoaded();
|
||||
}
|
||||
}, 10);
|
||||
} else {
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
t._onDOMLoaded();
|
||||
}, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Setup global instance
|
||||
var tinyMCEPopup = new TinyMCE_Popup();
|
||||
};
|
||||
|
||||
tinyMCEPopup.init();
|
||||
tinyMCEPopup._wait(); // Wait for DOM Content Loaded
|
||||
|
@ -1,61 +1,61 @@
|
||||
/**
|
||||
* $Id: editable_selects.js 162 2007-01-03 16:16:52Z spocke $
|
||||
*
|
||||
* Makes select boxes editable.
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
var TinyMCE_EditableSelects = {
|
||||
editSelectElm : null,
|
||||
|
||||
init : function() {
|
||||
var nl = document.getElementsByTagName("select"), i, d = document, o;
|
||||
|
||||
for (i=0; i<nl.length; i++) {
|
||||
if (nl[i].className.indexOf('mceEditableSelect') != -1) {
|
||||
o = new Option('(value)', '__mce_add_custom__');
|
||||
|
||||
o.className = 'mceAddSelectValue';
|
||||
|
||||
nl[i].options[nl[i].options.length] = o;
|
||||
nl[i].setAttribute('onchange', 'TinyMCE_EditableSelects.onChangeEditableSelect(this);');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onChangeEditableSelect : function(se) {
|
||||
var d = document, ne;
|
||||
|
||||
if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
|
||||
ne = d.createElement("input");
|
||||
ne.id = se.id + "_custom";
|
||||
ne.name = se.name + "_custom";
|
||||
ne.type = "text";
|
||||
|
||||
ne.style.width = se.clientWidth;
|
||||
se.parentNode.insertBefore(ne, se);
|
||||
se.style.display = 'none';
|
||||
ne.focus();
|
||||
ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
|
||||
TinyMCE_EditableSelects.editSelectElm = se;
|
||||
}
|
||||
},
|
||||
|
||||
onBlurEditableSelectInput : function() {
|
||||
var se = TinyMCE_EditableSelects.editSelectElm;
|
||||
|
||||
if (se) {
|
||||
if (se.previousSibling.value != '') {
|
||||
addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
|
||||
selectByValue(document.forms[0], se.id, se.previousSibling.value);
|
||||
} else
|
||||
selectByValue(document.forms[0], se.id, '');
|
||||
|
||||
se.style.display = 'inline';
|
||||
se.parentNode.removeChild(se.previousSibling);
|
||||
TinyMCE_EditableSelects.editSelectElm = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
/**
|
||||
* $Id: editable_selects.js 520 2008-01-07 16:30:32Z spocke $
|
||||
*
|
||||
* Makes select boxes editable.
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
var TinyMCE_EditableSelects = {
|
||||
editSelectElm : null,
|
||||
|
||||
init : function() {
|
||||
var nl = document.getElementsByTagName("select"), i, d = document, o;
|
||||
|
||||
for (i=0; i<nl.length; i++) {
|
||||
if (nl[i].className.indexOf('mceEditableSelect') != -1) {
|
||||
o = new Option('(value)', '__mce_add_custom__');
|
||||
|
||||
o.className = 'mceAddSelectValue';
|
||||
|
||||
nl[i].options[nl[i].options.length] = o;
|
||||
nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onChangeEditableSelect : function(e) {
|
||||
var d = document, ne, se = window.event ? window.event.srcElement : e.target;
|
||||
|
||||
if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
|
||||
ne = d.createElement("input");
|
||||
ne.id = se.id + "_custom";
|
||||
ne.name = se.name + "_custom";
|
||||
ne.type = "text";
|
||||
|
||||
ne.style.width = se.offsetWidth + 'px';
|
||||
se.parentNode.insertBefore(ne, se);
|
||||
se.style.display = 'none';
|
||||
ne.focus();
|
||||
ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
|
||||
TinyMCE_EditableSelects.editSelectElm = se;
|
||||
}
|
||||
},
|
||||
|
||||
onBlurEditableSelectInput : function() {
|
||||
var se = TinyMCE_EditableSelects.editSelectElm;
|
||||
|
||||
if (se) {
|
||||
if (se.previousSibling.value != '') {
|
||||
addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
|
||||
selectByValue(document.forms[0], se.id, se.previousSibling.value);
|
||||
} else
|
||||
selectByValue(document.forms[0], se.id, '');
|
||||
|
||||
se.style.display = 'inline';
|
||||
se.parentNode.removeChild(se.previousSibling);
|
||||
TinyMCE_EditableSelects.editSelectElm = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,33 +1,23 @@
|
||||
/**
|
||||
* $Id: form_utils.js 162 2007-01-03 16:16:52Z spocke $
|
||||
* $Id: form_utils.js 520 2008-01-07 16:30:32Z spocke $
|
||||
*
|
||||
* Various form utilitiy functions.
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
var themeBaseURL = tinyMCE.baseURL + '/themes/' + tinyMCE.getParam("theme");
|
||||
var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
|
||||
|
||||
function getColorPickerHTML(id, target_form_element) {
|
||||
var h = "";
|
||||
|
||||
h += '<a id="' + id + '_link" href="javascript:void(0);" onkeydown="pickColor(event,\'' + target_form_element +'\');" onmousedown="pickColor(event,\'' + target_form_element +'\');return false;">';
|
||||
h += '<img id="' + id + '" src="' + themeBaseURL + '/images/color.gif"';
|
||||
h += ' onmouseover="this.className=\'mceButtonOver\'"';
|
||||
h += ' onmouseout="this.className=\'mceButtonNormal\'"';
|
||||
h += ' onmousedown="this.className=\'mceButtonDown\'"';
|
||||
h += ' width="20" height="16" border="0" title="' + tinyMCE.getLang('lang_browse') + '"';
|
||||
h += ' class="mceButtonNormal" alt="' + tinyMCE.getLang('lang_browse') + '" /></a>';
|
||||
h += '<a id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
|
||||
h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"></span></a>';
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
function pickColor(e, target_form_element) {
|
||||
if ((e.keyCode == 32 || e.keyCode == 13) || e.type == "mousedown")
|
||||
tinyMCEPopup.pickColor(e, target_form_element);
|
||||
}
|
||||
|
||||
function updateColor(img_id, form_element_id) {
|
||||
document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
|
||||
}
|
||||
@ -40,34 +30,30 @@ function setBrowserDisabled(id, state) {
|
||||
if (state) {
|
||||
lnk.setAttribute("realhref", lnk.getAttribute("href"));
|
||||
lnk.removeAttribute("href");
|
||||
tinyMCE.switchClass(img, 'mceButtonDisabled', true);
|
||||
tinyMCEPopup.dom.addClass(img, 'disabled');
|
||||
} else {
|
||||
lnk.setAttribute("href", lnk.getAttribute("realhref"));
|
||||
tinyMCE.switchClass(img, 'mceButtonNormal', false);
|
||||
tinyMCEPopup.dom.removeClass(img, 'disabled');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getBrowserHTML(id, target_form_element, type, prefix) {
|
||||
var option = prefix + "_" + type + "_browser_callback";
|
||||
var cb = tinyMCE.getParam(option, tinyMCE.getParam("file_browser_callback"));
|
||||
if (cb == null)
|
||||
var option = prefix + "_" + type + "_browser_callback", cb, html;
|
||||
|
||||
cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
|
||||
|
||||
if (!cb)
|
||||
return "";
|
||||
|
||||
var html = "";
|
||||
|
||||
html += '<a id="' + id + '_link" href="javascript:openBrower(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;">';
|
||||
html += '<img id="' + id + '" src="' + themeBaseURL + '/images/browse.gif"';
|
||||
html += ' onmouseover="this.className=\'mceButtonOver\';"';
|
||||
html += ' onmouseout="this.className=\'mceButtonNormal\';"';
|
||||
html += ' onmousedown="this.className=\'mceButtonDown\';"';
|
||||
html += ' width="20" height="18" border="0" title="' + tinyMCE.getLang('lang_browse') + '"';
|
||||
html += ' class="mceButtonNormal" alt="' + tinyMCE.getLang('lang_browse') + '" /></a>';
|
||||
html = "";
|
||||
html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
|
||||
html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"></span></a>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function openBrower(img_id, target_form_element, type, option) {
|
||||
function openBrowser(img_id, target_form_element, type, option) {
|
||||
var img = document.getElementById(img_id);
|
||||
|
||||
if (img.className != "mceButtonDisabled")
|
||||
@ -119,8 +105,8 @@ function addSelectValue(form_obj, field_name, name, value) {
|
||||
function addClassesToList(list_id, specific_option) {
|
||||
// Setup class droplist
|
||||
var styleSelectElm = document.getElementById(list_id);
|
||||
var styles = tinyMCE.getParam('theme_advanced_styles', false);
|
||||
styles = tinyMCE.getParam(specific_option, styles);
|
||||
var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
|
||||
styles = tinyMCEPopup.getParam(specific_option, styles);
|
||||
|
||||
if (styles) {
|
||||
var stylesAr = styles.split(';');
|
||||
@ -136,10 +122,9 @@ function addClassesToList(list_id, specific_option) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Use auto impored classes
|
||||
var csses = tinyMCE.getCSSClasses(tinyMCE.getWindowArg('editor_id'));
|
||||
for (var i=0; i<csses.length; i++)
|
||||
styleSelectElm.options[styleSelectElm.length] = new Option(csses[i], csses[i]);
|
||||
tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
|
||||
styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,7 +181,7 @@ function getCSSSize(size) {
|
||||
}
|
||||
|
||||
function getStyle(elm, attrib, style) {
|
||||
var val = tinyMCE.getAttrib(elm, attrib);
|
||||
var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
|
||||
|
||||
if (val != '')
|
||||
return '' + val;
|
||||
@ -204,7 +189,5 @@ function getStyle(elm, attrib, style) {
|
||||
if (typeof(style) == 'undefined')
|
||||
style = attrib;
|
||||
|
||||
val = eval('elm.style.' + style);
|
||||
|
||||
return val == null ? '' : '' + val;
|
||||
return tinyMCEPopup.dom.getStyle(elm, style);
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
/**
|
||||
* $Id: mclayer.js 162 2007-01-03 16:16:52Z spocke $
|
||||
* $Id: mclayer.js 520 2008-01-07 16:30:32Z spocke $
|
||||
*
|
||||
* Moxiecode floating layer script.
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function MCLayer(id) {
|
||||
|
@ -1,10 +1,10 @@
|
||||
/**
|
||||
* $Id: mctabs.js 162 2007-01-03 16:16:52Z spocke $
|
||||
* $Id: mctabs.js 520 2008-01-07 16:30:32Z spocke $
|
||||
*
|
||||
* Moxiecode DHTML Tabs script.
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function MCTabs() {
|
||||
|
@ -1,10 +1,10 @@
|
||||
/**
|
||||
* $Id: validate.js 162 2007-01-03 16:16:52Z spocke $
|
||||
* $Id: validate.js 520 2008-01-07 16:30:32Z spocke $
|
||||
*
|
||||
* Various form validation methods.
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
|