App.apiDocumentationListView = new ApiDocumentationListView
collection: App.webServices
app: App
- App.layout.resultsRegion.reset()
App.layout.resultsRegion.show App.apiDocumentationListView
if (Backbone.history.fragment)
App.router.show Backbone.history.fragment, trigger: true
class WebServices extends Backbone.Collection
model: WebService
+ comparator: 'path'
initialize: ->
@includeInternals = false
r.webServices.map (webService) ->
_.extend webService
- comparator: (item) -> item.get('path')
-
toggleInternals: ->
if @includeInternals
@includeInternals = false
else
@includeInternals = true
- @.fetch()
+ @fetch()
initialize: (app) ->
@app = app.app
- @.listenTo(@app.webServices, "change", @app.refresh)
+ @listenTo(@app.webServices, 'sync', @app.refresh)
) ->
class WebService extends Backbone.Model
- idAttribute: 'path'
+ idAttribute: 'path'
+
+ initialize: (options) ->
+ @set 'internal', _.every options.actions, (action) -> action.internal
</h3>
<span class="subtitle">
{{#if since}}Since {{since}}{{#if internal}} -{{/if}}{{/if}}
- {{#if internal}}For internal use only{{/if}}
+ {{#if internal}}<span class="internal">For internal use only</span>{{/if}}
</span>
<p>{{{description}}}</p>
{{#if params}}
<div class="line line-small">
<h1>{{path}}</h1>
<span class="subtitle">{{{description}}}</span>
+ {{#if internal}}<span class="subtitle internal">internal</span>{{/if}}
</div>
.navigator-details { margin-left: 0; }
+ .internal {
+ color: @navigatorBarBackground;
+ background-color: rgb(127, 127, 127);
+ border-radius: 2px;
+ padding: 1px 5px;
+ }
}