sync
This commit is contained in:
@ -12,37 +12,6 @@
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.dialog-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dialog-content table td.label {
|
||||
width: 160px;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.dialog-content table td input,
|
||||
.dialog-content table td textarea {
|
||||
border: 1px solid #a9a9a9;
|
||||
width: 200px;
|
||||
height: 18px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.dialog-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dialog-content table td textarea {
|
||||
height: 100px;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
#dialogdatatb td {
|
||||
padding-top: 30px;
|
||||
}
|
||||
@ -62,7 +31,6 @@
|
||||
<link href="<%=GetFileUrlWithVersion("../css/jquery.datetimepicker.css")%>" rel="stylesheet" />
|
||||
<script src="<%=GetFileUrlWithVersion("../Maintenance/js/inputdatactr.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/jquery.datetimepicker.full.js")%>"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/editableselect.js")%>"></script>
|
||||
<script type="text/javascript">
|
||||
var IsDealer = <%=IsDealer ?"true":"false"%>;
|
||||
var IsAdmin =<%=IsAdmin ?"true":"false"%>;
|
||||
@ -70,8 +38,6 @@
|
||||
var MachineID = "<%=MachineID %>";
|
||||
var RentalID = "<%=RentalID %>";
|
||||
var machines;
|
||||
var editableSelectMachine;
|
||||
var listeditableSelectMachine;
|
||||
|
||||
function devicerequest(method, param, callback, error) {
|
||||
_network.request("MachineDeviceManagement/ManageRentals.aspx", -1, method, param, callback, error || function (e) {
|
||||
@ -132,6 +98,30 @@
|
||||
+ "&from=" + from + "&to=" + to + "&t=" + searchtxt + "&sp=" + sortPath + "&desc=" + desc);
|
||||
}
|
||||
|
||||
function getLangTermUnit(text) {
|
||||
var langtext = text;
|
||||
if (text === "Hourly")
|
||||
langtext = GetTextByKey("P_MR_HOURLY", "Hourly");
|
||||
else if (text === "Daily")
|
||||
langtext = GetTextByKey("P_MR_DAILY", "Daily");
|
||||
else if (text === "Weekly")
|
||||
langtext = GetTextByKey("P_MR_WEEKLY", "Weekly");
|
||||
else if (text === "Monthly")
|
||||
langtext = GetTextByKey("P_MR_MONTHLY", "Monthly");
|
||||
else if (text === "Annually")
|
||||
langtext = GetTextByKey("P_MR_ANNUALLY", "Annually");
|
||||
return langtext;
|
||||
}
|
||||
|
||||
function getLangOutside(text) {
|
||||
var langtext = text;
|
||||
if (text === "Inside")
|
||||
langtext = GetTextByKey("P_MR_INSIDE", "Inside");
|
||||
else if (text === "Outside")
|
||||
langtext = GetTextByKey("P_MR_OUTSIDE", "Outside");
|
||||
return langtext;
|
||||
}
|
||||
|
||||
function showRentals(data) {
|
||||
var rows = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
@ -145,9 +135,12 @@
|
||||
r[j] = { DisplayValue: r["ProjectReturnDateStr"], Value: r[j] };
|
||||
else if (j === "ReturnDate")
|
||||
r[j] = { DisplayValue: r["ReturnDateStr"], Value: r[j] };
|
||||
else if (j === "TermUnit")
|
||||
r[j] = { DisplayValue: getLangTermUnit(r["TermUnit"]), Value: r[j] };
|
||||
else if (j === "Outside")
|
||||
r[j] = { DisplayValue: getLangOutside(r["Outside"]), Value: r[j] };
|
||||
}
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dt.setData(rows);
|
||||
@ -157,29 +150,24 @@
|
||||
function InitGridData() {
|
||||
$('#btnEdit').attr("disabled", "disabled");
|
||||
|
||||
grid_dt = new GridView('#rentallist');
|
||||
grid_dt.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dt = createGridView('#rentallist');
|
||||
var list_columns = [
|
||||
{ name: 'RentalID', caption: GetTextByKey("P_MR_RENTALID", "Rental ID"), valueIndex: 'RentalID', css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'LastUpdateUserName', caption: GetTextByKey("P_MR_USERNAME", "User Name"), valueIndex: 'LastUpdateUserName', css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'RentalID', caption: GetTextByKey("P_MR_RENTALID", "Rental ID"), valueIndex: 'RentalID', allowFilter: true, css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'LastUpdateUserName', caption: GetTextByKey("P_MR_USERNAME", "User Name"), valueIndex: 'LastUpdateUserName', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'LastUpdateDate', caption: GetTextByKey("P_MR_LASTUPDATEDATE", "Last Update Date"), valueIndex: 'LastUpdateDate', css: { 'width': 150, 'text-align': 'left' } },
|
||||
//{ name: 'OperateType', caption: "Operate Type", valueIndex: 'OperateType',allowFilter:true, css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'VIN', caption: GetTextByKey("P_MR_VINSN", "VIN/SN"), valueIndex: 'VIN', css: { 'width': 180, 'text-align': 'left' } },
|
||||
{ name: 'DisplayName', caption: GetTextByKey("P_MR_ASSETNAME", "Asset Name"), valueIndex: 'DisplayName', css: { 'width': 180, 'text-align': 'left' } },
|
||||
{ name: 'VIN', caption: GetTextByKey("P_MR_VINSN", "VIN/SN"), valueIndex: 'VIN', allowFilter: true, css: { 'width': 180, 'text-align': 'left' } },
|
||||
{ name: 'DisplayName', caption: GetTextByKey("P_MR_ASSETNAME", "Asset Name"), valueIndex: 'DisplayName', allowFilter: true, css: { 'width': 180, 'text-align': 'left' } },
|
||||
{ name: 'Outside', caption: GetTextByKey("P_MR_OUTSIDEINTERNAL", "Outside/Internal"), valueIndex: 'Outside', allowFilter: true, css: { 'width': 180, 'text-align': 'left' } },
|
||||
{ name: 'Vendor', caption: GetTextByKey("P_MR_RENTALVENDOR", "Rental Vendor"), valueIndex: 'Vendor', css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'RentalRate', caption: GetTextByKey("P_MR_RENTALRATE", "Rental Rate"), valueIndex: 'RentalRate', css: { 'width': 150, 'text-align': 'right' } },
|
||||
{ name: 'Term', caption: GetTextByKey("P_MR_TERM", "Term"), valueIndex: 'Term', css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'TermUnit', caption: GetTextByKey("P_MR_TERMUNIT", "Term Unit"), valueIndex: 'TermUnit', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'Vendor', caption: GetTextByKey("P_MR_RENTALVENDOR", "Rental Vendor"), valueIndex: 'Vendor', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'RentalRate', caption: GetTextByKey("P_MR_RENTALRATE", "Rental Rate"), valueIndex: 'RentalRate', allowFilter: true, css: { 'width': 150, 'text-align': 'right' } },
|
||||
{ name: 'Term', caption: GetTextByKey("P_MR_TERM", "Term"), valueIndex: 'Term', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'TermUnit', caption: GetTextByKey("P_MR_TERMUNIT", "Term Unit"), valueIndex: 'TermUnit', allowFilter: true, allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'RentalDate', caption: GetTextByKey("P_MR_RENTALDATEON", "Rental Date On"), valueIndex: 'RentalDate', css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'ProjectReturnDate', caption: GetTextByKey("P_MR_PROJECTRETURN", "Project Return"), valueIndex: 'ProjectReturnDate', css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'ReturnDate', caption: GetTextByKey("P_MR_RETURNDATE", "Return Date"), valueIndex: 'ReturnDate', css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'PONumber', caption: GetTextByKey("P_MR_PURCHASEORDERN", "Purchase Order #"), valueIndex: 'PONumber', css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'InsuredValue', caption: GetTextByKey("P_MR_INSUREDVALUE", "Insured Value"), valueIndex: 'InsuredValue', css: { 'width': 150, 'text-align': 'right' } },
|
||||
{ name: 'PONumber', caption: GetTextByKey("P_MR_PURCHASEORDERN", "Purchase Order #"), allowFilter: true, valueIndex: 'PONumber', css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'InsuredValue', caption: GetTextByKey("P_MR_INSUREDVALUE", "Insured Value"), allowFilter: true, valueIndex: 'InsuredValue', css: { 'width': 150, 'text-align': 'right' } },
|
||||
{ name: 'Comments', caption: GetTextByKey("P_MR_COMMENTS", "Comments"), valueIndex: 'Comments', css: { 'width': 200, 'text-align': 'left' } }
|
||||
];
|
||||
var columns = [];
|
||||
@ -196,17 +184,15 @@
|
||||
col.allowFilter = list_columns[hd].allowFilter;
|
||||
columns.push(col);
|
||||
}
|
||||
grid_dt.canMultiSelect = false;
|
||||
grid_dt.multiSelect = false;
|
||||
grid_dt.columns = columns;
|
||||
grid_dt.init();
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
$("#content").applyFleetLanguageText();
|
||||
InitGridData();
|
||||
listeditableSelectMachine = new $editableselect($("#sel_machine"));
|
||||
|
||||
if (RentalID !== "") {
|
||||
$('#tr_search').css('display', 'none');
|
||||
|
Reference in New Issue
Block a user