Permalink
Browse files

platform tag, remove api from menu for beta

  • Loading branch information...
cfh463 committed Apr 11, 2013
1 parent aa6e77d commit e45f78fa59f648342dae3e9d080c25dbf4dd492c
View
24 api.rb
@@ -19,6 +19,9 @@ def self.getApiDesc(doc)
if !doc["MODULE"][0]["HELP_OVERVIEW"][0].nil? && doc["MODULE"][0]["HELP_OVERVIEW"][0].length >0
md = doc["MODULE"][0]["HELP_OVERVIEW"][0]
+ if !doc["MODULE"][0]["MORE_HELP"].nil? && !doc["MODULE"][0]["MORE_HELP"][0].nil? && doc["MODULE"][0]["MORE_HELP"][0].length >0
+ md +=doc["MODULE"][0]["MORE_HELP"][0]
+ end
end
#md += "\n\n" + doc["MODULE"][0]["MORE_HELP"][0]
# doc.elements.each("//MODULE") { |element|
@@ -330,8 +333,17 @@ def self.getproperties(doc)
end
if !element["APPLIES"].nil?
- propnote= "\n<table class='note'>\n<td class='icon'></td><td class='content'>Applies to: " + element["APPLIES"][0] + "</td>\n</table>\n\n"
+ # propnote= "\n<table class='note'>\n<td class='icon'></td><td class='content'>Applies to: " + element["APPLIES"][0] + "</td>\n</table>\n\n"
+ propnote= "(" + element["APPLIES"][0] + ")"
+ end
+ @propplatforms = "All"
+ if !element["PLATFORM"].nil?
+ @propplatforms = element["PLATFORM"][0]
end
+ @propsectionplatforms = "<div>"
+ @propsectionplatforms += "<p><strong>Platforms: </strong>#{@propplatforms} #{propnote}</p></div>"
+
+
if element["type"].nil?
proptype= " : <span class='text-info'>STRING</span>"
propusage=getpropusagetext(getApiName(doc),element["name"],'STRING',element["readOnly"],templatePropBag)
@@ -426,7 +438,7 @@ def self.getproperties(doc)
md += '<div id="cProperty' + propname + '" class="accordion-body collapse in">'
md +=' <div class="accordion-inner">'
- md += "#{@propdesc}#{propnote}#{propdefault}"
+ md += "#{@propdesc}#{@propsectionplatforms}#{propdefault}"
md += '<p><a href="#' + propname + 'Usage" class="btn" data-toggle="modal" title="View Usage">View Usage</a></p>'
md += @propvalues
@@ -588,6 +600,13 @@ def self.getmethods(doc)
methreturnparams = getparams(relement,false)
}
end
+ @methplatforms = "All"
+ if !element["PLATFORM"].nil?
+ @methplatforms = element["PLATFORM"][0]
+ end
+ @methsectionplatforms = "<div>"
+ @methsectionplatforms += "<p><strong>Platforms: </strong>#{@methplatforms}</p></div>"
+
@methsectionreturns = "<div>"
@methsectionreturns += "<p><strong>Return:</strong></p><ul>"
@methsectionreturns += "<li>#{@methreturn}#{@methreturndesc}#{methreturnparams}</li></ul></div>"
@@ -722,6 +741,7 @@ def self.getmethods(doc)
md +=' <div class="accordion-inner">'
md += "" + @methdesc + ""
+ md += @methsectionplatforms
md += "" + @methsectionparams + ""
md += @methsectionreturns
md += @methsectioncallbackparams
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -2,7 +2,7 @@
<div class="btn-group"><a href="#Properties" class="btn"><i class="icon-list"></i> Properties<sup>&nbsp;1</sup></a><button href="#" class="btn dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span>&nbsp;</button><ul class="dropdown-menu" style="max-height: 500px;overflow: auto;"><li><a href="#phomeKeyValue" data-target="cPropertyhomeKeyValue" class="autouncollapse">homeKeyValue</a></li></ul></div><div class="btn-group"><a href="#Methods" class="btn"><i class="icon-cog"></i> Methods<sup>&nbsp;3</sub></a><a class="btn dropdown-toggle" data-toggle="dropdown" data-target="#" href="#Methods" > <span class="caret"></span>&nbsp;</a><ul class="dropdown-menu" style="max-height: 500px;overflow: auto;"><li><a href="#mcaptureKey" data-target="cMethodcaptureKey" class="autouncollapse">captureKey</a></li><li><a href="#mcaptureTrigger" data-target="cMethodcaptureTrigger" class="autouncollapse">captureTrigger</a></li><li><a href="#mremapKey" data-target="cMethodremapKey" class="autouncollapse">remapKey</a></li></ul></div><div class="btn-group pull-right"><button class="btn" id="expandAll" data-toggle="tooltip" title="Expand/Collapse all"><i class="icon-th-list "></i>&nbsp;</button></div><div class="btn-group"><a href="#Remarks" class="btn"><i class="icon-warning-sign"></i> Remarks<sup>&nbsp;2</sup></a><button href="#" class="btn dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span>&nbsp;</button><ul class="dropdown-menu" style="max-height: 500px;overflow: auto;"><li><a href="#r0" data-target="rRemark0" class="autouncollapse">TODO - Include key capture table for function keys that is currently just under the configuration settings
page.</a></li><li><a href="#r1" data-target="rRemark1" class="autouncollapse">TODO - ENSURE ALL OTHER REMARKS FROM RE1 HELP FILE ARE CAPTURED</a></li></ul></div><div class="btn-group"><a href="#Examples" class="btn"><i class="icon-edit"></i> Examples<sup>&nbsp;1</sup></a><button href="#" class="btn dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span>&nbsp;</button><ul class="dropdown-menu" style="max-height: 500px;overflow: auto;"><li><a href="#e0" data-target="eExample0" class="autouncollapse">TODO - ADD EXAMPLES - THERE ARE LOTS IN THE RE1 HELP FILE</a></li></ul></div><div >
-todo. This is for hardware keys, not software keys... note recommended to use with SIP.
+todo. This is for hardware keys, not software keys... note recommended to use with SIP..
<a name='Examples'></a>
<h2><i class='icon-edit'></i>Examples</h2>
@@ -22,7 +22,7 @@ todo. This is for hardware keys, not software keys... note recommended to use w
<a name='Properties'></a>
<h2><i class='icon-list'></i>Properties</h2>
-<a name='phomeKeyValue'></a><div class='accordion property' id='phomeKeyValue'><div class="accordion-group"><div class="accordion-heading"><span class="accordion-toggle" data-toggle="collapse" href="#cPropertyhomeKeyValue"><strong>homeKeyValue</strong> : <span class='text-info'>STRING</span> <i class="icon-chevron-down pull-left"></i></span></div><div id="cPropertyhomeKeyValue" class="accordion-body collapse in"> <div class="accordion-inner">todo - Set to Disabled or the HomeKeyValue to be used.<p><strong>Default:</strong> Disabled</p><p><a href="#homeKeyValueUsage" class="btn" data-toggle="modal" title="View Usage">View Usage</a></p><p><div id="homeKeyValueUsage" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <h3 id="myModalLabel">KeyCapture.homeKeyValue</h3> </div> <div class="modal-body">
+<a name='phomeKeyValue'></a><div class='accordion property' id='phomeKeyValue'><div class="accordion-group"><div class="accordion-heading"><span class="accordion-toggle" data-toggle="collapse" href="#cPropertyhomeKeyValue"><strong>homeKeyValue</strong> : <span class='text-info'>STRING</span> <i class="icon-chevron-down pull-left"></i></span></div><div id="cPropertyhomeKeyValue" class="accordion-body collapse in"> <div class="accordion-inner">todo - Set to Disabled or the HomeKeyValue to be used.<div><p><strong>Platforms: </strong>All </p></div><p><strong>Default:</strong> Disabled</p><p><a href="#homeKeyValueUsage" class="btn" data-toggle="modal" title="View Usage">View Usage</a></p><p><div id="homeKeyValueUsage" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <h3 id="myModalLabel">KeyCapture.homeKeyValue</h3> </div> <div class="modal-body">
<strong>Ruby Usage</strong>
@@ -39,7 +39,7 @@ KeyCapture.homeKeyValue='some string';</code></pre> </div> <div class="modal-f
<a name='Methods'></a>
<h2><i class='icon-cog'></i>Methods</h2>
-<div class="accordion" id="accordion"><div class='accordion method' id='mcaptureKey'><div class="accordion-group"><div class="accordion-heading"><span class="accordion-toggle" data-toggle="collapse" href="#cMethodcaptureKey"><strong data-toggle="tooltip" title data-original-title="todo. If don't specify a callback then the value will be cleared - also add a return section. ">captureKey</strong>(<span class="text-info">BOOLEAN</span> dispatch, <span class="text-info">STRING</span> keyValue, <span class='text-info'>Callback &lt;Object&gt;</span> callback)<i class="icon-chevron-down pull-right"></i></span></div><div id="cMethodcaptureKey" class="accordion-body collapse in"> <div class="accordion-inner">todo. If don't specify a callback then the value will be cleared - also add a return section. <div><p><strong>Parameters</strong></p><ul><li>dispatch : <span class='text-info'>BOOLEAN</span><p>todo </p></li><li>keyValue : <span class='text-info'>STRING</span><p>todo - (string. Accept keys specified in hex or ALL). Has to be a string for backwards compatibility. Must be the numeric representation of that key, for hardware reasons. - use all keys to determine which key it is. </p></li><li>callback : <span class='text-info'>Callback &lt;Object&gt;</span> <span class='label label-info'>Optional</span> <p><p>The callback parameter can take on one of three forms</p><ol><li>Controller action URL<p>Ruby</p>
+<div class="accordion" id="accordion"><div class='accordion method' id='mcaptureKey'><div class="accordion-group"><div class="accordion-heading"><span class="accordion-toggle" data-toggle="collapse" href="#cMethodcaptureKey"><strong data-toggle="tooltip" title data-original-title="todo. If don't specify a callback then the value will be cleared - also add a return section. ">captureKey</strong>(<span class="text-info">BOOLEAN</span> dispatch, <span class="text-info">STRING</span> keyValue, <span class='text-info'>Callback &lt;Object&gt;</span> callback)<i class="icon-chevron-down pull-right"></i></span></div><div id="cMethodcaptureKey" class="accordion-body collapse in"> <div class="accordion-inner">todo. If don't specify a callback then the value will be cleared - also add a return section. <div><p><strong>Platforms: </strong>All</p></div><div><p><strong>Parameters</strong></p><ul><li>dispatch : <span class='text-info'>BOOLEAN</span><p>todo </p></li><li>keyValue : <span class='text-info'>STRING</span><p>todo - (string. Accept keys specified in hex or ALL). Has to be a string for backwards compatibility. Must be the numeric representation of that key, for hardware reasons. - use all keys to determine which key it is. </p></li><li>callback : <span class='text-info'>Callback &lt;Object&gt;</span> <span class='label label-info'>Optional</span> <p><p>The callback parameter can take on one of three forms</p><ol><li>Controller action URL<p>Ruby</p>
<pre class='CodeRay'><code>:::ruby
KeyCapture.captureKey(...., url_for :action => :mycallback)</code></pre><p>Javascript</p>
<pre class='CodeRay'><code>:::javascript
@@ -56,7 +56,7 @@ KeyCapture.captureKey(....,function(params){
<pre class='CodeRay'><code>:::ruby
KeyCapture.captureKey(...., mycallback() )</code></pre><p>Javascript</p>
ok <pre class='CodeRay'><code>:::javascript
-KeyCapture.captureKey(...., mycallback());</code></pre></li></ol></p></li></ul></div><div><p><strong>Return:</strong></p><ul><li>Void</li></ul></div><div><p><strong>Callback Returning Parameters</strong></p><ul><li>keyValue : <span class='text-info'>INTEGER</span><p>todo</p></li></ul></div> </div></div></div></div><div class='accordion method' id='mcaptureTrigger'><div class="accordion-group"><div class="accordion-heading"><span class="accordion-toggle" data-toggle="collapse" href="#cMethodcaptureTrigger"><strong data-toggle="tooltip" title data-original-title="todo. If don't specify a callback then the value will be cleared - also add a return section">captureTrigger</strong>()<i class="icon-chevron-down pull-right"></i></span></div><div id="cMethodcaptureTrigger" class="accordion-body collapse in"> <div class="accordion-inner">todo. If don't specify a callback then the value will be cleared - also add a return section<div><p><strong>Return:</strong></p><ul><li>Void</li></ul></div><div><p><strong>Callback Returning Parameters</strong></p><ul><li>triggerFlag : <span class='text-info'>INTEGER</span><p>todo</p></li></ul></div> </div></div></div></div><div class='accordion method' id='mremapKey'><div class="accordion-group"><div class="accordion-heading"><span class="accordion-toggle" data-toggle="collapse" href="#cMethodremapKey"><strong data-toggle="tooltip" title data-original-title="todo.">remapKey</strong>(<span class="text-info">STRING</span> keyValue, <span class="text-info">STRING</span> remapTo)<i class="icon-chevron-down pull-right"></i></span></div><div id="cMethodremapKey" class="accordion-body collapse in"> <div class="accordion-inner">todo.<div><p><strong>Parameters</strong></p><ul><li>keyValue : <span class='text-info'>STRING</span><p>todo - (string. Accept keys specified in hex NOT ALL) </p></li><li>remapTo : <span class='text-info'>STRING</span><p>todo - (string. Accept keys specified in hex NOT ALL) </p></li></ul></div><div><p><strong>Return:</strong></p><ul><li>Void</li></ul></div> </div></div></div></div></div>
+KeyCapture.captureKey(...., mycallback());</code></pre></li></ol></p></li></ul></div><div><p><strong>Return:</strong></p><ul><li>Void</li></ul></div><div><p><strong>Callback Returning Parameters</strong></p><ul><li>keyValue : <span class='text-info'>INTEGER</span><p>todo</p></li></ul></div> </div></div></div></div><div class='accordion method' id='mcaptureTrigger'><div class="accordion-group"><div class="accordion-heading"><span class="accordion-toggle" data-toggle="collapse" href="#cMethodcaptureTrigger"><strong data-toggle="tooltip" title data-original-title="todo. If don't specify a callback then the value will be cleared - also add a return section">captureTrigger</strong>()<i class="icon-chevron-down pull-right"></i></span></div><div id="cMethodcaptureTrigger" class="accordion-body collapse in"> <div class="accordion-inner">todo. If don't specify a callback then the value will be cleared - also add a return section<div><p><strong>Platforms: </strong>All</p></div><div><p><strong>Return:</strong></p><ul><li>Void</li></ul></div><div><p><strong>Callback Returning Parameters</strong></p><ul><li>triggerFlag : <span class='text-info'>INTEGER</span><p>todo</p></li></ul></div> </div></div></div></div><div class='accordion method' id='mremapKey'><div class="accordion-group"><div class="accordion-heading"><span class="accordion-toggle" data-toggle="collapse" href="#cMethodremapKey"><strong data-toggle="tooltip" title data-original-title="todo.">remapKey</strong>(<span class="text-info">STRING</span> keyValue, <span class="text-info">STRING</span> remapTo)<i class="icon-chevron-down pull-right"></i></span></div><div id="cMethodremapKey" class="accordion-body collapse in"> <div class="accordion-inner">todo.<div><p><strong>Platforms: </strong>All</p></div><div><p><strong>Parameters</strong></p><ul><li>keyValue : <span class='text-info'>STRING</span><p>todo - (string. Accept keys specified in hex NOT ALL) </p></li><li>remapTo : <span class='text-info'>STRING</span><p>todo - (string. Accept keys specified in hex NOT ALL) </p></li></ul></div><div><p><strong>Return:</strong></p><ul><li>Void</li></ul></div> </div></div></div></div></div>
<a name='Remarks'></a>
<h2><i class='icon-warning-sign'></i>Remarks</h2>
Oops, something went wrong.

0 comments on commit e45f78f

Please sign in to comment.