Skip to content

Commit

Permalink
Quick bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
clj13001 committed Apr 21, 2017
1 parent e7fbd94 commit f5db535
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion WebContent/html/javascript/listing.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function show(deviceArray){
var part2 = "');"
for (var i = 0; i < deviceArray.length; i++)
{
html += '<div class = "deviceContainer"><a class = "divlink" href = "#" onmouseover = "'+ part1 + 'Hardware type: ' + deviceArray[i].hardware + '<br><br>' + 'Manufacturer: ' + deviceArray[i].manufacturer + '<br><br>' + 'Model: ' + deviceArray[i].model + part2 + '"><div class = "imgContainer"><img src="../imgs/my-icons-collection-devices/png/' + deviceArray[i].hardware + '.png" onerror="this.src=\'../imgs/synchrony-financial-logo-dlpx_1.png\';" class = "device">' + deviceArray[i].name + '</div><div class = "deviceDescp"><p>' + deviceArray[i].description + '</p><div class = "availableAnchor" id = "' + (deviceArray[i].id) + '"></div></div></a></div><br><br>'
html += '<div onmouseover = "'+ part1 + 'Hardware type: ' + deviceArray[i].hardware + '<br><br>' + 'Manufacturer: ' + deviceArray[i].manufacturer + '<br><br>' + 'Model: ' + deviceArray[i].model + part2 + '" class = "deviceContainer"><a class = "divlink" href = "#"><div class = "imgContainer"><img src="../imgs/my-icons-collection-devices/png/' + deviceArray[i].hardware + '.png" onerror="this.src=\'../imgs/synchrony-financial-logo-dlpx_1.png\';" class = "device">' + deviceArray[i].name + '</div><div class = "deviceDescp"><p>' + deviceArray[i].description + '</p><div class = "availableAnchor" id = "' + (deviceArray[i].id) + '"></div></div></a></div><br><br>'
}
document.getElementById('devContainer').innerHTML = html;
var anchors = document.getElementsByClassName('availableAnchor');
Expand Down
13 changes: 1 addition & 12 deletions WebContent/html/javascript/statistics.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,7 @@ function displayData() {
for (var i = 0; i<statistics.length; i++){
totalDevices = totalDevices + statistics[i].count;
htmlend += '<br>' + statistics[i].status + ': ' + statistics[i].count;
}
//data for info section
//availableDevices = statistics[0].count;
//loanDevices = statistics[1].count;
//unavailDevices = statistics[2].count;
//old categories
//lostDevices = statistics[2].count;
//returnDevices = statistics[6].count;
//umbrella divisions
//pendingDevices = statistics[0].count;
}
html += '<div class = "info-container">Total Devices: '+ totalDevices;
html += htmlend + '</div>';
Expand Down
3 changes: 2 additions & 1 deletion WebContent/html/webpages/returnPage.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,12 @@ function populateDeviceList(){
var hardware = devices[i].hardware;
var checkout = devices[i].checkout;
var manufacturer = devices[i].manufacturer;
var model = devices[i].model;
var part1 = "nhpup.popup('";
var part2 = "');"
//HTML representation in divs
htmlString+='<a class = "divlink" href = "#" onmouseover = "'+ part1 + 'Hardware type: ' + hardware + '<br><br>' + 'Manufacturer: ' + manufacturer + part2 + '">';
htmlString+='<a class = "divlink" href = "#" onmouseover = "'+ part1 + 'Hardware type: ' + hardware + '<br><br>' + 'Manufacturer: ' + manufacturer + '<br><br>' + 'Model: ' + model + part2 + '">';
htmlString+="<div class=\"deviceContainer\" data-num=\"" + i +"\">";
htmlString+="<input class=\"deviceCheckbox\" type = \"checkbox\" data-num=\"" + i + "\">";
htmlString+="<div><div class=\"imgContainer\"><img onerror=\"this.src='../imgs/synchrony-financial-logo-dlpx_1.png';\" src=\"../imgs/my-icons-collection-devices/png/";
Expand Down

0 comments on commit f5db535

Please sign in to comment.