Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSmiley/insert-smiley.js
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSmiley/insert-smiley.js,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSmiley/insert-smiley.js 11 Nov 2005 20:32:45 -0000 1.2
+++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSmiley/insert-smiley.js 24 Nov 2007 15:35:42 -0000 1.3
@@ -1,27 +1,26 @@
/*---------------------------------------*\
- Insert Smiley Plugin for HTMLArea-3.0
+ Insert Smiley Plugin for Xinha
-----------------------------------------
- author: Ki Master George
+ author: Ki Master George
e-mail: kimastergeorge@gmail.com
\*---------------------------------------*/
function InsertSmiley(editor) {
- this.editor = editor;
+ this.editor = editor;
+ var cfg = editor.config;
+ var self = this;
- var cfg = editor.config;
- var self = this;
-
- // register the toolbar buttons provided by this plugin
- cfg.registerButton({
- id : "insertsmiley",
- tooltip : this._lc("Insert Smiley"),
- image : editor.imgURL("ed_smiley.gif", "InsertSmiley"),
- textMode : false,
- action : function(editor) {
- self.buttonPress(editor);
- }
- });
- cfg.addToolbarElement("insertsmiley", "inserthorizontalrule", 1);
+ // register the toolbar buttons provided by this plugin
+ cfg.registerButton({
+ id : "insertsmiley",
+ tooltip : this._lc("Insert Smiley"),
+ image : editor.imgURL("ed_smiley.gif", "InsertSmiley"),
+ textMode : false,
+ action : function(editor) {
+ self.buttonPress(editor);
+ }
+ });
+ cfg.addToolbarElement("insertsmiley", "inserthorizontalrule", 1);
}
InsertSmiley._pluginInfo = {
@@ -36,20 +35,18 @@
};
InsertSmiley.prototype._lc = function(string) {
- return HTMLArea._lc(string, 'InsertSmiley');
+ return Xinha._lc(string, 'InsertSmiley');
};
+Xinha.Config.prototype.InsertSmiley= {
+ smileyURL : "http://www.x-webservice.net/storage/xinha/plugins/InsertSmiley/"
+};
InsertSmiley.prototype.buttonPress = function(editor) {
- var self = this;
- var sel = editor.getSelectedHTML().replace(/(<[^>]*>| |\n|\r)/g,"");
- var param = new Object();
- param.editor = editor;
- param.editor_url = _editor_url;
- if(param.editor_url == "../") {
- param.editor_url = document.URL;
- param.editor_url = param.editor_url.replace(/^(.*\/).*\/.*$/g, "$1");
- }
- editor._popupDialog("plugin://InsertSmiley/insertsmiley", function(param) {
- editor.insertHTML("
");
- }, param);
+ var self = this;
+ var sel = editor.getSelectedHTML().replace(/(<[^>]*>| |\n|\r)/g,"");
+ var param = {};
+ param.editor = editor;
+ editor._popupDialog("plugin://InsertSmiley/insertsmiley", function(param) {
+ editor.insertHTML("
");
+ }, param);
};
\ No newline at end of file