.
This commit is contained in:
@ -41,22 +41,6 @@
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#dialog_user_group {
|
||||
z-index: 500;
|
||||
top: 60px;
|
||||
left: 150px;
|
||||
}
|
||||
|
||||
.inputbox {
|
||||
width: 500px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
#dialog_group_description {
|
||||
padding: 2px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.group_table .main_table thead tr {
|
||||
display: block;
|
||||
}
|
||||
@ -90,10 +74,13 @@
|
||||
line-height: 30px;
|
||||
margin-left: 20px;
|
||||
margin-bottom: 15px;
|
||||
width: 860px !important;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.td_module {
|
||||
width: 200px;
|
||||
width: 220px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.label { /*cover tab.css*/
|
||||
@ -700,46 +687,96 @@
|
||||
$('#security_message').append(div);
|
||||
createFeatures(ft.Features);
|
||||
}
|
||||
WOFeaturesChange();
|
||||
}
|
||||
|
||||
|
||||
function createFeatures(features) {
|
||||
var nonetext = GetTextByKey("P_UM_NONE", "None");
|
||||
var readonlytext = GetTextByKey("P_UM_READONLY", "Read Only");
|
||||
var fullcontroltext = GetTextByKey("P_UM_FULLCONTROL", "Full Control");
|
||||
var requestonlytext = GetTextByKey("P_UM_REQUESTONLY", "Request Only");
|
||||
var tb = $('<table class="table_module" style="width:640px;"></table>');
|
||||
var mywotext = GetTextByKey("P_UM_XXX", "My Work Orders");
|
||||
var locdeptext = GetTextByKey("P_UM_XXX", "My Location Or Department");
|
||||
var tb = $('<table class="table_module" ></table>');
|
||||
$('#security_message').append(tb);
|
||||
for (var i = 0; i < features.length; i++) {
|
||||
var feature = features[i].Item1;
|
||||
var tr = $('<tr></tr>');
|
||||
tb.append(tr);
|
||||
var td = $('<td class="td_module"></td>').text(feature.CurrentName);
|
||||
if ([239, 252, 253, 254, 255, 256, 257].indexOf(feature.Id) >= 0)
|
||||
td.css('padding-left', 30);
|
||||
tr.append(td);
|
||||
|
||||
for (var j = 0; j < feature.AvailablePermissions.length; j++) {
|
||||
var pm = feature.AvailablePermissions[j];
|
||||
td = $('<td style="width: 100px;"></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)
|
||||
name = nonetext;
|
||||
else if (pm === 1)
|
||||
name = readonlytext;
|
||||
else if (pm === 2)
|
||||
name = mywotext;
|
||||
else if (pm === 10)
|
||||
name = requestonlytext;
|
||||
else if (pm === 11) {
|
||||
name = locdeptext;
|
||||
td.css('width', 170);
|
||||
}
|
||||
else if (pm === 99999)
|
||||
name = fullcontroltext;
|
||||
var lab = $('<label></label>').text(name);
|
||||
td.append(lab);
|
||||
var ipt = $('<input type="radio" class="featureradio" />').attr('name', 'feature_' + feature.Id).val(pm).data('featureid', feature.Id);
|
||||
ipt.change(function () {
|
||||
WOFeaturesChange();
|
||||
});
|
||||
td.append(ipt);
|
||||
}
|
||||
|
||||
for (var k = feature.AvailablePermissions.length; k < 4; k++) {//目前最多4列,不足4列的补齐4列
|
||||
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);
|
||||
td = $('<td></td>');
|
||||
tr.append(td);
|
||||
}
|
||||
}
|
||||
|
||||
function WOFeaturesChange() {
|
||||
var wopermission = $("input:radio[name='feature_210']:checked").val();
|
||||
wopermission = parseInt(wopermission);
|
||||
if (wopermission === 0) {
|
||||
$("input:radio[name='feature_253']").prop("disabled", true);
|
||||
$("input:radio[name='feature_254']").prop("disabled", true);
|
||||
$("input:radio[name='feature_252']").prop("disabled", true);
|
||||
$("input:radio[name='feature_255']").prop("disabled", true);
|
||||
$("input:radio[name='feature_256']").prop("disabled", true);
|
||||
$("input:radio[name='feature_239']").prop("disabled", true);
|
||||
}
|
||||
else if (wopermission === 1) {
|
||||
$("input:radio[name='feature_253']").prop("disabled", false);
|
||||
$("input:radio[name='feature_254']").prop("disabled", false);
|
||||
$("input:radio[name='feature_252']").prop("disabled", true);
|
||||
$("input:radio[name='feature_255']").prop("disabled", true);
|
||||
$("input:radio[name='feature_256']").prop("disabled", true);
|
||||
$("input:radio[name='feature_239']").prop("disabled", true);
|
||||
}
|
||||
else if (wopermission === 99999) {
|
||||
$("input:radio[name='feature_253']").prop("disabled", false);
|
||||
$("input:radio[name='feature_254']").prop("disabled", false);
|
||||
$("input:radio[name='feature_252']").prop("disabled", false);
|
||||
$("input:radio[name='feature_255']").prop("disabled", false);
|
||||
$("input:radio[name='feature_256']").prop("disabled", false);
|
||||
$("input:radio[name='feature_239']").prop("disabled", false);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************End Security********************************/
|
||||
/*****************************************************************************/
|
||||
@ -776,7 +813,7 @@
|
||||
<div id="mask_bg" style="display: none;">
|
||||
<div class="loading c-spin"></div>
|
||||
</div>
|
||||
<div class="dialog" id="dialog_user_group" style="display: none; z-index: 500; width: 840px;">
|
||||
<div class="dialog" id="dialog_user_group" style="display: none; width: 950px;">
|
||||
<div class="dialog-title"><span class="title" data-lgid="P_UG_ADDUSERGROUP">Add User Group</span><em class="dialog-close"></em></div>
|
||||
<div class="dialog-content">
|
||||
<div id="div_container">
|
||||
@ -790,12 +827,12 @@
|
||||
<tr style="height: 27px;">
|
||||
<td class="label" data-lgid="P_UG_USERGROUPNAME_COLON">User Group Name:</td>
|
||||
<td>
|
||||
<input type="text" class="inputbox" id="dialog_group_name" tabindex="1" maxlength="100" /></td>
|
||||
<input type="text" id="dialog_group_name" style="padding: 2px; width:320px;" tabindex="1" maxlength="100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" data-lgid="P_UG_DESCRIPTION_COLON">Description:</td>
|
||||
<td>
|
||||
<textarea class="inputbox" id="dialog_group_description" tabindex="2" maxlength="200"></textarea></td>
|
||||
<textarea id="dialog_group_description" style="padding: 2px; height: 60px; width:320px;" tabindex="2" maxlength="200"></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="dialog-subheader" data-lgid="P_UG_GROUPMEMBERS">Group Members</div>
|
||||
@ -826,7 +863,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div id="tab_security" data-page="tab_security" style="display: none">
|
||||
<div id="security_message" style="padding-left: 50px; height: 440px; overflow: auto;">
|
||||
<div id="security_message" style="padding-left: 20px; height: 440px; overflow: auto;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mask_loading dialog" style="display: none;"></div>
|
||||
|
Reference in New Issue
Block a user