sync
This commit is contained in:
@ -1,84 +1,7 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/JobSite/JobSiteMasterPage.master" AutoEventWireup="true" CodeFile="DispatchRequests.aspx.cs" Inherits="DispatchRequests" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
|
||||
<link href="../css/jquery.datetimepicker.css" rel="stylesheet" />
|
||||
<style type="text/css">
|
||||
.itemselcted {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
.itemhidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.itemsuggested {
|
||||
background-color: #ffff99;
|
||||
}
|
||||
|
||||
#tbMachineTypes tbody tr:hover {
|
||||
cursor: default;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
#tbodyAssigned tr:hover {
|
||||
cursor: default;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
#tbodyUnassigned tr:hover {
|
||||
cursor: default;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
#tbodySelected tr:hover {
|
||||
cursor: default;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
#contentctrl {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.float_left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.function_bar {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.user_main {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
.dialog .dialog-title .dialog-close {
|
||||
float: right;
|
||||
margin-right: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dialog .dialog-title .dialog-close:before {
|
||||
content: '\e600';
|
||||
}
|
||||
|
||||
.dialog-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dialog-content table td.label {
|
||||
width: 170px;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
line-height: 28px;
|
||||
height: 24px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#dialog_machines .dialog-content table td input,
|
||||
#dialog_layouts .dialog-content table td input {
|
||||
width: auto;
|
||||
@ -87,94 +10,15 @@
|
||||
.dialog-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#dialog_user_randompass {
|
||||
width: auto;
|
||||
height: 16px;
|
||||
margin: 3px 4px 0 4px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-family: CalciteWebCoreIcons;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
|
||||
.ybutton {
|
||||
width: 80px;
|
||||
line-height: normal;
|
||||
margin-left: 6px;
|
||||
border: none;
|
||||
background: rgb(249, 189, 117);
|
||||
padding: 5px 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ybutton:hover {
|
||||
background: #d7690E;
|
||||
}
|
||||
|
||||
.td_controller {
|
||||
vertical-align: middle;
|
||||
padding: 40px 8px;
|
||||
/*border-left: 1px solid #b0b0b0;
|
||||
border-right: 1px solid #b0b0b0;*/
|
||||
}
|
||||
|
||||
.ctl_button {
|
||||
font-family: 'CalciteWebCoreIcons';
|
||||
display: block;
|
||||
margin: 6px auto;
|
||||
width: 60px;
|
||||
height: 22px;
|
||||
line-height: 21px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.subdialog {
|
||||
width: -moz-calc(100% - 24px);
|
||||
width: -webkit-calc(100% - 24px);
|
||||
width: calc(100% - 24px);
|
||||
}
|
||||
|
||||
.machine_maskbg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background: #000;
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#machine-name {
|
||||
margin: 10px 10px 6px;
|
||||
/*color: gray;*/
|
||||
font-weight: lighter;
|
||||
font-size: 18px;
|
||||
width: 770px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.div_filter .dropdown {
|
||||
width: 120px;
|
||||
}
|
||||
</style>
|
||||
<link href="<%=GetFileUrlWithVersion("../css/spectrum.css")%>" rel="stylesheet" type="text/css" />
|
||||
<script src="../js/spectrum.js?v=1" type="text/javascript"></script>
|
||||
<script src="../js/jquery.datetimepicker.full.js"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/editableselect.js")%>"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/editmultiselect.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("js/email.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("js/dispatchassign.js")%>" type="text/javascript"></script>
|
||||
<script>
|
||||
jobsitequery = function (method, param, callback, error, nolog) {
|
||||
_network.request("JobSite/DispatchRequests.aspx?tp=ashx", -1, method, param, callback, error, nolog);
|
||||
}
|
||||
var jobsiteparam;
|
||||
var regionparam;
|
||||
var IsReadOnly = <%=IsReadOnly ?"true":"false"%>;
|
||||
var allroadassets;
|
||||
var _sendType = 1;
|
||||
@ -182,7 +26,7 @@
|
||||
var _selectdispatchids;
|
||||
|
||||
/***************************Jobsites***************************/
|
||||
|
||||
|
||||
function OnDelete(dis) {
|
||||
if (!dis) {
|
||||
return;
|
||||
@ -211,18 +55,18 @@
|
||||
}
|
||||
|
||||
function OnRefresh() {
|
||||
var lateststartdate = $.trim($('#latesdatetxt').val());
|
||||
if (lateststartdate && !$('#latesdatetxt').is(':valid')) {
|
||||
showAlert(GetTextByKey('P_COMMON_THELATESTSTARTDATEISINVALID', "The latest start date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
showloading(false);
|
||||
return;
|
||||
}
|
||||
var jobsites = $('#div_jobsites').dropdownVals();
|
||||
var regions = $('#div_region').dropdownVals();
|
||||
|
||||
showloading(true);
|
||||
|
||||
var jobsites = [];
|
||||
if (jobsiteparam)
|
||||
jobsites = jobsiteparam.selectedvalue;
|
||||
|
||||
var regions = [];
|
||||
if (regionparam)
|
||||
regions = regionparam.selectedvalue;
|
||||
|
||||
var p = {
|
||||
"LatestStartDate": $.trim($('#latesdatetxt').val()),
|
||||
"LatestStartDate": lateststartdate,
|
||||
"JobSites": jobsites,
|
||||
"Regions": regions,
|
||||
"SearchText": $.trim($('#searchinputtxt').val()),
|
||||
@ -255,8 +99,7 @@
|
||||
else if (j === "CompletedTime")
|
||||
r[j] = { DisplayValue: r["CompletedTimeStr"], Value: r[j] };
|
||||
}
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dt.setData(rows);
|
||||
@ -265,12 +108,7 @@
|
||||
|
||||
var grid_dt;
|
||||
function InitGridData() {
|
||||
grid_dt = new GridView('#dispatchlist');
|
||||
grid_dt.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dt = createGridView('#dispatchlist');
|
||||
var list_columns = [
|
||||
//{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, css: { 'width': 45, 'text-align': 'center' } },
|
||||
{ name: 'BeginDate', caption: GetTextByKey("P_JS_MOVEDATE", "Move Date"), valueIndex: 'BeginDate', css: { 'width': 100, 'text-align': 'left' } },
|
||||
@ -338,16 +176,14 @@
|
||||
}
|
||||
if (col.name === "Delete") {
|
||||
col.sortable = false;
|
||||
col.isurl = true;
|
||||
col.text = "\uf00d";
|
||||
col.resizable = false;
|
||||
col.type = GridView.ColumnTypes.Icon;
|
||||
col.text = 'times';
|
||||
col.events = {
|
||||
onclick: function () {
|
||||
OnDelete(this);
|
||||
}
|
||||
};
|
||||
col.classFilter = function (e) {
|
||||
return "icon-col";
|
||||
};
|
||||
col.attrs = { 'title': GetTextByKey("P_JS_DELETE", 'Delete') };
|
||||
col.styleFilter = function (e) {
|
||||
if (e.Completed)
|
||||
@ -359,16 +195,14 @@
|
||||
}
|
||||
if (col.name === "History") {
|
||||
col.sortable = false;
|
||||
col.isurl = true;
|
||||
col.text = "\uf06e";
|
||||
col.resizable = false;
|
||||
col.type = GridView.ColumnTypes.Icon;
|
||||
col.text = 'eye';
|
||||
col.events = {
|
||||
onclick: function () {
|
||||
OnViewChangeHistory(this);
|
||||
}
|
||||
};
|
||||
col.classFilter = function (e) {
|
||||
return "icon-col";
|
||||
};
|
||||
col.attrs = { 'title': GetTextByKey("P_MR_VIEWCHANGEHIS", 'View Change History') };
|
||||
col.visible = !IsReadOnly;
|
||||
}
|
||||
@ -377,12 +211,6 @@
|
||||
grid_dt.canMultiSelect = false;
|
||||
grid_dt.columns = columns;
|
||||
grid_dt.init();
|
||||
|
||||
grid_dt.selectedrowchanged = function (rowindex) {
|
||||
var rowdata = grid_dt.source[rowindex];
|
||||
if (rowdata) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -393,53 +221,39 @@
|
||||
}
|
||||
|
||||
var alljobsites;
|
||||
var jobsite_editmultiselect;
|
||||
function getJobsitesAndRegions() {
|
||||
jobsitequery('GetJobsitesAndRegions', '', function (data) {
|
||||
jobsitequery('GetJobsitesAndRegions', '1', function (data) {
|
||||
if (typeof (data) === "string") {
|
||||
showAlert(data, GetTextByKey("P_AM_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
|
||||
alljobsites = data.Jobsites;
|
||||
jobsiteparam = {
|
||||
allitems: data.Jobsites,
|
||||
items: JSON.parse(JSON.stringify(data.Jobsites)),
|
||||
selectedvalue: [],
|
||||
width: 240
|
||||
};
|
||||
jobsite_editmultiselect = editmultiselect(jobsiteparam);
|
||||
$('#div_jobsites').append(jobsite_editmultiselect);
|
||||
$("#div_jobsites").dropdownSource(data.Jobsites);
|
||||
|
||||
regionparam = {
|
||||
items: data.Regions,
|
||||
selectedvalue: [],
|
||||
width: 240,
|
||||
oncompleted: onregioncompleted
|
||||
};
|
||||
var ipt = editmultiselect(regionparam);
|
||||
$('#div_region').append(ipt);
|
||||
$('#div_region').dropdownSource(data.Regions);
|
||||
});
|
||||
}
|
||||
|
||||
function onregioncompleted() {
|
||||
if (!jobsiteparam || !jobsiteparam.allitems) return;
|
||||
jobsiteparam.items.length = 0;
|
||||
for (var i in jobsiteparam.allitems) {
|
||||
var item = jobsiteparam.allitems[i];
|
||||
if (!regionparam.selectedvalue
|
||||
|| regionparam.selectedvalue.length == 0
|
||||
|| regionparam.selectedvalue.indexOf(item.Tag3) >= 0)
|
||||
jobsiteparam.items.push(item);
|
||||
}
|
||||
jobsite_editmultiselect.reset();
|
||||
if (!alljobsites) return;
|
||||
var regions = $('#div_region').dropdownVals();
|
||||
var jss = [...alljobsites];
|
||||
if (regions && regions.length > 0)
|
||||
jss = jss.filter(t => regions.indexOf(t.Tag3) >= 0);
|
||||
$("#div_jobsites").dropdownSource(jss);
|
||||
var seljss = $("#div_jobsites").dropdownVals();
|
||||
$("#div_jobsites").dropdownSource(jss).dropdownVals(seljss);
|
||||
}
|
||||
|
||||
var editableSelectAssignAsset;
|
||||
$(function () {
|
||||
setPageTitle(GetTextByKey("P_JS_DISPATCHREQUESTS", "Dispatch Requests"), true);
|
||||
editableSelectAssignAsset = new $editableselect($("#dialog_assignasset"));
|
||||
editableSelectAssignAsset.setEnable(false);
|
||||
$('#dialog_assignasset').dropdown([], {
|
||||
search: true,
|
||||
valueKey: 'Id',
|
||||
textKey: 'DisplayName'
|
||||
});
|
||||
$('#dialog_assignasset').dropdownDisabled(false);
|
||||
InitGridData();
|
||||
InitEmailGridData();
|
||||
getJobsitesAndRegions();
|
||||
@ -451,6 +265,22 @@
|
||||
}).resize();
|
||||
OnRefresh();
|
||||
|
||||
$("#div_region").css('width', 120).dropdown([], {
|
||||
search: true,
|
||||
multiselect: true,
|
||||
allowselectall: true,
|
||||
textKey: 'Value',
|
||||
valueKey: 'Key'
|
||||
}).on('collapsed', onregioncompleted);
|
||||
|
||||
$("#div_jobsites").css('width', 120).dropdown([], {
|
||||
search: true,
|
||||
multiselect: true,
|
||||
allowselectall: true,
|
||||
textKey: 'Value',
|
||||
valueKey: 'Key'
|
||||
});
|
||||
|
||||
$('#searchinputtxt').keydown(searchEnter);
|
||||
|
||||
$('#dialog_sendmail').dialog(function () {
|
||||
@ -467,16 +297,6 @@
|
||||
$('#div_tooltip').css({ 'display': '', 'left': left, 'top': top });
|
||||
});
|
||||
|
||||
$('#latesdatetxt').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]);
|
||||
}
|
||||
});
|
||||
|
||||
if (!canExport) {
|
||||
$('#spExport').hide();
|
||||
}
|
||||
@ -515,16 +335,15 @@
|
||||
}
|
||||
|
||||
function OnExport() {
|
||||
var jobsites = [];
|
||||
if (jobsiteparam)
|
||||
jobsites = jobsiteparam.selectedvalue;
|
||||
|
||||
var regions = [];
|
||||
if (regionparam)
|
||||
regions = regionparam.selectedvalue;
|
||||
|
||||
var jobsites = $('#div_jobsites').dropdownVals();
|
||||
var regions = $('#div_region').dropdownVals();
|
||||
var lateststartdate = $.trim($('#latesdatetxt').val());
|
||||
if (lateststartdate && !$('#latesdatetxt').is(':valid')) {
|
||||
showAlert(GetTextByKey('P_COMMON_THELATESTSTARTDATEISINVALID', "The latest start date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
var p = {
|
||||
"LatestStartDate": $.trim($('#latesdatetxt').val()),
|
||||
"LatestStartDate": lateststartdate,
|
||||
"JobSites": jobsites,
|
||||
"Regions": regions,
|
||||
"SearchText": $.trim($('#searchinputtxt').val()),
|
||||
@ -541,7 +360,7 @@
|
||||
<div class="search_bar">
|
||||
<input type="password" autocomplete="new-password" style="display: none" />
|
||||
<span data-lgid="P_JS_LATESTSTARTDATE_COLON"></span>
|
||||
<input type="text" id="latesdatetxt" autocomplete="off" style="float: left; width: 80px; margin-left: 5px;" value="<%=LatestStartDate %>" />
|
||||
<input type="date" class="type-date" required min="1900-01-01" id="latesdatetxt" autocomplete="off" style="float: left; width: 89px; margin-left: 5px;" value="<%=LatestStartDate %>" />
|
||||
<span data-lgid="P_JS_REGION_COLON">Region:</span>
|
||||
<div id="div_region"></div>
|
||||
<span data-lgid="P_JS_JOBSITES_COLON">Jobsites:</span>
|
||||
@ -560,42 +379,42 @@
|
||||
<div id="dispatchlist"></div>
|
||||
</div>
|
||||
|
||||
<div id="mask_bg" style="display: none;"><div class="loading c-spin"></div></div>
|
||||
<div class="dialog" id="dialog_sendmail" style="display: none; width: 320px;">
|
||||
<div id="mask_bg" style="display: none;">
|
||||
<div class="loading c-spin"></div>
|
||||
</div>
|
||||
<div class="dialog" id="dialog_sendmail" style="display: none; width: 510px;">
|
||||
<div class="dialog-title"><span class="title" data-lgid="P_JS_SENDDISPATCHREQUEST">Send Dispatch Request</span><em class="dialog-close"></em></div>
|
||||
<div class="dialog-content" style="height: 378px;">
|
||||
<div class="dialog-content" style="line-height: 24px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2" data-lgid="P_MV_SENDTHISTO">Who do you want to send this to? Select from existing relationships or manual entry.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div id="contactlist" style="height: 168px; width: 440px; margin-left: 10px; margin-right: 10px;"></div>
|
||||
<div id="contactlist" style="height: 168px; width: 470px; margin-left: 10px; margin-right: 10px;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 24px;">
|
||||
<td colspan="2" data-lgid="P_MV_EMAILORTEXTADDRESSESTIPS">Separate multiple manually entered email or text addresses with a semi-colon (;).</td>
|
||||
</tr>
|
||||
<tr style="height: 24px;">
|
||||
<td><span data-lgid="P_MV_OTHEREMAILADDRESS">Other Email Address</span>
|
||||
<td style="text-align: right; padding-right: 5px;"><span data-lgid="P_MV_OTHEREMAILADDRESS">Other Email Address</span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="sendmail_otheremailaddress" style="width: 312px;" autocomplete="off" /></td>
|
||||
<input type="text" id="sendmail_otheremailaddress" style="width: 350px;" autocomplete="off" /></td>
|
||||
</tr>
|
||||
<tr style="height: 24px; display: none;">
|
||||
<td><span data-lgid="P_MV_OTHERTEXTADDRESS">Other Text Address</span>
|
||||
<td style="text-align: right; padding-right: 5px;"><span data-lgid="P_MV_OTHERTEXTADDRESS">Other Text Address</span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="sendmail_othertextaddress" style="width: 312px;" autocomplete="off" />
|
||||
<input type="text" id="sendmail_othertextaddress" style="width: 350px;" autocomplete="off" />
|
||||
</td>
|
||||
<%--<span id="span_hepler" class='helper pointer' title='Help'></span>--%>
|
||||
</tr>
|
||||
<tr style="height: 24px;">
|
||||
<td colspan="2" data-lgid="P_MV_DESCRIPTION_COLON">Description:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<textarea id="sendmail_desc" style="width: 444px; height: 80px; resize: none; margin-left: 12px;"></textarea></td>
|
||||
<td style="text-align: right; padding-right: 5px;" data-lgid="P_MV_DESCRIPTION">Description</td>
|
||||
<td>
|
||||
<textarea id="sendmail_desc" style="width: 350px; height: 80px; resize: none;"></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@ -615,7 +434,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="dialog_assignasset" style="width: 320px; height: 22px;"></div>
|
||||
<div id="dialog_assignasset" style="width: 320px; position: relative;" class="dropdown"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
Reference in New Issue
Block a user