summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/plugins/emotions
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/tiny_mce/plugins/emotions')
-rw-r--r--program/js/tiny_mce/plugins/emotions/editor_plugin.js1
-rw-r--r--program/js/tiny_mce/plugins/emotions/editor_plugin_src.js65
-rw-r--r--program/js/tiny_mce/plugins/emotions/emotions.htm40
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/emotions.gifbin0 -> 319 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/readme.txt2
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-cool.gifbin0 -> 354 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-cry.gifbin0 -> 329 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-embarassed.gifbin0 -> 331 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-foot-in-mouth.gifbin0 -> 344 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-frown.gifbin0 -> 340 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-innocent.gifbin0 -> 336 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-kiss.gifbin0 -> 338 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-laughing.gifbin0 -> 344 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-money-mouth.gifbin0 -> 321 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-sealed.gifbin0 -> 325 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-smile.gifbin0 -> 345 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-surprised.gifbin0 -> 342 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-tongue-out.gifbin0 -> 328 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-undecided.gifbin0 -> 337 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-wink.gifbin0 -> 351 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/images/smiley-yell.gifbin0 -> 336 bytes
-rw-r--r--program/js/tiny_mce/plugins/emotions/jscripts/functions.js21
-rw-r--r--program/js/tiny_mce/plugins/emotions/langs/en.js22
-rw-r--r--program/js/tiny_mce/plugins/emotions/readme.txt1
24 files changed, 152 insertions, 0 deletions
diff --git a/program/js/tiny_mce/plugins/emotions/editor_plugin.js b/program/js/tiny_mce/plugins/emotions/editor_plugin.js
new file mode 100644
index 000000000..07779873b
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/editor_plugin.js
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('emotions','en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_EmotionsPlugin={getInfo:function(){return{longname:'Emotions',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"emotions":return tinyMCE.getButtonHTML(cn,'lang_emotions_desc','{$pluginurl}/images/emotions.gif','mceEmotion');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceEmotion":var template=new Array();template['file']='../../plugins/emotions/emotions.htm';template['width']=160;template['height']=160;template['width']+=tinyMCE.getLang('lang_emotions_delta_width',0);template['height']+=tinyMCE.getLang('lang_emotions_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;}return false;}};tinyMCE.addPlugin('emotions',TinyMCE_EmotionsPlugin); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/emotions/editor_plugin_src.js b/program/js/tiny_mce/plugins/emotions/editor_plugin_src.js
new file mode 100644
index 000000000..10db6422d
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/editor_plugin_src.js
@@ -0,0 +1,65 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.23 $
+ * $Date: 2006/02/10 16:29:38 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('emotions', 'en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');
+
+// Plucin static class
+var TinyMCE_EmotionsPlugin = {
+ getInfo : function() {
+ return {
+ longname : 'Emotions',
+ author : 'Moxiecode Systems',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+ };
+ },
+
+ /**
+ * Returns the HTML contents of the emotions control.
+ */
+ getControlHTML : function(cn) {
+ switch (cn) {
+ case "emotions":
+ return tinyMCE.getButtonHTML(cn, 'lang_emotions_desc', '{$pluginurl}/images/emotions.gif', 'mceEmotion');
+ }
+
+ return "";
+ },
+
+ /**
+ * Executes the mceEmotion command.
+ */
+ execCommand : function(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'] = 160;
+ template['height'] = 160;
+
+ // Language specific width and height addons
+ template['width'] += tinyMCE.getLang('lang_emotions_delta_width', 0);
+ template['height'] += tinyMCE.getLang('lang_emotions_delta_height', 0);
+
+ tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
+
+ return true;
+ }
+
+ // Pass to next handler in chain
+ return false;
+ }
+};
+
+// Register plugin
+tinyMCE.addPlugin('emotions', TinyMCE_EmotionsPlugin);
diff --git a/program/js/tiny_mce/plugins/emotions/emotions.htm b/program/js/tiny_mce/plugins/emotions/emotions.htm
new file mode 100644
index 000000000..c70f4b45f
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/emotions.htm
@@ -0,0 +1,40 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{$lang_emotions_title}</title>
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script language="javascript" type="text/javascript" src="jscripts/functions.js"></script>
+ <base target="_self" />
+</head>
+<body style="display: none">
+ <div align="center">
+ <div class="title">{$lang_emotions_title}:<br /><br /></div>
+
+ <table border="0" cellspacing="0" cellpadding="4">
+ <tr>
+ <td><a href="javascript:insertEmotion('smiley-cool.gif','lang_emotions_cool');"><img src="images/smiley-cool.gif" width="18" height="18" border="0" alt="{$lang_emotions_cool}" title="{$lang_emotions_cool}" /></a></td>
+ <td><a href="javascript:insertEmotion('smiley-cry.gif','lang_emotions_cry');"><img src="images/smiley-cry.gif" width="18" height="18" border="0" alt="{$lang_emotions_cry}" title="{$lang_emotions_cry}" /></a></td>
+ <td><a href="javascript:insertEmotion('smiley-embarassed.gif','lang_emotions_embarassed');"><img src="images/smiley-embarassed.gif" width="18" height="18" border="0" alt="{$lang_emotions_embarassed}" title="{$lang_emotions_embarassed}" /></a></td>
+ <td><a href="javascript:insertEmotion('smiley-foot-in-mouth.gif','lang_emotions_foot_in_mouth');"><img src="images/smiley-foot-in-mouth.gif" width="18" height="18" border="0" alt="{$lang_emotions_foot_in_mouth}" title="{$lang_emotions_foot_in_mouth}" /></a></td>
+ </tr>
+ <tr>
+ <td><a href="javascript:insertEmotion('smiley-frown.gif','lang_emotions_frown');"><img src="images/smiley-frown.gif" width="18" height="18" border="0" alt="{$lang_emotions_frown}" title="{$lang_emotions_frown}" /></a></td>
+ <td><a href="javascript:insertEmotion('smiley-innocent.gif','lang_emotions_innocent');"><img src="images/smiley-innocent.gif" width="18" height="18" border="0" alt="{$lang_emotions_innocent}" title="{$lang_emotions_innocent}" /></a></td>
+ <td><a href="javascript:insertEmotion('smiley-kiss.gif','lang_emotions_kiss');"><img src="images/smiley-kiss.gif" width="18" height="18" border="0" alt="{$lang_emotions_kiss}" title="{$lang_emotions_kiss}" /></a></td>
+ <td><a href="javascript:insertEmotion('smiley-laughing.gif','lang_emotions_laughing');"><img src="images/smiley-laughing.gif" width="18" height="18" border="0" alt="{$lang_emotions_laughing}" title="{$lang_emotions_laughing}" /></a></td>
+ </tr>
+ <tr>
+ <td><a href="javascript:insertEmotion('smiley-money-mouth.gif','lang_emotions_money_mouth');"><img src="images/smiley-money-mouth.gif" width="18" height="18" border="0" alt="{$lang_emotions_money_mouth}" title="{$lang_emotions_money_mouth}" /></a></td>
+ <td><a href="javascript:insertEmotion('smiley-sealed.gif','lang_emotions_sealed');"><img src="images/smiley-sealed.gif" width="18" height="18" border="0" alt="{$lang_emotions_sealed}" title="{$lang_emotions_sealed}" /></a></td>
+ <td><a href="javascript:insertEmotion('smiley-smile.gif','lang_emotions_smile');"><img src="images/smiley-smile.gif" width="18" height="18" border="0" alt="{$lang_emotions_smile}" title="{$lang_emotions_smile}" /></a></td>
+ <td><a href="javascript:insertEmotion('smiley-surprised.gif','lang_emotions_surprised');"><img src="images/smiley-surprised.gif" width="18" height="18" border="0" alt="{$lang_emotions_surprised}" title="{$lang_emotions_surprised}" /></a></td>
+ </tr>
+ <tr>
+ <td><a href="javascript:insertEmotion('smiley-tongue-out.gif','lang_emotions_tongue_out');"><img src="images/smiley-tongue-out.gif" width="18" height="18" border="0" alt="{$lang_emotions_tongue-out}" title="{$lang_emotions_tongue_out}" /></a></td>
+ <td><a href="javascript:insertEmotion('smiley-undecided.gif','lang_emotions_undecided');"><img src="images/smiley-undecided.gif" width="18" height="18" border="0" alt="{$lang_emotions_undecided}" title="{$lang_emotions_undecided}" /></a></td>
+ <td><a href="javascript:insertEmotion('smiley-wink.gif','lang_emotions_wink');"><img src="images/smiley-wink.gif" width="18" height="18" border="0" alt="{$lang_emotions_wink}" title="{$lang_emotions_wink}" /></a></td>
+ <td><a href="javascript:insertEmotion('smiley-yell.gif','lang_emotions_yell');"><img src="images/smiley-yell.gif" width="18" height="18" border="0" alt="{$lang_emotions_yell}" title="{$lang_emotions_yell}" /></a></td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>
diff --git a/program/js/tiny_mce/plugins/emotions/images/emotions.gif b/program/js/tiny_mce/plugins/emotions/images/emotions.gif
new file mode 100644
index 000000000..a39ed8ec3
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/emotions.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/readme.txt b/program/js/tiny_mce/plugins/emotions/images/readme.txt
new file mode 100644
index 000000000..a3cea1b68
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/readme.txt
@@ -0,0 +1,2 @@
+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.
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-cool.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-cool.gif
new file mode 100644
index 000000000..ba90cc36f
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-cool.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-cry.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-cry.gif
new file mode 100644
index 000000000..74d897a4f
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-cry.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-embarassed.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-embarassed.gif
new file mode 100644
index 000000000..963a96b8a
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-embarassed.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-foot-in-mouth.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-foot-in-mouth.gif
new file mode 100644
index 000000000..16f68cc1e
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-foot-in-mouth.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-frown.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-frown.gif
new file mode 100644
index 000000000..716f55e16
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-frown.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-innocent.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-innocent.gif
new file mode 100644
index 000000000..334d49e0e
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-innocent.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-kiss.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-kiss.gif
new file mode 100644
index 000000000..4efd549ed
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-kiss.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-laughing.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-laughing.gif
new file mode 100644
index 000000000..1606c119e
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-laughing.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-money-mouth.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-money-mouth.gif
new file mode 100644
index 000000000..ca2451e10
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-money-mouth.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-sealed.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-sealed.gif
new file mode 100644
index 000000000..b33d3cca1
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-sealed.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-smile.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-smile.gif
new file mode 100644
index 000000000..e6a9e60d5
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-smile.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-surprised.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-surprised.gif
new file mode 100644
index 000000000..cb99cdd91
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-surprised.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-tongue-out.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-tongue-out.gif
new file mode 100644
index 000000000..2075dc160
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-tongue-out.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-undecided.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-undecided.gif
new file mode 100644
index 000000000..bef7e2573
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-undecided.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-wink.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-wink.gif
new file mode 100644
index 000000000..9faf1aff8
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-wink.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/images/smiley-yell.gif b/program/js/tiny_mce/plugins/emotions/images/smiley-yell.gif
new file mode 100644
index 000000000..648e6e879
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/images/smiley-yell.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/emotions/jscripts/functions.js b/program/js/tiny_mce/plugins/emotions/jscripts/functions.js
new file mode 100644
index 000000000..95a9eafe8
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/jscripts/functions.js
@@ -0,0 +1,21 @@
+function init() {
+ tinyMCEPopup.resizeToInnerSize();
+}
+
+function insertEmotion(file_name, title) {
+ title = tinyMCE.getLang(title);
+
+ if (title == null)
+ title = "";
+
+ // XML encode
+ title = title.replace(/&/g, '&amp;');
+ title = title.replace(/\"/g, '&quot;');
+ title = title.replace(/</g, '&lt;');
+ title = title.replace(/>/g, '&gt;');
+
+ var html = '<img src="' + tinyMCE.baseURL + "/plugins/emotions/images/" + file_name + '" mce_src="' + tinyMCE.baseURL + "/plugins/emotions/images/" + file_name + '" border="0" alt="' + title + '" title="' + title + '" />';
+
+ tinyMCE.execCommand('mceInsertContent', false, html);
+ tinyMCEPopup.close();
+}
diff --git a/program/js/tiny_mce/plugins/emotions/langs/en.js b/program/js/tiny_mce/plugins/emotions/langs/en.js
new file mode 100644
index 000000000..3cdd67517
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/langs/en.js
@@ -0,0 +1,22 @@
+// UK lang variables
+
+tinyMCE.addToLang('emotions',{
+title : 'Insert emotion',
+desc : 'Emotions',
+cool : 'Cool',
+cry : 'Cry',
+embarassed : 'Embarassed',
+foot_in_mouth : 'Foot in mouth',
+frown : 'Frown',
+innocent : 'Innocent',
+kiss : 'Kiss',
+laughing : 'Laughing',
+money_mouth : 'Money mouth',
+sealed : 'Sealed',
+smile : 'Smile',
+surprised : 'Surprised',
+tongue_out : 'Tongue out',
+undecided : 'Undecided',
+wink : 'Wink',
+yell : 'Yell'
+});
diff --git a/program/js/tiny_mce/plugins/emotions/readme.txt b/program/js/tiny_mce/plugins/emotions/readme.txt
new file mode 100644
index 000000000..4fdb78aec
--- /dev/null
+++ b/program/js/tiny_mce/plugins/emotions/readme.txt
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.