Commit d45f785c authored by jkerr's avatar jkerr
Browse files

Cleaned up code

parent a1e35529
Pipeline #2598 passed with stage
in 18 seconds
......@@ -2,22 +2,9 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="cccfd40b-d5c2-4431-bcfd-f34d25764049" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/jsLinters/jslint.xml" 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/data/._bookings.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/data/._campsites.json" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/data/._campsites.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/data/._reviews.json" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/data/._reviews.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/data/bookings.json" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/data/bookings.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/data/campsites.json" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/data/campsites.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/data/reviews.json" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/data/reviews.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/filterSites.js" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/filterSites.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/getbookings.js" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/getbookings.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/map.js" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/map.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/reviews.js" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/reviews.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/setbooking.js" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/setbooking.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/switchbooking.js" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/switchbooking.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" />
......@@ -36,17 +23,17 @@
<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="136">
<caret line="11" lean-forward="true" selection-start-line="11" selection-end-line="11" />
<state relative-caret-position="75">
<caret line="6" column="25" lean-forward="true" selection-start-line="6" selection-start-column="25" selection-end-line="6" selection-end-column="25" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/scripts/filterSites.js">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/scripts/setbooking.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="345">
<caret line="23" column="32" selection-start-line="23" selection-start-column="32" selection-end-line="23" selection-end-column="32" />
<state relative-caret-position="210">
<caret line="14" column="39" selection-start-line="14" selection-start-column="39" selection-end-line="14" selection-end-column="39" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
......@@ -54,6 +41,15 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/style/style.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="495">
<caret line="33" column="17" selection-start-line="33" selection-start-column="17" selection-end-line="33" selection-end-column="17" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
......@@ -124,19 +120,19 @@
<option value="$PROJECT_DIR$/scripts/data/campsites.json" />
<option value="$PROJECT_DIR$/scripts/data/reviews.json" />
<option value="$PROJECT_DIR$/index.html" />
<option value="$PROJECT_DIR$/style/style.css" />
<option value="$PROJECT_DIR$/scripts/map.js" />
<option value="$PROJECT_DIR$/scripts/reviews.js" />
<option value="$PROJECT_DIR$/scripts/setbooking.js" />
<option value="$PROJECT_DIR$/scripts/switchbooking.js" />
<option value="$PROJECT_DIR$/scripts/getbookings.js" />
<option value="$PROJECT_DIR$/scripts/filterSites.js" />
<option value="$PROJECT_DIR$/scripts/map.js" />
<option value="$PROJECT_DIR$/scripts/setbooking.js" />
<option value="$PROJECT_DIR$/style/style.css" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="y" value="23" />
<option name="width" value="1104" />
<option name="width" value="1202" />
<option name="height" value="1347" />
</component>
<component name="ProjectLevelVcsManager">
......@@ -147,7 +143,6 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
......@@ -160,12 +155,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" />
......@@ -175,6 +164,7 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
......@@ -228,6 +218,8 @@
<workItem from="1566359872857" duration="22497000" />
<workItem from="1566431482065" duration="6354000" />
<workItem from="1566445705210" duration="26954000" />
<workItem from="1566474940263" duration="23000" />
<workItem from="1566527472195" duration="3629000" />
</task>
<task id="LOCAL-00001" summary="First Commit">
<created>1565679239864</created>
......@@ -348,17 +340,24 @@
<option name="project" value="LOCAL" />
<updated>1566464452172</updated>
</task>
<option name="localTasksCounter" value="18" />
<task id="LOCAL-00018" summary="Cleaned up code">
<created>1566474956542</created>
<option name="number" value="00018" />
<option name="presentableId" value="LOCAL-00018" />
<option name="project" value="LOCAL" />
<updated>1566474956542</updated>
</task>
<option name="localTasksCounter" value="19" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="76871000" />
<option name="totallyTimeSpent" value="80523000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1104" height="1347" extended-state="0" />
<frame x="0" y="23" width="1202" height="1347" extended-state="0" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.20903955" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.19741379" />
<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" />
......@@ -395,7 +394,8 @@
<MESSAGE value="Web Push" />
<MESSAGE value="Commit with all files" />
<MESSAGE value="V1.0 Push" />
<option name="LAST_COMMIT_MESSAGE" value="V1.0 Push" />
<MESSAGE value="Cleaned up code" />
<option name="LAST_COMMIT_MESSAGE" value="Cleaned up code" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/scripts/data/cabinInfo.html">
......@@ -448,13 +448,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/admin.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="225">
<caret line="15" column="31" selection-start-line="15" selection-start-column="31" selection-end-line="15" selection-end-column="31" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/data/POI.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="750">
......@@ -483,74 +476,84 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/style/style.css">
<entry file="file://$PROJECT_DIR$/scripts/reviews.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="827">
<caret line="91" column="1" selection-start-line="91" selection-start-column="1" selection-end-line="91" selection-end-column="1" />
<state relative-caret-position="210">
<caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/map.js">
<entry file="file://$PROJECT_DIR$/scripts/switchbooking.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="570">
<caret line="38" column="24" selection-start-line="38" selection-start-column="24" selection-end-line="38" selection-end-column="24" />
<state relative-caret-position="540">
<caret line="36" column="6" selection-start-line="36" selection-start-column="6" selection-end-line="36" selection-end-column="6" />
<folding>
<element signature="n#!!doc" expanded="true" />
<element signature="e#9#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/reviews.js">
<entry file="file://$PROJECT_DIR$/scripts/getbookings.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
<state relative-caret-position="300">
<caret line="20" column="28" lean-forward="true" selection-start-line="20" selection-start-column="28" selection-end-line="20" selection-end-column="28" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/setbooking.js">
<entry file="file://$PROJECT_DIR$/scripts/filterSites.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="21" column="5" lean-forward="true" selection-start-line="21" selection-start-column="5" selection-end-line="21" selection-end-column="5" />
<state relative-caret-position="75">
<caret line="5" column="17" selection-start-line="5" selection-start-column="17" selection-end-line="5" selection-end-column="17" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/switchbooking.js">
<entry file="file://$PROJECT_DIR$/scripts/map.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="540">
<caret line="36" column="6" selection-start-line="36" selection-start-column="6" selection-end-line="36" selection-end-column="6" />
<state relative-caret-position="165">
<caret line="11" column="35" lean-forward="true" selection-start-line="11" selection-start-column="35" selection-end-line="11" selection-end-column="35" />
<folding>
<element signature="n#!!doc" expanded="true" />
<element signature="e#9#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/getbookings.js">
<entry file="file://$PROJECT_DIR$/admin.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300">
<caret line="20" column="28" lean-forward="true" selection-start-line="20" selection-start-column="28" selection-end-line="20" selection-end-column="28" />
<state relative-caret-position="150">
<caret line="10" column="8" lean-forward="true" selection-start-line="10" selection-start-column="8" selection-end-line="10" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="11" lean-forward="true" selection-start-line="11" selection-end-line="11" />
<state relative-caret-position="75">
<caret line="6" column="25" lean-forward="true" selection-start-line="6" selection-start-column="25" selection-end-line="6" selection-end-column="25" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/filterSites.js">
<entry file="file://$PROJECT_DIR$/scripts/setbooking.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="345">
<caret line="23" column="32" selection-start-line="23" selection-start-column="32" selection-end-line="23" selection-end-column="32" />
<state relative-caret-position="210">
<caret line="14" column="39" selection-start-line="14" selection-start-column="39" selection-end-line="14" selection-end-column="39" />
<folding>
<element signature="n#!!doc" 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="495">
<caret line="33" column="17" selection-start-line="33" selection-start-column="17" selection-end-line="33" selection-end-column="17" />
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
......@@ -50,11 +50,14 @@ var Map = (function () {
$("#mapContainer").parent().prepend("" +
"<div id='mapButtons'><input type='button' id='mapShowAll' value='Show All'>" +
"<input type='button' id='mapShowRes' value='Show Restaurants'>" +
"<input type='button' id='mapShowAttr' value='Show Attractions'></div>");
"<input type='button' id='mapShowAttr' value='Show Attractions'>" +
"<input type='button' id='mapHideAll' value='Hide All'></div>");
/** Adds events to buttons**/
$("#mapShowAll").on("click", function() {drawIcons("all");});
$("#mapShowRes").on("click", function() {drawIcons("restaurant");});
$("#mapShowAttr").on("click", function() {drawIcons("attraction");});
$("#mapHideAll").on("click", function() {drawIcons("camp");});
drawIcons("all");
};
......
//global $
//global console
var SetBooking= (function () {
"use strict";
var pub = [];
pub.displayBooking = function() {
var currBooking = JSON.parse(localStorage.getItem("savedQuickCampBooking"));
var bookingText = "";
if (currBooking.siteId !== "") {
bookingText += "<span><b>Site:</b> "+currBooking.siteId+"</span>";
}
if (currBooking.checkIn !== "") {
bookingText += "<span><b>| Check In:</b> "+currBooking.checkIn+"</span>";
}
if (currBooking.checkOut !== "") {
bookingText += "<span><b>| Check Out:</b> "+currBooking.checkOut+"</span>";
}
bookingText = "<p id='bookingDisplay'><span>"+bookingText+"</span></p>";
$("#bookingDisplay").remove();
$("form").after(bookingText);
};
function setBooking() {
var booking = {};
booking.siteId = $(this).parent().parent().find("td")[0].textContent;
booking.checkIn = $("#checkIn").val();
booking.checkOut = $("#checkOut").val();
localStorage.removeItem("savedQuickCampBooking");
localStorage.setItem("savedQuickCampBooking", JSON.stringify(booking));
pub.displayBooking();
}
pub.updateButtons = function() {
......@@ -19,4 +40,6 @@ var SetBooking= (function () {
}
};
return pub;
}());
\ No newline at end of file
}());
$(document).ready(SetBooking.displayBooking);
\ No newline at end of file
......@@ -31,6 +31,7 @@
--white: #FFFFFF;
--defaultSeperation: 20px;
--minWidth: 300px;
}
/* ======== Variables ======== */
......@@ -39,7 +40,7 @@
/* Header & Header bar Elements*/
html {
/* Position */
min-width: 1085px;
min-width: var(--minWidth);
/* Styling */
background-color: var(--black);
font-family: Quicksand, serif;
......@@ -167,6 +168,26 @@ label {
float: right;
display: block;
}
#bookingDisplay {
width: 100%;
overflow: hidden;
border: solid green 1px;
text-align: center;
}
#bookingDisplay span {
width: auto;
margin: 0 5px 0 0;
}
#bookingDisplay p span:last-child {
margin: 0;
}
table {
width: 100%;
border-collapse: collapse;
......@@ -205,7 +226,7 @@ footer {
height: 120px;
padding: var(--defaultSeperation);
margin: 0 auto 0 auto;
max-width: 1300px;
width: var(--minWidth);
/*Style*/
background-color: var(--lightblue);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment