Skip to content
Open

JS #1

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 160 additions & 0 deletions oopMikhail
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<link rel="stylesheet" href = "Style.css">
</head>
<body>
<div clas = "form-row">
<div class = "container">
<div class = "p-2">
<button type = "button" class="btn btn-success btn-lg" onclick="openOrder()">
NEW ORDER
</button>
</div>
<div class = "form-row">
<span id= "big">
BIG Hamburger
</span>
<div class = "border border-primary col-3" id="selectAll" >
<select id="bigHamburgeStuffing">
<option value="STUFFING_CHEESE">Chees</option>
<option value="STUFFING_SALAD">Salad</option>
<option value="STUFFING_POTATO" selected>Potato</option>
</select>
</div>
<div class="form-group col-2">
<label for="name"> COUNT </label>
<input type="number" min="0" class="form-control" id="bigHamburgerCount" placeholder= "1" >
</div>
<div class = "p-2 flowR">
<button type = "submit" class="btn btn-info " onclick="addBigHamburger()">
Append
</button>
</div>
</div>
<div class = "form-row">
<span id= "big">
Small Hamburger
</span>
<div class = "border border-primary col-3" >
<form>
<select id="smallHamburgerStuffing">
<option value="STUFFING_CHEESE">Chees</option>
<option value="STUFFING_SALAD">Salad</option>
<option value="STUFFING_POTATO" selected>Potato</option>
</select>
</form>
</div>
<div class="form-group col-2">
<label for="name"> COUNT </label>
<input type="number" min="1" class="form-control" id="smallHamburgerCount" placeholder= "1" >
</div>
<div class = "p-2">
<button type = "button" class="btn btn-info" onclick="addSmallHamburger()" >
Append
</button>
</div>
</div>

<div class = "form-row">
<span id= "big">
Salad
</span>
<div class = "border border-primary col-3" >
<form>
<select id="chooseSalad">
<option value="SALAD_CAESAR">Caesar</option>
<option value="RUSSIAN_SALAD">Russian salad</option>
</select>
</form>
</div>
<div class="form-group col-2">
<label for="name"> COUNT </label>
<input type="number" min="100" step="100" class="form-control" id="saladCount" placeholder= "100" >
</div>
<div class = "p-2">
<button type = "button" class="btn btn-info" onclick="addSalad()" >
Append
</button>
</div>
</div>

<div class = "form-row">
<span id= "big">
DRINK
</span>
<div class = "border border-primary col-3" >
<form>
<select id="chooseDrink">
<option value="DRINK_COLA">Cola</option>
<option value="DRINK_COFFEE">Coffee</option>
</select>
</form>
</div>
<div class="form-group col-2">
<label for="name"> COUNT </label>
<input type="number" min="1" class="form-control" id="drinkCount" placeholder= "1" >
</div>
<div class = "p-2">
<button type = "button" class="btn btn-info" onclick="addDrink()" >
Append
</button>
</div>
</div>

<div class = "p-2">
<button type = "button" class="btn btn-primary btn-lg" onclick = "freezeOrder()">
TO PAY
</button>
</div>
</div>

<div>
<div class = "totall" >
Total summ:
<div class = "totallN" id="totallSumm"></div>
</div >
<div class = "totall">
Caloric value:
<div class = "totallN" id = 'totallCalories'></div>
</div>
<div class = "totall" id="hasPaid"></div>
<script type="text/template" id="grid-template">
<table class ="table table-bordered table-hover">
<thead class = "border">
<tr>
<th>Name</th>
<th>Count</th>
<th> Actions </th>
</tr>
</thead>
<tbody>
<% for(var i = 0; i < list.length; i++) { %>
<tr>
<td>
<%=list[i].getName()%>
</td>
<td>
<%=list[i].count%>
</td>
<td>
<button type = "button" class = "btn btn-info float-left" onclick="deleteCurrentItem()" > Delete </button>
</td>
</tr>
<% } %>
</tbody>
</table>
</script>
</div>
<div id="grid-holder"></div>

<script src = "ooptest.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.3.0/lodash.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</body>
</html>