Bug 220813 - Do not show the + sign if a task step conatins empty description in browsing and publishing pages
Summary: Do not show the + sign if a task step conatins empty description in browsing ...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EPF (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Hu Xiang Dong CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-28 14:43 EST by Bingxue Xu CLA
Modified: 2023-02-16 16:17 EST (History)
0 users

See Also:


Attachments
Suggested fix version 1 (2.23 KB, application/x-zip-compressed)
2008-03-19 20:06 EDT, Bingxue Xu CLA
no flags Details
A further refinement (9.06 KB, application/octet-stream)
2008-03-19 20:07 EDT, Bingxue Xu CLA
no flags Details
Fix for Bug#: 220813 (8.76 KB, application/octet-stream)
2008-03-23 23:07 EDT, Ming Gu CLA
no flags Details
Patch (8.18 KB, patch)
2008-03-23 23:16 EDT, Ming Gu CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bingxue Xu CLA 2008-02-28 14:43:14 EST
When a step has only a Name and no Content in the Description field, then, in Preview the expand option (+ sign) is seen for that particular step, eventhough it does not have any content. The same is true for publishing pages.

Please see whether or not this can be fixed.
Comment 1 Bingxue Xu CLA 2008-03-19 20:06:05 EDT
Created attachment 92978 [details]
Suggested fix version 1
Comment 2 Bingxue Xu CLA 2008-03-19 20:07:46 EDT
Created attachment 92979 [details]
A further refinement

Just another note about my detection of "empty" steps. The last fix looks for the first occurance of a table cell with no content - there should be one and only instance of <TD></TD> . However if the content author does any post-publishing editing and inserts a <TD></TD> before the text of a step then it will give the wrong result.

Here is revised ContentPageSubSection.js that loops through the step description, checking for any text in the step.
Comment 3 Ming Gu CLA 2008-03-23 23:07:22 EDT
Created attachment 93233 [details]
Fix for Bug#: 220813

Modification:
1. Replace <a noref> with <a> element at line 155 in order to make it work in mozilla firefox.
2. Add "toUpperCase" before invoking "indexOf"(In firefox, the function "indexOf" is case sensitive).
3. The attribute "src" of a image(self.stepCollapseLinks[i].firstChild.src/self.stepExpandLinks[i].firstChild.src) does not equal to this.collapseImage/this.expandImage because the "src" will be removed some unnecessary url information when it is assigned a url. Use condition "title != ''" instead at line 199&231.
Comment 4 Ming Gu CLA 2008-03-23 23:16:06 EDT
Created attachment 93234 [details]
Patch