summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alex@spline.inf.fu-berlin.de>2014-11-18 05:22:34 +0100
committerAlexander Sulfrian <alex@spline.inf.fu-berlin.de>2014-11-19 02:15:55 +0100
commit0bfe5fad665a1d75b194a49c8f8f58624a08f478 (patch)
treeb46d2d2ea478cfb2258c3ea037b5712da52038d3
parent8d602926f15f34cce578e50dbaa5877f47a5318d (diff)
downloadpadlite-teams-0bfe5fad665a1d75b194a49c8f8f58624a08f478.tar.gz
padlite-teams-0bfe5fad665a1d75b194a49c8f8f58624a08f478.tar.bz2
padlite-teams-0bfe5fad665a1d75b194a49c8f8f58624a08f478.zip
templates/index: collapse create group form with js
-rw-r--r--templates/index.html31
-rw-r--r--templates/layout.html6
2 files changed, 23 insertions, 14 deletions
diff --git a/templates/index.html b/templates/index.html
index dddf664..f5cf4d8 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -18,19 +18,28 @@
<div class="panel panel-default">
<div class="panel-heading">
- <h3 class="panel-title">Create new group</h3>
+ <h3 class="panel-title">
+ <a data-toggle="collapse" href="#collapseCreate">
+ Create new group
+ </a>
+ </h3>
</div>
- <div class="panel-body">
- <form class="form-horizontal" role="form" method="POST">
- {% for field in create_form %}
- {{ render_field(field) }}
- {% endfor %}
- <div class="form-group">
- <div class="col-lg-offset-2 col-lg-10">
- <button type="submit" class="btn btn-default">Create group</button>
+ <div id="collapseCreate" class="panel-collapse collapse in">
+ <div class="panel-body">
+ <form class="form-horizontal" role="form" method="POST">
+ {% for field in create_form %}
+ {{ render_field(field) }}
+ {% endfor %}
+ <div class="form-group">
+ <div class="col-lg-offset-2 col-lg-10">
+ <button type="submit" class="btn btn-default">Create group</button>
+ </div>
</div>
- </div>
- </form>
+ </form>
+ </div>
</div>
</div>
+<script type="text/javascript">
+ $('#collapseCreate').collapse('hide');
+</script>
{% endblock %}
diff --git a/templates/layout.html b/templates/layout.html
index 80b69a3..185bd2f 100644
--- a/templates/layout.html
+++ b/templates/layout.html
@@ -7,6 +7,9 @@
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet" media="screen">
<link href="{{ url_for('static', filename='css/bootstrap-theme.min.css') }}" rel="stylesheet" media="screen">
+ <script src="{{ url_for('static', filename='js/jquery-1.10.2.min.js') }}"></script>
+ <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
+
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="{{ url_for('static', filename='js/html5shiv.js') }}"></script>
@@ -75,9 +78,6 @@
{% endfor %}
{% block content %}{% endblock %}
-
- <script src="{{ url_for('static', filename='js/jquery.js') }}"></script>
- <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
</div>
</body>
</html>