Opened 11 years ago

Closed 4 years ago

#52 closed Enhancement (Fixed)

Formatting Indicator Profile Data - Wiki Java Filter

Reported by: Garth Braithwaite Owned by: Kim Neerings
Priority: *High Milestone: 2.3 - Testing
Component: View-App Version: 2.3
Severity: Moderate Effort Keywords: indicator output
Cc: kneerings@…

Description (last modified by Garth Braithwaite)

Paul N. in NJ found a slick way of providing WIKI type formatting for the indicator profile data entered in the admin app. This solution involves using regular expressions and some javascript that does a s&r when a field is updated. A better solution is to code this as a post response java filter. This is not dependent on scripting and is much cleaner to implement and maintain.

Attachments (5)

Ticket52-Admin.PNG (47.8 KB) - added by Kim Neerings 5 years ago.
Ticket52-Admin-links.PNG (34.2 KB) - added by Kim Neerings 5 years ago.
Ticket52-View.PNG (113.5 KB) - added by Kim Neerings 5 years ago.
Ticket52-Admin-Title.PNG (14.0 KB) - added by Kim Neerings 5 years ago.
works in definition, but not in title
Ticket52-View-Title.PNG (13.9 KB) - added by Kim Neerings 5 years ago.

Download all attachments as: .zip

Change History (25)

comment:1 Changed 9 years ago by Lois Haggard

Milestone: Version 2.x+1
Version: 1.02.0

comment:2 Changed 8 years ago by Lois Haggard

Owner: changed from Garth Braithwaite to Garth

comment:3 Changed 8 years ago by Garth Braithwaite

Description: modified (diff)
Owner: changed from Garth to Java Developer

If this is wanted the admin app can be configured to handle all white space etc in the XML file. The view app could be configured to use a "yet to be written" filter that does the S&R for the wiki formatting to HTML code.

comment:4 Changed 8 years ago by (none)

Milestone Parking Lot deleted

comment:5 Changed 7 years ago by Garth Braithwaite

Milestone: Unassigned
Priority: MediumUnknown
Severity: Moderate Effort
Version: 2.0Unknown

comment:6 Changed 7 years ago by Garth Braithwaite

Owner: changed from Java Developer to unassigned

comment:7 Changed 7 years ago by Kim Neerings

Cc: kneerings@… added

comment:8 Changed 7 years ago by Eleanor Howell

Keywords: indicator output added

comment:9 Changed 7 years ago by Kathryn Marti

Version: UnknownParking Lot

comment:10 Changed 6 years ago by Lois Haggard

Milestone: Unassigned2.3 - Development
Priority: Unknown*High
Severity: Moderate EffortUnknown
Version: Parking Lot2.3

View app versus admin app. We need it in both places, right?

We can't put it in as html in the Admin DB, it has to be formatting that gets formatted at the time of publishing.

For the view app, we need a way to include it in our xml files.

comment:11 Changed 6 years ago by Garth Braithwaite

Milestone: 2.3 - Development2.3 - Testing
Owner: set to Testing
Severity: UnknownModerate Effort

comment:12 Changed 6 years ago by Garth Braithwaite

Solution provided SVN: 5974. Javascript, client side Wiki formatting. Markup supported:

headers “=”, subscript “,,”, super “^”, italics “''”, bold “'''”, strike “~~”, underline “__”, monospace “{{{“, links “[href title]”, unordered lists “*”, ordered lists “#”.  

To implement the following script needs to be included in the desired pages. This code can be put in the main ss.xslt file but then all pages will be processed for wiki codes - which is not needed. This code should be hooked into the IP ss.xslt and the query result ss.xslt and possibly a few other query pages - depends on where users are wanting to embed wiki codes. See the core code's main IP ss.xslt for an example of what is needed. Below is an example:

<script type="text/javascript" src="{$ibis.urlPrefix}js/jquery.wikitohtml.js"/> ... $(".Content").wikiToHTML();

To test:

  1. Make the script mods as defined above.
  2. Embed wiki formatting into the admin app's fields or edit the XML file and embed directly for testing
  3. Publish, and
  4. View the IP page.

NOTE:

  • This only works if the user's browser has javascript enabled.
  • This solution does NOT include any admin app formatting helpers - adopters will need to know the wiki coding and apply it manually.
  • Any script errors including state header code, doh code, custom navigation scripts etc could cause errors with the text processing.
  • Adopters will need to test heavily to make sure there a not any conflicts
Last edited 6 years ago by Garth Braithwaite (previous) (diff)

comment:13 Changed 5 years ago by kathie

Owner: changed from Testing to Kim Neerings

comment:14 Changed 5 years ago by Kim Neerings

Tested on Utah's dev site (ibisdev.health.utah.gov/ibisph-view and ibisdev.health.utah.gov/ibisph-admin). Found the following issues:

*monospace didn't seem to work, but I'm not exactly sure what it should be doing. I thought it would change the font to Courier or something, which it did not (see red circle in screenshots)

*header did not seem to work either (see yellow highlighting in screenshot)

*links did not work when coded as outlined above, but DID work when just inserting URL inside brackets (option 3 in attached screenshots)

Last edited 5 years ago by Kim Neerings (previous) (diff)

Changed 5 years ago by Kim Neerings

Attachment: Ticket52-Admin.PNG added

Changed 5 years ago by Kim Neerings

Attachment: Ticket52-Admin-links.PNG added

Changed 5 years ago by Kim Neerings

Attachment: Ticket52-View.PNG added

comment:15 Changed 5 years ago by Kim Neerings

Also, the formatting did not seem to work when used in the Indicator title (see attached attempted use of italics).

Changed 5 years ago by Kim Neerings

Attachment: Ticket52-Admin-Title.PNG added

works in definition, but not in title

Changed 5 years ago by Kim Neerings

Attachment: Ticket52-View-Title.PNG added

comment:16 Changed 5 years ago by Garth Braithwaite

Wiki Formatting only applies to the large text blocks. It will not work for titles and single entered lines.

comment:17 Changed 5 years ago by Garth Braithwaite

An example is the core code's IP wiki_test.xml

http://localhost/ibisph-view/indicator/view/wiki_test.html

The 2.3 release notes doc also has info about wiki formatting.

comment:18 Changed 5 years ago by Garth Braithwaite

Care MUST be exercised on certain fields like data notes and data issues. Text like * or will cause multiple UL/LI structures to be created. For fields like this it is NOT recommend to embed wiki formatting.

comment:19 Changed 5 years ago by Garth Braithwaite

If NBSP is wanted for wiki coding then a unique character sequence is needed. From my quick search I could not find anything that is standard wiki for nbsp's.

comment:20 Changed 4 years ago by Kim Neerings

Resolution: Fixed
Status: newclosed
Note: See TracTickets for help on using tickets.