app/tiny_mce/plugins/emotions/js/emotions.js
changeset 154 d2377425d3f2
parent 126 6186c115a210
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/tiny_mce/plugins/emotions/js/emotions.js	Tue Sep 16 16:49:25 2008 +0000
@@ -0,0 +1,22 @@
+tinyMCEPopup.requireLangPack();
+
+var EmotionsDialog = {
+	init : function(ed) {
+		tinyMCEPopup.resizeToInnerSize();
+	},
+
+	insert : function(file, title) {
+		var ed = tinyMCEPopup.editor, dom = ed.dom;
+
+		tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', {
+			src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file,
+			alt : ed.getLang(title),
+			title : ed.getLang(title),
+			border : 0
+		}));
+
+		tinyMCEPopup.close();
+	}
+};
+
+tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog);