Bug 989268 - RFE: Generate a metadata javascript file when building book
Summary: RFE: Generate a metadata javascript file when building book
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CSProcessor
Version: 1.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-28 22:44 UTC by Matthew Casperson
Modified: 2014-08-04 22:27 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-09 00:07:17 UTC
Embargoed:


Attachments (Terms of Use)

Description Matthew Casperson 2013-07-28 22:44:54 UTC
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 05:17:10 UTC
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 07:39:02 UTC
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.