| Server IP : 104.21.37.246 / Your IP : 104.23.243.33 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home2/cp648411/public_html/ilawasia.onnud20.com/TimeSheet/ |
Upload File : |
$(function($) {
var yearinput = document.getElementById('Year').value;
var monthinput = document.getElementById('Month').value;
data = '{"month":"'+monthinput+'","year":"'+yearinput+'"}';
data = JSON.parse(data);
console.log(data);
$.ajax({
type: "POST",
url: "LoadTimesheetAuto.php",
data: data,
success: function (result) {
},
}).done(function(timesheet_db) {
//countries.unshift({ id: "0", name: "" });
$("#jsGrid").jsGrid({
width: "100%",
filtering: false,
inserting: false,
editing: true,
sorting: true,
paging: true,
autoload: true,
pageSize: 10,
pageButtonCount: 5,
deleteConfirm: "Do you really want to delete client?",
controller: {
loadData: function(filter) {
console.log(filter);
return $.ajax({
type: "POST",
url: "LoadTimesheetAuto.php",
data: data
});
},
insertItem: function(item) {
return $.ajax({
type: "POST",
url: "/clients/",
data: item
});
},
updateItem: function(item) {
return $.ajax({
type: "POST",
url: "Update.php",
data: item,
success: function (result) {
console.log(result);
//$("#jsGrid").jsGrid("refresh");
},
});
},
deleteItem: function(item) {
return $.ajax({
type: "DELETE",
url: "/clients/",
data: item
});
}
},
fields: [
{ name: "TimeSheetId", type: "number",visible:false},
{ name: "TaskDate", type: "text", validate: "required", width: 50 },
{ name: "TaskDescription", type: "text", validate: "required", width: 100 },
{ name: "Duration", title:"Duration (Hrs.)", type: "decimal", step:"0.01", validate: "required", width: 50 },
{ name: "CaseNumber", type: "text", width: 50 },
{ name: "CustomerName", type: "text", width: 50 },
{ name: "CustomerCode", type: "text", width: 50, visible:false },
{ type: "control" }
],
});
});
});