apps/com.actionsoft.apps.coe.pal.publisher/template/page/publish.client.sso.home2.html

344 lines
13 KiB
HTML
Raw Normal View History

2022-07-20 13:59:04 +08:00
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>流程管理门户</title>
<script type="text/javascript" src="../commons/js/jquery/scripts/jquery.js"></script>
<script type="text/javascript" src="../commons/js/awsui.js"></script>
<script type="text/javascript" src="../commons/js/public.js"></script>
<link rel="stylesheet" href="../commons/css/awsui.css">
<link rel="stylesheet" href="../apps/com.actionsoft.apps.coe.pal.publisher/css/publish.client.sso2.css">
<!-- jquery jcrop -->
<link rel="stylesheet" type="text/css" href="../commons/js/jquery/scripts/ui/jquery.jcrop/css/jquery.Jcrop.css" />
<script type="text/javascript" src="../commons/js/jquery/scripts/ui/jquery.jcrop/js/jquery.Jcrop.js"></script>
<style type="text/css">
html {
box-sizing: border-box;
min-height: 100%;
min-width: 100%
}
body{
height: 100%;
width: 100%;
overflow:hidden;
}
#content {
position: absolute;
top: 120px;
bottom: 0px;
left: 0px;
}
.animated {
transition: all .28s linear;
-moz-transition: all .28s linear;
-webkit-transition: all .28s linear;
-o-transition: all .28s linear;
}
input {
font-size: 100%;
margin: 0;
font-family: Arial, Tahoma, "SimSun";
}
.head-ws {
float:right;
margin:0px 30px 0px 0px;
font-size:15px;
position: relative;
right: -20px;
top: 3px;
}
#changeWsDialog {
background: none repeat scroll 0 0 #FFFFFF;
border-radius: 3px;
box-shadow: 0 0 15px #DDDDDD;
display: none;
/* top: 70px; */
min-height: 30px;
position: absolute;
right:6px;
z-index: 9;
padding: 15px 20px;
}
#changeWsDialog ul {
color: #323232;
cursor: pointer;
display: block;
font-size: 14px;
height: 35px;
line-height: 35px;
margin: 0 0 0 0px;
padding: 0 0 0 10px;
text-overflow:ellipsis;
}
#changeWsDialog li {
list-style-type: none !important;
}
#changeWsDialog span img {
margin-right: 5px;
}
.setting_div {
display: inline-block;
color: #000;
font-size: 20px;
margin: 0px 10px 0 10px;
padding-top: 10px;
padding-left: 20px;
}
.cwshow-title-text {
color:#33A382;
}
</style>
<script>
window["MzBrowser"] = {};
(function() {
if (MzBrowser.platform)
return;
var ua = window.navigator.userAgent;
MzBrowser.platform = window.navigator.platform;
MzBrowser.firefox = ua.indexOf("Firefox") > 0;
MzBrowser.opera = typeof (window.opera) == "object";
MzBrowser.ie = !MzBrowser.opera && ua.indexOf("MSIE") > 0;
MzBrowser.mozilla = window.navigator.product == "Gecko";
MzBrowser.netscape = window.navigator.vendor == "Netscape";
MzBrowser.safari = ua.indexOf("Safari") > -1;
if (MzBrowser.firefox)
var re = /Firefox(\s|\/)(\d+(\.\d+)?)/;
else if (MzBrowser.ie)
var re = /MSIE( )(\d+(\.\d+)?)/;
else if (MzBrowser.opera)
var re = /Opera(\s|\/)(\d+(\.\d+)?)/;
else if (MzBrowser.netscape)
var re = /Netscape(\s|\/)(\d+(\.\d+)?)/;
else if (MzBrowser.safari)
var re = /Version(\/)(\d+(\.\d+)?)/;
else if (MzBrowser.mozilla)
var re = /rv(\:)(\d+(\.\d+)?)/;
if ("undefined" != typeof (re) && re.test(ua))
MzBrowser.version = parseFloat(RegExp.$2);
})();
function aa() {
if (MzBrowser.ie && MzBrowser.version <= 8) {
window.location.href = "../pal/error/coe_not_support.htm";
}
}
aa();
$(function(){
$('#main-frm').attr('src', './w?sid='+sid+'&cmd=com.actionsoft.apps.addons.xpages_home&id=' + xpagesId);
});
function onbeforechange(tab, contentTabId, newTabId) {
}
// 点击标签事件
function onchange(tab, newTabId) {
if (newTabId != 'tab1') {
var id = newTabId.replace(/tab-/g,'');
var iframeId = 'main-frm-' + id;
$('#' + iframeId).attr('src', '');
if ($('#' + iframeId).attr('src') == undefined || $('#' + iframeId).attr('src') == '') {
for (var i = 0; i < portalTabs.length; i++) {
if (id == portalTabs[i].id) {
$('#' + iframeId).attr('src', portalTabs[i].url.replace(/@sid/g, sid).replace(/@wsId/g, $('#wsId').val()));
// 是否显示资产库选择设置
if (portalTabs[i].showWsSelect) {
$('#ws').show();
} else {
$('#ws').hide();
}
}
}
}
} else {
$('#ws').hide();
}
}
</script>
<script type="text/javascript">
var isSecurityPwdChange = <#isSecurityPwdChange>;
var forceChangePwd = <#forceChangePwd>;
var isSecurityPwdComplexity = <#isSecurityPwdComplexity>; // 密码强度
var securityMinPwdLength = <#securityMinPwdLength>; // 允许账户口令最小长度0表示无限制
var securityMaxPwdLength = <#securityMaxPwdLength>; // 允许账户口令最大长度最多32位长度
var palIds = '';
var palAdmin = <#palAdmin>;
var xpagesId = '<#xpagesId>';
var portalTabs = <#portalTabs>;
var ws = <#ws>;
</script>
<script type="text/javascript" src="../apps/com.actionsoft.apps.coe.pal.publisher/js/unslider.min.js"></script>
<script type="text/javascript" src="../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.client.sso.index2.js"></script>
<script type="text/javascript" src="../apps/com.actionsoft.apps.coe.pal.publisher/js/Mtils.min.js"></script>
<script type="text/javascript" src="../commons/js/jquery/scripts/ui/aws.photocut.js"></script>
</head>
<body>
<div id="head">
<div style="width:20%;display:inline-block;">
</div>
<div class="head-wrap" style="width:60%;">
<!-- <img alt="" src="../apps/com.actionsoft.apps.coe.pal/img/logo/portal_logo.png" style="height:20px;margin-right:20px;"> -->
<img alt="" src="<#logoImgPath>" style="height:20px;width:125px;margin-right:20px;">
<input type="password" name="password" style="display:none" autocomplete="off"/>
<input id="searchText" type="text" class="txt" placeholder="请输入关键词..." style="vertical-align: middle;" autocomplete="off"/>
<button type="button" id="search" class="awsui-btn awsui-btn-green" onclick="search()">搜索</button>
</div>
<div id="tool" style="min-width:220px;">
<div id="user" style="display:inline-block;min-width:100px;height:100%;">
<div style="display: inline-block; line-height: 80px; margin: 0 10px 0 0; width: 40px;">
<img src="<#userPhoto>" style="width: 100%;border-radius: 50%;" />
</div>
<div style="display: inline;" id="userName"><#userName></div>
<div id="appviewport2-top-right-dialog" style="display: none; top: 75px;" class="setting_div">
<span id="updatePwd" onclick="modifyPwd();"><img src="../apps/com.actionsoft.apps.coe.pal.publisher/img/password.png" id="updatePasswordBtn" />修改密码</span>
<span style="<#entryCoEView>" onClick="entryCoE();"><img src="../apps/com.actionsoft.apps.coe.pal.publisher/img/change.png" />切换到PAL</span>
</div>
</div>
<img id="logout" src="../apps/com.actionsoft.apps.coe.pal.publisher/img/exit2.png" alt="退出" onclick="logout();" style="cursor: pointer;padding:5px;display:inline-block;" title="退出" />
</div>
</div>
<div id="ws" class="head-ws" style="width:450px;z-index: 1;display: none;">
<div id="wsNameDiv" style="display:inline-block;width:400px;text-align:right;vertical-align: middle;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;margin-right: 10px;"></div>
<div id="wsChangeArea" style="display:inline-block;">
<img id="changeWsButton" style="cursor:pointer;" src="../apps/com.actionsoft.apps.coe.pal.publisher/img/change.png" >
<div id="changeWsDialog" style="display: none;" class="setting_div"></div>
</div>
<input id="wsId" type="hidden" />
</div>
<div>
<div id="tabs" style="padding:0px 50px;margin:0 0 0px 0px;background:#F8F8F8;" class="awsui-simple-tab" contentid="content" id="content_tab" onclick="onbeforechange" onchange="onchange" cookie="false">
<a tit="tab1" class="active" style="height:100%;background:#F8F8F8;padding-top:12px;">门 户</a>
<!-- <a tit="tab2" style="height:100%;">文字占位</a> -->
</div>
<div id="content" class="aws-simple-tab-content">
<div tit="tab1" class="active" name="content_iframe" style="height:100%;width:100%;overflow: hidden;">
<iframe tit="tab1" id="main-frm" src="" style="width:100%;height:100%;overflow-y: scroll;" frameborder="0" scrolling="yes" marginwidth="0" marginheight="0" allowfullscreen="true" webkitallowfullscreen="true"></iframe>
</div>
<!-- <div tit="tab2"display:none;" name="content_iframe" style="width:100%;height:100%;overflow: hidden;">
<iframe id="main-frm2" src="" style="width:100%;height:100%;overflow-y: scroll;" width="100%" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen="true" webkitallowfullscreen="true"></iframe>
</div> -->
</div>
</div>
<div id="modify_dialog" style="display: none;">
<table class="awsui-ux" style="padding: 0px;">
<tbody>
<tr class="force-change-pwd-tips">
<td colspan="3" class="awsui-ux-title">如果需要,请修改门户登录密码!</td>
</tr>
<tr>
<td class="awsui-ux-title" style="width: 125px;">旧口令</td>
<td class="required"><input id="oldPassword" name="oldPassword" class="awsui-textbox" type="password" style="height: 30px;"></td>
<td></td>
</tr>
<tr>
<td class="awsui-ux-title">新口令</td>
<td class="required"><input id="password" name="password" class="awsui-textbox password" type="password" style="height: 30px;"></td>
<td></td>
</tr>
<tr>
<td class="awsui-ux-title">确认口令</td>
<td class="required"><input id="confirmPassword" name="confirmPassword" class="awsui-textbox confirmPassword" type="password" style="height: 30px;"></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<input type="hidden" name="roleId" id="roleId" value="<#roleId>" />
<form action="./w" method="post" id="frm" name="frm" target="_blank">
<input type="hidden" name="cmd" value="com.actionsoft.apps.coe.pal_user_home_page">
<input type="hidden" name="clientIp" value="0:0:0:0:0:0:0:1">
<input type="hidden" name="sid" id="sid" value="<#sid>" />
<input type="hidden" name="appId" id="appId" value="<#appId>" />
</form>
</body>
<script type="text/javascript">
var sid = "<#sid>";
var appId = "<#appId>";
// 根据条件过滤
var tempArr = [];
for (var i = 0; i < portalTabs.length; i++) {
if (portalTabs[i].showTabUserType && portalTabs[i].showTabUserType == 'palAdmin' && !palAdmin) {
continue;
}
tempArr.push(portalTabs[i]);
}
portalTabs = tempArr;
for (var i = 0; i < portalTabs.length; i++) {
var index = i + 2;
var tab = portalTabs[i];
var tabHtml = '<a tit="tab-' + tab.id + '" style="height:100%;background:#F8F8F8;padding-top:12px;">' + portalTabs[i].name + '</a>';
$('#tabs').append(tabHtml);
var content = '';
content += '<div tit="tab-' + tab.id + '" name="content_iframe" style="width:100%;height:100%;overflow: hidden;display:none;">'
// content += '<iframe id="main-frm' + index + '" src="" style="width:100%;height:100%;overflow-y: scroll;" width="100%" frameborder="0" scrolling="yes" marginwidth="0" marginheight="0" allowfullscreen="true" webkitallowfullscreen="true"></iframe>'
content += '<iframe id="main-frm-' + tab.id + '" name="content_iframe" width="100%" frameborder="0" scrolling="yes" marginwidth="0" marginheight="0" allowfullscreen="true" webkitallowfullscreen="true" mcolor="mskin_color3" style="height: 100%;overflow-y:scroll;"></iframe>'
content += '</div>';
$('#content').append(content);
}
// for (var i = 0; i < portalTabs.length; i++) {
// var index = i + 2;
// var tabHtml = '<a tit="tab' + index + '" style="height:100%;background:#F8F8F8;padding-top:12px;">' + portalTabs[i].name + '</a>';
// $('#tabs').append(tabHtml);
// var content = '';
// content += '<div tit="tab' + index + '" name="content_iframe" style="width:100%;height:100%;overflow: hidden;display:none;">'
// // content += '<iframe id="main-frm' + index + '" src="" style="width:100%;height:100%;overflow-y: scroll;" width="100%" frameborder="0" scrolling="yes" marginwidth="0" marginheight="0" allowfullscreen="true" webkitallowfullscreen="true"></iframe>'
// content += '<iframe id="main-frm' + index + '" name="content_iframe" width="100%" frameborder="0" scrolling="yes" marginwidth="0" marginheight="0" allowfullscreen="true" webkitallowfullscreen="true" mcolor="mskin_color3" style="height: 100%;overflow-y:scroll;"></iframe>'
// content += '</div>';
// $('#content').append(content);
// var object = {};
// object.id = 'main-frm' + index;
// object.url = portalTabs[i].url;
// object.showWsSelect = portalTabs[i].showWsSelect;
// object.showTabUserType = portalTabs[i].showTabUserType;
// portalTabArray.push(object);
// }
var navtab;
function getUseNameLength(str_data){
var temp=0;
for(var i=0;i<str_data.length;i++){
if(Mtils.validation.isChinese(str_data[i])){
temp+=2;
}else{
temp+=1;
}
}
return temp;
}
$(function($) {
var username = $("#userName").text();
var len = getUseNameLength(username);
if(len>6){
$(".middle").css("width",(12+((len-6)/2)+1)+"%");
}
$(window).resize();
});
function search() {
// 所有类型,搜索框内容,当前类型,
var text = $('#searchText').val().trim();
var type = 'all';
var templateId = '30267ab3-aeb6-4371-88e0-ecc13cef94a6';
text = encodeURI(text);
window.open("./w?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_search_page&sid=" + sid + "&type=" + type + "&templateId=" + templateId + "&text=" + text + "&wsId=" + $('#wsId').val(), "_blank");
}
</script>
</html>