diff options
author | “shentao” <shentao@chinamobile.com> | 2016-11-01 10:52:58 +0800 |
---|---|---|
committer | “shentao” <shentao@chinamobile.com> | 2016-11-01 10:52:58 +0800 |
commit | d6ab89232e0d44684df462c5dac9e653f6b3b7f0 (patch) | |
tree | a89da728c6361b5036046e3442358c393abf2a2b | |
parent | 65a0462abaa783ff8dca0bbbb1479cd41bbdc1ff (diff) |
OCS-130
Change-Id: Ib86f91df5fcac529a6100f44c13092e6af03ca56
Signed-off-by: “shentao” <shentao@chinamobile.com>
12 files changed, 117 insertions, 121 deletions
diff --git a/openo-portal/portal-common/src/main/webapp/common/default.html b/openo-portal/portal-common/src/main/webapp/common/default.html index 1ea020eb..643c5db1 100644 --- a/openo-portal/portal-common/src/main/webapp/common/default.html +++ b/openo-portal/portal-common/src/main/webapp/common/default.html @@ -70,10 +70,9 @@ </script> <div class="header navbar navbar-fixed-top mega-menu"> <div class="header-inner"> - <a class="navbar-brand zte-navbar-brand hidden-sm hidden-xs" href="main-page.html"> - <img id="com_zte_ums_ict_framework_img_netnumenLogo" src="image/integration/netnumenLogo.png" name_img="com_zte_ums_ict_framework_img" alt="logo"/> - <span id="com_zte_ums_ict_framework_ui_main_title" name_i18n="openo_frame_page_i18n" class="zte-brand-text"/> - </a> + <div style="margin-left:50px; margin-top:3px;"> + <img id="com_zte_ums_ict_framework_img_netnumenLogo" src="image/integration/openo_logo_black.png" width="7%" name_img="com_zte_ums_ict_framework_img" alt="logo"/> + </div> <ul class="nav navbar-nav pull-right"> <div class="zte-theme-panel"> <div class="toggler"></div> @@ -194,7 +193,7 @@ </div> <ul class="col-md-2 more-botton-zone"></ul> </ul> - <div id = "pageableDiv" style = "display: none" class="row row1"> + <div id ="pageableDiv" style ="display: none" class="row row1"> <div class="col-xs-12" > <div class="row"> <div id="carousel-example-generic" class="carousel slide" data-ride="carousel" data-interval="false"> diff --git a/openo-portal/portal-common/src/main/webapp/common/image/integration/netnumenLogo.png b/openo-portal/portal-common/src/main/webapp/common/image/integration/netnumenLogo.png Binary files differdeleted file mode 100644 index 21f9e87a..00000000 --- a/openo-portal/portal-common/src/main/webapp/common/image/integration/netnumenLogo.png +++ /dev/null diff --git a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_1.jpg b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_1.jpg Binary files differindex 4a7b0722..db94b166 100644 --- a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_1.jpg +++ b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_1.jpg diff --git a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_2.jpg b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_2.jpg Binary files differindex db94b166..4a7b0722 100644 --- a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_2.jpg +++ b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_2.jpg diff --git a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_black.png b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_black.png Binary files differnew file mode 100644 index 00000000..f320af35 --- /dev/null +++ b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_black.png diff --git a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_pantone.png b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_pantone.png Binary files differnew file mode 100644 index 00000000..14135042 --- /dev/null +++ b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_pantone.png diff --git a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_white.png b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_white.png Binary files differindex ef9aedb7..7adc4ac3 100644 --- a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_white.png +++ b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_white.png diff --git a/openo-portal/portal-common/src/main/webapp/common/js/core/const.js b/openo-portal/portal-common/src/main/webapp/common/js/core/const.js index 3e36766c..429f2d04 100644 --- a/openo-portal/portal-common/src/main/webapp/common/js/core/const.js +++ b/openo-portal/portal-common/src/main/webapp/common/js/core/const.js @@ -25,6 +25,7 @@ var IS_V5_TESTVERSION = true; var FrameConst={}; //Ĭϵ¼ɹתҳ FrameConst.DEFAULT_LOGINSKIP_PAGE = "common/main-page.html"; +FrameConst.DEFAULT_PAGE = "default.html"; FrameConst.do_heartbeat = false; FrameConst.change_pass = false; diff --git a/openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js b/openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js index 267b7219..95ea913e 100644 --- a/openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js +++ b/openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js @@ -403,51 +403,51 @@ function setThemeColor( configColor ){ }); }; -function setFrameWorkByConf(){ - //设置用户相关的框架下拉菜单是否可用 - var helpMenuItem = openoFrameWork_conf.helpMenuItem; - var aboutMenuItem = openoFrameWork_conf.aboutMenuItem; - var flightMenuItem = openoFrameWork_conf.flightMenuItem; - var fullscreenMenuItem = openoFrameWork_conf.fullscreenMenuItem; - var logoutMenuItem = openoFrameWork_conf.logoutMenuItem; - var changePassMenuItem = openoFrameWork_conf.changePassMenuItem; - if (!helpMenuItem || helpMenuItem === "false") { - $('#uep_ict_help_url').parent('li').remove(); - } - if(!aboutMenuItem|| aboutMenuItem === "false"){ - $('[data-target="#aboutDlg"]').parent('li').remove(); - } - if(!helpMenuItem && !aboutMenuItem){ - $('#uep_ict_help_div').remove(); - } - if (!flightMenuItem|| flightMenuItem === "false") { - $('#header_notification_bar').html("<div>      </div>"); - } - if (!fullscreenMenuItem|| fullscreenMenuItem === "false") { - //$('#trigger_fullscreen').parent().css("display", "none"); - $('#trigger_fullscreen_div').html(""); - } - if (!logoutMenuItem || logoutMenuItem === "false") { - //$('#trigger_logout').parent().css("display", "none"); - $('#trigger_logout_div').html(""); - } - if ((!fullscreenMenuItem && !logoutMenuItem) || (fullscreenMenuItem === "false" && logoutMenuItem === "false")) { - $('#full_logout_divider').css("display", "none"); - } - if (!changePassMenuItem ) { - $('#changePwd_labellink').css('display','none'); - $('#full_logout_divider').css('display','none'); - } - - //设置二次开发者选择的框架皮肤 - var defaultColor = openoFrameWork_conf.defaultThemeColor; - var panel = $('.zte-theme-panel'); - $('ul > li', panel).removeClass("current"); - if (store && !store('style_color')) { // cookie没有才设置默认主题 - setThemeColor(defaultColor); - }else{ - setThemeColor(store('style_color')); - } +function setFrameWorkByConf() { + //设置用户相关的框架下拉菜单是否可用 + var helpMenuItem = openoFrameWork_conf.helpMenuItem; + var aboutMenuItem = openoFrameWork_conf.aboutMenuItem; + var flightMenuItem = openoFrameWork_conf.flightMenuItem; + var fullscreenMenuItem = openoFrameWork_conf.fullscreenMenuItem; + var logoutMenuItem = openoFrameWork_conf.logoutMenuItem; + var changePassMenuItem = openoFrameWork_conf.changePassMenuItem; + if (!helpMenuItem || helpMenuItem === "false") { + $('#uep_ict_help_url').parent('li').remove(); + } + if (!aboutMenuItem|| aboutMenuItem === "false") { + $('[data-target="#aboutDlg"]').parent('li').remove(); + } + if (!helpMenuItem && !aboutMenuItem) { + $('#uep_ict_help_div').remove(); + } + if (!flightMenuItem|| flightMenuItem === "false") { + $('#header_notification_bar').html("<div>      </div>"); + } + if (!fullscreenMenuItem|| fullscreenMenuItem === "false") { + //$('#trigger_fullscreen').parent().css("display", "none"); + $('#trigger_fullscreen_div').html(""); + } + if (!logoutMenuItem || logoutMenuItem === "false") { + //$('#trigger_logout').parent().css("display", "none"); + $('#trigger_logout_div').html(""); + } + if ((!fullscreenMenuItem && !logoutMenuItem) || (fullscreenMenuItem === "false" && logoutMenuItem === "false")) { + $('#full_logout_divider').css("display", "none"); + } + if (!changePassMenuItem ) { + $('#changePwd_labellink').css('display','none'); + $('#full_logout_divider').css('display','none'); + } + + //设置二次开发者选择的框架皮肤 + var defaultColor = openoFrameWork_conf.defaultThemeColor; + var panel = $('.zte-theme-panel'); + $('ul > li', panel).removeClass("current"); + if (store && !store('style_color')) { // cookie没有才设置默认主题 + setThemeColor(defaultColor); + } else { + setThemeColor(store('style_color')); + } }; /*新增的hashtabel实现类,用户后续iframe的缓存,前进后退时打开过的页面的菜单id的缓存等*/ @@ -1269,7 +1269,7 @@ var openoFrameWork = function () { } var pdiv="pdiv_"+miframe; if($("#"+pdiv).length<=0){//检查下,如果该div没有添加过就添加 - pageContentBody.append("<div id='"+pdiv+"'></div>"); + pageContentBody.append("<div id='"+pdiv+"' style='height:800px;overflow:auto'></div>"); } dealstartPageLoading(); pymParent=createIframe(pdiv, url,miframe,miframe,miframe,_xdomain,_iframeAutoScroll); diff --git a/openo-portal/portal-common/src/main/webapp/common/js/login.js b/openo-portal/portal-common/src/main/webapp/common/js/login.js index ccc150a4..d129b927 100644 --- a/openo-portal/portal-common/src/main/webapp/common/js/login.js +++ b/openo-portal/portal-common/src/main/webapp/common/js/login.js @@ -17,39 +17,26 @@ String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }; -function loginSubmitHandler(form) { - var params = {}; - params["username"] = $("#openo_input_userName").val().trim(); - var sourcePass = $("#openo_input_password").val(); - var pass = sourcePass; - if (FrameConst.isEncypt === "true") { - pass = ict_framework_func1(pass); +function loginSubmitHandler() { + var loginData = { + "userName": $("#openo_input_userName").val(), + "password": $("#openo_input_password").val() } - params["password"] = pass; - params["isEncypted"] = FrameConst.isEncypt; - saveUserInfo(params); - location.href = FrameConst.DEFAULT_LOGINSKIP_PAGE; -// $.ajax({ -// url : FrameConst.REST_LOGIN, -// type : 'POST', -// data : JSON.stringify(params), -// dataType : 'json', -// contentType : 'application/json; charset=utf-8', -// success : function(data, status, xhr) { -// if (data.result == 0) { -// var epass = CryptoJS.MD5(params.username+sourcePass); -// store("icttka", epass.toLocaleString()); -// } -// processLoginResult(data, params); -// }, -// Error : function(xhr, error, exception) { -// if (console) { -// console.log("login fail:" + error); -// console.log(exception); -// } -// } -// }); + saveUserInfo(); + + $.ajax({ + url : "/openoapi/auth/v1/tokens", + type : "POST", + contentType : 'application/json; charset=utf-8', + data : JSON.stringify(loginData), + success : function(data) { + top.window.document.location.href = "default.html"; + }, + error : function(data) { + top.window.document.location.href = "login.html"; + } + }); }; var Login = function () { @@ -169,9 +156,9 @@ var Login = function () { handleLogin(); handleForgetPassword(); $.backstretch([ - "./common/image/integration/openo_bg_1.jpg", - "./common/image/integration//openo_bg_2.jpg", - "./common/image/integration//openo_bg_3.jpg" + "image/integration/openo_bg_1.jpg", + "image/integration//openo_bg_2.jpg", + "image/integration//openo_bg_3.jpg" ], { fade: 500, duration: 15000 @@ -188,13 +175,13 @@ $(document).ready(function() { } }); -function saveUserInfo(params) { +function saveUserInfo() { var rmbcheck = $("input[name='remember']"); if (rmbcheck.attr("checked") == true || rmbcheck.is(':checked')) { var userName = $("#openo_input_userName").val(); var passWord = $("#openo_input_password").val(); store("remember", "true"); - store("openo_input_userName", params.username); + store("openo_input_userName", username); store("openo_input_password", passWord); } else { store.remove("remember"); @@ -202,3 +189,19 @@ function saveUserInfo(params) { store.remove("openo_input_password"); } } + +function logout() { + alert("logout"); + $.ajax({ + url : "/openoapi/auth/v1/tokens" + "?=" + new Date().getTime(), + type : "DELETE", + contentType : 'application/json', + dataType: "text", + success : function() { + top.window.location = "/openoui/auth/v1/login/html/login.html"; + }, + error : function() { + top.window.location = "/openoui/auth/v1/login/html/login.html"; + } + }); +} diff --git a/openo-portal/portal-common/src/main/webapp/common/js/security/security.js b/openo-portal/portal-common/src/main/webapp/common/js/security/security.js index 521130c4..f6ae4d05 100644 --- a/openo-portal/portal-common/src/main/webapp/common/js/security/security.js +++ b/openo-portal/portal-common/src/main/webapp/common/js/security/security.js @@ -22,7 +22,7 @@ var ErrResult_LOGIN_SERV_ERROR = -1; function processLoginResult(data,params){ if(data.home="web/res/web-framework/index.html"||data.home.indexOf("index.html")>0){ - data.home=FrameConst.DEFAULT_LOGINSKIP_PAGE; + data.home=FrameConst.DEFAULT_PAGE; //下面这部分是为了演示需要临时增加的自动切换 /*if(params.username=="admin1"){ data.home="/web/res/web-framework/default.html?menu=1"; diff --git a/openo-portal/portal-common/src/main/webapp/common/login.html b/openo-portal/portal-common/src/main/webapp/common/login.html index 145bf3b4..0d0ddbba 100644 --- a/openo-portal/portal-common/src/main/webapp/common/login.html +++ b/openo-portal/portal-common/src/main/webapp/common/login.html @@ -22,31 +22,29 @@ <meta content="width=device-width, initial-scale=1.0" name="viewport"/> <meta content="" name="description"/> <meta content="" name="author"/> - <link href="./common/thirdparty/fakeLoader/fakeLoader.css" rel="stylesheet" type="text/css"/> - <link href="./common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> - <link href="./common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> - <link href="./common/thirdparty/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/> - <link href="./common/css/style-custom.css" rel="stylesheet" type="text/css"/> - <link href="./common/css/style.css" rel="stylesheet" type="text/css"/> - <link href="./common/css/style-responsive.css" rel="stylesheet" type="text/css"/> - <link href="./common/css/plugins.css" rel="stylesheet" type="text/css"/> - <link href="./common/css/login.css" rel="stylesheet" type="text/css"/> - <script src="./common/thirdparty/jquery/jquery-1.10.2.min.js" type="text/javascript"></script> - <script src="./common/thirdparty/fakeLoader/fakeLoader.min.js" type="text/javascript"></script> - <script src="./common/thirdparty/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> - <script src="./common/thirdparty/jquery-blockui/jquery.blockui.min.js" type="text/javascript"></script> - <script src="./common/thirdparty/uniform/jquery.uniform.min.js" type="text/javascript"></script> - <script src="./common/thirdparty/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script> - <script src="./common/thirdparty/backstretch/jquery.backstretch.min.js" type="text/javascript"></script> - <script src="./common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js" type="text/javascript"></script> - <script src="./common/js/core/const.js" type="text/javascript"></script> - <script src="./common/js/security/security.js" type="text/javascript"></script> - <script src="./common/js/core/hk.min.js" type="text/javascript"></script> - <script src="./common/js/tools.js" type="text/javascript"></script> - <script src="./common/js/security/aes.js" type="text/javascript"></script> - <script src="./common/js/security/framework-util.js" type="text/javascript"></script> - <script src="./common/js/login.js" type="text/javascript"></script> - <script src="./common/js/international/loadi18n.js" type="text/javascript"></script> + <link href="thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> + <link href="thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> + <link href="thirdparty/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/> + <link href="css/style-custom.css" rel="stylesheet" type="text/css"/> + <link href="css/style.css" rel="stylesheet" type="text/css"/> + <link href="css/style-responsive.css" rel="stylesheet" type="text/css"/> + <link href="css/plugins.css" rel="stylesheet" type="text/css"/> + <link href="css/login.css" rel="stylesheet" type="text/css"/> + <script src="thirdparty/jquery/jquery-1.10.2.min.js" type="text/javascript"></script> + <script src="thirdparty/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> + <script src="thirdparty/jquery-blockui/jquery.blockui.min.js" type="text/javascript"></script> + <script src="thirdparty/uniform/jquery.uniform.min.js" type="text/javascript"></script> + <script src="thirdparty/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script> + <script src="thirdparty/backstretch/jquery.backstretch.min.js" type="text/javascript"></script> + <script src="thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js" type="text/javascript"></script> + <script src="js/core/const.js" type="text/javascript"></script> + <script src="js/security/security.js" type="text/javascript"></script> + <script src="js/core/hk.min.js" type="text/javascript"></script> + <script src="js/tools.js" type="text/javascript"></script> + <script src="js/security/aes.js" type="text/javascript"></script> + <script src="js/security/framework-util.js" type="text/javascript"></script> + <script src="js/login.js" type="text/javascript"></script> + <script src="js/international/loadi18n.js" type="text/javascript"></script> <script> if(top != window){ top.location.href = location.href; @@ -61,15 +59,11 @@ </script> </head> <body class="login"> - <div id="pageLoading" class="fakeloader"></div> - <script type="text/javascript"> - $("#pageLoading").fakeLoader({text:"",bgColor:"#1178ee",opacity:'1',spinner:"spinner2",zIndex:99999999}); - </script> <div class="logo"> - <img id="openo_login_logo_white" src="./common/image/integration/openo_logo_white.png" name_img="openo_login_logo_white_img" style="display:none" alt=""/> + <img id="openo_login_logo_white" src="image/integration/openo_logo_pantone.png" width="30%" name_img="openo_login_logo_white_img" style="display:none" alt=""/> </div> <div class="content"> - <form class="login-form" method="post" id="fm1" action="./login"> + <form class="login-form"> <h3 class="form-title"><span id="openo_login_welcome" name_i18n="openo_login_i18n_login"></span></h3> <div class="alert display-hide" id="nameOrpwdError" tipstatus="normal"> <button class="close" data-close="alert" onclick="hidetip('nameOrpwdError');"></button> @@ -107,13 +101,12 @@ </div> <script> jQuery(document).ready(function() { - loadi18n_WebFramework('web-framework-login-i18n', './common/i18n/', 'openo_login_i18n_login'); + loadi18n_WebFramework('web-framework-login-i18n', 'i18n/', 'openo_login_i18n_login'); $("#openo_login_logo_white").css('display','inline'); Login.init(); if(store("openo_input_userName")){ $("#openo_input_userName").val(store("openo_input_userName")); } - $("#pageLoading").setToHide(); }); </script> </body> |