From 202f1f40c82794c25ff55ea34879cd3e1a5065a8 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Fri, 14 Feb 2003 03:26:01 +0000 Subject: [PATCH] Added the Midas Rich Editor for Mozilla 1.3. --- docs/upgrades/upgrade_5.0.3-5.1.0.sql | 5 +- lib/WebGUI/Form.pm | 8 + www/extras/midas/backcolor.gif | Bin 0 -> 130 bytes www/extras/midas/bold.gif | Bin 0 -> 69 bytes www/extras/midas/colors.html | 134 +++++++++ www/extras/midas/copy.gif | Bin 0 -> 105 bytes www/extras/midas/cut.gif | Bin 0 -> 88 bytes www/extras/midas/editor.html | 383 ++++++++++++++++++++++++++ www/extras/midas/forecolor.gif | Bin 0 -> 95 bytes www/extras/midas/indent.gif | Bin 0 -> 82 bytes www/extras/midas/italic.gif | Bin 0 -> 71 bytes www/extras/midas/justifycenter.gif | Bin 0 -> 63 bytes www/extras/midas/justifyleft.gif | Bin 0 -> 64 bytes www/extras/midas/justifyright.gif | Bin 0 -> 63 bytes www/extras/midas/link.gif | Bin 0 -> 149 bytes www/extras/midas/orderedlist.gif | Bin 0 -> 77 bytes www/extras/midas/outdent.gif | Bin 0 -> 82 bytes www/extras/midas/paste.gif | Bin 0 -> 136 bytes www/extras/midas/redo.gif | Bin 0 -> 76 bytes www/extras/midas/table.gif | Bin 0 -> 90 bytes www/extras/midas/underline.gif | Bin 0 -> 80 bytes www/extras/midas/undo.gif | Bin 0 -> 77 bytes www/extras/midas/unorderedlist.gif | Bin 0 -> 75 bytes 23 files changed, 528 insertions(+), 2 deletions(-) create mode 100644 www/extras/midas/backcolor.gif create mode 100644 www/extras/midas/bold.gif create mode 100644 www/extras/midas/colors.html create mode 100644 www/extras/midas/copy.gif create mode 100644 www/extras/midas/cut.gif create mode 100644 www/extras/midas/editor.html create mode 100644 www/extras/midas/forecolor.gif create mode 100644 www/extras/midas/indent.gif create mode 100644 www/extras/midas/italic.gif create mode 100644 www/extras/midas/justifycenter.gif create mode 100644 www/extras/midas/justifyleft.gif create mode 100644 www/extras/midas/justifyright.gif create mode 100644 www/extras/midas/link.gif create mode 100644 www/extras/midas/orderedlist.gif create mode 100644 www/extras/midas/outdent.gif create mode 100644 www/extras/midas/paste.gif create mode 100644 www/extras/midas/redo.gif create mode 100644 www/extras/midas/table.gif create mode 100644 www/extras/midas/underline.gif create mode 100644 www/extras/midas/undo.gif create mode 100644 www/extras/midas/unorderedlist.gif diff --git a/docs/upgrades/upgrade_5.0.3-5.1.0.sql b/docs/upgrades/upgrade_5.0.3-5.1.0.sql index fb09e03a2..f50eecde6 100644 --- a/docs/upgrades/upgrade_5.0.3-5.1.0.sql +++ b/docs/upgrades/upgrade_5.0.3-5.1.0.sql @@ -158,7 +158,7 @@ delete from international where languageId=1 and namespace='WebGUI' and internat insert into international (internationalId,languageId,namespace,message,lastUpdated) values (494,1,'WebGUI','RealObjects edit-on Pro 2.x', 1044704984); delete from international where languageId=1 and namespace='WebGUI' and internationalId=495; insert into international (internationalId,languageId,namespace,message,lastUpdated) values (495,1,'WebGUI','htmlArea (Internet Explorer 5.5+)', 1044704928); -INSERT INTO userProfileField VALUES ('richEditor','WebGUI::International::get(496)',1,0,'select','{\r\nhtmlArea=>WebGUI::International::get(495),\r\n#editOnPro2=>WebGUI::International::get(494),\r\nclassic=>WebGUI::International::get(879),\r\nlastResort=>WebGUI::International::get(880),\r\nnone=>WebGUI::International::get(881)\r\n}','[\'htmlArea\']',11,4,0); +INSERT INTO userProfileField VALUES ('richEditor','WebGUI::International::get(496)',1,0,'select','{\r\nhtmlArea=>WebGUI::International::get(495),\r\nmidas=>WebGUI::International::get(887),\r\n#editOnPro2=>WebGUI::International::get(494),\r\nclassic=>WebGUI::International::get(879),\r\nlastResort=>WebGUI::International::get(880),\r\nnone=>WebGUI::International::get(881)\r\n}','[\'htmlArea\']',11,4,0); INSERT INTO userProfileField VALUES ('richEditorMode','WebGUI::International::get(882)',1,0,'select','{\r\ninline=>WebGUI::International::get(883),\r\npopup=>WebGUI::International::get(884)\r\n}','[\'inline\']',12,4,0); delete from international where internationalId=306 and namespace='WebGUI'; delete from international where languageId=1 and namespace='WebGUI' and internationalId=618; @@ -716,7 +716,8 @@ delete from international where languageId=1 and namespace='WebGUI' and internat insert into international (internationalId,languageId,namespace,message,lastUpdated) values (606,1,'WebGUI','Think of pages as containers for content. For instance, if you want to write a letter to the editor of your favorite magazine you\'d get out a notepad (or open a word processor) and start filling it with your thoughts. The same is true with WebGUI. Create a page, then add your content to the page.\r\n

\r\n\r\nTitle
\r\nThe title of the page is what your users will use to navigate through the site. Titles should be descriptive, but not very long.\r\n

\r\n\r\n\r\nMenu Title
\r\nA shorter or altered title to appear in navigation. If left blank this will default to Title.\r\n

\r\n\r\nHide from navigation?
\r\nSelect yes to hide this page from the navigation.\r\n

\r\nNOTE: This will not hide the page from the page tree or from the site map, only from navigation macros.\r\n

\r\n\r\n\r\nPage URL
\r\nWhen you create a page a URL for the page is generated based on the page title. If you are unhappy with the URL that was chosen, you can change it here.\r\n

\r\n\r\nLanguage
\r\nChoose the default language for this page. All WebGUI generated messages will appear in that language and the character set will be changed to the character set for that language.\r\n

\r\n\r\nRedirect URL
\r\nWhen this page is visited, the user will be redirected to the URL specified here. In order to edit this page in the future, you\'ll have to access it from the "Manage page tree." menu under "Administrative functions..."\r\n

\r\n\r\nTemplate
\r\nBy default, WebGUI has one big content area to place wobjects. However, by specifying a template other than the default you can sub-divide the content area into several sections.\r\n

\r\n\r\nSynopsis
\r\nA short description of a page. It is used to populate default descriptive meta tags as well as to provide descriptions on Site Maps.\r\n

\r\n\r\nMeta Tags
\r\nMeta tags are used by some search engines to associate key words to a particular page. There is a great site called Meta Tag Builder that will help you build meta tags if you\'ve never done it before.\r\n

\r\n\r\nAdvanced Users: If you have other things (like JavaScript) you usually put in the area of your pages, you may put them here as well.\r\n

\r\n\r\nUse default meta tags?
\r\nIf you don\'t wish to specify meta tags yourself, WebGUI can generate meta tags based on the page title and your company\'s name. Check this box to enable the WebGUI-generated meta tags.\r\n

\r\n\r\n\r\nStyle
\r\nBy default, when you create a page, it inherits a few traits from its parent. One of those traits is style. Choose from the list of styles if you would like to change the appearance of this page. See Add Style for more details.\r\n

\r\n\r\nIf you select "Yes" below the style pull-down menu, all of the pages below this page will take on the style you\'ve chosen for this page.\r\n

\r\n\r\nStart Date
\r\nThe date when users may begin viewing this page. Note that before this date only content managers with the rights to edit this page will see it.\r\n

\r\n\r\nEnd Date
\r\nThe date when users will stop viewing this page. Note that after this date only content managers with the rights to edit this page will see it.\r\n

\r\n\r\n\r\nOwner
\r\nThe owner of a page is usually the person who created the page. This user always has full edit and viewing rights on the page.\r\n

\r\nNOTE: The owner can only be changed by an administrator.\r\n

\r\n\r\n\r\nWho can view?
\r\nChoose which group can view this page. If you want both visitors and registered users to be able to view the page then you should choose the "Everybody" group.\r\n

\r\n\r\nWho can edit?
\r\nChoose the group that can edit this page. The group assigned editing rights can also always view the page.\r\n

\r\n\r\nYou can optionally recursively give these privileges to all pages under this page.\r\n

\r\n\r\nWhat next?
\r\nIf you leave this on the default setting you\'ll be redirected to the new page after creating it.\r\n

', 1044740204); delete from international where languageId=1 and namespace='WebGUI' and internationalId=886; insert into international (internationalId,languageId,namespace,message,lastUpdated) values (886,1,'WebGUI','Hide from navigation?', 1044727952); - +alter table MailForm_field add column width int(11) default NULL; +insert into international (internationalId,languageId,namespace,message,lastUpdated) values (887,1,'WebGUI','Midas (IE 6+ or Mozilla 1.3+)', 1045168392); diff --git a/lib/WebGUI/Form.pm b/lib/WebGUI/Form.pm index 10a9f4dbe..7df55fc90 100644 --- a/lib/WebGUI/Form.pm +++ b/lib/WebGUI/Form.pm @@ -684,6 +684,14 @@ sub HTMLArea { $output .= ''."\n"; $htmlArea = 1; } + } elsif ($session{user}{richEditor} eq "midas" && (($browser->ie && $browser->version >= 6) || ($browser->gecko && $browser->version >= 1.3))) { + $output .= ''; + $output .= $button; } elsif ($session{user}{richEditor} eq "classic" && $browser->ie && $browser->version >= 5) { $output .= ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/www/extras/midas/copy.gif b/www/extras/midas/copy.gif new file mode 100644 index 0000000000000000000000000000000000000000..9e27259c0eb8ea7966a8c5e6b6aac356a38e20b6 GIT binary patch literal 105 zcmZ?wbh9u|6lD-$5M*G`VE_UUyYaw*1ONa32XPr1n4DVrSDt>Wx2VRWMOw*JEP7+@ zeTQkj?Yt2VMoCMSy=jWeIx_2|_L0|ne&1D@*4V`H`=*97=Y@ySlJZNlvYXFlZJ)x# GU=09Gd?`5q literal 0 HcmV?d00001 diff --git a/www/extras/midas/cut.gif b/www/extras/midas/cut.gif new file mode 100644 index 0000000000000000000000000000000000000000..2a9448693ba03ba4b679983b9022f80ad80d42a8 GIT binary patch literal 88 zcmZ?wbh9u|6lD-$5M*G`VE_UUyYaw*0}KoeAT9#~lVMB$%F}QAk4!AMm8EeZ)T2LA n=2>q_2a8jKR1QP(hu2Oz4v))f@B6*~WSg{h(MJvq1_o;YJRBYr literal 0 HcmV?d00001 diff --git a/www/extras/midas/editor.html b/www/extras/midas/editor.html new file mode 100644 index 000000000..23689626c --- /dev/null +++ b/www/extras/midas/editor.html @@ -0,0 +1,383 @@ + + +Midas Demo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
Cut
+
+
Copy
+
+
Paste
+
+ + +
Undo
+
+
Redo
+
+ + + + +
Insert Table
+
Align Left
Center
Align Right
Ordered List
Unordered List
Outdent
Indent
+

+ + + + + + + + + + + + + + +
+ + + + + + +
Bold
+
+
Italic
+
+
Underline
+
+ +
Text Color
+
+ +
Background Color
+
+
+ + + + +
+ +View HTML Source + +Use CSS + +Finished Editing +
+ + + diff --git a/www/extras/midas/forecolor.gif b/www/extras/midas/forecolor.gif new file mode 100644 index 0000000000000000000000000000000000000000..bc5e1ddd2362cf9135939b17e2355f2aba0e6165 GIT binary patch literal 95 zcmZ?wbh9u|6lD-$5M*G`VE_UUyYaw*10Xg-0}wD-wDhk${dPS|jC0S-mSf9boz9gG tlayb!^l`A<^UX|h+KO^JR;-IE4q)KnYHwuuC}E=1f9mOl?HUXW)&NGEAa4Kw literal 0 HcmV?d00001 diff --git a/www/extras/midas/indent.gif b/www/extras/midas/indent.gif new file mode 100644 index 0000000000000000000000000000000000000000..aed9d88fc8718946fc80ab016a7db57fb755aa5c GIT binary patch literal 82 zcmZ?wbh9u|6lD-$5M*G`VE_UUyYaw*10Xg-0}wN5xAd<(z4qZEn}tr@ukSc4=+SLT gZwND5cE>Pirt`G-yIPmIS({DyzLcNGjf=q=0GP}hE&u=k literal 0 HcmV?d00001 diff --git a/www/extras/midas/italic.gif b/www/extras/midas/italic.gif new file mode 100644 index 0000000000000000000000000000000000000000..f2c13184590d9cb04cba1e8e2a38f59a123a5362 GIT binary patch literal 71 zcmZ?wbh9u|6lD-$5M*G`VE_UUyYaw*13+d&Lj#axQfTR4dHOB?;*y2eGFKgNh*?({ WcYsmRY})da$fw-LKkSWRh#?UwQg1f8>lU*E;&QTE3Srk+A3#JUNqp M)wXxs`m7Ar00DCotpET3 literal 0 HcmV?d00001 diff --git a/www/extras/midas/justifyleft.gif b/www/extras/midas/justifyleft.gif new file mode 100644 index 0000000000000000000000000000000000000000..306006f72e883a0f590d28328ef93486bf8f9950 GIT binary patch literal 64 zcmZ?wbh9u|6lD-$00JEl0b(~CIB)>SWRh>`UwQg1f8>lU*E$-v?tIN##qZH6v2!M` N)QWf9$2}MstN|Mr6iNU9 literal 0 HcmV?d00001 diff --git a/www/extras/midas/justifyright.gif b/www/extras/midas/justifyright.gif new file mode 100644 index 0000000000000000000000000000000000000000..6ca9dfe9e48e8d2811a4f5b12a2403c39377ce6d GIT binary patch literal 63 zcmZ?wbh9u|6lD-$00JEl0b(~CIB)>SWRh#?UwQg1f8>lU*E%L|wR|UEB5Tpfe{!bW M%5Cqs)ma&=0Rl%8xc~qF literal 0 HcmV?d00001 diff --git a/www/extras/midas/link.gif b/www/extras/midas/link.gif new file mode 100644 index 0000000000000000000000000000000000000000..5b72c548d238ea7eba0b80442052282ab06f4653 GIT binary patch literal 149 zcmZ?wbh9u|6lD-$P-0-vVE_UUyXnAz1HQh#3=Kg3|AvN!|Ns9p067f}%t;)(?))>* za$248MMqFifmMJ@MLp2jVhyvW%aIKdDcMej0bIu%%Xdu8+sJy*tUEd$L+fGYc&sFJlhq`z+epk0R|dy literal 0 HcmV?d00001 diff --git a/www/extras/midas/outdent.gif b/www/extras/midas/outdent.gif new file mode 100644 index 0000000000000000000000000000000000000000..90a234c93dd2b19c8446baa6c207c428efbd6837 GIT binary patch literal 82 zcmZ?wbh9u|6lD-$5M*G`VE_UUyYaw*10Xg-0}wN5xAd<(z4qZEn}tr@ukSc4=+SI) gZHR_0Em4Wi~s-t literal 0 HcmV?d00001 diff --git a/www/extras/midas/paste.gif b/www/extras/midas/paste.gif new file mode 100644 index 0000000000000000000000000000000000000000..e0f4e7e4098213e24e114864d3910911a7e36501 GIT binary patch literal 136 zcmZ?wbh9u|6lD-$P-0-vVE_UUyXnAz10Xg-!~g&P8$f{J|9=plIh149oqquO7SiQ4~{>a)`pz%RBN$X(3PLXpZUe6pfPkdZ) h=;a319D{4|U2}Z~S4$orw$#)&Qk`HR}KX literal 0 HcmV?d00001 diff --git a/www/extras/midas/redo.gif b/www/extras/midas/redo.gif new file mode 100644 index 0000000000000000000000000000000000000000..2b685c2d7cf8cbb30e76354aaf9e5816f976fc25 GIT binary patch literal 76 zcmZ?wbh9u|6lD-$5M*G`VE_UUyYaw*0}KoeKmZhAQf=v9dHOB?;yD2=(#u@Gr+ib5 bWN&&RR1~p!WwtQK6`$+hdY^kRGFSru8SxpJ literal 0 HcmV?d00001 diff --git a/www/extras/midas/table.gif b/www/extras/midas/table.gif new file mode 100644 index 0000000000000000000000000000000000000000..407c3ad4e71b02633c166e451b0ca7a9b0cf397c GIT binary patch literal 90 zcmZ?wbh9u|6lD-$5M*G`VE_UUyYaw*10Xg-!~g&PnT%WdSDt>$A3I}9kXXyT7?wM& q_l0;4G|XFOsioVt_9f4rj;Q@EXCh6