webcit_before_automake is now the trunk
[citadel.git] / webcit / tiny_mce / plugins / fullscreen / editor_plugin_src.js
1 /* Import plugin specific language pack */\r
2 tinyMCE.importPluginLanguagePack('fullscreen', 'en,sv,cs,fr_ca,zh_cn,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');\r
3 \r
4 function TinyMCE_fullscreen_getInfo() {\r
5         return {\r
6                 longname : 'Fullscreen',\r
7                 author : 'Moxiecode Systems',\r
8                 authorurl : 'http://tinymce.moxiecode.com',\r
9                 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html',\r
10                 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion\r
11         };\r
12 };\r
13 \r
14 function TinyMCE_fullscreen_getControlHTML(control_name) {\r
15         switch (control_name) {\r
16                 case "fullscreen":\r
17                         var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceFullScreen\');return false;';\r
18                         return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" onmousedown="return false;"><img id="{$editor_id}_fullscreen" src="{$pluginurl}/images/fullscreen.gif" title="{$lang_fullscreen_desc}" width="20" height="20" class="mceButton' + (tinyMCE.getParam('fullscreen_is_enabled') ? 'Selected' : 'Normal') + '" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';\r
19         }\r
20 \r
21         return "";\r
22 }\r
23 \r
24 function TinyMCE_fullscreen_execCommand(editor_id, element, command, user_interface, value) {\r
25         // Handle commands\r
26         switch (command) {\r
27                 case "mceFullScreen":\r
28                         if (tinyMCE.getParam('fullscreen_is_enabled')) {\r
29                                 // In fullscreen mode\r
30                                 window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent(editor_id));\r
31                                 top.close();\r
32                         } else {\r
33                                 tinyMCE.setWindowArg('editor_id', editor_id);\r
34 \r
35                                 var win = window.open(tinyMCE.baseURL + "/plugins/fullscreen/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height="  + screen.availHeight);\r
36                         }\r
37         \r
38                         return true;\r
39         }\r
40 \r
41         // Pass to next handler in chain\r
42         return false;\r
43 }\r
44 \r
45 \r