Skip to content

Commit

Permalink
Can now toggle package stories
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Oct 28, 2013
1 parent e9053f9 commit 64e6d43
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 19 deletions.
44 changes: 29 additions & 15 deletions web/client/css/goconvey.css
Original file line number Diff line number Diff line change
Expand Up @@ -213,33 +213,47 @@ a.link-fa:hover {



.failure-shortcuts,
.panic-shortcuts,
.builds-shortcuts {
margin-bottom: 1em;
}

.failure-shortcuts a,
.panic-shortcuts a,
.builds-shortcuts a {
line-height: 1.5em;
.toggle {
text-decoration: none !important;
color: #666 !important;
}

a.toggle, .toggle-spacing {
.toggle-package-shortcuts,
.toggle-spacer {
padding: 0 5px;
display: inline-block;
}

a.goto,
a.toggle {
.goto,
.toggle {
text-decoration: none !important;
color: #666 !important;
}

a.goto:hover,
a.toggle:hover {
.goto:hover,
.toggle:hover {
color: #000 !important;
}








.failure-shortcuts,
.panic-shortcuts,
.builds-shortcuts {
margin-bottom: 1em;
}

.failure-shortcuts a,
.panic-shortcuts a,
.builds-shortcuts a {
line-height: 1.5em;
}

.failure-shortcuts a {
color: #E79C07;
}
Expand Down
5 changes: 3 additions & 2 deletions web/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ <h1>GoConvey</h1>
{{.}}
<div class="package-shortcut">
{{if TestResults|notempty}}
<a href="javascript:" class="toggle"><i class="fa fa-expand-o fa-lg"></i></a>
<a href="javascript:" class="toggle toggle-package-shortcuts"><i class="fa fa-expand-o fa-lg"></i></a>
{{else}}
<span class="toggle-spacing"><i class="fa fa-square-o"></i></span>
<span class="toggle-spacer"><i class="fa fa-square-o"></i></span>
{{/if}}

<a href="#package-{{_id}}" class="goto-package">{{PackageName|chopEnd>23|boldPkgName}}</a>
Expand Down Expand Up @@ -296,6 +296,7 @@ <h1>GoConvey</h1>
<table class="package-story templated">
<tr class="depth-0" id="package-{{_id}}">
<th colspan="3">
<a href="javascript:" class="toggle toggle-package-stories"><i class="fa fa-collapse-o fa-lg"></i></a>
{{PackageName}}
</th>
</tr>
Expand Down
15 changes: 13 additions & 2 deletions web/client/js/goconvey.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,23 @@ $(function()
});
});

// For expanding-collapsing the package/testfunc lists
// TOGGLES
// Toggle a toggle's icon to expand/contract when clicked
$('body').on('click', '.toggle', function()
{
$(this).next('a').next('.testfunc-list').toggle(65);
$('.fa', this).toggleClass('fa-collapse-o').toggleClass('fa-expand-o');
});
// Package/testfunc lists
$('body').on('click', '.toggle-package-shortcuts', function()
{
$(this).next('a').next('.testfunc-list').toggle(65);
});
// Package stories
$('body').on('click', '.toggle-package-stories', function()
{
$(this).closest('tr').siblings().toggle();
});
// END TOGGLES

function update()
{
Expand Down

0 comments on commit 64e6d43

Please sign in to comment.