Skip to content

Commit

Permalink
Added empty-list message to reurn page
Browse files Browse the repository at this point in the history
  • Loading branch information
arc12012 committed Dec 3, 2016
1 parent b2b1e13 commit e5cb7a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
4 changes: 3 additions & 1 deletion html/javascript/return.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ function populateDeviceList(filter)
{
var devicesToList = getCheckedOutDevices(null,filter);
var htmlString="";
for (var i = 0; i < devicesToList.length; i++) {
var i;
for (i = 0; i < devicesToList.length; i++) {
var id = devicesToList[i].id;
var name = devicesToList[i].name;
var hardware = devicesToList[i].hardware;
Expand Down Expand Up @@ -130,6 +131,7 @@ function populateDeviceList(filter)
htmlString+=name;
htmlString+="</button></div></p></div></div><br><br>";
}
if(i==0) htmlString+="Couldn't find any devices to return. Why not go order some?";
document.getElementById("devContainer").innerHTML = htmlString;

var returnbuttons = document.getElementsByClassName('returnbutton');
Expand Down
16 changes: 0 additions & 16 deletions html/webpages/returnPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,6 @@ <h4>Filter by Time Ordered</h4>
<div class="displayDevice">
<h2>Devices to Be Returned</h2>
<div id = "devContainer">

<div class="deviceContainer">
<div>
<div class="imgContainer">
<img src="../imgs/iphone.png" class="device">name
</div>
<div class="deviceInfo">
<p>Checked out: 4/28/2016</p>
<p>You've had this device for 20 months, 5 days, 11 hours and 2 minutes</p>
</div>
</div>
<div class="returnButtonContainer">
<button class="returnButton" id="button1" type="button">Return</button>
</div>
</div>
<br>
</div>
<script src="../javascript/return.js" href></script>
<script src = "../javascript/navbar.js"></script>
Expand Down

0 comments on commit e5cb7a4

Please sign in to comment.