init import from old mailr project (http://svn.littlegreen.org/mailr/trunk)

This commit is contained in:
Eugene Korbut 2009-01-08 05:27:12 +10:00
commit 51b79e7298
640 changed files with 34651 additions and 0 deletions

View file

@ -0,0 +1,2 @@
/* 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');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+='<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

@ -0,0 +1,61 @@
/* 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');
/**
* 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 += '<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

@ -0,0 +1,14 @@
<!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.

After

Width:  |  Height:  |  Size: 1 KiB

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,8 @@
// 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

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

View file

@ -0,0 +1,3 @@
// CAN_FR lang variables
tinyMCELang['lang_preview_desc'] = 'Prévisualisation';

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,23 @@
Preview plugin for TinyMCE
-----------------------------------
Installation instructions:
* Copy the preview directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
* Add plugin to TinyMCE plugin option list example: plugins : "preview".
* Add the preview button name to button list, example: theme_advanced_buttons3_add : "preview".
Initialization example:
tinyMCE.init({
theme : "advanced",
mode : "textareas",
plugins : "preview",
theme_advanced_buttons3_add : "preview",
plugin_preview_width : "500",
plugin_preview_height : "600"
});
Configuration:
plugin_preview_width - Preview window width. Defaults to 550.
plugin_preview_height - Preview window height. Defaults to 600.
plugin_preview_pageurl - Custom preview page URL relative from theme
use "../../plugins/preview/example.html" for a example.