sync
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/OTRConfig/OTRConfig.master" AutoEventWireup="true" CodeFile="ManageHarshDriving.aspx.cs" Inherits="ManageHarshDriving" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
|
||||
<link href="../css/jquery.datetimepicker.css" rel="stylesheet" />
|
||||
<style type="text/css">
|
||||
.main_group {
|
||||
table-layout: fixed;
|
||||
@ -71,7 +70,6 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
<script src="../js/jquery.datetimepicker.full.js"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("js/controls.js")%>" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
otrconfigquery = function (method, param, callback, error) {
|
||||
@ -86,12 +84,11 @@
|
||||
if (j === "AsofTimeLocal")
|
||||
r[j] = { DisplayValue: r["AsofTimeLocalStr"], Value: r[j] };
|
||||
else if (j === "Excluded") {
|
||||
r["SetText"] = r.Excluded ? GetTextByKey("P_MHD_EXCLUDE", "Exclude") : GetTextByKey("P_MHD_EXCLUDE", "Exclude");
|
||||
r[j] = { DisplayValue: r.Excluded ? "Yes" : "No", Value: r[j] };
|
||||
r["SetText"] = r.Excluded ? GetTextByKey("P_MHD_EXCLUDED", "Excluded") : GetTextByKey("P_MHD_EXCLUDE", "Exclude");
|
||||
r[j] = { DisplayValue: r.Excluded ? GetTextByKey("P_UTILITY_YES", "Yes") : GetTextByKey("P_UTILITY_NO", "No"), Value: r[j] };
|
||||
}
|
||||
}
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dt.setData(rows);
|
||||
@ -99,31 +96,26 @@
|
||||
|
||||
var grid_dt;
|
||||
function InitGridData() {
|
||||
grid_dt = new GridView('#harshdrivinglist');
|
||||
grid_dt.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dt = createGridView('#harshdrivinglist');
|
||||
var list_columns = [
|
||||
{ name: 'Set', valueIndex: 'SetText', css: { 'width': 60, 'text-align': 'left' } },
|
||||
{ name: 'Excluded', caption: GetTextByKey("P_MHD_EXCLUDED", "Excluded"), valueIndex: 'Excluded', allowFilter: true, css: { 'width': 80, 'text-align': 'left' } },
|
||||
{ name: 'Set', valueIndex: 'SetText', css: { 'width': 70, 'text-align': 'left' } },
|
||||
{ name: 'Excluded', caption: GetTextByKey("P_MHD_EXCLUDED", "Excluded"), valueIndex: 'Excluded', allowFilter: true, css: { 'width': 90, 'text-align': 'left' } },
|
||||
{ name: 'DisplayName', caption: GetTextByKey("P_MHD_ASSETNAME", "Asset Name"), valueIndex: 'DisplayName', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'MakeName', caption: GetTextByKey("P_MHD_MAKE", "Make"), valueIndex: 'MakeName', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'ModelName', caption: GetTextByKey("P_MHD_MODEL", "Model"), valueIndex: 'ModelName', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'EventDesc', caption: GetTextByKey("P_MHD_EVENTTYPE", "Event Type"), valueIndex: 'EventDesc', allowFilter: true, css: { 'width': 90, 'text-align': 'left' } },
|
||||
{ name: 'AsofTimeLocal', caption: GetTextByKey("P_MHD_EVENTTIME", "Event Time"), valueIndex: 'AsofTimeLocal', css: { 'width': 110, 'text-align': 'left' } },
|
||||
{ name: 'Street', caption: GetTextByKey("P_MHD_STREET", "Street"), valueIndex: 'Street', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'City', caption: GetTextByKey("P_MHD_CITY", "City"), valueIndex: 'City', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'State', caption: GetTextByKey("P_MHD_STATE", "State"), valueIndex: 'State', css: { 'width': 90, 'text-align': 'left' } },
|
||||
{ name: 'PostalCode', caption: GetTextByKey("P_MHD_POSTALCODE", "Postal Code"), valueIndex: 'PostalCode', css: { 'width': 60, 'text-align': 'left' } },
|
||||
{ name: 'Street', caption: GetTextByKey("P_MHD_STREET", "Street"), valueIndex: 'Street', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'City', caption: GetTextByKey("P_MHD_CITY", "City"), valueIndex: 'City', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'State', caption: GetTextByKey("P_MHD_STATE", "State"), valueIndex: 'State', allowFilter: true, css: { 'width': 90, 'text-align': 'left' } },
|
||||
{ name: 'PostalCode', caption: GetTextByKey("P_MHD_POSTALCODE", "Postal Code"), valueIndex: 'PostalCode', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
//{ name: 'Country', caption: GetTextByKey("P_MHD_EXCLUDED", "Country"), valueIndex: 'Country', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'StartingSpeed', caption: GetTextByKey("P_MHD_STARTINGSPEED", "Starting Speed"), valueIndex: 'StartingSpeed', css: { 'width': 60, 'text-align': 'right' } },
|
||||
{ name: 'SpeedUnits', caption: GetTextByKey("P_MHD_SPEEDUNITS", "Speed Units"), valueIndex: 'SpeedUnits', css: { 'width': 60, 'text-align': 'right' } },
|
||||
{ name: 'Duration', caption: GetTextByKey("P_MHD_DURATION", "Duration"), valueIndex: 'Duration', css: { 'width': 65, 'text-align': 'right' } },
|
||||
{ name: 'DurationUnits', caption: GetTextByKey("P_MHD_DURATIONUNITS", "Duration Units"), valueIndex: 'DurationUnits', css: { 'width': 65, 'text-align': 'right' } },
|
||||
{ name: 'Magnitude', caption: GetTextByKey("P_MHD_MAGNITUDE", "Magnitude"), valueIndex: 'Magnitude', css: { 'width': 75, 'text-align': 'right' } },
|
||||
{ name: 'MagnitudeUnits', caption: GetTextByKey("P_MHD_MAGNITUDEUNITS", "Magnitude Units"), valueIndex: 'MagnitudeUnits', css: { 'width': 80, 'text-align': 'right' } }
|
||||
{ name: 'StartingSpeed', caption: GetTextByKey("P_MHD_STARTINGSPEED", "Starting Speed"), valueIndex: 'StartingSpeed', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'SpeedUnits', caption: GetTextByKey("P_MHD_SPEEDUNITS", "Speed Units"), valueIndex: 'SpeedUnits', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'Duration', caption: GetTextByKey("P_MHD_DURATION", "Duration"), valueIndex: 'Duration', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'DurationUnits', caption: GetTextByKey("P_MHD_DURATIONUNITS", "Duration Units"), valueIndex: 'DurationUnits', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'Magnitude', caption: GetTextByKey("P_MHD_MAGNITUDE", "Magnitude"), valueIndex: 'Magnitude', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'MagnitudeUnits', caption: GetTextByKey("P_MHD_MAGNITUDEUNITS", "Magnitude Units"), valueIndex: 'MagnitudeUnits', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } }
|
||||
];
|
||||
var columns = [];
|
||||
// head
|
||||
@ -138,34 +130,43 @@
|
||||
col.key = list_columns[hd].valueIndex;
|
||||
col.allowFilter = list_columns[hd].allowFilter;
|
||||
if (col.name === "Set") {
|
||||
col.isurl = true;
|
||||
col.events = {
|
||||
onclick: function () {
|
||||
OnExcluded();
|
||||
}
|
||||
};
|
||||
col.styleFilter = function (e) {
|
||||
return { 'cursor': 'pointer', 'color': '#2140fb' };
|
||||
}
|
||||
}
|
||||
columns.push(col);
|
||||
}
|
||||
grid_dt.canMultiSelect = false;
|
||||
grid_dt.multiSelect = false;
|
||||
grid_dt.columns = columns;
|
||||
grid_dt.init();
|
||||
grid_dt.rowdblclick = OnExcluded;
|
||||
|
||||
grid_dt.selectedrowchanged = function (rowindex) {
|
||||
var rowdata = grid_dt.source[rowindex];
|
||||
if (rowdata) {
|
||||
}
|
||||
}
|
||||
grid_dt.onRowDblClicked = OnExcluded;
|
||||
}
|
||||
|
||||
|
||||
function OnRefresh() {
|
||||
showloading(true);
|
||||
var startdate = htmlencode($('#startdatetxt').val());
|
||||
var enddate = htmlencode($('#enddatetxt').val());
|
||||
var begindate = $('#startdatetxt').val();
|
||||
var enddate = $('#enddatetxt').val();
|
||||
if (begindate && !$('#startdatetxt').is(':valid')) {
|
||||
showAlert(GetTextByKey('P_COMMON_BEGINDATEISINVALID', "The begin date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
if (enddate && !$('#enddatetxt').is(':valid')) {
|
||||
showAlert(GetTextByKey('P_COMMON_ENDDATEISINVALID', "The end date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
if (begindate && enddate && begindate > enddate) {
|
||||
showAlert(GetTextByKey("P_JS_ENDDATEMUSTBELATERTHANBEGINDATE", "End Date must be later than Begin Date."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
|
||||
var searchtxt = htmlencode($.trim($('#searchinputtxt').val()));
|
||||
otrconfigquery('GetHarshDrivingEvents', startdate + String.fromCharCode(170) + enddate + String.fromCharCode(170) + searchtxt, function (data) {
|
||||
showloading(true);
|
||||
otrconfigquery('GetHarshDrivingEvents', htmlencode(begindate) + String.fromCharCode(170) + htmlencode(enddate) + String.fromCharCode(170) + searchtxt, function (data) {
|
||||
showloading(false);
|
||||
if (typeof (data) === "string") {
|
||||
showAlert(data, GetTextByKey("P_MHD_ERROR", 'Error'));
|
||||
@ -180,7 +181,7 @@
|
||||
var rowdata;
|
||||
function OnExcluded() {
|
||||
$('#dialog_notes').val('');
|
||||
var data = grid_dt.source[grid_dt.selectedIndex].Values;
|
||||
var data = grid_dt.source[grid_dt.selectedIndex];
|
||||
if (!data) {
|
||||
rowdata = undefined;
|
||||
return;
|
||||
@ -240,26 +241,6 @@
|
||||
showmaskbg(false);
|
||||
});
|
||||
|
||||
$('#startdatetxt').datetimepicker({
|
||||
timepicker: false,
|
||||
format: 'm/d/Y',
|
||||
enterLikeTab: false,
|
||||
onSelectDate: function (v, inp) {
|
||||
var date = new DateFormatter().formatDate(v, 'm/d/Y 00:00:00');
|
||||
inp.parent().data('val', [date]);
|
||||
}
|
||||
});
|
||||
|
||||
$('#enddatetxt').datetimepicker({
|
||||
timepicker: false,
|
||||
format: 'm/d/Y',
|
||||
enterLikeTab: false,
|
||||
onSelectDate: function (v, inp) {
|
||||
var date = new DateFormatter().formatDate(v, 'm/d/Y 00:00:00');
|
||||
inp.parent().data('val', [date]);
|
||||
}
|
||||
});
|
||||
|
||||
$('#searchinputtxt').keydown(searchEnter);
|
||||
$(window).resize(function () {
|
||||
$("#harshdrivinglist").css("height", $(window).height() - $("#harshdrivinglist").offset().top - 4);
|
||||
@ -283,10 +264,10 @@
|
||||
<input type="password" autocomplete="new-password" style="display: none" />
|
||||
<span style="padding-left: 5px;" data-lgid="P_MHD_STATDATE_COLON">Start Date: </span>
|
||||
<span>
|
||||
<input id="startdatetxt" type="text" style="width: 100px;" value="<%=BeginDate %>" /></span>
|
||||
<input id="startdatetxt" type="date" class="type-date" required min="1900-01-01" style="width: 100px;" value="<%=BeginDate %>" /></span>
|
||||
<span style="padding-left: 5px;" data-lgid="P_MHD_ENDDATE_COLON">End Date: </span>
|
||||
<span>
|
||||
<input id="enddatetxt" type="text" style="width: 100px;" value="<%=EndDate %>" /></span>
|
||||
<input id="enddatetxt" type="date" class="type-date" required min="1900-01-01" style="width: 100px;" value="<%=EndDate %>" /></span>
|
||||
<input id="searchinputtxt" type="text" style="width: 200px; margin-left: 5px;" autocomplete="off" />
|
||||
<input class="search" type="button" onclick="OnRefresh();" value="Search" data-lgid="P_MHD_SEARCH" style="margin-left: 5px;" />
|
||||
</div>
|
||||
|
@ -31,8 +31,8 @@ public partial class ManageHarshDriving : OTRConfigBasePage
|
||||
}
|
||||
}
|
||||
DateTime userlocaldate = SystemParams.ConvertToUserTimeFromUtc(GetCurrentLoginSession().User, DateTime.UtcNow);
|
||||
BeginDate = userlocaldate.AddDays(-6).ToShortDateString();
|
||||
EndDate = userlocaldate.ToShortDateString();
|
||||
BeginDate = userlocaldate.AddDays(-6).ToString("yyyy-MM-dd");
|
||||
EndDate = userlocaldate.ToString("yyyy-MM-dd");
|
||||
}
|
||||
protected override bool AllowCurrentLoginSessionEnter()
|
||||
{
|
||||
|
@ -1,7 +1,6 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/OTRConfig/OTRConfig.master" AutoEventWireup="true" CodeFile="ManageSpeeding.aspx.cs" Inherits="ManageSpeeding" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
|
||||
<link href="../css/jquery.datetimepicker.css" rel="stylesheet" />
|
||||
<style type="text/css">
|
||||
.main_group {
|
||||
table-layout: fixed;
|
||||
@ -71,7 +70,6 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
<script src="../js/jquery.datetimepicker.full.js"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("js/controls.js")%>" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
var groups;
|
||||
@ -87,8 +85,7 @@
|
||||
if (j === "EventTime")
|
||||
r[j] = { DisplayValue: r["EventTimeStr"], Value: r[j] };
|
||||
}
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dt.setData(rows);
|
||||
@ -98,18 +95,18 @@
|
||||
function InitGridData() {
|
||||
grid_dt = new GridView('#speedinglist');
|
||||
var list_columns = [
|
||||
{ name: 'AssetName', caption: "Asset Name", valueIndex: 'AssetName', css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'Make', caption: "Make", valueIndex: 'Make', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Model', caption: "Model", valueIndex: 'Model', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'AssetName', caption: "Asset Name", valueIndex: 'AssetName', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'Make', caption: "Make", valueIndex: 'Make', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Model', caption: "Model", valueIndex: 'Model', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'EventTime', caption: "Event Time", valueIndex: 'EventTime', css: { 'width': 110, 'text-align': 'left' } },
|
||||
{ name: 'Street', caption: "Street", valueIndex: 'Street', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'City', caption: "City", valueIndex: 'Street', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'State', caption: "State", valueIndex: 'State', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'PostalCode', caption: "Postal Code", valueIndex: 'PostalCode', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Country', caption: "Country", valueIndex: 'Country', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'TopSpeed', caption: "Top Speed", valueIndex: 'TopSpeed', css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'PostedSpeedLimit', caption: "Posted Speed Limit", valueIndex: 'PostedSpeedLimit', css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'SpeedingOverage', caption: "Speeding Overage", valueIndex: 'SpeedingOverage', css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'Street', caption: "Street", valueIndex: 'Street', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'City', caption: "City", valueIndex: 'Street', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'State', caption: "State", valueIndex: 'State', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'PostalCode', caption: "Postal Code", valueIndex: 'PostalCode', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Country', caption: "Country", valueIndex: 'Country', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'TopSpeed', caption: "Top Speed", valueIndex: 'TopSpeed', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'PostedSpeedLimit', caption: "Posted Speed Limit", valueIndex: 'PostedSpeedLimit', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'SpeedingOverage', caption: "Speeding Overage", valueIndex: 'SpeedingOverage', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'Excluded', css: { 'width': 100, 'text-align': 'left' } }
|
||||
];
|
||||
var columns = [];
|
||||
@ -123,41 +120,54 @@
|
||||
col.width = list_columns[hd].css.width;
|
||||
col.align = list_columns[hd].css["text-align"]
|
||||
col.key = list_columns[hd].valueIndex;
|
||||
col.allowFilter = list_columns[hd].allowFilter;
|
||||
if (col.name === "Excluded") {
|
||||
col.isurl = true;
|
||||
col.text = "Excluded";
|
||||
col.events = {
|
||||
onclick: function () {
|
||||
OnExcluded();
|
||||
}
|
||||
};
|
||||
col.classFilter = function (e) {
|
||||
return "icon-col";
|
||||
};
|
||||
col.styleFilter = function (e) {
|
||||
return { 'cursor': 'pointer', 'color': '#2140fb' };
|
||||
}
|
||||
col.attrs = { 'title': 'Excluded' };
|
||||
}
|
||||
columns.push(col);
|
||||
}
|
||||
grid_dt.canMultiSelect = false;
|
||||
grid_dt.multiSelect = false;
|
||||
grid_dt.columns = columns;
|
||||
grid_dt.init();
|
||||
grid_dt.rowdblclick = OnExcluded;
|
||||
grid_dt.onRowDblClicked = OnExcluded;
|
||||
|
||||
grid_dt.selectedrowchanged = function (rowindex) {
|
||||
grid_dt.onSelectedRowChanged = function (rowindex) {
|
||||
var rowdata = grid_dt.source[rowindex];
|
||||
if (rowdata) {
|
||||
uiid = rowdata.Values.ID;
|
||||
uiid = rowdata.ID;
|
||||
}
|
||||
}
|
||||
}
|
||||
function OnRefresh() {
|
||||
var begindate = $('#startdatetxt').val();
|
||||
var enddate = $('#enddatetxt').val();
|
||||
if (begindate && !$('#startdatetxt').is(':valid')) {
|
||||
showAlert(GetTextByKey('P_COMMON_BEGINDATEISINVALID', "The begin date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
if (enddate && !$('#enddatetxt').is(':valid')) {
|
||||
showAlert(GetTextByKey('P_COMMON_ENDDATEISINVALID', "The end date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
if (begindate && enddate && begindate > enddate) {
|
||||
showAlert(GetTextByKey("P_JS_ENDDATEMUSTBELATERTHANBEGINDATE", "End Date must be later than Begin Date."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
|
||||
showloading(true);
|
||||
var startdate = htmlencode($('#startdatetxt').val());
|
||||
var enddate = htmlencode($('#enddatetxt').val());
|
||||
otrconfigquery('GetSpeedingEvents', startdate + String.fromCharCode(170) + enddate, function (data) {
|
||||
otrconfigquery('GetSpeedingEvents', htmlencode(begindate) + String.fromCharCode(170) + htmlencode(enddate), function (data) {
|
||||
showloading(false);
|
||||
if (typeof (data) === "string") {
|
||||
showAlert(data, 'Error');
|
||||
showAlert(data, GetTextByKey('P_MS_ERROR', 'Error'));
|
||||
return;
|
||||
}
|
||||
showList(data);
|
||||
@ -169,7 +179,7 @@
|
||||
var rowdata;
|
||||
function OnExcluded() {
|
||||
$('#dialog_notes').val('');
|
||||
var data = grid_dt.source[grid_dt.selectedIndex].Values;
|
||||
var data = grid_dt.source[grid_dt.selectedIndex];
|
||||
if (!data) {
|
||||
rowdata = undefined;
|
||||
return;
|
||||
@ -192,25 +202,25 @@
|
||||
return;
|
||||
var notes = $('#dialog_notes').val();
|
||||
|
||||
var alerttitle = "Excluded Speeding";
|
||||
var alerttitle = GetTextByKey('P_MS_EXCLUDEDSPEEDING', "Excluded Speeding");
|
||||
showloading(true);
|
||||
otrconfigquery("ExcludedSpeedingEvents", rowdata.AssetID + String.fromCharCode(170) + rowdata.LogID + String.fromCharCode(170) + notes, function (data) {
|
||||
showloading(false);
|
||||
if (data !== 'OK') {
|
||||
showAlert(data, alerttitle);
|
||||
} else {
|
||||
showAlert('Excluded speeding successfully.', alerttitle);
|
||||
showAlert(GetTextByKey('P_MS_EXCLUDEDSPEEDINGSUCCESSFULLY', 'Excluded speeding successfully.'), alerttitle);
|
||||
$('#dialog_excluded').hideDialog();
|
||||
OnRefresh();
|
||||
}
|
||||
}, function (err) {
|
||||
showloading(false);
|
||||
showAlert('Failed to speeding driving.', alerttitle);
|
||||
showAlert(GetTextByKey('P_MS_FAILEDTOSPEEDINGDRIVING', 'Failed to speeding driving.'), alerttitle);
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
setPageTitle(GetTextByKey("P_XXXXXX", "Manage Speedings"), true);
|
||||
setPageTitle(GetTextByKey("P_MANAGESPEEDINGS", "Manage Speedings"), true);
|
||||
InitGridData();
|
||||
|
||||
OnRefresh();
|
||||
@ -219,26 +229,6 @@
|
||||
showmaskbg(false);
|
||||
});
|
||||
|
||||
$('#startdatetxt').datetimepicker({
|
||||
timepicker: false,
|
||||
format: 'm/d/Y',
|
||||
enterLikeTab: false,
|
||||
onSelectDate: function (v, inp) {
|
||||
var date = new DateFormatter().formatDate(v, 'm/d/Y 00:00:00');
|
||||
inp.parent().data('val', [date]);
|
||||
}
|
||||
});
|
||||
|
||||
$('#enddatetxt').datetimepicker({
|
||||
timepicker: false,
|
||||
format: 'm/d/Y',
|
||||
enterLikeTab: false,
|
||||
onSelectDate: function (v, inp) {
|
||||
var date = new DateFormatter().formatDate(v, 'm/d/Y 00:00:00');
|
||||
inp.parent().data('val', [date]);
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(function () {
|
||||
$("#speedinglist").css("height", $(window).height() - $("#speedinglist").offset().top - 4);
|
||||
grid_dt && grid_dt.resize();
|
||||
@ -249,19 +239,19 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
||||
<div style="min-width: 400px;">
|
||||
<div class="page_title" data-lgid="P_XXXXXX">Manage Speedings</div>
|
||||
<div class="page_title" data-lgid="P_MANAGESPEEDINGS">Manage Speedings</div>
|
||||
<div class="search_bar">
|
||||
<input type="password" autocomplete="new-password" style="display: none" />
|
||||
<span style="padding-left: 5px;">Begin Date: </span>
|
||||
<span style="padding-left: 5px;" data-lgid="P_MS_BEGINDATE_COLON">Begin Date: </span>
|
||||
<span>
|
||||
<input id="startdatetxt" type="text" style="width: 100px;" value="<%=BeginDate %>" /></span>
|
||||
<span style="padding-left: 5px;">End Date: </span>
|
||||
<input id="startdatetxt" type="date" class="type-date" required min="1900-01-01" style="width: 100px;" value="<%=BeginDate %>" /></span>
|
||||
<span style="padding-left: 5px;" data-lgid="P_MS_ENDDATE_COLON">End Date: </span>
|
||||
<span>
|
||||
<input id="enddatetxt" type="text" style="width: 100px;" value="<%=EndDate %>" /></span>
|
||||
<input class="search" type="button" onclick="OnRefresh();" value="Search" style="margin-left: 5px;" />
|
||||
<input id="enddatetxt" type="date" class="type-date" required min="1900-01-01" style="width: 100px;" value="<%=EndDate %>" /></span>
|
||||
<input class="search" type="button" onclick="OnRefresh();" data-lgid="P_MS_SEARCH" value="Search" style="margin-left: 5px;" />
|
||||
</div>
|
||||
<div class="function_title">
|
||||
<span class="sbutton iconrefresh" onclick="OnRefresh();">Refresh</span>
|
||||
<span class="sbutton iconrefresh" onclick="OnRefresh();" data-lgid="P_MS_REFRESH">Refresh</span>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div id="speedinglist"></div>
|
||||
@ -272,19 +262,19 @@
|
||||
</div>
|
||||
|
||||
<div class="dialog" id="dialog_excluded" style="display: none; width: 400px;">
|
||||
<div class="dialog-title"><span class="title">Excluded</span><em class="dialog-close"></em></div>
|
||||
<div class="dialog-title"><span class="title" data-lgid="P_MS_EXCLUDED">Excluded</span><em class="dialog-close"></em></div>
|
||||
<div class="dialog-content">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width: 50px; vertical-align: top;">Notes:</td>
|
||||
<td style="width: 50px; vertical-align: top;" data-lgid="P_MS_NOTES_COLON">Notes:</td>
|
||||
<td>
|
||||
<textarea id="dialog_notes" maxlength="1000" tabindex="1" style="width: 300px; height: 100px; margin-top: 3px;"></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="dialog-func">
|
||||
<input type="button" value="Cancel" class="dialog-close" tabindex="3" />
|
||||
<input type="button" onclick="OnDialogOK();" value="OK" tabindex="2" />
|
||||
<input type="button" value="Cancel" data-lgid="P_MS_CANCEL" class="dialog-close" tabindex="3" />
|
||||
<input type="button" onclick="OnDialogOK();" data-lgid="P_MS_OK" value="OK" tabindex="2" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -32,7 +32,7 @@ public partial class ManageSpeeding : OTRConfigBasePage
|
||||
}
|
||||
|
||||
DateTime userlocaldate = SystemParams.ConvertToUserTimeFromUtc(GetCurrentLoginSession().User, DateTime.UtcNow);
|
||||
BeginDate = userlocaldate.AddDays(-6).ToShortDateString();
|
||||
EndDate = userlocaldate.ToShortDateString();
|
||||
BeginDate = userlocaldate.AddDays(-6).ToString("yyyy-MM-dd");
|
||||
EndDate = userlocaldate.ToString("yyyy-MM-dd");
|
||||
}
|
||||
}
|
@ -6,28 +6,22 @@
|
||||
<head runat="server">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title></title>
|
||||
<link type="text/css" href="<%=GetUrl("js/components/css/gridview.css") %>" rel="stylesheet" />
|
||||
<link type="text/css" href="<%=GetUrl("js/lib/ui.min.css") %>" rel="stylesheet" />
|
||||
<link type="text/css" href="<%=GetUrl("css/override.css") %>" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="<%=GetUrl("css/default.css")%>" type="text/css" />
|
||||
<link rel="stylesheet" href="<%=GetUrl("css/split_sub.css")%>" type="text/css" />
|
||||
<link rel="stylesheet" href="<%=GetUrl("css/editmultiselect.css")%>" type="text/css" />
|
||||
<style type="text/css">
|
||||
:root { <%=StyleVariables%> }
|
||||
.data-grid {
|
||||
height: 100%;
|
||||
font-size: 12px !important;
|
||||
font-family: "Segoe UI","Segoe UI Web (West European)","Segoe UI",-apple-system,BlinkMacSystemFont,"Roboto","Helvetica Neue",sans-serif !important;
|
||||
}
|
||||
</style>
|
||||
<script src="<%=GetUrl("js/jquery-3.6.0.min.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetUrl("js/cookie.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetUrl("js/lib/utility.min.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetUrl("js/lib/ui.min.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetUrl("js/utility.js")%>" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="<%=GetUrl("js/components/gridview.js") %>"></script>
|
||||
<script src="<%=GetUrl("js/editmultiselect.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetUrl("js/language.js")%>" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var GridView = window.GridView || window['g5-gridview'];
|
||||
var GridView = window['lib-ui'].Grid;
|
||||
|
||||
_network.root = '<%=Page.ResolveUrl("~/")%>';
|
||||
var sitePath = "<%=this.ResolveUrl("~/fic/") %>";
|
||||
|
Reference in New Issue
Block a user