Files
elasticsearch-js/scripts/generate/templates/api_method_list.tmpl

33 lines
821 B
Cheetah

<%
function esc(str) {
return str.replace(/\|/g, '&#124;');
}
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(/^.*\./, '') %><%
})
})
%>