This commit is contained in:
Kyle Hornberg
2014-02-21 15:10:45 -06:00
parent 11f99a7206
commit e7d2ee8000
2 changed files with 23 additions and 8 deletions

View File

@@ -1,15 +1,21 @@
<div class="btn-group pull-left space-right">
<div class="btn-group pull-left space-right" id="branchList">
<button class="btn dropdown-toggle" data-toggle="dropdown">browsing: <strong>{{ branch }}</strong> <span class="caret"></span></button>
<ul class="dropdown-menu">
<div class="dropdown-menu">
<div class="search">
<input class="search" placeholder="Filter branch/tags" autofocus>
</div>
<ul class="unstyled list">
<li class="dropdown-header">Branches</li>
{% for item in branches %}
<li><a href="{{ path('branch', {repo: repo, branch: item}) }}">{{ item }}</a></li>
<li><a href="{{ path('branch', {repo: repo, branch: item}) }}"><span class="item">{{ item }}</span></a></li>
{% endfor %}
{% if tags %}
<li class="dropdown-header">Tags</li>
{% for item in tags %}
<li><a href="{{ path('branch', {repo: repo, branch: item}) }}">{{ item }}</a></li>
<li><a href="{{ path('branch', {repo: repo, branch: item}) }}"><span class="item">{{ item }}</span></a></li>
{% endfor %}
{% endif %}
</ul>
</div>
</div>

View File

@@ -42,7 +42,16 @@ $(function () {
paginate();
});
if ($('#repositories').length) {
var listOptions = {
valueNames: ['name']
};
var repoList = new List('repositories', listOptions);
}
if ($('#branchList').length) {
var listBranchOptions = {
valueNames: ['item']
};
var repoList = new List('branchList', listBranchOptions);
}