This commit is contained in:
2023-05-30 17:34:56 +08:00
parent e728c66786
commit 9da1c4cf30
194 changed files with 10680 additions and 9060 deletions

View File

@ -140,7 +140,7 @@
line-height: 30px;
margin-left: 20px;
margin-bottom: 15px;
width: 1000px !important;
width: 860px !important;
table-layout: fixed;
}
@ -211,6 +211,30 @@
var editableSelectMachine;
var loadingCount = 0;
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 showAlert(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 userrequest(method, param, callback, error) {
_network.request("Security/AddUser.aspx", -1, method, param, callback, error || function (e) {
console.log(e);
@ -341,6 +365,8 @@
function OnAdd() {
avatarFile = null;
$("#btnNext").hide();
$("#btnPrevious").hide();
$('#span_tooltip').css('padding-top', 70);
$('#dialog_user_id').prop('disabled', false).val('');
$('#dialog_avatar').attr('src', _network.root + "titlelogo.ashx?tp=avatar&uid=0");
@ -408,7 +434,7 @@
}
var u = data;
user = data;
useritem = { IID: { Value: uid }, ExcelExports: true };
useritem = { IID: { Value: uid }, CanExportFile: true };
$('#dialog_user_id').prop('disabled', true).val(u.ID);
$('#dialog_avatar').attr('src', _network.root + "titlelogo.ashx?tp=avatar&uid=" + uid + "&sn=" + Math.random());
$('#dialog_user_name').val(u.DisplayName);
@ -420,7 +446,7 @@
'disabled': isMyself(u.IID)
});
$('#dialog_excelexports').on('change', function (e) {
useritem.ExcelExports = $(this).prop('checked');
useritem.CanExportFile = $(this).prop('checked');
});
$('#dialog_isuser').prop({
'checked': u.IsUser,
@ -892,6 +918,7 @@
uid = data[0];
init(uid);
}
reloadsubscribe();
if (userfiltertemplateloaded)
getUserFilterData();
if (assignmenloaded) {//assignment保存后需要情况Filter的数据源
@ -930,7 +957,7 @@
}
$("#dialog_workorderfollower").prop("checked", data.WorkOrderFollower);
$("#dialog_excelexports").prop("checked", data.ExcelExports);
useritem.ExcelExports = data.ExcelExports;
useritem.CanExportFile = data.ExcelExports;
$("#dialog_accessallassets").prop("checked", data.AccessAllAssets);
if (data.AccessAllAssets) {
$('#tab_assignment .iconadd').hide();
@ -1004,15 +1031,15 @@
$('#tab_header_subscribe').show();
//$('#tab_header_security').show();
$('#tab_header_email').show();
$('#tab_header_filter').show();
if (!IsDealer)
if (!IsDealer) {
$('.cononly').show();
$('#tab_header_filter').show();
}
else
$('#tab_header_filter').hide();
// prepare subscribe message
var subscribe = new $subscribeMSGpanel();
subscribe.append($('#subscribe_message').empty(), uid, -1, null, true, 450);
//$('#subscribe_message').applyLanguageText(true);
scriber = subscribe;
reloadsubscribe();
OnEdit();
}
@ -1024,7 +1051,7 @@
//$('#tab_header_security').hide();
$('#tab_header_email').hide();
$('#tab_header_filter').hide();
if (!IsDealer)
if (!IsDealer)
$('.cononly').show();
}
$('#tab_header_info').click();
@ -1033,6 +1060,13 @@
assignmenloaded = false;
}
function reloadsubscribe() {
var subscribe = new $subscribeMSGpanel();
subscribe.append($('#subscribe_message').empty(), uid, -1, null, true, 450);
//$('#subscribe_message').applyLanguageText(true);
scriber = subscribe;
}
function getUsers() {
userrequest("GetUsers", JSON.stringify([-1, ""]), function (data) {
var users = [];
@ -1724,7 +1758,8 @@
for (var j = 0; j < feature.AvailablePermissions.length; j++) {
var pm = feature.AvailablePermissions[j];
td = $('<td style="width: 170px;text-align:right;"></td>');
td = $('<td style="text-align:right;"></td>');
td.css('width', (j == 1 || j == 2) ? 170 : 130);
tr.append(td);
var name = "";
if (pm === 0)
@ -1756,7 +1791,8 @@
td.append(ipt);
}
for (var k = feature.AvailablePermissions.length; k < 4; k++) {//目前最多4列不足4列的补齐4列
td = $('<td style="width: 170px;text-align:right;"></td>');
td = $('<td></td>');
td.css('width', (k == 1 || k == 2) ? 170 : 130);
tr.append(td);
}
$("input:radio[name='feature_" + feature.Id + "'][value='" + features[i].Item2[0] + "']").prop("checked", true);
@ -1897,7 +1933,7 @@
$('#dialog_allowloginintoinspectmobile').prop('checked', false);
$('#dialog_allowloginintofleetmobile').prop('checked', false);
$('#dialog_mobileappbarcodescanner').prop('checked', false);
$('#dialog_excelexports').prop('checked', false);
//$('#dialog_excelexports').prop('checked', false);
}
else {
$('.tr_otheronly').show();
@ -2049,9 +2085,6 @@
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div>
<div id="dialogmask" class="maskbg" style="display: none; z-index: 500;">
<div class="loading_icon icon c-spin"></div>
</div>
<div class="function_title">
<span class="sbutton iconsave" onclick="OnSave(0);" data-lgid="P_UM_SAVE">Save</span>
<span class="sbutton iconsave" onclick="OnSave(1);" data-lgid="P_UM_SAVE1">Save and Exit</span>
@ -2072,7 +2105,7 @@
<li id="tab_header_email" data-href="tab_email" onclick="reshowgrid()" data-lgid="P_UM_EMAILSUBSCRIBING">Email Subscribing</li>
<li id="tab_header_assignment" data-href="tab_assignment" class="cononly" onclick="onassignmentclick()" data-lgid="P_UM_ASSETASSIGNMENT" style="display: none;">Asset Assignment</li>
<li id="tab_header_message" data-href="tab_message" class="cononly" style="display: none;" data-lgid="P_UM_XXX">SMS Messages</li>
<li id="tab_header_filter" data-href="tab_filter" onclick="onuserfilterclick()" data-lgid="P_XXXX">Asset Alert Filter Templates</li>
<li id="tab_header_filter" data-href="tab_filter" onclick="onuserfilterclick()" data-lgid="P_XXXX" style="display: none;">Asset Alert Filter Templates</li>
</ul>
<div id="tab_userinfo" data-page="tab_userinfo">
<div id="div_userinfo" style="overflow: auto; min-width: 800px;">
@ -2197,7 +2230,7 @@
<tr id="tr_hourlyrate" style="display: none;">
<td class="label" data-lgid="P_UM_HOURLYRATE_COLON">Hourly Rate ($):</td>
<td>
<input type="text" id="dialog_hourlyrate" class="inputbox" maxlength="7" tabindex="11" autocomplete="off" /></td>
<input type="text" id="dialog_hourlyrate" maxlength="7" tabindex="11" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_UM_EMPLOYEEIDORFOB_COLON">Employee ID or FOB:</td>
@ -2315,7 +2348,7 @@
<div id="subscribe_message" style="overflow: auto; position: relative; padding-left: 50px; min-width: 1045px;"></div>
</div>
<div id="tab_security" data-page="tab_security" style="display: none">
<div id="security_message" style="position: relative; padding-left: 100px; overflow: auto; min-width: 800px;">
<div id="security_message" style="position: relative; padding-left: 20px; overflow: auto; min-width: 800px;">
</div>
</div>
<div id="tab_email" data-page="tab_email" style="display: none">
@ -2412,7 +2445,7 @@
<div id="div_filter" style="overflow: auto; min-width: 800px;">
<div style="margin: 9px 6px 10px 6px;">
<span class="title" data-lgid="P_XXXX">Filter Templates:</span>
<select id="sel_filtertemplate" style="width: 300px;"></select>
<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>
<span class="sbutton iconcopy" onclick="onOpenFilterTemplate(2);" data-lgid="P_IPT_COPY"></span>
@ -2461,6 +2494,9 @@
</div>
</div>
</div>
<div id="dialogmask" class="maskbg" style="display: none;">
<div class="loading_icon icon c-spin"></div>
</div>
</div>
<div id="mask_bg" style="display: none;">
<div class="loading c-spin"></div>
@ -2477,7 +2513,7 @@
<div id="availableassetgrouplist" 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" style="height: unset;" />
<input type="button" onclick="OnSetSelectAssetGroups();" value="OK" data-lgid="P_UM_OK" tabindex="17" />
<div class="clear"></div>
</div>
@ -2495,7 +2531,7 @@
<div id="availablejobsitelist" 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" style="height: unset;" />
<input type="button" onclick="OnSetSelectJobSites();" value="OK" data-lgid="P_UM_OK" tabindex="17" />
</div>
<div class="maskbg" style="display: none;"></div>
@ -2512,7 +2548,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" style="height: unset;" />
<input type="button" onclick="OnSetSelectAssetTypes();" value="OK" data-lgid="P_UM_OK" tabindex="17" />
</div>
<div class="maskbg" style="display: none;"></div>
@ -2529,7 +2565,7 @@
<div id="availablefilterassetgrouplist" 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" style="height: unset;" />
<input type="button" onclick="OnSetFilterSelectAssetGroups();" value="OK" data-lgid="P_UM_OK" tabindex="17" />
<div class="clear"></div>
</div>
@ -2547,7 +2583,7 @@
<div id="filteravailablejobsitelist" 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" style="height: unset;" />
<input type="button" onclick="OnSetFilterSelectJobSites();" value="OK" data-lgid="P_UM_OK" tabindex="17" />
</div>
<div class="maskbg" style="display: none;"></div>
@ -2564,7 +2600,7 @@
<div id="filteravailableassettypelist" 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" style="height: unset;" />
<input type="button" onclick="OnSetFilterSelectAssetTypes();" value="OK" data-lgid="P_UM_OK" tabindex="17" />
</div>
<div class="maskbg" style="display: none;"></div>
@ -2582,7 +2618,7 @@
</table>
</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" style="height: unset;" />
<input type="button" onclick="OnSetFilterTemplate();" value="OK" data-lgid="P_UM_OK" tabindex="17" />
</div>
<div class="maskbg" style="display: none;"></div>