From 367c4d9ce40aa5cf6e21db82e1d85dab9834b915 Mon Sep 17 00:00:00 2001 From: John Costa Date: Sat, 15 Apr 2017 21:44:54 -0400 Subject: [PATCH 1/6] fixed pie chart to show umbrella terms --- WebContent/html/javascript/statistics.jsp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/WebContent/html/javascript/statistics.jsp b/WebContent/html/javascript/statistics.jsp index ff97eab..ecb6c60 100644 --- a/WebContent/html/javascript/statistics.jsp +++ b/WebContent/html/javascript/statistics.jsp @@ -23,19 +23,31 @@ function displayData() { var availableDevices; var loanDevices; var lostDevices; + //umbrella sections + var pendingDevices; + var unavailDevices; + var returnDevices; + var brokenDevices; if (statistics.status != "" && statistics.count != ""){ for (var i = 0; iLoaned Devices: ' + loanDevices + '
Available Devices: ' + availableDevices + + '
Loaned Devices: ' + loanDevices + + '
Returning Devices: ' + returnDevices + '
Lost Devices: ' + lostDevices + '' @@ -54,8 +66,8 @@ function displayData() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Status'); data.addColumn('number', 'Count'); - data.addRows([['Total Devices', totalDevices],['Available Devices', availableDevices], - ['Loaned Devices',loanDevices],['Lost Devices',lostDevices]]); + data.addRows([['Available Devices', availableDevices],['Unavailable Devices',unavailDevices], + ['Pending Devices',pendingDevices],['Broken Devices',lostDevices]]); // Set chart options var options = {'title':'Chart of Devices', From 1d04f5aae7b9f4576356e992280d8598bdcf57d5 Mon Sep 17 00:00:00 2001 From: John Costa Date: Sun, 16 Apr 2017 21:38:12 -0400 Subject: [PATCH 2/6] fixed up statistics to match changes mentioned by zach --- WebContent/html/javascript/statistics.jsp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/WebContent/html/javascript/statistics.jsp b/WebContent/html/javascript/statistics.jsp index ecb6c60..3c200fd 100644 --- a/WebContent/html/javascript/statistics.jsp +++ b/WebContent/html/javascript/statistics.jsp @@ -35,13 +35,13 @@ function displayData() { } //data for info section availableDevices = statistics[1].count; - loanDevices = statistics[5].count; - lostDevices = statistics[4].count; - returnDevices = statistics[8].count; + loanDevices = statistics[3].count; + lostDevices = statistics[2].count; + returnDevices = statistics[6].count; //umbrella divisions - pendingDevices = statistics[0].count + statistics[9].count; - unavailDevices = statistics[5].count + statistics[6].count + statistics[7].count; - brokenDevices = statistics[2].count + statistics[3].count + statistics[4].count; + pendingDevices = statistics[0].count; + unavailDevices = statistics[2].count + statistics[4].count + statistics[5].count; + html += '
Total Devices: '+ totalDevices + @@ -67,7 +67,8 @@ function displayData() { data.addColumn('string', 'Status'); data.addColumn('number', 'Count'); data.addRows([['Available Devices', availableDevices],['Unavailable Devices',unavailDevices], - ['Pending Devices',pendingDevices],['Broken Devices',lostDevices]]); + ['Loaned Devices',loanDevices],['Pending Devices',pendingDevices], + ['Broken Devices',lostDevices]]); // Set chart options var options = {'title':'Chart of Devices', From 467eeaf26c105bf0a548d9f591a8aa76a67f51be Mon Sep 17 00:00:00 2001 From: John Costa Date: Sun, 16 Apr 2017 23:16:05 -0400 Subject: [PATCH 3/6] Modified return, request, and listing to support mouseover --- WebContent/html/javascript/listing.jsp | 10 +- WebContent/html/javascript/request.jsp | 6 +- WebContent/html/webpages/listingPage.jsp | 7 + WebContent/html/webpages/requestPage.jsp | 222 ++++++++++++----------- WebContent/html/webpages/returnPage.jsp | 13 +- 5 files changed, 144 insertions(+), 114 deletions(-) diff --git a/WebContent/html/javascript/listing.jsp b/WebContent/html/javascript/listing.jsp index d709c5b..256995b 100644 --- a/WebContent/html/javascript/listing.jsp +++ b/WebContent/html/javascript/listing.jsp @@ -14,7 +14,7 @@ //out.println(description); //out.println(hardware); %> - + - - - - - - - - - - -
-

Available Devices - -

-
- -
-

Or choose an option to the left to begin requesting!

-
- -
-

Added to Cart

-
- -
-

Already in Cart

-
- - <%@ include file="../javascript/request.jsp" %> - + + + + + + + + + + Synchrony Financial + + + + + + + + + + + + + +
+

Available Devices + +

+
+ +
+

Or choose an option to the left to begin requesting!

+
+ +
+

Added to Cart

+
+ +
+

Already in Cart

+
+ + <%@ include file="../javascript/request.jsp" %> + \ No newline at end of file diff --git a/WebContent/html/webpages/returnPage.jsp b/WebContent/html/webpages/returnPage.jsp index 6d85190..7c397fe 100644 --- a/WebContent/html/webpages/returnPage.jsp +++ b/WebContent/html/webpages/returnPage.jsp @@ -71,6 +71,12 @@ height: 20px; width: 20px; } + #pup{ + background-color: #E9EAEB; + border: solid; + text-align: center; + padding: 10px; + } @@ -124,7 +130,7 @@ Device[] mydevices = DeviceQueries.getUserDevices(navsso); //string representation of array. String deviceString = Device.arrayToString(mydevices); %> - +