Skip to content
Snippets Groups Projects
Commit 1fd68fbd authored by Taddeüs Kroes's avatar Taddeüs Kroes
Browse files

Added score coloring

parent a8208d23
No related branches found
No related tags found
No related merge requests found
CACHE_DIR := .cache CACHE_DIR := .cache
WWW_DIR := www WWW_DIR := www
LIB_DIR := vendor LIB_DIR := vendor
SCRIPTS := forms scores plot SCRIPTS := forms scores plot match
STYLES := main STYLES := main
LOCALE_DIR := locale LOCALE_DIR := locale
LOCALES := nl_NL LOCALES := nl_NL
......
...@@ -54,7 +54,30 @@ $lg-width: 1200px ...@@ -54,7 +54,30 @@ $lg-width: 1200px
border: none border: none
outline: none outline: none
width: 100% width: 100%
background-color: #fff background-color: transparent
$yellow: #F5F52C
$red: #F25E5E
$blue: #728EED
$black: #303030
$white: #F2F2F2
&.recurve.colored
.val-10, .val-9
background-color: $yellow
.val-8, .val-7
background-color: $red
.val-6, .val-5
background-color: $blue
.val-4, .val-3
background-color: $black
color: white
.val-2, .val-1
background-color: $white
.panel textarea .panel textarea
border: none border: none
...@@ -68,7 +91,10 @@ $lg-width: 1200px ...@@ -68,7 +91,10 @@ $lg-width: 1200px
.actions .actions
margin-bottom: 15px margin-bottom: 15px
float: right
.actions-responsive
float: left
.btn .btn
.glyphicon .glyphicon
display: none display: none
...@@ -76,7 +102,7 @@ $lg-width: 1200px ...@@ -76,7 +102,7 @@ $lg-width: 1200px
display: inline-block display: inline-block
@media (max-width: $sm-width - 1) @media (max-width: $sm-width - 1)
.actions .actions-responsive
float: right float: right
.btn .btn
.glyphicon .glyphicon
...@@ -111,4 +137,3 @@ td ...@@ -111,4 +137,3 @@ td
@media (min-width: $sm-width) @media (min-width: $sm-width)
td.sm-stretch td.sm-stretch
width: 100% width: 100%
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="form-actions col-sm-offset-2 col-sm-10"> <div class="form-actions col-sm-offset-2 col-sm-10">
<div class="btn-group actions"> <div class="btn-group actions actions-responsive">
<a href="matches" class="btn btn-default" title="{_'Cancel'}"> <a href="matches" class="btn btn-default" title="{_'Cancel'}">
<span class="glyphicon glyphicon-remove"></span> <span class="glyphicon glyphicon-remove"></span>
<span class="text">{_'Cancel'}</span> <span class="text">{_'Cancel'}</span>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</p> </p>
<form action="match/{$match->id}" method="post"> <form action="match/{$match->id}" method="post">
<div class="btn-group actions"> <div class="btn-group actions actions-responsive">
<a href="match/{$match->id}" class="btn btn-default" title="{_'Cancel'}"> <a href="match/{$match->id}" class="btn btn-default" title="{_'Cancel'}">
<span class="glyphicon glyphicon-remove"></span> <span class="glyphicon glyphicon-remove"></span>
<span class="text">{_'Cancel'}</span> <span class="text">{_'Cancel'}</span>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="form-actions col-sm-offset-2 col-sm-10"> <div class="form-actions col-sm-offset-2 col-sm-10">
<div class="btn-group actions"> <div class="btn-group actions actions-responsive">
<button type="submit" name="send" class="btn btn-primary" title="{_'Save'}"> <button type="submit" name="send" class="btn btn-primary" title="{_'Save'}">
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<span class="text">{_'Save'}</span> <span class="text">{_'Save'}</span>
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</div> </div>
</div> </div>
<div class="actions"> <div class="actions actions-responsive">
<button type="submit" class="btn btn-primary" title="{_'Save'}"> <button type="submit" class="btn btn-primary" title="{_'Save'}">
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<span class="text">{_'Save'}</span> <span class="text">{_'Save'}</span>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</div> </div>
*} *}
<table class="table table-bordered table-condensed match"> <table id="match" class="table table-bordered table-condensed match {$match->discipline}">
<thead> <thead>
<tr> <tr>
<th class="separator"></th> <th class="separator"></th>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<tr n:foreach="$rows as $i => $row"> <tr n:foreach="$rows as $i => $row">
<th class="separator">{$i + 1}</th> <th class="separator">{$i + 1}</th>
<td n:foreach="$row as $j => $arrow" <td n:foreach="$row as $j => $arrow"
n:class="$j == $match->arrows - 1 ? separator"> class="val-{$arrow} {$j == $match->arrows - 1 ? separator}">
<input type="text" disabled value="{$arrow}"> <input type="text" disabled value="{$arrow}">
</td> </td>
<td>{$sum = array_sum($row)}</td> <td>{$sum = array_sum($row)}</td>
...@@ -75,20 +75,34 @@ ...@@ -75,20 +75,34 @@
</div> </div>
<div class="btn-group actions"> <div class="btn-group actions">
<a href="javascript:void(0)" id="toggle-colored" class="btn btn-default"
title="{_'Show/hide colors'}">
<span class="glyphicon glyphicon-tint"></span>
{*<span class="text">{_'Show/hide colors'}</span>*}
</a>
<a href="match/{$match->id}/edit" class="btn btn-default" title="{_'Edit metadata'}"> <a href="match/{$match->id}/edit" class="btn btn-default" title="{_'Edit metadata'}">
<span class="glyphicon glyphicon-cog"></span> <span class="glyphicon glyphicon-cog"></span>
<span class="text">{_'Edit metadata'}</span> {*<span class="text">{_'Edit metadata'}</span>*}
</a> </a>
<a href="match/{$match->id}/scores" class="btn btn-default" title="{_'Edit scores'}"> <a href="match/{$match->id}/scores" class="btn btn-default" title="{_'Edit scores'}">
<span class="glyphicon glyphicon-pencil"></span> <span class="glyphicon glyphicon-pencil"></span>
<span class="text">{_'Edit scores'}</span> {*<span class="text">{_'Edit scores'}</span>*}
</a> </a>
<a href="match/{$match->id}/delete" class="btn btn-danger" title="{_'Delete'}"> <a href="match/{$match->id}/delete" class="btn btn-danger" title="{_'Delete'}">
<span class="glyphicon glyphicon-trash"></span> <span class="glyphicon glyphicon-trash"></span>
<span class="text">{_'Delete'}</span> {*<span class="text">{_'Delete'}</span>*}
</a> </a>
</div> </div>
</div> </div>
</div> </div>
{/block} {/block}
{block scripts}
<script type="text/javascript">
$('#toggle-colored').click(function() {
$(this).toggleClass('active');
$('#match').toggleClass('colored');
});
</script>
{/block}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment