|
发表于 2013-1-15 17:30:07
|
显示全部楼层
在老portal的登录页面上添加一个checkbox,选择后登录跳转到新portal首页
/UI/portal/login.w中修改
1.添加checkbox选项- <div class="remember_div">
- <input id="remember_checkbox" type="checkbox" checked="checked"/>
- <span class="lable" style="vertical-align:middle">记住用户名</span>
- <input id="maximize_checkbox" type="checkbox"/>
- <span class="lable" style="vertical-align:middle">最大化</span>
- <input id="newPortal_checkbox" type="checkbox" />
- <span class="lable" style="vertical-align:middle">新Portal登陆界面</span>
- </div>
复制代码 2.初始newPortal_checkbox- $.jpolite.Login.initRememberCheckbox("remember_checkbox"); // 初始化记住设置选择框
- $.jpolite.Login.initMaximize("maximize_checkbox"); // 初始化记住最大化选择框
- $.jpolite.Login.initLoginButton("login_button"); // 初始化登陆按钮
- $.jpolite.Login.initNewPortalCheckbox("newPortal_checkbox"); //初始化跳转到新portal选择框
- //$.jpolite.Login.initCancelButton("cancel_button"); // 初始化取消按钮
复制代码 /UI/portal/system/js/login.js中修改
1.定义login.w中用到的initNewPortalCheckbox- initNewPortalCheckbox:function(checkboxID){
- this.items.newPortalCheckbox=$("#"+checkboxID).change(function(){
- $.cookie("justep-full-screen", $.jpolite.Login.items.newPortalCheckbox.get(0).checked, {expires:7,path:'/'});
- });
- },
复制代码 2.页面的跳转
把如下代码- if($.jpolite.Login.items.maximizeCheckbox.get(0).checked){
- if(!window.opener){
- $.jpolite.Login.maximize();
- }else{
- window.location.href = window.location.href.replace(/login.*\.w.*/, $.jpolite.Login.indexPage) + "?timestamp=" + new Date().valueOf();
- }
- }else{
- window.location.href = window.location.href.replace(/login.*\.w.*/, $.jpolite.Login.indexPage) + "?timestamp=" + new Date().valueOf();
- }
复制代码 修改为- var bsessionid = data.bsessionID;
- if($.jpolite.Login.items.newPortalCheckbox.get(0).checked){
- alert(2);
- window.location.href = window.location.href.replace(/\/portal\/login\.w.*/, '/portal2/process/portal/index.w')+"?bsessionid="+bsessionid+"×tamp=" + new Date().valueOf(); ;
- }else{
- if($.jpolite.Login.items.maximizeCheckbox.get(0).checked){
- if(!window.opener){
- $.jpolite.Login.maximize();
- }else{
- window.location.href = window.location.href.replace(/login.*\.w.*/, $.jpolite.Login.indexPage) + "?timestamp=" + new Date().valueOf();
- }
- }else{
- window.location.href = window.location.href.replace(/login.*\.w.*/, $.jpolite.Login.indexPage) + "?timestamp=" + new Date().valueOf();
- }
- }
复制代码 |
|