From da2d6f83983202984468f99402762a8ab861c809 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 24 Jun 2005 03:59:24 +0000 Subject: [PATCH] hover help --- lib/WebGUI/Asset/RichEdit.pm | 15 +++ lib/WebGUI/Help/Asset_RichEdit.pm | 80 +++++++++++++++ lib/WebGUI/i18n/English/Asset_RichEdit.pm | 115 ++++++++++++---------- 3 files changed, 158 insertions(+), 52 deletions(-) create mode 100644 lib/WebGUI/Help/Asset_RichEdit.pm diff --git a/lib/WebGUI/Asset/RichEdit.pm b/lib/WebGUI/Asset/RichEdit.pm index 62156cfb2..7ab0954b0 100644 --- a/lib/WebGUI/Asset/RichEdit.pm +++ b/lib/WebGUI/Asset/RichEdit.pm @@ -256,16 +256,19 @@ sub getEditForm { $buttonGrid .= ""; $tabform->getTab("properties")->readOnly( -label=>WebGUI::International::get('toolbar buttons', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('toolbar buttons description', 'Asset_RichEdit'), -value=>$buttonGrid ); $tabform->getTab("properties")->yesNo( -value=>$self->getValue("askAboutRichEdit"), -label=>WebGUI::International::get('using rich edit', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('using rich edit description', 'Asset_RichEdit'), -name=>"askAboutRichEdit" ); $tabform->getTab("properties")->yesNo( -value=>$self->getValue("preformatted"), -label=>WebGUI::International::get('preformatted', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('preformatted description', 'Asset_RichEdit'), -name=>"preformatted", -uiLevel=>9 ); @@ -273,52 +276,61 @@ sub getEditForm { -value=>$self->getValue("extendedValidElements"), -name=>"extendedValidElements", -label=>WebGUI::International::get('extended elements', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('extended elements description', 'Asset_RichEdit'), -subtext=>WebGUI::International::get('extended elements subtext', 'Asset_RichEdit'), -uiLevel=>9 ); $tabform->getTab("display")->integer( -value=>$self->getValue("editorHeight"), -label=>WebGUI::International::get('editor height', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('editor height description', 'Asset_RichEdit'), -name=>"editorHeight", -uiLevel=>9 ); $tabform->getTab("display")->integer( -value=>$self->getValue("editorWidth"), -label=>WebGUI::International::get('editor width', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('editor width description', 'Asset_RichEdit'), -name=>"editorWidth", -uiLevel=>9 ); $tabform->getTab("display")->integer( -value=>$self->getValue("sourceEditorHeight"), -label=>WebGUI::International::get('source editor height', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('source editor height description', 'Asset_RichEdit'), -name=>"sourceEditorHeight" ); $tabform->getTab("display")->integer( -value=>$self->getValue("sourceEditorWidth"), -label=>WebGUI::International::get('source editor width', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('source editor width description', 'Asset_RichEdit'), -name=>"sourceEditorWidth" ); $tabform->getTab("properties")->yesNo( -value=>$self->getValue("useBr"), -label=>WebGUI::International::get('use br', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('use br description', 'Asset_RichEdit'), -name=>"useBr", -uiLevel=>9 ); $tabform->getTab("properties")->yesNo( -value=>$self->getValue("removeLineBreaks"), -label=>WebGUI::International::get('remove line breaks', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('remove line breaks description', 'Asset_RichEdit'), -name=>"removeLineBreaks", -uiLevel=>9 ); $tabform->getTab("display")->yesNo( -value=>$self->getValue("nowrap"), -label=>WebGUI::International::get('no wrap', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('no wrap description', 'Asset_RichEdit'), -name=>"nowrap", -uiLevel=>9 ); $tabform->getTab("properties")->selectList( -value=>[$self->getValue("directionality")], -label=>WebGUI::International::get('directionality', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('directionality description', 'Asset_RichEdit'), -name=>"directionality", -options=>{ ltr=>WebGUI::International::get('left to right', 'Asset_RichEdit'), @@ -328,6 +340,7 @@ sub getEditForm { $tabform->getTab("display")->selectList( -value=>[$self->getValue("toolbarLocation")], -label=>WebGUI::International::get('toolbar location', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('toolbar location description', 'Asset_RichEdit'), -name=>"toolbarLocation", -options=>{ top=>WebGUI::International::get('top', 'Asset_RichEdit'), @@ -337,11 +350,13 @@ sub getEditForm { $tabform->getTab("properties")->text( -value=>$self->getValue("cssFile"), -label=>WebGUI::International::get('css file', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('css file description', 'Asset_RichEdit'), -name=>"cssFile" ); $tabform->getTab("properties")->yesNo( -value=>$self->getValue("enableContextMenu"), -label=>WebGUI::International::get('enable context menu', 'Asset_RichEdit'), + -hoverHelp=>WebGUI::International::get('enable context menu description', 'Asset_RichEdit'), -name=>"enableContextMenu" ); return $tabform; diff --git a/lib/WebGUI/Help/Asset_RichEdit.pm b/lib/WebGUI/Help/Asset_RichEdit.pm new file mode 100644 index 000000000..36384194d --- /dev/null +++ b/lib/WebGUI/Help/Asset_RichEdit.pm @@ -0,0 +1,80 @@ +package WebGUI::Help::Asset_RichEdit; + +our $HELP = { + + 'rich edit add/edit' => { + title => 'rich edit add/edit title', + body => 'rich edit add/edit body', + fields => [ + { + title => 'using rich edit', + description => 'using rich edit description', + namespace => 'Asset_RichEdit', + }, + { + title => 'preformatted', + description => 'preformatted description', + namespace => 'Asset_RichEdit', + }, + { + title => 'extended elements', + description => 'extended elements description', + namespace => 'Asset_RichEdit', + }, + { + title => 'editor height', + description => 'editor height description', + namespace => 'Asset_RichEdit', + }, + { + title => 'editor width', + description => 'editor width description', + namespace => 'Asset_RichEdit', + }, + { + title => 'use br', + description => 'use br description', + namespace => 'Asset_RichEdit', + }, + { + title => 'remove line breaks', + description => 'remove line breaks description', + namespace => 'Asset_RichEdit', + }, + { + title => 'no wrap', + description => 'no wrap description', + namespace => 'Asset_RichEdit', + }, + { + title => 'directionality', + description => 'directionality description', + namespace => 'Asset_RichEdit', + }, + { + title => 'toolbar location', + description => 'toolbar location description', + namespace => 'Asset_RichEdit', + }, + { + title => 'css file', + description => 'css file description', + namespace => 'Asset_RichEdit', + }, + { + title => 'enable context menu', + description => 'enable context menu description', + namespace => 'Asset_RichEdit', + }, + ] + related => [ + { + tag => 'asset fields', + namespace => 'Asset' + }, + ] + }, + +}; + +1; diff --git a/lib/WebGUI/i18n/English/Asset_RichEdit.pm b/lib/WebGUI/i18n/English/Asset_RichEdit.pm index 1ba3cfd87..fbf53aa1f 100644 --- a/lib/WebGUI/i18n/English/Asset_RichEdit.pm +++ b/lib/WebGUI/i18n/English/Asset_RichEdit.pm @@ -339,60 +339,71 @@ our $I18N = { 'rich edit add/edit body' => { message => q|

This Asset allows you to customize the Rich Editor used by WebGUI for WYSIWIG HTML editing and to have multiple configurations available for Collaboration Assets.

- -

^International("using rich edit","Asset_RichEdit");
-Ask the user whether or not to use the Rich Editor on this form. -

- -

^International("preformatted","Asset_RichEdit");
-Normally, in HTML multiple spaces, tabs and carriage returns are considered as a single space. If this -option is set to Yes, then all whitespace entered into the form will be preserved as is. -

- -

^International("extended elements","Asset_RichEdit");
-A list of HTML tags and which elements are allowed inside of them. -

- -

^International("editor height","Asset_RichEdit");
-The height of the Rich Editor, in pixels -

- -

^International("editor width","Asset_RichEdit");
-The width of the Rich Editor, in pixels -

- -

^International("use br","Asset_RichEdit");
-Uses break tags <BR> instead of paragraph tags <P> when a newline is entered in the editor. -

- -

^International("remove line breaks","Asset_RichEdit");
-Removes line breaks from generated HTML. -

- -

^International("no wrap","Asset_RichEdit");
-Prevents word wrapping in the editor. -

- -

^International("directionality","Asset_RichEdit");
-Allows handling of languages that go from right to left or left to right. -

- -

^International("toolbar location","Asset_RichEdit");
-Set whether the toolbar should be placed above (top) or below (bottom) the form. -

- -

^International("css file","Asset_RichEdit");
-Specifies a CSS file used to style the contents of the editor. -

- -

^International("enable context menu","Asset_RichEdit");
-Adds the context menu to toolbar row 1. -

- -|, - lastUpdated => 1117736707, + |, + lastUpdated => 1119584956, }, + 'using rich edit description' => { + message => q|Ask the user whether or not to use the Rich Editor on this form.|, + lastUpdated => 1119584875, + }, + + 'preformatted description' => { + message => q|Normally, in HTML multiple spaces, tabs and carriage returns are considered as a single space. If this +option is set to Yes, then all whitespace entered into the form will be preserved as is.|, + lastUpdated => 1119584875, + }, + + 'extended elements description' => { + message => q|A list of HTML tags and which elements are allowed inside of them.|, + lastUpdated => 1119584875, + }, + + 'editor height description' => { + message => q|The height of the Rich Editor, in pixels|, + lastUpdated => 1119584875, + }, + + 'editor width description' => { + message => q|The width of the Rich Editor, in pixels|, + lastUpdated => 1119584875, + }, + + 'use br description' => { + message => q|Uses break tags <BR> instead of paragraph tags <P> when a newline is entered in the editor.|, + lastUpdated => 1119584875, + }, + + 'remove line breaks description' => { + message => q|Removes line breaks from generated HTML.|, + lastUpdated => 1119584875, + }, + + 'no wrap description' => { + message => q|Prevents word wrapping in the editor.|, + lastUpdated => 1119584875, + }, + + 'directionality description' => { + message => q|Allows handling of languages that go from right to left or left to right.|, + lastUpdated => 1119584875, + }, + + 'toolbar location description' => { + message => q|Set whether the toolbar should be placed above (top) or below (bottom) the form.|, + lastUpdated => 1119584875, + }, + + 'css file description' => { + message => q|Specifies a CSS file used to style the contents of the editor.|, + lastUpdated => 1119584875, + }, + + 'enable context menu description' => { + message => q|Adds the context menu to toolbar row 1.|, + lastUpdated => 1119584875, + }, + }; 1;