Commit 87e59957 authored by jkerr's avatar jkerr
Browse files

Done all but reviews and tweaks

parent 3402f0da
......@@ -2,8 +2,13 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="cccfd40b-d5c2-4431-bcfd-f34d25764049" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/admin.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/scripts/getbookings.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/scripts/reviews.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/map.js" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/map.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/style/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.css" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
......@@ -16,13 +21,32 @@
<executable />
</execution>
</component>
<component name="DockManager">
<window id="1">
<content type="file-editors">
<state>
<leaf>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/scripts/data/bookings.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="24" column="18" selection-start-line="24" selection-start-column="18" selection-end-line="24" selection-end-column="18" />
</state>
</provider>
</entry>
</file>
</leaf>
</state>
</content>
</window>
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/scripts/map.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="510">
<caret line="34" column="16" selection-start-line="34" selection-start-column="16" selection-end-line="34" selection-end-column="16" />
<state relative-caret-position="105">
<caret line="7" column="73" lean-forward="true" selection-start-line="7" selection-start-column="73" selection-end-line="7" selection-end-column="73" />
<folding>
<element signature="e#9#15#0" expanded="true" />
</folding>
......@@ -30,14 +54,55 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="795">
<caret line="53" column="12" selection-start-line="53" selection-start-column="12" selection-end-line="53" selection-end-column="12" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/admin.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="21" column="25" lean-forward="true" selection-start-line="21" selection-start-column="25" selection-end-line="21" selection-end-column="25" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/scripts/data/reviews.json">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/scripts/reviews.js">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="20" selection-end-column="20" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/style/style.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="670">
<caret line="175" column="14" selection-start-line="175" selection-start-column="14" selection-end-line="175" selection-end-column="14" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="AMD JavaScript File" />
<option value="HTML File" />
<option value="CSS File" />
<option value="HTML File" />
<option value="JavaScript File" />
</list>
</option>
......@@ -55,6 +120,7 @@
<find>log</find>
<find>json</find>
<find>map.js:51 You clicked the map at LatLng</find>
<find>table</find>
</findStrings>
<replaceStrings>
<replace>console</replace>
......@@ -73,20 +139,23 @@
<option value="$PROJECT_DIR$/scripts/data/tentInfo.html" />
<option value="$PROJECT_DIR$/scripts/data/vanInfo.html" />
<option value="$PROJECT_DIR$/scripts/leaflet/leafletAjax.js" />
<option value="$PROJECT_DIR$/scripts/switchbooking.js" />
<option value="$PROJECT_DIR$/index.html" />
<option value="$PROJECT_DIR$/scripts/setbooking.js" />
<option value="$PROJECT_DIR$/scripts/data/POI.geojson" />
<option value="$PROJECT_DIR$/scripts/data/POI.json" />
<option value="$PROJECT_DIR$/style/style.css" />
<option value="$PROJECT_DIR$/scripts/filterSites.js" />
<option value="$PROJECT_DIR$/scripts/data/POI.json" />
<option value="$PROJECT_DIR$/scripts/getbookings.js" />
<option value="$PROJECT_DIR$/scripts/switchbooking.js" />
<option value="$PROJECT_DIR$/index.html" />
<option value="$PROJECT_DIR$/scripts/map.js" />
<option value="$PROJECT_DIR$/style/style.css" />
<option value="$PROJECT_DIR$/admin.html" />
<option value="$PROJECT_DIR$/scripts/reviews.js" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="y" value="23" />
<option name="width" value="1189" />
<option name="width" value="1014" />
<option name="height" value="1347" />
</component>
<component name="ProjectLevelVcsManager">
......@@ -97,6 +166,7 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
......@@ -109,12 +179,6 @@
<item name="assignment-1" type="462c0819:PsiDirectoryNode" />
<item name="scripts" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="assignment-1" type="b2602c69:ProjectViewProjectNode" />
<item name="assignment-1" type="462c0819:PsiDirectoryNode" />
<item name="scripts" type="462c0819:PsiDirectoryNode" />
<item name="data" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="assignment-1" type="b2602c69:ProjectViewProjectNode" />
<item name="assignment-1" type="462c0819:PsiDirectoryNode" />
......@@ -124,7 +188,6 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
......@@ -175,7 +238,8 @@
<workItem from="1566278943384" duration="34000" />
<workItem from="1566340107468" duration="6269000" />
<workItem from="1566359872857" duration="22497000" />
<workItem from="1566431482065" duration="6241000" />
<workItem from="1566431482065" duration="6354000" />
<workItem from="1566445705210" duration="9085000" />
</task>
<task id="LOCAL-00001" summary="First Commit">
<created>1565679239864</created>
......@@ -233,17 +297,24 @@
<option name="project" value="LOCAL" />
<updated>1566437728002</updated>
</task>
<option name="localTasksCounter" value="9" />
<task id="LOCAL-00009" summary="Added buttons to map, still need listeners">
<created>1566437881009</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1566437881009</updated>
</task>
<option name="localTasksCounter" value="10" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="49804000" />
<option name="totallyTimeSpent" value="59002000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1189" height="1347" extended-state="0" />
<frame x="0" y="23" width="1014" height="1347" extended-state="0" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.22580644" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.20987654" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
......@@ -285,13 +356,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/data/tentInfo.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="53" lean-forward="true" selection-start-line="3" selection-start-column="53" selection-end-line="3" selection-end-column="53" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/data/vanInfo.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
......@@ -318,13 +382,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/data/bookings.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="24" column="18" lean-forward="true" selection-start-line="24" selection-start-column="18" selection-end-line="24" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/data/._campsites.json">
<provider selected="true" editor-type-id="text-editor" />
</entry>
......@@ -335,57 +392,95 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/switchbooking.js">
<entry file="file://$PROJECT_DIR$/scripts/setbooking.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="17" column="30" selection-start-line="17" selection-start-column="30" selection-end-line="17" selection-end-column="30" />
<state relative-caret-position="240">
<caret line="16" column="5" lean-forward="true" selection-start-line="16" selection-start-column="5" selection-end-line="16" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/setbooking.js">
<entry file="file://$PROJECT_DIR$/scripts/data/POI.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="16" column="5" lean-forward="true" selection-start-line="16" selection-start-column="5" selection-end-line="16" selection-end-column="5" />
<state relative-caret-position="750">
<caret line="50" column="19" lean-forward="true" selection-start-line="50" selection-start-column="19" selection-end-line="50" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/filterSites.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="173">
<caret line="27" column="20" selection-start-line="27" selection-start-column="20" selection-end-line="27" selection-end-column="20" />
<state relative-caret-position="428">
<caret line="44" column="16" selection-end-line="90" selection-end-column="37" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/data/POI.json">
<entry file="file://$PROJECT_DIR$/scripts/data/bookings.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="5" selection-start-line="3" selection-start-column="5" selection-end-line="3" selection-end-column="5" />
<state relative-caret-position="360">
<caret line="24" column="18" selection-start-line="24" selection-start-column="18" selection-end-line="24" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/style/style.css">
<entry file="file://$PROJECT_DIR$/scripts/getbookings.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="762">
<caret line="115" column="16" selection-start-line="115" selection-start-column="16" selection-end-line="115" selection-end-column="16" />
<state relative-caret-position="375">
<caret line="25" column="17" lean-forward="true" selection-start-line="25" selection-start-column="17" selection-end-line="25" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.html">
<entry file="file://$PROJECT_DIR$/scripts/data/tentInfo.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="720">
<caret line="48" column="27" lean-forward="true" selection-start-line="48" selection-start-column="27" selection-end-line="48" selection-end-column="27" />
<state relative-caret-position="45">
<caret line="3" column="53" lean-forward="true" selection-start-line="3" selection-start-column="53" selection-end-line="3" selection-end-column="53" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/switchbooking.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="13" column="27" selection-start-line="13" selection-start-column="27" selection-end-line="13" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/map.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="510">
<caret line="34" column="16" selection-start-line="34" selection-start-column="16" selection-end-line="34" selection-end-column="16" />
<state relative-caret-position="105">
<caret line="7" column="73" lean-forward="true" selection-start-line="7" selection-start-column="73" selection-end-line="7" selection-end-column="73" />
<folding>
<element signature="e#9#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/style/style.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="670">
<caret line="175" column="14" selection-start-line="175" selection-start-column="14" selection-end-line="175" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="795">
<caret line="53" column="12" selection-start-line="53" selection-start-column="12" selection-end-line="53" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/admin.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="21" column="25" lean-forward="true" selection-start-line="21" selection-start-column="25" selection-end-line="21" selection-end-column="25" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/data/reviews.json">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/scripts/reviews.js">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="20" selection-end-column="20" />
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>QuickCamp</title>
<link rel="stylesheet" href="style/style.css">
<script src="scripts/jquery-3.3.1.min.js"></script>
<script src="scripts/getbookings.js"></script>
</head>
<body>
<header>
<h1><a href="index.html">QuickCamp</a></h1>
<div id="bookingTypes">
<h2 class="bookType"></h2>
<h2 class="bookType">Admin Page</h2>
<h2 class="bookType"></h2>
</div>
</header>
<main id="admin">
<div id="bookingBox">
<table id="bookings">
<tr id="tableHead">
<th>Number</th>
<th>Name</th>
<th>Check In</th>
<th>Check Out</th>
</tr>
</table>
</div>
<figure id="photo"><img src=""></figure>
</main>
<section id="palette">
<section id="black"></section>
<section id="darkblue"></section>
<section id="medblue"></section>
<section id="lightblue"></section>
<section id="white"></section>
<p id="lato">Lato Text</p>
<p id="opensans">Opensans text</p>
<p id="quicksand">Quicksand text</p>
<p id="ubuntu">Ubuntu text</p>
</section>
</body>
</html>
\ No newline at end of file
......@@ -16,46 +16,45 @@
<body>
<header>
<h1><a href="index.html">QuickCamp</a></h1>
</header>
<div id="bookingTypes">
<div>
<h2 class="bookType">Book Cabin</h2>
<h2 class="bookType">Book Van Site</h2>
<h2 class="bookType">Book Tent Site</h2>
</div>
<h2 class="bookType">Book Cabin</h2>
<h2 class="bookType">Book Van Site</h2>
<h2 class="bookType">Book Tent Site</h2>
</div>
</header>
<main>
<section id="infoContainer">
<div id="placedInfo">
<h2>Welcome:</h2>
<p>Here at QuickCamp camping ground, we offer only the best cabins, as well as tent and caravan sites.</p>
</div>
</section>
<section id="book">
<h2>Book a Site:</h2>
<input id="submit" name="submit" type="submit" value="Search">
<form>
<input id="submit" name="submit" type="submit" value="Search">
<input id="name" name="name" type="text"><label id="first" for="name">Full Name</label>
<input id="checkIn" name="checkIn" type="date"><label for="checkIn">Check In</label>
<input id="checkOut" name="checkIn" type="date"><label for="checkOut">Check Out</label>
<input id="siteType" name="siteType' type='text" value="any">
<input id="siteType" name="siteType' type='text" value="any" hidden>
</form>
<div id="foundBox">
<table id="found">
<tr id="tableHead">
<th>Number</th>
<th>Type</th>
<th>Description</th>
<th>Price Per Night</th>
</tr>
</table>
</div>
</section>
<section>
<section id="mapContainer">
<div id="map"></div>
</section>
</section>
<div id="mapContainer">
<div id="map"></div>
</div>
<div id="foundBox">
<table id="found">
<tr id="tableHead">
<th>Number</th>
<th>Type</th>
<th>Description</th>
<th>Price Per Night</th>
</tr>
</table>
</div>
<figure id="photo"><img src=""></figure>
</main>
......
var GetBookings = (function () {
pub = {};
/** When the search button is pushed**/
pub.setup = function() {
console.log("grsgs");
$.getJSON("scripts/data/bookings.json", function(data) {
for (i = 0; i < data.bookings.booking.length; i++) {
cBook = data.bookings.booking[i];
tableAdd(cBook);
}
});
}
/** Addes a site to the table **/
function tableAdd(booking) {
checkIn = booking.checkin.day+"-"+booking.checkin.month+"-"+booking.checkin.year;
checkOut = booking.checkout.day+"-"+booking.checkout.month+"-"+booking.checkout.year;
$("#bookings").append("<tr class='resultRow'>"+
"<td>"+booking.number+"</td>"+
"<td>"+booking.name+"</td>"+
"<td>"+checkIn+"</td>"+
"<td>"+checkOut+"</td>"+
"</tr>");
}
return pub;
})();
$(document).ready(GetBookings.setup);
\ No newline at end of file
var Map = (function () {
pub = {};
var map;
var markers = L.layerGroup();
/** Setup Function **/
pub.setup = function() {
map = L.map('map').setView([-45.858578, 170.527263], 17.45);
......@@ -14,18 +14,21 @@ var Map = (function () {
}).addTo(map);
/** Adds buttons above map **/
$("#mapContainer").prepend("<button id='mapShowAll'>Show All</button>" +
"<button id='mapShowRes'>Show Restaurants</button>" +
"<button id='mapShowAttr'>Show Attractions</button>");
$("#mapContainer").parent().prepend("" +
"<div id='mapButtons'><input type='button' id='mapShowAll' value='Show All'></input>" +
"<input type='button' id='mapShowRes' value='Show Restaurants'></input>" +
"<input type='button' id='mapShowAttr' value='Show Attractions'></input></div>");
// NEED TO ADD EVENTS TO BUTTONS HERE
drawIcons("all");
$("#mapShowAll").on("click", function() {drawIcons("all")});
$("#mapShowRes").on("click", function() {drawIcons("restaurant")});
$("#mapShowAttr").on("click", function() {drawIcons("attraction")});
}
/** Draws all icons of given type to map, of all if "all" is given **/
function drawIcons(type) {
map.removeLayer(markers);
markers = L.layerGroup();
$.getJSON("scripts/data/POI.json", function(data) {
for (i = 0; i < data.features.length; i++) {
cFeature = data.features[i];
......@@ -37,23 +40,17 @@ var Map = (function () {
createMarker(geo, properties);
}
}
markers.addTo(map);
});
map.on("click", onMapClick); // NEEDS REMOVED!!!
}
/** Creates a marker with given geo and properties data **/
function createMarker(geo, properties) {
marker = L.marker(geo.coordinates).addTo(map);
marker = L.marker(geo.coordinates).addTo(markers);
if (geo.polygon === true) {
shape = L.polygon(geo.polygonCoords).addTo(map);
shape = L.polygon(geo.polygonCoords).addTo(markers);
}
marker.bindPopup("<h2>"+properties.name+"</h2>"+"<p>"+properties.info+"</p>");
}
function onMapClick(e) {
console.log("You clicked the map at " + e.latlng);
}
return pub;
})();
......
$(document).ready();
\ No newline at end of file
......@@ -40,81 +40,71 @@
html {
background-color: var(--white);
min-width: 950px;
font-family: Quicksand, serif;
}
body {
margin: 0;
width: 100%;
}
header {
/* Position*/
padding: 10px;
margin-top: 20px;
padding: var(--defaultSeperation);
/* Styling */
background-color: var(--black);
}
header h1 {
/* Position */
margin: auto;
width: 300px;
margin: 0 auto var(--defaultSeperation) auto;
text-align: center;
/* Style */
color: var(--white);
font-family: Quicksand, serif;
font-size: 40pt;
}
h1 a {
color: var(--white);
color: inherit;
text-decoration: none;
border: solid 2px;
paddin: 5px;
border: solid 1px;
}
h1 a:hover {
color: gray;
text-decoration: none;
}
#bookingTypes h2 {