-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflict trouble. See if we can't fix it...
- Loading branch information
Showing
13 changed files
with
822 additions
and
518 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="src" output="target/classes" path="src"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> | ||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> | ||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v9.0"> | ||
<attributes> | ||
<attribute name="owner.project.facets" value="jst.web"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_101"> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
<attributes> | ||
<attribute name="owner.project.facets" value="java"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="build/classes"/> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/build/ | ||
/build/ | ||
/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>2017-CSE-Senior-Project-Team-2</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.validation.validationbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature> | ||
</natures> | ||
</projectDescription> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>2017-CSE-Senior-Project-Team-2</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.validation.validationbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.m2e.core.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4 | ||
org.eclipse.jdt.core.compiler.compliance=1.4 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.8 | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.source=1.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,126 +1,126 @@ | ||
var dev1 = { | ||
id: 1, | ||
name:"George", | ||
description:"George is probably the coolest iPhone to exist. Ever. Point blank, period.", | ||
hardware:"iphone", | ||
software:"apple", | ||
}; | ||
|
||
var dev2 = { | ||
id: 2, | ||
name:"Greyson", | ||
description:"Greyson is pretty cool.. I guess.", | ||
hardware:"iphone", | ||
software:"apple", | ||
}; | ||
|
||
var dev3 = { | ||
id: 3, | ||
name:"Linkin Park", | ||
description:'"The hardest part of ending is starting again."', | ||
hardware:"ipad", | ||
software:"apple", | ||
}; | ||
|
||
var dev4 = { | ||
id: 4, | ||
name:"Abercrombie", | ||
description:"To all the people that hated me in high school, I have the prettiest clothes you all wear now!!", | ||
hardware:"ipad", | ||
software:"apple", | ||
}; | ||
|
||
var dev5 = { | ||
id: 5, | ||
name:"Hulk", | ||
description:"Go ahead and HULK SMASH! this awesome computer stick into your USB.", | ||
hardware:"computerStick", | ||
software:"intel", | ||
}; | ||
|
||
var dev6 = { | ||
id: 6, | ||
name:"Captain America", | ||
description:'"Make America Great Again. Wait, thats someone else.."', | ||
hardware:"computerStick", | ||
software:"intel", | ||
}; | ||
|
||
var devices = [dev1, dev2, dev3, dev4, dev5, dev6]; | ||
|
||
show(); | ||
|
||
/** | ||
This displays all the requested items on the screen. | ||
**/ | ||
function show(){ | ||
//get the option that you selected | ||
var requested = getRequestedItems(); | ||
var html = '<p>Please review the device requests below.</p>'; | ||
|
||
//iterate through the hardcoded device DB and select all the ones that match the selected option | ||
for(var i = 0; i < requested.length; i++){ | ||
for(var j = 0; j < devices.length; j++){ | ||
if(requested[i] === devices[j].id){ | ||
html += '<div class = "deviceContainer"><div class = "imgContainer"><img src="../imgs/' + devices[j].hardware + '.png" class = "device">' + devices[j].name + '</div><div class = "deviceDescp"><p>' + devices[j].description + '</p><button class = "approvebutton" id = "button' + (j+1) + '" type="button">Approve Request</button></div></div><br><br>' | ||
break; | ||
} | ||
} | ||
} | ||
|
||
if(html.localeCompare("<p>Please review the device requests below.</p>")==0) | ||
html = "<p>There are no requests to approve.</p>"; | ||
|
||
//add to HTML page | ||
document.getElementById('devContainer').innerHTML = html; | ||
|
||
//now we need to add event listeners to all the request buttons | ||
var approvebuttons = document.getElementsByClassName('approvebutton'); | ||
for(var i = 0; i < approvebuttons.length; i++){ | ||
approvebuttons[i].addEventListener('click',approveRequest); | ||
} | ||
} | ||
|
||
/** | ||
This function gets requested items from local storage. | ||
**/ | ||
function getRequestedItems(){ | ||
var requested = new Array; //make new array | ||
var requested_str = localStorage.getItem('requested'); //get the string from local storage | ||
if(requested_str !== '' && requested_str !== null){ //as long as its not null | ||
requested = JSON.parse(requested_str); //make into array | ||
} | ||
return requested; //return value is an array | ||
} | ||
|
||
/** | ||
This function approves a request! | ||
**/ | ||
function approveRequest(){ | ||
var id = this.getAttribute('id'); | ||
id = parseInt(id.replace(/[^0-9\.]/g,''),10); //this gets just the numerical value from the id! | ||
var unavailable = getUnavailableItems(); //this is an array | ||
var requested = getRequestedItems(); | ||
unavailable.push(id); //push to bottom of cart | ||
localStorage.setItem('unavailable', JSON.stringify(unavailable)); | ||
for(var j = 0; j < requested.length; j++){ //iterate cart | ||
if(requested[j] == id){ //match ids | ||
requested.splice(j,1); //remove from the cart | ||
break; | ||
} | ||
} | ||
localStorage.setItem('requested', JSON.stringify(requested)); //update local storage | ||
show(); | ||
$('#approved').fadeIn(1000); | ||
$('#approved').fadeIn(1000); | ||
$('#approved').fadeOut(1000); | ||
} | ||
|
||
function getUnavailableItems(){ | ||
var unavailable = new Array; | ||
var unavailable_str = localStorage.getItem('unavailable'); | ||
if(unavailable_str !== "" && unavailable_str !== null){ | ||
unavailable = JSON.parse(unavailable_str); | ||
} | ||
return unavailable; | ||
var dev1 = { | ||
id: 1, | ||
name:"George", | ||
description:"George is probably the coolest iPhone to exist. Ever. Point blank, period.", | ||
hardware:"iphone", | ||
software:"apple", | ||
}; | ||
|
||
var dev2 = { | ||
id: 2, | ||
name:"Greyson", | ||
description:"Greyson is pretty cool.. I guess.", | ||
hardware:"iphone", | ||
software:"apple", | ||
}; | ||
|
||
var dev3 = { | ||
id: 3, | ||
name:"Linkin Park", | ||
description:'"The hardest part of ending is starting again."', | ||
hardware:"ipad", | ||
software:"apple", | ||
}; | ||
|
||
var dev4 = { | ||
id: 4, | ||
name:"Abercrombie", | ||
description:"To all the people that hated me in high school, I have the prettiest clothes you all wear now!!", | ||
hardware:"ipad", | ||
software:"apple", | ||
}; | ||
|
||
var dev5 = { | ||
id: 5, | ||
name:"Hulk", | ||
description:"Go ahead and HULK SMASH! this awesome computer stick into your USB.", | ||
hardware:"computerStick", | ||
software:"intel", | ||
}; | ||
|
||
var dev6 = { | ||
id: 6, | ||
name:"Captain America", | ||
description:'"Make America Great Again. Wait, thats someone else.."', | ||
hardware:"computerStick", | ||
software:"intel", | ||
}; | ||
|
||
var devices = [dev1, dev2, dev3, dev4, dev5, dev6]; | ||
|
||
show(); | ||
|
||
/** | ||
This displays all the requested items on the screen. | ||
**/ | ||
function show(){ | ||
//get the option that you selected | ||
var requested = getRequestedItems(); | ||
var html = '<p>Please review the device requests below.</p>'; | ||
|
||
//iterate through the hardcoded device DB and select all the ones that match the selected option | ||
for(var i = 0; i < requested.length; i++){ | ||
for(var j = 0; j < devices.length; j++){ | ||
if(requested[i] === devices[j].id){ | ||
html += '<div class = "deviceContainer"><div class = "imgContainer"><img src="../imgs/' + devices[j].hardware + '.png" class = "device">' + devices[j].name + '</div><div class = "deviceDescp"><p>' + devices[j].description + '</p><button class = "approvebutton" id = "button' + (j+1) + '" type="button">Approve Request</button></div></div><br><br>' | ||
break; | ||
} | ||
} | ||
} | ||
|
||
if(html.localeCompare("<p>Please review the device requests below.</p>")==0) | ||
html = "<p>There are no requests to approve.</p>"; | ||
|
||
//add to HTML page | ||
document.getElementById('devContainer').innerHTML = html; | ||
|
||
//now we need to add event listeners to all the request buttons | ||
var approvebuttons = document.getElementsByClassName('approvebutton'); | ||
for(var i = 0; i < approvebuttons.length; i++){ | ||
approvebuttons[i].addEventListener('click',approveRequest); | ||
} | ||
} | ||
|
||
/** | ||
This function gets requested items from local storage. | ||
**/ | ||
function getRequestedItems(){ | ||
var requested = new Array; //make new array | ||
var requested_str = localStorage.getItem('requested'); //get the string from local storage | ||
if(requested_str !== '' && requested_str !== null){ //as long as its not null | ||
requested = JSON.parse(requested_str); //make into array | ||
} | ||
return requested; //return value is an array | ||
} | ||
|
||
/** | ||
This function approves a request! | ||
**/ | ||
function approveRequest(){ | ||
var id = this.getAttribute('id'); | ||
id = parseInt(id.replace(/[^0-9\.]/g,''),10); //this gets just the numerical value from the id! | ||
var unavailable = getUnavailableItems(); //this is an array | ||
var requested = getRequestedItems(); | ||
unavailable.push(id); //push to bottom of cart | ||
localStorage.setItem('unavailable', JSON.stringify(unavailable)); | ||
for(var j = 0; j < requested.length; j++){ //iterate cart | ||
if(requested[j] == id){ //match ids | ||
requested.splice(j,1); //remove from the cart | ||
break; | ||
} | ||
} | ||
localStorage.setItem('requested', JSON.stringify(requested)); //update local storage | ||
show(); | ||
$('#approved').fadeIn(1000); | ||
$('#approved').fadeIn(1000); | ||
$('#approved').fadeOut(1000); | ||
} | ||
|
||
function getUnavailableItems(){ | ||
var unavailable = new Array; | ||
var unavailable_str = localStorage.getItem('unavailable'); | ||
if(unavailable_str !== "" && unavailable_str !== null){ | ||
unavailable = JSON.parse(unavailable_str); | ||
} | ||
return unavailable; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.