Skip to content

Commit

Permalink
issue #2 careers page
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedReda1 committed Jan 4, 2016
1 parent c819759 commit 8db51b0
Show file tree
Hide file tree
Showing 17 changed files with 10,273 additions and 0 deletions.
Empty file added MysqliQuery.php~
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions README.md~
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# training-careers
Training Careers Project of ThinkCSI
15 changes: 15 additions & 0 deletions application/careers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>Careers</title>
<link href="../assets/style/style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="wrap">
</div>
<script src="../assets/js/jquery.js" type="text/javascript"></script>
<script src="../assets/js/careers.js" type="text/javascript"></script>
</body>
</html>
18 changes: 18 additions & 0 deletions application/outlines.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title>OutLines</title>
</head>
<body>
<script src="../assets/js/jquery.js" type="text/javascript"></script>
<script src="../assets/js/outlines.js" type="text/javascript"></script>
</body>
</html>
33 changes: 33 additions & 0 deletions assets/js/careers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
$(document).ready(function () {
$.ajax({
type: "GET",
url: '../lib/Controller/Career.php',
data: '',
dataType: '',
success: function (data)
{
var obj = $.parseJSON(data);

$(obj).each(function () {
// warning for exceeding 180 hours duration for a career
this.total_duration > 180 ? $color = "#FF0000" : $color = "#FFFFFF";

// appending div to wrap div
$('#wrap').append('<div class="box"><div class="innerContent" id="' + this.id + '" ><h2 class="ass">' + this.name + '</h2>\n\
<h3 style="color:' + $color + ';" >' + this.total_duration + '</h3></div></div>');
});

// redirecting to outlines page
$('.innerContent').click(function (e) {
$innerContentId = $(this).attr('id');
window.location.replace('outlines.php?id=' + $innerContentId);
});
},
error: function (jqXHR, textStatus, errorThrown) {
alert(errorThrown);
}
});



});
Loading

0 comments on commit 8db51b0

Please sign in to comment.