sync
This commit is contained in:
@ -7,38 +7,6 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.edit-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.edit-content table td.label {
|
||||
width: 200px;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.edit-content table td input,
|
||||
.edit-content table td textarea {
|
||||
border: 1px solid #a9a9a9;
|
||||
width: 320px;
|
||||
height: 18px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.edit-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.edit-content table td textarea {
|
||||
height: 100px;
|
||||
resize: none;
|
||||
/*max-width: 200px;*/
|
||||
}
|
||||
|
||||
.a {
|
||||
text-decoration: none;
|
||||
color: #2140fb;
|
||||
@ -107,7 +75,7 @@
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: 100px;
|
||||
z-index: 199;
|
||||
z-index: 2;
|
||||
background-color: #EFEFEF;
|
||||
height: 75px;
|
||||
width: 75px;
|
||||
@ -124,19 +92,10 @@
|
||||
height: 120px;
|
||||
overflow: auto;
|
||||
display: none;
|
||||
z-index: 200;
|
||||
z-index: 2;
|
||||
background-color: #EFEFEF;
|
||||
}
|
||||
|
||||
.div_filter .dropdown {
|
||||
width: 322px;
|
||||
margin: 2px 0 0 0px;
|
||||
}
|
||||
|
||||
.div_panel {
|
||||
min-width: 322px;
|
||||
}
|
||||
|
||||
#machine-name {
|
||||
margin: 10px 10px 6px;
|
||||
/*color: gray;*/
|
||||
@ -179,16 +138,14 @@
|
||||
</script>
|
||||
<link href="<%=GetFileUrlWithVersion("../css/jquery.datetimepicker.css")%>" rel="stylesheet" />
|
||||
<script src="<%=GetFileUrlWithVersion("../js/jquery.datetimepicker.full.js")%>"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/editableselect.js")%>"></script>
|
||||
<%--<link rel="stylesheet" type="text/css" href="css/default.css" />--%>
|
||||
<link href="<%=GetFileUrlWithVersion("../css/spectrum.css")%>" rel="stylesheet" type="text/css" />
|
||||
<script src="../js/spectrum.js?v=1" type="text/javascript"></script>
|
||||
<script src="../Maintenance/js/inputdatactr.js"></script>
|
||||
<%--<script src="<%=GetFileUrlWithVersion("js/mapview.js")%>"></script>--%>
|
||||
<%--<script src="<%=GetFileUrlWithVersion("js/mapinit3.19.js")%>"></script>--%>
|
||||
<link rel="stylesheet" href="https://js.arcgis.com/3.40/esri/css/esri.css" />
|
||||
<script src="https://js.arcgis.com/3.40"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/editmultiselect.js")%>" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="https://js.arcgis.com/3.44/esri/css/esri.css" />
|
||||
<script src="https://js.arcgis.com/3.44"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/assetselector.js")%>" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
@ -202,9 +159,6 @@
|
||||
|
||||
var foremans;
|
||||
var statedata = [];
|
||||
var editableSelectForeman;
|
||||
var editableSelectState;
|
||||
var editableSelectState_use;
|
||||
var centerassetid = -1;
|
||||
var currentdate = "<%=CurrentDate %>";
|
||||
|
||||
@ -221,6 +175,9 @@
|
||||
}
|
||||
}, function () {
|
||||
$("#dialogmask").hide();
|
||||
if (typeof fcancel === 'function') {
|
||||
fcancel();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -247,7 +204,7 @@
|
||||
$("#dialog_machine").prop("disabled", false);
|
||||
$('#dialog_region').val('');
|
||||
$('#dialog_number').val('');
|
||||
editableSelectForeman.text('');
|
||||
$('#dialog_foreman').dropdownVal('');
|
||||
$('#dialog_manager').val('');
|
||||
$('#dialog_phone').val('');
|
||||
$('#dialog_email').val('');
|
||||
@ -255,7 +212,7 @@
|
||||
$('#dialog_deliveryaddress1').val('');
|
||||
$('#dialog_deliveryaddress2').val('');
|
||||
$('#dialog_city').val('');
|
||||
editableSelectState.text('');
|
||||
$('#dialog_state').dropdownVal('');
|
||||
$('#dialog_zip').val('');
|
||||
$('#dialog_county').val('');
|
||||
$('#dialog_notes').val('');
|
||||
@ -293,7 +250,7 @@
|
||||
$('#dialog_enddate').val(jobsiteitem.EndDateStr);
|
||||
$('#dialog_region').val(jobsiteitem.RegionId);
|
||||
$('#dialog_number').val(jobsiteitem.Number);
|
||||
editableSelectForeman.text(jobsiteitem.Foreman);
|
||||
$('#dialog_foreman').dropdownVal(jobsiteitem.Foreman);
|
||||
$('#dialog_manager').val(jobsiteitem.Manager);
|
||||
$('#dialog_phone').val(jobsiteitem.Phone);
|
||||
$('#dialog_email').val(jobsiteitem.Email);
|
||||
@ -301,7 +258,7 @@
|
||||
$('#dialog_deliveryaddress1').val(jobsiteitem.Address1);
|
||||
$('#dialog_deliveryaddress2').val(jobsiteitem.Address2);
|
||||
$('#dialog_city').val(jobsiteitem.City);
|
||||
editableSelectState.text(jobsiteitem.State);
|
||||
$('#dialog_state').dropdownVal(jobsiteitem.State);
|
||||
$('#dialog_zip').val(jobsiteitem.Zip);
|
||||
$('#dialog_county').val(jobsiteitem.County);
|
||||
$('#dialog_notes').val(jobsiteitem.Notes)
|
||||
@ -344,7 +301,7 @@
|
||||
'Types': types,
|
||||
'RegionId': $('#dialog_region').val(),
|
||||
'Number': $('#dialog_number').val(),
|
||||
'Foreman': editableSelectForeman.text(),
|
||||
'Foreman': $('#dialog_foreman').dropdownVal(),
|
||||
'Manager': $('#dialog_manager').val(),
|
||||
'Phone': $('#dialog_phone').val(),
|
||||
'Email': $('#dialog_email').val(),
|
||||
@ -352,7 +309,7 @@
|
||||
'Address1': $('#dialog_deliveryaddress1').val(),
|
||||
'Address2': $('#dialog_deliveryaddress2').val(),
|
||||
'City': $('#dialog_city').val(),
|
||||
'State': editableSelectState.text(),
|
||||
'State': $('#dialog_state').dropdownVal(),
|
||||
'Zip': $('#dialog_zip').val(),
|
||||
'County': $('#dialog_county').val(),
|
||||
'Notes': $('#dialog_notes').val()
|
||||
@ -545,8 +502,6 @@
|
||||
}
|
||||
else
|
||||
openMap();
|
||||
editableSelectForeman.reload();
|
||||
editableSelectState_use.reload();
|
||||
}
|
||||
|
||||
function getJobsiteTypes() {
|
||||
@ -615,36 +570,34 @@
|
||||
}
|
||||
|
||||
function getStates() {
|
||||
statedata.push("AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ",
|
||||
var data = [];
|
||||
data.push("AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ",
|
||||
"NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY");
|
||||
editableSelectState.datasource = statedata;
|
||||
editableSelectState.valuepath = ""
|
||||
editableSelectState.displaypath = "";
|
||||
|
||||
editableSelectState_use.datasource = statedata;
|
||||
editableSelectState_use.valuepath = ""
|
||||
editableSelectState_use.displaypath = "";
|
||||
for (var type of data) {
|
||||
statedata.push({ value: type });
|
||||
}
|
||||
$('#dialog_state').dropdownSource(statedata);
|
||||
$('#dialog_state_use').dropdownSource(statedata);
|
||||
}
|
||||
|
||||
function GetForemans() {
|
||||
_network.jobsitequery("GetForemans", "", function (data) {
|
||||
if (data && data.length > 0) {
|
||||
foremans = data;
|
||||
editableSelectForeman.datasource = foremans;
|
||||
editableSelectForeman.valuepath = "IID"
|
||||
editableSelectForeman.displaypath = "DisplayName";
|
||||
}
|
||||
$('#dialog_foreman').dropdownSource(foremans);
|
||||
if (jobsiteitem)
|
||||
editableSelectForeman.text(jobsiteitem.Foreman);
|
||||
$('#dialog_foreman').dropdownVal(jobsiteitem.Foreman);
|
||||
else
|
||||
editableSelectForeman.text('');
|
||||
$('#dialog_foreman').dropdownVal('');
|
||||
|
||||
}, function (err) {
|
||||
});
|
||||
}
|
||||
|
||||
function setForemanInfo() {
|
||||
var foreman = editableSelectForeman.selecteditem();
|
||||
var foreman = $('#dialog_foreman').dropdownItem();
|
||||
if (foreman) {
|
||||
$('#dialog_manager').val(foreman.ManagerName);
|
||||
$('#dialog_phone').val(foreman.Mobile);
|
||||
@ -659,16 +612,25 @@
|
||||
|
||||
$(function () {
|
||||
InitGridSelectedMachines();
|
||||
editableSelectForeman = new $editableselect($("#dialog_foreman"));
|
||||
editableSelectForeman.tabIndex(1);
|
||||
editableSelectForeman.change(function () {
|
||||
|
||||
$('#dialog_foreman').dropdown([], {
|
||||
input: true,
|
||||
maxlength: 50,
|
||||
valueKey: 'DisplayName',
|
||||
textKey: 'DisplayName'
|
||||
}).on('select', function (_e, item) {
|
||||
setForemanInfo();
|
||||
});
|
||||
|
||||
editableSelectState = new $editableselect($("#dialog_state"), 50);
|
||||
editableSelectState.tabIndex(1);
|
||||
editableSelectState_use = new $editableselect($("#dialog_state_use"), 50);
|
||||
$('#dialog_state').dropdown([], {
|
||||
input: true,
|
||||
maxlength: 50,
|
||||
textKey: 'value'
|
||||
});
|
||||
|
||||
$('#dialog_state_use').dropdown([], {
|
||||
textKey: 'value'
|
||||
});
|
||||
getStates();
|
||||
|
||||
$("#dialog_machine").change(function () {
|
||||
@ -1040,7 +1002,7 @@
|
||||
$("#basemapGallery").hide();
|
||||
});
|
||||
var basemap = "topo";
|
||||
$("#basemapImg").css("background-image", "url('https://js.arcgis.com/3.40/esri/images/basemap/topo.jpg')");
|
||||
$("#basemapImg").css("background-image", "url('https://js.arcgis.com/3.44/esri/images/basemap/topo.jpg')");
|
||||
$("#basemapTitle").text(GetTextByKey("P_MAP_TOPOGRAPHIC", "Topographic"));
|
||||
|
||||
var basemapGallery = new BasemapGalleryC({
|
||||
@ -1053,7 +1015,7 @@
|
||||
url: "http://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer"
|
||||
})],
|
||||
title: GetTextByKey("P_MAP_IMAGERY", "Imagery"),
|
||||
thumbnailUrl: "https://js.arcgis.com/3.40/esri/images/basemap/satellite.jpg"
|
||||
thumbnailUrl: "https://js.arcgis.com/3.44/esri/images/basemap/satellite.jpg"
|
||||
});
|
||||
basemapGallery.add(satellitemap);
|
||||
|
||||
@ -1062,7 +1024,7 @@
|
||||
url: "http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
|
||||
})],
|
||||
title: GetTextByKey("P_MAP_TOPOGRAPHIC", "Topographic"),
|
||||
thumbnailUrl: "https://js.arcgis.com/3.40/esri/images/basemap/topo.jpg"
|
||||
thumbnailUrl: "https://js.arcgis.com/3.44/esri/images/basemap/topo.jpg"
|
||||
});
|
||||
basemapGallery.add(topomap);
|
||||
|
||||
@ -1072,7 +1034,7 @@
|
||||
url: "http://server.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer"
|
||||
})],
|
||||
title: GetTextByKey("P_MAP_STREETS", "Streets"),
|
||||
thumbnailUrl: "https://js.arcgis.com/3.40/esri/images/basemap/streets.jpg"
|
||||
thumbnailUrl: "https://js.arcgis.com/3.44/esri/images/basemap/streets.jpg"
|
||||
|
||||
});
|
||||
basemapGallery.add(streetmap);
|
||||
@ -1714,16 +1676,16 @@
|
||||
function AddAssetToJobSite(items) {
|
||||
var params = [
|
||||
'', jobsiteid,
|
||||
JSON.stringify(items.map(function (f) { return f.Values.AssetId; }))
|
||||
JSON.stringify(items.map(function (f) { return f.AssetId; }))
|
||||
];
|
||||
_network.jobsitequery('AddAssetToJobSite', params.join(String.fromCharCode(170)), function (r) {
|
||||
$('#dialogmask').hide();
|
||||
if (r === 'OK') {
|
||||
items = items.filter(function (it) {
|
||||
var assetId = it.Values.AssetId;
|
||||
return grid_dtsm.innerSource.filter(function (st) { return st.Values.AssetId === assetId; }).length === 0;
|
||||
var assetId = it.AssetId;
|
||||
return grid_dtsm.source.filter(function (st) { return st.AssetId === assetId; }).length === 0;
|
||||
});
|
||||
grid_dtsm.setData(grid_dtsm.innerSource.concat(items));
|
||||
grid_dtsm.setData(grid_dtsm.source.concat(items));
|
||||
} else {
|
||||
showAlert(r, GetTextByKey("P_JS_ASSETASSIGNMENT", "Asset Assignment"));
|
||||
}
|
||||
@ -1743,18 +1705,16 @@
|
||||
dialogAssets.onOK = function (source) {
|
||||
var items = [];
|
||||
for (var i = 0; i < source.length; i++) {
|
||||
var it = source[i].Values;
|
||||
var it = source[i];
|
||||
if (it.Selected) {
|
||||
items.push({
|
||||
Values: {
|
||||
AssetId: it.Id,
|
||||
VIN: it.VIN,
|
||||
Name: it.Name,
|
||||
MakeName: it.MakeName,
|
||||
ModelName: it.ModelName,
|
||||
TypeName: it.TypeName,
|
||||
OnSite: false
|
||||
}
|
||||
AssetId: it.Id,
|
||||
VIN: it.VIN,
|
||||
Name: it.Name,
|
||||
MakeName: it.MakeName,
|
||||
ModelName: it.ModelName,
|
||||
TypeName: it.TypeName,
|
||||
OnSite: false
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1762,6 +1722,7 @@
|
||||
$('#dialogmask').hide();
|
||||
};
|
||||
dialogAssets.showSelector(2, true);
|
||||
//dialogAssets.dialog.css("z-index", 200);
|
||||
}
|
||||
|
||||
function OnMachineDeleteSingle(item) {
|
||||
@ -1777,53 +1738,33 @@
|
||||
if (r !== 'OK') {
|
||||
showAlert(r, alerttitle);
|
||||
} else {
|
||||
for (var i = 0; i < grid_dtsm.innerSource.length; i++) {
|
||||
var s = grid_dtsm.innerSource[i].Values;
|
||||
if (s.AssetId === item.AssetId) {
|
||||
grid_dtsm.innerSource.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (grid_dtsm.source != null) {
|
||||
for (var j = 0; j < grid_dtsm.source.length; j++) {
|
||||
if (item.AssetId === grid_dtsm.source[j].Values.AssetId) {
|
||||
grid_dtsm.source.splice(j, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
grid_dtsm.reset();
|
||||
grid_dtsm.removeItem(grid_dtsm.selectedIndex);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function OnSiteChanging(item, input) {
|
||||
var input_chk = $(input).closest('td').find('input');
|
||||
var checked = !$(input_chk).prop('checked');
|
||||
if (navigator.userAgent.toUpperCase().indexOf("FIREFOX") >= 0)
|
||||
checked = !checked;
|
||||
var text = GetTextByKey("P_JS_ONSITETIPS", "You have manually assigned a jobsite. This action will disable geofence alerts and jobsite auto-assignment. Do you want to proceed? ");
|
||||
if (!checked)
|
||||
text = GetTextByKey("P_JS_ONSITETIPS1", "Are you sure you want to change the on-site of the asset:{0}?").replace('{0}', item.Name);
|
||||
|
||||
showConfirm1(text, GetTextByKey("P_JS_ONSITECHANGE", "On Site Change"), function () {
|
||||
$(input_chk).prop('checked', !$(input_chk).prop('checked')).change();
|
||||
});
|
||||
}
|
||||
|
||||
function OnSiteChanged() {
|
||||
var params = [
|
||||
'', jobsiteid,
|
||||
this.AssetId,
|
||||
this.OnSite ? '1' : '0'
|
||||
];
|
||||
$('#dialogmask').show();
|
||||
_network.jobsitequery('ChangeAssetOnSiteState', params.join(String.fromCharCode(170)), function (r) {
|
||||
$("#dialogmask").hide();
|
||||
if (r !== 'OK') {
|
||||
showAlert(r, GetTextByKey("P_JS_ASSETASSIGNMENT", "Asset Assignment"));
|
||||
}
|
||||
var item = this;
|
||||
var text = item.OnSite ?
|
||||
GetTextByKey("P_JS_ONSITETIPS", "You have manually assigned a jobsite. This action will disable geofence alerts and jobsite auto-assignment. Do you want to proceed? ") :
|
||||
GetTextByKey("P_JS_ONSITETIPS1", "Are you sure you want to change the on-site of the asset:{0}?").replace('{0}', item.Name);
|
||||
showConfirm1(text, GetTextByKey("P_JS_ONSITECHANGE", "On Site Change"), function () {
|
||||
var params = [
|
||||
'', jobsiteid,
|
||||
item.AssetId,
|
||||
item.OnSite ? '1' : '0'
|
||||
];
|
||||
$('#dialogmask').show();
|
||||
_network.jobsitequery('ChangeAssetOnSiteState', params.join(String.fromCharCode(170)), function (r) {
|
||||
$("#dialogmask").hide();
|
||||
if (r !== 'OK') {
|
||||
showAlert(r, GetTextByKey("P_JS_ASSETASSIGNMENT", "Asset Assignment"));
|
||||
}
|
||||
});
|
||||
}, function () {
|
||||
item.OnSite = !item.OnSite;
|
||||
grid_dtsm.refresh();
|
||||
});
|
||||
}
|
||||
|
||||
@ -1879,8 +1820,7 @@
|
||||
var rows = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dtsm.setData(rows);
|
||||
@ -1888,12 +1828,7 @@
|
||||
|
||||
var grid_dtsm;
|
||||
function InitGridSelectedMachines() {
|
||||
grid_dtsm = new GridView('#selectedmachinelist');
|
||||
grid_dtsm.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dtsm = createGridView('#selectedmachinelist');
|
||||
var list_columns = [
|
||||
{ name: 'OnSite', caption: GetTextByKey("P_JS_ONSITE", "On Site"), valueIndex: 'OnSite', type: 3, css: { 'width': 70, 'text-align': 'center' } },
|
||||
{ name: 'DisplayName', caption: GetTextByKey("P_JS_ASSETNAME", "Asset Name"), valueIndex: 'Name', css: { 'width': 170, 'text-align': 'left' } },
|
||||
@ -1922,10 +1857,6 @@
|
||||
}
|
||||
if (col.key === 'OnSite') {
|
||||
col.events = {
|
||||
onclick: function (e) {
|
||||
OnSiteChanging(this, e.target);
|
||||
return false;
|
||||
},
|
||||
onchange: OnSiteChanged
|
||||
};
|
||||
}
|
||||
@ -1936,26 +1867,19 @@
|
||||
width: 30,
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
isurl: true,
|
||||
text: '\uf00d',
|
||||
resizable: false,
|
||||
type: GridView.ColumnTypes.Icon,
|
||||
text: 'times',
|
||||
events: {
|
||||
onclick: function () {
|
||||
OnMachineDeleteSingle(this);
|
||||
}
|
||||
},
|
||||
classFilter: function (e) {
|
||||
return "icon-col";
|
||||
},
|
||||
attrs: { 'title': 'Delete' }
|
||||
});
|
||||
grid_dtsm.canMultiSelect = true;
|
||||
grid_dtsm.multiSelect = true;
|
||||
grid_dtsm.columns = columns;
|
||||
grid_dtsm.init();
|
||||
grid_dtsm.selectedrowchanged = function (rowindex) {
|
||||
var rowdata = grid_dtsm.source[rowindex];
|
||||
if (rowdata) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function openUseAdderss() {
|
||||
@ -1969,7 +1893,7 @@
|
||||
}).showDialogfixed();
|
||||
$('#dialog_address_use').val($('#dialog_deliveryaddress1').val());
|
||||
$('#dialog_city_use').val($('#dialog_city').val());
|
||||
editableSelectState_use.text(editableSelectState.text());
|
||||
$('#dialog_state_use').dropdownVal($('#dialog_state').dropdownVal());
|
||||
$('#dialog_zip_use').val($('#dialog_zip').val());
|
||||
}
|
||||
|
||||
@ -1980,7 +1904,7 @@
|
||||
return;
|
||||
}
|
||||
var city = $('#dialog_city_use').val();
|
||||
var state = editableSelectState_use.text();
|
||||
var state = $('#dialog_state_use').dropdownVal();
|
||||
var zip = $('#dialog_zip_use').val();
|
||||
|
||||
$('#dialog_useaddress .maskbg').show();
|
||||
@ -2087,7 +2011,7 @@
|
||||
<tr>
|
||||
<td class="label" data-lgid="P_JS_FOREMAN_COLON">Foreman:</td>
|
||||
<td>
|
||||
<div id="dialog_foreman" style="width: 322px; height: 22px;" tabindex="1"></div>
|
||||
<div id="dialog_foreman" style="width: 324px; position: relative;" class="dropdown" tabindex="1"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -2128,7 +2052,7 @@
|
||||
<tr>
|
||||
<td class="label" data-lgid="P_JS_STATE_COLON">State:</td>
|
||||
<td>
|
||||
<div id="dialog_state" style="width: 322px; height: 22px;" tabindex="1"></div>
|
||||
<div id="dialog_state" style="width: 324px; position: relative;" class="dropdown" tabindex="1"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -2218,11 +2142,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mask_bg" style="display: none;">
|
||||
<div class="loading c-spin"></div>
|
||||
</div>
|
||||
<div class="dialog" id="dialog_managemahchine" style="display: none;">
|
||||
<div class="dialog" id="dialog_managemahchine" style="display: none; ">
|
||||
<div class="dialog-title"><span id="spTitle" class="title" data-lgid="P_JS_MANAGEASSETS"></span><em class="dialog-close"></em></div>
|
||||
<div class="machine_filter" style="display: none">
|
||||
<span style="margin-left: 10px;" data-lgid="P_JS_TYPE">Type: </span>
|
||||
@ -2268,7 +2191,7 @@
|
||||
<tr>
|
||||
<td class="label" style="width: 100px; vertical-align: middle;" data-lgid="P_JS_STATE_COLON">State:</td>
|
||||
<td>
|
||||
<div id="dialog_state_use" style="width: 322px; height: 22px;" tabindex="1"></div>
|
||||
<div id="dialog_state_use" style="width: 322px;" class="dropdown" tabindex="1"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -7,40 +7,6 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.edit-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.edit-content table td.label {
|
||||
width: 200px;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.edit-content table td input,
|
||||
.edit-content table td textarea {
|
||||
border: 1px solid #a9a9a9;
|
||||
width: 320px;
|
||||
height: 18px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.edit-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
.edit-content table td textarea {
|
||||
height: 150px;
|
||||
resize: none;
|
||||
width: 600px;
|
||||
/*max-width: 200px;*/
|
||||
}
|
||||
|
||||
.a {
|
||||
text-decoration: none;
|
||||
color: #2140fb;
|
||||
@ -73,15 +39,6 @@
|
||||
margin-left: 16px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.div_filter .dropdown {
|
||||
width: 322px;
|
||||
margin: 2px 0 0 0px;
|
||||
}
|
||||
|
||||
.div_panel {
|
||||
min-width: 322px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="<%=GetFileUrlWithVersion("../js/controls.js")%>" type="text/javascript"></script>
|
||||
@ -89,8 +46,6 @@
|
||||
var IsDealer = <%=IsDealer ?"true":"false"%>;
|
||||
var contractorid;
|
||||
var machinetypes;
|
||||
var editmultiselect_type;
|
||||
var assettypeparam;
|
||||
|
||||
jobsitelimitquery = function (method, param, callback, error, nolog) {
|
||||
_network.request("JobSite/AddJobsiteLimit.aspx", -1, method, param, callback, error || function (e) {
|
||||
@ -123,8 +78,7 @@
|
||||
$('#dialog_endtimeminute').val('00');
|
||||
$('#dialog_mintrucks').val('');
|
||||
$('#dialog_maxtrucks').val('');
|
||||
if (editmultiselect_type)
|
||||
editmultiselect_type.setValues([]);
|
||||
$("#dialog_assettype").dropdownVals([]);
|
||||
$('#dialog_notes').val('');
|
||||
}
|
||||
|
||||
@ -140,9 +94,9 @@
|
||||
$('#dialog_mintrucks').val(jobsitelimit.MinTrucks);
|
||||
$('#dialog_maxtrucks').val(jobsitelimit.MaxTrucks);
|
||||
var types = [];
|
||||
types = jobsitelimit.AssetTypes.split(',');
|
||||
if (assettypeparam)
|
||||
editmultiselect_type.setValues(types);
|
||||
if (jobsitelimit.AssetTypes)
|
||||
types = jobsitelimit.AssetTypes.split(',');
|
||||
$("#dialog_assettype").dropdownVals(types);
|
||||
$('#dialog_notes').val(jobsitelimit.Notes);
|
||||
}
|
||||
|
||||
@ -152,9 +106,7 @@
|
||||
var start_minute = $('#dialog_starttimeminute').val();
|
||||
var end_hour = $('#dialog_endtimehour').val();
|
||||
var end_minute = $('#dialog_endtimeminute').val();
|
||||
var typeary = [];
|
||||
if (assettypeparam)
|
||||
typeary = assettypeparam.selectedvalue;
|
||||
var typeary = $("#dialog_assettype").dropdownVals();
|
||||
var assettypes = typeary.join(',');
|
||||
var item = {
|
||||
'JobSiteID': $('#dialog_jobsite').val(),
|
||||
@ -204,7 +156,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
showloading(false);
|
||||
showloading(false);
|
||||
var param = JSON.stringify(item);
|
||||
param = htmlencode(param);
|
||||
jobsitelimitquery("SaveJobsiteLimit", contractorid + String.fromCharCode(170) + param, function (data) {
|
||||
@ -247,13 +199,7 @@
|
||||
showAlert(data, GetTextByKey("P_M3_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
assettypeparam = {
|
||||
items: data,
|
||||
selectedvalue: [],
|
||||
allowall: false
|
||||
};
|
||||
editmultiselect_type = editmultiselect(assettypeparam);
|
||||
$('#dialog_assettype').append(editmultiselect_type);
|
||||
$("#dialog_assettype").dropdownSource(data);
|
||||
}, function (err) {
|
||||
});
|
||||
}
|
||||
@ -309,10 +255,19 @@
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#dialog_assettype").css('width', 324).dropdown([], {
|
||||
search: true,
|
||||
multiselect: true,
|
||||
allowselectall: false,
|
||||
textKey: 'Value',
|
||||
valueKey: 'Key'
|
||||
});
|
||||
|
||||
GetMachineTypes();
|
||||
GetActiveJobsites();
|
||||
init();
|
||||
initTime();
|
||||
|
||||
function resizeContent() {
|
||||
$('#divcontent').css('height', $(window).height() - $('#divcontent').offset().top - 4);
|
||||
}
|
||||
@ -324,7 +279,9 @@
|
||||
</script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
||||
<div id="mask_bg" style="display: none;"><div class="loading c-spin"></div></div>
|
||||
<div id="mask_bg" style="display: none;">
|
||||
<div class="loading c-spin"></div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="function_title">
|
||||
<span class="sbutton iconsave" onclick="OnSave(0);" data-lgid="P_M3_SAVE">Save</span>
|
||||
@ -342,7 +299,7 @@
|
||||
<tr>
|
||||
<td class="label" data-lgid="P_M3_JOBSITE_COLON">JobSite:</td>
|
||||
<td>
|
||||
<select id="dialog_jobsite" tabindex="1" style="width: 322px;"></select></td>
|
||||
<select id="dialog_jobsite" tabindex="1" style="width: 322px; height: 22px;"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"></td>
|
||||
|
@ -7,60 +7,11 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.edit-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.edit-content table td.label {
|
||||
width: 200px;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.edit-content table td input,
|
||||
.edit-content table td textarea {
|
||||
border: 1px solid #a9a9a9;
|
||||
width: 320px;
|
||||
height: 18px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.edit-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.edit-content table td textarea {
|
||||
height: 100px;
|
||||
resize: none;
|
||||
/*max-width: 200px;*/
|
||||
}
|
||||
|
||||
.a {
|
||||
text-decoration: none;
|
||||
color: #2140fb;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
margin: 20px 40px 5px 0px;
|
||||
font-size: 16px;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.subtitle span {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.subtitle hr {
|
||||
background-color: #d8d8d8;
|
||||
border: none;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
|
||||
.machinetd {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
@ -128,19 +79,6 @@
|
||||
background-color: #EFEFEF;
|
||||
}
|
||||
|
||||
.div_filter {
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
.div_filter .dropdown {
|
||||
width: 200px;
|
||||
margin: 2px 0 0 0px;
|
||||
}
|
||||
|
||||
.div_panel {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
#machine-name {
|
||||
margin: 10px 10px 6px;
|
||||
/*color: gray;*/
|
||||
@ -243,12 +181,10 @@
|
||||
<link href="<%=GetFileUrlWithVersion("../fic/css/datepicker.min.css")%>" rel="stylesheet" />
|
||||
<script src="<%=GetFileUrlWithVersion("../js/jquery.datetimepicker.full.js")%>"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../fic/js/datepicker.min.js")%>"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/editableselect.js")%>"></script>
|
||||
<%--<link rel="stylesheet" type="text/css" href="css/default.css" />--%>
|
||||
<link href="<%=GetFileUrlWithVersion("../css/spectrum.css")%>" rel="stylesheet" type="text/css" />
|
||||
<script src="../js/spectrum.js?v=1" type="text/javascript"></script>
|
||||
<script src="../Maintenance/js/inputdatactr.js"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/editmultiselect.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("js/jobsiterequirement.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>
|
||||
@ -555,10 +491,8 @@
|
||||
$('#begindatetxt').val('');
|
||||
$('#enddatetxt').val('');
|
||||
$('#pointofcontacttxt').val('');
|
||||
|
||||
if (assettypeipt)
|
||||
assettypeipt.reset();
|
||||
jobsiterequirementCtrl.setData([]);
|
||||
$("#div_assettypes").dropdownVals([]);
|
||||
grid_jsrequirementdt.setData([]);
|
||||
allRequirements = [];
|
||||
}
|
||||
|
||||
@ -601,40 +535,54 @@
|
||||
}
|
||||
|
||||
var assettypes;
|
||||
var assettypeparam;
|
||||
var assettypeipt;
|
||||
function getAssetTypes() {
|
||||
if (assettypes)
|
||||
return;
|
||||
|
||||
$('#div_assettypes').empty();
|
||||
jobsitequery('GetAssetTypes', '', function (data) {
|
||||
if (typeof (data) === "string") {
|
||||
showAlert(data, GetTextByKey("P_AM_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
assettypes = data;
|
||||
assettypeparam = {
|
||||
items: data,
|
||||
selectedvalue: [],
|
||||
allowall: false,
|
||||
allowsearch: true,
|
||||
width: 280
|
||||
};
|
||||
assettypeipt = editmultiselect(assettypeparam);
|
||||
$('#div_assettypes').append(assettypeipt);
|
||||
var ats = [...assettypes];
|
||||
ats = ats.filter(t => t.Tag1 == "1");
|
||||
$("#div_assettypes").dropdownSource(ats);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var editableSelectAssignAsset;
|
||||
$(function () {
|
||||
jobsiterequirementCtrl = new $jobsiterequirementCtrl();
|
||||
jobsiterequirementCtrl.Init($("#requirementlist"), false);
|
||||
InitJobsiteschedulerGridData();
|
||||
InitAssetGridData();
|
||||
InitEmailGridData();
|
||||
editableSelectAssignAsset = new $editableselect($("#dialog_assignasset"));
|
||||
editableSelectAssignAsset.setEnable(false);
|
||||
InitAttachedAssetGridData();
|
||||
|
||||
$('#dialog_assignasset').dropdown([], {
|
||||
search: true,
|
||||
valueKey: 'Id',
|
||||
textKey: 'DisplayName'
|
||||
});
|
||||
$('#dialog_assignasset').dropdownDisabled(false);
|
||||
|
||||
$("#div_assettypes").css('width', 120).dropdown([], {
|
||||
search: true,
|
||||
multiselect: true,
|
||||
allowselectall: false,
|
||||
textKey: 'Value',
|
||||
valueKey: 'Key'
|
||||
});
|
||||
|
||||
$("#chkmanagetypeonly").on('change', function () {
|
||||
var selectedtypes = $("#div_assettypes").dropdownVals() || [];
|
||||
var ats = [...assettypes];
|
||||
if ($(this).prop('checked')) {
|
||||
ats = ats.filter(t => t.Tag1 == "1");
|
||||
}
|
||||
$("#div_assettypes").dropdownSource(ats);
|
||||
$("#div_assettypes").dropdownVals(selectedtypes);
|
||||
});
|
||||
|
||||
getAssetTypes();
|
||||
if (!alljobsites)
|
||||
getJobsites();
|
||||
@ -694,6 +642,10 @@
|
||||
showmaskbg(false);
|
||||
});
|
||||
|
||||
$('#dialog_attachedassets').dialog(function () {
|
||||
$('#dialogmask').hide();
|
||||
});
|
||||
|
||||
$('#sendmail_othertextaddress').focus(function (e) {
|
||||
var left = $('#dialog_sendmail').offset().left + $('#dialog_sendmail').width() + 2;
|
||||
var top = $('#dialog_sendmail').offset().top + $("#dialog_sendmail").height() - $("#div_tooltip").height() - 9;
|
||||
@ -714,13 +666,13 @@
|
||||
<%} %>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="edit-content" style="margin: 10px;">
|
||||
<div style="margin: 10px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="search_bar">
|
||||
<span data-lgid="P_JS_JOBSITE_COLON">Jobsite:</span>
|
||||
<select id="dialog_jobsite" style="width: 150px;" tabindex="1">
|
||||
<select id="dialog_jobsite" style="width: 150px; margin-left: 5px;" tabindex="1">
|
||||
</select>
|
||||
<span data-lgid="P_JS_BEGINDATE_COLON" style="margin-left: 10px;">Begin Date:</span>
|
||||
<div>
|
||||
@ -731,8 +683,10 @@
|
||||
<input type="text" id="enddatetxt" autocomplete="off" style="width: 100px; margin-left: 5px;" />
|
||||
</div>
|
||||
<span data-lgid="P_JS_ASSETTYPE_COLON" style="margin-left: 10px;">Asset Type:</span>
|
||||
<div id="div_assettypes" style="margin-left: 5px;"></div>
|
||||
<span data-lgid="P_JS_POINTOFCONTACT_COLON" style="margin-left: 10px;">Point of Contact:</span>
|
||||
<div id="div_assettypes" style="margin-left: -1px;"></div>
|
||||
<input type="checkbox" id="chkmanagetypeonly" style="margin-left: 5px;" checked="checked" />
|
||||
<label for="chkmanagetypeonly">Managed Types Only</label>
|
||||
<span data-lgid="P_JS_POINTOFCONTACT_COLON" style="margin-left: 20px!important;">Point of Contact:</span>
|
||||
<div>
|
||||
<input type="text" id="pointofcontacttxt" maxlength="100" autocomplete="off" style="width: 100px; margin-left: 5px;" />
|
||||
</div>
|
||||
@ -750,7 +704,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mask_bg" style="display: none;"><div class="loading c-spin"></div></div>
|
||||
<div id="mask_bg" style="display: none;">
|
||||
<div class="loading c-spin"></div>
|
||||
</div>
|
||||
<div class="dialog" id="dialog_managemahchine" style="display: none;">
|
||||
<div class="dialog-title"><span id="spTitle" class="title" data-lgid="P_JS_MANAGEASSETS"></span><em class="dialog-close"></em></div>
|
||||
<div class="requireinfo">
|
||||
@ -783,10 +739,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dialog" id="dialog_sendmail" style="display: none; width: 320px;">
|
||||
<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;">
|
||||
<table>
|
||||
<div class="dialog-content" >
|
||||
<table style="line-height:24px;">
|
||||
<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>
|
||||
@ -802,22 +758,20 @@
|
||||
<td><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>
|
||||
<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 data-lgid="P_MV_DESCRIPTION">Description</td>
|
||||
<td>
|
||||
<textarea id="sendmail_desc" style="width: 350px; height: 80px; resize: none;"></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@ -837,7 +791,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="dialog_assignasset" style="width: 320px; height: 22px;"></div>
|
||||
<div id="dialog_assignasset" style="width: 320px;" class="dropdown"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -848,4 +802,21 @@
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dialog" id="dialog_attachedassets" style="display: none;">
|
||||
<div class="dialog-title"><span class="title" data-lgid="P_JS_ATTACHEDASSETS">Attached Assets</span><em class="dialog-close"></em></div>
|
||||
<div class="dialog-content">
|
||||
<div style="text-align: center; line-height: 20px; margin-bottom: 10px;">
|
||||
<span id="span_attachedasset_tips1"></span><br />
|
||||
<span id="span_attachedasset_tips2"></span>
|
||||
</div>
|
||||
<div id="dialog_attachedassetlist" style="height: 300px; width: 100%;"></div>
|
||||
</div>
|
||||
<div class="dialog-func">
|
||||
<input type="button" value="Close" data-lgid="P_JS_CANCEL" class="dialog-close" tabindex="2" />
|
||||
<input type="button" id="btn_addattasset" onclick="OnAddAttachedAssets();" data-lgid="P_JS_OK" value="OK" tabindex="1" />
|
||||
<input type="button" id="btn_removeattasset" onclick="OnRemoveAttachedAssets();" style="display:none;" data-lgid="P_JS_REMOVE" value="Remove" tabindex="1" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
@ -7,38 +7,6 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.edit-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.edit-content table td.label {
|
||||
width: 200px;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.edit-content table td input,
|
||||
.edit-content table td textarea {
|
||||
border: 1px solid #a9a9a9;
|
||||
width: 320px;
|
||||
height: 18px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.edit-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.edit-content table td textarea {
|
||||
height: 100px;
|
||||
resize: none;
|
||||
/*max-width: 200px;*/
|
||||
}
|
||||
|
||||
.a {
|
||||
text-decoration: none;
|
||||
color: #2140fb;
|
||||
@ -128,15 +96,6 @@
|
||||
background-color: #EFEFEF;
|
||||
}
|
||||
|
||||
.div_filter {
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
.div_filter .dropdown {
|
||||
width: 200px;
|
||||
margin: 2px 0 0 0px;
|
||||
}
|
||||
|
||||
.div_panel {
|
||||
min-width: 200px;
|
||||
}
|
||||
@ -239,7 +198,6 @@
|
||||
<script src="<%=GetFileUrlWithVersion("../js/components/datagrid.js")%>" type="text/javascript"></script>
|
||||
<link href="<%=GetFileUrlWithVersion("../css/jquery.datetimepicker.css")%>" rel="stylesheet" />
|
||||
<script src="<%=GetFileUrlWithVersion("../js/jquery.datetimepicker.full.js")%>"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/editableselect.js")%>"></script>
|
||||
<%--<link rel="stylesheet" type="text/css" href="css/default.css" />--%>
|
||||
<link href="<%=GetFileUrlWithVersion("../css/spectrum.css")%>" rel="stylesheet" type="text/css" />
|
||||
<script src="../js/spectrum.js?v=1" type="text/javascript"></script>
|
||||
@ -299,7 +257,7 @@
|
||||
'PointOfContact': $('#dialog_pointofcontact').val(),
|
||||
};
|
||||
|
||||
var machine = editableSelectMachine.selecteditem();
|
||||
var machine = $('#dialog_machine').dropdownItem();
|
||||
if (machine == null) {
|
||||
showAlert(GetTextByKey("P_FR_ASSETNOTEMPTY", 'Asset cannot be empty.'), alerttitle);
|
||||
$('#dialog_machine').focus();
|
||||
@ -383,7 +341,7 @@
|
||||
}
|
||||
|
||||
function OnAdd() {
|
||||
editableSelectMachine.val('');
|
||||
$('#dialog_machine').dropdownVal('');
|
||||
setMachineInfo();
|
||||
$('#dialog_jobsite').val('');
|
||||
$('#dialog_begindate').val('');
|
||||
@ -401,8 +359,6 @@
|
||||
}
|
||||
else
|
||||
getJobsites();
|
||||
|
||||
editableSelectMachine.reload();
|
||||
}
|
||||
|
||||
function getJobsites() {
|
||||
@ -437,9 +393,7 @@
|
||||
jobsitequery("GetMachines", "", function (data) {
|
||||
if (data && data.length > 0) {
|
||||
machines = data;
|
||||
editableSelectMachine.datasource = machines;
|
||||
editableSelectMachine.valuepath = "Id"
|
||||
editableSelectMachine.displaypath = "DisplayName";
|
||||
$('#dialog_machine').dropdownSource(machines);
|
||||
}
|
||||
if (next)
|
||||
next();
|
||||
@ -447,9 +401,8 @@
|
||||
});
|
||||
}
|
||||
|
||||
var editableSelectMachine;
|
||||
function setMachineInfo() {
|
||||
var machine = editableSelectMachine.selecteditem();
|
||||
var machine = $('#dialog_machine').dropdownItem();
|
||||
if (machine) {
|
||||
$('#dialog_vin').text(machine.VIN);
|
||||
$('#dialog_make').text(machine.MakeName);
|
||||
@ -465,9 +418,11 @@
|
||||
}
|
||||
|
||||
$(function () {
|
||||
editableSelectMachine = new $editableselect($("#dialog_machine"));
|
||||
editableSelectMachine.tabIndex(1);
|
||||
editableSelectMachine.change(function () {
|
||||
$('#dialog_machine').dropdown([], {
|
||||
search: true,
|
||||
valueKey: 'Id',
|
||||
textKey: 'DisplayName'
|
||||
}).on('select', function (_e, item) {
|
||||
setMachineInfo();
|
||||
});
|
||||
|
||||
@ -522,7 +477,7 @@
|
||||
<tr>
|
||||
<td class="label" data-lgid="P_FR_ASSET_COLON">Asset:</td>
|
||||
<td colspan="4">
|
||||
<div id="dialog_machine" style="width: 322px; height: 22px;"></div>
|
||||
<div id="dialog_machine" style="width: 322px;" class="dropdown"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -54,30 +54,7 @@
|
||||
.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 {
|
||||
@ -94,12 +71,6 @@
|
||||
margin: 3px 4px 0 4px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-family: CalciteWebCoreIcons;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
|
||||
.ybutton {
|
||||
width: 80px;
|
||||
line-height: normal;
|
||||
@ -157,10 +128,6 @@
|
||||
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>
|
||||
@ -203,7 +170,7 @@
|
||||
else if (j === "EndDate")
|
||||
r[j] = { DisplayValue: r["EndDateStr"], Value: r[j] };
|
||||
else if (j === "Completed")
|
||||
r[j] = { DisplayValue: r["Completed"] ? "Yes" : "No", Value: r[j] };
|
||||
r[j] = { DisplayValue: r["Completed"] ? GetTextByKey("P_UTILITY_YES", "Yes") : GetTextByKey("P_UTILITY_NO", "No"), Value: r[j] };
|
||||
else if (j === "CompletedTime")
|
||||
r[j] = { DisplayValue: r["CompletedTimeStr"], Value: r[j] };
|
||||
else if (j === "AddedOn")
|
||||
@ -211,8 +178,7 @@
|
||||
else if (j === "DeletedOn")
|
||||
r[j] = { DisplayValue: r["DeletedOnStr"], Value: r[j] };
|
||||
}
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dt.setData(rows);
|
||||
@ -221,12 +187,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: 'BeginDate', caption: GetTextByKey("P_JS_MOVEDATE", "Move Date"), valueIndex: 'BeginDate', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'AssetName', caption: GetTextByKey("P_JS_ASSETNAME", "Asset Name"), valueIndex: 'AssetName', css: { 'width': 200, 'text-align': 'left' } },
|
||||
@ -269,12 +230,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) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
|
@ -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>
|
||||
|
@ -38,14 +38,14 @@ public partial class DispatchRequests : JobSiteRequirementsBasePage
|
||||
}
|
||||
}
|
||||
DateTime userlocaldate = SystemParams.ConvertToUserTimeFromUtc(GetCurrentLoginSession().User, DateTime.UtcNow);
|
||||
LatestStartDate = userlocaldate.ToShortDateString();
|
||||
LatestStartDate = userlocaldate.ToString("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
protected override int FeatureID
|
||||
{
|
||||
get
|
||||
{
|
||||
return Foresight.Fleet.Services.User.Feature.JOB_SITES_DISPATCHREQUESTS;
|
||||
return Feature.JOB_SITES_DISPATCHREQUESTS;
|
||||
}
|
||||
}
|
||||
}
|
@ -2,195 +2,14 @@
|
||||
|
||||
<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-content table td input,
|
||||
.dialog-content table td textarea {
|
||||
border: 1px solid #a9a9a9;
|
||||
width: 200px;
|
||||
height: 18px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
#dialog_machines .dialog-content table td input,
|
||||
#dialog_layouts .dialog-content table td input {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.dialog-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dialog-content table td textarea {
|
||||
height: 100px;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
#dialog_user_randompass {
|
||||
width: auto;
|
||||
height: 16px;
|
||||
margin: 3px 4px 0 4px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-family: CalciteWebCoreIcons;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.machine_filter {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.machine_filter select {
|
||||
height: 23px;
|
||||
min-width: 100px;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
<link href="<%=GetFileUrlWithVersion("../css/panel.css")%>" rel="stylesheet" />
|
||||
<link href="<%=GetFileUrlWithVersion("../css/spectrum.css")%>" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/editmultiselect.css" />
|
||||
<script type="text/javascript" src="<%=GetFileUrlWithVersion("../js/vue.min.js")%>"></script>
|
||||
<script>Vue.config.productionTip = false; Vue.config.silent = true;</script>
|
||||
<script type="text/javascript" src="<%=GetFileUrlWithVersion("../js/components/datagrid.js")%>"></script>
|
||||
<script src="../js/spectrum.js?v=1" type="text/javascript"></script>
|
||||
<script src="../js/jquery.datetimepicker.full.js"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/assetselector.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/editmultiselect.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/gridlayout.js")%>" type="text/javascript"></script>
|
||||
<script>
|
||||
_network.jobsitequery = function (method, param, callback, error, nolog) {
|
||||
@ -199,10 +18,9 @@
|
||||
|
||||
var gridLayoutID = "Jobsites";
|
||||
var _allJobSites;
|
||||
var jobsitetypeparam;
|
||||
var IsAdmin =<%=IsAdmin ?"true":"false"%>;
|
||||
|
||||
/***************************Jobsites***************************/
|
||||
/***************************Jobsites***************************/
|
||||
|
||||
function OnDelete(jobsite) {
|
||||
if (!jobsite) {
|
||||
@ -263,7 +81,7 @@
|
||||
|
||||
var jobsiteid;
|
||||
function OnEdit() {
|
||||
var jobsite = grid_dt.source[grid_dt.selectedIndex].Values;
|
||||
var jobsite = grid_dt.source[grid_dt.selectedIndex];
|
||||
if (!jobsite) {
|
||||
jobsiteid = undefined;
|
||||
return;
|
||||
@ -285,9 +103,7 @@
|
||||
|
||||
var searchtxt = "";
|
||||
searchtxt = htmlencode($.trim($('#searchinputtxt').val()));
|
||||
var jobsitetypes = [];
|
||||
if (jobsitetypeparam)
|
||||
jobsitetypes = jobsitetypeparam.selectedvalue;
|
||||
var jobsitetypes = $("#div_jobsitetype").dropdownVals();
|
||||
var active = $('#chk_activesitesonly').prop('checked');
|
||||
|
||||
_network.jobsitequery("GetJobSites", JSON.stringify(jobsitetypes) + String.fromCharCode(170) + searchtxt + String.fromCharCode(170) + active, function (data) {
|
||||
@ -303,6 +119,13 @@
|
||||
var rows = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
var radiusstr = "";
|
||||
if (r.Radius > 0) {
|
||||
if (r.Radius_UOM === "Mile")
|
||||
radiusstr = r.Radius + " " + GetTextByKey('P_JS_MILE', 'Mile') + '(s)';
|
||||
else if (r.Radius_UOM === "Kilometre")
|
||||
radiusstr = r.Radius + " " + GetTextByKey('P_JS_KILOMETER', 'Kilometer') + '(s)';
|
||||
}
|
||||
for (var j in r) {
|
||||
//if (j === "Radius_UOM")
|
||||
// r[j] = { DisplayValue: r["Radius"] > 0 ? r["Radius_UOM"] : '', Value: r["Radius"] > 0 ? r[j] : '' };
|
||||
@ -312,9 +135,10 @@
|
||||
r[j] = { DisplayValue: r["EndDateStr"], Value: r[j] };
|
||||
else if (j === "ProjectedEndDate")
|
||||
r[j] = { DisplayValue: r["ProjectedEndDateStr"], Value: r[j] };
|
||||
else if (j === "RadiusStr")
|
||||
r[j] = { DisplayValue: radiusstr, Value: r[j] };
|
||||
}
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dt.setData(rows);
|
||||
@ -323,36 +147,31 @@
|
||||
|
||||
var grid_dt;
|
||||
function InitGridData() {
|
||||
grid_dt = new GridView('#jobsitelist');
|
||||
grid_dt.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dt = createGridView('#jobsitelist');
|
||||
var list_columns = [
|
||||
{ name: 'Name', caption: GetTextByKey("P_JS_NAME", "Name"), valueIndex: 'Name', css: { 'width': 200, 'text-align': 'left' } },
|
||||
{ name: 'Region', caption: GetTextByKey("P_JS_REGION", "Region"), valueIndex: 'Region', css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'Number', caption: GetTextByKey("P_JS_NUMBER", "Number"), valueIndex: 'Number', css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'Code', caption: GetTextByKey("P_JS_CODE", "Code"), valueIndex: 'Code', css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'Name', caption: GetTextByKey("P_JS_NAME", "Name"), valueIndex: 'Name', allowFilter: true, css: { 'width': 200, 'text-align': 'left' } },
|
||||
{ name: 'Region', caption: GetTextByKey("P_JS_REGION", "Region"), valueIndex: 'Region', allowFilter: true, css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'Number', caption: GetTextByKey("P_JS_NUMBER", "Number"), valueIndex: 'Number', allowFilter: true, css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'Code', caption: GetTextByKey("P_JS_CODE", "Code"), valueIndex: 'Code', allowFilter: true, css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'Types', caption: GetTextByKey("P_JS_TYPES", "Types"), valueIndex: 'Types', allowFilter: true, css: { 'width': 160, 'text-align': 'left' } },
|
||||
{ name: 'Latitude', caption: GetTextByKey("P_JS_LATITUDE", "Latitude"), valueIndex: 'Latitude', css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'Longitude', caption: GetTextByKey("P_JS_LONGITUDE", "Longitude"), valueIndex: 'Longitude', css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'ColorString', caption: GetTextByKey("P_JS_COLOR", "Color"), valueIndex: 'ColorString', css: { 'width': 60, 'text-align': 'center' } },
|
||||
{ name: 'RadiusStr', caption: GetTextByKey("P_JS_RADIUS", "RadiusStr"), valueIndex: 'RadiusStr', css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'BaseonAsset', caption: GetTextByKey("P_JS_BINDINGTOASSET", "Binding to Asset"), valueIndex: 'BaseonMachineName', css: { 'width': 200, 'text-align': 'left' } },
|
||||
{ name: 'Latitude', caption: GetTextByKey("P_JS_LATITUDE", "Latitude"), valueIndex: 'Latitude', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'Longitude', caption: GetTextByKey("P_JS_LONGITUDE", "Longitude"), valueIndex: 'Longitude', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'ColorString', caption: GetTextByKey("P_JS_COLOR", "Color"), valueIndex: 'ColorString', css: { 'width': 80, 'text-align': 'center' } },
|
||||
{ name: 'RadiusStr', caption: GetTextByKey("P_JS_RADIUS", "RadiusStr"), valueIndex: 'RadiusStr', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'BaseonAsset', caption: GetTextByKey("P_JS_BINDINGTOASSET", "Binding to Asset"), valueIndex: 'BaseonMachineName', allowFilter: true, css: { 'width': 200, 'text-align': 'left' } },
|
||||
//{ name: 'Radius', caption: GetTextByKey("P_JS_RADIUS", "Radius"), valueIndex: 'Radius', css: { 'width': 100, 'text-align': 'right' } },
|
||||
//{ name: 'Radius_UOM', caption: GetTextByKey("P_JS_RADIUSUOM", "Radius UOM"), valueIndex: 'Radius_UOM', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Foreman', caption: GetTextByKey("P_JS_FOREMAN", "Foreman"), valueIndex: 'Foreman', css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'Manager', caption: GetTextByKey("P_JS_MANAGER", "Manager"), valueIndex: 'Manager', visible: false, css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'Phone', caption: GetTextByKey("P_JS_PHONE", "Phone"), valueIndex: 'Phone', visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Email', caption: GetTextByKey("P_JS_EMAIL", "Email"), valueIndex: 'Email', visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Group', caption: GetTextByKey("P_JS_GROUP", "Group"), valueIndex: 'Group', visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Address1', caption: GetTextByKey("P_JS_DELIVERYADDRESS1", "Delivery Address 1"), valueIndex: 'Address1', visible: false, css: { 'width': 140, 'text-align': 'left' } },
|
||||
{ name: 'Address2', caption: GetTextByKey("P_JS_DELIVERYADDRESS2", "Delivery Address 2"), valueIndex: 'Address2', visible: false, css: { 'width': 140, 'text-align': 'left' } },
|
||||
{ name: 'City', caption: GetTextByKey("P_JS_CITY", "City"), valueIndex: 'City', visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'State', caption: GetTextByKey("P_JS_STATE", "State"), valueIndex: 'State', visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Zip', caption: GetTextByKey("P_JS_ZIP", "Zip"), valueIndex: 'Zip', visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'County', caption: GetTextByKey("P_JS_COUNTY", "County"), valueIndex: 'County', visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Foreman', caption: GetTextByKey("P_JS_FOREMAN", "Foreman"), valueIndex: 'Foreman', allowFilter: true, css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'Manager', caption: GetTextByKey("P_JS_MANAGER", "Manager"), valueIndex: 'Manager', allowFilter: true, visible: false, css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'Phone', caption: GetTextByKey("P_JS_PHONE", "Phone"), valueIndex: 'Phone', allowFilter: true, visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Email', caption: GetTextByKey("P_JS_EMAIL", "Email"), valueIndex: 'Email', allowFilter: true, visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Group', caption: GetTextByKey("P_JS_GROUP", "Group"), valueIndex: 'Group', allowFilter: true, visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Address1', caption: GetTextByKey("P_JS_DELIVERYADDRESS1", "Delivery Address 1"), allowFilter: true, valueIndex: 'Address1', visible: false, css: { 'width': 140, 'text-align': 'left' } },
|
||||
{ name: 'Address2', caption: GetTextByKey("P_JS_DELIVERYADDRESS2", "Delivery Address 2"), allowFilter: true, valueIndex: 'Address2', visible: false, css: { 'width': 140, 'text-align': 'left' } },
|
||||
{ name: 'City', caption: GetTextByKey("P_JS_CITY", "City"), valueIndex: 'City', allowFilter: true, visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'State', caption: GetTextByKey("P_JS_STATE", "State"), valueIndex: 'State', allowFilter: true, visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'Zip', caption: GetTextByKey("P_JS_ZIP", "Zip"), valueIndex: 'Zip', allowFilter: true, visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'County', caption: GetTextByKey("P_JS_COUNTY", "County"), valueIndex: 'County', allowFilter: true, visible: false, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'StartDate', caption: GetTextByKey("P_JS_STATDATE", "Start Date"), valueIndex: 'StartDate', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'ProjectedEndDate', caption: GetTextByKey("P_JS_PROJECTEDENDDATE", "Projected End Date"), valueIndex: 'ProjectedEndDate', css: { 'width': 130, 'text-align': 'left' } },
|
||||
{ name: 'EndDate', caption: GetTextByKey("P_JS_ENDDATE", "End Date"), valueIndex: 'EndDate', css: { 'width': 100, 'text-align': 'left' } },
|
||||
@ -377,68 +196,68 @@
|
||||
col.alwaysshow = list_columns[hd].alwaysshow;
|
||||
if (col.name === "Edit") {
|
||||
col.sortable = false;
|
||||
col.isurl = true;
|
||||
col.text = "\uf044";
|
||||
col.resizable = false;
|
||||
col.type = GridView.ColumnTypes.Icon;
|
||||
col.text = 'edit';
|
||||
col.events = {
|
||||
onclick: function () {
|
||||
OnEdit()
|
||||
}
|
||||
};
|
||||
col.classFilter = function (e) {
|
||||
return "icon-col";
|
||||
}
|
||||
col.attrs = { 'title': GetTextByKey("P_JS_EDIT", 'Edit') };
|
||||
}
|
||||
else 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') };
|
||||
}
|
||||
else if (col.name === "ManageAssets") {
|
||||
col.sortable = false;
|
||||
col.isurl = true;
|
||||
col.text = "\uf63c";
|
||||
col.resizable = false;
|
||||
col.type = GridView.ColumnTypes.Icon;
|
||||
col.text = 'truck-pickup';
|
||||
col.events = {
|
||||
onclick: function () {
|
||||
OnManageMachine(this);
|
||||
}
|
||||
};
|
||||
col.classFilter = function (e) {
|
||||
return "icon-col";
|
||||
};
|
||||
col.attrs = { 'title': GetTextByKey("P_JS_MANAGEASSETS", 'Manage Assets') };
|
||||
} else if (col.name === 'ColorString') {
|
||||
col.allowHtml = true;
|
||||
col.filter = function (item) {
|
||||
}
|
||||
else if (col.name === 'ColorString') {
|
||||
col.sortable = false;
|
||||
col.styleFilter = function (item) {
|
||||
var bg = 'rgb(' + item.Color.Red + ',' + item.Color.Green + ',' + item.Color.Blue + ')';
|
||||
var cb = '<div style="background:' + bg + ';width:16px;height:16px;"></div>';
|
||||
//return cb + item.ColorString;
|
||||
return cb;
|
||||
return { 'background-color': bg }
|
||||
};
|
||||
col.styleFilter = function () {
|
||||
return { display: 'block' };
|
||||
col.filter = function () { "" };
|
||||
}
|
||||
else if (col.name === 'RadiusStr') {
|
||||
col.sortFilter = function (a, b) {
|
||||
var ra = a.Radius;
|
||||
if (a.Radius_UOM == "Mile")
|
||||
ra = ra * 1.609344;
|
||||
var rb = b.Radius;
|
||||
if (b.Radius_UOM == "Mile")
|
||||
rb = rb * 1.609344;
|
||||
return ra > rb ? 1 : -1;
|
||||
};
|
||||
}
|
||||
columns.push(col);
|
||||
}
|
||||
grid_dt.canMultiSelect = false;
|
||||
//grid_dt.columns = columns;
|
||||
//grid_dt.init();
|
||||
grid_dt.rowdblclick = OnEdit;
|
||||
grid_dt.onRowDblClicked = OnEdit;
|
||||
|
||||
grid_dt.selectedrowchanged = function (rowindex) {
|
||||
grid_dt.onSelectedRowChanged = function (rowindex) {
|
||||
var rowdata = grid_dt.source[rowindex];
|
||||
if (rowdata) {
|
||||
jobsiteid = rowdata.Values.ID;
|
||||
jobsiteid = rowdata.ID;
|
||||
}
|
||||
}
|
||||
grid_dt.allcolumns = columns;
|
||||
@ -461,33 +280,31 @@
|
||||
dialogAssets.onOK = function (source) {
|
||||
var items = [];
|
||||
for (var i = 0; i < source.length; i++) {
|
||||
var it = source[i].Values;
|
||||
var it = source[i];
|
||||
if (it.Selected) {
|
||||
items.push({
|
||||
Values: {
|
||||
AssetId: it.Id,
|
||||
VIN: it.VIN,
|
||||
Name: it.Name,
|
||||
MakeName: it.MakeName,
|
||||
ModelName: it.ModelName,
|
||||
TypeName: it.TypeName,
|
||||
OnSite: false
|
||||
}
|
||||
AssetId: it.Id,
|
||||
VIN: it.VIN,
|
||||
Name: it.Name,
|
||||
MakeName: it.MakeName,
|
||||
ModelName: it.ModelName,
|
||||
TypeName: it.TypeName,
|
||||
OnSite: false
|
||||
});
|
||||
}
|
||||
}
|
||||
$("#dialogmask").hide();
|
||||
var params = [
|
||||
'', jobsiteid,
|
||||
JSON.stringify(items.map(function (f) { return f.Values.AssetId; }))
|
||||
JSON.stringify(items.map(function (f) { return f.AssetId; }))
|
||||
];
|
||||
_network.jobsitequery('AddAssetToJobSite', params.join(String.fromCharCode(170)), function (r) {
|
||||
if (r === 'OK') {
|
||||
items = items.filter(function (it) {
|
||||
var assetId = it.Values.AssetId;
|
||||
return grid_dtsm.innerSource.filter(function (st) { return st.Values.AssetId === assetId; }).length === 0;
|
||||
var assetId = it.AssetId;
|
||||
return grid_dtsm.source.filter(function (st) { return st.AssetId === assetId; }).length === 0;
|
||||
});
|
||||
grid_dtsm.setData(grid_dtsm.innerSource.concat(items));
|
||||
grid_dtsm.setData(grid_dtsm.source.concat(items));
|
||||
} else {
|
||||
showAlert(r, GetTextByKey("P_JS_ASSETASSIGNMENT", "Asset Assignment"));
|
||||
}
|
||||
@ -509,52 +326,33 @@
|
||||
if (r !== 'OK') {
|
||||
showAlert(r, alerttitle);
|
||||
} else {
|
||||
for (var i = 0; i < grid_dtsm.innerSource.length; i++) {
|
||||
var s = grid_dtsm.innerSource[i].Values;
|
||||
if (s.AssetId === item.AssetId) {
|
||||
grid_dtsm.innerSource.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (grid_dtsm.source != null) {
|
||||
for (var j = 0; j < grid_dtsm.source.length; j++) {
|
||||
if (item.AssetId === grid_dtsm.source[j].Values.AssetId) {
|
||||
grid_dtsm.source.splice(j, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
grid_dtsm.reset();
|
||||
grid_dtsm.removeItem(grid_dtsm.selectedIndex);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function OnSiteChanging(item, input) {
|
||||
var input_chk = $(input).closest('td').find('input');
|
||||
var checked = !$(input_chk).prop('checked');
|
||||
if (navigator.userAgent.toUpperCase().indexOf("FIREFOX") >= 0)
|
||||
checked = !checked;
|
||||
var text = GetTextByKey("P_JS_ONSITETIPS", "You have manually assigned a jobsite. This action will disable geofence alerts and jobsite auto-assignment. Do you want to proceed? ");
|
||||
if (!checked)
|
||||
text = GetTextByKey("P_JS_ONSITETIPS1", "Are you sure you want to change the on-site of the asset:{0}?").replace('{0}', item.Name);
|
||||
showConfirm(text, GetTextByKey("P_JS_ONSITECHANGE", "On Site Change"), function () {
|
||||
$(input_chk).prop('checked', !$(input_chk).prop('checked')).change();
|
||||
});
|
||||
}
|
||||
|
||||
function OnSiteChanged() {
|
||||
var params = [
|
||||
'', jobsiteid,
|
||||
this.AssetId,
|
||||
this.OnSite ? '1' : '0'
|
||||
];
|
||||
$('#dialogmask').show();
|
||||
_network.jobsitequery('ChangeAssetOnSiteState', params.join(String.fromCharCode(170)), function (r) {
|
||||
$("#dialogmask").hide();
|
||||
if (r !== 'OK') {
|
||||
showAlert(r, GetTextByKey("P_JS_ASSETASSIGNMENT", "Asset Assignment"));
|
||||
}
|
||||
var item = this;
|
||||
var text = item.OnSite ?
|
||||
GetTextByKey("P_JS_ONSITETIPS", "You have manually assigned a jobsite. This action will disable geofence alerts and jobsite auto-assignment. Do you want to proceed? ") :
|
||||
GetTextByKey("P_JS_ONSITETIPS1", "Are you sure you want to change the on-site of the asset:{0}?").replace('{0}', item.Name);
|
||||
showConfirm(text, GetTextByKey("P_JS_ONSITECHANGE", "On Site Change"), function () {
|
||||
var params = [
|
||||
'', jobsiteid,
|
||||
item.AssetId,
|
||||
item.OnSite ? '1' : '0'
|
||||
];
|
||||
$('#dialogmask').show();
|
||||
_network.jobsitequery('ChangeAssetOnSiteState', params.join(String.fromCharCode(170)), function (r) {
|
||||
$("#dialogmask").hide();
|
||||
if (r !== 'OK') {
|
||||
showAlert(r, GetTextByKey("P_JS_ASSETASSIGNMENT", "Asset Assignment"));
|
||||
}
|
||||
});
|
||||
}, function () {
|
||||
item.OnSite = !item.OnSite;
|
||||
grid_dtsm.refresh();
|
||||
});
|
||||
}
|
||||
|
||||
@ -669,8 +467,7 @@
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
r.State = "UNASSIGNED";
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dtam.setData(rows);
|
||||
@ -680,8 +477,7 @@
|
||||
var rows = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dtsm.setData(rows);
|
||||
@ -689,12 +485,7 @@
|
||||
|
||||
var grid_dtam;
|
||||
function InitGridAvailableMachines() {
|
||||
grid_dtam = new GridView('#availablemachinelist');
|
||||
grid_dtam.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dtam = createGridView('#availablemachinelist');
|
||||
var list_columns = [
|
||||
{ name: 'DisplayName', caption: "Asset Name", valueIndex: 'DisplayName', css: { 'width': 170, 'text-align': 'left' } },
|
||||
{ name: 'State', caption: "Current State", valueIndex: 'State', css: { 'width': 100, 'text-align': 'left' } },
|
||||
@ -728,13 +519,13 @@
|
||||
}
|
||||
};
|
||||
}
|
||||
grid_dtam.canMultiSelect = true;
|
||||
grid_dtam.multiSelect = true;
|
||||
grid_dtam.columns = columns;
|
||||
grid_dtam.init();
|
||||
grid_dtam.rowdblclick = function (rowindex) {
|
||||
grid_dtam.onRowDblClicked = function (rowindex) {
|
||||
var rowdata = grid_dtam.source[rowindex];
|
||||
if (rowdata) {
|
||||
var machine = rowdata.Values;
|
||||
var machine = rowdata;
|
||||
_availableMachines.splice(_availableMachines.indexOf(machine), 1);
|
||||
machine.OnSite = true;
|
||||
_selectedMachines.push(machine);
|
||||
@ -743,23 +534,12 @@
|
||||
showMachines();
|
||||
}
|
||||
};
|
||||
|
||||
grid_dtam.selectedrowchanged = function (rowindex) {
|
||||
var rowdata = grid_dtam.source[rowindex];
|
||||
if (rowdata) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var grid_dtsm;
|
||||
function InitGridSelectedMachines() {
|
||||
grid_dtsm = new GridView('#selectedmachinelist');
|
||||
grid_dtsm.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dtsm = createGridView('#selectedmachinelist');
|
||||
var list_columns = [
|
||||
{ name: 'OnSite', caption: GetTextByKey("P_JS_ONSITE", "On Site"), valueIndex: 'OnSite', type: 3, css: { 'width': 70, 'text-align': 'center' } },
|
||||
{ name: 'DisplayName', caption: GetTextByKey("P_JS_ASSETNAME", "Asset Name"), valueIndex: 'Name', css: { 'width': 170, 'text-align': 'left' } },
|
||||
@ -788,10 +568,6 @@
|
||||
}
|
||||
if (col.key === 'OnSite') {
|
||||
col.events = {
|
||||
onclick: function (e) {
|
||||
OnSiteChanging(this, e.target);
|
||||
return false;
|
||||
},
|
||||
onchange: OnSiteChanged
|
||||
};
|
||||
}
|
||||
@ -802,38 +578,19 @@
|
||||
width: 30,
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
isurl: true,
|
||||
text: '\uf00d',
|
||||
resizable: false,
|
||||
type: GridView.ColumnTypes.Icon,
|
||||
text: 'times',
|
||||
events: {
|
||||
onclick: function () {
|
||||
OnMachineDeleteSingle(this);
|
||||
}
|
||||
},
|
||||
classFilter: function (e) {
|
||||
return "icon-col";
|
||||
},
|
||||
attrs: { 'title': 'Delete' }
|
||||
});
|
||||
grid_dtsm.canMultiSelect = true;
|
||||
grid_dtsm.multiSelect = true;
|
||||
grid_dtsm.columns = columns;
|
||||
grid_dtsm.init();
|
||||
//grid_dtsm.rowdblclick = function (rowindex) {
|
||||
// var rowdata = grid_dtsm.source[rowindex];
|
||||
// if (rowdata) {
|
||||
// var machine = rowdata.Values;
|
||||
// _selectedMachines.splice(_selectedMachines.indexOf(machine), 1);
|
||||
// _showSelectedMachines.splice(_showSelectedMachines.indexOf(machine), 1);
|
||||
// _availableMachines.push(machine);
|
||||
|
||||
// showMachines();
|
||||
// }
|
||||
//};
|
||||
|
||||
grid_dtsm.selectedrowchanged = function (rowindex) {
|
||||
var rowdata = grid_dtsm.source[rowindex];
|
||||
if (rowdata) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -843,7 +600,7 @@
|
||||
return;
|
||||
for (var i = 0; i < indexs.length; i++) {
|
||||
var index = indexs[i];
|
||||
var m = grid_dtam.source[index].Values;
|
||||
var m = grid_dtam.source[index];
|
||||
_availableMachines.splice(_availableMachines.indexOf(m), 1);
|
||||
m.OnSite = true;
|
||||
_selectedMachines.push(m);
|
||||
@ -867,7 +624,7 @@
|
||||
return;
|
||||
for (var i = 0; i < indexs.length; i++) {
|
||||
var index = indexs[i];
|
||||
var m = grid_dtsm.source[index].Values;
|
||||
var m = grid_dtsm.source[index];
|
||||
_selectedMachines.splice(_selectedMachines.indexOf(m), 1);
|
||||
_showSelectedMachines.splice(_showSelectedMachines.indexOf(m), 1);
|
||||
_availableMachines.push(m);
|
||||
@ -890,8 +647,9 @@
|
||||
'ID': jobsiteid,
|
||||
'Machines': []
|
||||
};
|
||||
for (var i = 0; i < grid_dtsm.innerSource.length; i++) {
|
||||
var m = grid_dtsm.innerSource[i].Values;
|
||||
var tempsource = grid_dtsm.source;
|
||||
for (var i = 0; i < tempsource.length; i++) {
|
||||
var m = tempsource[i];
|
||||
item.Machines.push({
|
||||
'AssetId': m.AssetId,
|
||||
'VIN': m.VIN,
|
||||
@ -959,7 +717,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
var jobsitetypesdata;
|
||||
function getJobsiteTypes() {
|
||||
_network.jobsitequery('GetJobSiteTypes', '', function (data) {
|
||||
if (typeof (data) === "string") {
|
||||
@ -971,13 +728,7 @@
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
items.push({ 'Key': data[i], 'Value': data[i] })
|
||||
}
|
||||
jobsitetypeparam = {
|
||||
items: items,
|
||||
selectedvalue: []
|
||||
};
|
||||
jobsitetypesdata = data;
|
||||
var iptalertype = editmultiselect(jobsitetypeparam);
|
||||
$('#div_jobsitetype').append(iptalertype);
|
||||
$('#div_jobsitetype').dropdownSource(items);
|
||||
});
|
||||
}
|
||||
|
||||
@ -990,6 +741,14 @@
|
||||
InitGridData();
|
||||
InitGridSelectedMachines();
|
||||
|
||||
$("#div_jobsitetype").css('width', 200).dropdown([], {
|
||||
search: true,
|
||||
multiselect: true,
|
||||
allowselectall: true,
|
||||
textKey: 'Value',
|
||||
valueKey: 'Key'
|
||||
});
|
||||
|
||||
getJobsiteTypes();
|
||||
$('#tbody_jobsite').click(function (e) {
|
||||
var target = $(e.target);
|
||||
@ -1053,9 +812,7 @@
|
||||
function OnExport() {
|
||||
var searchtxt = "";
|
||||
searchtxt = htmlencode($.trim($('#searchinputtxt').val()));
|
||||
var jobsitetypes = [];
|
||||
if (jobsitetypeparam)
|
||||
jobsitetypes = jobsitetypeparam.selectedvalue;
|
||||
var jobsitetypes = $("#div_jobsitetype").dropdownVals();
|
||||
var active = $('#chk_activesitesonly').prop('checked');
|
||||
|
||||
var layout = getLayoutOnGrid(grid_dt);
|
||||
@ -1122,6 +879,7 @@
|
||||
formData.append("iconFile", fildata);
|
||||
formData.append("MethodName", "GetImportJobsiteColumns");
|
||||
formData.append("ClientData", '');
|
||||
showloading(true);
|
||||
$.ajax({
|
||||
url: 'JobSIteManage.aspx',
|
||||
type: 'POST',
|
||||
@ -1133,6 +891,7 @@
|
||||
success: function (data) {
|
||||
if (typeof (data) === "string") {
|
||||
showAlert(data, GetTextByKey("P_JS_IMPORT", 'Import'));
|
||||
showloading(false);
|
||||
} else {
|
||||
CreateImportColumns(data);
|
||||
$('#dialog_import')
|
||||
@ -1145,6 +904,7 @@
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
showloading(false);
|
||||
showAlert(err.statusText, GetTextByKey("P_JS_IMPORT", 'Import'));
|
||||
}
|
||||
});
|
||||
@ -1202,6 +962,7 @@
|
||||
formData.append("iconFile", fildata);
|
||||
formData.append("MethodName", "ImportJobsites");
|
||||
formData.append("ClientData", param);
|
||||
$('#dialogimportmask').show();
|
||||
$.ajax({
|
||||
url: 'JobSIteManage.aspx',
|
||||
type: 'POST',
|
||||
@ -1214,6 +975,7 @@
|
||||
importing = false;
|
||||
if (typeof (data) === "string") {
|
||||
showAlert(data, GetTextByKey("P_JS_IMPORT", 'Import'));
|
||||
$('#dialogimportmask').hide();
|
||||
} else {
|
||||
showAlert(data + GetTextByKey("P_JS_JOBSITESIMPORTEDSUCCESSFULLY", ' jobsite(s) imported successfully.'), GetTextByKey("P_JS_IMPORT", 'Import Jobsites'));
|
||||
$('#dialog_import').hideDialog();
|
||||
@ -1224,6 +986,7 @@
|
||||
error: function (err) {
|
||||
importing = false;
|
||||
showAlert(err.statusText, GetTextByKey("P_JS_IMPORT", 'Import'));
|
||||
$('#dialogimportmask').hide();
|
||||
}
|
||||
});
|
||||
|
||||
@ -1263,7 +1026,7 @@
|
||||
<%}%>
|
||||
<span class="sbutton iconlayout iconmenu" data-lgid="P_MR_LAYOUT">Layout</span>
|
||||
</div>
|
||||
<div id="jobsitelist"></div>
|
||||
<div id="jobsitelist" class="fixedgrid"></div>
|
||||
</div>
|
||||
<div id="mask_bg" style="display: none;">
|
||||
<div class="loading c-spin"></div>
|
||||
@ -1283,7 +1046,7 @@
|
||||
<span class="sbutton iconrefresh" onclick="GetSelectedMachines()" data-lgid="P_JS_REFRESH"></span>
|
||||
</div>
|
||||
<div class="machine_title">
|
||||
<div id="machine-name"></div>
|
||||
<div id="machine-name" style="padding-left: 15px;"></div>
|
||||
</div>
|
||||
<div class="div_machines">
|
||||
<table class="table_holder">
|
||||
@ -1292,7 +1055,7 @@
|
||||
<td>Available Assets</td>
|
||||
<td></td>
|
||||
<td>Assigned Assets
|
||||
<input type="checkbox" id="chk_showallassignedassets" title="When checked, all associated or linked items will display regardless of filter. " /><label for="chk_showallassignedassets">Show All Assigned</label>
|
||||
<input type="checkbox" id="chk_showallassignedassets" title="When checked, all associated or linked items will display regardless of filter. " /><label for="chk_showallassignedassets" data-lgid="P_M3_SHOWALLASSIGNED">Show All Assigned</label>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -1354,5 +1117,6 @@
|
||||
<input type="button" onclick="OnImportJobsites();" value="OK" tabindex="27" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div id="dialogimportmask" class="maskbg" style="display: none;"><div class="loading c-spin"></div></div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
@ -6,31 +6,51 @@
|
||||
<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;
|
||||
:root {
|
||||
<%=StyleVariables%>
|
||||
}
|
||||
|
||||
.dropdown .dropdown-wrapper {
|
||||
border-color: #a9a9a9;
|
||||
}
|
||||
|
||||
.dropdown .dropdown-wrapper > .dropdown-header {
|
||||
min-height: 26px;
|
||||
}
|
||||
|
||||
.dropdown .dropdown-wrapper > .dropdown-header > .dropdown-text {
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
.subtitle .dropdown .dropdown-wrapper > .dropdown-header {
|
||||
min-height: 24px;
|
||||
}
|
||||
|
||||
.subtitle .dropdown .dropdown-wrapper > .dropdown-header > .dropdown-text {
|
||||
line-height: 22px;
|
||||
height: 22px;
|
||||
min-height: 22px;
|
||||
}
|
||||
</style>
|
||||
<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/jquery-3.6.0.min.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetUrl("js/cookie.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;
|
||||
var canExport = <%= CanExportFile %>;
|
||||
_network.root = '<%=Page.ResolveUrl("~/")%>';
|
||||
var sitePath = "<%=this.ResolveUrl("~/fic/") %>";
|
||||
var userid = '<%=UserID%>';
|
||||
var companyid = '<%=CompanyID%>';
|
||||
|
||||
//if (typeof _utility !== 'object') {
|
||||
// _utility = {};
|
||||
|
@ -13,6 +13,9 @@ using System.Web.UI.WebControls;
|
||||
|
||||
public partial class JobSiteMasterPage : CommonBase
|
||||
{
|
||||
protected string UserID;
|
||||
protected string CompanyID;
|
||||
|
||||
protected override bool ExportModule
|
||||
{
|
||||
get { return true; }
|
||||
@ -32,4 +35,15 @@ public partial class JobSiteMasterPage : CommonBase
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override StyleInfo GetUIStyle()
|
||||
{
|
||||
var style = base.GetUIStyle();
|
||||
if (style != null && style.User != null)
|
||||
{
|
||||
UserID = style.User.ID;
|
||||
}
|
||||
CompanyID = SystemParams.CompanyID;
|
||||
return style;
|
||||
}
|
||||
}
|
||||
|
@ -3,170 +3,16 @@
|
||||
<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;
|
||||
}
|
||||
|
||||
.dialog-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dialog .dialog-func input {
|
||||
width: unset;
|
||||
}
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
.requireinfo {
|
||||
line-height: 30px;
|
||||
margin-left: 10px;
|
||||
@ -205,8 +51,6 @@
|
||||
<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/jobsiterequirement.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("js/dispatchassign.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("js/email.js")%>" type="text/javascript"></script>
|
||||
@ -216,8 +60,6 @@
|
||||
_network.request("JobSite/JobSiteRequirements.aspx?tp=ashx", -1, method, param, callback, error, nolog);
|
||||
}
|
||||
|
||||
var jobsiteparam;
|
||||
var regionparam;
|
||||
var addrequirement = false;
|
||||
var IsReadOnly = <%=IsReadOnly ?"true":"false"%>;
|
||||
var IsRequestOnly = <%=IsRequestOnly ?"true":"false"%>;
|
||||
@ -227,7 +69,7 @@
|
||||
var _selectdispatchids;
|
||||
var currentdate = "<%=CurrentDate %>";
|
||||
|
||||
/***************************Jobsites***************************/
|
||||
/***************************Jobsites***************************/
|
||||
|
||||
_dialog.showRequirementConfirm = function (msg, title, fprint, femail, fsave, fcancel, fclose, iniframe, shownote) {
|
||||
if (!fclose)
|
||||
@ -337,23 +179,23 @@
|
||||
var requireid;
|
||||
|
||||
function OnRefresh(keepmasg) {
|
||||
showloading(true);
|
||||
|
||||
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'));
|
||||
showloading(false);
|
||||
return;
|
||||
}
|
||||
var p = {
|
||||
"LatestStartDate": $.trim($('#latesdatetxt').val()),
|
||||
"LatestStartDate": lateststartdate,
|
||||
"JobSites": jobsites,
|
||||
"Regions": regions,
|
||||
"SearchText": $.trim($('#searchinputtxt').val()),
|
||||
"UnScheduledOnly": $('#chk_unscheduled').prop('checked')
|
||||
};
|
||||
showloading(true);
|
||||
jobsitequery("GetRequirements", htmlencode(JSON.stringify(p)), function (data) {
|
||||
if (typeof (data) === "string") {
|
||||
showAlert(data, GetTextByKey("P_AM_ERROR", 'Error'));
|
||||
@ -379,9 +221,10 @@
|
||||
r[j] = { DisplayValue: r["BeginDateStr"], Value: r[j] };
|
||||
else if (j === "EndDate")
|
||||
r[j] = { DisplayValue: r["EndDateStr"], Value: r[j] };
|
||||
else if (j === "FulfilledByName")
|
||||
r[j] = r[j].split(',');
|
||||
}
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dt.setData(rows);
|
||||
@ -390,20 +233,15 @@
|
||||
|
||||
var grid_dt;
|
||||
function InitGridData() {
|
||||
grid_dt = new GridView('#jobsitelist');
|
||||
grid_dt.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dt = createGridView('#jobsitelist');
|
||||
var list_columns = [
|
||||
{ name: 'BeginDate', caption: GetTextByKey("P_JS_BEGINDATE", "Begin Date"), valueIndex: 'BeginDate', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'EndDate', caption: GetTextByKey("P_JS_ENDDATE", "End Date"), valueIndex: 'EndDate', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'AssetTypeName', caption: GetTextByKey("P_JS_ASSETTYPE", "Asset Type"), valueIndex: 'AssetTypeName', allowFilter: true, css: { 'width': 180, 'text-align': 'left' } },
|
||||
{ name: 'Quantity', caption: GetTextByKey("P_JS_QUANTITY", "Quantity"), valueIndex: 'Quantity', css: { 'width': 80, 'text-align': 'right' } },
|
||||
{ name: 'ScheduledQuantity', caption: GetTextByKey("P_JS_SCHEDULED", "Scheduled"), valueIndex: 'ScheduledQuantity', css: { 'width': 80, 'text-align': 'right' } },
|
||||
{ name: 'ScheduledQuantity', caption: GetTextByKey("P_JS_SCHEDULED", "Scheduled"), valueIndex: 'ScheduledQuantity', allowFilter: true, css: { 'width': 80, 'text-align': 'right' } },
|
||||
{ name: 'JobSiteName', caption: GetTextByKey("P_JOBSITE", "Jobsite"), valueIndex: 'JobSiteName', allowFilter: true, css: { 'width': 200, 'text-align': 'left' } },
|
||||
{ name: 'NumberOfDays', caption: GetTextByKey("P_JS_NUMBEROFDAYS", "Number of Days"), valueIndex: 'NumberOfDays', css: { 'width': 120, 'text-align': 'right' } },
|
||||
{ name: 'NumberOfDays', caption: GetTextByKey("P_JS_NUMBEROFDAYS", "Number of Days"), valueIndex: 'NumberOfDays', allowFilter: true, css: { 'width': 120, 'text-align': 'right' } },
|
||||
{ name: 'Notes', caption: GetTextByKey("P_JS_NOTES", "Notes"), valueIndex: 'Notes', allowFilter: true, css: { 'width': 200, 'text-align': 'left' } },
|
||||
{ name: 'PointOfContact', caption: GetTextByKey("P_JS_POINTOFCONTACT", "Point Of Contact"), allowFilter: true, valueIndex: 'PointOfContact', css: { 'width': 200, 'text-align': 'left' } },
|
||||
{ name: 'AddedByName', caption: GetTextByKey("P_JS_CREATOR", "Creator"), valueIndex: 'AddedByName', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
@ -428,46 +266,40 @@
|
||||
col.alwaysshow = list_columns[hd].alwaysshow;
|
||||
if (col.name === "ManageAssets") {
|
||||
col.sortable = false;
|
||||
col.isurl = true;
|
||||
col.text = "\uf63c";
|
||||
col.resizable = false;
|
||||
col.type = GridView.ColumnTypes.Icon;
|
||||
col.text = 'truck-pickup';
|
||||
col.events = {
|
||||
onclick: function () {
|
||||
onManageAssets(this);
|
||||
}
|
||||
};
|
||||
col.classFilter = function (e) {
|
||||
return "icon-col";
|
||||
};
|
||||
col.attrs = { 'title': GetTextByKey("P_JS_MANAGEASSETS", "Manage Assets") };
|
||||
col.visible = !IsReadOnly && !IsRequestOnly;
|
||||
}
|
||||
else 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.visible = !IsReadOnly && !IsRequestOnly;
|
||||
}
|
||||
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 && !IsRequestOnly;
|
||||
}
|
||||
@ -476,20 +308,14 @@
|
||||
grid_dt.canMultiSelect = false;
|
||||
grid_dt.columns = columns;
|
||||
grid_dt.init();
|
||||
grid_dt.rowdblclick = function (rowindex) {
|
||||
grid_dt.onRowDblClicked = function (rowindex) {
|
||||
if (!IsReadOnly && !IsRequestOnly) {
|
||||
var rowdata = grid_dt.source[rowindex];
|
||||
if (rowdata) {
|
||||
onManageAssets(rowdata.Values);
|
||||
onManageAssets(rowdata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
grid_dt.selectedrowchanged = function (rowindex) {
|
||||
var rowdata = grid_dt.source[rowindex];
|
||||
if (rowdata) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function searchEnter(e) {
|
||||
@ -498,35 +324,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
var jobsite_editmultiselect;
|
||||
var region_editmultiselect;
|
||||
var alljobsites;
|
||||
function getJobsitesAndRegions() {
|
||||
showmaskbg(true);
|
||||
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
|
||||
};
|
||||
region_editmultiselect = editmultiselect(regionparam);
|
||||
$('#div_region').append(region_editmultiselect);
|
||||
$('#div_region').dropdownSource(data.Regions);
|
||||
|
||||
getRequirmentsDefault();
|
||||
}, function () {
|
||||
@ -535,30 +345,49 @@
|
||||
}
|
||||
|
||||
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);
|
||||
var seljss = $("#div_jobsites").dropdownVals();
|
||||
$("#div_jobsites").dropdownSource(jss).dropdownVals(seljss);
|
||||
}
|
||||
|
||||
var editableSelectAssignAsset;
|
||||
$(function () {
|
||||
setPageTitle(GetTextByKey("P_JS_JOBSITEREQUIREMENTS", "Jobsite Requirements"), true);
|
||||
editableSelectAssignAsset = new $editableselect($("#dialog_assignasset"));
|
||||
editableSelectAssignAsset.setEnable(false);
|
||||
|
||||
$('#dialog_assignasset').dropdown([], {
|
||||
search: true,
|
||||
valueKey: 'Id',
|
||||
textKey: 'DisplayName'
|
||||
});
|
||||
$('#dialog_assignasset').dropdownDisabled(false);
|
||||
InitGridData();
|
||||
InitAssetGridData();
|
||||
InitAllAssetGridData();
|
||||
InitEmailGridData();
|
||||
InitAttachedAssetGridData();
|
||||
|
||||
getJobsitesAndRegions();
|
||||
|
||||
$("#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'
|
||||
});
|
||||
|
||||
$(window).resize(function () {
|
||||
$("#jobsitelist").css("height", $(window).height() - $("#jobsitelist").offset().top - 14);
|
||||
grid_dt && grid_dt.resize();
|
||||
@ -578,6 +407,11 @@
|
||||
$('#dialogmask').hide();
|
||||
})
|
||||
|
||||
$('#dialog_attachedassets').dialog(function () {
|
||||
$('#dialog_allassetmask').hide();
|
||||
$('#dialogmask').hide();
|
||||
})
|
||||
|
||||
$('#dialog_assignment').dialog(function () {
|
||||
showmaskbg(false);
|
||||
$('#dialogmask').hide();
|
||||
@ -593,16 +427,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();
|
||||
}
|
||||
@ -615,16 +439,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()),
|
||||
@ -642,9 +465,10 @@
|
||||
return;
|
||||
}
|
||||
if (data) {
|
||||
region_editmultiselect.setValues(data.Regions);
|
||||
|
||||
$('#div_region').dropdownVals(data.Regions);
|
||||
onregioncompleted();
|
||||
jobsite_editmultiselect.setValues(data.Jobsites);
|
||||
$("#div_jobsites").dropdownVals(data.Jobsites);
|
||||
}
|
||||
OnRefresh();
|
||||
}, function (err) {
|
||||
@ -653,13 +477,8 @@
|
||||
}
|
||||
|
||||
function onSaveDefault() {
|
||||
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 item = {
|
||||
'JobSites': jobsites,
|
||||
@ -707,7 +526,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="width: 80px; margin-left: 5px;" value="<%=LatestStartDate %>" />
|
||||
<input type="date" class="type-date" required min="1900-01-01" id="latesdatetxt" autocomplete="off" style="width: 90px; 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>
|
||||
@ -716,7 +535,7 @@
|
||||
<input class="search" type="button" onclick="OnRefresh();" value="Search" data-lgid="P_CM_SEARCH" style="margin-left: 5px;" />
|
||||
<input id="chk_unscheduled" type="checkbox" checked="checked" onclick="OnRefresh();" />
|
||||
<label data-lgid="P_JS_UNSCHEDULEDREQUIREMENTSONLY" for="chk_unscheduled">Unscheduled Requirements Only</label>
|
||||
<span class="sbutton iconsave" onclick="onSaveDefault();" style="margin-left: 20px;padding: 0px 0px 0px 7px;" data-title-lgid="P_JS_SAVEJOBSITEANDREGIONSELECTIONASDEFAULT"></span>
|
||||
<span class="sbutton iconsave" onclick="onSaveDefault();" style="margin-left: 20px; padding: 0px 0px 0px 7px;" data-title-lgid="P_JS_SAVEJOBSITEANDREGIONSELECTIONASDEFAULT"></span>
|
||||
</div>
|
||||
<div class="function_title">
|
||||
<%if (!IsReadOnly)
|
||||
@ -730,7 +549,9 @@
|
||||
</div>
|
||||
<div id="jobsitelist"></div>
|
||||
</div>
|
||||
<div id="mask_bg" style="display: none;"><div class="loading c-spin"></div></div>
|
||||
<div id="mask_bg" style="display: none;">
|
||||
<div class="loading c-spin"></div>
|
||||
</div>
|
||||
<div class="dialog subdialog" id="dialog_requirements" style="display: none; border-bottom: 0; border-top: 0;">
|
||||
<%--<div class="dialog-title"><span class="title">Add Work Order</span></div>--%>
|
||||
<iframe id="iframerequirements" src="AddRequirements.aspx" style="width: 100%; height: 100%; display: block; border: none;"></iframe>
|
||||
@ -776,43 +597,44 @@
|
||||
<input type="button" onclick="onAddDispatch();" data-lgid="P_JS_OK" value="OK" tabindex="27" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div id="dialog_allassetmask" class="maskbg" style="display: none;">
|
||||
<div class="loading_icon icon c-spin"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dialog" id="dialog_sendmail" style="display: none; width: 320px;">
|
||||
<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;">
|
||||
<table>
|
||||
<div class="dialog-content">
|
||||
<table style="line-height: 24px;">
|
||||
<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_COLON">Description:</td>
|
||||
<td>
|
||||
<textarea id="sendmail_desc" style="width: 350px; height: 80px; resize: none;"></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@ -832,7 +654,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="dialog_assignasset" style="width: 320px; height: 22px;"></div>
|
||||
<div id="dialog_assignasset" style="width: 320px;" class="dropdown"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -844,4 +666,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dialog" id="dialog_attachedassets" style="display: none;">
|
||||
<div class="dialog-title"><span class="title" data-lgid="P_JS_ATTACHEDASSETS">Attached Assets</span><em class="dialog-close"></em></div>
|
||||
<div class="dialog-content">
|
||||
<div style="text-align: center; line-height: 20px; margin-bottom: 10px;">
|
||||
<span id="span_attachedasset_tips1"></span>
|
||||
<br />
|
||||
<span id="span_attachedasset_tips2"></span>
|
||||
</div>
|
||||
<div id="dialog_attachedassetlist" style="height: 300px; width: 100%;"></div>
|
||||
</div>
|
||||
<div class="dialog-func">
|
||||
<input type="button" value="Close" data-lgid="P_JS_CANCEL" class="dialog-close" tabindex="2" />
|
||||
<input type="button" id="btn_addattasset" onclick="OnAddAttachedAssets();" data-lgid="P_JS_OK" value="OK" tabindex="1" />
|
||||
<input type="button" id="btn_removeattasset" onclick="OnRemoveAttachedAssets();" style="display: none;" data-lgid="P_JS_REMOVE" value="Remove" tabindex="1" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
|
@ -42,7 +42,7 @@ public partial class JobSiteRequirements : JobSiteRequirementsBasePage
|
||||
}
|
||||
|
||||
DateTime userlocaldate = SystemParams.ConvertToUserTimeFromUtc(GetCurrentLoginSession().User, DateTime.UtcNow);
|
||||
LatestStartDate = userlocaldate.ToShortDateString();
|
||||
LatestStartDate = userlocaldate.ToString("yyyy-MM-dd");
|
||||
CurrentDate = userlocaldate.ToShortDateString();
|
||||
}
|
||||
|
||||
|
@ -7,46 +7,10 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.edit-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.edit-content table td.label {
|
||||
/*width: 200px;*/
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.edit-content table td input,
|
||||
.edit-content table td textarea {
|
||||
border: 1px solid #a9a9a9;
|
||||
width: 320px;
|
||||
height: 18px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.edit-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.edit-content table td input[type="radio"] {
|
||||
border: none;
|
||||
width: unset;
|
||||
height: unset;
|
||||
}
|
||||
|
||||
.edit-content table td textarea {
|
||||
height: 100px;
|
||||
resize: none;
|
||||
/*max-width: 200px;*/
|
||||
}
|
||||
|
||||
.dialog, .data-column-header-filter-bg, .data-column-header-filter-panel {
|
||||
z-index: 2;
|
||||
.edit-content table td input[type="radio"] {
|
||||
border: none;
|
||||
width: unset;
|
||||
height: unset;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -69,22 +33,20 @@
|
||||
var items = [];
|
||||
var itemids = [];
|
||||
for (var i = 0; i < source.length; i++) {
|
||||
var it = source[i].Values;
|
||||
var it = source[i];
|
||||
if (it.Selected) {
|
||||
items.push({
|
||||
Values: {
|
||||
AssetId: it.Id,
|
||||
VIN: it.VIN,
|
||||
Name: it.Name,
|
||||
MakeName: it.MakeName,
|
||||
ModelName: it.ModelName,
|
||||
TypeName: it.TypeName
|
||||
}
|
||||
AssetId: it.Id,
|
||||
VIN: it.VIN,
|
||||
Name: it.Name,
|
||||
MakeName: it.MakeName,
|
||||
ModelName: it.ModelName,
|
||||
TypeName: it.TypeName
|
||||
});
|
||||
itemids.push(it.Id);
|
||||
}
|
||||
}
|
||||
grid_dtassets.setData(grid_dtassets.innerSource.concat(items));
|
||||
grid_dtassets.setData(grid_dtassets.source.concat(items));
|
||||
doSave(0, itemids);
|
||||
showmaskbg(false);
|
||||
};
|
||||
@ -105,6 +67,7 @@
|
||||
|
||||
//window.onresize = resizeContent;
|
||||
//resizeContent();
|
||||
$('input[placeholder=Search]').attr("placeholder", GetTextByKey("P_AM_SEARCH", "Search"));
|
||||
|
||||
getConfigData();
|
||||
});
|
||||
@ -130,12 +93,7 @@
|
||||
//**************************************Asset(s)****************************************************//
|
||||
var grid_dtassets;
|
||||
function InitGridSelectedMachines() {
|
||||
grid_dtassets = new GridView('#selectedmachinelist');
|
||||
grid_dtassets.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dtassets = createGridView('#selectedmachinelist');
|
||||
var list_columns = [
|
||||
{ name: 'VIN', caption: GetTextByKey("P_UM_SN", "SN"), valueIndex: 'VIN', css: { 'width': 160, 'text-align': 'left' } },
|
||||
{ name: 'Name', caption: GetTextByKey("P_UM_NAME", "Name"), valueIndex: 'Name', css: { 'width': 160, 'text-align': 'left' } },
|
||||
@ -165,7 +123,6 @@
|
||||
col.width = list_columns[hd].css.width;
|
||||
col.align = list_columns[hd].css["text-align"]
|
||||
col.key = list_columns[hd].valueIndex;
|
||||
col.allowFilter = col.name === 'TypeName';
|
||||
col.styleFilter = function (item) {
|
||||
if (item.Highlight)
|
||||
return { 'background-color': 'yellow' };
|
||||
@ -173,7 +130,7 @@
|
||||
columns.push(col);
|
||||
}
|
||||
|
||||
grid_dtassets.canMultiSelect = true;
|
||||
grid_dtassets.multiSelect = true;
|
||||
grid_dtassets.columns = columns;
|
||||
grid_dtassets.init();
|
||||
}
|
||||
@ -182,8 +139,7 @@
|
||||
var rows = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dtassets.setData(rows);
|
||||
@ -221,8 +177,8 @@
|
||||
|
||||
function OnAssetAdd() {
|
||||
showmaskbg(true);
|
||||
dialogAUAssets.exceptSource = grid_dtassets.innerSource.map(function (s) {
|
||||
return s.Values.AssetId;
|
||||
dialogAUAssets.exceptSource = grid_dtassets.source.map(function (s) {
|
||||
return s.AssetId;
|
||||
});
|
||||
dialogAUAssets.showSelector();
|
||||
}
|
||||
@ -230,22 +186,15 @@
|
||||
function OnMachineDelete() {
|
||||
showConfirm(GetTextByKey("P_JS_AREYOUSUREYOUWANTTODELETETHESESELECTEDASSETS", 'Are you sure you want to delete these selected asset(s)?'), GetTextByKey("P_JS_CONFIGURATION", "Configuration"), function () {
|
||||
deleteitems = [];
|
||||
for (var i = grid_dtassets.innerSource.length - 1; i >= 0; i--) {
|
||||
var s = grid_dtassets.innerSource[i].Values;
|
||||
var temp = grid_dtassets.source;
|
||||
for (var i = temp.length - 1; i >= 0; i--) {
|
||||
var s = temp[i];
|
||||
if (s.selected) {
|
||||
grid_dtassets.innerSource.splice(i, 1);
|
||||
temp.splice(i, 1);
|
||||
deleteitems.push(s.AssetId);
|
||||
}
|
||||
}
|
||||
if (grid_dtassets.source != null) {
|
||||
for (var j = grid_dtassets.source.length - 1; j >= 0; j--) {
|
||||
var l = grid_dtassets.source[j].Values;
|
||||
if (l.selected) {
|
||||
grid_dtassets.source.splice(j, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
grid_dtassets.reset();
|
||||
grid_dtassets.setData(temp);
|
||||
if (deleteitems.length > 0)
|
||||
doDelete(0, deleteitems);
|
||||
});
|
||||
@ -254,12 +203,7 @@
|
||||
//**************************************Asset Type(s)****************************************************//
|
||||
var grid_dtat;
|
||||
function InitGridSelectedAssetTypes() {
|
||||
grid_dtat = new GridView('#selectedassettypelist');
|
||||
grid_dtat.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dtat = createGridView('#selectedassettypelist');
|
||||
var list_columns = [
|
||||
{ name: 'Name', caption: GetTextByKey("P_UM_NAME", "Name"), valueIndex: 'Name', css: { 'width': 380, 'text-align': 'left' } }
|
||||
];
|
||||
@ -288,7 +232,7 @@
|
||||
col.key = list_columns[hd].valueIndex;
|
||||
columns.push(col);
|
||||
}
|
||||
grid_dtat.canMultiSelect = true;
|
||||
grid_dtat.multiSelect = true;
|
||||
grid_dtat.columns = columns;
|
||||
grid_dtat.init();
|
||||
}
|
||||
@ -297,8 +241,7 @@
|
||||
var rows = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dtat.setData(rows);
|
||||
@ -306,12 +249,7 @@
|
||||
|
||||
var grid_dtnjs;
|
||||
function InitGridAvailableAssetTypes() {
|
||||
grid_dtnjs = new GridView('#availableassettypelist');
|
||||
grid_dtnjs.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dtnjs = createGridView('#availableassettypelist');
|
||||
var list_columns = [
|
||||
{ name: 'Name', caption: GetTextByKey("P_UM_NAME", "Name"), valueIndex: 'Name', css: { 'width': 380, 'text-align': 'left' } }
|
||||
];
|
||||
@ -340,30 +278,16 @@
|
||||
col.key = list_columns[hd].valueIndex;
|
||||
columns.push(col);
|
||||
}
|
||||
grid_dtnjs.canMultiSelect = true;
|
||||
grid_dtnjs.multiSelect = true;
|
||||
grid_dtnjs.columns = columns;
|
||||
grid_dtnjs.init();
|
||||
grid_dtnjs.rowdblclick = function (rowindex) {
|
||||
var rowdata = grid_dtnjs.source[rowindex];
|
||||
if (rowdata) {
|
||||
var AssetType = rowdata.Values;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
grid_dtnjs.selectedrowchanged = function (rowindex) {
|
||||
var rowdata = grid_dtnjs.source[rowindex];
|
||||
if (rowdata) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showAvailableAssetType(data) {
|
||||
var rows = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dtnjs.setData(rows);
|
||||
@ -433,8 +357,9 @@
|
||||
|
||||
function OnSelectAssetTypes() {
|
||||
var itemids = [];
|
||||
for (var i = 0; i < grid_dtnjs.source.length; i++) {
|
||||
var m = grid_dtnjs.source[i].Values;
|
||||
var tempsource = grid_dtnjs.source;
|
||||
for (var i = 0; i < tempsource.length; i++) {
|
||||
var m = tempsource[i];
|
||||
if (m.selected) {
|
||||
m.selected = false;
|
||||
_selectedAssetTypes.push(m);
|
||||
@ -451,11 +376,12 @@
|
||||
showConfirm(GetTextByKey("P_JS_AREYOUSUREYOUWANTTODELETETHESESELECTEDASSETTYPES", 'Are you sure you want to delete these selected asset type(s)?'), GetTextByKey("P_JS_CONFIGURATION", 'Configuration'), function () {
|
||||
_selectedAssetTypes = [];
|
||||
var deleteitems = [];
|
||||
if (grid_dtat.source != null) {
|
||||
for (var j = grid_dtat.source.length - 1; j >= 0; j--) {
|
||||
var l = grid_dtat.source[j].Values;
|
||||
var temp = grid_dtat.source;
|
||||
if (temp != null) {
|
||||
for (var i = temp.length - 1; i >= 0; i--) {
|
||||
var l = temp[i];
|
||||
if (l.selected) {
|
||||
grid_dtat.source.splice(j, 1);
|
||||
temp.splice(i, 1);
|
||||
deleteitems.push(l.AssetId || l.ID);
|
||||
}
|
||||
else {
|
||||
@ -463,7 +389,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
grid_dtat.reset();
|
||||
grid_dtat.setData(temp);
|
||||
|
||||
if (deleteitems.length > 0)
|
||||
doDelete(1, deleteitems);
|
||||
@ -518,11 +444,11 @@
|
||||
</script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
||||
<div id="mask_bg" style="display: none; z-index: 1">
|
||||
<div id="mask_bg" style="display: none;">
|
||||
<div class="loading c-spin"></div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="dialogmask" class="maskbg" style="display: none; z-index: 1;">
|
||||
<div id="dialogmask" class="maskbg" style="display: none;">
|
||||
<div class="loading_icon icon c-spin"></div>
|
||||
</div>
|
||||
<div class="function_title">
|
||||
@ -569,7 +495,7 @@
|
||||
<div id="availableassettypelist" style="height: 400px; width: 630px; margin: 10px 0 4px;"></div>
|
||||
</div>
|
||||
<div class="dialog-func">
|
||||
<input type="button" value="Cancel" data-lgid="P_UM_CANCEL" class="dialog-close" tabindex="18" style="height: 26px;" />
|
||||
<input type="button" value="Cancel" data-lgid="P_UM_CANCEL" class="dialog-close" tabindex="18" />
|
||||
<input type="button" onclick="OnSelectAssetTypes();" value="OK" data-lgid="P_UM_OK" tabindex="17" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
@ -20,43 +20,6 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dialog-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.dialog-content table td.label {
|
||||
width: 124px;
|
||||
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: 250px;
|
||||
height: 18px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.dialog-content table td select {
|
||||
width: 254px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.dialog-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dialog-content table td textarea {
|
||||
height: 100px;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
#dialog_user_randompass {
|
||||
width: auto;
|
||||
height: 16px;
|
||||
@ -268,7 +231,7 @@
|
||||
|
||||
var jlid;
|
||||
function OnEdit() {
|
||||
var jl = grid_dt.source[grid_dt.selectedIndex].Values;
|
||||
var jl = grid_dt.source[grid_dt.selectedIndex];
|
||||
if (!jl) {
|
||||
jlid = undefined;
|
||||
return;
|
||||
@ -351,23 +314,17 @@
|
||||
var r = data[i];
|
||||
for (var j in r) {
|
||||
if (j === "Active") {
|
||||
r[j] = { DisplayValue: r.Active ? "Yes" : "No", Value: r[j] };
|
||||
r[j] = { DisplayValue: r.Active ? 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);
|
||||
}
|
||||
var grid_dt;
|
||||
function InitGridData() {
|
||||
grid_dt = new GridView('#jobsitelimitlist');
|
||||
grid_dt.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dt = createGridView('#jobsitelimitlist');
|
||||
var list_columns = [
|
||||
{ name: 'ID', caption: GetTextByKey("P_M3_ID", "ID"), valueIndex: 'ID', css: { 'width': 40, 'text-align': 'left' } },
|
||||
{ name: 'JobSiteName', caption: GetTextByKey("P_M3_JOBSITENAME", "Jobsite Name"), valueIndex: 'JobSiteName', css: { 'width': 200, 'text-align': 'left' } },
|
||||
@ -395,37 +352,37 @@
|
||||
col.allowFilter = list_columns[hd].allowFilter;
|
||||
col.key = list_columns[hd].valueIndex;
|
||||
if (col.name === "Active") {
|
||||
col.filterSource = [{ Value: true, DisplayValue: 'Yes' }, { Value: false, DisplayValue: 'No' }];
|
||||
col.filterSource = [{ Value: true, DisplayValue: GetTextByKey('P_UTILITY_YES', 'Yes') }, { Value: false, DisplayValue: GetTextByKey('P_UTILITY_NO', 'No') }];
|
||||
}
|
||||
else if (col.name === "Edit") {
|
||||
col.isurl = true;
|
||||
col.text = "\uf044";
|
||||
col.sortable = false;
|
||||
col.resizable = false;
|
||||
col.type = GridView.ColumnTypes.Icon;
|
||||
col.text = 'edit';
|
||||
col.events = {
|
||||
onclick: function () {
|
||||
OnEdit()
|
||||
}
|
||||
};
|
||||
col.classFilter = function (e) {
|
||||
return "icon-col";
|
||||
}
|
||||
col.attrs = { 'title': GetTextByKey("P_M3_EDIT", 'Edit') };
|
||||
}
|
||||
else if (col.name === "Delete") {
|
||||
col.isurl = true;
|
||||
col.text = "\uf00d";
|
||||
col.sortable = false;
|
||||
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_M3_DELETE", 'Delete') };
|
||||
}
|
||||
else if (col.name === "Subscribe") {
|
||||
col.isurl = true;
|
||||
col.text = "\uf0e0";
|
||||
col.sortable = false;
|
||||
col.resizable = false;
|
||||
col.type = GridView.ColumnTypes.Icon;
|
||||
col.text = 'envelope';
|
||||
col.events = {
|
||||
onclick: function () {
|
||||
OnSubscribe(this);
|
||||
@ -441,12 +398,12 @@
|
||||
grid_dt.canMultiSelect = false;
|
||||
grid_dt.columns = columns;
|
||||
grid_dt.init();
|
||||
grid_dt.rowdblclick = OnEdit;
|
||||
grid_dt.onRowDblClicked = OnEdit;
|
||||
|
||||
grid_dt.selectedrowchanged = function (rowindex) {
|
||||
grid_dt.onSelectedRowChanged = function (rowindex) {
|
||||
var rowdata = grid_dt.source[rowindex];
|
||||
if (rowdata) {
|
||||
curfewid = rowdata.Values.CurfewID;
|
||||
curfewid = rowdata.CurfewID;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -612,8 +569,7 @@
|
||||
var rows = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dtac.setData(rows);
|
||||
@ -623,8 +579,7 @@
|
||||
var rows = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dtsc.setData(rows);
|
||||
@ -633,12 +588,7 @@
|
||||
|
||||
var grid_dtac;
|
||||
function InitGridAvailableContacts() {
|
||||
grid_dtac = new GridView('#availablecontacts');
|
||||
grid_dtac.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dtac = createGridView('#availablecontacts');
|
||||
var list_columns = [
|
||||
{ name: 'DisplayName', caption: GetTextByKey("P_M3_CONTACTNAME", "Contact Name"), valueIndex: 'DisplayName', css: { 'width': 240, 'text-align': 'left' } },
|
||||
{ name: 'ContactTypeName', caption: GetTextByKey("P_M3_CONTACTTYPE", "Contact Type"), valueIndex: 'ContactTypeName', css: { 'width': 150, 'text-align': 'left' } },
|
||||
@ -656,13 +606,13 @@
|
||||
col.key = list_columns[hd].valueIndex;
|
||||
columns.push(col);
|
||||
}
|
||||
grid_dtac.canMultiSelect = true;
|
||||
grid_dtac.multiSelect = true;
|
||||
grid_dtac.columns = columns;
|
||||
grid_dtac.init();
|
||||
grid_dtac.rowdblclick = function (rowindex) {
|
||||
grid_dtac.onRowDblClicked = function (rowindex) {
|
||||
var rowdata = grid_dtac.source[rowindex];
|
||||
if (rowdata) {
|
||||
var contact = rowdata.Values;
|
||||
var contact = rowdata;
|
||||
_availableContacts.splice(_availableContacts.indexOf(contact), 1);
|
||||
_selectedContacts.push(contact);
|
||||
_showSelectedContacts.push(contact);
|
||||
@ -670,23 +620,12 @@
|
||||
showContacts();
|
||||
}
|
||||
};
|
||||
|
||||
grid_dtac.selectedrowchanged = function (rowindex) {
|
||||
var rowdata = grid_dtac.source[rowindex];
|
||||
if (rowdata) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var grid_dtsc;
|
||||
function InitGridSelectedContacts() {
|
||||
grid_dtsc = new GridView('#selectedcontacts');
|
||||
grid_dtsc.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dtsc = createGridView('#selectedcontacts');
|
||||
var list_columns = [
|
||||
{ name: 'DisplayName', caption: GetTextByKey("P_M3_CONTACTNAME", "Contact Name"), valueIndex: 'DisplayName', css: { 'width': 240, 'text-align': 'left' } },
|
||||
{ name: 'ContactTypeName', caption: GetTextByKey("P_M3_CONTACTTYPE", "Contact Type"), valueIndex: 'ContactTypeName', css: { 'width': 150, 'text-align': 'left' } },
|
||||
@ -708,13 +647,13 @@
|
||||
}
|
||||
columns.push(col);
|
||||
}
|
||||
grid_dtsc.canMultiSelect = true;
|
||||
grid_dtsc.multiSelect = true;
|
||||
grid_dtsc.columns = columns;
|
||||
grid_dtsc.init();
|
||||
grid_dtsc.rowdblclick = function (rowindex) {
|
||||
grid_dtsc.onRowDblClicked = function (rowindex) {
|
||||
var rowdata = grid_dtsc.source[rowindex];
|
||||
if (rowdata) {
|
||||
var contact = rowdata.Values;
|
||||
var contact = rowdata;
|
||||
_selectedContacts.splice(_selectedContacts.indexOf(contact), 1);
|
||||
_showSelectedContacts.splice(_showSelectedContacts.indexOf(contact), 1);
|
||||
_availableContacts.push(contact);
|
||||
@ -722,12 +661,6 @@
|
||||
showContacts();
|
||||
}
|
||||
};
|
||||
|
||||
grid_dtsc.selectedrowchanged = function (rowindex) {
|
||||
var rowdata = grid_dtsc.source[rowindex];
|
||||
if (rowdata) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function OnContactEditorAdd() {
|
||||
@ -736,7 +669,7 @@
|
||||
return;
|
||||
for (var i = 0; i < indexs.length; i++) {
|
||||
var index = indexs[i];
|
||||
var c = grid_dtac.source[index].Values;
|
||||
var c = grid_dtac.source[index];
|
||||
_availableContacts.splice(_availableContacts.indexOf(c), 1);
|
||||
_selectedContacts.push(c);
|
||||
_showSelectedContacts.push(c);
|
||||
@ -758,7 +691,7 @@
|
||||
return;
|
||||
for (var i = 0; i < indexs.length; i++) {
|
||||
var index = indexs[i];
|
||||
var c = grid_dtsc.source[index].Values;
|
||||
var c = grid_dtsc.source[index];
|
||||
_selectedContacts.splice(_selectedContacts.indexOf(c), 1);
|
||||
_showSelectedContacts.splice(_showSelectedContacts.indexOf(c), 1);
|
||||
_availableContacts.push(c);
|
||||
|
@ -1,232 +1,19 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/JobSite/JobSiteMasterPage.master" AutoEventWireup="true" CodeFile="RequirementChangeHistory.aspx.cs" Inherits="RequirementChangeHistory" %>
|
||||
|
||||
<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-content table td input,
|
||||
.dialog-content table td textarea {
|
||||
border: 1px solid #a9a9a9;
|
||||
width: 200px;
|
||||
height: 18px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
#dialog_machines .dialog-content table td input,
|
||||
#dialog_layouts .dialog-content table td input {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.dialog-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dialog-content table td textarea {
|
||||
height: 100px;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
.requireinfo {
|
||||
line-height: 30px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.requireinfospan {
|
||||
font-weight: 500;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.quantity {
|
||||
padding: 3px 0 3px 10px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
/*color: gray;*/
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
/*width: 770px;*/
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.span-caption {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.span-bar {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
</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/editmultiselect.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("js/jobsiterequirement.js")%>" type="text/javascript"></script>
|
||||
|
||||
<script>
|
||||
jobsitequery = function (method, param, callback, error, nolog) {
|
||||
_network.request("JobSite/RequirementChangeHistory.aspx?tp=ashx", -1, method, param, callback, error, nolog);
|
||||
}
|
||||
|
||||
var currentdate = "<%=CurrentDate %>";
|
||||
var jobsiteparam;
|
||||
var IsReadOnly = <%=IsReadOnly ?"true":"false"%>;
|
||||
var IsRequestOnly = <%=IsRequestOnly ?"true":"false"%>;
|
||||
|
||||
/***************************Jobsites***************************/
|
||||
/***************************Jobsites***************************/
|
||||
|
||||
function showConfirmIndialog(msg, title, fok, fcancel, shownote) {
|
||||
$("#dialogmask").show();
|
||||
@ -243,13 +30,24 @@
|
||||
function OnRefresh() {
|
||||
showloading(true);
|
||||
|
||||
var jobsites = [];
|
||||
if (jobsiteparam)
|
||||
jobsites = jobsiteparam.selectedvalue;
|
||||
|
||||
var jobsites = $('#div_jobsites').dropdownVals() || [];
|
||||
var begindate = $('#startdatetxt').val();
|
||||
var enddate = $('#enddatetxt').val();
|
||||
if (begindate && !$('#startdatetxt').is(':valid')) {
|
||||
showAlert(GetTextByKey('P_COMMON_THEDELETEDBEGINDATEISINVALID', "The deleted begin date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
if (enddate && !$('#enddatetxt').is(':valid')) {
|
||||
showAlert(GetTextByKey('P_COMMON_THEDELETEDENDDATEISINVALID', "The deleted end date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
if (begindate && enddate && begindate > enddate) {
|
||||
showAlert(GetTextByKey("P_DELETEDENDDATEMUSTBELATERTHANDELETEDBEGINDATE", "Deleted end date must be later than deleted begin date."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
var p = [
|
||||
htmlencode($('#startdatetxt').val()),
|
||||
htmlencode($('#enddatetxt').val()),
|
||||
htmlencode(begindate),
|
||||
htmlencode(enddate),
|
||||
JSON.stringify(jobsites),
|
||||
$.trim($('#searchinputtxt').val())
|
||||
];
|
||||
@ -278,8 +76,7 @@
|
||||
else if (j === "DeletedOn")
|
||||
r[j] = { DisplayValue: r["DeletedOnStr"], Value: r[j] };
|
||||
}
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dt.setData(rows);
|
||||
@ -288,12 +85,7 @@
|
||||
|
||||
var grid_dt;
|
||||
function InitGridData() {
|
||||
grid_dt = new GridView('#jobsitelist');
|
||||
grid_dt.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dt = createGridView('#jobsitelist');
|
||||
var list_columns = [
|
||||
{ name: 'BeginDate', caption: GetTextByKey("P_JS_BEGINDATE", "Begin Date"), valueIndex: 'BeginDate', css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'EndDate', caption: GetTextByKey("P_JS_ENDDATE", "End Date"), valueIndex: 'EndDate', css: { 'width': 100, 'text-align': 'left' } },
|
||||
@ -329,21 +121,7 @@
|
||||
}
|
||||
grid_dt.canMultiSelect = false;
|
||||
grid_dt.columns = columns;
|
||||
grid_dt.init();
|
||||
grid_dt.rowdblclick = function (rowindex) {
|
||||
if (!IsReadOnly && !IsRequestOnly) {
|
||||
var rowdata = grid_dt.source[rowindex];
|
||||
if (rowdata) {
|
||||
onManageAssets(rowdata.Values);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
grid_dt.selectedrowchanged = function (rowindex) {
|
||||
var rowdata = grid_dt.source[rowindex];
|
||||
if (rowdata) {
|
||||
}
|
||||
}
|
||||
grid_dt.init();
|
||||
}
|
||||
|
||||
function searchEnter(e) {
|
||||
@ -352,24 +130,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
var jobsite_editmultiselect;
|
||||
var alljobsites;
|
||||
function getJobsitesAndRegions() {
|
||||
showmaskbg(true);
|
||||
jobsitequery('GetJobsitesAndRegions', '', function (data) {
|
||||
jobsitequery('GetJobsitesAndRegions', '0', function (data) {
|
||||
if (typeof (data) === "string") {
|
||||
showAlert(data, GetTextByKey("P_AM_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
|
||||
alljobsites = data.Jobsites;
|
||||
jobsiteparam = {
|
||||
items: data.Jobsites,
|
||||
selectedvalue: [],
|
||||
width: 300
|
||||
};
|
||||
jobsite_editmultiselect = editmultiselect(jobsiteparam);
|
||||
$('#div_jobsites').append(jobsite_editmultiselect);
|
||||
$("#div_jobsites").dropdownSource(data.Jobsites);
|
||||
|
||||
}, function () {
|
||||
showmaskbg(false);
|
||||
@ -381,6 +151,14 @@
|
||||
getJobsitesAndRegions();
|
||||
OnRefresh();
|
||||
|
||||
$("#div_jobsites").css('width', 120).dropdown([], {
|
||||
search: true,
|
||||
multiselect: true,
|
||||
allowselectall: true,
|
||||
textKey: 'Value',
|
||||
valueKey: 'Key'
|
||||
});
|
||||
|
||||
$(window).resize(function () {
|
||||
$("#jobsitelist").css("height", $(window).height() - $("#jobsitelist").offset().top - 14);
|
||||
grid_dt && grid_dt.resize();
|
||||
@ -389,25 +167,6 @@
|
||||
|
||||
$('#searchinputtxt').keydown(searchEnter);
|
||||
|
||||
$('#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]);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function searchEnter(e) {
|
||||
@ -426,11 +185,11 @@
|
||||
<input type="password" autocomplete="new-password" style="display: none" />
|
||||
<span data-lgid="P_JS_DELETEDBEGINDATE_COLON">Deleted Begin Date:</span>
|
||||
<div>
|
||||
<input type="text" id="startdatetxt" autocomplete="off" style="width: 100px; margin-left: 5px;" value="<%=BeginDate %>" />
|
||||
<input type="date" class="type-date" required min="1900-01-01" id="startdatetxt" autocomplete="off" style="width: 100px; margin-left: 5px;" value="<%=BeginDate %>" />
|
||||
</div>
|
||||
<span style="margin-left: 10px;" data-lgid="P_JS_DELETEDENDDATE_COLON">Deleted End Date:</span>
|
||||
<div>
|
||||
<input type="text" id="enddatetxt" autocomplete="off" style="width: 100px; margin-left: 5px;" value="<%=EndDate %>" />
|
||||
<input type="date" class="type-date" required min="1900-01-01" id="enddatetxt" autocomplete="off" style="width: 100px; margin-left: 5px;" value="<%=EndDate %>" />
|
||||
</div>
|
||||
<input type="text" id="searchinputtxt" autocomplete="off" style="margin-left: 5px; display: none;" />
|
||||
<span style="margin-left: 10px;" data-lgid="P_JS_JOBSITES_COLON">Jobsites:</span>
|
||||
|
@ -15,7 +15,6 @@ public partial class RequirementChangeHistory : JobSiteRequirementsBasePage
|
||||
protected bool IsRequestOnly = false;
|
||||
public string BeginDate = "";
|
||||
public string EndDate = "";
|
||||
public string CurrentDate = "";
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
string methodName = Request.Form["MethodName"];
|
||||
@ -43,9 +42,8 @@ public partial class RequirementChangeHistory : JobSiteRequirementsBasePage
|
||||
}
|
||||
|
||||
DateTime userlocaldate = SystemParams.ConvertToUserTimeFromUtc(GetCurrentLoginSession().User, DateTime.UtcNow);
|
||||
BeginDate = userlocaldate.AddDays(-6).ToShortDateString();
|
||||
EndDate = userlocaldate.ToShortDateString();
|
||||
CurrentDate = userlocaldate.ToShortDateString();
|
||||
BeginDate = userlocaldate.AddDays(-6).ToString("yyyy-MM-dd");
|
||||
EndDate = userlocaldate.ToString("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
protected override int FeatureID
|
||||
|
@ -3,157 +3,19 @@
|
||||
<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;
|
||||
}
|
||||
|
||||
.edit-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.edit-content table td.label {
|
||||
width: 130px;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.edit-content table td input,
|
||||
.edit-content table td textarea {
|
||||
border: 1px solid #a9a9a9;
|
||||
width: 320px;
|
||||
height: 18px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.edit-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.edit-content table td textarea {
|
||||
height: 100px;
|
||||
resize: none;
|
||||
/*max-width: 200px;*/
|
||||
}
|
||||
|
||||
|
||||
.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: 100px;
|
||||
.assetlabel {
|
||||
width: 200px;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.span-caption {
|
||||
@ -175,7 +37,12 @@
|
||||
height: 24px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.edit-content table td.label {
|
||||
width: 130px;
|
||||
}
|
||||
</style>
|
||||
<link href="<%=GetFileUrlWithVersion("../css/panel.css")%>" rel="stylesheet" />
|
||||
<script src="<%=GetFileUrlWithVersion("../js/vue.min.js")%>" type="text/javascript"></script>
|
||||
<script>Vue.config.productionTip = false; Vue.config.silent = true;</script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/components/datagrid.js")%>" type="text/javascript"></script>
|
||||
@ -184,15 +51,17 @@
|
||||
<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/gridlayout.js")%>" type="text/javascript"></script>
|
||||
<script src="../Maintenance/js/inputdatactr.js"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/editmultiselect.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("js/scheduler.js")%>" type="text/javascript"></script>
|
||||
<script>
|
||||
jobsitequery = function (method, param, callback, error, nolog) {
|
||||
_network.request("JobSite/SchedulerManagement.aspx?tp=ashx", -1, method, param, callback, error, nolog);
|
||||
}
|
||||
var IsAdmin =<%=IsAdmin ?"true":"false"%>;
|
||||
var IsReadOnly = <%=IsReadOnly ?"true":"false"%>;
|
||||
var currentdate = "<%=CurrentDate %>";
|
||||
var currentdate = "<%=CurrentDate %>";
|
||||
var gridLayoutID = "JobSiteScheduler";
|
||||
|
||||
/***************************Jobsites***************************/
|
||||
|
||||
@ -228,49 +97,29 @@
|
||||
|
||||
var assetsObj;
|
||||
function OnRefresh() {
|
||||
var alerttitle = GetTextByKey('P_JS_SCHEDULER', 'Scheduler');
|
||||
var begindate = $.trim($('#txtbegindate').val());
|
||||
var enddate = $.trim($('#txtenddate').val());
|
||||
if (begindate && !checkDate(begindate)) {
|
||||
showAlert(GetTextByKey("P_JS_BEGINDATEFORMATERROR", "Begin Date format error."), alerttitle);
|
||||
if (begindate && !$('#txtbegindate').is(':valid')) {
|
||||
showAlert(GetTextByKey('P_COMMON_BEGINDATEISINVALID', "The begin date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
if (enddate && !checkDate(enddate)) {
|
||||
showAlert(GetTextByKey("P_JS_ENDDATEFORMATERROR", "End Date format error."), alerttitle);
|
||||
if (enddate && !$('#txtenddate').is(':valid')) {
|
||||
showAlert(GetTextByKey('P_COMMON_ENDDATEISINVALID', "The end date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (begindate && enddate) {
|
||||
var sdate = begindate;
|
||||
var stdt = new Date(sdate.replace("-", "/"));
|
||||
var edate = enddate;
|
||||
var etdt = new Date(edate.replace("-", "/"));
|
||||
|
||||
if (stdt > etdt) {
|
||||
showAlert(GetTextByKey("P_JS_ENDDATEMUSTBELATERTHANBEGINDATE", "End Date must be later than Begin Date."), alerttitle);
|
||||
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 jobsites = [];
|
||||
if (jobsiteparam)
|
||||
jobsites = jobsiteparam.selectedvalue;
|
||||
var jobsites = $('#div_jobsites').dropdownVals() || [];
|
||||
var regions = $('#div_region').dropdownVals() || [];
|
||||
var agroups = $('#div_assetgroup').dropdownVals() || [];
|
||||
var atypes = $('#div_assettypes').dropdownVals() || [];
|
||||
|
||||
var regions = [];
|
||||
if (regionparam)
|
||||
regions = regionparam.selectedvalue;
|
||||
|
||||
var agroups = [];
|
||||
if (assetgroupparam)
|
||||
agroups = assetgroupparam.selectedvalue;
|
||||
|
||||
var atypes = [];
|
||||
if (assettypeparam)
|
||||
atypes = assettypeparam.selectedvalue;
|
||||
|
||||
var unscheduled = $('#chk_unscheduled').prop('checked') ? "1" : "0";
|
||||
var scheduled = $('#sel_scheduled').val()
|
||||
var p = [
|
||||
JSON.stringify(jobsites),
|
||||
JSON.stringify(regions),
|
||||
@ -279,7 +128,7 @@
|
||||
$.trim($('#searchinputtxt').val()),
|
||||
begindate,
|
||||
enddate,
|
||||
unscheduled
|
||||
scheduled
|
||||
];
|
||||
jobsitequery("GetAssetSchedulers", htmlencode(JSON.stringify(p)), function (data) {
|
||||
showloading(false);
|
||||
@ -300,49 +149,30 @@
|
||||
}
|
||||
|
||||
var alljobsites;
|
||||
var jobsiteparam;
|
||||
var regionparam;
|
||||
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);
|
||||
setJobsites();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
function setJobsites() {
|
||||
@ -358,32 +188,25 @@
|
||||
}
|
||||
|
||||
var assettypes;
|
||||
var assettypeparam;
|
||||
function getAssetTypes() {
|
||||
if (assettypes)
|
||||
return;
|
||||
|
||||
$('#div_assettypes').empty();
|
||||
jobsitequery('GetAssetTypes', '', function (data) {
|
||||
if (typeof (data) === "string") {
|
||||
showAlert(data, GetTextByKey("P_AM_ERROR", 'Error'));
|
||||
return;
|
||||
}
|
||||
assettypes = data;
|
||||
assettypeparam = {
|
||||
items: data,
|
||||
selectedvalue: [],
|
||||
allowall: false,
|
||||
width: 280
|
||||
};
|
||||
var ipt = editmultiselect(assettypeparam);
|
||||
$('#div_assettypes').append(ipt);
|
||||
|
||||
var ats = [...assettypes];
|
||||
ats = ats.filter(t => t.Tag1 == "1");
|
||||
$("#div_assettypes").dropdownSource(ats);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var assetgroups;
|
||||
var assetgroupparam;
|
||||
function getAssetGroups() {
|
||||
jobsitequery('GetAssetGroups', '', function (data) {
|
||||
if (typeof (data) === "string") {
|
||||
@ -391,21 +214,22 @@
|
||||
return;
|
||||
}
|
||||
assetgroups = data;
|
||||
assetgroupparam = {
|
||||
items: data,
|
||||
selectedvalue: [],
|
||||
width: 240
|
||||
};
|
||||
var ipt = editmultiselect(assetgroupparam);
|
||||
$('#div_assetgroup').append(ipt);
|
||||
$("#div_assetgroup").dropdownSource(assetgroups);
|
||||
});
|
||||
}
|
||||
|
||||
function OnSorts() {
|
||||
grid_dt.showSortPanel();
|
||||
}
|
||||
|
||||
$(function () {
|
||||
setPageTitle(GetTextByKey("P_JS_SCHEDULER", "Scheduler"), true);
|
||||
$('.iconlayout').on('click', function (ev) {
|
||||
CreateLayoutMenus(ev.target, gridLayoutID, grid_dt);
|
||||
return false;
|
||||
});
|
||||
InitGridData();
|
||||
jobsiteschedulerCtrl = new $jobsiteschedulerCtrl();
|
||||
jobsiteschedulerCtrl.Init($("#schedulerlist1"), false);
|
||||
InitJobsiteschedulerGridData();
|
||||
getJobsitesAndRegions();
|
||||
getAssetGroups();
|
||||
getAssetTypes();
|
||||
@ -417,6 +241,48 @@
|
||||
}).resize();
|
||||
OnRefresh();
|
||||
|
||||
$("#div_assettypes").css('width', 120).dropdown([], {
|
||||
search: true,
|
||||
multiselect: true,
|
||||
allowselectall: false,
|
||||
textKey: 'Value',
|
||||
valueKey: 'Key'
|
||||
});
|
||||
|
||||
$("#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'
|
||||
});
|
||||
|
||||
$("#div_assetgroup").css('width', 120).dropdown([], {
|
||||
search: true,
|
||||
multiselect: true,
|
||||
allowselectall: true,
|
||||
textKey: 'Value',
|
||||
valueKey: 'Key'
|
||||
});
|
||||
|
||||
$("#chkmanagetypeonly").on('change', function () {
|
||||
var selectedtypes = $("#div_assettypes").dropdownVals() || [];
|
||||
var ats = [...assettypes];
|
||||
if ($(this).prop('checked')) {
|
||||
ats = ats.filter(t => t.Tag1 == "1");
|
||||
}
|
||||
$("#div_assettypes").dropdownSource(ats);
|
||||
$("#div_assettypes").dropdownVals(selectedtypes);
|
||||
});
|
||||
|
||||
$('#searchinputtxt').keydown(searchEnter);
|
||||
|
||||
$('#dialog_managescheduler').dialog(function () {
|
||||
@ -428,15 +294,7 @@
|
||||
$('#dialogmask').hide();
|
||||
$('#dialogmask1').hide();
|
||||
})
|
||||
|
||||
$("#txtbegindate").datetimepicker({
|
||||
timepicker: false,
|
||||
format: 'm/d/Y'
|
||||
});
|
||||
$("#txtenddate").datetimepicker({
|
||||
timepicker: false,
|
||||
format: 'm/d/Y'
|
||||
}); $('#dialog_addbegindate').datetimepicker({
|
||||
$('#dialog_addbegindate').datetimepicker({
|
||||
timepicker: false,
|
||||
format: 'm/d/Y',
|
||||
enterLikeTab: false,
|
||||
@ -459,17 +317,17 @@
|
||||
</script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
||||
<div id="contentctrl">
|
||||
<div id="contentctrl" style="min-width: 1540px;">
|
||||
<div class="page_title" data-lgid="P_JS_SCHEDULER">Scheduler</div>
|
||||
<div class="search_bar" style="min-width: 1300px;">
|
||||
<div class="search_bar">
|
||||
<input type="password" autocomplete="new-password" style="display: none" />
|
||||
<span data-lgid="P_AM_BEGINDATE_COLON">Begin Date:</span>
|
||||
<div>
|
||||
<input type="text" style="margin-left: 5px; width: 75px;" id="txtbegindate" value="<%=BeginDate %>" autocomplete="off" />
|
||||
<input id="txtbegindate" type="date" class="type-date" required min="1900-01-01" style="margin-left: 5px; width: 90px;" value="<%=BeginDate %>" autocomplete="off" />
|
||||
</div>
|
||||
<span data-lgid="P_AM_ENDDATE_COLON">End Date:</span>
|
||||
<div>
|
||||
<input type="text" style="margin-left: 5px; width: 75px;" id="txtenddate" autocomplete="off" />
|
||||
<input id="txtenddate" type="date" class="type-date" required min="1900-01-01" style="margin-left: 5px; width: 90px;" autocomplete="off" />
|
||||
</div>
|
||||
<span data-lgid="P_JS_REGION_COLON">Region:</span>
|
||||
<div id="div_region" style="margin-top: 1px;"></div>
|
||||
@ -479,10 +337,15 @@
|
||||
<div id="div_assetgroup" style="margin-top: 1px;"></div>
|
||||
<span data-lgid="P_JS_ASSETTYPE_COLON" style="margin-left: 10px;">Asset Type:</span>
|
||||
<div id="div_assettypes" style="margin-top: 1px;"></div>
|
||||
<input type="checkbox" id="chkmanagetypeonly" style="margin-left: 5px;" checked="checked" />
|
||||
<label for="chkmanagetypeonly" data-lgid="P_JS_MANAGEDTYPESONLY">Managed Types Only</label>
|
||||
<input type="text" id="searchinputtxt" autocomplete="off" style="margin-left: 5px; width: 100px;" />
|
||||
<input class="search" type="button" onclick="OnRefresh();" value="Search" data-lgid="P_CM_SEARCH" style="margin-left: 5px;" />
|
||||
<input id="chk_unscheduled" type="checkbox" onclick="OnRefresh();" />
|
||||
<label data-lgid="P_JS_UNSCHEDULED" for="chk_unscheduled">Unscheduled</label>
|
||||
<select id="sel_scheduled" onchange="OnRefresh();" style="margin-left: 5px; width: 160px;">
|
||||
<option value="0" data-lgid="P_JS_SCHEDULEDONLY">Scheduled Only</option>
|
||||
<option value="1" data-lgid="P_JS_UNSCHEDULEDONLY">Unscheduled Only</option>
|
||||
<option value="-1" data-lgid="P_JS_BOTHSCHEDULEDUNSCHEDULED">Both Scheduled & Unscheduled</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="function_title">
|
||||
<%if (!IsReadOnly)
|
||||
@ -490,11 +353,15 @@
|
||||
<span class="sbutton iconadd" onclick="OnAdd();" data-lgid="P_JS_ADD"></span>
|
||||
<%} %>
|
||||
<span class="sbutton iconrefresh" onclick="OnRefresh();" data-lgid="P_JS_REFRESH"></span>
|
||||
<span class="sbutton iconlayout iconmenu" data-lgid="P_MR_LAYOUT">Layout</span>
|
||||
<span class="sbutton iconfilter" onclick="OnSorts();" data-lgid="P_GRID_SORT">Sort</span>
|
||||
</div>
|
||||
<div id="schedulerlist"></div>
|
||||
<div id="schedulerlist" style="position: relative"></div>
|
||||
</div>
|
||||
|
||||
<div id="mask_bg" style="display: none;"><div class="loading c-spin"></div></div>
|
||||
<div id="mask_bg" style="display: none;">
|
||||
<div class="loading c-spin"></div>
|
||||
</div>
|
||||
<div class="dialog subdialog" id="dialog_scheduler" style="display: none; border-bottom: 0; border-top: 0;">
|
||||
<%--<div class="dialog-title"><span class="title">Add Work Order</span></div>--%>
|
||||
<iframe id="iframescheduler" src="AddScheduler.aspx" style="width: 100%; height: 100%; display: block; border: none;"></iframe>
|
||||
@ -523,7 +390,7 @@
|
||||
<span class="sbutton iconadd" onclick="openAddScheduler()" data-lgid="P_JS_ADD">Add</span>
|
||||
<span class="sbutton icondelete" onclick="onDeleteScheduler()" data-lgid="P_JS_DELETE">Delete</span>
|
||||
</div>
|
||||
<div id="schedulerlist1" style="height: 300px; width: 600px;"></div>
|
||||
<div id="schedulerlist1" style="height: 360px; width: 720px;"></div>
|
||||
|
||||
<div class="dialog-func">
|
||||
<input type="button" value="Close" data-lgid="P_JS_CANCEL" class="dialog-close" tabindex="28" />
|
||||
@ -535,10 +402,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dialog" id="dialog_addscheduler" style="display: none; width: 500px;">
|
||||
<div class="dialog" id="dialog_addscheduler" style="display: none; width: 480px;">
|
||||
<div class="dialog-title"><span class="title" data-lgid="P_JS_ADDSCHEDULER"></span><em class="dialog-close"></em></div>
|
||||
<div class="edit-content">
|
||||
<table style="line-height: 30px;">
|
||||
<table style="line-height: 30px; margin-top: 10px;">
|
||||
<tr>
|
||||
<td class="label" data-lgid="P_JS_JOBSITE_COLON"></td>
|
||||
<td>
|
||||
@ -558,7 +425,7 @@
|
||||
<tr>
|
||||
<td class="label" data-lgid="P_JS_POINTOFCONTACT_COLON">Point of Contact:</td>
|
||||
<td>
|
||||
<input type="text" id="dialog_pointofcontact" maxlength="100" autocomplete="off" style="width: 100px;" />
|
||||
<input type="text" id="dialog_pointofcontact" maxlength="100" tabindex="1" autocomplete="off" style="width: 100px;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -570,8 +437,8 @@
|
||||
</table>
|
||||
</div>
|
||||
<div class="dialog-func">
|
||||
<input type="button" value="Close" data-lgid="P_JS_CANCEL" class="dialog-close" tabindex="28" />
|
||||
<input type="button" onclick="onAddScheduler();" data-lgid="P_JS_OK" value="OK" tabindex="27" />
|
||||
<input type="button" value="Close" data-lgid="P_JS_CANCEL" class="dialog-close" tabindex="3" />
|
||||
<input type="button" onclick="onAddScheduler();" data-lgid="P_JS_OK" value="OK" tabindex="2" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div id="dialogmask1" class="maskbg" style="display: none;">
|
||||
|
@ -40,7 +40,7 @@ public partial class SchedulerManagement : JobSiteRequirementsBasePage
|
||||
}
|
||||
|
||||
DateTime userlocaldate = SystemParams.ConvertToUserTimeFromUtc(GetCurrentLoginSession().User, DateTime.UtcNow);
|
||||
BeginDate = userlocaldate.ToShortDateString();
|
||||
BeginDate = userlocaldate.ToString("yyyy-MM-dd");
|
||||
CurrentDate = userlocaldate.ToShortDateString();
|
||||
}
|
||||
|
||||
@ -51,4 +51,15 @@ public partial class SchedulerManagement : JobSiteRequirementsBasePage
|
||||
return Foresight.Fleet.Services.User.Feature.JOB_SITES_SCHEDULER;
|
||||
}
|
||||
}
|
||||
public bool IsAdmin
|
||||
{
|
||||
get
|
||||
{
|
||||
var user = GetCurrentUser();
|
||||
if (user.UserType == IronIntel.Contractor.Users.UserTypes.SupperAdmin || user.UserType == IronIntel.Contractor.Users.UserTypes.Admin)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
@ -3,11 +3,8 @@ function GetRoadMachines() {
|
||||
jobsitequery("GetRoadMachines", "", function (data) {
|
||||
if (data && data.length > 0) {
|
||||
allroadassets = data;
|
||||
editableSelectAssignAsset.setEnable(true);
|
||||
|
||||
editableSelectAssignAsset.datasource = data;
|
||||
editableSelectAssignAsset.valuepath = "Id"
|
||||
editableSelectAssignAsset.displaypath = "DisplayName";
|
||||
$('#dialog_assignasset').dropdownDisabled(false);
|
||||
$('#dialog_assignasset').dropdownSource(data);
|
||||
}
|
||||
|
||||
}, function (err) {
|
||||
@ -19,8 +16,9 @@ function openAssignDispatch(seltype,) {
|
||||
_seltype = seltype;
|
||||
if (_sendType == 1) {
|
||||
_selectdispatchids = [];
|
||||
for (var i = 0; i < grid_dt.source.length; i++) {
|
||||
var ct = grid_dt.source[i].Values;
|
||||
var tempsource = grid_dt.source;
|
||||
for (var i = 0; i < tempsource.length; i++) {
|
||||
var ct = tempsource[i];
|
||||
if (ct.Selected) {
|
||||
_selectdispatchids.push(ct.DispatchId);
|
||||
}
|
||||
@ -38,7 +36,7 @@ function openAssignDispatch(seltype,) {
|
||||
|
||||
if (!allroadassets)
|
||||
GetRoadMachines();
|
||||
editableSelectAssignAsset.val('');
|
||||
$('#dialog_assignasset').dropdownVal('');
|
||||
showmaskbg(true);
|
||||
$('#dialog_assignment .dialog-title span.title').text(GetTextByKey('P_JS_DISPATCHASSIGNMENT', 'Dispatch Assignment'));
|
||||
$('#dialog_assignment')
|
||||
@ -53,7 +51,7 @@ function openAssignDispatch(seltype,) {
|
||||
|
||||
var assignAsset = null;
|
||||
function onAssignContinue() {
|
||||
assignAsset = editableSelectAssignAsset.selecteditem();
|
||||
assignAsset = $('#dialog_assignasset').dropdownItem();
|
||||
if (assignAsset == null) {
|
||||
onAssignSkip();
|
||||
}
|
||||
|
@ -15,8 +15,7 @@ function showContactList(data) {
|
||||
}
|
||||
r.Text = false;
|
||||
r.Email = false;
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_maildt.setData(rows);
|
||||
@ -24,12 +23,7 @@ function showContactList(data) {
|
||||
|
||||
var grid_maildt;
|
||||
function InitEmailGridData() {
|
||||
grid_maildt = new GridView('#contactlist');
|
||||
grid_maildt.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_maildt = createGridView('#contactlist');
|
||||
var list_columns = [
|
||||
{ name: 'DisplayName', caption: GetTextByKey("P_MV_CONTACTNAME", "Contact Name"), valueIndex: 'DisplayName', css: { 'width': 148, 'text-align': 'left' } },
|
||||
{ name: 'ContactTypeName', caption: GetTextByKey("P_MV_CONTACTTYPE", "Contact Type"), valueIndex: 'ContactTypeName', css: { 'width': 148, 'text-align': 'left' } },
|
||||
@ -65,12 +59,6 @@ function InitEmailGridData() {
|
||||
grid_maildt.canMultiSelect = false;
|
||||
grid_maildt.columns = columns;
|
||||
grid_maildt.init();
|
||||
|
||||
grid_maildt.selectedrowchanged = function (rowindex) {
|
||||
var rowdata = grid_maildt.source[rowindex];
|
||||
if (rowdata) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -84,8 +72,9 @@ function getDispatchContacts(assetids) {
|
||||
ids = assetids;
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < grid_dt.source.length; i++) {
|
||||
var ct = grid_dt.source[i].Values;
|
||||
var tempsource = grid_dt.source;
|
||||
for (var i = 0; i < tempsource.length; i++) {
|
||||
var ct = tempsource[i];
|
||||
if (ct.Selected && ids.indexOf(ct.AssetId) < 0)
|
||||
ids.push(ct.AssetId);
|
||||
}
|
||||
@ -177,8 +166,9 @@ function onSendEmails() {
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < grid_maildt.source.length; i++) {
|
||||
var ct = grid_maildt.source[i].Values;
|
||||
var tempsource = grid_maildt.source;
|
||||
for (var i = 0; i < tempsource.length; i++) {
|
||||
var ct = tempsource[i];
|
||||
if (ct.Email) {
|
||||
emailaddress.push({ 'Key': ct.IID, 'Value': ct.ID });
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,10 +2,11 @@
|
||||
function showSchedulerData(data) {
|
||||
if (data) {
|
||||
assetsObj = data;
|
||||
var col = grid_dt.columns.find(c => c.name === 'Schedules');
|
||||
if (assetsObj.HasSchedule)
|
||||
grid_dt.columns[grid_dt.columns.length - 1].width = assetsObj.TotalDays * 5;
|
||||
col.width = assetsObj.TotalDays * 5;
|
||||
else
|
||||
grid_dt.columns[grid_dt.columns.length - 1].width = 320;
|
||||
col.width = 320;
|
||||
grid_dt.init();
|
||||
showSchedulerList(data.DispatchAssets);
|
||||
}
|
||||
@ -21,8 +22,22 @@ function showSchedulerList(data) {
|
||||
var rows = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
var fr = { Values: r };
|
||||
rows.push(fr);
|
||||
for (var j in r) {
|
||||
if (j === "StartDate") {
|
||||
r[j] = { DisplayValue: r["StartDateStr"], Value: r[j] };
|
||||
}
|
||||
else if (j === "FinishDate") {
|
||||
r[j] = { DisplayValue: r["FinishDateStr"], Value: r[j] };
|
||||
}
|
||||
else if (j === "EngineHours") {
|
||||
r[j] = { DisplayValue: r[j] === null ? "" : r[j], Value: r[j] };
|
||||
}
|
||||
if (r.AttachedToAsset)
|
||||
r.AttachedToAssetName = r.AttachedToAsset.AssetName;
|
||||
else
|
||||
r.AttachedToAssetName = r.AssetName;
|
||||
}
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_dt.setData(rows);
|
||||
@ -31,21 +46,21 @@ function showSchedulerList(data) {
|
||||
|
||||
var grid_dt;
|
||||
function InitGridData() {
|
||||
grid_dt = new GridView('#schedulerlist');
|
||||
grid_dt.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dt = createGridView('#schedulerlist', true);
|
||||
var list_columns = [
|
||||
{ name: 'TypeName', caption: GetTextByKey("P_JS_ASSETTYPE", "Asset Type"), valueIndex: 'TypeName', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'MakeName', caption: GetTextByKey("P_PM_MAKE", "Make"), valueIndex: 'MakeName', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'ModelName', caption: GetTextByKey("P_PM_MODEL", "Model"), valueIndex: 'ModelName', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'MakeName', caption: GetTextByKey("P_JS_MAKE", "Make"), valueIndex: 'MakeName', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'ModelName', caption: GetTextByKey("P_JS_MODEL", "Model"), valueIndex: 'ModelName', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'AssetName', caption: GetTextByKey("P_JS_ASSETNAME", "Asset Name"), valueIndex: 'AssetName', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'AttachedToAsset', caption: GetTextByKey("P_JS_ATTACHEDTO", "Attached To"), valueIndex: 'AttachedToAssetName', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'CurrentJobSite', caption: GetTextByKey("P_JS_CURRJOBSITE", "Current Jobsite"), allowFilter: true, valueIndex: 'CurrentJobSite', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'NextJobSite', caption: GetTextByKey("P_JS_SCHEDULEDFOR", "Scheduled For"), allowFilter: true, valueIndex: 'NextJobSite', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'AssetGroups', caption: GetTextByKey("P_JS_ASSETGROUP", "Asset Group"), valueIndex: 'AssetGroups', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'EngineHours', caption: GetTextByKey("P_JS_ENGINEHOURS", "Engine Hours"), valueIndex: 'EngineHours', css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'EngineHours', caption: GetTextByKey("P_JS_ENGINEHOURS", "Engine Hours"), valueIndex: 'EngineHours', allowFilter: true, css: { 'width': 100, 'text-align': 'right' } },
|
||||
{ name: 'AquisitionType', caption: GetTextByKey("P_JS_ACQUISITIONTYPE", "Acquisition Type"), valueIndex: 'AquisitionType', allowFilter: true, css: { 'width': 150, 'text-align': 'left' } },
|
||||
{ name: 'StartDate', caption: GetTextByKey("P_JS_START", "Start"), valueIndex: 'StartDate', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'FinishDate', caption: GetTextByKey("P_JS_FINISH", "Finish"), valueIndex: 'FinishDate', allowFilter: true, css: { 'width': 100, 'text-align': 'left' } },
|
||||
{ name: 'DurationDays', caption: GetTextByKey("P_JS_DURATIONDAYS", "Duration (days)"), valueIndex: 'DurationDays', allowFilter: true, css: { 'width': 120, 'text-align': 'right' } },
|
||||
{ name: 'Schedules', caption: "gantt", valueIndex: 'ScheduleParts', css: { 'width': 320, 'text-align': 'left' } }
|
||||
];
|
||||
var columns = [];
|
||||
@ -63,286 +78,176 @@ function InitGridData() {
|
||||
col.type = list_columns[hd].type;
|
||||
|
||||
col.alwaysshow = list_columns[hd].alwaysshow;
|
||||
if (col.name === "Schedules") {
|
||||
var labelCount = 4;
|
||||
if (col.name === "AttachedToAsset") {
|
||||
col.sortFilter = function (a, b) {
|
||||
|
||||
col.sortable = false;
|
||||
col.allowHtml = true;
|
||||
col.caption = function () {
|
||||
if (!assetsObj || !assetsObj.HasSchedule) return;
|
||||
|
||||
var container = $('<span></span>').css({ position: 'relative', height: '100%', display: 'block' });
|
||||
var left = 0;
|
||||
for (var i = 0; i < assetsObj.Labels.length; i++) {
|
||||
var label = assetsObj.Labels[i];
|
||||
var sp = $('<span class="span-caption"></span>').text(label.Key).css({ left: left });
|
||||
left += parseInt(label.Value) * 5;
|
||||
container.append(sp);
|
||||
}
|
||||
grid_dt.resize();
|
||||
|
||||
//var totalDays = (led.getTime() - fbd.getTime()) / (1000 * 60 * 60 * 24);
|
||||
//var interval = parseInt(totalDays / labelCount);
|
||||
//if (totalDays % labelCount != 0)
|
||||
// interval += 1;
|
||||
|
||||
//var d = new Date(assetsObj.BeginDate);
|
||||
//var w = col.width / labelCount;
|
||||
//for (var i = 0; i < labelCount; i++) {
|
||||
// var label = new DateFormatter().formatDate(d, 'm/d/Y');
|
||||
// var sp = $('<span class="span-caption"></span>').text(label).css({ left: w * i });
|
||||
// container.append(sp);
|
||||
// d = new Date(d.getTime() + interval * 1000 * 60 * 60 * 24);
|
||||
//}
|
||||
return container;
|
||||
a = a.AttachedToAssetName + (a.AttachedToAsset ? "1" : "");
|
||||
b = b.AttachedToAssetName + (b.AttachedToAsset ? "1" : "");
|
||||
return a > b ? 1 : -1;
|
||||
}
|
||||
col.filter = function (item) {
|
||||
if (item.ScheduleParts && assetsObj && assetsObj.HasSchedule) {
|
||||
var totalDays = assetsObj.TotalDays;
|
||||
var interval = parseInt(totalDays / labelCount);
|
||||
if (totalDays % labelCount != 0)
|
||||
interval += 1;
|
||||
totalDays = interval * labelCount;
|
||||
|
||||
var container = $('<div></div>').css({
|
||||
position: 'relative',
|
||||
height: '20px',
|
||||
});
|
||||
|
||||
var d = new Date(assetsObj.BeginDate);
|
||||
for (var i = 0; i < item.ScheduleParts.length; i++) {
|
||||
var sp = item.ScheduleParts[i];
|
||||
var bdate = new Date(sp.BeginDate);
|
||||
var edate = new Date(sp.EndDate);
|
||||
var l = (bdate.getTime() - d.getTime()) / (1000 * 60 * 60 * 24) / totalDays * col.width;
|
||||
var w = (edate.getTime() - bdate.getTime()) / (1000 * 60 * 60 * 24) / totalDays * col.width;
|
||||
var color = "";
|
||||
if (sp.Schedules.length == 1)
|
||||
color = sp.Schedules[0].Color;
|
||||
else {
|
||||
for (var j = 0; j < sp.Schedules.length; j++) {
|
||||
if (color !== "")
|
||||
color += ","
|
||||
color += sp.Schedules[j].Color;
|
||||
}
|
||||
}
|
||||
|
||||
var df = new DateFormatter();
|
||||
var title = df.formatDate(bdate, 'm/d/Y') + " - " + df.formatDate(new Date((edate.getTime() - 1000 * 60 * 60 * 24)), 'm/d/Y') + "\n";
|
||||
for (var j = 0; j < sp.Schedules.length; j++) {
|
||||
var bd = new Date(sp.Schedules[j].BeginDate);
|
||||
var ed = new Date(sp.Schedules[j].EndDate);
|
||||
title += sp.Schedules[j].JobSiteName + ": " + df.formatDate(bd, 'm/d/Y') + " - " + df.formatDate(ed, 'm/d/Y');
|
||||
if (sp.Schedules[j].PointOfContact)
|
||||
title += "\n " + GetTextByKey("P_JS_CONTACT_COLON", "Contact: ") + " " + sp.Schedules[j].PointOfContact;
|
||||
if (sp.Schedules[j].Creator)
|
||||
title += "\n " + GetTextByKey("P_JS_CREATOR_COLON", "Creator: ") + " " + sp.Schedules[j].Creator;
|
||||
if (j != sp.Schedules.length - 1)
|
||||
title += "\n";
|
||||
}
|
||||
|
||||
var bar = $('<span class="span-bar"></span>');
|
||||
bar.css({
|
||||
left: l,
|
||||
width: w - 1,
|
||||
'border-left': '1px solid transparen'
|
||||
});
|
||||
if (sp.Schedules.length == 1)
|
||||
bar.css("backgroundColor", color);
|
||||
else {
|
||||
//bar.css("background", "url(img/gridline.jpg) repeat 20px 20px");
|
||||
//bar.css("background", "linear-gradient(45deg," + color + ")");
|
||||
//bar.css("background-image", "repeating-linear-gradient(45deg,white, white 5px,#ff9900 5px,#ff9900 7px)");
|
||||
//bar.css("background-image", "repeating-linear-gradient(135deg,blue 1px, transparent 0), repeating-linear-gradient(45deg, red 1px, transparent 0)");
|
||||
//bar.css("background-size", "5px 5px");
|
||||
|
||||
//bar.css("background-image", "url(\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><g fill='orange' fill-opacity='1'><path fill-rule='evenodd' d='M0 0h4v4H0V0zm4 4h4v4H4V4z'/></g></svg>\")");
|
||||
|
||||
bar.css("background-image", "url(\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><g fill-opacity='0.5'><path d='M0 0L8 8z M0 8L8 0z' style='fill:white;stroke:gray;stroke-width:1'/></g></svg>\")");
|
||||
}
|
||||
bar.attr("title", title);
|
||||
if (!IsReadOnly) {
|
||||
bar.dblclick(sp, function (e) {
|
||||
onEditScheduler(item, e.data.Schedules);
|
||||
});
|
||||
}
|
||||
container.append(bar);
|
||||
}
|
||||
return container;
|
||||
}
|
||||
}
|
||||
else if (col.name === "Schedules") {
|
||||
col.sortable = false;
|
||||
col.orderable = false;
|
||||
col.type = SchedulesColumn;
|
||||
col.onScheduleClicked = function (item, sp) {
|
||||
onEditScheduler(item, sp.Schedules);
|
||||
};
|
||||
col.styleFilter = function () {
|
||||
return {
|
||||
'margin-top': '3px',
|
||||
'margin-bottom': '0px',
|
||||
'position': 'relative',
|
||||
'height': '36px',
|
||||
};
|
||||
}
|
||||
}
|
||||
columns.push(col);
|
||||
}
|
||||
grid_dt.canMultiSelect = false;
|
||||
grid_dt.columns = columns;
|
||||
grid_dt.init();
|
||||
grid_dt.celldblclick = function (rowindex, columnIndex) {
|
||||
grid_dt.onCellDblClicked = function (rowindex, columnIndex) {
|
||||
if (!IsReadOnly) {
|
||||
if (columnIndex != grid_dt.columns.length - 1) {
|
||||
var rowdata = grid_dt.source[rowindex];
|
||||
if (rowdata) {
|
||||
onEditScheduler(rowdata.Values);
|
||||
onEditScheduler(rowdata);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
grid_dt.selectedrowchanged = function (rowindex) {
|
||||
var rowdata = grid_dt.source[rowindex];
|
||||
if (rowdata) {
|
||||
grid_dt.allcolumns = columns;
|
||||
// multiple sort
|
||||
grid_dt.columnchanged = function (ev) {
|
||||
if (ev === 'sort') {
|
||||
try {
|
||||
var sorts = JSON.parse(window.localStorage.getItem('jobsite_schedulers_sorts'));
|
||||
delete sorts[`${companyid}_${userid}`];
|
||||
window.localStorage.setItem('jobsite_schedulers_sorts', JSON.stringify(sorts));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
};
|
||||
grid_dt.onsorts = function (arr) {
|
||||
var sorts;
|
||||
try {
|
||||
sorts = JSON.parse(window.localStorage.getItem('jobsite_schedulers_sorts'));
|
||||
if (sorts == null) {
|
||||
sorts = {};
|
||||
}
|
||||
}
|
||||
catch {
|
||||
sorts = {};
|
||||
}
|
||||
sorts[`${companyid}_${userid}`] = arr;
|
||||
window.localStorage.setItem('jobsite_schedulers_sorts', JSON.stringify(sorts));
|
||||
};
|
||||
try {
|
||||
var sorts = JSON.parse(window.localStorage.getItem('jobsite_schedulers_sorts'));
|
||||
grid_dt.sortArray = sorts[`${companyid}_${userid}`];
|
||||
} catch { }
|
||||
getGridLayout(gridLayoutID, grid_dt);
|
||||
}
|
||||
|
||||
if (typeof jobsiteschedulerCtrl !== 'function') {
|
||||
$jobsiteschedulerCtrl = function jobsiteschedulerCtrl() {
|
||||
this.tmpobj = {
|
||||
};
|
||||
this.wizardCtrl = null;
|
||||
this.vue = null;
|
||||
};
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var dataGrid = window.DataGrid || window['g5-datagrid'];
|
||||
|
||||
$jobsiteschedulerCtrl.prototype.getData = function (/*dataObj, tmpdata*/) {
|
||||
return this.vue.source;
|
||||
};
|
||||
|
||||
$jobsiteschedulerCtrl.prototype.setData = function (data) {
|
||||
if (data) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
data[i].Selected = false;
|
||||
}
|
||||
function showJobsiteSchedulerList(data) {
|
||||
var rows = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
r.Selected = false;
|
||||
r.Changed = false;
|
||||
for (var j in r) {
|
||||
if (j === "BeginDate") {
|
||||
r[j] = { DisplayValue: r["BeginDateStr"], Value: r[j] };
|
||||
}
|
||||
if (j === "EndDate") {
|
||||
r[j] = { DisplayValue: r["EndDateStr"], Value: r[j] };
|
||||
}
|
||||
this.vue.source = data ? data : [];
|
||||
this.vue.$refs.grid.resize();
|
||||
};
|
||||
|
||||
$jobsiteschedulerCtrl.prototype.reload = function () {
|
||||
this.vue.$refs.grid.reload()
|
||||
};
|
||||
|
||||
$jobsiteschedulerCtrl.prototype.Init = function (parent, newselected) {
|
||||
var ethis = this;
|
||||
//加载子页面模版
|
||||
parent.load('../template/JobsiteSchedulerCtrl.html?v=8', function () {
|
||||
ethis.vue = new Vue({
|
||||
el: parent.find('.JobsiteSchedulerCtrl')[0],
|
||||
components: {
|
||||
'data-grid': dataGrid
|
||||
},
|
||||
data: {
|
||||
wnd: window.parent,
|
||||
//editable: true,
|
||||
columns: [],
|
||||
source: []
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
watch: {
|
||||
source: function (val) {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
cellvaluechanged: function (item, key) {
|
||||
},
|
||||
rowdblclick: function (e) {
|
||||
}
|
||||
}
|
||||
});
|
||||
ethis.vue.columns = createGridColumn(newselected);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
function createGridColumn(newselected) {
|
||||
var editable = true;
|
||||
var columns = [
|
||||
{
|
||||
key: 'Selected',
|
||||
caption: '',
|
||||
type: dataGrid.COLUMN_TYPE.checkbox,
|
||||
width: 30,
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
orderable: false,
|
||||
resizable: false,
|
||||
allcheck: false,
|
||||
enabled: function (item) {
|
||||
return !item.Completed;
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'JobSiteName',
|
||||
caption: GetTextByKey("P_JS_JOBSITE", "Jobsite"),
|
||||
type: dataGrid.COLUMN_TYPE.label,
|
||||
width: 200,
|
||||
orderable: false,
|
||||
resizable: false,
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
key: 'BeginDateStr',
|
||||
caption: GetTextByKey("P_JS_BEGINDATE", 'Begin Date'),
|
||||
type: dataGrid.COLUMN_TYPE.datepicker,
|
||||
width: 120,
|
||||
orderable: false,
|
||||
resizable: false,
|
||||
enabled: editable,
|
||||
onchanged: function (item) {
|
||||
item.Changed = true;
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'EndDateStr',
|
||||
caption: GetTextByKey("P_JS_ENDDATE", 'End Date'),
|
||||
type: dataGrid.COLUMN_TYPE.datepicker,
|
||||
width: 120,
|
||||
orderable: false,
|
||||
resizable: false,
|
||||
enabled: editable,
|
||||
onchanged: function (item) {
|
||||
item.Changed = true;
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'Delete',
|
||||
type: dataGrid.COLUMN_TYPE.link,
|
||||
align: 'center',
|
||||
width: 30,
|
||||
orderable: false,
|
||||
resizable: false,
|
||||
enabled: editable,
|
||||
filter: function (item) {
|
||||
return item.Completed ? '' : '\uf00d';
|
||||
},
|
||||
onclick: function (e, item) {
|
||||
onDeleteScheduler(item);
|
||||
},
|
||||
styleFilter: function (item) {
|
||||
return {
|
||||
'font-family': 'FontAwesome',
|
||||
'cursor': 'pointer',
|
||||
'color': 'rgb(123, 28, 33)'
|
||||
};
|
||||
},
|
||||
attrs: { 'title': GetTextByKey("P_JS_DELETE", 'Delete') }
|
||||
}
|
||||
];
|
||||
|
||||
return columns;
|
||||
}
|
||||
}());
|
||||
rows.push(r);
|
||||
}
|
||||
|
||||
grid_jsschedulerdt.setData(rows);
|
||||
grid_jsschedulerdt.refresh();
|
||||
}
|
||||
|
||||
var grid_jsschedulerdt;
|
||||
function InitJobsiteschedulerGridData() {
|
||||
grid_jsschedulerdt = createGridView('#schedulerlist1');
|
||||
grid_jsschedulerdt.isEditable = true;
|
||||
var list_columns = [
|
||||
{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, css: { 'width': 45, 'text-align': 'center' } },
|
||||
{ name: 'JobSiteName', caption: GetTextByKey("P_JOBSITES", "Jobsite"), valueIndex: 'JobSiteName', allowFilter: true, css: { 'width': 130, 'text-align': 'left' } },
|
||||
{ name: 'BeginDate', caption: GetTextByKey("P_JS_BEGINDATE", 'Begin Date'), valueIndex: 'BeginDate', allowFilter: true, css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'EndDate', caption: GetTextByKey("P_JS_ENDDATE", 'End Date'), valueIndex: 'EndDate', allowFilter: true, css: { 'width': 120, 'text-align': 'left' } },
|
||||
{ name: 'Delete', caption: "", alwaysshow: true, css: { 'width': 30, 'text-align': 'center' } }
|
||||
];
|
||||
var columns = [];
|
||||
// head
|
||||
for (var hd in list_columns) {
|
||||
var col = {};
|
||||
col.name = list_columns[hd].name;
|
||||
col.caption = list_columns[hd].caption;
|
||||
col.visible = true;
|
||||
col.sortable = true;
|
||||
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;
|
||||
col.oldFilterValues = col.filterValues;
|
||||
if (list_columns[hd].type) {
|
||||
col.type = list_columns[hd].type;
|
||||
}
|
||||
|
||||
col.alwaysshow = list_columns[hd].alwaysshow;
|
||||
|
||||
var DateColumn = window['lib-ui'].GridDateColumn;
|
||||
if (col.name === "BeginDate") {
|
||||
col.type = DateColumn;
|
||||
col.filter = function (item, editing) {
|
||||
return item.BeginDateStr;
|
||||
};
|
||||
col.sortFilter = function (a, b) {
|
||||
a = a.BeginDate.Value;
|
||||
b = b.BeginDate.Value;
|
||||
return a > b ? 1 : (a < b ? -1 : 0);
|
||||
};
|
||||
col.onChanged = function (item, value) {
|
||||
item.BeginDateStr = item.BeginDate.DisplayValue = DateColumn.formatDate(value);
|
||||
item.BeginDate = item.BeginDate.Value;
|
||||
item.Changed = true;
|
||||
};
|
||||
}
|
||||
else if (col.name === "EndDate") {
|
||||
col.type = DateColumn;
|
||||
col.filter = function (item, editing) {
|
||||
return item.EndDateStr;
|
||||
};
|
||||
col.sortFilter = function (a, b) {
|
||||
a = a.EndDate.Value;
|
||||
b = b.EndDate.Value;
|
||||
return a > b ? 1 : (a < b ? -1 : 0);
|
||||
};
|
||||
col.onChanged = function (item, value) {
|
||||
item.EndDateStr = item.EndDate.DisplayValue = DateColumn.formatDate(value);
|
||||
item.EndDate = item.EndDate.Value;
|
||||
item.Changed = true;
|
||||
};
|
||||
}
|
||||
else if (col.name === "Delete") {
|
||||
col.sortable = false;
|
||||
col.resizable = false;
|
||||
col.type = GridView.ColumnTypes.Icon;
|
||||
col.text = 'times';
|
||||
col.events = {
|
||||
onclick: function () {
|
||||
onDeleteScheduler(this);
|
||||
}
|
||||
};
|
||||
col.attrs = { 'title': GetTextByKey("P_WO_DELETE", 'Delete') };
|
||||
}
|
||||
columns.push(col);
|
||||
}
|
||||
grid_jsschedulerdt.multiSelect = true;
|
||||
grid_jsschedulerdt.columns = columns;
|
||||
grid_jsschedulerdt.init();
|
||||
}
|
||||
|
||||
var currentscheduler;
|
||||
@ -372,10 +277,7 @@ function onEditScheduler(item, schedules) {
|
||||
'left': (document.documentElement.clientWidth - $('#dialog_managescheduler').width()) / 2
|
||||
}).showDialogfixed();
|
||||
|
||||
|
||||
if (jobsiteschedulerCtrl) {
|
||||
jobsiteschedulerCtrl.setData(allSchedulers);
|
||||
}
|
||||
showJobsiteSchedulerList(allSchedulers);
|
||||
}
|
||||
|
||||
function onDeleteScheduler(item) {
|
||||
@ -385,8 +287,9 @@ function onDeleteScheduler(item) {
|
||||
ids.push(schduler.DispatchId);
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < jobsiteschedulerCtrl.vue.source.length; i++) {
|
||||
var sch = jobsiteschedulerCtrl.vue.source[i];
|
||||
var tempsource = grid_jsschedulerdt.source;
|
||||
for (var i = 0; i < tempsource.length; i++) {
|
||||
var sch = tempsource[i];
|
||||
if (sch.Selected && !sch.Completed) {
|
||||
ids.push(sch.DispatchId);
|
||||
}
|
||||
@ -402,15 +305,16 @@ function onDeleteScheduler(item) {
|
||||
var dispatchids = [];
|
||||
if (schduler) {
|
||||
dispatchids.push(schduler.DispatchId);
|
||||
var index = jobsiteschedulerCtrl.vue.source.indexOf(schduler);
|
||||
jobsiteschedulerCtrl.vue.$refs.grid.deleteRow(index);
|
||||
var index = grid_jsschedulerdt.selectedIndex;
|
||||
grid_jsschedulerdt.removeItem(index);
|
||||
}
|
||||
else {
|
||||
for (var i = jobsiteschedulerCtrl.vue.source.length - 1; i >= 0; i--) {
|
||||
var sch = jobsiteschedulerCtrl.vue.source[i];
|
||||
var tempsource = grid_jsschedulerdt.source;
|
||||
for (var i = tempsource.length - 1; i >= 0; i--) {
|
||||
var sch = tempsource[i];
|
||||
if (sch.Selected && !sch.Completed) {
|
||||
dispatchids.push(sch.DispatchId);
|
||||
jobsiteschedulerCtrl.vue.$refs.grid.deleteRow(i);
|
||||
grid_jsschedulerdt.removeItem(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -432,8 +336,9 @@ function onDeleteScheduler(item) {
|
||||
|
||||
function checkSchedulerItems(alerttitle) {
|
||||
var items = [];
|
||||
for (var i = 0; i < jobsiteschedulerCtrl.vue.source.length; i++) {
|
||||
var sch = jobsiteschedulerCtrl.vue.source[i];
|
||||
var tempsource = grid_jsschedulerdt.source;
|
||||
for (var i = 0; i < tempsource.length; i++) {
|
||||
var sch = tempsource[i];
|
||||
if (sch.Changed) {
|
||||
var item = {
|
||||
'DispatchId': sch.DispatchId,
|
||||
@ -488,7 +393,7 @@ function checkSchedulerItems(alerttitle) {
|
||||
}
|
||||
|
||||
function onUpdateScheduler() {
|
||||
if (jobsiteschedulerCtrl.vue.source.length == 0) {
|
||||
if (grid_jsschedulerdt.source.length == 0) {
|
||||
$('#dialog_managescheduler').hide();
|
||||
showmaskbg(false);
|
||||
OnRefresh();
|
||||
@ -528,7 +433,7 @@ function onUpdateScheduler() {
|
||||
function openAddScheduler() {
|
||||
showmaskbg(true);
|
||||
$('#dialogmask').show();
|
||||
$('#dialog_addjobsite').val('');
|
||||
//$('#dialog_addjobsite').val('');
|
||||
$('#dialog_addbegindate').val('');
|
||||
$('#dialog_addenddate').val('');
|
||||
$('#dialog_addnotes').val('');
|
||||
@ -623,6 +528,7 @@ function onAddScheduler(ignorebeginpast) {
|
||||
scheduleritem.BeginDateStr = item.BeginDate;
|
||||
scheduleritem.EndDateStr = item.EndDate;
|
||||
allSchedulers.push(scheduleritem);
|
||||
showJobsiteSchedulerList(allSchedulers);
|
||||
}
|
||||
}, function (err) {
|
||||
console.log(err);
|
||||
|
Reference in New Issue
Block a user