Closed
Bug 294121
Opened 19 years ago
Closed 19 years ago
Make nc:platform a whitespace-separated list of values in content pack RDF
Categories
(SeaMonkey :: Help Viewer, enhancement)
SeaMonkey
Help Viewer
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.8beta2
People
(Reporter: jwalden+fxhelp, Assigned: jwalden+fxhelp)
Details
Attachments
(1 file)
3.01 KB,
patch
|
chofmann
:
approval1.8b2+
|
Details | Diff | Splinter Review |
In bug 254992 we added an attribute to Help content pack RDF so that data specified in RDF (glossary, table of contents, index, etc.) could be platform-specific. I've been working on updating/editing content pack docs on <http://developer-test.mozilla.org/docs/Help_Viewer:Creating_a_Help_Content_Pack> and have encountered the problem that specifying something this way requires duplication of the proper panel description *four* separate times if the application using it expects to be usable on any platform: once each for win/unix/os2/mac. Firefox will be used on all these platforms, so this will grow unwieldy very quickly. We need to change nc:platform to be a space-separated list of platforms, such that all the following would be valid, properly-parsed values for a nc:platform attribute: (not present) "win" "mac unix" "os2 win mac" ...and so on. The patch for both toolkit and Seamonkey viewers is minimal (11 lines of changes), and I intend that this get in before the last 1.8 freeze.
Assignee | ||
Comment 1•19 years ago
|
||
If the attribute isn't present, the default value of the current platform is returned and thus is later found in the list when checking whether to bail. If it is present, it's split up by whitespace. Then we bail if the user's platform isn't found in the platform list (indexOf returns -1 if the value isn't found in the array). This should work even if the attribute has only one platform, which is verifiable by evaluating the following in the JS Console (it returns 0): "Hello".split(/\s+/).indexOf("Hello"); (Just to be certain, Neil, your review is good for r+sr in Seamonkey and r in toolkit, right?)
Attachment #183562 -
Flags: first-review?(neil.parkwaycc.co.uk)
Assignee | ||
Comment 2•19 years ago
|
||
Comment on attachment 183562 [details] [diff] [review] Modify nc:platform to be a space-separated list of values For review purposes, pretend that "panelPlatform" in Seamonkey code has been replaced by "panelPlatforms" (a trivial mistake). If this patch passes muster, I'll make sure to make the change on check-in.
Comment 3•19 years ago
|
||
Comment on attachment 183562 [details] [diff] [review] Modify nc:platform to be a space-separated list of values If it wasn't clear, omitting the platforn resource is equivalent to specifying all platforms (for convenience and backward compatibility).
Attachment #183562 -
Flags: first-review?(neil.parkwaycc.co.uk) → first-review+
Assignee | ||
Comment 4•19 years ago
|
||
Comment on attachment 183562 [details] [diff] [review] Modify nc:platform to be a space-separated list of values This patch makes specifying platform-specific documentation that is relevant to more than one platform more compact. I changed both Seamonkey and toolkit viewers to maintain content pack compatibility.
Attachment #183562 -
Flags: approval1.8b2?
Comment 5•19 years ago
|
||
Comment on attachment 183562 [details] [diff] [review] Modify nc:platform to be a space-separated list of values a=chofmann
Attachment #183562 -
Flags: approval1.8b2? → approval1.8b2+
Assignee | ||
Comment 6•19 years ago
|
||
Checked in, marking as fixed.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta2
Updated•8 years ago
|
Product: Toolkit → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•