Commit 584bbb03 by Ajeet Kumar

02-09-2019

parent 885c4edc
......@@ -30,6 +30,36 @@ namespace EnvigoHiring.Controllers
}
return View(ad);
}
[CustomAuthorize(Roles = "Admin, Recruiter")]
[HttpPost]
public ActionResult Index(ApplicantsDetail ad, string id, string btnActivate)
{
if (id != null && id != "")
{
if (!CheckFunc.IsNumeric(id))
{
return RedirectToAction("position", "applicants");
}
ad.PositionID = id.ToInt32();
}
if (btnActivate != null && btnActivate.Length > 0 && btnActivate.Split('_')[0] == "Activate")
{
var ActArray = btnActivate.Split('_');
int CandID = (ActArray.Length > 1) ? ActArray[1].ToString().ToInt32() : 0;
ad.ActivatereOpenApplicant(CandID);
if (CandID == 0)
{
ad.alert("Alert! Please try again", false);
}
}
ad.dtApplicant = ad.DisplayApplicantsByPosition(id.ToInt32());
if (ad.dtApplicant == null || ad.dtApplicant.Rows.Count == 0)
{
return RedirectToAction("position", "applicants");
}
return View(ad);
}
[CustomAuthorize(Roles = "Admin, Recruiter,User")]
public ActionResult position(string id)
{
......
using EnvigoHiring.Models.Applicants;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using CommonFunc;
namespace EnvigoHiring.Controllers
{
[CustomAuthorize]
public class commentsController : Controller
{
// GET: comments
[Route("~/applicants/comments/{ApplicantdID}/{CommentID?}")]
public ActionResult addcomments(int ApplicantdID,string CommentID)
{
ApplicantsComment ac = new ApplicantsComment();
ac.ApplicantID = ApplicantdID;
if (CommentID != null)
{
if (!CheckFunc.IsNumeric(CommentID))
{
return RedirectToAction("index", "applicants");
}
}
ac.CommentID = CommentID.ToInt32();
var result= ac.FillData();
if (result == false)
{
return RedirectToAction("index", "applicants");
}
return View(ac);
}
[HttpPost]
[Route("~/applicants/comments/{ApplicantdID}/{CommentID?}")]
public ActionResult addcomments(ApplicantsComment ac,int ApplicantdID, string CommentID, string btnsubmit)
{
ac.ApplicantID = ApplicantdID;
if (CommentID != null)
{
if (!CheckFunc.IsNumeric(CommentID))
{
return RedirectToAction("index", "applicants");
}
}
ac.CommentID = CommentID.ToInt32();
if (btnsubmit == "Submit")
{
ac.SaveData();
}
ac.FillData();
return View(ac);
}
}
}
\ No newline at end of file
......@@ -164,6 +164,7 @@
<Compile Include="Controllers\applicantsController.cs" />
<Compile Include="Controllers\candidateController.cs" />
<Compile Include="Controllers\candidateselectionController.cs" />
<Compile Include="Controllers\commentsController.cs" />
<Compile Include="Controllers\dashboardController.cs" />
<Compile Include="Controllers\DepartmentController.cs" />
<Compile Include="Controllers\designationController.cs" />
......@@ -175,6 +176,7 @@
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Models\Applicants\ApplicantsComment.cs" />
<Compile Include="Models\Applicants\ApplicantsDetail.cs" />
<Compile Include="Models\Applicants\Display.cs" />
<Compile Include="Models\Applicants\InterviewInputs.cs" />
......@@ -242,6 +244,7 @@
<Content Include="Views\applicants\position.cshtml" />
<Content Include="Views\position\view-inactive-position.cshtml" />
<Content Include="Views\ApplicantDisplayAll\Index.cshtml" />
<Content Include="Views\comments\addcomments.cshtml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
......
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using CommonFunc;
using System.Web.Mvc;
using System.Data.SqlClient;
namespace EnvigoHiring.Models.Applicants
{
public class ApplicantsComment: BaseClass
{
public string ApplicantName { get; set; }
public string Designation { get; set; }
public string Unit { get; set; }
[AllowHtml]
public string Comments { get; set; }
public int ApplicantID { get; set; }
public int PositionID { get; set; }
public int CommentID { get; set; }
public DataTable dtComments { get; set; }
DataLayer obj = DataLayer.Instance;
public bool FillData()
{
bool result = false;
string subQuery = (CommentID > 0) ? " and CommentID=" + CommentID : "";
string Query = string.Format("Select Name,DesignationName,va.PositionID,UnitName,Comments from vwtblApplicants va left outer join tblApplicantComments ac on (va.ApplicantID=ac.ApplicantdID) where ApplicantID={0} {1}", ApplicantID,subQuery);
DataTable dt = obj.SelectDatatable(Query);
if (dt != null && dt.Rows.Count > 0)
{
result = true;
DataRow row = dt.Rows[0];
ApplicantName = row.SetParamValue("Name");
Designation = row.SetParamValue("DesignationName");
Unit = row.SetParamValue("UnitName");
PositionID = row.SetParamValue("PositionID").ToInt32();
if (CommentID > 0)
{
Comments = row.SetParamValue("Comments");
}
dtComments = ViewComments();
}
return result;
}
public void SaveData()
{
if (Comments == null || Comments == "")
{
alert("Alert! Comments should not be blank", false);
return;
}
if (!SpecialCharacterFunc.TextAreaString(Comments))
{
alert("Alert! Comments special character not allowed", false);
return;
}
SqlParameter[] perm1 = new SqlParameter[5];
perm1[0] = new SqlParameter("@CommentID", CommentID);
perm1[1] = new SqlParameter("@ApplicantdID", ApplicantID);
perm1[2] = new SqlParameter("@PositionID", PositionID);
perm1[3] = new SqlParameter("@CommentedBy", UserID);
perm1[4] = new SqlParameter("@Comments", Comments.HtmlEncode());
DataTable success1 = obj.ExecuteStoreProcedure("proc_tblApplicantComments", perm1);
if (success1 != null)
{
if (CommentID == 0)
{
alert("<b>Success :</b> Comments added successfully.", true);
}
else
{
alert("<b>Success :</b> Comments updated successfully.", true);
}
}
else
{
alert("<b>Error :</b> Please try again later.", false);
}
}
public DataTable ViewComments()
{
string Query = string.Format("Select Name,DesignationName,va.PositionID,UnitName,Comments,CommentID from vwtblApplicants va inner join tblApplicantComments ac on (va.ApplicantID=ac.ApplicantdID) where ApplicantID={0}", ApplicantID);
return obj.SelectDatatable(Query);
}
}
}
\ No newline at end of file
......@@ -260,7 +260,7 @@ namespace EnvigoHiring.Models.Position
}
else if (Status == "ReOpen")
{
return Common.FillSelectListManual("Open", "ReOpen", "OnHold");
return Common.FillSelectListManual("ReOpen", "OnHold");
}
else
{
......
......@@ -81,6 +81,23 @@
}
if (Model.dtApplicant != null && Model.dtApplicant.Rows.Count > 0)
{
<div class="col-md-12 col-sm-12 col-xs-12">
<nav class="navbar navbar-default">
<div class="col-xs-3" style="padding: 7px 10px 7px 10px;">
<input class="form-control JQsearch" id="Position" name="Position" data-index="0" placeholder="Position" type="text" value="">
</div>
<div class="col-xs-3" style="padding: 7px 10px 7px 10px;">
<input class="form-control JQsearch" id="PositionID" name="PositionID" data-index="0" placeholder="Position ID" type="text" value="">
</div>
<div class="col-xs-3" style="padding: 7px 10px 7px 10px;">
<input class="form-control JQsearch" id="Applicant" name="Applicant" data-index="0" placeholder="Applicant Name" type="text" value="">
</div>
<div class="col-xs-3" style="padding: 7px 10px 7px 10px;">
<input class="form-control JQsearch" id="ApplicantEmail" name="ApplicantEmail" data-index="1" placeholder="Applicant Email" type="text" value="">
</div>
</nav>
</div>
<table id="datatable" class="table table-striped table-bordered">
<thead>
<tr>
......@@ -109,7 +126,7 @@
<tr>
<td>
<a style="color:green;text-decoration:underline;" href="/applicantdisplayall/index/@applicant[0].SetParamValue("ApplicantID").ToInt32()">@applicant[0]["Name"].ToString().Trim()</a><br />
@applicant[0]["DesignationName"].ToString().Trim().HtmlDecode()<br />
@applicant[0]["DesignationName"].ToString().Trim().HtmlDecode() (@positionID)<br />
@applicant[0]["UnitName"].ToString().Trim().HtmlDecode()<br />
@applicant[0]["Cstage"].ToString().Trim().HtmlDecode()
</td>
......@@ -139,7 +156,6 @@
Sheduled: @ScheduleDate<br />
Assigned: @applicant[k]["InterviewerName"].ToString().Trim().HtmlDecode()<br />
Round: @applicant[k]["RoundType"].ToString().Trim().HtmlDecode()<br />
Result:@InterViewResult<br />
</td>
}
......@@ -153,13 +169,13 @@
@if ((positionStatus == "Open" || positionStatus == "ReOpen") && applicant[0].SetParamValue("NewInterview").ToInt32() == 0 && applicant[0].SetParamValue("SuggestedApplicantCount").ToInt32() > 0)
{
<a href="/applicants/edit/@positionID/@candidateID"> Edit details</a><br />
<span>Add Comment</span><br />
<a href="/applicants/edit/@positionID/@candidateID"> <i class="fa fa-edit"></i> </a>
<a href="/applicants/comments/@applicantid"><i class="fa fa-comment"></i></a>
}
@if (positionStatus == "ReOpen" && applicant[0].SetParamValue("NewInterview").ToInt32() == 0 && applicant[0].SetParamValue("SuggestedApplicantCount").ToInt32() == 0)
{
<button title='Activate Applicant' class="btn btn-success btn-xs" name="btnActivate" style='cursor:pointer;' value="Activate_@applicantid">
<button title="Activate Applicant" class="btn btn-success btn-xs" name="btnActivate" style="cursor:pointer;" value="Activate_@applicantid">
Activate
</button>
}
......
......@@ -10,31 +10,30 @@
}
@section PageHeading{
<h3>Candidate</h3>
}
@section PageSubHeading{
@using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data", id = "langform", @class = "form-horizontal form-label-left" }))
{
<h2>View Candidate</h2><button type="submit" name="btnDownload" value="Download" id="btnDownload" class="btn btn-app" style="float:right; margin:0 11px 10px 10px;">
<i class="fa fa-download" aria-hidden="true"></i></button>
<h2>View Candidate</h2>
<button type="submit" name="btnDownload" value="Download" id="btnDownload" class="btn btn-app" style="float:right; margin:0 11px 10px 10px;">
<i class="fa fa-download" aria-hidden="true"></i>
</button>
<div class="col-md-12 col-sm-12 col-xs-12">
<nav class="navbar navbar-default">
<div class="col-xs-2" style="padding: 7px 10px 7px 10px;">
@Html.TextBoxFor(m=>m.Education, new {@class= "form-control", onkeyup = "mySearchFunction('Education', '2')", placeholder = "Education" })
@Html.TextBoxFor(m => m.Education, new { @class = "form-control JQsearch", data_index = "2", placeholder = "Education" })
</div>
<div class="col-xs-2" style="padding: 7px 10px 7px 10px;">
@Html.TextBoxFor(m => m.ddlDepartment, new { @class = "form-control", onkeyup = "mySearchFunction('ddlDepartment', '3')", placeholder = "Department" })
@Html.TextBoxFor(m => m.ddlDepartment, new { @class = "form-control JQsearch", data_index = "3", placeholder = "Department" })
</div>
<div class="col-xs-2" style="padding: 7px 10px 7px 10px;">
@Html.TextBoxFor(m => m.SExperience, new { @class = "form-control", onkeyup = "mySearchFunction('SExperience', '4')", placeholder = "Experience" })
@Html.TextBoxFor(m => m.SExperience, new { @class = "form-control JQsearch", data_index = "4", placeholder = "Experience" })
</div>
<div class="col-xs-2" style="padding: 7px 10px 7px 10px;">
@Html.TextBoxFor(m => m.Gender, new { @class = "form-control", placeholder = "Gender" })
@Html.TextBoxFor(m => m.Gender, new { @class = "form-control JQsearch", data_index = "0", placeholder = "Gender" })
</div>
<div class="col-xs-2" style="padding: 7px 10px 7px 10px;">
@Html.TextBoxFor(m => m.ddlCandidateStatus, new { @class = "form-control", onkeyup = "mySearchFunction('ddlCandidateStatus', '5')", placeholder = "CandidateStatus" })
@Html.TextBoxFor(m => m.ddlCandidateStatus, new { @class = "form-control JQsearch", data_index = "5", placeholder = "CandidateStatus" })
</div>
<div class="col-xs-2" style="padding: 7px 5px 7px 5px;">
<input type="submit" ID="btnSearch" name="btnSearch" Text="Search" class="btn btn-primary" value="Search" />
......@@ -46,30 +45,30 @@
}
}
<div class="x_content">
<table id="datatable" class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Education</th>
<th>Department</th>
<th>Exp</th>
@*<th>Gender</th>*@
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@if (Model.dtCandidate != null && Model.dtCandidate.Rows.Count > 0)
@if (Model.dtCandidate != null && Model.dtCandidate.Rows.Count > 0)
{
foreach (System.Data.DataRow row in Model.dtCandidate.Rows)
<table id="datatable" class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Education</th>
<th>Department</th>
<th>Exp</th>
@*<th>Gender</th>*@
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach (System.Data.DataRow row in Model.dtCandidate.Rows)
{
string resume = BasicFunc.SetParamValue(row, "ResumeName");
string resume = BasicFunc.SetParamValue(row, "ResumeName");
string Googleresume = BasicFunc.SetParamValue(row, "ResumeGoogleLink");
string downloadLink = (resume == "") ? Googleresume : Model.FilePath + "/" + resume;
string LastContactedDate = BasicFunc.SetParamValue(row, "LastContactedDate");
string LastContactedDate = BasicFunc.SetParamValue(row, "LastContactedDate");
<tr>
<td>@Html.Raw(BasicFunc.SetParamValue(row, "Name"))</td>
<td>@Html.Raw(BasicFunc.SetParamValue(row, "Name")) <input type="hidden" value="@BasicFunc.SetParamValue(row, "Gender") />"</td>
<td>@Html.Raw(BasicFunc.SetParamValue(row, "EmailID"))</td>
<td>@Html.Raw(BasicFunc.SetParamValue(row, "Education"))</td>
<td>@Html.Raw(BasicFunc.SetParamValue(row, "DepartmentName"))</td>
......@@ -83,9 +82,10 @@
</td>
</tr>
}
}
</tbody>
</table>
</tbody>
</table>
}
</div>
@section script{
......
......@@ -89,17 +89,17 @@
<div class="col-md-12 col-sm-12 col-xs-12">
<nav class="navbar navbar-default">
<div class="col-xs-3" style="padding: 7px 10px 7px 10px;">
<input class="form-control" id="Education" name="Education" onkeyup="mySearchFunction('Education', '3')" placeholder="Education" type="text" value="">
<input class="form-control JQsearch" id="Education" name="Education" data-index="3" placeholder="Education" type="text" value="">
</div>
<div class="col-xs-3" style="padding: 7px 10px 7px 10px;">
<input class="form-control" id="ddlDepartment" name="ddlDepartment" onkeyup="mySearchFunction('ddlDepartment', '4')" placeholder="Department" type="text" value="">
<input class="form-control JQsearch" id="ddlDepartment" name="ddlDepartment" data-index="4" placeholder="Department" type="text" value="">
</div>
<div class="col-xs-3" style="padding: 7px 10px 7px 10px;">
<input class="form-control" id="SExperience" name="SExperience" onkeyup="mySearchFunction('SExperience', '5')" placeholder="Experience" type="text" value="">
<input class="form-control JQsearch" id="SExperience" name="SExperience" data-index="5" placeholder="Experience" type="text" value="">
</div>
<div class="col-xs-3" style="padding: 7px 10px 7px 10px;">
<input class="form-control" id="ddlCandidateStatus" name="ddlCandidateStatus" onkeyup="mySearchFunction('ddlCandidateStatus', '6')" placeholder="CandidateStatus" type="text" value="">
<input class="form-control JQsearch" id="ddlCandidateStatus" name="ddlCandidateStatus" data-index="6" placeholder="CandidateStatus" type="text" value="">
</div>
</nav>
......
@model EnvigoHiring.Models.Applicants.ApplicantsComment
@using System.Data;
@using CommonFunc;
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
@section PageHeading{
<h3>Comments</h3>
}
@section PageSubHeading{
<h2>Add Comments</h2>
}
@using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data", id = "langform", @class = "form-horizontal form-label-left" }))
{
if (Model.lblMessage != null && Model.lblMessage != "")
{
<div class="alert alert-@Model.MessageType alert-dismissible fade in" data-valmsg-summary="true" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<ul>
@if (Html.ViewData.ModelState.IsValid)
{
@Html.ValidationSummary(false)
}
@Html.Raw(Model.lblMessage)
</ul>
</div>
}
else
{
<div class="alert alert-danger alert-dismissible fade in" role="alert" data-valmsg-summary="true" style="display:none;">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<ul>
@Html.ValidationSummary(false)
</ul>
</div>
}
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="Name">
Name <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
@Html.DisplayFor(m => m.ApplicantName, new { @class = "form-control col-md-7 col-xs-12" })
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="DesignationName">
Designation <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
@Html.DisplayFor(m => m.Designation, new { @class = "form-control col-md-7 col-xs-12" })
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="DepartmentName">
Unit <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
@Html.DisplayFor(m => m.Unit, new { @class = "form-control col-md-7 col-xs-12" })
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="Department">
Comments <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
@Html.TextAreaFor(m => m.Comments, new { @class = "form-control col-md-7 col-xs-12 editor", cols = "80", rows = "6", autofocus = "autofocus", data_AllowHtml = "true" })
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-3">
<a class="btn btn-success" href="/applicants">Back</a>
<a class="btn btn-success" href="/applicants/comments/@Model.ApplicantID"><i class="fa fa-reply"></i> Comments</a>
<button id="btnsubmit" type="submit" name="btnsubmit" value="Submit" class="btn btn-success">Submit</button>
</div>
</div>
}
<div class="ln_solid"></div>
<div class="x_content">
@if (Model.dtComments != null && Model.dtComments.Rows.Count > 0)
{
<table id="datatable" class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Designation</th>
<th>Unit</th>
<th>Comments</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach (DataRow row in Model.dtComments.Rows)
{
int CID = row.SetParamValue("CommentID").ToInt32();
<tr>
<td>@row.SetParamValue("Name")</td>
<td>@row.SetParamValue("DesignationName")</td>
<td>@row.SetParamValue("UnitName")</td>
<td>@Html.Raw(row.SetParamValue("Comments"))</td>
<td>
<a href="/applicants/comments/@Model.ApplicantID/@CID"> <i class="fa fa-edit"></i> </a>
</td>
</tr>
}
</tbody>
</table>
}
</div>
@section script{
<script src="/Scripts/jquery.validate.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.js"></script>
<script src="/vendors/tinymce/tinymce.min.js" type="text/javascript"></script>
<script>
tinymce.init({ selector: ".editor" });
</script>
}
<!DOCTYPE html>
<html>
<head>
<title>Envigo Positions</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<style type="text/css">
a,table,td{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}table,td{mso-table-lspace:0;mso-table-rspace:0}img{-ms-interpolation-mode:bicubic}img{border:0;height:auto;line-height:100%;outline:0;text-decoration:none}table{border-collapse:collapse!important}body{height:100%!important;margin:0!important;padding:0!important;width:100%!important}a[x-apple-data-detectors]{color:inherit!important;text-decoration:none!important;font-size:inherit!important;font-family:inherit!important;font-weight:inherit!important;line-height:inherit!important}@media screen and (max-width:525px){.wrapper{width:100%!important;max-width:100%!important}.logo img{margin:0 auto!important}.mobile-hide{display:none!important}.img-max{max-width:100%!important;width:100%!important;height:auto!important}.responsive-table{width:100%!important}.padding{padding:10px 5% 15px 5%!important}.padding-meta{padding:30px 5% 0 5%!important;text-align:center}.padding-copy{padding:10px 5% 10px 5%!important;text-align:center}.no-padding{padding:0!important}.section-padding{padding:50px 15px 50px 15px!important}.mobile-button-container{margin:0 auto;width:100%!important}.mobile-button{padding:15px!important;border:0!important;font-size:16px!important;display:block!important}}div[style*="margin: 16px 0;"]{margin:0!important}
</style>
</head>
<body style="margin: 0 !important; padding: 0 !important;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td bgcolor="#ffffff" align="center">
<!--[if (gte mso 9)|(IE)]>
<table align="center" border="0" cellspacing="0" cellpadding="0" width="500">
<tr>
<td align="center" valign="top" width="500">
<![endif]-->
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 500px;" class="wrapper">
<tr>
<td align="center" valign="top" style="padding: 15px 0;" class="logo">
<a href="https://www.envigo.co.in/" target="_blank">
<img alt="Logo" src="https://www.envigo.co.in/themes/envigoCoIn/assets/images/black-logo.png" width="60" height="60" style="display: block; font-family: Helvetica, Arial, sans-serif; color: #ffffff; font-size: 16px;" border="0">
</a>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
<tr>
<td bgcolor="#ffffff" align="center" style="padding: 15px;">
<!--[if (gte mso 9)|(IE)]>
<table align="center" border="0" cellspacing="0" cellpadding="0" width="500">
<tr>
<td align="center" valign="top" width="500">
<![endif]-->
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 500px;" class="responsive-table">
<tr>
<td>
<!-- COPY -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="font-size: 32px; font-family: Helvetica, Arial, sans-serif; color: #333333; padding-top: 30px;" class="padding-copy">
$$Heading$$
</td>
</tr>
<tr>
<td align="left" style="padding: 20px 0 0 0; font-size: 16px; line-height: 25px; font-family: Helvetica, Arial, sans-serif; color: #666666;" class="padding-copy">
$$Content$$
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
<tr>
<td bgcolor="#ffffff" align="center" style="padding: 15px;" class="padding">
<!--[if (gte mso 9)|(IE)]>
<table align="center" border="0" cellspacing="0" cellpadding="0" width="500">
<tr>
<td align="center" valign="top" width="500">
<![endif]-->
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
<tr>
<td bgcolor="#ffffff" align="center" style="padding: 15px;">
<table border="0" cellpadding="0" cellspacing="0" width="500" class="responsive-table">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<!-- BULLETPROOF BUTTON -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="padding-top: 25px;" class="padding">
<table border="0" cellspacing="0" cellpadding="0" class="mobile-button-container">
<tr>
<td align="center" style="border-radius: 3px;" bgcolor="#256F9C"><a href="https://litmus.com" target="_blank" style="font-size: 16px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; color: #ffffff; text-decoration: none; border-radius: 3px; padding: 15px 25px; border: 1px solid #256F9C; display: inline-block;" class="mobile-button">Go to Application</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
<tr>
<td bgcolor="#ffffff" align="center" style="padding: 20px 0px;">
<!--[if (gte mso 9)|(IE)]>
<table align="center" border="0" cellspacing="0" cellpadding="0" width="500">
<tr>
<td align="center" valign="top" width="500">
<![endif]-->
<!-- UNSUBSCRIBE COPY -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" style="max-width: 500px;" class="responsive-table">
<tr>
<td align="center" style="font-size: 12px; line-height: 18px; font-family: Helvetica, Arial, sans-serif; color:#666666;">
Stratford Pl, Marylebone, London W1C 1AY, UK •074 6638 7906
<br>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</table>
</body>
</html>
......@@ -39,19 +39,53 @@ $('.textboxrestriction').bind('keyup blur', function () {
});
});
$(".JQsearch").keyup(function () {
var search = "";
var result = true;
var tr = $("#datatable").find("tr");
for (i = 0; i < tr.length; i++) {
result = true;
$(".JQsearch").each(function () {
var filter = $(this).val();
var index = $(this).attr("data-index");
if (filter != undefined && filter.length > 0 && $(tr[i]).find("td")[index] != undefined) {
var tdval = $(tr[i]).find("td")[index].innerHTML.toUpperCase().indexOf(filter.toUpperCase());
//if (tdval != undefined && tdval.length > 0) {
if (result == true) {
result = (tdval > -1)
}
//}
//
//if (tdval != undefined && tdval.length > 0) {
// search += "(" + tdval + "> -1 ) && ";
//}
}
});
//if (search.length > 0) {
// search = search.substring(0, search.length - 3);
//}
if (result==true) {
tr[i].style.display = "";
}
else {
tr[i].style.display = "none";
}
}
});
function mySearchFunction(id, postion) {
// Declare variables
var input, filter, table, tr, td, i;
input = document.getElementById(id);
filter = input.value.toUpperCase();
table = document.getElementById("datatable");
tr = table.getElementsByTagName("tr");
tr = $("#datatable").find("tr");
// Loop through all table rows, and hide those who don't match the search query
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[postion];
td = $(tr[i]).find("td")[postion]
if (td) {
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment