Bootstrap v3, edge case fixes

This commit is contained in:
nikolark committed 2013-12-02 10:31:18 +01:00
1 parent 3bb521db39
commit 7f84c936ab
32 files changed
+9356 -2075

No files matched your search

+5 -4
View File
@@ -18,12 +18,13 @@
{% include "nav.html" %}
{%endblock%}
</header>
<div id="container" class="container-fluid">
<div id="container" class="container">
{%block content%}
{%endblock%}
<div id="footer" class="row-fluid">
<div class="span12">
<div id="footer" class="row">
<div class="col-xs-12">
{%block footer %}
<br />
<img src="{{ STATIC_URL }}img/edb_brick.png" alt="EDB" />
{%endblock%}
</div>
@@ -31,7 +32,7 @@
</div>
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/bootstrap-collapse.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/collapse.js"></script>
{%block tailinc %}
{%endblock%}
</body>
+5 -5
View File
@@ -4,10 +4,10 @@
{% endblock %}
{% block content %}
<section id="deposit" class="row-fluid">
<section id="deposit" class="row">
{% if messages %}
<section class="row-fluid">
<div class="span4">
<section class="row">
<div class="col-xs-4">
{% for message in messages %}
<div {% if message.tags %} class="alert alert-{{ message.tags }}"{% endif %}>{{ message }}<a class="close" data-dismiss="alert">×</a></div>
{% endfor %}
@@ -17,7 +17,7 @@
<form id="order" method="post" class="form-stacked" autocomplete="off">
{% csrf_token %}
<fieldset>
<section id="customer" class="row-fluid">
<section id="customer" class="row">
<h2>Hvem skal sette inn penger?</h2>
<!-- Typeahead customer field -->
<input name="customer_name" id="id_customer_typeahead" type="text" value="" data-provide="typeahead" data-source="{{users_js}}" />
@@ -45,7 +45,7 @@
</section>
</fieldset>
<div class="form-actions">
  <button type="submit" class="btn btn-large btn-primary" name="submit_order">Sett inn</button>
  <button type="submit" class="btn btn-lg btn-primary" name="submit_order">Sett inn</button>
  <a href="{% url register %}" class="btn">Avbryt</a>
</div>
</form>
+2 -2
View File
@@ -4,8 +4,8 @@
{%endblock%}
{%block content%}
<div class="row-fluid">
<section class="span4">
<div class="row">
<section class="col-xs-4">
<h1>Biceps Bar System</h1>
</section>
</div>
+11 -11
View File
@@ -4,18 +4,18 @@
{% endblock %}
{% block content %}
<section id="log" class="row-fluid">
<section id="log" class="row">
{% if messages %}
<section class="row-fluid">
<div class="span4">
<section class="row">
<div class="col-xs-4">
{% for message in messages %}
<div {% if message.tags %}class="alert alert-{{ message.tags }}"{% endif %}>{{ message }}<a class="close" data-dismiss="alert">×</a></div>
{% endfor %}
</div>
</section>
{% endif %}
<section id="orders" class="row-fluid">
<div class="span12">
<section id="orders" class="row">
<div class="col-xs-12">
{% if not limit %}
<h2 title="Alle registrerte ordre">Alle ordre</h2><br />
<a href="{% url log %}">Vis kun siste</a>
@@ -30,7 +30,7 @@
<th>Hvem</th>
<th>Hva</th>
<th>Sum</th>
<th>Handling</th>
<!--<th>Handling</th>-->
</tr>
</thead>
<tbody>
@@ -41,15 +41,15 @@
<td>{% for line in order.orderline_set.all %}
<span class="amount">{{ line.amount}}</span> <a href="#" class="product" title="{{ line.unit_price}} per">{{ line.product }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</td>
<td>{{ order.order_sum }}</td>
<td>{% include "modal-delete-order.html" with order=order %}<a class="btn btn-danger" data-toggle="modal" href="#modal-order-{{order.id}}"><i class="icon-trash icon-white"></i> Slett</a></td>
<!--<td><{% include "modal-delete-order.html" with order=order %}<a class="btn btn-danger" data-toggle="modal" href="#modal-order-{{order.id}}"><i class="icon-trash icon-white"></i> Slett</a></td>-->
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
<section id="transactions" class="row-fluid">
<div class="span12">
<section id="transactions" class="row">
<div class="col-xs-12">
{% if not limit %}
<h2 title="Alle registrerte transaksjoner">Alle transaksjoner</h2>
<br /><a href="{% url log %}#transactions">Vis kun siste</a>
@@ -63,7 +63,7 @@
<th>Når</th>
<th>Hvem</th>
<th>Innskudd</th>
<th>Handling</th>
<!--<th>Handling</th>-->
</tr>
</thead>
<tbody>
@@ -72,7 +72,7 @@
<td>{{ t.created }}</td>
<td>{% if t.user.get_profile.image %}<img src="{{ t.user.get_profile.image }}" class="customer" title="{{ t.user.first_name }} {{ t.user.last_name|slice:":1"}}" />{% else %}{{ t.user.first_name }} {{ t.user.last_name|slice:":1"}}{% endif %}</td>
<td>{{ t.amount }}</td>
<td>{% include "modal-delete-transaction.html" with t=t %}<a class="btn btn-danger" data-toggle="modal" href="#modal-trans-{{t.id}}"><i class="icon-trash icon-white"></i> Slett</a></td>
<!--<td>{% include "modal-delete-transaction.html" with t=t %}<a class="btn btn-danger" data-toggle="modal" href="#modal-trans-{{t.id}}"><i class="icon-trash icon-white"></i> Slett</a></td>-->
</tr>
{% endfor %}
</tbody>
+25 -26
View File
@@ -1,26 +1,25 @@
<nav class="navbar navbar-inverse">
<div class="navbar-inner">
<div class="container">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a href="/" class="brand">Biceps Bar System - BBS</a>
<div class="nav-collapse">
<ul class="nav">
{% if active %}
<li class="{% if active = "register" %}active{% endif %}"><a href="/register"><i class="icon-home icon-white"></i> Kjøp drikke</a></li>
<li class="{% if active = "deposit" %}active{% endif %}"><a href="/deposit">Sett inn penger</a></li>
<li class="{% if active = "log" %}active{% endif %}"><a href="/log"> Vis logg</a></li>
<li class="{% if active = "stats" %}active{% endif %}"><a href="/stats"> Vis statistikk</a></li>
{% if request.user.is_superuser %}
<li><a href="/admin">Administrasjon</a></li>
{% endif %}
{% endif %}
</ul>
</div>
</div>
</div>
</nav>
<nav class="navbar navbar-inverse" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">Biceps Bar System - BBS</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="{% if active = "register" %}active{% endif %}"><a href="/register"><i class="glyphicon glyphicon-home white"></i> Kjøp drikke</a></li>
<li class="{% if active = "deposit" %}active{% endif %}"><a href="/deposit">Sett inn penger</a></li>
<li class="{% if active = "log" %}active{% endif %}"><a href="/log"> Vis logg</a></li>
<li class="{% if active = "stats" %}active{% endif %}"><a href="/stats"> Vis statistikk</a></li>
{% if request.user.is_superuser %}
<li><a href="/admin">Administrasjon</a></li>
{% endif %}
</ul>
</div><!-- /.navbar-collapse -->
</nav>
+30 -17
View File
@@ -4,10 +4,10 @@
{% endblock %}
{% block content %}
<section id="register" class="row-fluid">
<section id="register" class="row">
{% if messages %}
<section class="row-fluid">
<div class="span4">
<section class="row">
<div class="col-xs-4">
{% for message in messages %}
<div {% if message.tags %}class="alert alert-{{ message.tags }}"{% endif %}>{{ message }}<a class="close" data-dismiss="alert">×</a></div>
{% endfor %}
@@ -22,14 +22,24 @@
<input type="hidden" name="form-INITIAL_FORMS" value="{{ products|length }}" id="id_form-INITIAL_FORMS" />
<input type="hidden" name="form-MAX_NUM_FORMS" id="id_form-MAX_NUM_FORMS" />
<section id="customer" class="row-fluid">
<section id="customer">
{% if users %}
<div class="span12">
<h2 title="Sortert etter hvem som kjøpte noe sist.">Hvem kjøper?</h2>
<!-- Typeahead customer field -->
<input name="customer_name" type="text" id="id_customer_typeahead" value="" data-provide="typeahead" data-source="{{users_js}}" />
<!-- Actual customer select field (hidden) -->
<div style="display:none;">{{orderform.customer }}</div>
<div class="row">
<div class="col-xs-12">
<h2 title="Sortert etter hvem som kjøpte noe sist.">Hvem kjøper?</h2>
</div>
</div>
<div class="row">
<div class="col-xs-3">
<!-- Typeahead customer field -->
<input name="customer_name" type="text" id="id_customer_typeahead" value="" data-provide="typeahead" data-source="{{users_js}}" class="form-control" />
<!-- Actual customer select field (hidden) -->
<div style="display:none;">{{orderform.customer }}</div>
<br />
</div>
</div>
<div class="row">
<div class="col-xs-12">
<ul class="well">
{% for user in users %}<li class="customer{% if user.get_profile.last_purchase_date < half_a_year_ago %} infrequent hidden{% endif %}">
{% if user.get_profile.image %}
@@ -45,17 +55,20 @@
<div class="users-description pull-right">
<small>Viser: De med minst <strong>{{ cheapest_product_price }}</strong> i saldo<span class="infrequent-users"> og mer enn ett kjøp siden <strong>{{ half_a_year_ago }}</strong></span>. <a href="#" class="toggle-infrequent-users">Vis alle</a></small>
</div>
</div>
</div>
{%else%}
<div class="span3">
<div class="row">
<div class="col-xs-3">
<h2>Hvem kjøper?</h2>
<div class="alert alert-error">Ingen har positiv saldo i BBS.</div><a href="{% url deposit %}" class="btn">Sett inn penger</a>
</div>
</div>
{%endif%}
</section>
<section id="products" class="row-fluid">
<div class="span12">
<section id="products" class="row">
<div class="col-xs-12">
<h2>Kjøper hva?</h2>
<ul class="well">
{% for product in products %}
@@ -76,17 +89,17 @@
</section>
</fieldset>
<div class="form-actions">
<div class="span3 total">
<div class="col-xs-3 total">
<h2>Totalt: <span class="total_text"></span></h2>
</div>
  <button type="submit" class="btn btn-large btn-primary" name="submit_order">Kjøp</button>
  <button type="reset" class="btn">Start på nytt</button>
  <button type="submit" class="btn btn-lg btn-primary" name="submit_order">Kjøp</button>
  <button type="reset" class="btn btn-default">Start på nytt</button>
</div>
</form>
</section>
{% endblock %}
{% block tailinc %}
<!--<script src="{{ STATIC_URL }}js/bootstrap-typeahead.js"></script>-->
<script src="{{ STATIC_URL }}js/bootstrap-tooltip.js"></script>
<script src="{{ STATIC_URL }}js/tooltip.js"></script>
<script src="{{ STATIC_URL }}js/register.js"></script>
{% endblock %}
+10 -11
View File
@@ -4,33 +4,33 @@
{% endblock %}
{% block content %}
<section id="stats" class="row-fluid">
<section id="products_realtime" class="row-fluid">
<div class="span12">
<section id="stats" class="row">
<section id="products_realtime" class="row">
<div class="col-xs-12">
<h2>Realtime produkter</h2>
<div id="products_realtime_chart"></div>
</div>
</section>
<section id="product" class="row-fluid">
<section id="product" class="row">
<h2>Produkter</h2>
{% for product in products %}
<section id="product_{{ product.id }}">
<div class="span6">
<div class="col-xs-6">
<div id="product_chart{{ product.id }}"></div>
</div>
</section>
{% endfor %}
</section>
<section id="order_hourly" class="row-fluid">
<section id="order_hourly" class="row">
<h2>Time for time</h2>
<div class="span11">
<div class="col-xs-12">
<div id="order_hourly_chart"></div>
</div>
</section>
<section id="order" class="row-fluid">
<div class="span12">
<section id="order" class="row">
<div class="col-xs-12">
<h2>Ordre</h2>
<div id="order_chart"></div>
</div>
@@ -41,8 +41,7 @@
</section>
{% endblock %}
{% block tailinc %}
<script src="{{ STATIC_URL }}js/bootstrap-typeahead.js"></script>
<script src="{{ STATIC_URL }}js/bootstrap-tooltip.js"></script>
<script src="{{ STATIC_URL }}js/tooltip.js"></script>
<script src="{{ STATIC_URL }}js/highcharts.js"></script>
<script src="{{ STATIC_URL }}js/underscore-min.js"></script>
<script src="{{ STATIC_URL }}js/stats.js"></script>