|
[
Permlink
| « Hide
]
Savitha Prakash added a comment - 25-Feb-2009 08:18
A method "doPlainTextAndLimit" has been added to the Validator. This can be used to strip, trim and add ellipse to a text. A patch to add such a functionality is attached.
Hi Savitha,
Why does this method ignore the case of "<br/>"? Sometimes, even when there is no description, it might contain </br>, which is misleading as it might think that is has some content and in the process adds the ellipse. To avoid this, I have added a check.
If the text contains only </br>, we don't need to convert to plain text or trim it or add ellipse, as it will just be displayed as empty. I slightly modified the patch to accommodate for the empty text.
seems like that there are many more tags present for an empty text from the fck editor. Some of them are " ", " " "" ;"<br>"; "<br/>"; Empty"< br type="_moz" /> and many more.
So I was thinking it would be better to first implement in the tool itself, where ever it is required, monitor its working, and then probably plan to move it into kernel. RTE is being planned to be removed and just retain plain text for group description. Hence, strip html and trim feature is required only for site description. We have to target the following for site desciption-
site-manage ---------------- M site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-list.vm M site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-siteInfo-list.vm M site-manage-tool/tool/src/webapp/vm/sitebrowser/chef_sitebrowser_list.vm M site-manage-tool/tool/src/webapp/vm/membership/chef_membership.vm M site-manage-tool/tool/src/webapp/vm/membership/chef_membership_joinable.vm M site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-siteInfo-list.vm Feature has been added to siteAction
r58432 Feature added to sitebrowser for list view
r58443 This feature for membership is part of the branch https://source.sakaiproject.org/svn/site-manage/branches/SAK-15142/
Branch has been merged to trunk r58448 Membership action name is changed to membershipTextEdit instead of membershioFormattedText.
r58449 Feature has been added to sitebrowser, siteaction and membership tools. Following are the functions available for these tools-
1. For worksitesetup and site info - use $siteTextEdit.doPlainTextAndLimit(String formattedText, int maxNumOfChars, String ellipse) 2. For Site browser (available only for list view) - use $siteBrowserTextEdit.doPlainTextAndLimit(String formattedText, int maxNumOfChars, String ellipse) 3. Membership - $membershipTextEdit.doPlainTextAndLimit(String formattedText, int maxNumOfChars, String ellipse) doPlainTextAndLimit returns empty string if the text contains empty characters
r58576 Fix to
r58700 r58701 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||