Switcher between URL and Email in "My Checks" page.

This commit is contained in:
Pēteris Caune 2015-08-12 19:12:36 +03:00
parent 0501a131ae
commit 63bdd841fc
3 changed files with 30 additions and 2 deletions

View File

@ -60,3 +60,11 @@ table.table tr > th.th-name {
tr:hover .check-menu {
visibility: visible;
}
#show-urls.active, #show-emails.active {
color: #333;
}
.my-checks-email {
display: none;
}

View File

@ -106,5 +106,21 @@ $(function () {
return false;
});
$("#show-urls").click(function() {
$("#show-urls").addClass("active");
$(".my-checks-url").show();
$("#show-emails").removeClass("active");
$(".my-checks-email").hide();
});
$("#show-emails").click(function() {
$("#show-urls").removeClass("active");
$(".my-checks-url").hide();
$("#show-emails").addClass("active");
$(".my-checks-email").show();
});
});

View File

@ -4,7 +4,10 @@
<tr>
<th></th>
<th class="th-name">Name</th>
<th>URL</th>
<th>
<a id="show-urls" class="active" href="#">URL</a>
<a id="show-emails" href="#">Email</a>
</th>
<th class="th-period">
Period <br />
<span class="checks-subline">Grace</span>
@ -34,7 +37,8 @@
</span>
</td>
<td class="url-cell">
<code>{{ check.url }}</code>
<code class="my-checks-url">{{ check.url }}</code>
<code class="my-checks-email">{{ check.email }}</code>
</td>
<td class="timeout-cell">
<span