Updating to latest TinyMCE

git-svn-id: http://svn.automattic.com/wordpress/trunk@2916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-09-26 06:52:30 +00:00
parent 808b0f36ce
commit 5034e50bb4
206 changed files with 4020 additions and 2571 deletions

View File

@ -1,8 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>blank_page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>blank_page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body class="mceContentBody">

View File

@ -0,0 +1,2 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('autosave','en,sv,cs');function TinyMCE_autosave_getInfo(){return{longname:'Auto save',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_autosave_beforeUnloadHandler(){var msg=tinyMCE.getLang("lang_autosave_unload_msg");var anyDirty=false;for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(inst.isDirty())return msg;}return;}window.onbeforeunload=TinyMCE_autosave_beforeUnloadHandler;

View File

@ -0,0 +1,28 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('autosave', 'en,sv,cs');
function TinyMCE_autosave_getInfo() {
return {
longname : 'Auto save',
author : 'Moxiecode Systems',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
};
};
function TinyMCE_autosave_beforeUnloadHandler() {
var msg = tinyMCE.getLang("lang_autosave_unload_msg");
var anyDirty = false;
for (var n in tinyMCE.instances) {
var inst = tinyMCE.instances[n];
if (inst.isDirty())
return msg;
}
return;
}
window.onbeforeunload = TinyMCE_autosave_beforeUnloadHandler;

View File

@ -0,0 +1,11 @@
/**
* Czech lang variables
* encoding: utf-8
*
* $Id$
*/
tinyMCE.addToLang('',{
autosave_unload_msg : 'Změny, které jste udělal(a) budou ztraceny, jestliže opustíte tuto stránku.'
});

View File

@ -0,0 +1,5 @@
// EN lang variables
tinyMCE.addToLang('',{
autosave_unload_msg : 'The changes you made will be lost if you navigate away from this page.'
});

View File

@ -0,0 +1,6 @@
// SE lang variables
tinyMCE.addToLang('',{
autosave_unload_msg : 'F&ouml;r&auml;ndringarna du gjorde kommer att g&aring; f&ouml;rlorade om du v&auml;ljer att l&auml;mna denna sida.'
});

View File

@ -1,60 +0,0 @@
.contextMenuIEPopup {
padding: 0px;
margin: 0px;
border: 0px;
overflow: hidden;
}
.contextMenu {
position: absolute;
cursor: default;
z-index: 1000;
border: 1px solid #D4D0C8;
background-color: #FFFFFF;
}
.contextMenuItem, .contextMenuItemOver {
}
.contextMenuItemOver {
background-color: #B6BDD2;
}
.contextMenuSeparator {
width: 100%;
background-color: #D4D0C8;
border: 0px;
}
.contextMenuImage, .contextMenuItemDisabled {
border: 0px;
}
.contextMenuIcon {
background-color: #F0F0EE;
}
.contextMenuItemOver .contextMenuIcon {
background-color: #B6BDD2;
}
.contextMenuIcon {
background-color: #F0F0EE;
}
.contextMenuItemDisabled img {
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
-moz-opacity:0.3;
opacity: 0.3;
}
.contextMenuText {
font-family: Tahoma, Verdana, Arial, Helvetica;
font-size: 11px;
margin-left: 5px;
margin-right: 10px;
}
.contextMenuItemDisabled {
color: #AAAAAA;
}

File diff suppressed because one or more lines are too long

View File

@ -1,292 +0,0 @@
/* Import plugin specific language pack */
//tinyMCE.importPluginLanguagePack('contextmenu', 'en,zh_cn,cs,fa,fr_ca,fr,de');
if (!tinyMCE.settings['contextmenu_skip_plugin_css'])
tinyMCE.loadCSS(tinyMCE.baseURL + "/plugins/contextmenu/contextmenu.css");
// Global contextmenu class instance
var TinyMCE_contextmenu_contextMenu = null;
function TinyMCE_contextmenu_initInstance(inst) {
// Is not working on MSIE 5.0
if (tinyMCE.isMSIE5_0)
return;
// Add hide event handles
tinyMCE.addEvent(inst.getDoc(), "click", TinyMCE_contextmenu_hideContextMenu);
tinyMCE.addEvent(inst.getDoc(), "keypress", TinyMCE_contextmenu_hideContextMenu);
tinyMCE.addEvent(inst.getDoc(), "keydown", TinyMCE_contextmenu_hideContextMenu);
tinyMCE.addEvent(document, "click", TinyMCE_contextmenu_hideContextMenu);
tinyMCE.addEvent(document, "keypress", TinyMCE_contextmenu_hideContextMenu);
tinyMCE.addEvent(document, "keydown", TinyMCE_contextmenu_hideContextMenu);
var contextMenu = new ContextMenu({
commandhandler : "TinyMCE_contextmenu_commandHandler",
spacer_image : tinyMCE.baseURL + "/plugins/contextmenu/images/spacer.gif"
});
// Register global reference
TinyMCE_contextmenu_contextMenu = contextMenu;
// Attach contextmenu event
if (tinyMCE.isGecko) {
tinyMCE.addEvent(inst.getDoc(), "contextmenu", function(e) {TinyMCE_contextmenu_showContextMenu(tinyMCE.isMSIE ? inst.contentWindow.event : e, inst);});
} else
tinyMCE.addEvent(inst.getDoc(), "contextmenu", TinyMCE_contextmenu_onContextMenu);
}
function TinyMCE_contextmenu_onContextMenu(e) {
var elm = tinyMCE.isMSIE ? e.srcElement : e.target;
var targetInst, body;
// Find instance
if ((body = tinyMCE.getParentElement(elm, "body")) != null) {
for (var n in tinyMCE.instances) {
var inst = tinyMCE.instances[n];
if (body == inst.getBody()) {
targetInst = inst;
break;
}
}
return TinyMCE_contextmenu_showContextMenu(tinyMCE.isMSIE ? targetInst.contentWindow.event : e, targetInst);
}
}
function TinyMCE_contextmenu_showContextMenu(e, inst) {
function getAttrib(elm, name) {
return elm.getAttribute(name) ? elm.getAttribute(name) : "";
}
var x, y, elm, contextMenu;
var pos = tinyMCE.getAbsPosition(inst.iframeElement);
x = tinyMCE.isMSIE ? e.screenX : pos.absLeft + (e.pageX - inst.getBody().scrollLeft);
y = tinyMCE.isMSIE ? e.screenY : pos.absTop + (e.pageY - inst.getBody().scrollTop);
elm = tinyMCE.isMSIE ? e.srcElement : e.target;
contextMenu = TinyMCE_contextmenu_contextMenu;
contextMenu.inst = inst;
// Mozilla needs some time
window.setTimeout(function () {
var theme = tinyMCE.getParam("theme");
contextMenu.clearAll();
var sel = inst.getSelectedText().length != 0 || elm.nodeName == "IMG";
// Default items
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_cut_desc", "Cut", "", !sel);
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_copy_desc", "Copy", "", !sel);
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_paste_desc", "Paste", "", false);
// Get element
elm = tinyMCE.getParentElement(elm, "img,table,td");
if (elm) {
switch (elm.nodeName) {
case "IMG":
contextMenu.addSeparator();
// If flash
if (tinyMCE.getAttrib(elm, 'name', '').indexOf('mce_plugin_flash') == 0)
contextMenu.addItem(tinyMCE.baseURL + "/plugins/flash/images/flash.gif", "$lang_flash_props", "mceFlash");
else
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/image.gif", "$lang_image_props_desc", "mceImage");
break;
case "TABLE":
case "TD":
// Is table plugin loaded
if (typeof(TinyMCE_table_getControlHTML) != "undefined") {
var colspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "colspan");
var rowspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "rowspan");
colspan = colspan == "" ? "1" : colspan;
rowspan = rowspan == "" ? "1" : rowspan;
contextMenu.addSeparator();
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_table_cut_row_desc", "mceTableCutRow");
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_table_copy_row_desc", "mceTableCopyRow");
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_before_desc", "mceTablePasteRowBefore", "", inst.tableRowClipboard == null);
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_after_desc", "mceTablePasteRowAfter", "", inst.tableRowClipboard == null);
/* contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/left.gif", "$lang_justifyleft_desc", "JustifyLeft", "", false);
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/center.gif", "$lang_justifycenter_desc", "JustifyCenter", "", false);
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/right.gif", "$lang_justifyright_desc", "JustifyRight", "", false);
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/full.gif", "$lang_justifyfull_desc", "JustifyFull", "", false);*/
contextMenu.addSeparator();
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_insert_desc", "mceInsertTable", "insert");
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_props_desc", "mceInsertTable");
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_cell_props.gif", "$lang_table_cell_desc", "mceTableCellProps");
contextMenu.addSeparator();
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_row_props.gif", "$lang_table_row_desc", "mceTableRowProps");
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_before.gif", "$lang_table_insert_row_before_desc", "mceTableInsertRowBefore");
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_after.gif", "$lang_table_insert_row_after_desc", "mceTableInsertRowAfter");
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_row.gif", "$lang_table_delete_row_desc", "mceTableDeleteRow");
contextMenu.addSeparator();
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_before.gif", "$lang_table_insert_col_before_desc", "mceTableInsertColBefore");
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_after.gif", "$lang_table_insert_col_after_desc", "mceTableInsertColAfter");
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_col.gif", "$lang_table_delete_col_desc", "mceTableDeleteCol");
contextMenu.addSeparator();
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_split_cells.gif", "$lang_table_split_cells_desc", "mceTableSplitCells", "", (colspan == "1" && rowspan == "1"));
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_merge_cells.gif", "$lang_table_merge_cells_desc", "mceTableMergeCells", "", false);
}
break;
}
}
contextMenu.show(x, y);
}, 10);
// Cancel default handeling
tinyMCE.cancelEvent(e);
return false;
}
function TinyMCE_contextmenu_hideContextMenu() {
TinyMCE_contextmenu_contextMenu.hide();
return true;
}
function TinyMCE_contextmenu_commandHandler(command, value) {
TinyMCE_contextmenu_contextMenu.hide();
// UI must be true on these
var ui = false;
if (command == "mceInsertTable" || command == "mceTableCellProps" || command == "mceTableRowProps" || command == "mceTableMergeCells")
ui = true;
if (command == "Paste")
value = null;
TinyMCE_contextmenu_contextMenu.inst.execCommand(command, ui, value);
}
// Context menu class
function ContextMenu(settings) {
// Default value function
function defParam(key, def_val) {
settings[key] = typeof(settings[key]) != "undefined" ? settings[key] : def_val;
}
var self = this;
this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
// Setup contextmenu div
this.contextMenuDiv = document.createElement("div");
this.contextMenuDiv.className = "contextMenu";
this.contextMenuDiv.setAttribute("class", "contextMenu");
this.contextMenuDiv.style.display = "none";
this.contextMenuDiv.style.position = 'absolute';
this.contextMenuDiv.style.zindex = 1000;
this.contextMenuDiv.style.left = '0px';
this.contextMenuDiv.style.top = '0px';
this.contextMenuDiv.unselectable = "on";
document.body.appendChild(this.contextMenuDiv);
// Setup default values
defParam("commandhandler", "");
defParam("spacer_image", "images/spacer.gif");
this.items = new Array();
this.settings = settings;
this.html = "";
// IE Popup
if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0) {
this.pop = window.createPopup();
doc = this.pop.document;
doc.open();
doc.write('<html><head><link href="' + tinyMCE.baseURL + '/plugins/contextmenu/contextmenu.css" rel="stylesheet" type="text/css" /></head><body unselectable="yes" class="contextMenuIEPopup"></body></html>');
doc.close();
}
};
ContextMenu.prototype.clearAll = function() {
this.html = "";
this.contextMenuDiv.innerHTML = "";
};
ContextMenu.prototype.addSeparator = function() {
this.html += '<tr class="contextMenuItem"><td class="contextMenuIcon"><img src="' + this.settings['spacer_image'] + '" width="20" height="1" class="contextMenuImage" /></td><td><img class="contextMenuSeparator" width="1" height="1" src="' + this.settings['spacer_image'] + '" /></td></tr>';
};
ContextMenu.prototype.addItem = function(icon, title, command, value, disabled) {
if (title.charAt(0) == '$')
title = tinyMCE.getLang(title.substring(1));
var onMouseDown = '';
var html = '';
if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0)
onMouseDown = 'contextMenu.execCommand(\'' + command + '\', \'' + value + '\');return false;';
else
onMouseDown = this.settings['commandhandler'] + '(\'' + command + '\', \'' + value + '\');return false;';
if (icon == "")
icon = this.settings['spacer_image'];
if (!disabled)
html += '<tr class="contextMenuItem" onmousedown="' + onMouseDown + '" onmouseover="tinyMCE.switchClass(this,\'contextMenuItemOver\');" onmouseout="tinyMCE.switchClass(this,\'contextMenuItem\');">';
else
html += '<tr class="contextMenuItemDisabled">';
html += '<td class="contextMenuIcon"><img src="' + icon + '" width="20" height="20" class="contextMenuImage" /></td>';
html += '<td><div class="contextMenuText">';
// Add text
html += title;
html += '</div></td>';
html += '</tr>';
// Add to main
this.html += html;
};
ContextMenu.prototype.show = function(x, y) {
if (this.html == "")
return;
var html = '';
html += '<table border="0" cellpadding="0" cellspacing="0">';
html += this.html;
html += '</table>';
this.contextMenuDiv.innerHTML = html;
if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0) {
var width, height;
// Get dimensions
this.contextMenuDiv.style.display = "block";
width = this.contextMenuDiv.offsetWidth;
height = this.contextMenuDiv.offsetHeight;
this.contextMenuDiv.style.display = "none";
// Setup popup and show
this.pop.document.body.innerHTML = '<div class="contextMenu">' + html + "</div>";
this.pop.document.tinyMCE = tinyMCE;
this.pop.document.contextMenu = this;
this.pop.show(x, y, width, height);
} else {
this.contextMenuDiv.style.left = x + 'px';
this.contextMenuDiv.style.top = y + 'px';
this.contextMenuDiv.style.display = "block";
}
};
ContextMenu.prototype.hide = function() {
if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0)
this.pop.hide();
else
this.contextMenuDiv.style.display = "none";
};
ContextMenu.prototype.execCommand = function(command, value) {
eval(this.settings['commandhandler'] + "(command, value);");
};

View File

@ -1,2 +0,0 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('emotions','en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl');function TinyMCE_emotions_getControlHTML(control_name){switch(control_name){case "emotions":return '<img id="{$editor_id}_emotions" src="{$pluginurl}/images/emotions.gif" title="{$lang_emotions_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceEmotion\');">';}return "";}function TinyMCE_emotions_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceEmotion":var template=new Array();template['file']='../../plugins/emotions/emotions.htm';template['width']=150;template['height']=180;tinyMCE.openWindow(template,{editor_id:editor_id});return true;}return false;}

View File

@ -1,36 +0,0 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('emotions', 'en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl');
/**
* Returns the HTML contents of the emotions control.
*/
function TinyMCE_emotions_getControlHTML(control_name) {
switch (control_name) {
case "emotions":
return '<img id="{$editor_id}_emotions" src="{$pluginurl}/images/emotions.gif" title="{$lang_emotions_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceEmotion\');">';
}
return "";
}
/**
* Executes the mceEmotion command.
*/
function TinyMCE_emotions_execCommand(editor_id, element, command, user_interface, value) {
// Handle commands
switch (command) {
case "mceEmotion":
var template = new Array();
template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme
template['width'] = 150;
template['height'] = 180;
tinyMCE.openWindow(template, {editor_id : editor_id});
return true;
}
// Pass to next handler in chain
return false;
}

View File

@ -1,45 +0,0 @@
<html>
<head>
<title>{$lang_insert_emotions_title}</title>
<script language="javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript">
function insertEmotion(file_name) {
if (window.opener) {
tinyMCE.insertImage(tinyMCE.baseURL + "/plugins/emotions/images/" + file_name);
window.close();
}
}
</script>
</head>
<body onload="">
<div align="center">
<div class="title">{$lang_insert_emotions_title}:<br /><br /></div>
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-cool.gif');"><img src="images/smiley-cool.gif" width="18" height="18" border="0" /></a></td>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-cry.gif');"><img src="images/smiley-cry.gif" width="18" height="18" border="0" /></a></td>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-embarassed.gif');"><img src="images/smiley-embarassed.gif" width="18" height="18" border="0" /></a></td>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-foot-in-mouth.gif');"><img src="images/smiley-foot-in-mouth.gif" width="18" height="18" border="0" /></a></td>
</tr>
<tr>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-frown.gif');"><img src="images/smiley-frown.gif" width="18" height="18" border="0" /></a></td>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-innocent.gif');"><img src="images/smiley-innocent.gif" width="18" height="18" border="0" /></a></td>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-kiss.gif');"><img src="images/smiley-kiss.gif" width="18" height="18" border="0" /></a></td>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-laughing.gif');"><img src="images/smiley-laughing.gif" width="18" height="18" border="0" /></a></td>
</tr>
<tr>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-money-mouth.gif');"><img src="images/smiley-money-mouth.gif" width="18" height="18" border="0" /></a></td>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-sealed.gif');"><img src="images/smiley-sealed.gif" width="18" height="18" border="0" /></a></td>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-smile.gif');"><img src="images/smiley-smile.gif" width="18" height="18" border="0" /></a></td>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-surprised.gif');"><img src="images/smiley-surprised.gif" width="18" height="18" border="0" /></a></td>
</tr>
<tr>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-tongue-out.gif');"><img src="images/smiley-tongue-out.gif" width="18" height="18" border="0" /></a></td>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-undecided.gif');"><img src="images/smiley-undecided.gif" width="18" height="18" border="0" /></a></td>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-wink.gif');"><img src="images/smiley-wink.gif" width="18" height="18" border="0" /></a></td>
<td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-yell.gif');"><img src="images/smiley-yell.gif" width="18" height="18" border="0" /></a></td>
</tr>
</table>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,2 +0,0 @@
These emotions where taken from Mozilla Thunderbird.
I hope they don't get angry if I use them here after all this is a open source project aswell.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,4 +0,0 @@
// UK lang variables
tinyMCELang['lang_insert_emotions_title'] = 'Vložit emotikon';
tinyMCELang['lang_emotions_desc'] = 'Emotikony';

View File

@ -1,6 +0,0 @@
// DE lang variables
tinyMCELang['lang_insert_emotions_title'] = 'Emotion einf&uuml;gen';
tinyMCELang['lang_emotions_desc'] = 'Emotion';

View File

@ -1,5 +0,0 @@
// Greek lang variables by Jacaranda Bill
tinyMCELang['lang_insert_emotions_title'] = 'ÅéóáãùãÞ åíüò åéêïíéäßïõ emoticon';
tinyMCELang['lang_emotions_desc'] = 'Åéêïíßäéá emoticons';

View File

@ -1,5 +0,0 @@
// UK lang variables
tinyMCELang['lang_insert_emotions_title'] = 'Insert emotion';
tinyMCELang['lang_emotions_desc'] = 'Emotions';

View File

@ -1,10 +0,0 @@
// IR lang variables
// Persian (Farsi) language pack (for IRAN)
// By: Morteza Zafari
// Lost@LostLord.com
// http://www.LostLord.com
tinyMCELang['lang_dir'] = 'rtl';
tinyMCELang['lang_insert_emotions_title'] = 'افزودن شکلک';
tinyMCELang['lang_emotions_desc'] = 'شکلکها';

View File

@ -1,5 +0,0 @@
// French lang variables by Laurent Dran
tinyMCELang['lang_insert_emotions_title'] = 'Ins&egrave;rer un &eacute;moticon';
tinyMCELang['lang_emotions_desc'] = '&Eacute;moticons';

View File

@ -1,5 +0,0 @@
// Canadian French lang variables by Virtuelcom last modification: 2005-06-15
tinyMCELang['lang_insert_emotions_title'] = 'Insérer un émoticon';
tinyMCELang['lang_emotions_desc'] = 'Émoticons';

View File

@ -1,5 +0,0 @@
//IT lang variables
tinyMCELang['lang_insert_emotions_title'] = 'Inserisci una emoticon';
tinyMCELang['lang_emotions_desc'] = 'Emoticon';

View File

@ -1,5 +0,0 @@
// KO lang variables
tinyMCELang['lang_insert_emotions_title'] = '이모티콘 넣기';
tinyMCELang['lang_emotions_desc'] = '이모티콘';

View File

@ -1,4 +0,0 @@
// NL lang variables
tinyMCELang['lang_insert_emotions_title'] = 'Emotion invoegen';
tinyMCELang['lang_emotions_desc'] = 'Smilie';

View File

@ -1,4 +0,0 @@
// PL lang variables
tinyMCELang['lang_insert_emotions_title'] = 'Wstaw emtoiconę';
tinyMCELang['lang_emotions_desc'] = 'Emtoicony';

View File

@ -1,5 +0,0 @@
// pt_BR lang variables
tinyMCELang['lang_insert_emotions_title'] = 'Inserir Emoticon';
tinyMCELang['lang_emotions_desc'] = 'Emoticons';

View File

@ -1,4 +0,0 @@
// SE lang variables
tinyMCELang['lang_insert_emotions_title'] = 'Klistra in känsla';
tinyMCELang['lang_emotions_desc'] = 'Känslor';

View File

@ -1,6 +0,0 @@
// Simplified Chinese lang variables contributed by cube316 (cube316@gmail.com)
//请访问 http://www.cube316.net/ 以获取TinyMCE的中文支持
tinyMCELang['lang_insert_emotions_title'] = '插入表情';
tinyMCELang['lang_emotions_desc'] = '表情';

View File

@ -1 +0,0 @@
Check the TinyMCE documentation for details on this plugin.

View File

@ -1,2 +0,0 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('iespell','cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl');function TinyMCE_iespell_getControlHTML(control_name){if(control_name=="iespell"&&tinyMCE.isMSIE)return '<img id="{$editor_id}_iespell" src="{$pluginurl}/images/iespell.gif" title="{$lang_iespell_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceIESpell\');">';return "";}function TinyMCE_iespell_execCommand(editor_id,element,command,user_interface,value){if(command=="mceIESpell"){try{var ieSpell=new ActiveXObject("ieSpell.ieSpellExtension");ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);}catch(e){if(e.number==-2146827859){if(confirm(tinyMCE.getLang("lang_iespell_download","",true)))window.open('http://www.iespell.com/download.php','ieSpellDownload','');}else alert("Error Loading ieSpell: Exception "+e.number);}return true;}return false;}

View File

@ -1,37 +0,0 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('iespell', 'cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl');
/**
* Returns the HTML contents of the iespell control.
*/
function TinyMCE_iespell_getControlHTML(control_name) {
// Is it the iespell control and is the brower MSIE.
if (control_name == "iespell" && tinyMCE.isMSIE)
return '<img id="{$editor_id}_iespell" src="{$pluginurl}/images/iespell.gif" title="{$lang_iespell_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceIESpell\');">';
return "";
}
/**
* Executes the mceIESpell command.
*/
function TinyMCE_iespell_execCommand(editor_id, element, command, user_interface, value) {
// Handle ieSpellCommand
if (command == "mceIESpell") {
try {
var ieSpell = new ActiveXObject("ieSpell.ieSpellExtension");
ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);
} catch (e) {
if (e.number == -2146827859) {
if (confirm(tinyMCE.getLang("lang_iespell_download", "", true)))
window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
} else
alert("Error Loading ieSpell: Exception " + e.number);
}
return true;
}
// Pass to next handler in chain
return false;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

View File

@ -1,4 +0,0 @@
// UK lang variables
tinyMCELang['lang_iespell_desc'] = 'Spustit kontrolu pravopisu';
tinyMCELang['lang_iespell_download'] = "ieSpell nedetekován. Kliknìte na OK a otevøete stahovací stránku."

View File

@ -1,4 +0,0 @@
// DE lang variables by Tobias Heer
tinyMCELang['lang_iespell_desc'] = 'Rechtschreibpr&uuml;fung';
tinyMCELang['lang_iespell_download'] = "ieSpell nicht gefunden. Klicken Sie OK um auf die Download Seite zu gelangen."

View File

@ -1,4 +0,0 @@
// Greek lang variables by Jacaranda Bill
tinyMCELang['lang_iespell_desc'] = 'Ορθογραφικός έλεγχος';
tinyMCELang['lang_iespell_download'] = "Το πρόγραμμα ieSpell δεν βρέθηκε. Πατήστε OK για να μεταβείτε στην ιστοσελίδα λήψης του προγράμματος."

View File

@ -1,4 +0,0 @@
// UK lang variables
tinyMCELang['lang_iespell_desc'] = 'Run spell checking';
tinyMCELang['lang_iespell_download'] = "ieSpell not detected. Click OK to go to download page."

View File

@ -1,4 +0,0 @@
// French lang variables by Laurent Dran
tinyMCELang['lang_iespell_desc'] = 'Executer le v&eacute;rificateur d\'orthographe';
tinyMCELang['lang_iespell_download'] = "ieSpell n\'a pas &eacute;t&eacute; trouv&eacute;. Cliquez sur OK pour aller au site de t&eacute;l&eacute;chargement."

View File

@ -1,4 +0,0 @@
// Canadian French lang variables by Virtuelcom last modification: 2005-06-15
tinyMCELang['lang_iespell_desc'] = 'Executer le vérificateur d\'orthographe';
tinyMCELang['lang_iespell_download'] = "ieSpell n\'a pas été trouvé. Cliquez sur OK pour aller au site de téléchargement.";

View File

@ -1,4 +0,0 @@
// IT lang variables
tinyMCELang['lang_iespell_desc'] = 'Avvia il controllo ortografico';
tinyMCELang['lang_iespell_download'] = "ieSpell non trovato. Clicca OK per andare alla pagina di download."

View File

@ -1,4 +0,0 @@
// KO lang variables
tinyMCELang['lang_iespell_desc'] = '맞춤법 검사 실행';
tinyMCELang['lang_iespell_download'] = "ieSpell을 찾을 수 없습니다. OK를 누르면 다운로드 페이지로 이동합니다."

View File

@ -1,4 +0,0 @@
// NL lang variables
tinyMCELang['lang_iespell_desc'] = 'Spelling checker';
tinyMCELang['lang_iespell_download'] = "ieSpell niet gedetecteerd. Klik OK om naar de download pagina te gaan."

View File

@ -1,4 +0,0 @@
// PL lang variables
tinyMCELang['lang_iespell_desc'] = 'Uruchom sprawdzanie pisowni';
tinyMCELang['lang_iespell_download'] = "Nie wykryto pluginu, kliknij aby przejść do strony z pluginami."

View File

@ -1,4 +0,0 @@
// pt_BR lang variables
tinyMCELang['lang_iespell_desc'] = 'Executar verificação ortográfica';
tinyMCELang['lang_iespell_download'] = "Verificador ieSpell não detectado. Click OK para ir à página de download."

View File

@ -1,4 +0,0 @@
// SE lang variables
tinyMCELang['lang_iespell_desc'] = 'Kör rättstavningskontroll';
tinyMCELang['lang_iespell_download'] = "ieSpell verkar inte vara installerad. Klicka OK f&ouml;r att ladda hem."

View File

@ -1,5 +0,0 @@
// Simplified Chinese lang variables contributed by cube316 (cube316@gmail.com)
//请访问 http://www.cube316.net/ 以获取TinyMCE的中文支持
tinyMCELang['lang_iespell_desc'] = '运行拼写检查';
tinyMCELang['lang_iespell_download'] = "未检测到ieSpell拼写检查点击 OK 前往下载页面。"

View File

@ -1 +0,0 @@
Check the TinyMCE documentation for details on this plugin.

View File

@ -0,0 +1,69 @@
/* Window classes */
.mceWindow {
position: absolute;
left: 0px;
top: 0px;
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;
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,643 @@
/**
* $RCSfile: editor_plugin_src.js,v $
* $Revision: 1.2 $
* $Date: 2005/08/23 20:28:34 $
*
* Moxiecode DHTML Windows script.
*
* @author Moxiecode
* @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved.
*/
// Patch openWindow, closeWindow TinyMCE functions
function TinyMCE_inlinepopups_getInfo() {
return {
longname : 'Inline Popups',
author : 'Moxiecode Systems',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html',
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
};
};
TinyMCE.prototype.orgOpenWindow = TinyMCE.prototype.openWindow;
TinyMCE.prototype.openWindow = function(template, args) {
// Does the caller support inline
if (args['inline'] != "yes") {
mcWindows.selectedWindow = null;
args['mce_inside_iframe'] = false;
this.orgOpenWindow(template, args);
return;
}
var url, resizable, scrollbars;
args['mce_inside_iframe'] = true;
tinyMCE.windowArgs = args;
if (template['file'].charAt(0) != '/' && template['file'].indexOf('://') == -1)
url = tinyMCE.baseURL + "/themes/" + tinyMCE.getParam("theme") + "/" + template['file'];
else
url = template['file'];
if (!(width = parseInt(template['width'])))
width = 320;
if (!(height = parseInt(template['height'])))
height = 200;
resizable = (args && args['resizable']) ? args['resizable'] : "no";
scrollbars = (args && args['scrollbars']) ? args['scrollbars'] : "no";
height += 18;
// Replace all args as variables in URL
for (var name in args)
url = tinyMCE.replaceVar(url, name, escape(args[name]));
var elm = document.getElementById(this.selectedInstance.editorId + '_parent');
var pos = tinyMCE.getAbsPosition(elm);
// Center div in editor area
pos.absLeft += Math.round((elm.firstChild.clientWidth / 2) - (width / 2));
pos.absTop += Math.round((elm.firstChild.clientHeight / 2) - (height / 2));
mcWindows.open(url, mcWindows.idCounter++, "modal=yes,width=" + width+ ",height=" + height + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",statusbar=" + resizable + ",left=" + pos.absLeft + ",top=" + pos.absTop);
};
TinyMCE.prototype.orgCloseWindow = TinyMCE.prototype.closeWindow;
TinyMCE.prototype.closeWindow = function(win) {
if (mcWindows.selectedWindow != null)
mcWindows.selectedWindow.close();
else
this.orgCloseWindow(win);
};
TinyMCE.prototype.setWindowTitle = function(win_ref, title) {
for (var n in mcWindows.windows) {
var win = mcWindows.windows[n];
if (win_ref.name == win.id + "_iframe")
window.frames[win.id + "_iframe"].document.getElementById(win.id + '_title').innerHTML = title;
}
};
// * * * * * MCWindows classes below
// Windows handler
function MCWindows() {
this.settings = new Array();
this.windows = new Array();
this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
this.isGecko = navigator.userAgent.indexOf('Gecko') != -1;
this.isSafari = navigator.userAgent.indexOf('Safari') != -1;
this.isMac = navigator.userAgent.indexOf('Mac') != -1;
this.isMSIE5_0 = this.isMSIE && (navigator.userAgent.indexOf('MSIE 5.0') != -1);
this.action = "none";
this.selectedWindow = null;
this.lastSelectedWindow = null;
this.zindex = 100;
this.mouseDownScreenX = 0;
this.mouseDownScreenY = 0;
this.mouseDownLayerX = 0;
this.mouseDownLayerY = 0;
this.mouseDownWidth = 0;
this.mouseDownHeight = 0;
this.idCounter = 0;
};
MCWindows.prototype.init = function(settings) {
this.settings = settings;
if (this.isMSIE)
this.addEvent(document, "mousemove", mcWindows.eventDispatcher);
else
this.addEvent(window, "mousemove", mcWindows.eventDispatcher);
this.addEvent(document, "mouseup", mcWindows.eventDispatcher);
this.doc = document;
};
MCWindows.prototype.getParam = function(name, default_value) {
var value = null;
value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
// Fix bool values
if (value == "true" || value == "false")
return (value == "true");
return value;
};
MCWindows.prototype.eventDispatcher = function(e) {
e = typeof(e) == "undefined" ? window.event : e;
if (mcWindows.selectedWindow == null)
return;
// Switch focus
if (mcWindows.isGecko && e.type == "mousedown") {
var elm = e.currentTarget;
for (var n in mcWindows.windows) {
var win = mcWindows.windows[n];
if (win.headElement == elm || win.resizeElement == elm) {
win.focus();
break;
}
}
}
switch (e.type) {
case "mousemove":
mcWindows.selectedWindow.onMouseMove(e);
break;
case "mouseup":
mcWindows.selectedWindow.onMouseUp(e);
break;
case "mousedown":
mcWindows.selectedWindow.onMouseDown(e);
break;
case "focus":
mcWindows.selectedWindow.onFocus(e);
break;
}
};
MCWindows.prototype.addEvent = function(obj, name, handler) {
if (this.isMSIE)
obj.attachEvent("on" + name, handler);
else
obj.addEventListener(name, handler, true);
};
MCWindows.prototype.cancelEvent = function(e) {
if (this.isMSIE) {
e.returnValue = false;
e.cancelBubble = true;
} else
e.preventDefault();
};
MCWindows.prototype.parseFeatures = function(opts) {
// Cleanup the options
opts = opts.toLowerCase();
opts = opts.replace(/;/g, ",");
opts = opts.replace(/[^0-9a-z=,]/g, "");
var optionChunks = opts.split(',');
var options = new Array();
options['left'] = "10";
options['top'] = "10";
options['width'] = "300";
options['height'] = "300";
options['resizable'] = "yes";
options['minimizable'] = "yes";
options['maximizable'] = "yes";
options['close'] = "yes";
options['movable'] = "yes";
options['statusbar'] = "yes";
options['scrollbars'] = "auto";
options['modal'] = "no";
if (opts == "")
return options;
for (var i=0; i<optionChunks.length; i++) {
var parts = optionChunks[i].split('=');
if (parts.length == 2)
options[parts[0]] = parts[1];
}
options['left'] = parseInt(options['left']);
options['top'] = parseInt(options['top']);
options['width'] = parseInt(options['width']);
options['height'] = parseInt(options['height']);
return options;
};
MCWindows.prototype.open = function(url, name, features) {
this.lastSelectedWindow = this.selectedWindow;
var win = new MCWindow();
var winDiv, html = "", id;
var imgPath = this.getParam("images_path");
features = this.parseFeatures(features);
// Create div
id = "mcWindow_" + name;
win.deltaHeight = 18;
if (features['statusbar'] == "yes") {
win.deltaHeight += 13;
if (this.isMSIE)
win.deltaHeight += 1;
}
width = parseInt(features['width']);
height = parseInt(features['height'])-win.deltaHeight;
if (this.isMSIE)
width -= 2;
// Setup first part of window
win.id = id;
win.url = url;
win.name = name;
win.features = features;
this.windows[name] = win;
iframeWidth = width;
iframeHeight = height;
// Create inner content
html += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
html += '<html>';
html += '<head>';
html += '<title>Wrapper iframe</title>';
html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
html += '<link href="' + this.getParam("css_file") + '" rel="stylesheet" type="text/css" />';
html += '</head>';
html += '<body onload="parent.mcWindows.onLoad(\'' + name + '\');">';
html += '<div id="' + id + '_container" class="mceWindow">';
html += '<div id="' + id + '_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
html += ' <div id="' + id + '_title" class="mceWindowTitle"';
html += ' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;"></div>';
html += ' <div class="mceWindowHeadTools">';
html += ' <a href="javascript:parent.mcWindows.windows[\'' + name + '\'].close();" onmousedown="return false;" class="mceWindowClose"><img border="0" src="' + imgPath + '/window_close.gif" /></a>';
// html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].maximize();" onmousedown="return false;" class="mceWindowMaximize"></a>';
// html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].minimize();" onmousedown="return false;" class="mceWindowMinimize"></a>';
html += ' </div>';
html += '</div><div id="' + id + '_body" class="mceWindowBody" style="width: ' + width + 'px; height: ' + height + 'px;">';
html += '<iframe id="' + id + '_iframe" name="' + id + '_iframe" frameborder="0" width="' + iframeWidth + '" height="' + iframeHeight + '" src="' + url + '" class="mceWindowBodyIframe" scrolling="' + features['scrollbars'] + '"></iframe></div>';
if (features['statusbar'] == "yes") {
html += '<div id="' + id + '_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
if (features['resizable'] == "yes") {
if (this.isGecko)
html += '<div id="' + id + '_resize" class="mceWindowResize"><div style="background-image: url(\'' + imgPath + '/window_resize.gif\'); width: 12px; height: 12px;"></div></div>';
else
html += '<div id="' + id + '_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();" border="0" src="' + imgPath + '/window_resize.gif" /></div>';
}
html += '</div>';
}
html += '</div>';
html += '</body>';
html += '</html>';
// Create iframe
this.createFloatingIFrame(id, features['left'], features['top'], features['width'], features['height'], html);
};
// Blocks the document events by placing a image over the whole document
MCWindows.prototype.setDocumentLock = function(state) {
if (state) {
var elm = document.getElementById('mcWindowEventBlocker');
if (elm == null) {
elm = document.createElement("div");
elm.id = "mcWindowEventBlocker";
elm.style.position = "absolute";
elm.style.left = "0px";
elm.style.top = "0px";
document.body.appendChild(elm);
}
elm.style.display = "none";
var imgPath = this.getParam("images_path");
var width = document.body.clientWidth;
var height = document.body.clientHeight;
elm.style.width = width;
elm.style.height = height;
elm.innerHTML = '<img src="' + imgPath + '/spacer.gif" width="' + width + '" height="' + height + '" />';
elm.style.zIndex = mcWindows.zindex-1;
elm.style.display = "block";
} else {
var elm = document.getElementById('mcWindowEventBlocker');
if (mcWindows.windows.length == 0)
elm.parentNode.removeChild(elm);
else
elm.style.zIndex = mcWindows.zindex-1;
}
};
// Gets called when wrapper iframe is initialized
MCWindows.prototype.onLoad = function(name) {
var win = mcWindows.windows[name];
var id = "mcWindow_" + name;
var wrapperIframe = window.frames[id + "_iframe"].frames[0];
var wrapperDoc = window.frames[id + "_iframe"].document;
var doc = window.frames[id + "_iframe"].document;
var winDiv = document.getElementById("mcWindow_" + name + "_div");
var realIframe = window.frames[id + "_iframe"].frames[0];
// Set window data
win.id = "mcWindow_" + name;
win.winElement = winDiv;
win.bodyElement = doc.getElementById(id + '_body');
win.iframeElement = doc.getElementById(id + '_iframe');
win.headElement = doc.getElementById(id + '_head');
win.titleElement = doc.getElementById(id + '_title');
win.resizeElement = doc.getElementById(id + '_resize');
win.containerElement = doc.getElementById(id + '_container');
win.left = win.features['left'];
win.top = win.features['top'];
win.frame = window.frames[id + '_iframe'].frames[0];
win.wrapperFrame = window.frames[id + '_iframe'];
win.wrapperIFrameElement = document.getElementById(id + "_iframe");
// Add event handlers
mcWindows.addEvent(win.headElement, "mousedown", mcWindows.eventDispatcher);
if (win.resizeElement != null)
mcWindows.addEvent(win.resizeElement, "mousedown", mcWindows.eventDispatcher);
if (mcWindows.isMSIE) {
mcWindows.addEvent(realIframe.document, "mousemove", mcWindows.eventDispatcher);
mcWindows.addEvent(realIframe.document, "mouseup", mcWindows.eventDispatcher);
} else {
mcWindows.addEvent(realIframe, "mousemove", mcWindows.eventDispatcher);
mcWindows.addEvent(realIframe, "mouseup", mcWindows.eventDispatcher);
mcWindows.addEvent(realIframe, "focus", mcWindows.eventDispatcher);
}
for (var i=0; i<window.frames.length; i++) {
if (!window.frames[i]._hasMouseHandlers) {
if (mcWindows.isMSIE) {
mcWindows.addEvent(window.frames[i].document, "mousemove", mcWindows.eventDispatcher);
mcWindows.addEvent(window.frames[i].document, "mouseup", mcWindows.eventDispatcher);
} else {
mcWindows.addEvent(window.frames[i], "mousemove", mcWindows.eventDispatcher);
mcWindows.addEvent(window.frames[i], "mouseup", mcWindows.eventDispatcher);
}
window.frames[i]._hasMouseHandlers = true;
}
}
if (mcWindows.isMSIE) {
mcWindows.addEvent(win.frame.document, "mousemove", mcWindows.eventDispatcher);
mcWindows.addEvent(win.frame.document, "mouseup", mcWindows.eventDispatcher);
} else {
mcWindows.addEvent(win.frame, "mousemove", mcWindows.eventDispatcher);
mcWindows.addEvent(win.frame, "mouseup", mcWindows.eventDispatcher);
mcWindows.addEvent(win.frame, "focus", mcWindows.eventDispatcher);
}
// Dispatch open window event
var func = this.getParam("on_open_window", "");
if (func != "")
eval(func + "(win);");
win.focus();
if (win.features['modal'] == "yes")
mcWindows.setDocumentLock(true);
};
MCWindows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
var iframe = document.createElement("iframe");
var div = document.createElement("div");
width = parseInt(width);
height = parseInt(height)+1;
// Create wrapper div
div.setAttribute("id", id_prefix + "_div");
div.setAttribute("width", width);
div.setAttribute("height", (height));
div.style.position = "absolute";
div.style.left = left + "px";
div.style.top = top + "px";
div.style.width = width + "px";
div.style.height = (height) + "px";
div.style.backgroundColor = "white";
div.style.display = "none";
if (this.isGecko) {
iframeWidth = width + 2;
iframeHeight = height + 2;
} else {
iframeWidth = width;
iframeHeight = height + 1;
}
// Create iframe
iframe.setAttribute("id", id_prefix + "_iframe");
iframe.setAttribute("name", id_prefix + "_iframe");
iframe.setAttribute("border", "0");
iframe.setAttribute("frameBorder", "0");
iframe.setAttribute("marginWidth", "0");
iframe.setAttribute("marginHeight", "0");
iframe.setAttribute("leftMargin", "0");
iframe.setAttribute("topMargin", "0");
iframe.setAttribute("width", iframeWidth);
iframe.setAttribute("height", iframeHeight);
// iframe.setAttribute("src", "../jscripts/tiny_mce/blank.htm");
// iframe.setAttribute("allowtransparency", "false");
iframe.setAttribute("scrolling", "no");
iframe.style.width = iframeWidth + "px";
iframe.style.height = iframeHeight + "px";
iframe.style.backgroundColor = "white";
div.appendChild(iframe);
document.body.appendChild(div);
// Fixed MSIE 5.0 issue
div.innerHTML = div.innerHTML;
if (this.isSafari) {
// Give Safari some time to setup
window.setTimeout(function() {
doc = window.frames[id_prefix + '_iframe'].document;
doc.open();
doc.write(html);
doc.close();
}, 10);
} else {
doc = window.frames[id_prefix + '_iframe'].window.document;
doc.open();
doc.write(html);
doc.close();
}
div.style.display = "block";
return div;
};
// Window instance
function MCWindow() {
};
MCWindow.prototype.focus = function() {
if (this != mcWindows.selectedWindow) {
this.winElement.style.zIndex = ++mcWindows.zindex;
mcWindows.lastSelectedWindow = mcWindows.selectedWindow;
mcWindows.selectedWindow = this;
}
};
MCWindow.prototype.minimize = function() {
};
MCWindow.prototype.maximize = function() {
};
MCWindow.prototype.startResize = function() {
mcWindows.action = "resize";
};
MCWindow.prototype.startMove = function(e) {
mcWindows.action = "move";
};
MCWindow.prototype.close = function() {
if (mcWindows.lastSelectedWindow != null)
mcWindows.lastSelectedWindow.focus();
var mcWindowsNew = new Array();
for (var n in mcWindows.windows) {
var win = mcWindows.windows[n];
if (win.name != this.name)
mcWindowsNew[n] = win;
}
mcWindows.windows = mcWindowsNew;
// alert(mcWindows.doc.getElementById(this.id + "_iframe"));
var e = mcWindows.doc.getElementById(this.id + "_iframe");
e.parentNode.removeChild(e);
var e = mcWindows.doc.getElementById(this.id + "_div");
e.parentNode.removeChild(e);
mcWindows.setDocumentLock(false);
};
MCWindow.prototype.onMouseMove = function(e) {
var scrollX = 0;//this.doc.body.scrollLeft;
var scrollY = 0;//this.doc.body.scrollTop;
// Calculate real X, Y
var dx = e.screenX - mcWindows.mouseDownScreenX;
var dy = e.screenY - mcWindows.mouseDownScreenY;
switch (mcWindows.action) {
case "resize":
width = mcWindows.mouseDownWidth + (e.screenX - mcWindows.mouseDownScreenX);
height = mcWindows.mouseDownHeight + (e.screenY - mcWindows.mouseDownScreenY);
width = width < 100 ? 100 : width;
height = height < 100 ? 100 : height;
this.wrapperIFrameElement.style.width = width+2;
this.wrapperIFrameElement.style.height = height+2;
this.wrapperIFrameElement.width = width+2;
this.wrapperIFrameElement.height = height+2;
this.winElement.style.width = width;
this.winElement.style.height = height;
height = height - this.deltaHeight;
this.containerElement.style.width = width;
this.iframeElement.style.width = width;
this.iframeElement.style.height = height;
this.bodyElement.style.width = width;
this.bodyElement.style.height = height;
this.headElement.style.width = width;
//this.statusElement.style.width = width;
mcWindows.cancelEvent(e);
break;
case "move":
this.left = mcWindows.mouseDownLayerX + (e.screenX - mcWindows.mouseDownScreenX);
this.top = mcWindows.mouseDownLayerY + (e.screenY - mcWindows.mouseDownScreenY);
this.winElement.style.left = this.left + "px";
this.winElement.style.top = this.top + "px";
mcWindows.cancelEvent(e);
break;
}
};
function debug(msg) {
document.getElementById('debug').value += msg + "\n";
}
MCWindow.prototype.onMouseUp = function(e) {
mcWindows.action = "none";
};
MCWindow.prototype.onFocus = function(e) {
// Gecko only handler
var winRef = e.currentTarget;
for (var n in mcWindows.windows) {
var win = mcWindows.windows[n];
if (winRef.name == win.id + "_iframe") {
win.focus();
return;
}
}
};
MCWindow.prototype.onMouseDown = function(e) {
var elm = mcWindows.isMSIE ? this.wrapperFrame.event.srcElement : e.target;
var scrollX = 0;//this.doc.body.scrollLeft;
var scrollY = 0;//this.doc.body.scrollTop;
mcWindows.mouseDownScreenX = e.screenX;
mcWindows.mouseDownScreenY = e.screenY;
mcWindows.mouseDownLayerX = this.left;
mcWindows.mouseDownLayerY = this.top;
mcWindows.mouseDownWidth = parseInt(this.winElement.style.width);
mcWindows.mouseDownHeight = parseInt(this.winElement.style.height);
if (this.resizeElement != null && elm == this.resizeElement.firstChild)
this.startResize(e);
else
this.startMove(e);
mcWindows.cancelEvent(e);
};
// Global instance
var mcWindows = new MCWindows();
// Initialize windows
mcWindows.init({
images_path : tinyMCE.baseURL + "/plugins/inlinepopups/images",
css_file : tinyMCE.baseURL + "/plugins/inlinepopups/css/inlinepopup.css"
});

View File

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 B

View File

@ -0,0 +1,455 @@
/**
* $RCSfile: mcwindows.js,v $
* $Revision: 1.1 $
* $Date: 2005/08/10 21:21:00 $
*
* Moxiecode DHTML Windows script.
*
* @author Moxiecode
* @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved.
*/
// Windows handler
function MCWindows() {
this.settings = new Array();
this.windows = new Array();
this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
this.isGecko = navigator.userAgent.indexOf('Gecko') != -1;
this.isSafari = navigator.userAgent.indexOf('Safari') != -1;
this.isMac = navigator.userAgent.indexOf('Mac') != -1;
this.isMSIE5_0 = this.isMSIE && (navigator.userAgent.indexOf('MSIE 5.0') != -1);
this.action = "none";
this.selectedWindow = null;
this.zindex = 100;
this.mouseDownScreenX = 0;
this.mouseDownScreenY = 0;
this.mouseDownLayerX = 0;
this.mouseDownLayerY = 0;
this.mouseDownWidth = 0;
this.mouseDownHeight = 0;
};
MCWindows.prototype.init = function(settings) {
this.settings = settings;
if (this.isMSIE)
this.addEvent(document, "mousemove", mcWindows.eventDispatcher);
else
this.addEvent(window, "mousemove", mcWindows.eventDispatcher);
this.addEvent(document, "mouseup", mcWindows.eventDispatcher);
};
MCWindows.prototype.getParam = function(name, default_value) {
var value = null;
value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
// Fix bool values
if (value == "true" || value == "false")
return (value == "true");
return value;
};
MCWindows.prototype.eventDispatcher = function(e) {
e = typeof(e) == "undefined" ? window.event : e;
if (mcWindows.selectedWindow == null)
return;
// Switch focus
if (mcWindows.isGecko && e.type == "mousedown") {
var elm = e.currentTarget;
for (var n in mcWindows.windows) {
var win = mcWindows.windows[n];
if (win.headElement == elm || win.resizeElement == elm) {
win.focus();
break;
}
}
}
switch (e.type) {
case "mousemove":
mcWindows.selectedWindow.onMouseMove(e);
break;
case "mouseup":
mcWindows.selectedWindow.onMouseUp(e);
break;
case "mousedown":
mcWindows.selectedWindow.onMouseDown(e);
break;
case "focus":
mcWindows.selectedWindow.onFocus(e);
break;
}
}
MCWindows.prototype.addEvent = function(obj, name, handler) {
if (this.isMSIE)
obj.attachEvent("on" + name, handler);
else
obj.addEventListener(name, handler, true);
};
MCWindows.prototype.cancelEvent = function(e) {
if (this.isMSIE) {
e.returnValue = false;
e.cancelBubble = true;
} else
e.preventDefault();
};
MCWindows.prototype.parseFeatures = function(opts) {
// Cleanup the options
opts = opts.toLowerCase();
opts = opts.replace(/;/g, ",");
opts = opts.replace(/[^0-9a-z=,]/g, "");
var optionChunks = opts.split(',');
var options = new Array();
options['left'] = 10;
options['top'] = 10;
options['width'] = 300;
options['height'] = 300;
options['resizable'] = true;
options['minimizable'] = true;
options['maximizable'] = true;
options['close'] = true;
options['movable'] = true;
if (opts == "")
return options;
for (var i=0; i<optionChunks.length; i++) {
var parts = optionChunks[i].split('=');
if (parts.length == 2)
options[parts[0]] = parts[1];
}
return options;
};
MCWindows.prototype.open = function(url, name, features) {
var win = new MCWindow();
var winDiv, html = "", id;
features = this.parseFeatures(features);
// Create div
id = "mcWindow_" + name;
width = parseInt(features['width']);
height = parseInt(features['height'])-12-19;
if (this.isMSIE)
width -= 2;
// Setup first part of window
win.id = id;
win.url = url;
win.name = name;
win.features = features;
this.windows[name] = win;
iframeWidth = width;
iframeHeight = height;
// Create inner content
html += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
html += '<html>';
html += '<head>';
html += '<title>Wrapper iframe</title>';
html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
html += '<link href="../jscripts/tiny_mce/themes/advanced/css/editor_ui.css" rel="stylesheet" type="text/css" />';
html += '</head>';
html += '<body onload="parent.mcWindows.onLoad(\'' + name + '\');">';
html += '<div id="' + id + '_container" class="mceWindow">';
html += '<div id="' + id + '_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
html += ' <div id="' + id + '_title" class="mceWindowTitle"';
html += ' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;">No name window</div>';
html += ' <div class="mceWindowHeadTools">';
html += ' <a href="javascript:parent.mcWindows.windows[\'' + name + '\'].close();" onmousedown="return false;" class="mceWindowClose"><img border="0" src="../jscripts/tiny_mce/themes/advanced/images/window_close.gif" /></a>';
// html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].maximize();" onmousedown="return false;" class="mceWindowMaximize"></a>';
// html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].minimize();" onmousedown="return false;" class="mceWindowMinimize"></a>';
html += ' </div>';
html += '</div><div id="' + id + '_body" class="mceWindowBody" style="width: ' + width + 'px; height: ' + height + 'px;">';
html += '<iframe id="' + id + '_iframe" name="' + id + '_iframe" onfocus="parent.mcWindows.windows[\'' + name + '\'].focus();" frameborder="0" width="' + iframeWidth + '" height="' + iframeHeight + '" src="' + url + '" class="mceWindowBodyIframe"></iframe></div>';
html += '<div id="' + id + '_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
html += '<div id="' + id + '_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();" border="0" src="../jscripts/tiny_mce/themes/advanced/images/window_resize.gif" /></div>';
html += '</div>';
html += '</div>';
html += '</body>';
html += '</html>';
// Create iframe
this.createFloatingIFrame(id, features['left'], features['top'], features['width'], features['height'], html);
};
// Gets called when wrapper iframe is initialized
MCWindows.prototype.onLoad = function(name) {
var win = mcWindows.windows[name];
var id = "mcWindow_" + name;
var wrapperIframe = window.frames[id + "_iframe"].frames[0];
var wrapperDoc = window.frames[id + "_iframe"].document;
var doc = window.frames[id + "_iframe"].document;
var winDiv = document.getElementById("mcWindow_" + name + "_div");
var realIframe = window.frames[id + "_iframe"].frames[0];
// Set window data
win.id = "mcWindow_" + name + "_iframe";
win.winElement = winDiv;
win.bodyElement = doc.getElementById(id + '_body');
win.iframeElement = doc.getElementById(id + '_iframe');
win.headElement = doc.getElementById(id + '_head');
win.titleElement = doc.getElementById(id + '_title');
win.resizeElement = doc.getElementById(id + '_resize');
win.containerElement = doc.getElementById(id + '_container');
win.left = win.features['left'];
win.top = win.features['top'];
win.frame = window.frames[id + '_iframe'].frames[0];
win.wrapperFrame = window.frames[id + '_iframe'];
win.wrapperIFrameElement = document.getElementById(id + "_iframe");
// Add event handlers
mcWindows.addEvent(win.headElement, "mousedown", mcWindows.eventDispatcher);
mcWindows.addEvent(win.resizeElement, "mousedown", mcWindows.eventDispatcher);
if (mcWindows.isMSIE) {
mcWindows.addEvent(realIframe.document, "mousemove", mcWindows.eventDispatcher);
mcWindows.addEvent(realIframe.document, "mouseup", mcWindows.eventDispatcher);
} else {
mcWindows.addEvent(realIframe, "mousemove", mcWindows.eventDispatcher);
mcWindows.addEvent(realIframe, "mouseup", mcWindows.eventDispatcher);
mcWindows.addEvent(realIframe, "focus", mcWindows.eventDispatcher);
}
for (var i=0; i<window.frames.length; i++) {
if (!window.frames[i]._hasMouseHandlers) {
if (mcWindows.isMSIE) {
mcWindows.addEvent(window.frames[i].document, "mousemove", mcWindows.eventDispatcher);
mcWindows.addEvent(window.frames[i].document, "mouseup", mcWindows.eventDispatcher);
} else {
mcWindows.addEvent(window.frames[i], "mousemove", mcWindows.eventDispatcher);
mcWindows.addEvent(window.frames[i], "mouseup", mcWindows.eventDispatcher);
}
window.frames[i]._hasMouseHandlers = true;
}
}
if (mcWindows.isMSIE) {
mcWindows.addEvent(win.frame.document, "mousemove", mcWindows.eventDispatcher);
mcWindows.addEvent(win.frame.document, "mouseup", mcWindows.eventDispatcher);
} else {
mcWindows.addEvent(win.frame, "mousemove", mcWindows.eventDispatcher);
mcWindows.addEvent(win.frame, "mouseup", mcWindows.eventDispatcher);
mcWindows.addEvent(win.frame, "focus", mcWindows.eventDispatcher);
}
this.selectedWindow = win;
};
MCWindows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
var iframe = document.createElement("iframe");
var div = document.createElement("div");
width = parseInt(width);
height = parseInt(height)+1;
// Create wrapper div
div.setAttribute("id", id_prefix + "_div");
div.setAttribute("width", width);
div.setAttribute("height", (height));
div.style.position = "absolute";
div.style.left = left + "px";
div.style.top = top + "px";
div.style.width = width + "px";
div.style.height = (height) + "px";
div.style.backgroundColor = "white";
div.style.display = "none";
if (this.isGecko) {
iframeWidth = width + 2;
iframeHeight = height + 2;
} else {
iframeWidth = width;
iframeHeight = height + 1;
}
// Create iframe
iframe.setAttribute("id", id_prefix + "_iframe");
iframe.setAttribute("name", id_prefix + "_iframe");
iframe.setAttribute("border", "0");
iframe.setAttribute("frameBorder", "0");
iframe.setAttribute("marginWidth", "0");
iframe.setAttribute("marginHeight", "0");
iframe.setAttribute("leftMargin", "0");
iframe.setAttribute("topMargin", "0");
iframe.setAttribute("width", iframeWidth);
iframe.setAttribute("height", iframeHeight);
// iframe.setAttribute("src", "../jscripts/tiny_mce/blank.htm");
// iframe.setAttribute("allowtransparency", "false");
iframe.setAttribute("scrolling", "no");
iframe.style.width = iframeWidth + "px";
iframe.style.height = iframeHeight + "px";
iframe.style.backgroundColor = "white";
div.appendChild(iframe);
document.body.appendChild(div);
// Fixed MSIE 5.0 issue
div.innerHTML = div.innerHTML;
if (this.isSafari) {
// Give Safari some time to setup
window.setTimeout(function() {
doc = window.frames[id_prefix + '_iframe'].document;
doc.open();
doc.write(html);
doc.close();
}, 10);
} else {
doc = window.frames[id_prefix + '_iframe'].window.document
doc.open();
doc.write(html);
doc.close();
}
div.style.display = "block";
return div;
};
// Window instance
function MCWindow() {
};
MCWindow.prototype.focus = function() {
this.winElement.style.zIndex = mcWindows.zindex++;
mcWindows.selectedWindow = this;
};
MCWindow.prototype.minimize = function() {
};
MCWindow.prototype.maximize = function() {
};
MCWindow.prototype.startResize = function() {
mcWindows.action = "resize";
};
MCWindow.prototype.startMove = function(e) {
mcWindows.action = "move";
};
MCWindow.prototype.close = function() {
document.body.removeChild(this.winElement);
mcWindows.windows[this.name] = null;
};
MCWindow.prototype.onMouseMove = function(e) {
var scrollX = 0;//this.doc.body.scrollLeft;
var scrollY = 0;//this.doc.body.scrollTop;
// Calculate real X, Y
var dx = e.screenX - mcWindows.mouseDownScreenX;
var dy = e.screenY - mcWindows.mouseDownScreenY;
switch (mcWindows.action) {
case "resize":
width = mcWindows.mouseDownWidth + (e.screenX - mcWindows.mouseDownScreenX);
height = mcWindows.mouseDownHeight + (e.screenY - mcWindows.mouseDownScreenY);
width = width < 100 ? 100 : width;
height = height < 100 ? 100 : height;
this.wrapperIFrameElement.style.width = width+2;
this.wrapperIFrameElement.style.height = height+2;
this.wrapperIFrameElement.width = width+2;
this.wrapperIFrameElement.height = height+2;
this.winElement.style.width = width;
this.winElement.style.height = height;
height = height-12-19;
this.containerElement.style.width = width;
this.iframeElement.style.width = width;
this.iframeElement.style.height = height;
this.bodyElement.style.width = width;
this.bodyElement.style.height = height;
this.headElement.style.width = width;
//this.statusElement.style.width = width;
mcWindows.cancelEvent(e);
break;
case "move":
this.left = mcWindows.mouseDownLayerX + (e.screenX - mcWindows.mouseDownScreenX);
this.top = mcWindows.mouseDownLayerY + (e.screenY - mcWindows.mouseDownScreenY);
this.winElement.style.left = this.left + "px";
this.winElement.style.top = this.top + "px";
mcWindows.cancelEvent(e);
break;
}
};
function debug(msg) {
document.getElementById('debug').value += msg + "\n";
}
MCWindow.prototype.onMouseUp = function(e) {
mcWindows.action = "none";
};
MCWindow.prototype.onFocus = function(e) {
// Gecko only handler
var winRef = e.currentTarget;
for (var n in mcWindows.windows) {
var win = mcWindows.windows[n];
if (winRef.name == win.id) {
win.focus();
return;
}
}
};
MCWindow.prototype.onMouseDown = function(e) {
var elm = mcWindows.isMSIE ? this.wrapperFrame.event.srcElement : e.target;
var scrollX = 0;//this.doc.body.scrollLeft;
var scrollY = 0;//this.doc.body.scrollTop;
mcWindows.mouseDownScreenX = e.screenX;
mcWindows.mouseDownScreenY = e.screenY;
mcWindows.mouseDownLayerX = this.left;
mcWindows.mouseDownLayerY = this.top;
mcWindows.mouseDownWidth = parseInt(this.winElement.style.width);
mcWindows.mouseDownHeight = parseInt(this.winElement.style.height);
if (elm == this.resizeElement.firstChild)
this.startResize(e);
else
this.startMove(e);
mcWindows.cancelEvent(e);
};
// Global instance
var mcWindows = new MCWindows();

View File

@ -1,2 +0,0 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('preview','cs,de,el,en,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl');function TinyMCE_preview_getControlHTML(control_name){switch(control_name){case "preview":return '<img id="{$editor_id}_preview" src="{$pluginurl}/images/preview.gif" title="{$lang_preview_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePreview\');" />';}return "";}function TinyMCE_preview_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mcePreview":var previewPage=tinyMCE.getParam("plugin_preview_pageurl",null);var previewWidth=tinyMCE.getParam("plugin_preview_width","550");var previewHeight=tinyMCE.getParam("plugin_preview_height","600");if(previewPage){var template=new Array();template['file']=previewPage;template['width']=previewWidth;template['height']=previewHeight;tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"yes",content:tinyMCE.getContent(),content_css:tinyMCE.getParam("content_css")});}else{var win=window.open("","mcePreview","menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width="+previewWidth+",height="+previewHeight);var html="";html+='<!doctype html public "-//w3c//dtd html 4.0 transitional//en">';html+='<html>';html+='<head>';html+='<title>'+tinyMCE.getLang('lang_preview_desc')+'</title>';html+='<base href="'+tinyMCE.getParam("document_base_url")+'">';html+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';html+='<link href="'+tinyMCE.getParam("content_css")+'" rel="stylesheet" type="text/css">';html+='</head>';html+='<body>';html+=tinyMCE.getContent();html+='</body>';html+='</html>';win.document.write(html);win.document.close();}return true;}return false;}

View File

@ -1,62 +0,0 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('preview', 'cs,de,el,en,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl');
/**
* Returns the HTML contents of the preview control.
*/
function TinyMCE_preview_getControlHTML(control_name) {
switch (control_name) {
case "preview":
return '<img id="{$editor_id}_preview" src="{$pluginurl}/images/preview.gif" title="{$lang_preview_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePreview\');" />';
}
return "";
}
/**
* Executes the mcePreview command.
*/
function TinyMCE_preview_execCommand(editor_id, element, command, user_interface, value) {
// Handle commands
switch (command) {
case "mcePreview":
var previewPage = tinyMCE.getParam("plugin_preview_pageurl", null);
var previewWidth = tinyMCE.getParam("plugin_preview_width", "550");
var previewHeight = tinyMCE.getParam("plugin_preview_height", "600");
// Use a custom preview page
if (previewPage) {
var template = new Array();
template['file'] = previewPage;
template['width'] = previewWidth;
template['height'] = previewHeight;
tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "yes", content : tinyMCE.getContent(), content_css : tinyMCE.getParam("content_css")});
} else {
var win = window.open("", "mcePreview", "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width=" + previewWidth + ",height=" + previewHeight);
var html = "";
html += '<!doctype html public "-//w3c//dtd html 4.0 transitional//en">';
html += '<html>';
html += '<head>';
html += '<title>' + tinyMCE.getLang('lang_preview_desc') + '</title>';
html += '<base href="' + tinyMCE.getParam("document_base_url") + '">';
html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
html += '<link href="' + tinyMCE.getParam("content_css") + '" rel="stylesheet" type="text/css">';
html += '</head>';
html += '<body>';
html += tinyMCE.getContent();
html += '</body>';
html += '</html>';
win.document.write(html);
win.document.close();
}
return true;
}
// Pass to next handler in chain
return false;
}

View File

@ -1,14 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<script language="javascript" src="../../tiny_mce_popup.js"></script>
<title>Example of a custom preview page</title>
<link href="{$content_css}" rel="stylesheet" type="text/css">
</head>
<body>
Editor contents: <br />
{$content}
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,3 +0,0 @@
// UK lang variables
tinyMCELang['lang_preview_desc'] = 'Náhled';

View File

@ -1,3 +0,0 @@
// DE lang variables by Tobias Heer
tinyMCELang['lang_preview_desc'] = 'Vorschau';

View File

@ -1,3 +0,0 @@
// Greek lang variables by Jacaranda Bill
tinyMCELang['lang_preview_desc'] = 'Ðñïåðéóêüðçóç éóôïóåëßäáò';

View File

@ -1,3 +0,0 @@
// UK lang variables
tinyMCELang['lang_preview_desc'] = 'Preview';

View File

@ -1,8 +0,0 @@
// IR lang variables
// Persian (Farsi) language pack (for IRAN)
// By: Morteza Zafari
// Lost@LostLord.com
// http://www.LostLord.com
tinyMCELang['lang_dir'] = 'rtl';
tinyMCELang['lang_preview_desc'] = 'پیش نمایش';

View File

@ -1,3 +0,0 @@
// French lang variables by Laurent Dran
tinyMCELang['lang_preview_desc'] = 'Pr&eacute;visualisation';

View File

@ -1,3 +0,0 @@
// Canadian French lang variables by Virtuelcom last modification: 2005-06-15
tinyMCELang['lang_preview_desc'] = 'Prévisualisation';

View File

@ -1,3 +0,0 @@
// IT lang variables
tinyMCELang['lang_preview_desc'] = 'Anteprima';

View File

@ -1,3 +0,0 @@
// KO lang variables
tinyMCELang['lang_preview_desc'] = '미리보기';

View File

@ -1,3 +0,0 @@
// UK lang variables
tinyMCELang['lang_preview_desc'] = 'Voorbeeld';

View File

@ -1,4 +0,0 @@
// PL lang variables
tinyMCELang['lang_preview_desc'] = 'Podgląd';

View File

@ -1,3 +0,0 @@
// UK lang variables
tinyMCELang['lang_preview_desc'] = 'Pré-visualização';

View File

@ -1,3 +0,0 @@
// pt_BR lang variables
tinyMCELang['lang_preview_desc'] = 'Visualizar';

View File

@ -1,3 +0,0 @@
// SE lang variables
tinyMCELang['lang_preview_desc'] = 'Förhandsgranska';

View File

@ -1,3 +0,0 @@
// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com)
tinyMCELang['lang_preview_desc'] = 'Ô¤ÀÀ';

View File

@ -1 +0,0 @@
Check the TinyMCE documentation for details on this plugin.

View File

@ -1,2 +0,0 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('save','en,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl');function TinyMCE_save_getControlHTML(control_name){switch(control_name){case "save":return '<img id="{$editor_id}_save" src="{$pluginurl}/images/save.gif" title="{$lang_save_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.switchClass(this,\'mceButtonNormal\');" onmousedown="tinyMCE.switchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSave\');" />';}return "";}function TinyMCE_save_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceSave":var formObj=tinyMCE.selectedInstance.formElement.form;if(formObj){tinyMCE.triggerSave();for(var i=0;i<formObj.elements.length;i++){var elementId=formObj.elements[i].name?formObj.elements[i].name:formObj.elements[i].id;if(elementId.indexOf('mce_editor_')==0)formObj.elements[i].disabled=true;}tinyMCE.selectedInstance.formElement.form.submit();}else alert("Error: No form element found.");return true;}return false;}

View File

@ -1,43 +0,0 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('save', 'en,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl');
/**
* Returns the HTML contents of the save control.
*/
function TinyMCE_save_getControlHTML(control_name) {
switch (control_name) {
case "save":
return '<img id="{$editor_id}_save" src="{$pluginurl}/images/save.gif" title="{$lang_save_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.switchClass(this,\'mceButtonNormal\');" onmousedown="tinyMCE.switchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSave\');" />';
}
return "";
}
/**
* Executes the save command.
*/
function TinyMCE_save_execCommand(editor_id, element, command, user_interface, value) {
// Handle commands
switch (command) {
case "mceSave":
var formObj = tinyMCE.selectedInstance.formElement.form;
if (formObj) {
tinyMCE.triggerSave();
// Disable all UI form elements that TinyMCE created
for (var i=0; i<formObj.elements.length; i++) {
var elementId = formObj.elements[i].name ? formObj.elements[i].name : formObj.elements[i].id;
if (elementId.indexOf('mce_editor_') == 0)
formObj.elements[i].disabled = true;
}
tinyMCE.selectedInstance.formElement.form.submit();
} else
alert("Error: No form element found.");
return true;
}
// Pass to next handler in chain
return false;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1001 B

View File

@ -1,3 +0,0 @@
// UK lang variables
tinyMCELang['lang_save_desc'] = 'Uložit';

View File

@ -1,3 +0,0 @@
// DE lang variables
tinyMCELang['lang_save_desc'] = 'Speichern';

View File

@ -1,3 +0,0 @@
// UK lang variables
tinyMCELang['lang_save_desc'] = 'Save';

Some files were not shown because too many files have changed in this diff Show More