Bug 989268 - RFE: Generate a metadata javascript file when building book
RFE: Generate a metadata javascript file when building book
Status: CLOSED CURRENTRELEASE
Product: PressGang CCMS
Classification: Community
Component: CSProcessor (Show other bugs)
1.1
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lee Newson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-28 18:44 EDT by Matthew Casperson
Modified: 2014-08-04 18:27 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-08 20:07:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthew Casperson 2013-07-28 18:44:54 EDT
To support integrating topics into websites as callouts, the CSProcessor should generate a javascript file called "pressgang_website.js" in the Publican files directory.

The format of this file is shown below. It follows the JSONP format, calling the pressgang_website_callback function with a dictionary that maps CSS element selectors with information about the topics that relate to them.

The "css_selector" strings are the values assigned to the "PressGang Websites Element ID" extended property (id 37), and will probably look like "#SearchButton". The "fixed url" strings are the values assigned to the "Fixed URL" extended property (id 20).

pressgang_website_callback({
    "css_selector1": {"target":"fixed url", "topicid":"12345"},
    "css_selector2": {"target":"fixed url", "topicid":"12346"},
    "css_selector3": {"target":"fixed url", "topicid":"12347"},
    etc...
});

The callback will then use this information to associate help topics with specific UI elements.
Comment 1 Matthew Casperson 2013-07-29 01:17:10 EDT
On second thought this should just be an array of topic ids, fixed urls and titles.

pressgang_website_callback([
  {"topicId":12345,"target":"Fixed URL","title":"Topic Title 1"},
  {"topicId":12346,"target":"Fixed URL","title":"Topic Title 1"},
  etc...
]);
Comment 3 Matthew Casperson 2013-07-31 03:39:02 EDT
I have incorporated the javascript file into the dev instance of the UI, and it is working great.

I'd like to get the objects in the array to include the value of property tag 37. That has been repurposed to indicate which version of the UI the topic contains new information for. With this information we can indicate new features as they become available.

If property tag 37 is assigned to a topic more than once, just include the largest/latest value (sorted alphabetically).

E.g.

pressgang_website_callback([
  {"topicId":12345,"target":"Fixed URL","title":"Topic Title 1","newSince":""},
  {"topicId":12346,"target":"Fixed URL","title":"Topic Title 1","newSince":"201308031011"},
  etc...
]);

Note You need to log in before you can comment on or make changes to this bug.