create web application

This commit is contained in:
2016-12-21 17:48:36 +01:00
parent 35054b00b8
commit d1e39513f3
65 changed files with 805 additions and 43 deletions

View File

@@ -0,0 +1 @@
db.base=/tmp/db

View File

@@ -0,0 +1 @@
db.base=/home/andi/ws/performanceDb/db

View File

@@ -0,0 +1,55 @@
body {
margin:0;
padding:0;
}
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
#top-menu-bar {
background-color: black;
color: white;
padding: 3px;
}
#logo {
font-weight: bold;
}
#search-bar {
background-color: #aaa;
text-align: right;
padding-bottom:3px;
}
#search-bar #search-query {
width:100%;
padding:2;
border:0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#search-bar #search-submit {
margin-right:3px;
}
#result-view {
background: red;
font-size: 32px;
}
#result-view i {
background: white;
display:inline;
font-style:normal;
line-height: 1.2em;
}

View File

@@ -0,0 +1,34 @@
.fa {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* makes the font 33% larger relative to the icon container */
.fa-lg {
font-size: 1.33333333em;
line-height: 0.75em;
vertical-align: -15%;
}
.fa-2x {
font-size: 2em;
}
.fa-3x {
font-size: 3em;
}
.fa-4x {
font-size: 4em;
}
.fa-5x {
font-size: 5em;
}
.fa-search:before {
content: "\f002";
}
.fa-icons:before {
content: "\f002";
}

View File

@@ -0,0 +1,8 @@
body, p, td, th, textarea
{
font-family: sans-serif;
}
textarea {
font-size:1.2em;
}

View File

@@ -0,0 +1,2 @@
/font-awesome-4.7.0/
/font-awesome-4.7.0.zip

View File

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="js/search.js"></script>
<link rel="stylesheet" type="text/css" href="css/typography.css">
<link rel="stylesheet" type="text/css" href="css/design.css">
<link rel="stylesheet" type="text/css" href="css/icons.css">
</head>
<body>
<div id="top-menu-bar">
<div id="logo">LOGO</div>
</div>
<div id="search-bar">
<textarea id="search-query"></textarea>
<button id="search-submit"><i class="fa fa-search"> Search</i></button>
</div>
<div id="result-view">
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,39 @@
$(document).ready(function(){
$('#search-submit').click(function(event){
event.preventDefault(); // prevent submit of form which would reload the page
var request = {};
request['query'] = $('#search-query').val();
var success = function(response){
$('#result-view').text("SUCCESS: "+response.imageUrls);
};
var error = function(e) {
//var response = JSON.parse(e.responseText);
$('#result-view').text("FAILED: " + JSON.stringify(e));
};
postJson("plots", request, success, error);
});
});
function postJson(url, requestData, successCallback, errorCallback) {
$.ajax({
type: "POST",
url: url,
data: JSON.stringify(requestData),
contentType: 'application/json'
})
.done(successCallback)
.fail(errorCallback);
}