]> code.citadel.org Git - citadel.git/blob - webcit/tiny_mce/plugins/zoom/editor_plugin_src.js
Test to see if log is updated automatically
[citadel.git] / webcit / tiny_mce / plugins / zoom / editor_plugin_src.js
1 /* Import plugin specific language pack */
2
3 function TinyMCE_zoom_getInfo() {
4         return {
5                 longname : 'Zoom',
6                 author : 'Moxiecode Systems',
7                 authorurl : 'http://tinymce.moxiecode.com',
8                 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_zoom.html',
9                 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
10         };
11 };
12
13 /**
14  * Returns the HTML contents of the zoom control.
15  */
16 function TinyMCE_zoom_getControlHTML(control_name) {
17         if (!tinyMCE.isMSIE || tinyMCE.isMSIE5_0)
18                 return "";
19
20         switch (control_name) {
21                 case "zoom":
22                         return '<select id="{$editor_id}_formatSelect" name="{$editor_id}_zoomSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceZoom\',false,this.options[this.selectedIndex].value);" class="mceSelectList">\
23                                         <option value="100%">+ 100%</option>\
24                                         <option value="150%">+ 150%</option>\
25                                         <option value="200%">+ 200%</option>\
26                                         <option value="250%">+ 250%</option>\
27                                         </select>';
28         }
29
30         return "";
31 }
32
33 /**
34  * Executes the mceZoom command.
35  */
36 function TinyMCE_zoom_execCommand(editor_id, element, command, user_interface, value) {
37         // Handle commands
38         switch (command) {
39                 case "mceZoom":
40                         tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom = value;
41                         tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom = value;
42                         return true;
43         }
44
45         // Pass to next handler in chain
46         return false;
47 }