changeset 3958:55444eae3fe5

make image toolbar menu icon visible. find icon location and put that information to FCKToolbarItems.RegisterItem function
author Byeongweon [tasyblue@gmail.com]
date Wed, 25 Jun 2008 18:33:07 +0900
parents 579699ec0c23
children 8c04b4e35da3
files wiki/htdocs/applets/moinFCKplugins/moinimage/fckplugin.js wiki/htdocs/applets/moinFCKplugins/restrict_actions/fckplugin.js wiki/htdocs/applets/moinfckconfig.js
diffstat 3 files changed, 67 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/wiki/htdocs/applets/moinFCKplugins/moinimage/fckplugin.js	Wed Jun 25 17:02:48 2008 +0900
+++ b/wiki/htdocs/applets/moinFCKplugins/moinimage/fckplugin.js	Wed Jun 25 18:33:07 2008 +0900
@@ -22,8 +22,9 @@
 // Register the related command.
 FCKCommands.RegisterCommand('Image', new FCKDialogCommand( 'Image', FCKLang.DlgImgTitle, FCKConfig.WikiBasePath + FCKConfig.WikiPage + '?action=fckdialog&dialog=image', 400, 230, ImageState, 'Image')) ;
 
+// add icon location on strip file(theme/silver/fck_strip.gif)
 FCKToolbarItems.RegisterItem('Image', new FCKToolbarButton
-  ('Image', FCKLang.InsertImageLbl, FCKLang.InsertImage, null, false, true));
+  ('Image', FCKLang.InsertImageLbl, FCKLang.InsertImage, null, false, true, 37));
 
 }
 else
--- a/wiki/htdocs/applets/moinFCKplugins/restrict_actions/fckplugin.js	Wed Jun 25 17:02:48 2008 +0900
+++ b/wiki/htdocs/applets/moinFCKplugins/restrict_actions/fckplugin.js	Wed Jun 25 18:33:07 2008 +0900
@@ -92,7 +92,6 @@
 }
 
 RestrictedStyleCommand.prototype = new FCKStyleCommand();
-
 RestrictedStyleCommand.prototype.GetState =  function()
 {
  if (FCKSelection.CheckForNodeNames(this.forbidden))
@@ -134,10 +133,8 @@
 
 var StyleButtonCommand = function(stylename, unique)
 {
- // this.StylesLoader = new FCKStylesLoader() ; 
- // this.StylesLoader.Load( FCKConfig.StylesXmlPath ) ; 
- // this.style = this.StylesLoader.Styles[stylename];
- // this.unique = unique;
+ this.style = FCK.Styles.GetStyle(stylename);   // using FCK.Style instead of fckstylesloader
+ this.unique = unique;
 }
 
 StyleButtonCommand.prototype = new FCKStyleCommand();
@@ -164,11 +161,10 @@
  * RestrictedStyleButtonCommand
  * ####################################################################
  */
-/*
+
 var RestrictedStyleButtonCommand = function(stylename, forbidden, unique)
 {
-  this.style = this.StylesLoader.Styles[stylename];
-// this.style = stylename;
+  this.style = FCK.Styles.GetStyle(stylename);      // using FCK.Style instead of fckstylesloader
   this.forbidden = forbidden;
   this.unique = unique;
 }
@@ -187,7 +183,7 @@
     return FCK_TRISTATE_OFF;
   }
 }
-*/
+
 // ####################################################################
 
 var noformat = "H1|H2|H3|H4|H5|H6|PRE|A|TT|IMG";
@@ -249,6 +245,7 @@
  new RestrictedFormatBlockCommand(noBlock));
 FCKCommands.RegisterCommand('Style', 
  new RestrictedStyleCommand(noFormat));
+
 // misc
 FCKCommands.RegisterCommand('Smiley',
   new FCKDialogCommand( 'Smiley', FCKLang.DlgSmileyTitle, 
@@ -259,13 +256,14 @@
  ('Table', FCKLang.DlgTableTitle, 'dialog/fck_table.html', 400, 250,
   FCKSelection.CheckForNodeNames, noTable));
 
-
+// useless code, this code make each menu's icon disapear.
+/*
 // Make toolbar items context sensitive
 FCKToolbarItems.RegisterItem('Smiley', new FCKToolbarButton
  ('Smiley', FCKLang.InsertSmileyLbl, FCKLang.InsertSmiley, null, false, true));
 FCKToolbarItems.RegisterItem('Table', new FCKToolbarButton
  ('Table', FCKLang.InsertTableLbl, FCKLang.InsertTable, null, false, true));
-
+*/
 
 FCKToolbarItems.RegisterItem('Big', new FCKToolbarButton
 			     ('Big', 'Big>', 'Big', 
--- a/wiki/htdocs/applets/moinfckconfig.js	Wed Jun 25 17:02:48 2008 +0900
+++ b/wiki/htdocs/applets/moinfckconfig.js	Wed Jun 25 18:33:07 2008 +0900
@@ -54,6 +54,8 @@
  ['Source', 'Macro']
 ] ;
 
+
+
 FCKConfig.ContextMenu = ['Generic','Link','Image', 'NumberedList','TableCell','Table'] ;
 
 FCKConfig.LinkBrowser = false ;
@@ -112,3 +114,57 @@
 
 
 
+FCKConfig.CustomStyles =
+{
+	'Red Title'	: { Element : 'h3', Styles : { 'color' : 'Red' } }
+};
+
+// Do not add, rename or remove styles here. Only apply definition changes.
+FCKConfig.CoreStyles =
+{
+	// Basic Inline Styles.
+	'Bold'			: { Element : 'strong', Overrides : 'b' },
+	'Italic'		: { Element : 'em', Overrides : 'i' },
+	'Underline'		: { Element : 'u' },
+	'StrikeThrough'	: { Element : 'strike' },
+	'Subscript'		: { Element : 'sub' },
+	'Superscript'	: { Element : 'sup' },
+
+	// Basic Block Styles (Font Format Combo).
+	'p'				: { Element : 'p' },
+	'div'			: { Element : 'div' },
+	'pre'			: { Element : 'pre' },
+	'address'		: { Element : 'address' },
+	'h1'			: { Element : 'h1' },
+	'h2'			: { Element : 'h2' },
+	'h3'			: { Element : 'h3' },
+	'h4'			: { Element : 'h4' },
+	'h5'			: { Element : 'h5' },
+	'h6'			: { Element : 'h6' },
+
+	// Other formatting features.
+	'FontFace' :
+	{
+		Element		: 'span',
+		Styles		: { 'font-family' : '#("Font")' },
+		Overrides	: [ { Element : 'font', Attributes : { 'face' : null } } ]
+	},
+
+	'Size' :
+	{
+		Element		: 'span',
+		Styles		: { 'font-size' : '#("Size","fontSize")' },
+		Overrides	: [ { Element : 'font', Attributes : { 'size' : null } } ]
+	},
+
+	'Color' :
+	{
+		Element		: 'span',
+		Styles		: { 'color' : '#("Color","color")' },
+		Overrides	: [ { Element : 'font', Attributes : { 'color' : null } } ]
+	},
+
+	'BackColor'		: { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } },
+
+	'SelectionHighlight' : { Element : 'span', Styles : { 'background-color' : 'navy', 'color' : 'white' } }
+};