Tactical commit during work on user interface

This commit is contained in:
Simon Brooke 2018-06-30 19:19:01 +01:00
parent 23a3e71464
commit e6d6109575
6 changed files with 58 additions and 33 deletions

1
.gitignore vendored
View file

@ -10,6 +10,7 @@ pom.xml.asc
/resources/public/content/.git /resources/public/content/.git
/resources/public/vendor /resources/public/vendor
/bower_components/ /bower_components/
/resources/public/js/lib/
.lein-deps-sum .lein-deps-sum
.lein-repl-history .lein-repl-history
.lein-plugins/ .lein-plugins/

View file

@ -61,7 +61,9 @@
[lein-less "1.7.5"] [lein-less "1.7.5"]
[lein-codox "0.10.3"]] [lein-codox "0.10.3"]]
:bower-dependencies [[leaflet "0.7.3"]] :bower-dependencies [[leaflet "0.7.3"]
[jquery "3.3.1"]]
:bower {:directory "resources/public/js/lib"}
:cucumber-feature-paths ["test/clj/features"] :cucumber-feature-paths ["test/clj/features"]

View file

@ -28,8 +28,8 @@
<!-- ATTENTION \/ --> <!-- ATTENTION \/ -->
<!-- ATTENTION /\ --> <!-- ATTENTION /\ -->
<!-- Leaflet --> <!-- Leaflet -->
<link rel="stylesheet" href="vendor/leaflet/dist/leaflet.css" /> <link rel="stylesheet" href="js/lib/leaflet/dist/leaflet.css" />
<script src="vendor/leaflet/dist/leaflet.js"></script> {% script "js/lib/leaflet/dist/leaflet.js" %}
{% script "/js/app.js" %} {% script "/js/app.js" %}
{% endblock %} {% endblock %}

View file

@ -19,14 +19,30 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
</title> </title>
{% endblock %} {% endblock %}
{% block big-links %}
{% block content %}
<form id='content' class='list'>
<div class='big-link-container'> <div class='big-link-container'>
<a href='form-addresses-Address'> <a href='form-addresses-Address' class="big-link">
Add a new Address Add a new Address
</a> </a>
</div> </div>
<div class='big-link-container'>
<a role="button" class="big-link" id="next-selector" href="javascript:void(0)"
onclick="document.querySelector('content').submit()">
Next
</a>
</div>
{% endblock %}
{% block content %}
<form id='content' class='list'>
{% csrf-field %}
<input id="offset" type="hidden" value="{{offset|0}}"/>
<input id="limit" type="hidden" value="{{limit|50}}"/>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
<table caption='addresses'> <table caption='addresses'>
<thead> <thead>
<tr> <tr>
@ -114,12 +130,6 @@ View
{% endfor %} {% endfor %}
</tbody> </tbody>
<tfoot> <tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot> </tfoot>
</table> </table>
</form> </form>
@ -172,3 +182,10 @@ GNU General Public License version 2.0
</footer> </footer>
{% endblock %} {% endblock %}
{% block extra-script %}
var form = document.getElementById("content");
document.getElementById("next-selector").addEventListener("click", function () {
form.submit();
});
{% endblock %}

View file

@ -1,6 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
{% block head %}
<!-- head: if you want entire custom head content, override this block. -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/> <meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="css/yyy-common.css" /> <link rel="stylesheet" type="text/css" href="css/yyy-common.css" />
@ -8,10 +10,12 @@
<link rel="stylesheet" type="text/css" href="css/spinner.css" /> <link rel="stylesheet" type="text/css" href="css/spinner.css" />
<link href="https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow" rel="stylesheet"/> <link href="https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow" rel="stylesheet"/>
<title>{{site-title}}: {{title}}</title> <title>{{site-title}}: {{title}}</title>
{% script "js/lib/jquery/dist/jquery.min.js" %}
{% block extra-head %} {% block extra-head %}
<!-- extra-head: put any additional markup to go into the head of your document into this block --> <!-- extra-head: put any additional markup to go into the head of your document into this block -->
<!-- e.g. script tags, link tags --> <!-- e.g. script tags, link tags -->
{% endblock %} {% endblock %}
{% endblock %}
</head> </head>
<body> <body>
{% block whole-page %} {% block whole-page %}
@ -32,7 +36,7 @@
{% endif %} {% endif %}
</menu> </menu>
</div> </div>
<img id="site-logo" src="{{site-logo}}" alt="{{site-title}}" width="64" height="64"/> <!-- img id="site-logo" src="{{site-logo}}" alt="{{site-title}}" width="64" height="64"/ -->
<h1>{{title}}</h1> <h1>{{title}}</h1>
</header> </header>
{% endblock %} {% endblock %}

View file

@ -22,7 +22,8 @@
<link href="https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow" rel="stylesheet"/> <link href="https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow" rel="stylesheet"/>
<title>{{site-title}}: {{title}}</title> <title>{{site-title}}: {{title}}</title>
</head> </head>
<top> </top> <top>
</top>
<foot> <foot>
<footer> <footer>
<div id="credits"> <div id="credits">