This commit is contained in:
2024-03-26 15:56:31 +08:00
parent 634e8b71ab
commit 0855ae42cd
547 changed files with 94818 additions and 60463 deletions

View File

@ -16,55 +16,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: middle !important;
}
.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;*/
}
.div_filter {
margin-top: -3px;
}
.div_filter .dropdown {
width: 322px;
margin: 2px 0 0 0px;
}
.div_panel {
min-width: 200px;
.edit-content table td input[type="radio"] {
border: none;
width: unset;
height: unset;
}
.a {
@ -72,51 +28,12 @@
color: #2140fb;
}
.subtitle {
margin: 20px 40px 10px 0px;
font-size: 16px;
color: gray;
}
.subtitle span {
margin-left: 10px;
}
.subtitle hr {
background-color: #d8d8d8;
border: none;
height: 1px;
margin: 0;
}
.machinetd {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.tab-header {
float: left;
padding: 2px 6px;
cursor: pointer;
border: 1px solid #fff;
border-bottom: none;
}
.tab-header:hover {
background: #eee;
}
.tab-header.selected {
border-color: #d8d8d8;
cursor: default;
}
.tab-header.selected:hover {
background: #fff;
}
.ctl_button {
font-family: 'CalciteWebCoreIcons';
display: block;
@ -180,6 +97,40 @@
<script type="text/javascript">
var uid = '<%=IID%>';
var GridView1 = window['lib-ui'].Grid;
function showmaskbg1(flag, noanimation) {
if (window.parent && typeof window.parent.onmaskbg == 'function') {
window.parent.onmaskbg(flag, noanimation);
}
$('#mask_bg').children().hide();
if (noanimation) {
$('#mask_bg').css('display', flag ? '' : 'none');
} else {
if (flag) {
$('#mask_bg').fadeIn(100);
} else {
$('#mask_bg').fadeOut(100);
}
}
}
function showConfirm1(msg, title, fok, fcancel) {//与FIC中冲突
if (window.parent && typeof window.parent.showconfirm == 'function') {
window.parent.showconfirm(msg, title, fok, fcancel);
} else {
showmaskbg1(true);
_dialog.showConfirm(msg, title, function (e) {
showmaskbg1(false);
if (typeof fok === 'function') {
fok(e);
}
}, function () {
if (fcancel)
fcancel();
showmaskbg1(false);
});
}
}
function useroptionsrequest(method, param, callback, error) {
_network.request("SystemSettings/AssetAertFilter.aspx", -1, method, param, callback, error || function (e) {
@ -227,10 +178,10 @@
useroptionsrequest("SaveAssetAlertFilter", param, function (data) {
showloading(false);
if (data !== 'OK') {
showAlert(data, GetTextByKey("P_XXXX", 'Save Asset Alert Filter'));
showAlert(data, GetTextByKey("P_UM_SAVEPLANTALERTFILTER", 'Save Asset Alert Filter'));
} else {
getUserFilterData();
showAlert(GetTextByKey("P_SET_SAVSUCCESSFULLY", "Saved Successfully."), GetTextByKey("P_XXXX", 'Save Asset Alert Filter'));
showAlert(GetTextByKey("P_SET_SAVSUCCESSFULLY", "Saved Successfully."), GetTextByKey("P_UM_SAVEPLANTALERTFILTER", 'Save Asset Alert Filter'));
}
}, function (err) {
showloading(false);
@ -240,6 +191,7 @@
var userfiltertemplateloaded = false;
$(function () {
$('input[placeholder=Search]').attr("placeholder", GetTextByKey("P_AM_SEARCH", "Search"));
OnRefresh();
});
@ -255,7 +207,7 @@
<div class="edit-content">
<div id="div_container">
<div style="margin: 9px 6px 20px">
<span class="title" data-lgid="P_XXXX">Filter Templates:</span>
<span class="title" data-lgid="P_UM_FILTERTEMPLATES_COLON">Filter Templates:</span>
<select id="sel_filtertemplate" style="width: 300px;"></select>
<span class="sbutton iconadd" onclick="onOpenFilterTemplate(0);" data-lgid="P_UM_ADD"></span>
<span class="sbutton iconedit" onclick="onOpenFilterTemplate(1);" data-lgid="P_UM_EDIT"></span>
@ -360,11 +312,11 @@
</div>
<div class="dialog" id="dialog_filtertemplate" style="display: none; width: 500px;">
<div class="dialog-title"><span class="title" data-lgid="P_XXX">Add Filter Template</span><em class="dialog-close"></em></div>
<div class="dialog-title"><span class="title" data-lgid="P_UM_ADDFILTERTEMPLATES">Add Filter Template</span><em class="dialog-close"></em></div>
<div class="dialog-content">
<table style="line-height: 30px; table-layout: fixed;">
<tr>
<td class="label" style="width: 160px;" data-lgid="P_XXX">Template Name:</td>
<td class="label" style="width: 160px;" data-lgid="P_UM_TEMPLATENAME_COLON">Template Name:</td>
<td style="width: 330px;">
<input type="text" id="dialog_filtertemplatename" tabindex="1" maxlength="200" autocomplete="off" /></td>
</tr>

View File

@ -12,37 +12,6 @@
margin-right: 10px;
}
.dialog-content table {
border-collapse: collapse;
width: 100%;
}
.dialog-content table td.label {
width: 120px;
text-align: right;
padding-right: 10px;
line-height: 30px;
height: 24px;
vertical-align: top;
}
.dialog-content table td input,
.dialog-content table td textarea {
border: 1px solid #a9a9a9;
width: 200px;
height: 18px;
padding: 1px;
}
.dialog-content table td input[type="checkbox"] {
border: none;
}
.dialog-content table td textarea {
height: 100px;
/*max-width: 200px;*/
}
#dialogdatatb td {
padding-top: 30px;
}
@ -56,8 +25,7 @@
<script>Vue.config.productionTip = false; Vue.config.silent = true;</script>
<script type="text/javascript" src="<%=GetFileUrlWithVersion("../js/components/datagrid.js")%>"></script>
<script type="text/javascript">
var DataGrid = window.DataGrid || window['g5-datagrid'];
<script type="text/javascript">
function departmentrequest(method, param, callback, error) {
_network.request("SystemSettings/ManageDepartments.aspx", -1, method, param, callback, error || function (e) {
@ -87,11 +55,11 @@
var departmentID;
var pID;
function OnEdit() {
var index = vue.$refs.grid.selectedIndex;
var index = grid_dt.selectedIndex;
if (index < 0) {
showAlert(GetTextByKey("P_SET_PLEASESELECTDEPARTMENT", "Please select Department."), GetTextByKey("P_SET_EDITLOCATIONS", "Edit Department")); return;
}
var department = vue.$refs.grid.source[index];
var department = grid_dt.source[index];
if (!department) {
departmentID = undefined;
pID = undefined;
@ -118,11 +86,11 @@
}
function OnDelete() {
var index = vue.$refs.grid.selectedIndex;
var index = grid_dt.selectedIndex;
if (index < 0) {
return;
}
var dep = vue.$refs.grid.source[index];
var dep = grid_dt.source[index];
if (!dep) {
return;
}
@ -160,31 +128,18 @@
for (var i = 0; i < data.length; i++) {
var r = data[i];
}
vue.source = data;
grid_dt.setData(data);
}
var vue;
//加载表格
function initGrid() {
showmaskbg(true);
vue = new Vue({
el: "#departmentlist",
components: {
'data-grid': DataGrid
},
data: {
columns: CreateStyleColumn(),
source: [],
totalRow: null
},
methods: {
rowdblclick: function () {
OnEdit();
}
}
});
showmaskbg(false);
grid_dt = createGridView('#departmentlist');
grid_dt.columns = CreateStyleColumn();
grid_dt.init();
grid_dt.onCellDblClicked = function (_rowindex, colindex) {
if (colindex >= 0)
OnEdit();
};
}
//创建列表的行
function CreateStyleColumn() {
@ -218,60 +173,42 @@
}
}
else if (col.name === "AddSub") {
col.onclick = function (e) {
var index = vue.$refs.grid.selectedIndex;
if (index < 0) return;
var dep = vue.$refs.grid.source[index];
OnAdd(dep.Id);
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = 'plus';
col.iconType = 'fa-light';
col.events = {
onclick: function () {
OnAdd(this.Id);
}
};
col.filter = function (e) {
if (e.PId > 0)
return "";
else
return "\uf067";
}
col.styleFilter = function (e) {
if (e.PId > 0)
return { 'dispaly': 'none' };
else
return {
'font-family': 'FontAwesome',
'cursor': 'pointer',
'color': 'rgb(123, 28, 33)'
};
}
col.attrs = { 'title': GetTextByKey("P_SET_ADD", 'Add') };
col.attrs = { 'title': GetTextByKey("P_SET_ADD", 'Edit') };
}
else if (col.name === "Edit") {
col.filter = function () {
return '\uf044';
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = 'edit';
col.iconType = 'fa-light';
col.events = {
onclick: function () {
OnEdit();
}
};
col.onclick = function (e) {
OnEdit();
};
col.styleFilter = function (e) {
return {
'font-family': 'FontAwesome',
'cursor': 'pointer',
'color': 'rgb(123, 28, 33)'
};
}
col.attrs = { 'title': GetTextByKey("P_SET_EDIT", 'Edit') };
}
else if (col.name === "Delete") {
col.filter = function () {
return '\uf00d';
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = 'times';
col.iconType = 'fa-light';
col.events = {
onclick: function () {
OnDelete();
}
};
col.onclick = function (e) {
OnDelete();
};
col.styleFilter = function (e) {
return {
'font-family': 'FontAwesome',
'cursor': 'pointer',
'color': 'rgb(123, 28, 33)'
};
}
col.attrs = { 'title': GetTextByKey("P_SET_DELETE", 'Delete') };
}
columns.push(col);

View File

@ -12,37 +12,6 @@
margin-right: 10px;
}
.dialog-content table {
border-collapse: collapse;
width: 100%;
}
.dialog-content table td.label {
width: 120px;
text-align: right;
padding-right: 10px;
line-height: 24px;
height: 24px;
vertical-align: top;
}
.dialog-content table td input,
.dialog-content table td textarea {
border: 1px solid #a9a9a9;
width: 200px;
height: 18px;
padding: 1px;
}
.dialog-content table td input[type="checkbox"] {
border: none;
}
.dialog-content table td textarea {
height: 100px;
/*max-width: 200px;*/
}
#dialogdatatb td {
padding-top: 30px;
}
@ -112,6 +81,18 @@
z-index: 200;
background-color: #EFEFEF;
}
.dropdown .dropdown-wrapper {
border-color: #a9a9a9;
}
.dropdown .dropdown-wrapper > .dropdown-header {
min-height: 26px;
}
.dropdown .dropdown-wrapper > .dropdown-header > .dropdown-text {
line-height: 26px;
}
</style>
<script>
//必须放在地图js之前
@ -125,16 +106,13 @@
<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>
<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/editableselect.js")%>"></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 type="text/javascript" src="<%=GetFileUrlWithVersion("../js/mapcontrol.js")%>"></script>
<script type="text/javascript">
var IsDealer = <%=IsDealer ?"true":"false"%>;
var IsAdmin =<%=IsAdmin ?"true":"false"%>;
var DataGrid = window.DataGrid || window['g5-datagrid'];
function locationrequest(method, param, callback, error) {
_network.request("SystemSettings/ManageLocations.aspx", -1, method, param, callback, error || function (e) {
@ -156,7 +134,7 @@
$('#dialog_address').val('');
$('#dialog_address2').val('');
$('#dialog_city').val('');
editableSelectState.val('');
$('#dialog_state').dropdownVal('');
$('#dialog_zip').val('');
$('#dialog_notes').val('');
$('#imgfilogo').attr('src', '');
@ -179,11 +157,11 @@
var locationdata;
function OnEdit() {
locationdata = undefined;
var index = vue.$refs.grid.selectedIndex;
var index = grid_dt.selectedIndex;
if (index < 0) {
showAlert(GetTextByKey("P_SET_PLEASESELECTLOCATION", "Please select Location."), GetTextByKey("P_SET_EDITLOCATIONS", "Edit Location")); return;
}
var location = vue.$refs.grid.source[index];
var location = grid_dt.source[index];
if (!location) {
locationID = undefined;
pID = undefined;
@ -199,7 +177,7 @@
$('#dialog_address').val(location.Address);
$('#dialog_address2').val(location.Address2);
$('#dialog_city').val(location.City);
editableSelectState.text(location.State);
$('#dialog_state').dropdownVal(location.State);
$('#dialog_zip').val(location.Zip);
$('#dialog_notes').val(location.Notes);
$('#imgfilogo').attr('src', '../titlelogo.ashx?tp=location&cmpid=' + location.ID + "&sn=" + Math.random() + "'");
@ -216,16 +194,12 @@
$('#dialog_name').focus();
}
function OnDblClick(e) {
OnEdit();
}
function OnDelete() {
var index = vue.$refs.grid.selectedIndex;
var index = grid_dt.selectedIndex;
if (index < 0) {
return;
showAlert(GetTextByKey("P_SET_PLEASESELECTLOCATION", "Please select Location."), GetTextByKey("P_SET_EDITLOCATIONS", "Edit Location")); return;
}
var loc = vue.$refs.grid.source[index];
var loc = grid_dt.source[index];
if (!loc) {
return;
}
@ -268,44 +242,33 @@
r.Edit = "\uf044";
r.Delete = "\uf00d";
}
vue.source = data;
grid_dt.setData(data);
//vue.source = data;
}
var vue;
//加载表格
function initGrid() {
showmaskbg(true);
vue = new Vue({
el: "#locationlist",
components: {
'data-grid': DataGrid
},
data: {
columns: CreateStyleColumn(),
source: [],
totalRow: null
},
methods: {
rowdblclick: function () {
OnEdit();
}
}
});
showmaskbg(false);
grid_dt = createGridView('#locationlist');
grid_dt.columns = CreateStyleColumn();
grid_dt.init();
grid_dt.onCellDblClicked = function (_rowindex, colindex) {
if (colindex >= 0)
OnEdit();
};
}
//创建列表的行
function CreateStyleColumn() {
var list_columns = [
{ name: 'Name', caption: GetTextByKey("P_SET_LOCATIONSNAME", "Location Name"), valueIndex: 'Name', type: 0, css: { 'width': 200, 'text-align': 'left' } },
{ name: 'Code', caption: GetTextByKey("P_SET_CODE", "Code"), valueIndex: 'Code', type: 0, css: { 'width': 200, 'text-align': 'left' } },
{ name: 'Name', caption: GetTextByKey("P_SET_LOCATIONSNAME", "Location Name"), valueIndex: 'Name', allowFilter: true, type: 0, css: { 'width': 200, 'text-align': 'left' } },
{ name: 'Code', caption: GetTextByKey("P_SET_CODE", "Code"), valueIndex: 'Code', allowFilter: true, type: 0, css: { 'width': 200, 'text-align': 'left' } },
//{ name: 'Latitude', caption: GetTextByKey("P_SET_LATITUDE", "Latitude"), valueIndex: 'Latitude', type: 0, css: { 'width': 150, 'text-align': 'left' } },
//{ name: 'Longitude', caption: GetTextByKey("P_SET_LONGITUDE", "Longitude"), valueIndex: 'Longitude', type: 0, css: { 'width': 150, 'text-align': 'left' } },
{ name: 'Address', caption: GetTextByKey("P_SET_ADDRESS1", "Address 1"), valueIndex: 'Address', type: 0, css: { 'width': 200, 'text-align': 'left' } },
{ name: 'Address2', caption: GetTextByKey("P_SET_ADDRESS2", "Address 2"), valueIndex: 'Address2', type: 0, css: { 'width': 200, 'text-align': 'left' } },
{ name: 'City', caption: GetTextByKey("P_SET_CITY", "City"), valueIndex: 'City', type: 0, css: { 'width': 150, 'text-align': 'left' } },
{ name: 'State', caption: GetTextByKey("P_SET_STATE", "State"), valueIndex: 'State', type: 0, css: { 'width': 150, 'text-align': 'left' } },
{ name: 'Zip', caption: GetTextByKey("P_SET_ZIP", "Zip"), valueIndex: 'Zip', type: 0, css: { 'width': 150, 'text-align': 'left' } },
{ name: 'Address', caption: GetTextByKey("P_SET_ADDRESS1", "Address 1"), valueIndex: 'Address', allowFilter: true, type: 0, css: { 'width': 200, 'text-align': 'left' } },
{ name: 'Address2', caption: GetTextByKey("P_SET_ADDRESS2", "Address 2"), valueIndex: 'Address2', allowFilter: true, type: 0, css: { 'width': 200, 'text-align': 'left' } },
{ name: 'City', caption: GetTextByKey("P_SET_CITY", "City"), valueIndex: 'City', allowFilter: true, type: 0, css: { 'width': 150, 'text-align': 'left' } },
{ name: 'State', caption: GetTextByKey("P_SET_STATE", "State"), valueIndex: 'State', allowFilter: true, type: 0, css: { 'width': 150, 'text-align': 'left' } },
{ name: 'Zip', caption: GetTextByKey("P_SET_ZIP", "Zip"), valueIndex: 'Zip', allowFilter: true, type: 0, css: { 'width': 150, 'text-align': 'left' } },
{ name: 'LogoUrl', caption: GetTextByKey("P_SET_LOGO", "Logo"), valueIndex: "LogoUrl", type: 7, css: { 'width': 80, 'text-align': 'left' } },
{ name: 'Notes', caption: GetTextByKey("P_SET_NOTES", "Notes"), valueIndex: 'Notes', type: 0, css: { 'width': 280, 'text-align': 'left' } },
{ name: 'AddSub', caption: "", valueIndex: 'Add', type: 5, css: { 'width': 30, 'text-align': 'center' } },
@ -324,6 +287,8 @@
col.width = list_columns[hd].css.width;
col.align = list_columns[hd].css["text-align"]
col.key = list_columns[hd].valueIndex;
col.allowFilter = list_columns[hd].allowFilter;
if (col.name === "Name") {
col.styleFilter = function (e) {
if (e.PId > 0)
@ -332,79 +297,76 @@
return { 'font-weight': 'bold' };
}
}
else if (col.name === "AddSub") {
col.onclick = function (e) {
var index = vue.$refs.grid.selectedIndex;
if (index < 0) return;
var dep = vue.$refs.grid.source[index];
OnAdd(dep.ID);
};
col.filter = function (e) {
if (e.PId > 0)
return "";
else
return "\uf067";
}
col.styleFilter = function (e) {
if (e.PId > 0)
return { 'dispaly': 'none' };
else
return {
'font-family': 'FontAwesome',
'cursor': 'pointer',
'color': 'rgb(123, 28, 33)'
};
}
col.attrs = { 'title': GetTextByKey("P_SET_ADD", 'Add') };
}
else if (col.name === "LogoUrl") {
col.styleFilter = function (item) {
return { width: '60px' };
}
col.type = Object.create(libui.GridColumn, {
create: {
value: function () {
return libui.createElement('img', 'img-logo');
}
},
setValue: {
value: function (element, url) {
element.src = url;
}
}
});
col.styleFilter = function () {
return { "width": "60px", 'margin': 0 };
};
}
else if (col.name === "AddSub") {
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = 'plus';
col.iconType = 'fa-light';
col.events = {
onclick: function () {
OnAdd(this.ID);
}
};
col.attrs = { 'title': GetTextByKey("P_SET_ADD", 'Edit') };
}
else if (col.name === "Location") {
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = 'map-marker-alt';
col.iconType = 'fa-light';
col.events = {
onclick: function () {
locationdata = this;
SelectLocation();
}
};
col.attrs = { 'title': GetTextByKey("P_SET_SELECTLOCATION", 'Select Location') };
}
else if (col.name === "Edit") {
col.onclick = function (e) {
OnEdit();
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = 'edit';
col.iconType = 'fa-light';
col.events = {
onclick: function () {
OnEdit();
}
};
col.styleFilter = function (e) {
return {
'font-family': 'FontAwesome',
'cursor': 'pointer',
'color': 'rgb(123, 28, 33)'
};
}
col.attrs = { 'title': GetTextByKey("P_SET_EDIT", 'Edit') };
}
else if (col.name === "Delete") {
col.onclick = function (e) {
OnDelete();
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = 'times';
col.iconType = 'fa-light';
col.events = {
onclick: function () {
OnDelete();
}
};
col.styleFilter = function (e) {
return {
'font-family': 'FontAwesome',
'cursor': 'pointer',
'color': 'rgb(123, 28, 33)'
};
}
col.attrs = { 'title': GetTextByKey("P_SET_DELETE", 'Delete') };
}
else if (col.name === "Location") {
col.onclick = function (e, item) {
locationdata = item;
SelectLocation();
};
col.filter = function (e) {
return "\uf3c5";
}
col.styleFilter = function (e) {
return {
'font-family': 'FontAwesome',
'cursor': 'pointer',
'color': 'rgb(123, 28, 33)'
};
}
col.attrs = { 'title': GetTextByKey("P_SET_SELECTLOCATION", 'Select Location') };
}
columns.push(col);
}
return columns;
@ -419,7 +381,7 @@
'Address': $.trim($('#dialog_address').val()),
'Address2': $.trim($('#dialog_address2').val()),
'City': $.trim($('#dialog_city').val()),
'State': $.trim(editableSelectState.text()),
'State': $.trim($('#dialog_state').dropdownVal()),
'Zip': $.trim($('#dialog_zip').val()),
'Notes': $.trim($('#dialog_notes').val())
};
@ -488,14 +450,14 @@
});
}
var editableSelectState;
$(function () {
setPageTitle(GetTextByKey("P_SET_MANAGELOCATIONS", 'Manage Locations'), true);
initGrid();
$('#btnBrowseLogo').click(browseLogo);
editableSelectState = new $editableselect($("#dialog_state"), 50);
editableSelectState.tabIndex(1);
$('#dialog_state').dropdown([], {
textKey: 'value'
});
OnRefresh();
@ -521,11 +483,14 @@
var statedata = [];
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 = "";
for (var type of data) {
statedata.push({ value: type });
}
$('#dialog_state').dropdownSource(statedata);
}
var fiLogoFile = undefined;
@ -620,6 +585,10 @@
'Latitude': loc.Latitude,
'Longitude': loc.Longitude,
'Address': loc.Address,
'Address2': loc.Address2,
'City': loc.City,
'State': loc.State,
'Zip': loc.Zip,
'Notes': loc.Notes
};
var p = htmldecode(JSON.stringify(item));
@ -650,7 +619,7 @@
else
$('#dialog_address').val(evt.address.address.Match_addr);
$('#dialog_city').val(evt.address.address.City);
editableSelectState.text(evt.address.address.RegionAbbr);
$('#dialog_state').dropdownVal(evt.address.address.RegionAbbr);
$('#dialog_zip').val(evt.address.address.Postal);
}
});
@ -743,7 +712,7 @@
<tr>
<td class="label" data-lgid="P_SET_STATE_COLON">State:</td>
<td colspan="2">
<div id="dialog_state" style="width: 322px; height: 22px;"></div>
<div id="dialog_state" style="width: 324px;" class="dropdown"></div>
</td>
</tr>
<tr>

View File

@ -12,37 +12,6 @@
margin-right: 10px;
}
.dialog-content table {
border-collapse: collapse;
width: 100%;
}
.dialog-content table td.label {
width: 120px;
text-align: right;
padding-right: 10px;
line-height: 30px;
height: 24px;
vertical-align: top;
}
.dialog-content table td input,
.dialog-content table td textarea {
border: 1px solid #a9a9a9;
width: 200px;
height: 18px;
padding: 1px;
}
.dialog-content table td input[type="checkbox"] {
border: none;
}
.dialog-content table td textarea {
height: 100px;
/*max-width: 200px;*/
}
#dialogdatatb td {
padding-top: 30px;
}
@ -57,8 +26,7 @@
<script src="<%=GetFileUrlWithVersion("../js/jquery.datetimepicker.full.js")%>"></script>
<script src="../Maintenance/js/inputdatactr.js"></script>
<script type="text/javascript">
<script type="text/javascript">
function regionrequest(method, param, callback, error) {
_network.request("SystemSettings/ManageRegions.aspx", -1, method, param, callback, error || function (e) {
showmaskbg(false, true);
@ -91,7 +59,7 @@
if (index < 0) {
showAlert(GetTextByKey("P_SET_PLEASESELECTREGION", "Please select Region."), GetTextByKey("P_SET_EDITREGION", "Edit Region")); return;
}
var region = grid_dt.source[index].Values;
var region = grid_dt.source[index];
if (!region) {
regionid = undefined;
return;
@ -158,20 +126,19 @@
var r = data[i];
for (var j in r) {
if (j === "StartDate") {
r[j] = { DisplayValue: r["StartDateStr"], Value: r[j] };
r[j] = { DisplayValue: r["StartDateStr"], Value: r[j] || "" };
}
else if (j === "ProjectedEndDate") {
r[j] = { DisplayValue: r["ProjectedEndDateStr"], Value: r[j] };
r[j] = { DisplayValue: r["ProjectedEndDateStr"], Value: r[j] || "" };
}
else if (j === "EndDate") {
r[j] = { DisplayValue: r["EndDateStr"], Value: r[j] };
r[j] = { DisplayValue: r["EndDateStr"], Value: r[j] || "" };
}
else if (j === "IsActive") {
r[j] = { DisplayValue: r["IsActive"] ? "Yes" : "No", Value: r[j] };
r[j] = { DisplayValue: r["IsActive"] ? 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);
}
@ -179,14 +146,9 @@
var grid_dt;
function InitGridData() {
grid_dt = new GridView('#regionlist');
grid_dt.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_dt = createGridView('#regionlist');
var list_columns = [
{ name: 'Name', caption: GetTextByKey("P_SET_REGIONNAME", "Region Name"), valueIndex: 'Name', css: { 'width': 200, 'text-align': 'left' } },
{ name: 'Name', caption: GetTextByKey("P_SET_REGIONNAME", "Region Name"), valueIndex: 'Name', allowFilter: true, css: { 'width': 200, 'text-align': 'left' } },
{ name: 'StartDate', caption: GetTextByKey("P_SET_STARTDATE", "Start Date"), valueIndex: 'StartDate', css: { 'width': 120, 'text-align': 'left' } },
{ name: 'ProjectedEndDate', caption: GetTextByKey("P_SET_PROJECTEDENDDATE", "Projected End Date"), valueIndex: 'ProjectedEndDate', css: { 'width': 130, 'text-align': 'left' } },
{ name: 'EndDate', caption: GetTextByKey("P_SET_ENDDATE", "End Date"), valueIndex: 'EndDate', css: { 'width': 120, 'text-align': 'left' } },
@ -210,39 +172,37 @@
col.type = list_columns[hd].type;
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.iconType = 'fa-light';
col.events = {
onclick: function () {
OnEdit();
}
};
col.classFilter = function (e) {
return "icon-col";
}
col.attrs = { 'title': GetTextByKey("P_SET_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.iconType = 'fa-light';
col.events = {
onclick: function () {
OnDelete(this);
}
};
col.classFilter = function (e) {
return "icon-col";
};
col.attrs = { 'title': GetTextByKey("P_SET_DELETE", 'Delete') };
}
columns.push(col);
}
grid_dt.canMultiSelect = false;
grid_dt.multiSelect = false;
grid_dt.columns = columns;
grid_dt.init();
grid_dt.rowdblclick = OnEdit;
grid_dt.onCellDblClicked = OnEdit;
}
function OnDialogOK() {

View File

@ -208,9 +208,9 @@
selectedIndex = i;
tr.append($('<td></td>').text(schemes[i].UIStyleName));
var tddefault = $('<td style="text-align:center;">No</td>');
var tddefault = $('<td style="text-align:center;"></td>').text(GetTextByKey("P_AG_NO","No"));
if (schemes[i].IsDefault) {
tddefault.text('Yes');
tddefault.text(GetTextByKey("P_AG_YES", "Yes"));
}
tr.append(tddefault);
$('#s_tboy').append(tr);
@ -387,7 +387,7 @@
<div id="rightheaderDiv" style="border-bottom: 1px solid #b0b0b0; margin-bottom: 20px; line-height: 30px;">
<table>
<tr>
<td style="text-align: right; padding-right: 5px; width: 160px;" data-lgid="P_SET_STYLENAME_COLON">Style Name :</td>
<td style="text-align: right; padding-right: 5px; width: 200px;" data-lgid="P_SET_STYLENAME_COLON">Style Name :</td>
<td>
<input id="stylename_input" style="width: 400px; height: 20px;" maxlength="200" /><label id="styleID" style="display: none;"></label></td>
</tr>
@ -400,7 +400,7 @@
</div>
<table style="min-width: 200px; border: none; line-height: 50px;">
<tr>
<td style="text-align: right; padding-right: 5px; width: 160px;" data-lgid="P_SET_CHARTTITLECOLOR_COLON">Chart Title Color :</td>
<td style="text-align: right; padding-right: 5px; width: 200px;" data-lgid="P_SET_CHARTTITLECOLOR_COLON">Chart Title Color :</td>
<td>
<p id="charttitlecolor"></p>
<input id="charttitle_input" class="colorinput" maxlength="7" />

View File

@ -6,7 +6,7 @@
<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" />
@ -14,22 +14,20 @@
:root {
<%=StyleVariables%>
}
.data-grid {
height: 100%;
font-size: 12px !important;
font-family: "Segoe UI","Segoe UI Web (West European)","Segoe UI",-apple-system,BlinkMacSystemFont,"Roboto","Helvetica Neue",sans-serif !important;
}
</style>
<script src="<%=GetUrl("js/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 src="<%=GetUrl("js/language.js")%>" type="text/javascript"></script>
<script type="text/javascript" src="<%=GetUrl("js/components/gridview.js") %>"></script>
<script type="text/javascript">
var GridView = window.GridView || window['g5-gridview'];
var GridView = window['lib-ui'].Grid;
_network.root = '<%=Page.ResolveUrl("~/")%>';
consts = {
path: _network.root
};
var sitePath = "<%=this.ResolveUrl("~/fic/") %>";
function getText(s, flag) {

View File

@ -58,6 +58,7 @@
$('#selWeightUnit').val(data.WeightUnits);
$('#sel_loginverifytype').val(data.LoginVerifyType);
$('#ipt_mfaremembermedays').val(data.MFARememberMeDays);
$('#sel_locdatasource').val(data.BreadcrumbLocationSource);
if (data.Connectors && data.Connectors.length > 0) {
var con = data.Connectors[0];
$('#ipt_connectorserver').val(con.Key);
@ -84,6 +85,7 @@
'WeightUnits': $('#selWeightUnit').val(),
'LoginVerifyType': $('#sel_loginverifytype').val(),
'MFARememberMeDays': $('#ipt_mfaremembermedays').val(),
'BreadcrumbLocationSource': $('#sel_locdatasource').val(),
'Connectors': [connector]
};
var alerttitle = GetTextByKey("P_SET_SAVESYSTEMOPTIONS", 'Save System Options');
@ -105,7 +107,7 @@
if (item.MFARememberMeDays !== "") {
if (!IsPositiveInteger.test(item.MFARememberMeDays)) {
showAlert(GetTextByKey("P_SET_XXX", 'MFA Remember Me Days format error.'), alerttitle);
showAlert(GetTextByKey("P_SET_MFAREMEMBERMEDAYSFORMATERROR", 'MFA Remember Me Days format error.'), alerttitle);
return;
}
}
@ -215,17 +217,27 @@
<td>
<select id="sel_loginverifytype" style="width: 304px;">
<option value=""></option>
<option value="Email">Email</option>
<option value="Email" data-lgid="P_UM_EMAIL">Email</option>
<%--<option value="SMS">SMS</option>--%>
</select></td>
<td></td>
</tr>
<tr>
<td class="label" data-lgid="P_SET_XXX">MFA Remember Me Days:</td>
<td class="label" data-lgid="P_SET_MFAREMEMBERMEDAYS_COLON">MFA Remember Me Days:</td>
<td>
<input id="ipt_mfaremembermedays" style="width: 100px;" maxlength="10" /></td>
<td></td>
</tr>
<tr>
<td class="label" data-lgid="P_SET_DEFAULTBREADCRUMBLOCATIONSOURCES_COLON">Default Breadcrumb Location Source(s):</td>
<td>
<select id="sel_locdatasource" style="width: 304px;">
<option value="0" data-lgid="P_MV_PRIMARYONLY">Primary Only</option>
<option value="1" data-lgid="P_MV_THEFTMODEMULTIPLELINES">Theft Mode (Multiple Lines)</option>
<option value="2" data-lgid="P_MV_COMBINEDSINGLELINE">Combined (Single Line)</option>
</select></td>
<td></td>
</tr>
<tr>
<td colspan="3">
<div style="font-size: 18px; color: grey; margin: 20px 0px 0px 10px" data-lgid="P_SET_CONNECTOR">Connector</div>

View File

@ -70,7 +70,7 @@
tr.append(td);
td = $('<td></td>');
tr.append(td);
var span = $('<span class="sbutton iconedit" title="' + GetTextByKey('P_SET_XXX', 'Edit') + '"></span>').data('param', param).click(function () {
var span = $('<span class="sbutton iconedit" title="' + GetTextByKey('P_SET_EDIT', 'Edit') + '"></span>').data('param', param).click(function () {
openSystemParam(this);
});
td.append(span);
@ -102,7 +102,7 @@
var item = [paramname, value];
var param = JSON.stringify(item);
param = htmlencode(param);
var alerttitle = GetTextByKey('P_SET_XXX', 'System Param')
var alerttitle = GetTextByKey('P_SET_SYSTEMPARAM', 'System Param')
systemparamsrequest("SetSystemParams", param, function (data) {
if (data !== 'OK') {
showAlert(data, alerttitle);
@ -118,7 +118,7 @@
}
$(function () {
setPageTitle(GetTextByKey("P_SET_XXX", 'System Params'), true);
setPageTitle(GetTextByKey("P_SET_SYSTEMPARAMS", 'System Params'), true);
$('#dialog_systemparam').dialog(function () {
showmaskbg(false);
});
@ -133,7 +133,7 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div style="padding: 0px; margin: 0px;">
<div class="page_title" data-lgid="P_SET_XXX">System Params</div>
<div class="page_title" data-lgid="P_SET_SYSTEMPARAMS">System Params</div>
<div class="function_title">
<span class="sbutton iconrefresh" onclick="OnRefresh();" data-lgid="P_SET_REFRESH">Refresh</span>
</div>

View File

@ -50,11 +50,11 @@
<span data-lgid="P_SET_SYSTEMOPTIONS">System Options</span></a></li>
<%if (IsDev)
{ %>
<li class="nav_item" id="nav_sysparams" style="<%=ParamSettingDisplay%>" page="SystemParams.aspx" title="System Params" data-title-lgid="P_SET_XXX"><a href="#nav_sysparams">
<li class="nav_item" id="nav_sysparams" style="<%=ParamSettingDisplay%>" page="SystemParams.aspx" title="System Params" data-title-lgid="P_SET_SYSTEMPARAMS"><a href="#nav_sysparams">
<div>
<img style="width: 20px; height: 20px;" src="img/systemoptions.png" />
</div>
<span data-lgid="P_SET_XXX">System Params</span></a></li>
<span data-lgid="P_SET_SYSTEMPARAMS">System Params</span></a></li>
<%} %>
</ul>
<div class="hostmask maskbg" style="display: none;"></div>

View File

@ -16,55 +16,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: middle !important;
}
.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;*/
}
.div_filter {
margin-top: -3px;
}
.div_filter .dropdown {
width: 322px;
margin: 2px 0 0 0px;
}
.div_panel {
min-width: 200px;
.edit-content table td input[type="radio"] {
border: none;
width: unset;
height: unset;
}
.a {
@ -72,51 +27,12 @@
color: #2140fb;
}
.subtitle {
margin: 20px 40px 10px 0px;
font-size: 16px;
color: gray;
}
.subtitle span {
margin-left: 10px;
}
.subtitle hr {
background-color: #d8d8d8;
border: none;
height: 1px;
margin: 0;
}
.machinetd {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.tab-header {
float: left;
padding: 2px 6px;
cursor: pointer;
border: 1px solid #fff;
border-bottom: none;
}
.tab-header:hover {
background: #eee;
}
.tab-header.selected {
border-color: #d8d8d8;
cursor: default;
}
.tab-header.selected:hover {
background: #fff;
}
.ctl_button {
font-family: 'CalciteWebCoreIcons';
display: block;
@ -162,6 +78,10 @@
<script type="text/javascript" src="<%=GetFileUrlWithVersion("../fic/js/lib/vue.min.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("../js/controls.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("../fic/js/utility.js")%>" type="text/javascript"></script>
<script type="text/javascript">
_fleet.currentLang = GetLanguageByCookie();
_utility.currentLang = _fleet.currentLang;
</script>
<script src="<%=GetFileUrlWithVersion("../fic/fic/js/controls/gridctrl.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("../fic/fic/js/controls/editGridCtrl.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("../fic/fic/js/controls/dialog.js")%>" type="text/javascript"></script>
@ -182,9 +102,6 @@
<script type="text/javascript" src="<%=GetFileUrlWithVersion("../fic/fic/js/chartManage/chartTypeWizard.js") %>"></script>
<script type="text/javascript" src="<%=GetFileUrlWithVersion("../fic/fic/js/Management/filtersSelector.js") %>"></script>
<script>
$(function () {
_utility.currentLang = _fleet.currentLang;
});
$addDomainUserForm = function () { }
</script>
<script src="<%=GetFileUrlWithVersion("../fic/js/datepicker.min.js")%>"></script>
@ -194,8 +111,9 @@
var userOptions = null;
var uid = '<%=IID%>';
var IsSupperAdmin =<%=IsSupperAdmin ?"true":"false"%>;
var GridView1 = window['lib-ui'].Grid;//与FIC中冲突暂时使用GridView1主要在userfilter.js使用
function showmaskbg1(flag, noanimation) {
function showmaskbg1(flag, noanimation) {//与FIC中冲突
if (window.parent && typeof window.parent.onmaskbg == 'function') {
window.parent.onmaskbg(flag, noanimation);
}
@ -211,6 +129,32 @@
}
}
function showAlert1(msg, title, icon, next) {//覆盖FIC的showAlert
if (window.parent && typeof window.parent.showalert == 'function') {
window.parent.showalert(msg, title, icon, next);
} else {
_dialog.showAlert(msg, title, icon, next);
}
}
function showConfirm1(msg, title, fok, fcancel) {//与FIC中冲突
if (window.parent && typeof window.parent.showconfirm == 'function') {
window.parent.showconfirm(msg, title, fok, fcancel);
} else {
showmaskbg1(true);
_dialog.showConfirm(msg, title, function (e) {
showmaskbg1(false);
if (typeof fok === 'function') {
fok(e);
}
}, function () {
if (fcancel)
fcancel();
showmaskbg1(false);
});
}
}
function requestFIC(service, method, param, callback, error) {
$.ajax({
url: _network.root + 'fic/fic/FICSvc.ashx?fmt=json&SN=' + Math.random(),
@ -231,7 +175,7 @@
error: error || function (e) {
console.log(e);
showmaskbg(false, true);
showAlert(GetTextByKey('P_UM_PAGEERROR', 'An unknown error occurred. Please refresh page.'), GetTextByKey('P_UM_QUERY', 'Query'));
showAlert1(GetTextByKey('P_UM_PAGEERROR', 'An unknown error occurred. Please refresh page.'), GetTextByKey('P_UM_QUERY', 'Query'));
}
});
}
@ -246,7 +190,7 @@
_network.request("SystemSettings/UserOptions.aspx", -1, method, param, callback, error || function (e) {
console.log(e);
showmaskbg(false, true);
showAlert(GetTextByKey('P_SET_QUERY', 'An unknown error occurred. Please refresh page.'), GetTextByKey('P_SET_QUERY', 'Query'));
showAlert1(GetTextByKey('P_SET_QUERY', 'An unknown error occurred. Please refresh page.'), GetTextByKey('P_SET_QUERY', 'Query'));
});
}
@ -317,6 +261,7 @@
sel.val(language);
}
}
showUserOptions();
}
function getTimeZones() {
@ -352,6 +297,7 @@
}
function showUserOptions() {
if (!userOptions) return;
if (userOptions.SystemStyleID) {
$("#selStyle").val(userOptions.SystemStyleID);
}
@ -380,7 +326,7 @@
subscribe = scriber.getObject();
userfilter = scriber.getUserFilter();
if (typeof subscribe === 'string') {
showAlert(subscribe, GetTextByKey("P_UM_ERROR", 'Error'));
showAlert1(subscribe, GetTextByKey("P_UM_ERROR", 'Error'));
return;
}
}
@ -419,12 +365,12 @@
param = htmlencode(param);
useroptionsrequest("SaveUserOptions", param, function (data) {
if (data !== 'OK') {
showAlert(data, GetTextByKey("P_SET_SAVEUSEROPTIONS", 'Save User Options'));
showAlert1(data, GetTextByKey("P_SET_SAVEUSEROPTIONS", 'Save User Options'));
} else {
if (userfiltertemplateloaded) {
getUserFilterData();
}
showAlert(GetTextByKey("P_SET_SAVSUCCESSFULLY", "Saved Successfully."), GetTextByKey("P_SET_SAVEUSEROPTIONS", 'Save User Options'));
showAlert1(GetTextByKey("P_SET_SAVSUCCESSFULLY", "Saved Successfully."), GetTextByKey("P_SET_SAVEUSEROPTIONS", 'Save User Options'));
}
showloading(false);
}, function (err) {
@ -473,6 +419,8 @@
$('#tr_timezone').show();
GetOptionSetting();
$("#div_container").tab();
$('input[placeholder=Search]').attr("placeholder", GetTextByKey("P_AM_SEARCH", "Search"));
});
</script>
@ -489,9 +437,12 @@
<div class="edit-content">
<div id="div_container">
<ul id="ul_container" class="tab_header" style="padding-top: 5px;">
<li id="tab_header_info" data-href="tab_info" class="selected" data-lgid="P_XXXX">User Information</li>
<li id="tab_header_info" data-href="tab_info" class="selected" data-lgid="P_UM_USERINFORMATION">User Information</li>
<li id="tab_header_subscribe" data-href="tab_subscribe" onclick="reshowgrid()" data-lgid="P_UM_SUBSCRIBEMESSAGE">Subscribe Message</li>
<li id="tab_header_filter" data-href="tab_filter" class="cononly" onclick="onuserfilterclick()" data-lgid="P_XXXX">Asset Alert Filter Templates</li>
<%if (!IsDealer)
{ %>
<li id="tab_header_filter" data-href="tab_filter" class="cononly" onclick="onuserfilterclick()" data-lgid="P_WO_ASSETALERTFILTERTEMPLATES">Asset Alert Filter Templates</li>
<%} %>
</ul>
<div id="tab_info" data-page="tab_info">
@ -509,7 +460,7 @@
<td></td>
</tr>
<tr id="tr_timezone" style="display: none;">
<td class="label" data-lgid="P_SET_XXX">Time Zone:</td>
<td class="label" data-lgid="P_SET_TIMEZON_COLON">Time Zone:</td>
<td>
<select id="dialog_timezone" style="width: 200px; height: 20px;"></select></td>
<td></td>
@ -523,7 +474,7 @@
<div id="tab_filter" data-page="tab_filter" style="display: none;">
<div style="margin: 9px 6px 20px">
<span class="title" data-lgid="P_XXXX">Filter Templates:</span>
<span class="title" data-lgid="P_UM_FILTERTEMPLATES_COLON">Filter Templates:</span>
<select id="sel_filtertemplate" style="width: 300px; height: 20px;"></select>
<span class="sbutton iconadd" onclick="onOpenFilterTemplate(0);" data-lgid="P_UM_ADD"></span>
<span class="sbutton iconedit" onclick="onOpenFilterTemplate(1);" data-lgid="P_UM_EDIT"></span>
@ -629,11 +580,11 @@
</div>
<div class="dialog" id="dialog_filtertemplate" style="display: none; width: 500px;">
<div class="dialog-title"><span class="title" data-lgid="P_XXX">Add Filter Template</span><em class="dialog-close"></em></div>
<div class="dialog-title"><span class="title" data-lgid="P_UM_ADDFILTERTEMPLATES">Add Filter Template</span><em class="dialog-close"></em></div>
<div class="dialog-content">
<table style="line-height: 30px; table-layout: fixed;">
<tr>
<td class="label" style="width: 160px;" data-lgid="P_XXX">Template Name:</td>
<td class="label" style="width: 160px;" data-lgid="P_UM_TEMPLATENAME_COLON">Template Name:</td>
<td style="width: 330px;">
<input type="text" id="dialog_filtertemplatename" tabindex="1" maxlength="200" autocomplete="off" /></td>
</tr>

View File

@ -40,4 +40,11 @@ public partial class UserOptions : SystemSettingsBasePage
return false;
}
}
public bool IsDealer
{
get
{
return IronIntel.Contractor.SystemParams.IsDealer;
}
}
}

View File

@ -19,17 +19,15 @@ $(function () {
var items = [];
var assets = [];
for (var i = 0; i < source.length; i++) {
var it = source[i].Values;
var it = source[i];
if (it.Selected) {
items.push({
Values: {
ID: it.Id,
VIN: it.VIN,
Name: it.Name,
MakeName: it.MakeName,
ModelName: it.ModelName,
TypeName: it.TypeName
}
ID: it.Id,
VIN: it.VIN,
Name: it.Name,
MakeName: it.MakeName,
ModelName: it.ModelName,
TypeName: it.TypeName
});
assets.push({
ID: it.Id,
@ -57,7 +55,7 @@ $(function () {
$("#sel_filtertemplate").find("option:selected").data("filterdata", fdata);
}
grid_dtfilterassets.setData(grid_dtfilterassets.innerSource.concat(items));
grid_dtfilterassets.setData(grid_dtfilterassets.source.concat(items));
showmaskbg1(false);
};
@ -99,12 +97,7 @@ function getUserFilterData() {
//**************************************Asset(s)****************************************************//
var grid_dtfilterassets;
function InitGridFilterSelectedAssets() {
grid_dtfilterassets = new GridView('#selectedfilterassetlist');
grid_dtfilterassets.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_dtfilterassets = createGridView1('#selectedfilterassetlist');
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' } },
@ -134,7 +127,7 @@ function InitGridFilterSelectedAssets() {
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.allowFilter = col.name === 'TypeName';
col.styleFilter = function (item) {
if (item.Highlight)
return { 'background-color': 'yellow' };
@ -142,26 +135,13 @@ function InitGridFilterSelectedAssets() {
columns.push(col);
}
grid_dtfilterassets.canMultiSelect = true;
grid_dtfilterassets.multiSelect = true;
grid_dtfilterassets.columns = columns;
grid_dtfilterassets.init();
grid_dtfilterassets.selectedrowchanged = function (rowindex) {
var rowdata = grid_dtfilterassets.source[rowindex];
if (rowdata) {
}
}
}
function showFilterSelectedAsset(data) {
var rows = [];
for (var i = 0; i < data.length; i++) {
var r = data[i];
var fr = { Values: r };
rows.push(fr);
}
grid_dtfilterassets.setData(rows);
grid_dtfilterassets.setData(data);
}
function OnFilterAssetAdd() {
@ -170,26 +150,21 @@ function OnFilterAssetAdd() {
return;
showmaskbg1(true);
dialogFUAssets.exceptSource = grid_dtfilterassets.innerSource.map(function (s) {
return s.Values.ID;
dialogFUAssets.exceptSource = grid_dtfilterassets.source.map(function (s) {
return s.ID;
});
dialogFUAssets.showSelector();
}
function OnFilterMachineDelete() {
showConfirm(GetTextByKey("P_UM_DELETESELECTEDASSET", 'Are you sure you want to delete these selected assets?'), GetTextByKey("P_UM_ASSETASSIGNMENT", "Asset Assignment"), function () {
for (var i = grid_dtfilterassets.innerSource.length - 1; i >= 0; i--) {
var s = grid_dtfilterassets.innerSource[i].Values;
if (s.selected) {
grid_dtfilterassets.innerSource.splice(i, 1);
}
}
showConfirm1(GetTextByKey("P_UM_DELETESELECTEDASSET", 'Are you sure you want to delete these selected assets?'), GetTextByKey("P_UM_ASSETASSIGNMENT", "Asset Assignment"), function () {
var assets = [];
if (grid_dtfilterassets.source != null) {
for (var j = grid_dtfilterassets.source.length - 1; j >= 0; j--) {
var l = grid_dtfilterassets.source[j].Values;
var source = grid_dtfilterassets.source;
for (var j = source.length - 1; j >= 0; j--) {
var l = source[j];
if (l.selected) {
grid_dtfilterassets.source.splice(j, 1);
grid_dtfilterassets.removeItem(j);
}
else {
assets.push(l);
@ -199,21 +174,13 @@ function OnFilterMachineDelete() {
var filterdata = $("#sel_filtertemplate").find("option:selected").data('filterdata');
filterdata.Assets = assets;
grid_dtfilterassets.reset();
});
}
//**************************************Asset Group(s)****************************************************//
var grid_dtfiltersag;
function InitGridFilterSelectedAssetGroups() {
grid_dtfiltersag = new GridView('#selectedfilterassetgrouplist');
grid_dtfiltersag.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_dtfiltersag = createGridView1('#selectedfilterassetgrouplist');
var list_columns = [
{ name: 'GroupName', caption: GetTextByKey("P_UM_GROUPNAME", "Group Name"), valueIndex: 'GroupName', css: { 'width': 250, 'text-align': 'left' } }
];
@ -241,42 +208,18 @@ function InitGridFilterSelectedAssetGroups() {
col.key = list_columns[hd].valueIndex;
columns.push(col);
}
grid_dtfiltersag.canMultiSelect = true;
grid_dtfiltersag.multiSelect = true;
grid_dtfiltersag.columns = columns;
grid_dtfiltersag.init();
grid_dtfiltersag.rowdblclick = function (rowindex) {
var rowdata = grid_dtfiltersag.source[rowindex];
if (rowdata) {
}
};
grid_dtfiltersag.selectedrowchanged = function (rowindex) {
var rowdata = grid_dtfiltersag.source[rowindex];
if (rowdata) {
}
}
}
function showFilterSelectedAssetGroup(data) {
var rows = [];
for (var i = 0; i < data.length; i++) {
var r = data[i];
var fr = { Values: r };
rows.push(fr);
}
grid_dtfiltersag.setData(rows);
grid_dtfiltersag.setData(data);
}
var grid_dtfilternsag;
function InitGridFilterAvailableAssetGroups() {
grid_dtfilternsag = new GridView('#availablefilterassetgrouplist');
grid_dtfilternsag.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_dtfilternsag = createGridView1('#availablefilterassetgrouplist');
var list_columns = [
{ name: 'GroupName', caption: GetTextByKey("P_UM_GROUPNAME", "Group Name"), valueIndex: 'GroupName', css: { 'width': 250, 'text-align': 'left' } },
{ name: 'Description', caption: GetTextByKey("P_UM_DESCRIPTION", "Description"), valueIndex: 'Description', css: { 'width': 250, 'text-align': 'left' } }
@ -305,32 +248,13 @@ function InitGridFilterAvailableAssetGroups() {
col.key = list_columns[hd].valueIndex;
columns.push(col);
}
grid_dtfilternsag.canMultiSelect = true;
grid_dtfilternsag.multiSelect = true;
grid_dtfilternsag.columns = columns;
grid_dtfilternsag.init();
grid_dtfilternsag.rowdblclick = function (rowindex) {
var rowdata = grid_dtfilternsag.source[rowindex];
if (rowdata) {
}
};
grid_dtfilternsag.selectedrowchanged = function (rowindex) {
var rowdata = grid_dtfilternsag.source[rowindex];
if (rowdata) {
}
}
}
function showFilterAvailableMachineGroups(data) {
var rows = [];
for (var i = 0; i < data.length; i++) {
var r = data[i];
var fr = { Values: r };
rows.push(fr);
}
grid_dtfilternsag.setData(rows);
grid_dtfilternsag.setData(data);
}
@ -365,8 +289,9 @@ function GetFilerAssetGroupList() {
function getMatchFilterAvailableMachineGroups() {
var selected = [];
for (var i = 0; i < grid_dtfiltersag.source.length; i++) {
var m = grid_dtfiltersag.source[i].Values;
var tempsource = grid_dtfiltersag.source;
for (var i = 0; i < tempsource.length; i++) {
var m = tempsource[i];
selected.push(m.GroupID);
}
@ -409,8 +334,10 @@ function OnSetFilterSelectAssetGroups() {
if (filterdata && filterdata.AssetGroups) {
assetgroups = filterdata.AssetGroups;
}
for (var i = 0; i < grid_dtfilternsag.source.length; i++) {
var m = grid_dtfilternsag.source[i].Values;
var tempsource = grid_dtfilternsag.source;
for (var i = 0; i < tempsource.length; i++) {
var m = tempsource[i];
if (m.selected) {
m.selected = false;
assetgroups.push(m);
@ -431,19 +358,14 @@ function OnSetFilterSelectAssetGroups() {
}
function OnFilterAssetGroupDelete() {
showConfirm(GetTextByKey("P_UM_DELETESELECTEDASSETGROUP", 'Are you sure you want to delete these selected asset groups?'), GetTextByKey("P_UM_ASSETGROUPSASSIGNMENT", "Asset Groups Assignment"), function () {
for (var i = grid_dtfiltersag.innerSource.length - 1; i >= 0; i--) {
var s = grid_dtfiltersag.innerSource[i].Values;
if (s.selected) {
grid_dtfiltersag.innerSource.splice(i, 1);
}
}
showConfirm1(GetTextByKey("P_UM_DELETESELECTEDASSETGROUP", 'Are you sure you want to delete these selected asset groups?'), GetTextByKey("P_UM_ASSETGROUPSASSIGNMENT", "Asset Groups Assignment"), function () {
var assetgroups = [];
if (grid_dtfiltersag.source != null) {
for (var j = grid_dtfiltersag.source.length - 1; j >= 0; j--) {
var l = grid_dtfiltersag.source[j].Values;
var source = grid_dtfiltersag.source;
for (var j = source.length - 1; j >= 0; j--) {
var l = source[j];
if (l.selected) {
grid_dtfiltersag.source.splice(j, 1);
grid_dtfiltersag.removeItem(j);
}
else {
assetgroups.push(l);
@ -453,19 +375,13 @@ function OnFilterAssetGroupDelete() {
var filterdata = $("#sel_filtertemplate").find("option:selected").data('filterdata');
filterdata.AssetGroups = assetgroups;
grid_dtfiltersag.reset();
});
}
//**************************************Jobsite(s)****************************************************//
var grid_dtfilterjs;
function InitGridFilterSelectedJobsites() {
grid_dtfilterjs = new GridView('#selectedfilterjobsitelist');
grid_dtfilterjs.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_dtfilterjs = createGridView1('#selectedfilterjobsitelist');
var list_columns = [
{ name: 'Name', caption: GetTextByKey("P_UM_NAME", "Name"), valueIndex: 'Name', css: { 'width': 380, 'text-align': 'left' } }
];
@ -494,43 +410,18 @@ function InitGridFilterSelectedJobsites() {
col.key = list_columns[hd].valueIndex;
columns.push(col);
}
grid_dtfilterjs.canMultiSelect = true;
grid_dtfilterjs.multiSelect = true;
grid_dtfilterjs.columns = columns;
grid_dtfilterjs.init();
grid_dtfilterjs.rowdblclick = function (rowindex) {
var rowdata = grid_dtfilterjs.source[rowindex];
if (rowdata) {
var Jobsite = rowdata.Values;
}
};
grid_dtfilterjs.selectedrowchanged = function (rowindex) {
var rowdata = grid_dtfilterjs.source[rowindex];
if (rowdata) {
}
}
}
function showFilterSelectedJobsite(data) {
var rows = [];
for (var i = 0; i < data.length; i++) {
var r = data[i];
var fr = { Values: r };
rows.push(fr);
}
grid_dtfilterjs.setData(rows);
grid_dtfilterjs.setData(data);
}
var grid_dtfilternjs;
function InitGridFilterAvailableJobsites() {
grid_dtfilternjs = new GridView('#filteravailablejobsitelist');
grid_dtfilternjs.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_dtfilternjs = createGridView1('#filteravailablejobsitelist');
var list_columns = [
{ name: 'Name', caption: GetTextByKey("P_UM_NAME", "Name"), valueIndex: 'Name', css: { 'width': 380, 'text-align': 'left' } }
];
@ -559,33 +450,13 @@ function InitGridFilterAvailableJobsites() {
col.key = list_columns[hd].valueIndex;
columns.push(col);
}
grid_dtfilternjs.canMultiSelect = true;
grid_dtfilternjs.multiSelect = true;
grid_dtfilternjs.columns = columns;
grid_dtfilternjs.init();
grid_dtfilternjs.rowdblclick = function (rowindex) {
var rowdata = grid_dtfilternjs.source[rowindex];
if (rowdata) {
var Jobsite = rowdata.Values;
}
};
grid_dtfilternjs.selectedrowchanged = function (rowindex) {
var rowdata = grid_dtfilternjs.source[rowindex];
if (rowdata) {
}
}
}
function showFilterAvailableJobsite(data) {
var rows = [];
for (var i = 0; i < data.length; i++) {
var r = data[i];
var fr = { Values: r };
rows.push(fr);
}
grid_dtfilternjs.setData(rows);
grid_dtfilternjs.setData(data);
}
function onFilterJobsiteKeyPress(e) {
@ -621,8 +492,9 @@ function GetFilterJobsiteList() {
function getFilterMatchAvailableJobsites() {
var selected = [];
for (var i = 0; i < grid_dtfilterjs.source.length; i++) {
var m = grid_dtfilterjs.source[i].Values;
var tempsource = grid_dtfilterjs.source;
for (var i = 0; i < tempsource.length; i++) {
var m = tempsource[i];
selected.push(m.ID);
}
var filter = $('#txt_filterjobsite_key').val().toLowerCase();
@ -666,8 +538,10 @@ function OnSetFilterSelectJobSites() {
if (filterdata && filterdata.Jobsites) {
jobsites = filterdata.Jobsites;
}
for (var i = 0; i < grid_dtfilternjs.source.length; i++) {
var m = grid_dtfilternjs.source[i].Values;
var tempsource = grid_dtfilternjs.source;
for (var i = 0; i < tempsource.length; i++) {
var m = tempsource[i];
if (m.selected) {
m.selected = false;
jobsites.push(m);
@ -688,19 +562,14 @@ function OnSetFilterSelectJobSites() {
}
function OnFilterJobsiteDelete() {
showConfirm(GetTextByKey("P_UM_DELETESELECTEDJOBSITE", 'Are you sure you want to delete these selected jobsite?'), GetTextByKey("P_UM_JOBSITEASSIGNMENT", 'Jobsite Assignment'), function () {
for (var i = grid_dtfilterjs.innerSource.length - 1; i >= 0; i--) {
var s = grid_dtfilterjs.innerSource[i].Values;
if (s.selected) {
grid_dtfilterjs.innerSource.splice(i, 1);
}
}
showConfirm1(GetTextByKey("P_UM_DELETESELECTEDJOBSITE", 'Are you sure you want to delete these selected jobsite?'), GetTextByKey("P_UM_JOBSITEASSIGNMENT", 'Jobsite Assignment'), function () {
var jobsites = [];
if (grid_dtfilterjs.source != null) {
for (var j = grid_dtfilterjs.source.length - 1; j >= 0; j--) {
var l = grid_dtfilterjs.source[j].Values;
var source = grid_dtfilterjs.source;
for (var j = source.length - 1; j >= 0; j--) {
var l = source[j];
if (l.selected) {
grid_dtfilterjs.source.splice(j, 1);
grid_dtfilterjs.removeItem(j);
}
else {
jobsites.push(l);
@ -710,7 +579,6 @@ function OnFilterJobsiteDelete() {
var filterdata = $("#sel_filtertemplate").find("option:selected").data('filterdata');
filterdata.Jobsites = jobsites;
grid_dtfilterjs.reset();
});
}
@ -719,12 +587,7 @@ function OnFilterJobsiteDelete() {
//**************************************Asset Types****************************************************//
var grid_dtfilterat;
function InitGridFilterSelectedAssetTypes() {
grid_dtfilterat = new GridView('#selectedfilterassettypelist');
grid_dtfilterat.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_dtfilterat = createGridView1('#selectedfilterassettypelist');
var list_columns = [
{ name: 'Name', caption: GetTextByKey("P_UM_NAME", "Name"), valueIndex: 'Name', css: { 'width': 380, 'text-align': 'left' } }
];
@ -753,43 +616,18 @@ function InitGridFilterSelectedAssetTypes() {
col.key = list_columns[hd].valueIndex;
columns.push(col);
}
grid_dtfilterat.canMultiSelect = true;
grid_dtfilterat.multiSelect = true;
grid_dtfilterat.columns = columns;
grid_dtfilterat.init();
grid_dtfilterat.rowdblclick = function (rowindex) {
var rowdata = grid_dtfilterat.source[rowindex];
if (rowdata) {
var AssetType = rowdata.Values;
}
};
grid_dtfilterat.selectedrowchanged = function (rowindex) {
var rowdata = grid_dtfilterat.source[rowindex];
if (rowdata) {
}
}
}
function showFilterSelectedAssetType(data) {
var rows = [];
for (var i = 0; i < data.length; i++) {
var r = data[i];
var fr = { Values: r };
rows.push(fr);
}
grid_dtfilterat.setData(rows);
grid_dtfilterat.setData(data);
}
var grid_dtfilternat;
function InitGridFilterAvailableAssetTypes() {
grid_dtfilternat = new GridView('#filteravailableassettypelist');
grid_dtfilternat.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_dtfilternat = createGridView1('#filteravailableassettypelist');
var list_columns = [
{ name: 'Name', caption: GetTextByKey("P_UM_NAME", "Name"), valueIndex: 'Name', css: { 'width': 380, 'text-align': 'left' } }
];
@ -818,33 +656,13 @@ function InitGridFilterAvailableAssetTypes() {
col.key = list_columns[hd].valueIndex;
columns.push(col);
}
grid_dtfilternat.canMultiSelect = true;
grid_dtfilternat.multiSelect = true;
grid_dtfilternat.columns = columns;
grid_dtfilternat.init();
grid_dtfilternat.rowdblclick = function (rowindex) {
var rowdata = grid_dtfilternat.source[rowindex];
if (rowdata) {
var AssetType = rowdata.Values;
}
};
grid_dtfilternat.selectedrowchanged = function (rowindex) {
var rowdata = grid_dtfilternat.source[rowindex];
if (rowdata) {
}
}
}
function showFilterAvailableAssetType(data) {
var rows = [];
for (var i = 0; i < data.length; i++) {
var r = data[i];
var fr = { Values: r };
rows.push(fr);
}
grid_dtfilternat.setData(rows);
grid_dtfilternat.setData(data);
}
function onFilterAssetTypeKeyPress(e) {
@ -880,8 +698,9 @@ function GetFilterAssetTypeList() {
function getMatchFilterAvailableAssetTypes() {
var selected = [];
for (var i = 0; i < grid_dtfilterat.source.length; i++) {
var m = grid_dtfilterat.source[i].Values;
var tempsource = grid_dtfilterat.source;
for (var i = 0; i < tempsource.length; i++) {
var m = tempsource[i];
selected.push(m.ID);
}
@ -927,8 +746,9 @@ function OnSetFilterSelectAssetTypes() {
assettypes = filterdata.AssetTypes;
}
for (var i = 0; i < grid_dtfilternat.source.length; i++) {
var m = grid_dtfilternat.source[i].Values;
var tempsource = grid_dtfilternat.source;
for (var i = 0; i < tempsource.length; i++) {
var m = tempsource[i];
if (m.selected) {
m.selected = false;
assettypes.push(m);
@ -949,19 +769,14 @@ function OnSetFilterSelectAssetTypes() {
}
function OnFilterAssetTypeDelete() {
showConfirm(GetTextByKey("P_UM_AREYOUSUREYOUWANTTODELETETHESESELECTEDASSETTYPE", 'Are you sure you want to delete these selected assettype?'), GetTextByKey("P_UM_ASSETTYPEASSIGNMENT", 'Asset Type Assignment'), function () {
for (var i = grid_dtfilterat.innerSource.length - 1; i >= 0; i--) {
var s = grid_dtfilterat.innerSource[i].Values;
if (s.selected) {
grid_dtfilterat.innerSource.splice(i, 1);
}
}
showConfirm1(GetTextByKey("P_UM_AREYOUSUREYOUWANTTODELETETHESESELECTEDASSETTYPE", 'Are you sure you want to delete these selected assettype?'), GetTextByKey("P_UM_ASSETTYPEASSIGNMENT", 'Asset Type Assignment'), function () {
var assettypes = [];
if (grid_dtfilterat.source != null) {
for (var j = grid_dtfilterat.source.length - 1; j >= 0; j--) {
var l = grid_dtfilterat.source[j].Values;
var source = grid_dtfilterat.source;
for (var j = source.length - 1; j >= 0; j--) {
var l = source[j];
if (l.selected) {
grid_dtfilterat.source.splice(j, 1);
grid_dtfilterat.removeItem(j);
}
else {
assettypes.push(l);
@ -971,8 +786,6 @@ function OnFilterAssetTypeDelete() {
var filterdata = $("#sel_filtertemplate").find("option:selected").data('filterdata');
filterdata.AssetTypes = assettypes;
grid_dtfilterat.reset();
});
}
//**************************************End Asset Types****************************************************//
@ -980,7 +793,7 @@ function OnFilterAssetTypeDelete() {
function getFilterTemplates() {
useroptionsrequest('GetFilterTemplates', '', function (data) {
if (typeof data === "string") {
showAlert(data, GetTextByKey("P_XXXXX", 'FIC Alert Filter Templates'));
showAlert(data, GetTextByKey("P_UM_FICALERTFILTERTEMPLATES", 'FIC Alert Filter Templates'));
return;
}
if (data && data.length > 0) {
@ -1019,7 +832,7 @@ function getFilterTemplateItem() {
return;
useroptionsrequest('GetFilterTemplateItem', filterid, function (data) {
if (typeof data === "string") {
showAlert(data, GetTextByKey("P_XXXXX", 'FIC Alert Filter Templates'));
showAlert(data, GetTextByKey("P_UM_FICALERTFILTERTEMPLATES", 'FIC Alert Filter Templates'));
return;
}
if (data) {
@ -1052,9 +865,9 @@ function onOpenFilterTemplate(type) {
function OnAddFilterTemplate() {
$('#dialog_filtertemplatename').val('');
var tile = GetTextByKey('P_XXXX', 'Add Filter Template');
var tile = GetTextByKey('P_UM_ADDFILTERTEMPLATES', 'Add Filter Template');
if (openfiltertemplatetype === 2)
tile = GetTextByKey('P_XXXX', 'Copy Filter Template');
tile = GetTextByKey('P_UM_COPYFILTERTEMPLATES', 'Copy Filter Template');
$('#dialog_filtertemplate .dialog-title span.title').text(tile);
showmaskbg1(true);
@ -1070,7 +883,7 @@ function OnAddFilterTemplate() {
function OnEditFilterTemplate() {
$('#dialog_filtertemplatename').val('');
$('#dialog_filtertemplate .dialog-title span.title').text(GetTextByKey('P_XXXX', 'Edit Filter Template'));
$('#dialog_filtertemplate .dialog-title span.title').text(GetTextByKey('P_UM_EDITFILTERTEMPLATES', 'Edit Filter Template'));
var tempname = $('#sel_filtertemplate').find("option:selected").text();
showmaskbg1(true);
$('#dialog_filtertemplate')
@ -1087,12 +900,12 @@ function OnEditFilterTemplate() {
function OnSetFilterTemplate() {
var tempname = $.trim($('#dialog_filtertemplatename').val());
if (tempname === "") {
showAlert(GetTextByKey("P_XXXX", 'Template Name cannot be empty.'), 'Filter Template', undefined, function () { $('#dialog_filtertemplatename').focus(); });
showAlert(GetTextByKey("P_UM_TEMPLATENAMENOTBEEMPTY", 'Template Name cannot be empty.'), GetTextByKey('P_UM_FILTERTEMPLATE', 'Filter Template'), undefined, function () { $('#dialog_filtertemplatename').focus(); });
return;
}
var check = CheckFilterTemplateName(tempname);
if (check) {
showAlert(GetTextByKey("P_XXXX", 'Template Name already exists.'), 'Filter Template', undefined, function () { $('#dialog_filtertemplatename').focus(); });
showAlert(GetTextByKey("P_UM_TEMPLATENAMEALREADYEXISTS", 'Template Name already exists.'), GetTextByKey('P_UM_FILTERTEMPLATE', 'Filter Template'), undefined, function () { $('#dialog_filtertemplatename').focus(); });
return;
}
@ -1142,7 +955,7 @@ function CheckFilterTemplateName(tempname) {
var deletefiltertemplates = [];
function onDeleteFilterTemplate() {
var opt = $('#sel_filtertemplate').find("option:selected");
showConfirm(GetTextByKey("P_XXX", 'Are you sure you want to delete filter template ' + opt.text() + '?'), GetTextByKey("P_XXX", "FIC Alert Filter Templates"), function () {
showConfirm1(GetTextByKey("P_UM_AREYOUSUREYOUWANTTODELETEFILTERTEMPLATE", 'Are you sure you want to delete filter template {0}?').replace('{0}', opt.text()), GetTextByKey("P_UM_FICALERTFILTERTEMPLATES", "FIC Alert Filter Templates"), function () {
if (opt.val() > 0)
deletefiltertemplates.push(opt.val());
opt.remove();