33 lines
821 B
Cheetah
33 lines
821 B
Cheetah
<%
|
|
function esc(str) {
|
|
return str.replace(/\|/g, '|');
|
|
}
|
|
|
|
var topActions = [];
|
|
var names = {};
|
|
|
|
_.each(actions, function (action) {
|
|
if (action.name.indexOf('.') > -1) {
|
|
var space = _.studlyCase(action.name.split('.').slice(0, -1).join('.'));
|
|
if (!names[space]) {
|
|
names[space] = [];
|
|
}
|
|
names[space].push(action);
|
|
} else {
|
|
topActions.push(action);
|
|
}
|
|
}); %>
|
|
|
|
ul<%
|
|
_.each(topActions, function (action) {%>
|
|
li: a(href="api.html#<%= action.name.toLowerCase().replace(/[^\w]+/g, '-') %>") <%= action.name %><%
|
|
});
|
|
_.each(Object.keys(names).sort(), function (namespace) {%>
|
|
h3 <%= namespace %>
|
|
ul<%
|
|
_.each(names[namespace], function (action) {%>
|
|
li: a(href="api.html#<%= action.name.toLowerCase().replace(/[^\w]+/g, '-') %>") <%= action.name.replace(/^.*\./, '') %><%
|
|
})
|
|
})
|
|
%>
|