Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
window.onload = async () => {
let state = new State();

// Get data from server and load into table
await state.getData().then(resp => {
if (resp == true) {
state.loadIntoTable(true);
}
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing ;


// Set needed navigation controls
state.setSearchButton();
state.setPageButtons();
state.setResizeEvent();
};
33 changes: 30 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,39 @@
<html>
<head>
<title>JS Onboard Project</title>
<link rel="stylesheet" type="text/css" href="style.css" >
<script type="text/javascript" charset="utf-8" src="third_party/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="state.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>

<body>
<p>Hello</p>
<div class="loader">
<div></div>
</div>
<div class="content">
<div class="controls">
<div class="constrols-heading">
<h1>IMQS Onboarding Project</h1>
</div>
<div class="constrols-search">
<button id="id-search-btn" class="search-btn">Search ID</button>
<input type="text" id="id-search" onfocus="this.value=''" value="Enter ID number" required>
</div>
</div>
<table id="content-table" class="table">
<thead id="content-thead"></thead>
<tbody id="content-tbody"></tbody>
</table>
<div class="container">
<div id="pagination-wrapper" class="pagination-wrapper">
<button id="first" class="page btn">&#171; First</button>
<button id="prev" class="page btn">Prev</button>
<button id="next" class="page btn">Next</button>
<button id="last" class="page btn"> Last &#187;</button>
</div>
<p id="page-info" class="page-info"></p>
</div>
</div>
</body>

</html>

29 changes: 29 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "onboard-javascript",
"version": "1.0.0",
"description": "onboard",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc --build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/CelesteNaude/onboard-javascript.git"
},
"author": "celeste",
"license": "ISC",
"bugs": {
"url": "https://github.com/CelesteNaude/onboard-javascript/issues"
},
"homepage": "https://github.com/CelesteNaude/onboard-javascript#readme",
"dependencies": {
"@types/jquery.browser": "^0.1.1"
}
}
Loading