Index: lams_central/web/ckeditor/plugins/skype/plugin.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/ckeditor/plugins/skype/Attic/plugin.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_central/web/ckeditor/plugins/skype/plugin.js 5 Nov 2012 19:08:42 -0000 1.1 @@ -0,0 +1,72 @@ +// Skype plugin for CKEditor + +CKEDITOR.plugins.add( 'skype', +{ + lang:['en'], + init: function( editor ) + { + editor.addCommand( 'skypeDialog', new CKEDITOR.dialogCommand( 'skypeDialog' ) ); + + editor.ui.addButton( 'Skype', + { + // Toolbar button tooltip. + label: editor.lang.skype.SkypeBtn, + // Reference to the plugin command name. + command: 'skypeDialog', + // Button's icon file path. + icon: this.path + 'images/icon.png' + } ); + + CKEDITOR.dialog.add( 'skypeDialog', function( editor ) + { + return { + title : editor.lang.skype.SkypeTitle, + minWidth : 400, + minHeight : 100, + contents : + [ + { + id : 'general', + label : 'Settings', + elements : + [ + { + type : 'html', + html : editor.lang.skype.SkypeTxt + }, + { + type : 'text', + id : 'userId', + label : editor.lang.skype.SkypeContactName, + validate : CKEDITOR.dialog.validate.notEmpty( editor.lang.skype.SkypeValidationError ), + required : true, + commit : function( data ) + { + data.userId = this.getValue(); + } + }, + { + type : 'html', + html : ''+ editor.lang.skype.SkypeHelp+'' + } + ] + } + ], + onOk : function() + { + var dialog = this, + data = {}, + link = editor.document.createElement( 'a' ); + this.commitContent( data ); + var skypeImage = 'My status'; + + link.setAttribute( 'href', 'skype:'+data.userId+'?chat' ); + + link.setHtml( skypeImage ); + + editor.insertElement( link ); + } + }; + } ); + } +} ); Index: lams_central/web/ckeditor/plugins/skype/images/icon.png =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/ckeditor/plugins/skype/images/Attic/icon.png,v diff -u Binary files differ Index: lams_central/web/ckeditor/plugins/skype/lang/en.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/ckeditor/plugins/skype/lang/Attic/en.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_central/web/ckeditor/plugins/skype/lang/en.js 5 Nov 2012 19:08:42 -0000 1.1 @@ -0,0 +1,11 @@ +CKEDITOR.plugins.setLang( 'skype', 'en',{ + skype : { + // Toolbar button + SkypeBtn : 'Insert Skype button', + SkypeTitle: 'Skype Properties', + SkypeTxt: 'Please type the skype contact name.', + SkypeHelp: 'How to use this?', + SkypeContactName: 'Skype contact name:', + SkypeValidationError: 'You must enter an Skype contact name or Cancel to abort.' + } +});