2024-03-26 15:56:31 +08:00

2923 lines
140 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ Page Title="" Language="C#" MasterPageFile="~/MachineDeviceManagement/DeviceManagementBase.master" AutoEventWireup="true" CodeFile="AddMachine.aspx.cs" Inherits="AddMachine" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<link href="<%=GetFileUrlWithVersion("../css/tabcontrol.css")%>" rel="stylesheet" />
<link href="<%=GetFileUrlWithVersion("../css/jquery.datetimepicker.css")%>" rel="stylesheet" />
<style type="text/css">
::-ms-clear, ::-ms-reveal {
display: none;
}
.a {
text-decoration: none;
color: #2140fb;
}
.categoryname {
cursor: default;
font-size: 20px;
font-weight: bold;
padding-top: 5px;
}
.plus:before {
font-size: 10px;
font-weight: normal;
font-family: 'CalciteWebCoreIcons', 'Fontawesome';
content: '\e620';
margin-right: 5px;
}
.minus:before {
font-size: 10px;
font-weight: normal;
font-family: 'CalciteWebCoreIcons', 'Fontawesome';
content: '\e621';
margin-right: 5px;
}
.dialogspanbtn {
font-size: 14px;
font-weight: normal;
font-family: 'CalciteWebCoreIcons', 'Fontawesome';
cursor: pointer;
/*background: rgb(249, 189, 117);*/
padding: 2px 4px;
margin-top: 1px;
margin-left: 3px;
float: left;
}
.dialogedit:before {
content: '\e61b';
}
.dialogok:before {
content: '\e605';
}
.dialogcancel:before {
content: '\e600';
}
.dialogbtn {
height: 24px;
cursor: pointer;
background: rgb(249, 189, 117);
padding: 2px;
}
.machinetd {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.popus-close {
float: right;
margin-right: 6px;
cursor: pointer;
}
.popus-close:before {
content: '\e600';
}
textarea {
resize: none;
}
.divtab {
overflow: auto;
}
.label {
width: 184px;
}
.label1 {
width: 160px !important;
font-weight: bold;
}
.assetcontent table {
border-collapse: collapse;
width: 100%;
}
.assetcontent table td.label {
width: 184px;
text-align: right;
padding-right: 10px;
line-height: 30px;
height: 24px;
vertical-align: top;
}
.assetcontent table td input,
.assetcontent table td textarea {
border: 1px solid #a9a9a9;
width: 200px;
height: 18px;
padding: 1px;
}
.assetcontent table td input[type="checkbox"] {
border: none;
width: 13px;
}
.assetcontent table td textarea {
height: 100px;
}
#tab_rentalconnect table td.label {
width: 130px;
}
#tab_rentalconnect table td input {
width: 150px;
}
#tab_rentalconnect table td select {
width: 154px;
height: 22px;
}
.adjust-content table td.label {
width: unset;
min-width: 130px;
text-align: right;
padding-right: 10px;
line-height: 30px;
height: 24px;
vertical-align: middle;
}
.adjust-content table td input {
width: 200px;
}
.adjust-content table td select {
width: 204px;
}
.button_document {
cursor: pointer;
font-size: 14px;
}
.button_document:before {
padding-right: 8px;
font-family: 'FontAwesome';
color: rgb(123,28,33);
}
.tab_header {
height: inherit;
}
.dropdown-wrapper > .dropdown-header > .dropdown-text {
line-height: 22px;
}
.dropdown-wrapper {
border: 1px solid #a9a9a9;
}
select {
border: 1px solid #a9a9a9;
}
.divattp {
width: 200px;
margin-right: 10px;
margin-left: 10px;
float: left;
position: relative;
}
.divatt {
width: 200px;
height: 200px;
margin-top: 5px;
margin-bottom: 5px;
margin-right: 10px;
cursor: pointer;
border: 1px solid #b0b0b0;
border-radius: 2px;
box-shadow: rgba(0, 0, 0, 0.4);
text-align: center;
float: left;
position: relative;
}
.picture {
max-height: 100%;
max-width: 100%;
margin: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.download {
line-height: 200px;
font-size: 200px;
margin: 0 auto;
font-family: 'Fontawesome';
color: silver;
}
.download::before {
content: '\f15c';
}
.wolist_download {
font-size: 60px;
margin: 0 auto;
font-family: 'Fontawesome';
color: silver;
}
.wolist_download::before {
content: '\f15c';
}
.file-word::before {
content: '\f1c2';
}
.file-excel::before {
content: '\f1c3';
}
.file-ppt::before {
content: '\f1c4';
}
.file-pdf::before {
content: '\f1c1';
}
.file-video::before {
content: '\f1c8';
}
.file-zip::before {
content: '\f1c6';
}
.file-msg::before {
content: '\f0e0';
}
.delete {
position: absolute;
vertical-align: top;
font-size: 20px;
font-family: 'Fontawesome';
color: rgb(123,28,33);
right: 8px;
}
.delete::before {
content: '\f00d';
}
.attadownload {
position: absolute;
vertical-align: top;
font-size: 16px;
font-family: 'Fontawesome';
color: rgb(123,28,33);
right: 5px;
bottom: 5px;
}
.attadownload::before {
content: '\f019';
}
.attaprint {
position: absolute;
vertical-align: top;
font-size: 16px;
font-family: 'Fontawesome';
color: rgb(123,28,33);
right: 30px;
bottom: 5px;
}
.attaprint::before {
content: '\f02f';
}
.attaedit {
font-size: 14px;
font-family: 'Fontawesome';
color: rgb(123,28,33);
padding: 3px;
}
.attaedit::before {
content: '\f044';
}
.attasave {
font-size: 18px;
font-family: 'Fontawesome';
color: rgb(123,28,33);
margin-left: 3px;
}
.attasave::before {
content: '\f00c';
}
.divattp input {
width: 60px;
border: 1px solid #fff;
}
/*
.divattp input.focused,
.divattp input:hover {
border-color: #666;
}
.divattp input:disabled,
.divattp input:disabled:hover,
.divattp td input:disabled {
background: #ddd;
color: #ddd;
border-color: #ddd;
}*/
.inp_name {
height: 24px;
}
.tab_deviceparing tr {
border-bottom: none;
}
.tab_deviceparing tr td.label {
width: 167px;
text-align: right;
padding-right: 10px;
line-height: unset;
height: unset;
vertical-align: middle;
}
</style>
<script src="<%=GetFileUrlWithVersion("../Maintenance/js/inputdatactr.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("../js/jquery.datetimepicker.full.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("../js/controls.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("../js/assetselector.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("js/addasset.min.js")%>" type="text/javascript"></script>
<script type="text/javascript">
var currentdate = "<%=CurrentDate %>";
var IsDealer = <%=IsDealer ?"true":"false"%>;
var IsAdmin =<%=IsAdmin ?"true":"false"%>;
var IsSupperAdmin =<%=IsSupperAdmin ?"true":"false"%>;
var canModifyVIN = <%= CanModifyVIN ? "true":"false" %>;
var isAllowed = false;
var IsReadOnly = <%=IsReadOnly ?"true":"false"%>;
var contractorid = "<%=ContractorID %>";
var machineid = "<%=MachineID %>";
var allMachines;
var indexInEdit;
var assetinfo;
var jobsitsata;
var contactids;
var machines = [];
var makes = [];
var models = [];
var machinetypes = [];
var needRefreshDataOnCancel = false;//由于在Next和Previous时直接保存机器信息在点Cancel时也需要刷新数据
var loadingCount = 0;
var customertimezone;
var customerdatetime;
var inputChanged = false;//编辑机器时是否有修改只用于Attributes和Rental
var rentalChanged = false;//编辑机器时是否有修改只用于Attributes和Rental
var jobsiteinputChanged = false;//编辑机器时是否有修改只用于JobSite
function showConfirm1(msg, title, fok, fcancel) {
_dialog.showConfirm(msg, title, function (e) {
if (typeof fok === 'function') {
fok(e);
}
}, function () {
if (fcancel)
fcancel();
});
}
function devicerequest(method, param, callback, error) {
_network.request("MachineDeviceManagement/ManageMachines.aspx", -1, method, param, callback, error || function (e) {
showmaskbg(false, true);
showAlert(GetTextByKey('P_MA_PAGEERROR', 'An unknown error occurred. Please refresh page.'), GetTextByKey('P_MA_QUERY', 'Query'));
});
}
function assetrequest(method, param, callback, error) {
_network.request("MachineDeviceManagement/AddMachine.aspx", -1, method, param, callback, error || function (e) {
showmaskbg(false, true);
showAlert(GetTextByKey('P_MA_PAGEERROR', 'An unknown error occurred. Please refresh page.'), GetTextByKey('P_MA_QUERY', 'Query'));
});
}
_dialog.showRentalConfirm = function (msg, title, fedit, fadd, fcancel, fclose, iniframe, shownote) {
if (!fclose)
fclose = fcancel;
_dialog.showButtonDialog(msg, title, 'question', fclose, [{
value: GetTextByKey("P_UTILITY_CANCEL", 'Cancel'),
func: fcancel
}, {
value: GetTextByKey("P_UTILITY_ADDNEWRENTALINSTANCE", 'Add New Rental Instance'),
func: fadd
}, {
value: GetTextByKey("P_UTILITY_EDITSELECTEDRENTAL", 'Edit Selected Rental'),
func: fedit
}], iniframe, shownote);
};
function showRentalConfirm(msg, title, fedit, fadd, fcancel, fclose) {
showmaskbg(true);
_dialog.showRentalConfirm(msg, title, function (e) {
showmaskbg(false);
if (typeof fedit === 'function') {
fedit(e);
}
}, function (e) {
showmaskbg(false);
if (typeof fadd === 'function') {
fadd(e);
}
}, function (e) {
showmaskbg(false);
if (typeof fcancel === 'function') {
fcancel(e);
}
}, fclose);
}
function OnAdd() {
GetMachineAttributes(-1);
$('#li_audit').css("display", 'none');
$('#li_devicepairinginfo').css("display", 'none');
$('#li_pm').css("display", 'none');
if ($('#li_audit').hasClass("selected") || $('#li_pm').hasClass("selected") || $('#li_pm').hasClass("li_devicepairinginfo"))
$('#li_jobsiteforeman').click();
$('#tab_audit').css("display", 'none');
$('#btnodometeradd').css("display", 'none');
$('#btnenginehoursadd').css("display", 'none');
setPreviewAttachment();
setReadOnly(false);
setIsShared();
$('.trmachineicon').css('display', 'none');
SetJobSites();
SetContacts();
SetMachineGroups();
SetMachineRental(null);
$('#tbody_rentals').empty();
$('#rentalListDiv').hide();
$("#btnPrevious").hide();
$("#btnNext").hide();
$('#dialog_sn').val('');
$('#dialog_name').val('');
$('#dialog_name2').val('');
$('#dialog_devicesn').val('');
$('#dialog_year').val('');
$("#dialog_make").find("option:first").prop("selected", "selected");
showModels();
$("#dialog_model").find("option:first").prop("selected", "selected");
//showTypes();
//$('#dialog_type').val(-1);
$('#dialog_type').dropdownVal('-1');
$('#dialog_enginehours').val('');
$('#lblEngineHours').attr("title", "");
$('#dialog_odometer').val('');
$('#dialog_sel_odometeruom').val('');
$('#lblOdometer').attr("title", "");
$('#dialog_customstatus').val('0');
$('#dialog_AquisitionType').val('');
$('#dialog_iconfilename').val('');
$('#dialog_hide').prop("checked", false);
$('#dialog_onroad').prop("checked", false);
$('#dialog_telematics').prop("checked", false);
$('#dialog_attachment').prop("checked", false);
$('#dialog_preloaded').prop("checked", false);
$('#dialog_costcenter').val('');
$('#dialog_eqclass').val('');
$('#dialog_description').val('');
$('#dialog_addedon').val('');
$('#dialog_addedby').val('');
$('#tbody_documents').empty();
getAssetAttachmentInfo();
$('#dialog_sn').focus();
}
function OnEdit() {
if (!IsDealer) {
$('#li_audit').css("display", '');
$('#li_pm').css("display", '');
$('#li_devicepairinginfo').css("display", '');
}
$('.trmachineicon').css('display', '');
setPreviewAttachment();
if (allMachines) {
var machine = allMachines[indexInEdit];
machineid = machine.ID;
if (allMachines.length <= 1) {
$("#btnPrevious").hide();
$("#btnNext").hide();
}
else {
$("#btnPrevious").show();
$("#btnNext").show();
}
}
getMachineInfo();
if (!$("#tab_pm").is(":hidden")) {
getAssetPMSchedules(machineid);
$("#tab_pm").data("dataload", true);
}
else
$("#tab_pm").data("dataload", false);
if (!$("#tab_attachmentinfo").is(":hidden")) {
getAssetAttachmentInfo(machineid);
$("#tab_attachmentinfo").data("dataload", true);
}
else
$("#tab_attachmentinfo").data("dataload", false);
if (!$("#tab_rentalconnect").is(":hidden")) {
getRentals(machineid);
$("#tab_rentalconnect").data("dataload", true);
}
else
$("#tab_rentalconnect").data("dataload", false);
if (!$("#tab_attachment").is(":hidden")) {
getAttachments(machineid);
$("#tab_attachment").data("dataload", true);
}
else
$("#tab_attachment").data("dataload", false);
if (!$("#tab_audit").is(":hidden")) {
getOdometers();
getEnineHours();
getLocations();
getIdlehours();
getFueluseds();
getFuelRemainings();
$("#tab_audit").data("dataload", true);
}
else
$("#tab_audit").data("dataload", false);
if (!$("#li_devicepairinginfo").is(":hidden"))
getDevicePairingLogsByAsset();
$('#dialog_sn').focus();
}
function getMachineInfo() {
showLoading();
assetinfo = undefined;
assetrequest("GetMachineInfo", contractorid + String.fromCharCode(170) + machineid, function (data) {
hideLoading();
if (typeof (data) === "string") {
showAlert(data, GetTextByKey("P_MA_ERROR", 'Error'));
return;
}
assetinfo = data;
ShowEditData(data);
if (IsReadOnly) {
$('.iconsave').hide();
$('#div_checkbox :input').attr("disabled", true);
setReadOnly(true);
}
else {
setReadOnly(data.Hidden);
if (!data.Hidden)
setIsShared();
}
}, function (err) {
hideLoading();
});
}
function ShowEditData(asset) {
machineid = asset.ID;
$('#dialog_sn').val(asset.VIN);
$('#dialog_name').val(asset.Name);
$('#dialog_name2').val(asset.Name2);
$('#dialog_devicesn').val(asset.PairedDeviceSN);
$('#dialog_year').val(asset.MakeYear == 0 ? "" : asset.MakeYear);
$("#dialog_make").val(asset.MakeID);
showModels();
$("#dialog_model").val(asset.ModelID);
//showTypes();
//$('#dialog_type').val(asset.TypeID);
$('#dialog_type').dropdownVal(asset.TypeID);
$('#dialog_enginehours').val(asset.EngineHours);
if (asset.EngineHoursDateTimeStr !== '')
$('#lblEngineHours').attr("title", "As of: " + asset.EngineHoursDateTimeStr + " (UTC)");
$('#dialog_odometer').val(asset.Odometer);
$('#dialog_sel_odometeruom').val(asset.OdometerUnits);
if (asset.OdometerDateTimeStr !== '')
$('#lblOdometer').attr("title", "As of: " + asset.OdometerDateTimeStr + " (UTC)");
$('#dialog_customstatus').val(asset.CustomStatus);
$('#dialog_AquisitionType').val(asset.AquisitionType);
$('#dialog_iconfilename').val(asset.IconFileName);
$('#dialog_hide').prop("checked", asset.Hidden);
$('#dialog_onroad').prop("checked", asset.OnRoad);
$('#dialog_telematics').prop("checked", asset.TelematicsEnabled);
$('#dialog_attachment').prop("checked", asset.Attachment);
$('#dialog_preloaded').prop("checked", asset.Preloaded);
$('#dialog_costcenter').val(asset.CostCenter);
$('#dialog_eqclass').val(asset.EQClass);
$('#dialog_description').val(asset.Description);
$('#dialog_addedon').val(asset.AddedOnStr);
$('#dialog_addedby').val(asset.AddedByUserName);
if (!asset.TelematicsEnabled && (IsSupperAdmin || isAllowed)) {
$('#btnodometeradd').css("display", '');
$('#btnenginehoursadd').css("display", '');
}
else {
$('#btnodometeradd').css("display", 'none');
$('#btnenginehoursadd').css("display", 'none');
}
jobsitsata = asset.JobSites;
contactids = asset.ContactIDs;
SetJobSites(asset.JobSites);
SetContacts(asset.ContactIDs);
SetMachineGroups(asset.MachineGroupIDs);
GetMachineAttributes(machineid);
SetAssetItem(asset);
}
function GetMachineMakes(newmake) {
devicerequest("GetAssetMakes", "", function (data) {
if (data && data.length > 0) {
makes = data;
$("#dialog_make").empty();
$("#dialog_makeforaddmodel").empty();
var selmake = undefined;
for (var i = 0; i < makes.length; i++) {
var make = makes[i];
var op = $("<option></option>").val(make.ID).text(make.Name);
$("#dialog_make").append(op);
op = $("<option></option>").val(make.ID).text(make.Name);
$("#dialog_makeforaddmodel").append(op);
if (newmake == make.Name) {
newmake = undefined;
selmake = make.ID;
}
}
if (selmake)
$("#dialog_make").val(selmake);
else if (assetinfo)
$("#dialog_make").val(assetinfo.MakeID);
}
GetMachineModels();
}, function (err) {
});
}
function GetMachineModels(makeid, newmodel) {
var ps = [-1, ""];
devicerequest("GetAssetModels", JSON.stringify(ps), function (data) {
if (data && data.length > 0) {
models = data;
showModels(makeid, newmodel);
}
}, function (err) {
});
}
function showModels(makeid, newmodel) {
if (makeid)
$("#dialog_make").val(makeid);
else
makeid = $("#dialog_make").val();
$("#dialog_model").empty();
var selmodel = undefined;
for (var i = 0; i < models.length; i++) {
var model = models[i];
if (model.MakeID == makeid) {
var op = $("<option></option>").val(model.ID).text(model.Name);
$("#dialog_model").append(op);
if (newmodel == model.Name) {
newmodel = undefined;
selmodel = model.ID;
}
}
}
if (selmodel)
$("#dialog_model").val(selmodel);
else if (assetinfo)
$("#dialog_model").val(assetinfo.ModelID);
}
function GetMachineTypes() {
devicerequest("GetMachineTypes", contractorid, function (data) {
if (data && data.length > 0) {
machinetypes = data;
//$("#dialog_type").empty();
//$("#dialog_type").append("<option values='-1'> </option>");
var tempmachinetypes = JSON.parse(JSON.stringify(machinetypes));
tempmachinetypes.splice(0, 0, { Key: "-1", Value: ' ' });
var dropdown = $('#dialog_type').data('dropdown');
dropdown.setSource(tempmachinetypes);
var dropdown = $('#dialog_typeforaddmodel').data('dropdown');
dropdown.setSource(machinetypes);
if (assetinfo)
$('#dialog_type').dropdownVal(assetinfo.TypeID);
//$("#dialog_typeforaddmodel").empty();
//for (var i = 0; i < data.length; i++) {
// var kv = data[i];
//var op = $("<option></option>").val(kv.Key).text(kv.Value);
//$("#dialog_type").append(op);
//op = $("<option></option>").val(kv.Key).text(kv.Value);
//$("#dialog_typeforaddmodel").append(op);
//}
}
}, function (err) {
});
}
function GetUserPermission() {
devicerequest("GetUserPermission", contractorid, function (data) {
if (typeof (data) === "string") {
showAlert(data, GetTextByKey("P_MA_ERROR", 'Error'));
return;
}
isAllowed = data;
}, function (err) {
})
}
function OnRefresh() {
GetMachineMakes();
GetMachineTypes();
GetActiveJobsites();
GetContacts();
GetMachineGroups();
getCustomerTimeZone();
if (!IsSupperAdmin)
GetUserPermission();
}
function UpLoadMachineIcon(type, e) {
var file = $('<input type="file" style="display: none;" accept="image/png,image/jpeg" />')
file.change(function () {
if (!/image\/\w+/.test(this.files[0].type)) {
showAlert(GetTextByKey("P_MA_UPLOADASSETICONTIPS", 'The file type for the asset icon is invalid. The file must be JPG or PNG.'), GetTextByKey("P_MA_SAVEASSET", 'Save Asset'));
return;
}
var iconfile = this.files[0];
if (type == 1) {
ChangeMachineIconFile(iconfile, type, e);
}
else
ChangeMachineIconFile(iconfile, type);
}).click();
}
function ChangeMachineIconFile(file, type) {
var item = {
'Key': contractorid,
'Value': machineid,
};
var formData = new FormData();
formData.append("iconFile", file);
formData.append("MethodName", "ChangeMachineIconFile");
formData.append("ClientData", JSON.stringify(item));
$.ajax({
url: 'AddMachine.aspx',
type: 'POST',
dataType: 'json',
processData: false,
contentType: false,
data: formData,
async: true,
success: function (data) {
if (data !== 'OK') {
showAlert(data, GetTextByKey("P_MA_ICONFILE", 'Icon File'));
} else {
if (type == 1) {
var filename = "";
if (file) {
filename = file.name;
$(ev).find("img.imgiconremove").css('display', '');
}
else {
$(ev).find("img.imgiconremove").css('display', 'none');
}
$(ev).find("span.spaniconfilename").text(filename);
}
else {
if (file)
$('#dialog_iconfilename').val(file.name);
else
$('#dialog_iconfilename').val('');
needRefreshDataOnCancel = true;
}
}
},
error: function (err) {
showAlert(err.statusText, GetTextByKey("P_MA_ICONFILE", 'Icon File'));
}
});
}
function RemoveMachineIcon2() {
if ($('#dialog_iconfilename').val() == '')
return;
showConfirm(GetTextByKey("P_MA_DELETETHEICON", 'Do you want to delete this icon?'), GetTextByKey("P_MA_DELETEICON", 'Delete icon'), function () {
ChangeMachineIconFile(undefined, 2);
});
}
var IsPositiveInteger = /^[0-9]+[0-9]*[0-9]*$/;
var IsNumber = /^-?[0-9]+.?[0-9]*$/;
function OnSave(exit, ignoreDuplicate, callback) {
var item = getAssetInput();
if (!item)
return;
if (jobsiteinputChanged && item.OnSiteJobsiteIDs.length > 0) {
showConfirm(GetTextByKey("P_MA_ONSITETIPS", 'You have manually assigned a jobsite. This action will disable geofence alerts and jobsite auto-assignment. Do you want to proceed? '), GetTextByKey("P_MA_SAVEASSET", 'Save Asset'), function () {
saveMachine(item, exit, ignoreDuplicate, callback);
});
}
else
saveMachine(item, exit, ignoreDuplicate, callback);
}
function saveMachine(item, exit, ignoreDuplicate, callback) {
var alerttitle = GetTextByKey("P_MA_SAVEASSET", 'Save Asset');
if (IsReadOnly || (assetinfo && !checkChanged(assetinfo, item))) {//when readonly or edit asset, no change, do not save.
if (callback) {
callback(item);
}
else {
if (exit == 0)
showAlert(GetTextByKey("P_MA_SAVSUCCESSFULLY", "Saved successfully."), GetTextByKey("P_MA_SAVEASSET", alerttitle));
else if (exit == 1)
OnExit(exit);
}
return;
}
item.IgnoreDuplicate = ignoreDuplicate == 1;
showloading(true);
var param = JSON.stringify(item);
param = htmlencode(param);
assetrequest("SaveMachine", param, function (data) {
showloading(false);
if (typeof (data) === "string") {
showAlert(data, alerttitle);
}
else if (data.Result == 0) {//有重复的机器
showAssetDuplicates(item, data.Data);//data.Data为AssetID数组
}
else {
inputChanged = false;
rentalChanged = false;
jobsiteinputChanged = false;
machineid = data.Data[0];
$('#tab_rentalconnect').data('rentalid', data.Data[1])
needRefreshDataOnCancel = true;
if (callback) {
//showAlert("Saved successfully.", alerttitle);
callback(item);
}
else {
if (exit == 0)
showAlert(GetTextByKey("P_MA_SAVSUCCESSFULLY", "Saved successfully."), alerttitle);
else if (exit == 1)
OnExit(exit);
}
}
}, function (err) {
showloading(false);
showAlert(GetTextByKey("P_MA_FAILEDTO", "Failed to {0}.").replace('{0}', alerttitle), alerttitle);
});
}
function getAssetInput() {
var jsids = [];
var tempsource = grid_jobsitedt.source;
for (var i = 0; i < tempsource.length; i++) {
var js = tempsource[i];
if (js.OnSite)
jsids.push(js.ID);
}
var cids = [];
var tempsource1 = grid_contactdt.source;
for (var i = 0; i < tempsource1.length; i++) {
var contact = tempsource1[i];
if (contact.Assigned)
cids.push(contact.IID);
}
var groupids = [];
var tempsource2 = grid_assetgroups.source;
for (var i = 0; i < tempsource2.length; i++) {
var group = tempsource2[i];
if (group.Selected)
groupids.push(group.GroupID);
}
var assettype = $("#dialog_type").data('dropdown').selected || { Key: '-1', Value: ' ' };
var item = {
'VIN': $.trim($('#dialog_sn').val()),
'Name': $.trim($('#dialog_name').val()),
'Name2': $.trim($('#dialog_name2').val()),
'MakeYear': $.trim($('#dialog_year').val()),
'MakeID': $("#dialog_make").val(),
'MakeName': $("#dialog_make option:selected").text(),
'ModelID': $("#dialog_model").val(),
'ModelName': $("#dialog_model option:selected").text(),
'TypeID': assettype.Key,
'TypeName': assettype.Value,
'EngineHours': $('#dialog_enginehours').val(),
'ContractorID': contractorid,
'ODOMeter': $('#dialog_odometer').val(),
'OdometerUnits': $('#dialog_sel_odometeruom').val(),
'CustomStatus': $('#dialog_customstatus').val(),
'OnSiteJobsiteIDs': jsids,
'ContactIDs': cids,
'MachineGroupIDs': groupids,
'AquisitionType': $('#dialog_AquisitionType').val(),
//'IconFileName': $('#dialog_iconfilename').val(),
'Hidden': $('#dialog_hide').prop('checked'),
'OnRoad': $('#dialog_onroad').prop('checked'),
'TelematicsEnabled': $('#dialog_telematics').prop('checked'),
'Attachment': $('#dialog_attachment').prop('checked'),
'Preloaded': $('#dialog_preloaded').prop('checked'),
'CostCenter': $('#dialog_costcenter').val(),
'EQClass': $('#dialog_eqclass').val(),
'Description': $('#dialog_description').val()
};
var alerttitle;
if (machineid) {
item.ID = machineid;
alerttitle = GetTextByKey("P_MA_EDITASSET", "Edit Asset");
} else {
item.ID = -1;
alerttitle = GetTextByKey("P_MA_ADDASSET", "Add Asset");
}
if (!item.VIN || item.VIN.length == 0) {
showAlert(GetTextByKey("P_MA_VINCANNOTBEEMPTY", 'VIN cannot be empty.'), alerttitle);
$('#dialog_sn').focus();
return false;
}
if (!item.MakeID || item.MakeID === "") {
showAlert(GetTextByKey("P_MA_PLEASESELECTAMAKE", 'Please select a Make.'), alerttitle);
return false;
}
if (!item.ModelID || item.ModelID === "") {
showAlert(GetTextByKey("P_MA_PLEASESELECTAMODEL", 'Please select a Model.'), alerttitle);
return false;
}
if (!item.TypeID || item.TypeID === "")
item.TypeID = -1;
if (item.MakeYear !== "" && !IsPositiveInteger.test(item.MakeYear)) {
showAlert(GetTextByKey("P_MA_DATEFORMATERROR", 'Date format error.'), alerttitle);
return false;
}
if (item.MakeYear === "")
item.MakeYear = -1;
if (item.EngineHours !== "" && isNaN(item.EngineHours)) {
showAlert(GetTextByKey("P_MA_ENGINEHOURSFORMATERROR", 'Engine Hours format error.'), alerttitle);
return false;
}
if (item.EngineHours === "")
item.EngineHours = -1;
if (item.ODOMeter !== "" && isNaN(item.ODOMeter)) {
showAlert(GetTextByKey("P_MA_ODOMETERFORMATERROR", 'Odometer format error.'), alerttitle);
return false;
}
if (item.ODOMeter === "" || item.ODOMeter === 0) {
item.ODOMeter = -1;
item.OdometerUnits = "";
}
var rentalid = $('#tab_rentalconnect').data('rentalid');
if (rentalid === "")
rentalid = -1;
var rentaldate = $('#dialog_rentaldate').val();
if (rentalChanged && (rentalid > 0 || (rentalid < 0 && rentaldate.length > 0))) {
var rental = getRentalInput(alerttitle);//获取Rental信息
if (!rental) return false;
item.MachineRental = rental;
}
if ($("#tab_attachmentinfo").data("dataload")) {
var attachinfo = getAssetAttachmentInfoInput(alerttitle);//获取Attachment Info信息
if (!attachinfo) return false;
item.AttachmentInfo = attachinfo;
}
var attrs = getAttributeInput(alerttitle);//获取Attribute信息
if (!attrs) return false;
item.MachineAttributes = attrs;
//var visibleonworkorders = [];
//var atts = grid_attachmentdt.source;
//if (atts && atts.length > 0) {
// for (var i = 0; i < atts.length; i++) {
// var att = atts[i];
// var kv = { "key": att.ID, "Value": att.VisibleOnWorkOrder };
// visibleonworkorders.push(kv);
// }
//}
//item.VisibleOnWorkOrders = visibleonworkorders;
return item;
}
function checkChanged(asset, input) {
if (inputChanged) {
return true;
}
if (asset.Name2 == input.Name2
&& asset.MakeYear == (input.MakeYear < 0 ? 0 : input.MakeYear)
&& asset.MakeID == (input.MakeID < 0 ? 0 : input.MakeID)
&& asset.ModelID == (input.ModelID < 0 ? 0 : input.ModelID)
&& asset.EQClass == input.EQClass
&& asset.TypeID == (input.TypeID < 0 ? 0 : input.TypeID)
&& asset.Description == input.Description
//&& asset.EngineHours == input.EngineHours
//&& asset.ODOMeter == input.ODOMeter
&& asset.AquisitionType == input.AquisitionType
&& asset.CostCenter == input.CostCenter
&& asset.Hidden == input.Hidden
&& asset.OnRoad == input.OnRoad
&& asset.TelematicsEnabled == input.TelematicsEnabled
&& asset.Attachment == input.Attachment
&& asset.Preloaded == input.Preloaded
&& asset.VIN == input.VIN
&& asset.Name == input.Name
&& asset.CustomStatus == input.CustomStatus)
return false;
return true;
}
var oldAssets;
var oldAssetIndex = 0;
function showAssetDuplicates(newAsset, assets) {
oldAssets = assets;
oldAssetIndex = 0;
if (oldAssets.length > 1)
$("#divDupFun").show();
else
$("#divDupFun").hide();
showmaskbg(true);
$('#dialog_assetduplicates').css({
'top': (document.documentElement.clientHeight - $('#dialog_adjustenginehours').height()) / 3,
'left': (document.documentElement.clientWidth - $('#dialog_adjustenginehours').width()) / 2
}).showDialogfixed();
var asset = newAsset;
//显示当前添加的机器信息
$('#dialog_newhide').attr("checked", asset.Hidden);
$('#dialog_newonroad').attr("checked", asset.OnRoad);
$('#dialog_newtelematics').attr("checked", asset.TelematicsEnabled);
$('#dialog_newattachment').attr("checked", asset.Attachment);
$('#dialog_newpreloaded').attr("checked", asset.Preloaded);
$('#dialog_newsn').text(asset.VIN);
$('#dialog_newname').text(asset.Name);
$('#dialog_newname2').text(asset.Name2);
//$('#dialog_newdevicesn').text("");
$('#dialog_newyear').text(eval(asset.MakeYear) > 0 ? asset.MakeYear : "");
$('#dialog_newmake').text(asset.MakeName);
$('#dialog_newmodel').text(asset.ModelName);
$('#dialog_neweqclass').text(asset.EQClass);
$('#dialog_newtype').text(asset.TypeName);
$('#dialog_newdescription').val(asset.Description);
//$('#dialog_newenginehours').text(asset.EngineHours);
//$('#dialog_newodometer').text(asset.Odometer);
//$('#dialog_newaddedon').text("");
//$('#dialog_newaddedby').text("");
showOldAsset();
}
var oldAsset = undefined;
function showOldAsset() {
if (oldAssetIndex < 0) oldAssetIndex = oldAssets.length - 1;
if (oldAssetIndex > oldAssets.length - 1) oldAssetIndex = 0;
var assetid = oldAssets[oldAssetIndex];
$("#spnumberinfo").text((oldAssetIndex + 1) + " of " + oldAssets.length);
$("#assetdupmask").show();
assetrequest("GetMachineInfo", contractorid + String.fromCharCode(170) + assetid, function (data) {
if (typeof (data) === "string") {
showAlert(data, GetTextByKey("P_MA_ERROR", 'Error'));
$("#assetdupmask").hide();
return;
}
oldAsset = data;
var asset = oldAsset;
$('#dialog_oldhide').attr("checked", asset.Hidden);
$('#dialog_oldonroad').attr("checked", asset.OnRoad);
$('#dialog_oldtelematics').attr("checked", asset.TelematicsEnabled);
$('#dialog_oldAttachment').attr("checked", asset.Attachment);
$('#dialog_oldpreloaded').attr("checked", asset.Preloaded);
$('#dialog_oldsn').text(asset.VIN);
$('#dialog_oldname').text(asset.Name);
$('#dialog_oldname2').text(asset.Name2);
$('#dialog_olddevicesn').text(asset.PairedDeviceSN);
$('#dialog_oldyear').text(eval(asset.MakeYear) > 0 ? asset.MakeYear : "");
$('#dialog_oldmake').text(asset.MakeName);
$('#dialog_oldmodel').text(asset.ModelName);
$('#dialog_oldeqclass').text(asset.EQClass);
$('#dialog_oldtype').text(asset.TypeName);
$('#dialog_olddescription').val(asset.Description);
$('#dialog_oldenginehours').text(asset.EngineHours ? asset.EngineHours : "");
$('#dialog_oldodometer').text(asset.Odometer ? asset.Odometer : "");
$('#dialog_oldaddedon').text(asset.AddedOnStr);
$('#dialog_oldaddedby').text(asset.AddedByUserName);
$("#assetdupmask").hide();
}, function (err) {
$("#assetdupmask").hide();
});
}
function OnDupNext() {
showOldAsset(++oldAssetIndex);
}
function OnDupPrevious() {
showOldAsset(--oldAssetIndex);
}
function OnUseOldAsset() {
if (!oldAsset) return;
machineid = oldAsset.ID;
if (oldAsset.Hidden) {
$("#assetdupmask").show();
showConfirm('Would you like to make this Asset visible?', GetTextByKey("P_MA_EDITASSET", "Edit Asset"), function () {
var ps = [contractorid, machineid, "Hide", false];
assetrequest('ChangeAssetProperty', JSON.stringify(ps), function (data) {
});
$('#dialog_assetduplicates').hideDialog();
showmaskbg(false);
$("#assetdupmask").hide();
OnEdit();
}, function () {
$('#dialog_assetduplicates').hideDialog();
showmaskbg(false);
$("#assetdupmask").hide();
OnEdit();
}, function () {
$("#assetdupmask").hide();
});
}
else {
$('#dialog_assetduplicates').hideDialog();
showmaskbg(false);
$("#assetdupmask").hide();
OnEdit();
}
}
function OnIgnoreDuplicate() {
$('#dialog_assetduplicates').hideDialog();
OnSave(0, 1);
}
function setReadOnly(checked) {
$('#div_machineinfomask').css('display', checked ? '' : 'none');
setRightMask();
$('#dialog_sn').attr("disabled", IsReadOnly || checked || (machineid != undefined && !canModifyVIN));
$('#dialog_name').attr("disabled", checked);
$('#dialog_name2').attr("disabled", checked);
$('#dialog_make').attr("disabled", checked);
$('#dialog_model').attr("disabled", checked);
//$('#dialog_type').attr("disabled", checked);
$('#dialog_type').dropdownDisabled(checked);
$('#dialog_onroad').attr('disabled', checked);
$('#dialog_telematics').attr('disabled', checked);
$('#dialog_attachment').attr('disabled', checked);
$('#dialog_preloaded').attr('disabled', checked);
};
function setIsShared() {
var shared = assetinfo && assetinfo.ShareStatus == 2;
$('#dialog_sn').attr("disabled", shared || (assetinfo != undefined && !canModifyVIN));
$('#dialog_make').attr("disabled", shared);
$('#dialog_model').attr("disabled", shared);
//$('#dialog_type').attr("disabled", shared);
$('#dialog_type').dropdownDisabled(shared);
if (assetinfo && !shared && IsSupperAdmin && !IsDealer) {
$("#btnmerge").show();
$("#btndelete").show();
}
else {
$("#btnmerge").hide();
$("#btndelete").hide();
}
dispalyAddMakeModel(!shared);
setRightMask();
}
function setRightMask(tabName) {
$('#div_attributesmask').css('top', $('#ul_container').height());
$('#div_attributesmask').css('bottom', 0);
$('#div_attributesmask').css('height', "unset");
var shareDisenableTab = [];//tab_audit 共享机器也可调整
if (!tabName)
tabName = $("#ul_container").find(".selected").eq(0).attr("data-href");
if ($(dialog_hide).prop("checked")
|| IsReadOnly) {
$('#div_attributesmask').show();
}
else if (assetinfo && assetinfo.ShareStatus == 2) {
if (shareDisenableTab.indexOf(tabName) >= 0)
$('#div_attributesmask').show();
else
$('#div_attributesmask').hide();
}
else
$('#div_attributesmask').hide();
}
function init(cid, machineList, index) {
if (contractorid != cid) {
contractorid = cid;
OnRefresh();
}
allMachines = machineList
indexInEdit = index;
if (allMachines) {
OnEdit();
}
else {
machineid = undefined;
assetinfo = undefined;
OnAdd();
}
}
function editasset(cid, aid) {//single asset view调用
if (contractorid != cid) {
contractorid = cid;
OnRefresh();
}
machineid = aid;
OnEdit();
}
function OnExit(type) {
if (type === 0) {
if (needRefreshDataOnCancel) {
type = 1;
needRefreshDataOnCancel = false;
}
}
window.parent.CloseDialog(type);
}
function dispalyAddMakeModel(dispaly) {
if (dispaly && IsAdmin) {
$("#btnAddMake").show();
$("#dialog_make").width(181);
$("#btnAddModel").show();
$("#dialog_model").width(181);
}
else {
$("#btnAddMake").hide();
$("#dialog_make").width(204);
$("#btnAddModel").hide();
$("#dialog_model").width(204);
}
}
var dialogSelectMergeAssets;
$(function () {
dialogSelectMergeAssets = new $assetselector('dialog_machines');
dialogSelectMergeAssets.forceSingle = true;
dialogSelectMergeAssets.onDialogClosed = function () {
showmaskbg(false);
};
dialogSelectMergeAssets.onOK = function (source, selectedIndex) {
var selectedAsset = null;
if (selectedIndex >= 0)
selectedAsset = source[selectedIndex];
if (selectedAsset != null) {
mergeassetid = selectedAsset.Id;
showMergeAsset();
}
else
showmaskbg(false);
};
if (!IsAdmin) {
dispalyAddMakeModel(false);
}
OnRefresh();
$('#dialog_hide').click(function () {
var checked = $('#dialog_hide').is(':checked');
setReadOnly(checked);
if (!checked)
setIsShared();
});
$('#dialog_telematics').click(function () {
var checked = $('#dialog_telematics').is(':checked');
if (machineid && !checked && (IsSupperAdmin || isAllowed)) {
$('#btnodometeradd').css("display", '');
$('#btnenginehoursadd').css("display", '');
}
else {
$('#btnodometeradd').css("display", 'none');
$('#btnenginehoursadd').css("display", 'none');
}
});
$('.popus-close').click(function (e) {
hidePopup();
}).keydown(resettab);
function resettab(e) {
if (e.keyCode == 9) {
var input = $('#popupdialog').find("input:not(:disabled),select:not(:disabled)").eq(0);
input.focus();
return false;
}
}
$("#li_pm").click(function () {
if (!$("#tab_pm").data("dataload")) {
getAssetPMSchedules(machineid);
$("#tab_pm").data("dataload", true);
}
});
$("#li_attachmentinfo").click(function () {
if (!$("#tab_attachmentinfo").data("dataload")) {
getAssetAttachmentInfo(machineid);
$("#tab_attachmentinfo").data("dataload", true);
}
});
$("#li_rentalconnect").click(function () {
if (!$("#tab_rentalconnect").data("dataload")) {
getRentals(machineid);
$("#tab_rentalconnect").data("dataload", true);
}
});
$("#li_attachment").click(function () {
if (!$("#tab_attachment").data("dataload")) {
getAttachments(machineid);
$("#tab_attachment").data("dataload", true);
}
});
$("#li_audit").click(function () {
if (!$("#tab_audit").data("dataload")) {
getOdometers();
getEnineHours();
getLocations();
getIdlehours();
getFueluseds();
getFuelRemainings();
$("#tab_audit").data("dataload", true);
}
});
$("#li_devicepairinginfo").click(function () {
getDevicePairingLogsByAsset();
});
$("#tab_attachmentinfo").find("input").change(function () {
inputChanged = true;
});
$("#tab_attachmentinfo").find("select").change(function () {
inputChanged = true;
});
$("#tab_rentalconnect").find("input").change(function () {
inputChanged = true;
rentalChanged = true;
});
$("#tab_rentalconnect").find("textarea").change(function () {
inputChanged = true;
rentalChanged = true;
});
$("#tab_rentalconnect").find("select").change(function () {
inputChanged = true;
rentalChanged = true;
});
$("input[name=rdoattachmentmode]").each(function () {
$(this).click(function () {
var type = $(this).val();
if (type === "0") {
$('#tr_document_url').show();
$('#tr_document_file').hide();
$('#browseattfile').hide();
}
else {
$('#tr_document_url').hide();
$('#tr_document_file').show();
$('#browseattfile').show();
}
});
});
$("#dialog_make").change(function () {
showModels();
});
$('#dialog_type').dropdown([
{ Key: '-1', Value: ' ' }
], {
search: true,
valueKey: 'Key',
textKey: 'Value'
});
$('#dialog_typeforaddmodel').dropdown([
], {
search: true,
valueKey: 'Key',
textKey: 'Value'
});
function resizeContent() {
$('#divcontent').css('height', $(window).height() - $('#divcontent').offset().top - 4);
$('.content_main').css('min-height', 0);
}
if (!IsSupperAdmin) {
$('#dialog_preloaded').hide();
$('#dialog_preloaded_text').hide();
}
window.onresize = resizeContent;
resizeContent();
$(window).resize(function () {
$("#rightcontent").css("width", $(window).width() - 435);
$("#jobsitelist").css("height", $(window).height() - $("#jobsitelist").offset().top - 10);
grid_jobsitedt && grid_jobsitedt.resize();
$("#contactlist").css("height", $(window).height() - $("#contactlist").offset().top - 10);
grid_contactdt && grid_contactdt.resize();
$("#assetgrouplist").css("height", $(window).height() - $("#assetgrouplist").offset().top - 10);
grid_assetgroups && grid_assetgroups.resize();
}).resize();
});
function reshowaddidocgrid(type) {
setTimeout(function () {
if (type == "attachment") {
}
else if (type == "audit") {
$("#odometerlist").css("height", autoheight(grid_odometerdt));
grid_odometerdt && grid_odometerdt.resize();
$("#enginehourslist").css("height", autoheight(grid_enginehoursdt));
grid_enginehoursdt && grid_enginehoursdt.resize();
$("#locationlist").css("height", autoheight(grid_locationdt));
grid_locationdt && grid_locationdt.resize();
$("#idlehourlist").css("height", autoheight(grid_idlehourdt));
grid_idlehourdt && grid_idlehourdt.resize();
$("#fuelusedlist").css("height", autoheight(grid_fueluseddt));
grid_fueluseddt && grid_fueluseddt.resize();
$("#fuelremaininglist").css("height", autoheight(grid_fuelremainingdt));
grid_fuelremainingdt && grid_fuelremainingdt.resize();
}
});
}
function autoheight(grid) {
var height = 28 + 27;//28为Header高度27为预留高度
if (!grid) return height;
var tempsource = grid.source;
if (tempsource && tempsource.length > 0)
height += tempsource.length * 27;
return height;
}
function showLoading() {
loadingCount++;
$("#dialogmask").show();
}
function hideLoading() {
loadingCount--;
if (loadingCount === 0)
$("#dialogmask").hide();
}
function showsubloading(id, flag, noanimation) {
var mask = $("#" + id);
mask.children().show();
if (noanimation) {
mask.css('display', flag ? '' : 'none');
} else {
if (flag) {
mask.fadeIn(100);
} else {
mask.fadeOut(100);
}
}
}
function showsubmask(id, flag, noanimation) {
var mask = $("#" + id);
mask.children().hide();
if (noanimation) {
mask.css('display', flag ? '' : 'none');
} else {
if (flag) {
mask.fadeIn(100);
} else {
mask.fadeOut(100);
}
}
}
function OnNext() {
OnSave(0, 0, gotoNext);
}
function gotoNext() {
if (++indexInEdit > allMachines.length - 1)
indexInEdit = 0;
OnEdit();
window.parent.changeGridSelectIndex(indexInEdit);
}
function OnPrevious() {
OnSave(0, 0, gotoPrevious);
}
function gotoPrevious() {
if (--indexInEdit < 0)
indexInEdit = allMachines.length - 1;
OnEdit();
window.parent.changeGridSelectIndex(indexInEdit);
}
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div id="div_content" style="min-width: 1024px;">
<div class="function_title">
<span class="sbutton iconsave" onclick="OnSave(0,0);" data-lgid="P_MA_SAVE">Save</span>
<span class="sbutton iconsave" onclick="OnSave(1,0);" data-lgid="P_MA_SAVE1">Save and Exit</span>
<span class="sbutton iconexit" onclick="OnExit(0);" data-lgid="P_MA_SAVE2">Exit Without Saving</span>
<%if (IsSupperAdmin && !IsDealer)
{ %><span class="sbutton iconmerge" id="btnmerge" onclick="OnMergeAsset();" data-lgid="P_MA_MERGEASSET">Merge Asset</span>
<span class="sbutton icondelete" id="btndelete" onclick="OnDeleteAsset(-1);" data-lgid="P_MA_DELETEASSET">Delete Asset</span>
<%} %>
<span class="sbutton iconprevious" id="btnNext" onclick="OnPrevious();" style="display: none;" data-lgid="P_MA_PREVIOUS">Previous</span>
<span class="sbutton iconnext" id="btnPrevious" onclick="OnNext();" style="display: none;" data-lgid="P_MA_NEXT">Next</span>
</div>
<div class="clear"></div>
<div id="divcontent" class="assetcontent">
<div id="div_checkbox" style="padding-top: 5px; padding-bottom: 5px;">
<input type="checkbox" id="dialog_hide" tabindex="1" class="chk" style="margin-left: 36px;" /><span data-lgid="P_MA_HIDEHIDDEN">Hide/Hidden</span>
<input type="checkbox" id="dialog_onroad" tabindex="2" class="chk" /><span data-lgid="P_MA_ONROAD">On-Road</span>
<input type="checkbox" id="dialog_telematics" tabindex="3" class="chk" /><span data-lgid="P_MA_TELEMATICSENABLED">Telematics Enabled</span>
<input type="checkbox" id="dialog_attachment" tabindex="4" class="chk" /><span data-lgid="P_MA_ATTACHMENT">Attachment</span>
<input type="checkbox" id="dialog_preloaded" tabindex="5" class="chk" /><span id="dialog_preloaded_text" data-lgid="P_MA_PRELOADED">Preloaded</span>
</div>
<div id="div_machineinfo" style="width: 415px; float: left; position: relative;">
<div id="div_machineinfomask" class="maskbg" style="background: #e7e7e6; top: 80px;"></div>
<table>
<tr>
<td class="label" data-lgid="P_MA_VINSN_COLON">VIN/SN:</td>
<td>
<input type="text" id="dialog_sn" maxlength="200" tabindex="6" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ASSETNAME_COLON">Asset Name:</td>
<td>
<input type="text" id="dialog_name" maxlength="200" tabindex="7" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ASSETNAME2_COLON">Asset Name(Custom):</td>
<td>
<input type="text" id="dialog_name2" maxlength="200" tabindex="8" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_DEVICESN_COLON">Paired Device SN:</td>
<td>
<input type="text" id="dialog_devicesn" disabled="disabled" maxlength="200" tabindex="9" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_YEAR_COLON">Year:</td>
<td>
<input type="text" id="dialog_year" maxlength="4" tabindex="10" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_MAKE_COLON">Make:</td>
<td>
<select id="dialog_make" tabindex="11" style="width: 181px; height: 22px; float: left;"></select>
<a id="btnAddMake" tabindex="11" style="margin-left: 3px;"><span class="dialogspanbtn iconadd" onclick="OnAddMake();" title="Add new make" data-title-lgid="P_MA_ADDNEWMAKE"></span></a>
</td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_MODEL_COLON">Model:</td>
<td>
<select id="dialog_model" tabindex="12" style="width: 181px; height: 22px; float: left;"></select>
<a id="btnAddModel" tabindex="12" style="margin-left: 3px;" onclick="OnAddModel();"><span class="dialogspanbtn iconadd" title="Add new model" data-title-lgid="P_MA_ADDNEWMODEL"></span></a>
</td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_EQCLASS_COLON">Eq.Class:</td>
<td>
<input type="text" id="dialog_eqclass" maxlength="100" tabindex="13" autocomplete="off" />
</td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_TYPE_COLON">Asset Type:</td>
<td>
<%--<select id="dialog_type" tabindex="14" style="width: 204px; height: 22px;"></select>--%>
<div id="dialog_type" style="width: 204px; height: 24px;"></div>
</td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_DESCRIPTION_COLON">Description:</td>
<td>
<textarea id="dialog_description" style="height: 60px;" maxlength="1000" tabindex="15"></textarea>
</td>
</tr>
<tr>
<td class="label" id="lblEngineHours" data-lgid="P_MA_ENGINEHOURS_COLON">Engine Hours:</td>
<td>
<input type="text" id="dialog_enginehours" maxlength="8" tabindex="16" disabled="disabled" />
</td>
</tr>
<tr>
<td class="label" id="lblOdometer" data-lgid="P_MA_ODOMETER_COLON">Odometer:</td>
<td>
<input type="text" id="dialog_odometer" maxlength="8" tabindex="17" disabled="disabled" /></td>
</tr>
<tr style="display: none;">
<td class="label" data-lgid="P_MA_ODOMETERUOM_COLON">Odometer UOM:</td>
<td>
<select id="dialog_sel_odometeruom" tabindex="18" style="width: 204px; height: 22px;">
<option value="Mile" data-lgid="P_MA_MILE">Mile</option>
<option value="Kilometre" data-lgid="P_MA_KILOMETER">Kilometer</option>
</select>
</td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_AVAILABILITY">Availability</td>
<td>
<select id="dialog_customstatus" tabindex="18" style="width: 204px; height: 22px;">
<option value="0" data-lgid="P_MA_INUSE">In Use</option>
<option value="1" data-lgid="P_MA_AVAILABLE">Available</option>
<option value="2" data-lgid="P_MA_STANDBY">Standby</option>
<option value="10" data-lgid="P_MA_DOWN">Down</option>
</select></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ACQUISITIONTYPE_COLON">Acquisition Type:</td>
<td>
<select id="dialog_AquisitionType" tabindex="31" style="width: 204px; height: 22px;">
<option value=""></option>
<option data-lgid="P_MA_RENTAL" value="Rental">Rental</option>
<option data-lgid="P_MA_PRO" value="RPO">RPO</option>
<option data-lgid="P_MA_RERENT" value="Rerent">Rerent</option>
<option data-lgid="P_MA_LEASED" value="Leased">Leased</option>
<option data-lgid="P_MA_OWNEDPURCHASE" value="Owned - Purchase">Owned - Purchase</option>
<option data-lgid="P_MA_OWNEDLEASE" value="Owned - Lease">Owned - Lease</option>
</select>
</td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_COSTCENTER_COLON">Cost Center:</td>
<td>
<input type="text" id="dialog_costcenter" maxlength="50" tabindex="32" autocomplete="off" /></td>
</tr>
<tr class="trmachineicon">
<td class="label" data-lgid="P_MA_ICONFILENAME_COLON">Icon File Name:</td>
<td>
<input type="text" id="dialog_iconfilename" maxlength="12" tabindex="33" readonly="readonly" style="width: 158px; float: left;" />
<a tabindex="33" onclick="UpLoadMachineIcon(2)"><span class="dialogspanbtn iconupload" style="padding: 2px;" title="Upload Asset Icon" data-title-lgid="P_MA_UPLOADASSETICON" /></a>
<a tabindex="33" onclick="RemoveMachineIcon2()"><span class="dialogspanbtn dialogcancel" style="padding: 4px 2px 2px 2px;" title="Delete Asset Icon" data-title-lgid="P_MA_DELETEASSETICON" /></a>
</td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ADDEDON_COLON">Added On:</td>
<td>
<input type="text" id="dialog_addedon" maxlength="50" tabindex="34" disabled="disabled" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ADDEDBY_COLON">Added By:</td>
<td>
<input type="text" id="dialog_addedby" maxlength="50" tabindex="34" disabled="disabled" /></td>
</tr>
</table>
</div>
<div id="rightcontent" style="float: left; min-width: 600px; margin-top: -3px; position: relative;">
<div id="div_container">
<ul id="ul_container" class="tab_header" style="padding-top: 5px;">
<li id="li_jobsiteforeman" data-href="tab_jobsiteforeman" onclick="reshowgrid();" class="selected" data-lgid="P_MA_JOBSITECONTACTASSIGNMENT">Jobsite/Contact Assignment</li>
<li id="li_pm" data-href="tab_pm" onclick="reshowpmgrid();" style="display: none;" data-lgid="P_MA_PM">PM</li>
<li id="li_attachmentinfo" data-href="tab_attachmentinfo" onclick="reshowpmgrid();" data-lgid="P_MA_ATTACHMENTINFO">Attachment Info</li>
<li data-href="tab_machinegroup" onclick="reshowgroupgrid();" data-lgid="P_MA_ASSETGROUPS">Asset Groups</li>
<li id="li_rentalconnect" data-href="tab_rentalconnect" data-lgid="P_MA_RENTALCONNECT">Rental Connect</li>
<li id="li_attachment" data-href="tab_attachment" onclick="reshowaddidocgrid('attachment');" data-lgid="P_MA_ADDITIONALDOCUMENTATION">Additional Documentation</li>
<li id="li_audit" data-href="tab_audit" onclick="reshowaddidocgrid('audit');" data-lgid="P_MA_TELEMATICADJUSTMENTS">Telematic Adjustments</li>
<li id="li_devicepairinginfo" data-href="tab_devicepairinginfo" data-lgid="P_MA_PAIRINGINFO">Pairing Info</li>
</ul>
<div id="tab_jobsiteforeman" data-page="tab_jobsiteforeman">
<table>
<tr>
<td style="width: 280px; vertical-align: top; padding: 0;">
<div id="jobsitelist" style="height: 540px;"></div>
</td>
<td style="width: 360px; vertical-align: top; padding: 0;">
<div id="contactlist" style="height: 540px; margin-left: 15px;"></div>
</td>
</tr>
</table>
</div>
<div id="tab_pm" data-page="tab_pm" style="display: none;">
<div id="pmschedulelist" style="height: 540px;"></div>
</div>
<div id="tab_attachmentinfo" data-page="tab_attachmentinfo" style="overflow: auto; display: none;">
<table>
<tr>
<td colspan="3" style="font-size: 20px; font-weight: bold; text-align: left;" data-lgid="P_MA_ATTACHMENTINFO">Attachment Info </td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ASSETTYPETOATTACHTO_COLON">Asset Type to Attach To:</td>
<td style="width: 210px;">
<input type="text" id="dialog_assettypetoattachto" maxlength="200" tabindex="60" autocomplete="off" /></td>
<td></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_STYLE_COLON">Style:</td>
<td>
<input type="text" id="dialog_attachstyle" maxlength="200" tabindex="60" autocomplete="off" /></td>
<td></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_CAPACITYCYD_COLON">Capacity (CYD):</td>
<td>
<input type="text" id="dialog_attachcapacitycyd" maxlength="20" tabindex="60" autocomplete="off" /></td>
<td></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_CAPACITYWEIGHT_COLON">Capacity (Weight):</td>
<td>
<input type="text" id="dialog_attachcapacityweight" maxlength="20" tabindex="60" autocomplete="off" /></td>
<td></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_DIMENSION1INCM_COLON">Dimension #1 (in/cm):</td>
<td>
<input type="text" id="dialog_attachdimension1" maxlength="20" tabindex="60" autocomplete="off" /></td>
<td></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_WIDTH_COLON">Width:</td>
<td>
<input type="text" id="dialog_attachdimension2" maxlength="20" tabindex="60" autocomplete="off" /></td>
<td></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_OLDNUMBER_COLON">Old Number:</td>
<td>
<input type="text" id="dialog_attacholdnumber" maxlength="20" tabindex="60" autocomplete="off" /></td>
<td></td>
</tr>
<tr>
<td colspan="3" style="font-size: 20px; font-weight: bold; text-align: left;" data-lgid="P_MA_FITINFO">Fit Info</td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ATTACHTOMAKE_COLON">Attach to Make:</td>
<td>
<input type="text" id="dialog_attachtomake" maxlength="200" tabindex="60" autocomplete="off" /></td>
<td></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ATTACHTOMODEL_COLON">Attach to Model:</td>
<td>
<input type="text" id="dialog_attachtomodel" maxlength="200" tabindex="60" autocomplete="off" /></td>
<td></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ATTACHTOANASSET_COLON">Attached to an Asset:</td>
<td>
<select id="dialog_attachedtoanasset" tabindex="60" style="width: 204px;">
<option value="0" data-lgid="P_MA_NO">No</option>
<option value="1" data-lgid="P_MA_YES">Yes</option>
</select>
</td>
<td></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ATTACHEDTOT_COLON">Attached to:</td>
<td>
<input type="text" id="dialog_attachtoasset" maxlength="200" tabindex="60" autocomplete="off" disabled="disabled" /></td>
<td style="text-align: left;">
<input type="button" id="btnSelectAttachToAsset" value="Select Asset" data-lgid="P_MA_SELECTASSET" tabindex="60" style="width: 80px; height: 22px;" />
<input type="button" id="btnUnattach" value="Unattach" data-lgid="P_MA_UNATTACH" tabindex="60" style="width: 80px; height: 22px; margin-left: 5px;" />
</td>
</tr>
</table>
</div>
<div id="tab_machinegroup" data-page="tab_machinegroup" style="display: none;">
<div id="assetgrouplist" style="height: 540px;"></div>
</div>
<div id="tab_rentalconnect" data-page="tab_rentalconnect" style="overflow: auto; display: none;">
<table>
<tr>
<td class="label" data-lgid="P_MA_OUTSIDEINTERNAL_COLON">Outside/Internal:</td>
<td>
<select id="dialog_outside" tabindex="59">
<option value=""></option>
<option value="Inside" data-lgid="P_MA_INSIDE">Inside</option>
<option value="Outside" data-lgid="P_MA_OUTSIDE">Outside</option>
</select></td>
<td class="label" data-lgid="P_MA_RENTALDATEON_COLON">Rental Date On:</td>
<td>
<input type="text" id="dialog_rentaldate" maxlength="50" tabindex="60" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_RENTALVENDOR_COLON">Rental Vendor:</td>
<td>
<input type="text" id="dialog_vendor" maxlength="200" tabindex="62" autocomplete="off" /></td>
<td class="label" data-lgid="P_MA_PROJECTRETURNDATE_COLON">Proj.Return Date:</td>
<td>
<input type="text" id="dialog_projectreturndate" maxlength="50" tabindex="63" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_RENTALRATE_COLON">Rental Rate:</td>
<td>
<input type="text" id="dialog_rentalrate" maxlength="12" tabindex="64" autocomplete="off" /></td>
<td class="label" data-lgid="P_MA_RETURNDATE_COLON">Return Date:</td>
<td>
<input type="text" id="dialog_returndate" maxlength="50" tabindex="65" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_RETURNTERM_COLON">Rental Term:</td>
<td>
<input type="text" id="dialog_term" maxlength="8" tabindex="66" autocomplete="off" /></td>
<td class="label" data-lgid="P_MA_PONUMBER_COLON">P.O.#:</td>
<td>
<input type="text" id="dialog_ponumber" maxlength="100" tabindex="67" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_RENTALTERMUNIT_COLON">Rental Term Unit:</td>
<td>
<select id="dialog_termunit" tabindex="68">
<option data-lgid="P_MA_HOURLY" value="Hourly">Hourly</option>
<option data-lgid="P_MA_DAILY" value="Daily">Daily</option>
<option data-lgid="P_MA_WEEKLY" value="Weekly">Weekly</option>
<option data-lgid="P_MA_MONTHLY" value="Monthly">Monthly</option>
<option data-lgid="P_MA_ANNUALLY" value="Annually">Annually</option>
</select>
</td>
<td class="label" data-lgid="P_MA_RTBILLINGDATE_COLON">Rental Term Billing Date:</td>
<td>
<input type="text" id="dialog_rentaltermbillingdate" maxlength="50" tabindex="68" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_DAYSBILLINGCYCLE_COLON">Number of Days in Billing Cycle:</td>
<td>
<input type="text" id="dialog_billingcycledays" maxlength="8" tabindex="68" autocomplete="off" /></td>
<td class="label" style="vertical-align: middle;" data-lgid="P_MR_INSUREDVALUE_COLON">Insured Value:</td>
<td>
<input type="text" id="dialog_insuredvalue" maxlength="12" tabindex="68" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_COMMENTS_COLON">Comments:</td>
<td colspan="3">
<textarea id="dialog_comments" maxlength="1000" tabindex="68" style="width: 454px; margin-top: 2px;"></textarea>
</td>
</tr>
<tr>
<td class="label"></td>
<td colspan="3">
<input type="button" id="btnManageRentalHistory" value="Manage Rental History" data-lgid="P_MA_MANAGERENTALHISTORY" tabindex="70" class="dialogbtn" style="height: 24px; border: 0px; display: none;" onclick="ManageRentalHistory();" />
<input type="button" id="btnSaveRental" value="Save" data-lgid="P_MA_SAVE" class="dialogbtn" tabindex="72" style="height: 24px; border: 0px; width: 80px;" onclick="SaveRental();" />
<input type="button" id="btnAddRental" value="Add Rental" data-lgid="P_MA_ADDRENTAL" class="dialogbtn" tabindex="71" style="height: 24px; border: 0px;" onclick="AddRental();" />
<input type="button" id="btnCancelRental" value="Cancel" data-lgid="P_MA_CANCEL" class="dialogbtn" tabindex="73" style="height: 24px; border: 0px; width: 80px;" onclick="CancelRental();" />
</td>
</tr>
</table>
<div id="rentalListDiv" style="max-height: 500px; margin-top: 10px; display: none;">
<div>
<table id="tbRentals" class="main_table" style="width: 680px; table-layout: fixed;">
<thead>
<tr>
<th style="width: 8%;" sort="RentalDate" data-lgid="P_MA_RENTALDATEON">Rental Date On</th>
<th style="width: 10%;" sort="ProjectReturnDate" data-lgid="P_MA_PROJECTEDRETURN">Projected Return</th>
<th style="width: 10%;" sort="ReturnDate" data-lgid="P_MA_RETURNDATE">Return Date</th>
<th style="width: 10%;" sort="Vendor" data-lgid="P_MA_RENTALVENDOR">Rental Vendor</th>
<th style="width: 8%;" sort="RentalRate" data-lgid="P_MA_RENTALRATE">Rental Rate</th>
<th style="width: 8%;" sort="Term" data-lgid="P_MA_TERM">Term</th>
<th style="width: 8%;" sort="TermUnit" data-lgid="P_MA_TERMUNIT">Term Unit</th>
</tr>
</thead>
</table>
</div>
<div id="rentalsDiv" class="content_div " style="max-height: 224px;">
<table class="main_table" style="width: 680px; table-layout: fixed;">
<tbody id="tbody_rentals">
</tbody>
</table>
</div>
</div>
</div>
<div id="tab_attachment" data-page="tab_attachment" style="display: none;">
<span class="sbutton iconadd" id="btnAdd" onclick="openAddDocument();" data-lgid="P_MA_ADD" data-title-lgid="P_MA_ADDITIONALDOCUMENTATION"></span>
<div id="documentlist" style="max-height: 500px; margin-top: 5px;">
</div>
</div>
<div id="tab_audit" data-page="tab_audit" style="display: none;">
<table style="line-height: 25px; margin-bottom: 10px;">
<tr>
<td id="tdAuditOdometers" class="categoryname minus" data-lgid="P_MA_ODOMETER">Odometer</td>
</tr>
<tr>
<td>
<input type="button" id="btnodometeradjust" value="Adjust" data-lgid="P_MA_ADJUST" class="dialogbtn audit_button" style="width: 80px; height: 20px; border: 0px; display: none;" onclick="openAdjustOdometer();" />
<%--<input type="button" id="btnodometerprimary" value="Set As Primary" class="dialogbtn audit_button" style="width: 80px; height: 20px; border: 0px; display: none;" onclick="openSetPrimary(0);" />--%>
<input type="button" id="btnodometeradd" value="Add" data-lgid="P_MA_ADD" class="dialogbtn audit_button" style="width: 80px; height: 20px; border: 0px; display: none;" onclick="openAddOdometer();" />
<input type="button" id="btnodometerhistory" value="View Adjustment History" data-lgid="P_MA_VIEWADJUSTHIS" class="dialogbtn audit_button" style="width: 150px; height: 20px; border: 0px; display: none;" onclick="openOdometerAdjustHistory();" />
</td>
</tr>
<tr>
<td>
<div id="odometerlist" style="width: 680px;"></div>
</td>
</tr>
<tr>
<td id="tdAuditEngineHours" class="categoryname minus" colspan="2" data-lgid="P_MA_ENGINEHOURS">Engine Hours</td>
</tr>
<tr>
<td>
<input type="button" id="btnenginehoursadjust" value="Adjust" data-lgid="P_MA_ADJUST" class="dialogbtn audit_button" style="width: 80px; height: 20px; border: 0px; display: none;" onclick="openAdjustEngineHours();" />
<%--<input type="button" id="btnenginehoursprimary" value="Set As Primary" class="dialogbtn audit_button" style="width: 80px; height: 20px; border: 0px; display: none;" onclick="openSetPrimary(1);" />--%>
<input type="button" id="btnenginehoursadd" value="Add" data-lgid="P_MA_ADD" class="dialogbtn audit_button" style="width: 80px; height: 20px; border: 0px; display: none;" onclick="openAddEnginHours();" />
<input type="button" id="btnenginehourshistory" value="View Adjustment History" data-lgid="P_MA_VIEWADJUSTHIS" class="dialogbtn audit_button" style="width: 150px; height: 20px; border: 0px; display: none;" onclick="openEngineHoursAdjustHistory();" />
</td>
</tr>
<tr>
<td>
<div id="enginehourslist" style="width: 680px;"></div>
</td>
</tr>
<tr>
<td id="tdAuditLocation" class="categoryname minus" colspan="2" data-lgid="P_MA_LOCATION">Location</td>
</tr>
<tr>
<td>
<input type="button" id="btnlocationadjust" value="Adjust" data-lgid="P_MA_ADJUST" class="dialogbtn audit_button" style="width: 80px; height: 20px; border: 0px; display: none;" onclick="openAdjustEngineHours();" />
</td>
</tr>
<tr>
<td>
<div id="locationlist" style="width: 680px;"></div>
</td>
</tr>
<tr>
<td id="tdAuditIdlehour" class="categoryname minus" colspan="2" data-lgid="P_MA_IDLEHOURS">Idle Hours</td>
</tr>
<tr>
<td>
<input type="button" id="btnidlehouradjust" value="Adjust" data-lgid="P_MA_ADJUST" class="dialogbtn audit_button" style="width: 80px; height: 20px; border: 0px; display: none;" onclick="openAdjustEngineHours();" />
</td>
</tr>
<tr>
<td>
<div id="idlehourlist" style="width: 680px;"></div>
</td>
</tr>
<tr>
<td id="tdAuditFuelused" class="categoryname minus" colspan="2" data-lgid="P_MA_FUELUSED">Fuel Used</td>
</tr>
<tr>
<td>
<input type="button" id="btnfuelusedadjust" value="Adjust" data-lgid="P_MA_ADJUST" class="dialogbtn audit_button" style="width: 80px; height: 20px; border: 0px; display: none;" onclick="openAdjustEngineHours();" />
</td>
</tr>
<tr>
<td>
<div id="fuelusedlist" style="width: 680px;"></div>
</td>
</tr>
<tr>
<td id="tdAuditFuelRemaining" class="categoryname minus" colspan="2" data-lgid="P_MA_FUELREMAINING">Fuel Remaining</td>
</tr>
<tr>
<td>
<input type="button" id="btnfuelremainingadjust" value="Adjust" data-lgid="P_MA_ADJUST" class="dialogbtn audit_button" style="width: 80px; height: 20px; border: 0px; display: none;" onclick="openAdjustEngineHours();" />
</td>
</tr>
<tr>
<td>
<div id="fuelremaininglist" style="width: 680px;"></div>
</td>
</tr>
</table>
</div>
<div id="tab_devicepairinginfo" data-page="tab_devicepairinginfo">
<div class="function_title">
<%--<span class="sbutton iconadd" onclick="UpLoadWorkOrderAttachment();" data-lgid="P_WO_ADDFILE">Add File</span>--%>
<%-- <span class="sbutton iconprint" onclick="openPAndDGDialog(0);" data-lgid="P_WO_PRINT">Print</span>
<span class="sbutton icondownload" onclick="openPAndDGDialog(1);" data-lgid="P_WO_DOWNLOAD">Download</span>--%>
</div>
<div id="div_attlarge">
</div>
</div>
<div id="div_attributesmask" class="maskbg" style="background: #e7e7e6;"></div>
</div>
</div>
</div>
<div id="dialogmask" class="maskbg" style="display: none;">
<div class="loading_icon icon c-spin"></div>
</div>
</div>
<div id="mask_bg" style="display: none;">
<div class="loading c-spin"></div>
</div>
<div class="dialog" id="dialog_adjustodometer" style="display: none; width: 960px;">
<div class="dialog-title"><span class="title" data-lgid="P_MA_ADJUSTODOMETER">Adjust Odometer</span><em class="dialog-close"></em></div>
<div class="dialog-content adjust-content">
<table style="line-height: 25px; width: 100%;">
<tr>
<td colspan="2" style="padding-left: 42px;"><span data-lgid="P_MA_ASSETCURRENTPRIMARYODOMETERDATASOURCE">Note that the current primary odometer data source for this asset is </span><span id="span_adjustodometer" data-lgid="P_MA_EMPTY">empty</span></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ODOMETER_COLON">Odometer:</td>
<td>
<input type="text" id="dialogadjust_odometer" maxlength="8" tabindex="101" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ODOMETERUOM_COLON">Odometer UOM:</td>
<td>
<select id="dialogadjust_sel_odometeruom" tabindex="102" style="width: 204px; height: 22px;">
<option value="Mile" data-lgid="P_MA_MILE">Mile</option>
<option value="Kilometre" data-lgid="P_MA_KILOMETER">Kilometer</option>
</select></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_TIMEZON_COLON">Time Zone:</td>
<td>
<select id="dialogadjust_odometertimezone" tabindex="103" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ODOMETERDATE_COLON">Odometer Date:</td>
<td>
<input type="text" id="dialogadjust_odometerdate" maxlength="10" tabindex="104" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ODOMETERTIME_COLON">Odometer Time:</td>
<td>
<select id="dialogadjust_timehour" style="width: 48px;" tabindex="105"></select><span style="font-weight: bold;">&nbsp;&nbsp;:&nbsp;&nbsp;</span>
<select id="dialogadjust_timeminute" style="width: 48px;" tabindex="106"></select></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_NOTES_COLON">Notes:</td>
<td>
<textarea id="dialogadjust_notes" maxlength="500" tabindex="107" style="width: 420px; height: 100px; margin-top: 3px;"></textarea></td>
</tr>
<tr>
<td data-lgid="P_MA_THEMOSTRECENTREADINGBASEDONADJUSTMENTABOVE" colspan="2">The most recent reading, based on adjustment above:</td>
</tr>
<tr>
<td class="label" colspan="2">
<div id="odometermostrecent" style="height: 90px; width: 920px;"></div>
</td>
</tr>
<tr>
<td data-lgid="P_MA_THE24HOURSFOLLOWINGTHEUSERPROVIDEDDATE" colspan="2">The 24 hours following the user provided date:</td>
</tr>
<tr>
<td class="label" colspan="2">
<div id="odometerhislist" style="height: 300px; width: 920px;"></div>
</td>
</tr>
</table>
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_MA_CANCEL" class="dialog-close" tabindex="110" />
<input type="button" onclick="OnAdjustOdometer();" value="Submit" data-lgid="P_MA_SUBMIT" tabindex="109" />
<input type="button" onclick="OnPreviewOdometer();" value="Preview" data-lgid="P_MA_PREVIEW" tabindex="108" />
<div class="clear"></div>
</div>
<div id="adjustodomask" class="maskbg" style="display: none;">
<div class="loading c-spin"></div>
</div>
</div>
<div class="dialog" id="dialog_adjustenginehours" style="display: none; width: 940px;">
<div class="dialog-title"><span class="title" data-lgid="P_MA_ADJUSTENGINEHOURS">Adjust EngineHours</span><em class="dialog-close"></em></div>
<div class="dialog-content adjust-content">
<table style="line-height: 25px; width: 100%;">
<tr>
<td colspan="2" style="padding-left: 28px;"><span data-lgid="P_MA_ASSETCURRENTPRIMARYENGINEHOURDATASOURCE">Note that the current primary engine hour data source for this asset is</span><span id="span_adjustenginehours" data-lgid="P_MA_EMPTY">empty</span></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ENGINEHOURS_COLON">Engine Hours:</td>
<td>
<input type="text" id="dialogenginehours_enginehours" maxlength="8" tabindex="121" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_TIMEZON_COLON">Time Zone:</td>
<td>
<select id="dialogadjust_enginehourstimezone" tabindex="122" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ENGINEHOURSDATE_COLON">Engine Hours Date:</td>
<td>
<input type="text" id="dialogenginehours_date" maxlength="10" tabindex="123" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ENGINEHOURSTIME_COLON">Engine Hours Time:</td>
<td>
<select id="dialogenginehours_timehour" style="width: 48px;" tabindex="124"></select><span style="font-weight: bold;">&nbsp;&nbsp;:&nbsp;&nbsp;</span>
<select id="dialogenginehours_timeminute" style="width: 48px;" tabindex="125"></select></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_NOTES_COLON">Notes:</td>
<td>
<textarea id="dialogenginehours_Notes" maxlength="500" tabindex="126" style="width: 420px; height: 100px; margin-top: 3px;"></textarea></td>
</tr>
<tr>
<td data-lgid="P_MA_THEMOSTRECENTREADINGBASEDONADJUSTMENTABOVE" colspan="2">The most recent reading, based on adjustment above:</td>
</tr>
<tr>
<td class="label" colspan="2">
<div id="enginehoursmostrecent" style="height: 90px; width: 920px;"></div>
</td>
</tr>
<tr>
<td data-lgid="P_MA_THE24HOURSFOLLOWINGTHEUSERPROVIDEDDATE" colspan="2">The 24 hours following the user provided date:</td>
</tr>
<tr>
<td class="label" colspan="2">
<div id="enginehourshislist" style="height: 300px; width: 920px;"></div>
</td>
</tr>
</table>
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_MA_CANCEL" class="dialog-close" tabindex="129" />
<input type="button" onclick="OnAdjustEngineHours();" value="Submit" data-lgid="P_MA_SUBMIT" tabindex="128" />
<input type="button" onclick="OnPreviewEngineHours();" value="Preview" data-lgid="P_MA_PREVIEW" tabindex="127" />
<div class="clear"></div>
</div>
<div id="adjustenginehoursmask" class="maskbg" style="display: none;">
<div class="loading c-spin"></div>
</div>
</div>
<div class="dialog" id="dialog_setprimary" style="display: none; width: 400px;">
<div class="dialog-title"><span class="title" data-lgid="P_MA_SETASPRIMARY">Set As Primary</span><em class="dialog-close"></em></div>
<div class="dialog-content">
<table style="line-height: 25px;">
<tr>
<td style="width: 50px; vertical-align: top;" data-lgid="P_MA_NOTES_COLON">Notes:</td>
<td>
<textarea id="dialogprimary_notes" maxlength="500" tabindex="141" style="width: 300px; height: 100px; margin-top: 3px;"></textarea></td>
</tr>
</table>
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_MA_CANCEL" class="dialog-close" tabindex="143" />
<input type="button" onclick="OnSetPrimary();" value="OK" data-lgid="P_MA_OK" tabindex="142" />
<div class="clear"></div>
</div>
</div>
<div class="dialog" id="dialog_addodometer" style="display: none; width: 600px;">
<div class="dialog-title"><span class="title" data-lgid="P_MA_ADDODOMETER">Add Odometer</span><em class="dialog-close"></em></div>
<div class="dialog-content adjust-content">
<table style="line-height: 25px; width: 100%;">
<tr>
<td colspan="2" style="padding-left: 42px;"><span data-lgid="P_MA_ASSETCURRENTPRIMARYODOMETERDATASOURCE">Note that the current primary odometer data source for this asset is </span><span id="span_addodometer" data-lgid="P_MA_EMPTY">empty</span></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ODOMETER_COLON">Odometer:</td>
<td>
<input type="text" id="dialogadd_odometer" maxlength="8" tabindex="151" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ODOMETERUOM_COLON">Odometer UOM:</td>
<td>
<select id="dialogadd_sel_odometeruom" tabindex="152" style="width: 204px; height: 22px;">
<option value="Mile" data-lgid="P_MA_MILE">Mile</option>
<option value="Kilometre" data-lgid="P_MA_KILOMETER">Kilometer</option>
</select></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_TIMEZON_COLON">Time Zone:</td>
<td>
<select id="dialogadd_odometertimezone" tabindex="153" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ODOMETERDATE_COLON">Odometer Date:</td>
<td>
<input type="text" id="dialogadd_odometerdate" maxlength="10" tabindex="154" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ODOMETERTIME_COLON">Odometer Time:</td>
<td>
<select id="dialogadd_timehour" style="width: 48px;" tabindex="155"></select><span style="font-weight: bold;">&nbsp;&nbsp;:&nbsp;&nbsp;</span>
<select id="dialogadd_timeminute" style="width: 48px;" tabindex="156"></select></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_NOTES_COLON">Notes:</td>
<td>
<textarea id="dialogadd_notes" maxlength="500" tabindex="157" style="width: 420px; height: 100px; margin-top: 3px;"></textarea></td>
</tr>
</table>
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_MA_CANCEL" class="dialog-close" tabindex="159" />
<input type="button" onclick="OnAddOdometer();" value="Submit" data-lgid="P_MA_SUBMIT" tabindex="158" />
<div class="clear"></div>
</div>
<div id="addodomask" class="maskbg" style="display: none;">
<div class="loading c-spin"></div>
</div>
</div>
<div class="dialog" id="dialog_addenginehours" style="display: none; width: 600px;">
<div class="dialog-title"><span class="title" data-lgid="P_MA_ADDOENGINEHOURS">Add Engine Hours</span><em class="dialog-close"></em></div>
<div class="dialog-content adjust-content">
<table style="line-height: 28px; width: 100%;">
<tr>
<td colspan="2" style="padding-left: 25px;"><span data-lgid="P_MA_ASSETCURRENTPRIMARYENGINEHOURDATASOURCE">Note that the current primary engine hour data source for this asset is </span><span id="span_addenginehours" data-lgid="P_MA_EMPTY">empty</span></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ADDOENGINEHOURS">Engine Hours:</td>
<td>
<input type="text" id="dialogaddgenginehours_enginehours" maxlength="8" tabindex="171" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_TIMEZON_COLON">Time Zone:</td>
<td>
<select id="dialogadd_enginehourstimezone" tabindex="172" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ENGINEHOURSDATE_COLON">Engine Hours Date:</td>
<td>
<input type="text" id="dialogaddenginehours_date" maxlength="10" tabindex="173" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_ENGINEHOURSTIME_COLON">Engine Hours Time:</td>
<td>
<select id="dialogaddenginehours_timehour" style="width: 48px;" tabindex="174"></select><span style="font-weight: bold;">&nbsp;&nbsp;:&nbsp;&nbsp;</span>
<select id="dialogaddenginehours_timeminute" style="width: 48px;" tabindex="175"></select></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_NOTES_COLON">Notes:</td>
<td>
<textarea id="dialogaddenginehours_Notes" maxlength="500" tabindex="176" style="width: 420px; height: 100px; margin-top: 3px;"></textarea></td>
</tr>
</table>
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_MA_CANCEL" class="dialog-close" tabindex="178" />
<input type="button" onclick="OnAddEngineHours();" value="Submit" data-lgid="P_MA_SUBMIT" tabindex="177" />
<div class="clear"></div>
</div>
<div id="addenginehoursmask" class="maskbg" style="display: none;">
<div class="loading c-spin"></div>
</div>
</div>
<div class="dialog" id="dialog_pm" style="display: none; min-width: 540px; max-width: 720px;">
<div class="dialog-title"><span class="title" data-lgid="P_MA_ADDASSETTOSCHEDULE">Add Asset To Schedule</span><em class="dialog-close"></em></div>
<div class="dialog-content" style="line-height: 24px; padding-left: 20px; padding-right: 20px;">
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_MA_CANCEL" class="dialog-close" tabindex="201" />
<input type="button" id="btnSetPMSchedule" data-lgid="P_MA_OK" value="OK" tabindex="200" />
<div class="clear"></div>
</div>
</div>
<div class="dialog" id="dialog_addmake" style="display: none; width: 360px;">
<div class="dialog-title"><span class="title" data-lgid="P_MA_ADDMAKE">Add Make</span><em class="dialog-close"></em></div>
<div class="dialog-content assetcontent">
<table>
<tr>
<td class="label" style="width: 100px;" data-lgid="P_MA_MAKE_COLON">Make:</td>
<td>
<input type="text" id="dialog_makename" maxlength="100" tabindex="300" style="width: 220px" /></td>
</tr>
</table>
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_MA_CANCEL" class="dialog-close" tabindex="302" />
<input type="button" onclick="OnSaveMake();" value="OK" data-lgid="P_MA_OK" tabindex="301" />
<div class="clear"></div>
</div>
<div id="addmakemask" class="maskbg" style="display: none;">
<div class="loading c-spin"></div>
</div>
</div>
<div class="dialog" id="dialog_addmodel" style="display: none; width: 360px;">
<div class="dialog-title"><span class="title" data-lgid="P_MA_ADDMODEL">Add Model</span><em class="dialog-close"></em></div>
<div class="dialog-content assetcontent">
<table>
<tr>
<td class="label" style="width: 100px;" data-lgid="P_MA_MAKE_COLON">Make:</td>
<td>
<select id="dialog_makeforaddmodel" tabindex="401" style="width: 224px; height: 22px;"></select></td>
</tr>
<tr>
<td class="label" style="width: 100px;" data-lgid="P_MA_MODEL_COLON">Model:</td>
<td>
<input type="text" id="dialog_modelname" maxlength="100" tabindex="402" style="width: 220px" /></td>
</tr>
<tr>
<td class="label" style="width: 100px;" data-lgid="P_MA_TYPE_COLON">Type:</td>
<td>
<div id="dialog_typeforaddmodel" tabindex="403" style="width: 224px; height: 22px;"></div>
<%--<select id="dialog_typeforaddmodel" tabindex="403" style="width: 224px; height: 22px;"></select>--%>
</td>
</tr>
</table>
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_MA_CANCEL" class="dialog-close" tabindex="405" />
<input type="button" onclick="OnSaveModel();" value="OK" data-lgid="P_MA_OK" tabindex="404" />
<div class="clear"></div>
</div>
<div id="addmodelmask" class="maskbg" style="display: none;">
<div class="loading c-spin"></div>
</div>
</div>
<div class="dialog" id="dialog_assetduplicates" style="display: none; min-width: 540px;">
<div class="dialog-title">
<span class="title" style="float: left;" data-lgid="P_MA_POSSIBLEDUPLICATES_COLON">Possible Duplicates:&nbsp;<span id="spnumberinfo"></span></span>
<div class="function_title" id="divDupFun" style="float: left; margin-left: 230px; display: none; line-height: 28px;">
<span class="sbutton iconprevious" id="btnDupNext" style="padding-top: 5px; padding-bottom: 5px;" onclick="OnDupPrevious();" data-lgid="P_MA_PREVIOUS">Previous</span>
<span class="sbutton iconnext" id="btnDupPrevious" style="padding-top: 5px; padding-bottom: 5px;" onclick="OnDupNext();" data-lgid="P_MA_NEXT">Next</span>
</div>
<em class="dialog-close"></em>
</div>
<div class="clear"></div>
<div class="dialog-content" style="line-height: 24px; padding-left: 20px; padding-right: 20px;">
<table>
<tr>
<td>
<div style="float: left; position: relative;">
<table>
<tr>
<td colspan="2">
<div style="padding-top: 5px; padding-bottom: 5px;">
<input type="checkbox" id="dialog_newhide" disabled="disabled" class="chk" /><span data-lgid="P_MA_HIDEHIDDEN">Hide/Hidden</span>
<input type="checkbox" id="dialog_newonroad" disabled="disabled" class="chk" /><span data-lgid="P_MA_ONROAD">On-Road</span>
<input type="checkbox" id="dialog_newtelematics" disabled="disabled" class="chk" /><span data-lgid="P_MA_TELEMATICSENABLED">Telematics Enabled</span>
<input type="checkbox" id="dialog_newattachment" disabled="disabled" class="chk" /><span data-lgid="P_MA_ATTACHMENT">Attachment</span>
<input type="checkbox" id="dialog_newpreloaded" disabled="disabled" class="chk" /><span data-lgid="P_MA_PRELOADED">Preloaded</span>
</div>
</td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_VINSN_COLON">VIN/SN:</td>
<td style="width: 200px;"><span id="dialog_newsn"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ASSETNAME_COLON">Asset Name:</td>
<td><span id="dialog_newname"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ASSETNAME2_COLON">Asset Name(Custom):</td>
<td><span id="dialog_newname2"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_DEVICESN_COLON">Paired Device SN:</td>
<td>
<div id="dialog_newdevicesn" style="overflow: auto; height: 32px;"></div>
</td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_YEAR_COLON">Year:</td>
<td><span id="dialog_newyear"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_MAKE_COLON">Make:</td>
<td><span id="dialog_newmake"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_MODEL_COLON">Model:</td>
<td><span id="dialog_newmodel"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_EQCLASS_COLON">Eq.Class:</td>
<td><span id="dialog_neweqclass"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_TYPE_COLON">Asset Type:</td>
<td><span id="dialog_newtype"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_DESCRIPTION_COLON">Description:</td>
<td>
<textarea id="dialog_newdescription" disabled="disabled" style="height: 60px; width: 200px;"></textarea>
</td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ENGINEHOURS_COLON">Engine Hours:</td>
<td><span id="dialog_newenginehours"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ODOMETER_COLON">Odometer:</td>
<td><span id="dialog_newodometer"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ADDEDON_COLON">Added On:</td>
<td><span id="dialog_newaddedon"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ADDEDBY_COLON">Added By:</td>
<td><span id="dialog_newaddedby"></span></td>
</tr>
<tr>
<td class="label label1"></td>
<td>&nbsp;</td>
</tr>
</table>
</div>
</td>
<td style="padding-left: 10px; padding-right: 10px;">
<div style="height: 518px; width: 1px; border-left: solid 1px #9A9A9A;"></div>
</td>
<td>
<div style="float: left; position: relative;">
<table>
<tr>
<td colspan="2">
<div style="padding-top: 5px; padding-bottom: 5px;">
<input type="checkbox" id="dialog_oldhide" disabled="disabled" class="chk" /><span data-lgid="P_MA_HIDEHIDDEN">Hide/Hidden</span>
<input type="checkbox" id="dialog_oldonroad" disabled="disabled" class="chk" /><span data-lgid="P_MA_ONROAD">On-Road</span>
<input type="checkbox" id="dialog_oldtelematics" disabled="disabled" class="chk" /><span data-lgid="P_MA_TELEMATICSENABLED">Telematics Enabled</span>
<input type="checkbox" id="dialog_oldattachment" disabled="disabled" class="chk" /><span data-lgid="P_MA_ATTACHMENT">Attachment</span>
<input type="checkbox" id="dialog_oldpreloaded" disabled="disabled" class="chk" /><span data-lgid="P_MA_PRELOADED">Preloaded</span>
</div>
</td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_VINSN_COLON">VIN/SN:</td>
<td style="width: 200px;"><span id="dialog_oldsn"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ASSETNAME_COLON">Asset Name:</td>
<td><span id="dialog_oldname"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ASSETNAME2_COLON">Asset Name(Custom):</td>
<td><span id="dialog_oldname2"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_DEVICESN_COLON">Paired Device SN:</td>
<td>
<div id="dialog_olddevicesn" style="overflow: auto; height: 32px;"></div>
</td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_YEAR_COLON">Year:</td>
<td><span id="dialog_oldyear"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_MAKE_COLON">Make:</td>
<td><span id="dialog_oldmake"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_MODEL_COLON">Model:</td>
<td><span id="dialog_oldmodel"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_EQCLASS_COLON">Eq.Class:</td>
<td><span id="dialog_oldeqclass"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_TYPE_COLON">Asset Type:</td>
<td><span id="dialog_oldtype"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_DESCRIPTION_COLON">Description:</td>
<td>
<textarea id="dialog_olddescription" disabled="disabled" style="height: 60px; width: 200px;"></textarea>
</td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ENGINEHOURS_COLON">Engine Hours:</td>
<td><span id="dialog_oldenginehours"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ODOMETER_COLON">Odometer:</td>
<td><span id="dialog_oldodometer"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ADDEDON_COLON">Added On:</td>
<td><span id="dialog_oldaddedon"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ADDEDBY_COLON">Added By:</td>
<td><span id="dialog_oldaddedby"></span></td>
</tr>
<tr>
<td class="label label1"></td>
<td>
<input type="button" value="Use this Asset" data-lgid="P_MA_USETHISASSET" onclick="OnUseOldAsset();" /></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_MA_CANCEL" class="dialog-close" tabindex="501" />
<input type="button" value="Ignore and Create Asset" data-lgid="P_MA_IGNOREANDCREATEASSET" onclick="OnIgnoreDuplicate();" style="width: 150px;" tabindex="500" />
<div class="clear"></div>
</div>
<div id="assetdupmask" class="maskbg" style="display: none;">
<div class="loading c-spin"></div>
</div>
</div>
<div class="dialog" id="dialog_mergeasset" style="display: none; min-width: 540px;">
<div class="dialog-title">
<span class="title" style="float: left;" data-lgid="P_MA_MERGEASSET">Merge Asset</span>
<em class="dialog-close"></em>
</div>
<div class="clear"></div>
<div class="dialog-content" style="line-height: 24px; padding-left: 20px; padding-right: 20px;">
<table>
<tr>
<td>
<div style="float: left; position: relative;">
<table>
<tr>
<td colspan="2">
<div style="padding-top: 5px; padding-bottom: 5px;">
<input type="checkbox" id="dialog_merge_newhide" disabled="disabled" class="chk" /><span data-lgid="P_MA_HIDEHIDDEN">Hide/Hidden</span>
<input type="checkbox" id="dialog_merge_newonroad" disabled="disabled" class="chk" /><span data-lgid="P_MA_ONROAD">On-Road</span>
<input type="checkbox" id="dialog_merge_newtelematics" disabled="disabled" class="chk" /><span data-lgid="P_MA_TELEMATICSENABLED">Telematics Enabled</span>
<input type="checkbox" id="dialog_merge_newattachment" disabled="disabled" class="chk" /><span data-lgid="P_MA_ATTACHMENT">Attachment</span>
<input type="checkbox" id="dialog_merge_newpreloaded" disabled="disabled" class="chk" /><span data-lgid="P_MA_PRELOADED">Preloaded</span>
</div>
</td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_VINSN_COLON">VIN/SN:</td>
<td style="width: 200px;"><span id="dialog_merge_newsn"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ASSETNAME_COLON">Asset Name:</td>
<td><span id="dialog_merge_newname"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ASSETNAME2_COLON">Asset Name(Custom):</td>
<td><span id="dialog_merge_newname2"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_DEVICESN_COLON">Paired Device SN:</td>
<td>
<div id="dialog_merge_newdevicesn" style="overflow: auto; height: 32px;"></div>
</td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_YEAR_COLON">Year:</td>
<td><span id="dialog_merge_newyear"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_MAKE_COLON">Make:</td>
<td><span id="dialog_merge_newmake"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_MODEL_COLON">Model:</td>
<td><span id="dialog_merge_newmodel"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_EQCLASS_COLON">Eq.Class:</td>
<td><span id="dialog_merge_neweqclass"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_TYPE_COLON">Asset Type:</td>
<td><span id="dialog_merge_newtype"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_DESCRIPTION_COLON">Description:</td>
<td>
<textarea id="dialog_merge_newdescription" disabled="disabled" style="height: 60px; width: 200px;"></textarea>
</td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ENGINEHOURS_COLON">Engine Hours:</td>
<td><span id="dialog_merge_newenginehours"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ODOMETER_COLON">Odometer:</td>
<td><span id="dialog_merge_newodometer"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ADDEDON_COLON">Added On:</td>
<td><span id="dialog_merge_newaddedon"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ADDEDBY_COLON">Added By:</td>
<td><span id="dialog_merge_newaddedby"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_TELEMATICDATASOURCES_COLON">Telematic Datasources:</td>
<td>
<div id="dialog_merge_newdatasource" style="height: 80px; overflow: auto;"></div>
</td>
</tr>
<tr>
<td class="label label1"></td>
<td>
<input type="button" value="Use this Asset" data-lgid="P_MA_USETHISASSET" onclick="onMergeUseAsset(0);" /></td>
</tr>
</table>
</div>
</td>
<td style="padding-left: 10px; padding-right: 10px;">
<div style="height: 518px; width: 1px; border-left: solid 1px #9A9A9A;"></div>
</td>
<td>
<div style="float: left; position: relative;">
<table>
<tr>
<td colspan="2">
<div style="padding-top: 5px; padding-bottom: 5px;">
<input type="checkbox" id="dialog_merge_oldhide" disabled="disabled" class="chk" /><span data-lgid="P_MA_HIDEHIDDEN">Hide/Hidden</span>
<input type="checkbox" id="dialog_merge_oldonroad" disabled="disabled" class="chk" /><span data-lgid="P_MA_ONROAD">On-Road</span>
<input type="checkbox" id="dialog_merge_oldtelematics" disabled="disabled" class="chk" /><span data-lgid="P_MA_TELEMATICSENABLED">Telematics Enabled</span>
<input type="checkbox" id="dialog_merge_oldattachment" disabled="disabled" class="chk" /><span data-lgid="P_MA_ATTACHMENT">Attachment</span>
<input type="checkbox" id="dialog_merge_oldpreloaded" disabled="disabled" class="chk" /><span data-lgid="P_MA_PRELOADED">Preloaded</span>
</div>
</td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_VINSN_COLON">VIN/SN:</td>
<td style="width: 200px;"><span id="dialog_merge_oldsn"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ASSETNAME_COLON">Asset Name:</td>
<td><span id="dialog_merge_oldname"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ASSETNAME2_COLON">Asset Name(Custom):</td>
<td><span id="dialog_merge_oldname2"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_DEVICESN_COLON">Paired Device SN:</td>
<td>
<div id="dialog_merge_olddevicesn" style="overflow: auto; height: 32px;"></div>
</td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_YEAR_COLON">Year:</td>
<td><span id="dialog_merge_oldyear"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_MAKE_COLON">Make:</td>
<td><span id="dialog_merge_oldmake"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_MODEL_COLON">Model:</td>
<td><span id="dialog_merge_oldmodel"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_EQCLASS_COLON">Eq.Class:</td>
<td><span id="dialog_merge_oldeqclass"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_TYPE_COLON">Asset Type:</td>
<td><span id="dialog_merge_oldtype"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_DESCRIPTION_COLON">Description:</td>
<td>
<textarea id="dialog_merge_olddescription" disabled="disabled" style="height: 60px; width: 200px;"></textarea>
</td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ENGINEHOURS_COLON">Engine Hours:</td>
<td><span id="dialog_merge_oldenginehours"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ODOMETER_COLON">Odometer:</td>
<td><span id="dialog_merge_oldodometer"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ADDEDON_COLON">Added On:</td>
<td><span id="dialog_merge_oldaddedon"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_ADDEDBY_COLON">Added By:</td>
<td><span id="dialog_merge_oldaddedby"></span></td>
</tr>
<tr>
<td class="label label1" data-lgid="P_MA_TELEMATICDATASOURCES_COLON">Telematic Datasources:</td>
<td>
<div id="dialog_merge_olddatasource" style="height: 80px; overflow: auto;"></div>
</td>
</tr>
<tr>
<td class="label label1"></td>
<td>
<input type="button" value="Use this Asset" data-lgid="P_MA_USETHISASSET" onclick="onMergeUseAsset(1);" /></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_MA_CANCEL" class="dialog-close" tabindex="501" />
<div class="clear"></div>
</div>
<div id="mergeassetmask" class="maskbg" style="display: none;">
<div class="loading c-spin"></div>
</div>
</div>
<div class="dialog" id="dialog_adddocument" style="display: none; width: 500px;">
<div class="dialog-title"><span class="title" data-lgid="P_MA_ADDITIONALDOCUMENTATION">Additional Documentation</span><em class="dialog-close"></em></div>
<div class="dialog-content adjust-content">
<table style="line-height: 30px; width: 100%;">
<tr>
<td class="label" data-lgid="P_MA_NAME_COLON" style="width: 140px">Name:</td>
<td>
<input type="text" id="dialog_adddoc_name" maxlength="200" tabindex="400" style="width: 300px;" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_VISIBLEONWORKORDER">Visible On Work Order?</td>
<td>
<input type="checkbox" id="dialog_visibleonwo" tabindex="400" class="chk" style="width: auto;" />
</td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_VISIBLEONMAP">Visible On Map?</td>
<td>
<input type="checkbox" id="dialog_visibleonmap" tabindex="400" class="chk" style="width: auto;" />
</td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_VISIBLEONMOBILE">Visible On Mobile?</td>
<td>
<input type="checkbox" id="dialog_visibleonmobile" tabindex="400" class="chk" style="width: auto;" />
</td>
</tr>
<tr id="tr_document_radio">
<td></td>
<td>
<label data-lgid="P_MA_URL">Url</label>
<input type="radio" name="rdoattachmentmode" value="0" id="dialog_rdourl" tabindex="400" style="width: 20px; height: 13px;" />
<label style="margin-left: 20px;" data-lgid="P_MA_FILE">File</label>
<input type="radio" name="rdoattachmentmode" value="1" id="dialog_rdofile" tabindex="400" style="width: 20px; height: 13px;" />
<input id="browseattfile" type="button" value="Browse" data-lgid="P_MA_BROWSE" onclick="BrowseAssetDocument();" tabindex="400" style="width: 100px; height: 24px; margin-left: 10px;" />
</td>
</tr>
<tr id="tr_document_url">
<td class="label" data-lgid="P_MA_URL_COLON">Url:</td>
<td>
<input type="text" id="dialog_adddoc_url" maxlength="100" tabindex="400" autocomplete="off" style="width: 300px;" />
</td>
</tr>
<tr id="tr_document_file" style="display: none;">
<td></td>
<td>
<table id="tbAssetAttas" style="border: 1px solid #a8a8a8; margin-top: 5px; width: 304px;"></table>
</td>
</tr>
<tr>
<td class="label" data-lgid="P_MA_DESCRIPTION_COLON" style="vertical-align: top;">Description:</td>
<td>
<textarea id="dialog_adddoc_desc" maxlength="500" tabindex="400" style="width: 300px; height: 80px; margin-top: 5px;"></textarea></td>
</tr>
</table>
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_MA_CANCEL" class="dialog-close" tabindex="400" />
<input type="button" onclick="OnSaveDocument();" value="Save" data-lgid="P_MA_SAVE" tabindex="400" />
<div class="clear"></div>
</div>
<div id="adddocumentmask" class="maskbg" style="display: none;">
<div class="loading c-spin"></div>
</div>
</div>
</asp:Content>