-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
999c8d2
commit 2b059e6
Showing
1 changed file
with
172 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,172 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> | ||
<meta name="description" content="" /> | ||
<meta name="author" content="" /> | ||
<!--[if IE]> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<![endif]--> | ||
<title>Schedule Me</title> | ||
<link rel="stylesheet" href="css/editEmployeeStyle.css"> | ||
<!-- BOOTSTRAP CORE STYLE --> | ||
<link href="assets2/css/bootstrap.css" rel="stylesheet" /> | ||
<!-- FONT AWESOME STYLE --> | ||
<link href="assets2/css/font-awesome.css" rel="stylesheet" /> | ||
<!-- ANIMATE STYLE --> | ||
<link href="assets2/css/animate.css" rel="stylesheet" /> | ||
<!-- FLEXSLIDER STYLE --> | ||
<link href="assets2/css/flexslider.css" rel="stylesheet" /> | ||
<!-- CUSTOM STYLE --> | ||
<link href="assets2/css/style.css" rel="stylesheet" /> | ||
<!-- GOOGLE FONTS --> | ||
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css' /> | ||
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' /> | ||
<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css' /> | ||
|
||
</head> | ||
<body> | ||
|
||
<div class="navbar navbar-inverse set-radius-zero" > | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
<a class="navbar-brand" href="index.html"> | ||
<h1 style = "color: #ffffff ;font-size: 44px;text-align: center; font-family: "Roboto", sans-serif">Schedule Me</h1> | ||
<!-- <img src="assets/img/logo.png" /> --> | ||
</a> | ||
|
||
</div> | ||
<div class="right-div"> | ||
<!-- <strong>Support : </strong> [email protected] | ||
--> </div> | ||
|
||
</div> | ||
</div> | ||
<!-- LOGO HEADER END--> | ||
<section class="menu-section"> | ||
<div class="container"> | ||
<div class="row "> | ||
<div class="col-md-12"> | ||
<div class="navbar-collapse collapse "> | ||
<ul id="menu-top" class="nav navbar-nav navbar-right"> | ||
<li><a href="index.html" >HOME</a></li> | ||
|
||
<li><a href="about.html" >EDIT BASIC INFO</a></li> | ||
<li><a href="gallery.html" class="menu-top-active">EMPLOYEES AND TASKS</a></li> | ||
<li><a href="features.html">LOGOUT</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</section> | ||
<script | ||
src="https://code.jquery.com/jquery-3.2.1.min.js" | ||
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" | ||
crossorigin="anonymous"></script> | ||
<body> | ||
<div style = "padding: 4% 0 0"></div> | ||
<h1 style = "color: #FFFFFF;font-size: 44px;text-align: center; font-family: "Roboto", sans-serif;padding: 3% 0 0">Employees</h1> | ||
<div style = "padding: 2% 0 0"></div> | ||
|
||
<div class = "form2"> | ||
<form class = "login-form" id = "fooBar"> | ||
<div id="sectionBar"> | ||
<input id="add-employee-button" type="button" value="Add an employee" onclick="addEmployee();"/> | ||
</div> | ||
|
||
|
||
</form> | ||
</div> | ||
<input id="submitButton" type="button" value="Update", onclick="submit();"> | ||
|
||
</body> | ||
|
||
|
||
|
||
<script> | ||
var employeeCounter = 0; | ||
function addEmployee(){ | ||
|
||
var deleteButton = document.createElement("button"); | ||
deleteButton.innerHTML = "Delete All"; | ||
deleteButton.style.zIndex = 2; | ||
deleteButton.setAttribute("id", "deleteButton"); | ||
deleteButton.setAttribute("class", "clearfix"); | ||
deleteButton.setAttribute("style", "width: 60%"); | ||
deleteButton.style.marginBottom = "20px"; | ||
var employeeDiv = document.createElement("div"); | ||
employeeDiv.setAttribute("id","employee"+employeeCounter); | ||
|
||
|
||
|
||
var foo = document.getElementById("fooBar"); | ||
console.log("hi"); | ||
var employeeName = document.createElement("input"); | ||
employeeName.setAttribute("type", "text"); | ||
employeeName.setAttribute("id", "lname"); | ||
employeeName.setAttribute("name", "lastname"); | ||
employeeName.setAttribute("placeholder", "Name"); | ||
|
||
|
||
|
||
|
||
if(employeeCounter < 1){ | ||
employeeDiv.appendChild(deleteButton); | ||
} | ||
employeeDiv.appendChild(employeeName); | ||
|
||
var button = document.createElement("button"); | ||
button.innerHTML = "Service"; | ||
button.setAttribute("type", "button"); | ||
button.setAttribute("onclick", "addService(event)"); | ||
button.setAttribute("data-count", employeeCounter); | ||
button.setAttribute("style", "width: 70%"); | ||
|
||
button.style.marginTop = "-10px"; | ||
button.style.marginBottom = "20px"; | ||
button.style.float = "right"; | ||
foo.appendChild(employeeDiv); | ||
foo.appendChild(button); | ||
|
||
|
||
employeeCounter++; | ||
} | ||
|
||
function addService(e){ | ||
var button = e.target; | ||
var employeeDiv = document.getElementById("employee"+button.getAttribute("data-count")); | ||
var element = document.createElement("input"); | ||
element.setAttribute("type", "text"); | ||
element.setAttribute("id", "lname"); | ||
element.setAttribute("name", "lastname"); | ||
element.setAttribute("placeholder", "Service"); | ||
element.style.marginLeft = "30px"; | ||
element.style.width = "92%"; | ||
|
||
employeeDiv.appendChild(element); | ||
remove(); | ||
} | ||
|
||
function submit(){ | ||
document.getElementById("fooBar").submit(); | ||
|
||
} | ||
|
||
|
||
function remove(){ | ||
$("div").remove(".employee"+button.getAttribute("data-count")); | ||
} | ||
|
||
</script> | ||
|
||
|
||
</head> | ||
</html> |