diff --git a/main/inc/lib/fckeditor/editor/plugins/glossary/fck_glossary.js.php b/main/inc/lib/fckeditor/editor/plugins/glossary/fck_glossary.js.php new file mode 100755 index 0000000000..8b13789179 --- /dev/null +++ b/main/inc/lib/fckeditor/editor/plugins/glossary/fck_glossary.js.php @@ -0,0 +1 @@ + diff --git a/main/inc/lib/fckeditor/editor/plugins/glossary/fckplugin.js b/main/inc/lib/fckeditor/editor/plugins/glossary/fckplugin.js new file mode 100644 index 0000000000..d09105f4e9 --- /dev/null +++ b/main/inc/lib/fckeditor/editor/plugins/glossary/fckplugin.js @@ -0,0 +1,56 @@ +// Register the command. + +var FCKGlossary = function( name ) +{ + this.Name = name ; + this.StyleName = '_FCK_Glossary' ; + this.IsActive = false ; + this.EditMode = FCK.EditMode; + + FCKStyles.AttachStyleStateChange( this.StyleName, this._OnStyleStateChange, this ) ; +} + +FCKGlossary.prototype = + { + Execute : function() + { + FCKUndo.SaveUndoStep() ; + + if ( this.IsActive ) { + FCKStyles.RemoveStyle(this.StyleName) ; + } + else { + FCKStyles.ApplyStyle( this.StyleName ) ; + } + FCK.Focus() ; + FCK.Events.FireEvent( 'OnSelectionChange' ) ; + }, + + GetState : function() + { + if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) + return FCK_TRISTATE_DISABLED ; + return this.IsActive ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF; + }, + + _OnStyleStateChange : function( styleName, isActive ) + { + this.IsActive = isActive ; + } + }; + + + + +FCKCommands.RegisterCommand( 'Glossary' , new FCKGlossary( 'Glossary' ) ) ; + +/*FCKCommands.RegisterCommand( 'Glossary', + new FCKCoreStyleCommand( 'Italic' ) +) ;*/ + +// Create and register the Audio toolbar button. +var oGlossaryItem = new FCKToolbarButton( 'Glossary', FCKLang['GlossaryTitle'], null, null, null, null, null ); + +oGlossaryItem.IconPath = FCKConfig.PluginsPath + 'glossary/glossary.gif' ; + + FCKToolbarItems.RegisterItem( 'Glossary', oGlossaryItem ) ; diff --git a/main/inc/lib/fckeditor/editor/plugins/glossary/glossary.gif b/main/inc/lib/fckeditor/editor/plugins/glossary/glossary.gif new file mode 100644 index 0000000000..5293fc25fe Binary files /dev/null and b/main/inc/lib/fckeditor/editor/plugins/glossary/glossary.gif differ diff --git a/main/inc/lib/fckeditor/editor/plugins/glossary/lang/en.js b/main/inc/lib/fckeditor/editor/plugins/glossary/lang/en.js new file mode 100755 index 0000000000..08ac904bc8 --- /dev/null +++ b/main/inc/lib/fckeditor/editor/plugins/glossary/lang/en.js @@ -0,0 +1,7 @@ +// Glossary. +// English language file. +// Please, use UTF-8 encoding. + +FCKLang['GlossaryTitle'] = 'Glossary' ; + + diff --git a/main/inc/lib/fckeditor/editor/plugins/glossary/lang/es.js b/main/inc/lib/fckeditor/editor/plugins/glossary/lang/es.js new file mode 100755 index 0000000000..8b5d507fd1 --- /dev/null +++ b/main/inc/lib/fckeditor/editor/plugins/glossary/lang/es.js @@ -0,0 +1,5 @@ +// Glossary. +// Spanish language file. +// Please, use UTF-8 encoding. + +FCKLang['GlossaryTitle'] = 'Glosario' ; diff --git a/main/inc/lib/fckeditor/fckconfig.js b/main/inc/lib/fckeditor/fckconfig.js index 8128b8ffdc..b2210a5b1c 100644 --- a/main/inc/lib/fckeditor/fckconfig.js +++ b/main/inc/lib/fckeditor/fckconfig.js @@ -229,6 +229,14 @@ FCKConfig.CoreStyles = 'h6' : { Element : 'h6' }, // Other formatting features. + + 'Glossary' : + { + Element : 'span', + Styles : { 'color' : '#00974A','cursor' : 'pointer','font-weight' : 'bold' }, + Attributes : { 'class' : 'glossary' } + }, + 'FontFace' : { Element : 'span', diff --git a/main/inc/lib/fckeditor/fckstyles.xml b/main/inc/lib/fckeditor/fckstyles.xml index 49718f9f85..84d45724e6 100644 --- a/main/inc/lib/fckeditor/fckstyles.xml +++ b/main/inc/lib/fckeditor/fckstyles.xml @@ -55,6 +55,11 @@ + + +