From 7bc514852375af60a4b7e7e7a5d06141b35762ef Mon Sep 17 00:00:00 2001 From: saravanakumar_kandasami Date: Mon, 10 Apr 2017 13:22:41 +0530 Subject: [PATCH] updated code with sorting --- application/views/addemployee.php | 66 +++++++++++------------ application/views/editEmployee.php | 62 ++++++++++----------- application/views/employeeListing.php | 34 ++++++------ application/views/includes/header.php | 77 ++++++++++++--------------- assets/js/tsort.min.js | 19 +++++++ 5 files changed, 137 insertions(+), 121 deletions(-) create mode 100644 assets/js/tsort.min.js diff --git a/application/views/addemployee.php b/application/views/addemployee.php index ed53186a..c6ca56a8 100644 --- a/application/views/addemployee.php +++ b/application/views/addemployee.php @@ -284,31 +284,31 @@ function onlyAlphabets(evt) {
- * + First Name*
-
* +
Last Name*
-
* +
Father / Husband Name*
-
* +
Date Of Birth*
-
+
Age
-
+
Contact Number*
-
+
Email ID
-
+
Gender -
+
Blood group
@@ -380,7 +380,7 @@ function onlyAlphabets(evt) {
-
* +
Permanent Address*
@@ -393,10 +393,10 @@ function onlyAlphabets(evt) { Emergency Contact Information
-
* +
Emergency Contact Name*
-
* +
Emergency Contact Number*
@@ -409,7 +409,7 @@ function onlyAlphabets(evt) {
-
+
Designation
-
+
Date Of Joining
-
+
Previous Years of Experience
-
+
Qualification
-
+
Referred By
-
+
Referrer Contact Number + maxlength="10" onkeypress="return event.charCode >= 48 && event.charCode <= 57" placeholder="Referrer Contact Number" class="form-control">
@@ -485,16 +485,16 @@ function onlyAlphabets(evt) {
-
+
Account Number
-
+
IFSC Code
-
+
Bank Branch Name
-
+
Bank Address
@@ -503,24 +503,24 @@ function onlyAlphabets(evt) {
-
+
Aadhar Number
-
+
PAN Number
-
+
Passport Number
-
- +
Valid Till +
Additional Information
-
+
Additional Information
diff --git a/application/views/editEmployee.php b/application/views/editEmployee.php index 816f3dc9..b17611a1 100644 --- a/application/views/editEmployee.php +++ b/application/views/editEmployee.php @@ -444,31 +444,31 @@ function ValidatePassport()
- * + First Name*
-
* +
Last Name*
-
* +
Father / Husband Name*
-
* +
Date Of Birth*
-
+
Age
-
+
Contact Number*
-
+
Email ID
-
+
Gender -
+
Blood group
@@ -540,7 +540,7 @@ function ValidatePassport()
-
* +
Permanent Address*
@@ -553,10 +553,10 @@ function ValidatePassport() Emergency Contact Information
-
* +
Emergency Contact Name*
-
* +
Emergency Contact Number*
@@ -569,7 +569,7 @@ function ValidatePassport()
-
+
Designation
-
+
Date Of Joining
-
+
Previous Years of Experience
-
+
Qualification
-
+
Referred By
-
+
Referrer Contact Number
@@ -644,16 +644,16 @@ function ValidatePassport()
-
+
Account Number
-
+
IFSC Code
-
+
Bank Branch Name
-
+
Bank Address
@@ -662,16 +662,16 @@ function ValidatePassport()
-
+
Aadhar Number
-
+
PAN Number
-
+
Passport Number
-
+
Valid Till
@@ -679,7 +679,7 @@ function ValidatePassport() Additional Information
-
+
Additional Information
diff --git a/application/views/employeeListing.php b/application/views/employeeListing.php index f77c786b..1bd33ab8 100644 --- a/application/views/employeeListing.php +++ b/application/views/employeeListing.php @@ -1,3 +1,14 @@ + +
@@ -30,17 +41,15 @@
-
- +
+
- - + - - + - - - - + + - - + - - - + - - + - - - - - - - + + + + + + - - - - - - - + + + + + + + + + + - - - - + + + + - + - + @@ -64,27 +65,19 @@ - + Siddharth Industries - - - - - - + + + + + + - - - - - - + + + @@ -126,7 +119,7 @@ ?>
  • - + Supplier Details
  • @@ -148,7 +141,7 @@ ?>
  • - + Employee Details
  • diff --git a/assets/js/tsort.min.js b/assets/js/tsort.min.js new file mode 100644 index 00000000..1738c647 --- /dev/null +++ b/assets/js/tsort.min.js @@ -0,0 +1,19 @@ +/* + * jQuery Animated Table Sorter 0.2.2 (02/25/2013) + * + * http://www.matanhershberg.com/plugins/jquery-animated-table-sorter/ + * +*/ + +(function(a){a.fn.tableSort=function(q){var b=a.extend({animation:"slide",rowspan:!1,sortAs:{},speed:300,distance:"300px",delay:1},q);return this.each(function(){function q(e){for(var b="",d=0;d<=e.length;d++)if(a.isNumeric(e.charAt(d))||"."==e.charAt(d))b+=e.charAt(d);return b}var h=[],n=[],l=!1,p=[],j=[],r=[],m=[],f,c=a(this),l=!1;!0==b.rowspan&&a(c).find("td").each(function(){if(void 0!=a(this).attr("rowspan")){var b=a(this).attr("rowspan");a(this).removeAttr("rowspan");for(var c=a(this).parent().index(), +d=1;1=b.delay&&(b.delay=1);a(c).find("tr:first-child th").each(function(e){if(void 0!=b.sortBy)switch(b.sortBy[e]){case "text":case "numeric":case "nosort":m[e]=b.sortBy[e];return}if(void 0!=a(this).attr("data-sort"))switch(a(this).attr("data-sort")){case "text":case "numeric":case "nosort":m[e]= +a(this).attr("data-sort");return}for(var g=a(c).find("tr:eq(1) td:eq("+e+")").text(),d=0,h=0,f=0;f<=g.length-1;f++)a.isNumeric(g.charAt(f))||","==g.charAt(f)||"."==g.charAt(f)?d++:h++;m[e]=d>h?"numeric":"text"});a(c).css("position","relative");a(c).find("tr:first-child th").each(function(b){"nosort"!=m[b]&&a('
    ').appendTo(a(this))});a(c).find("tr:first-child th").each(function(){r.push(a(this).outerWidth(!0))}); +a(c).find("tr td, tr th").each(function(){a(this).css({minWidth:r[a(this).index()]})});a(c).find("tr").each(function(){a(this).width(a(this).outerWidth(!0));a(this).height(a(this).outerHeight(!0))});a(c).height(a(this).outerHeight()).width(a(this).outerWidth());var g=0;a(c).find("tr").each(function(){a(this).css("top",g);g+=a(this).outerHeight()});a(c).find("tr").each(function(){a(this).css("position","absolute")});a(c).find("tr th").each(function(b){"nosort"!=m[b]&&a(this).css("cursor","pointer")}); +a(c).find("tr th").click(function(){if(!l&&"nosort"!=m[a(this).index()]){f=a(this).index();0==h.length&&a(c).find("tr").each(function(d){0
    Emp IDEmployee NameEmployee Name Contact Number Email ID DesignationDepartmentDepartment
    EmpID ?> FirstName .' , '. $record->LastName; ?>EmpID ?> FirstName .' , '. $record->LastName; ?> ContactNumber ?>EmailId ?>EmailId ?> Designation ?>DepartmentName ?>DepartmentName ?>