1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-22 07:25:46 +01:00

Get rid of template.map overloading, add standard "usage" template for ex/vi/option

This commit is contained in:
Kris Maglione
2008-10-08 03:41:55 +00:00
parent 10376ecb77
commit 4ff5adcc4e
6 changed files with 26 additions and 41 deletions

View File

@@ -280,15 +280,7 @@ const liberator = (function () //{{{
else
{
// TODO: clicking on these should open the help
var usage = <table>
{
liberator.template.map(liberator.commands, function (command)
<tr>
<td class="hl-Title" style="padding-right: 20px">{command.name}</td>
<td>{command.description}</td>
</tr>)
}
</table>;
var usage = liberator.template.usage(liberator.commands);
liberator.echo(usage, liberator.commandline.FORCE_MULTILINE);
}
},
@@ -361,15 +353,7 @@ const liberator = (function () //{{{
else
{
// TODO: clicking on these should open the help
var usage = <table>
{
liberator.template.map(liberator.options, function (option)
<tr>
<td class="hl-Title" style="padding-right: 20px">{option.name}</td>
<td>{option.description}</td>
</tr>)
}
</table>;
var usage = liberator.template.usage(liberator.options);
liberator.echo(usage, liberator.commandline.FORCE_MULTILINE);
}
},
@@ -523,15 +507,7 @@ const liberator = (function () //{{{
else
{
// TODO: clicking on these should open the help
var usage = <table>
{
liberator.template.add(liberator.mappings, function (mapping)
<tr>
<td class="hl-Title" style="padding-right: 20px"> {mapping.names[0]}</td>
<td>{mapping.description}</td>
</tr>)
}
</table>;
var usage = liberator.template.usage(liberator.mappings);
liberator.echo(usage, liberator.commandline.FORCE_MULTILINE);
}
},