aboutsummaryrefslogtreecommitdiffstats
path: root/openo-portal/portal-common/src
diff options
context:
space:
mode:
author“shentao” <shentao@chinamobile.com>2016-10-13 21:29:22 +0800
committer“shentao” <shentao@chinamobile.com>2016-10-13 21:29:22 +0800
commit044aaaa01c29c34b18c2370e81a8e5b6252782dd (patch)
tree1dc06c970a6651e26898c90fa02093fb053539a0 /openo-portal/portal-common/src
parent5db452177ae8760455f75d5b0d9f506382e4e016 (diff)
GSO-16
Change-Id: Ib677365c7e0550e56aa8a8dd859af2cb156563cf Signed-off-by: “shentao” <shentao@chinamobile.com>
Diffstat (limited to 'openo-portal/portal-common/src')
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/default.html8
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/source/logo.pngbin16838 -> 0 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/source/netnumenLogo.pngbin6232 -> 0 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/source/zte_bg_1.jpgbin143465 -> 0 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/source/zte_bg_2.jpgbin152396 -> 0 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/source/zte_bg_3.jpgbin155899 -> 0 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/source/zte_logo_ white.pngbin16838 -> 0 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/source/zte_logo_16.gifbin583 -> 0 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/source/zte_logo_white.pngbin16838 -> 0 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/source/ztelogo.pngbin2790 -> 0 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/js/constants/menu_link.js15
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/js/core/load_menuList.js69
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js235
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/js/mainpage/load_mainPage.js11
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/js/menus/loadi18n-openo-menus.js20
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/js/menus/openo-menus-i18n-en-US.properties30
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/js/menus/openo-menus-i18n-zh-CN.properties15
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/json/main_page.json (renamed from openo-portal/portal-common/src/main/webapp/common/json/main-page.json)2
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/json/menu_list.json62
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/main_Fsiderbar.html188
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/main_blank.html15
21 files changed, 172 insertions, 498 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 4e72f1a8..588072a4 100644
--- a/openo-portal/portal-common/src/main/webapp/common/default.html
+++ b/openo-portal/portal-common/src/main/webapp/common/default.html
@@ -60,6 +60,7 @@
<script type="text/javascript" src="js/core/openoFrameWork.js"></script>
<script type="text/javascript" src="js/fm_light.js"></script>
<script type="text/javascript" src="js/mainpage/about.js"></script>
+<script type="text/javascript" src="js/core/load_menuList.js"></script>
</head>
<body class="page-header-fixed page-sidebar-fixed">
<div id="pageLoading" class="fakeloader"></div>
@@ -72,10 +73,6 @@
<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 class="hor-menu hidden-sm hidden-xs">
- <ul class="nav navbar-nav hormenu" id="main_hormenu" menuSrc="main_blank.html"></ul>
- <ul class="nav navbar-nav hormenu" id="f_hormenu" menuSrc="main_blank.html"></ul>
- </div>
<ul class="nav navbar-nav pull-right">
<div class="zte-theme-panel">
<div class="toggler"></div>
@@ -189,8 +186,7 @@
</div>
<div class="page-container">
<div class="page-sidebar navbar-collapse collapse" style="z-index: 9999;">
- <ul class="page-sidebar-menu" id="page-sidebar-menu" data-auto-scroll="true" data-slide-speed="200" menuSrc="main_blank.html"></ul>
- <ul class="page-sidebar-menu" id="page-f-sidebar-menu" data-auto-scroll="true" data-slide-speed="200" menuSrc="main_Fsiderbar.html"></ul>
+ <ul class="page-sidebar-menu" id="page-f-sidebar-menu" data-auto-scroll="true" data-slide-speed="200"></ul>
</div>
<div class="page-content-wrapper">
<div class="page-content">
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/source/logo.png b/openo-portal/portal-common/src/main/webapp/common/image/source/logo.png
deleted file mode 100644
index a36c5e8b..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/image/source/logo.png
+++ /dev/null
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/source/netnumenLogo.png b/openo-portal/portal-common/src/main/webapp/common/image/source/netnumenLogo.png
deleted file mode 100644
index 42ca6dfa..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/image/source/netnumenLogo.png
+++ /dev/null
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/source/zte_bg_1.jpg b/openo-portal/portal-common/src/main/webapp/common/image/source/zte_bg_1.jpg
deleted file mode 100644
index 4a7b0722..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/image/source/zte_bg_1.jpg
+++ /dev/null
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/source/zte_bg_2.jpg b/openo-portal/portal-common/src/main/webapp/common/image/source/zte_bg_2.jpg
deleted file mode 100644
index db94b166..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/image/source/zte_bg_2.jpg
+++ /dev/null
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/source/zte_bg_3.jpg b/openo-portal/portal-common/src/main/webapp/common/image/source/zte_bg_3.jpg
deleted file mode 100644
index f2949dfe..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/image/source/zte_bg_3.jpg
+++ /dev/null
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/source/zte_logo_ white.png b/openo-portal/portal-common/src/main/webapp/common/image/source/zte_logo_ white.png
deleted file mode 100644
index a36c5e8b..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/image/source/zte_logo_ white.png
+++ /dev/null
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/source/zte_logo_16.gif b/openo-portal/portal-common/src/main/webapp/common/image/source/zte_logo_16.gif
deleted file mode 100644
index 362b825a..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/image/source/zte_logo_16.gif
+++ /dev/null
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/source/zte_logo_white.png b/openo-portal/portal-common/src/main/webapp/common/image/source/zte_logo_white.png
deleted file mode 100644
index a36c5e8b..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/image/source/zte_logo_white.png
+++ /dev/null
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/source/ztelogo.png b/openo-portal/portal-common/src/main/webapp/common/image/source/ztelogo.png
deleted file mode 100644
index ebe122a2..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/image/source/ztelogo.png
+++ /dev/null
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/js/constants/menu_link.js b/openo-portal/portal-common/src/main/webapp/common/js/constants/menu_link.js
deleted file mode 100644
index 1ed9b64d..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/js/constants/menu_link.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright 2016, CMCC Technologies Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
diff --git a/openo-portal/portal-common/src/main/webapp/common/js/core/load_menuList.js b/openo-portal/portal-common/src/main/webapp/common/js/core/load_menuList.js
new file mode 100644
index 00000000..c56952e5
--- /dev/null
+++ b/openo-portal/portal-common/src/main/webapp/common/js/core/load_menuList.js
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2016, CMCC Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var initLeftMenu = function() {
+ var i18nName = "openo_frame_left_menu_i18n";
+ var parentMenus;
+ var childMenus;
+
+ $.ajax({
+ async : false,
+ "type" : "GET",
+ url : "json/menu_list.json",
+ dataType : "json",
+ "success" : function (res, textStatus, jqXHR) {
+ parentMenus = res.parentMenus;
+ childMenus = res.childMenus;
+ },
+ error : function () {
+ }
+ });
+
+ var templateParent = "<a href='javascript:'>" +
+ "<i class='{iconClass}'></i>" +
+ "<span id='{id}' name_i18n='{i18nName}' class='title'></span>" +
+ "<span class='selected'></span>" +
+ "<span class='arrow'></span>" +
+ "</a>";
+
+ var templateChild = "<li>" +
+ "<a href='{url}' class='iframe'>" +
+ "<i class='{iconClass}'></i>" +
+ "<span id='{id}' name_i18n='{i18nName}'></span>" +
+ "</a>" +
+ "</li>";
+
+ var menuContent = "";
+ for (var i = 0; i < parentMenus.length; i++) {
+ var parentMenuContent = templateParent.replace("{id}", parentMenus[i].id)
+ .replace("{iconClass}", parentMenus[i].iconClass)
+ .replace("{i18nName}", i18nName);
+
+ var childMenuContent = "";
+ for (var j = 0; j < childMenus.length; j++) {
+ if (childMenus[j].parentId == parentMenus[i].id) {
+ childMenuContent = childMenuContent + templateChild.replace("{id}", childMenus[j].id)
+ .replace("{url}", childMenus[j].url)
+ .replace("{iconClass}", childMenus[j].iconClass)
+ .replace("{i18nName}", i18nName);
+ }
+ }
+ childMenuContent = "<ul class='sub-menu'>" + childMenuContent + "</ul>";
+
+ menuContent = menuContent + "<li>" + parentMenuContent + childMenuContent + "</li>";
+ }
+
+ return menuContent;
+} \ No newline at end of file
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 beebcb87..267b7219 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
@@ -3172,39 +3172,37 @@ var openoFrameWork = function () {
}();
-var currentRunningScriptSrcPath = {};
//抽取html片段中任意位置的script标签(包括代码是内嵌的情况)逐个运行(不会在单个script加载不到的时候停下来)
function runHtmlScripts(s) {
var div = document.createElement('div');
div.innerHTML = s;
- var scripts = div.getElementsByTagName('script');
- $(scripts).each(function(){
+ var scripts = div.getElementsByTagName('script');
+
+ var currentRunningScriptSrcPath = {};
+ $(scripts).each(function() {
var src = this.src;
- src=openoFrameWork.handlBaseURL(src);
- if(src){
- //存储当前Script标签的绝对路径以适应该js被其他系统跨域引用的情况
- currentRunningScriptSrcPath[src.substring(src.lastIndexOf("/") + 1)] = src.substring(0, src.lastIndexOf("/")+1);
- $.getScript(src);
- }else{
+ src = openoFrameWork.handlBaseURL(src);
+ if (src) {
+ currentRunningScriptSrcPath[src.substring(src.lastIndexOf("/") + 1)] = src.substring(0, src.lastIndexOf("/") + 1);
+ $.getScript(src);
+ } else {
$.globalEval(this.text || this.textContent || this.innerHTML || '');
}
});
-}
-function stripHtmlScripts(s) {
- var div = document.createElement('div');
- div.innerHTML = s;
- var scripts = div.getElementsByTagName('script');
- $(scripts).each(function(){
- /* if(this.src){
- $.getScript(this.src);
- }else{
- $.globalEval(this.text || this.textContent || this.innerHTML || '');
- } */
- this.src=openoFrameWork.handlBaseURL(this.src);
+};
+
+function stripHtmlScripts(htmlContent) {
+ var divContent = document.createElement('div');
+ divContent.innerHTML = htmlContent;
+ var scripts = divContent.getElementsByTagName('script');
+
+ $(scripts).each(function() {
+ this.src = openoFrameWork.handlBaseURL(this.src);
this.parentNode.removeChild(this);
});
- return div.innerHTML;
-}
+ return divContent.innerHTML;
+};
+
function getsiderBarMenu(url){
if (url.length<2){
return;
@@ -3284,103 +3282,21 @@ var setLayoutValueByCookie = function () {
function iniFMenu() {
- var fsidemenu = $('#page-f-sidebar-menu');
- if (!fsidemenu) {
- return;
- }
- var urlsider = fsidemenu.attr("menuSrc");
- if (urlsider && urlsider.length > 0) {
- getFMenu(urlsider);
- }
-};
+ var fsidemenu = $('#' + fMenuSiderDivId);
-function getFMenu(urlSider) {
- urlSider = openoFrameWork.handlBaseURL(urlSider);
- openoFrameWork.startPageLoading();
+ if (fsidemenu) {
+ openoFrameWork.startPageLoading();
- var fpagesidebar=$('#' + fMenuSiderDivId);
- fpagesidebar.empty();
- fpagesidebar.append("<li class='sidebar-toggler-wrapper'><div class='sidebar-toggler hidden-xs hidden-sm'></div></li>");
- $.ajax({
- type: "GET",
- cache: false,
- url: urlSider,
- dataType: "html",
- success: function (res) {
- var resScriptsSriped = stripHtmlScripts(res);
- fpagesidebar.append(resScriptsSriped);
- //先全部隐藏,后面根据与hash的匹配情况来显示
- //fpagesidebar.children().css('display','none');
- runHtmlScripts(res);
- dealMysqlBackupMenu();
- FMenuAuthentication( fMenuMegaDivId ,fMenuSiderDivId );
- ajustFMenu( fMenuMegaDivId ,fMenuSiderDivId );
- openoFrameWork.stopPageLoading();
- //loadi18n_WebFramework_sideMenu();
- },
- error: function (xhr, ajaxOptions, thrownError) {
- $('.page-f-sidebar-menu').append('<h4 class="nav-load-error">'+$.i18n.prop('com_zte_ums_ict_framework_ui_loadmenuerror')+'</h4>');//加载系统菜单失败!;//加载系统菜单失败!
- }
- });
-};
-function iniSidebarMenu(){
- var sidermenu=$('#page-sidebar-menu');
- if(!sidermenu) return;
- var url=sidermenu.attr("menuSrc");
- if(url&&url.length>0){
- getsiderBarMenu(url);
- }
-};
-function getChangePWDDlg(url){
- if (url.length<2){
- return;
- }
- openoFrameWork.startPageLoading();//加载中....
- var pageChangepasswd=$('.modal-dialog .Changepasswd');
- pageChangepasswd.empty();
- $.ajax({
- type: "GET",
- cache: false,
- url: url,
- dataType: "html",
- success: function (res) {
- $('.modal-dialog .Changepasswd').append(res);
- ChangePWD.init();
- openoFrameWork.stopPageLoading();
- },
- error: function (xhr, ajaxOptions, thrownError) {
- $('.modal-dialog .Changepasswd').append('<h4>'+$.i18n.prop('com_zte_ums_ict_framework_ui_loadchgpwdpageError')+'</h4>');//加载修改密码页面失败!
- }
- });
-};
-function iniChangePWDDlg(){
- var url=$('.modal-dialog .Changepasswd').attr("dlgsrc");
- if(url&&url.length>0){
- getChangePWDDlg(url);
- }
-};
-function getHeaderMenu(url){
- if (url.length<2){
- return;
- }
- openoFrameWork.startPageLoading();//加载中请稍候....
- var headerMenu=$('#headerMenu');
- headerMenu.empty();
- $.ajax({
- type: "GET",
- cache: false,
- async: false,
- url: url,
- dataType: "html",
- success: function (res) {
- $('#headerMenu').append(res);
- openoFrameWork.stopPageLoading();
- },
- error: function (xhr, ajaxOptions, thrownError) {
- //$('#headerMenu').append('<h4>'+$.i18n.prop('com_zte_ums_ict_framework_ui_loadmenuerror')+'</h4>');//加载系统菜单失败!
- }
- });
+ var menuContent = initLeftMenu();
+ fsidemenu.empty();
+ fsidemenu.append("<li class='sidebar-toggler-wrapper'><div class='sidebar-toggler hidden-xs hidden-sm'></div></li>");
+ fsidemenu.append(menuContent);
+ loadi18n_WebFramework('web-framework-menu-i18n', 'i18n/', 'openo_frame_left_menu_i18n');
+
+ openoFrameWork.stopPageLoading();
+ }
};
+
function goToHomePage(){
locationhash = openoFrameWork.getLocationHash();
if(!!locationhash&&locationhash.length>0){//有锚点,直接触发
@@ -3608,90 +3524,7 @@ function horMenuAuthentication( horMenuId ) {
});
rebuildHorMenu();
};
-//根据F菜单的竖菜单来调整横菜单。获取hparentid相同的竖菜单中的第一个,来更新横菜单上对应父亲菜单的href、catchnum等信息
-function ajustFMenu(megaBarDivId , siderbarDivId){
- var hparentIds = {};
- $('a[hparentid]', $('#'+ siderbarDivId)).each(function () {
- var hparentId = $(this).attr("hparentId");
- var parentMenu = $('a[id = ' + hparentId + ']', $('#' + megaBarDivId));
- var oldAHref = parentMenu.attr("href");
- if (oldAHref == null || oldAHref.trim() == "#" || oldAHref == "javascript") {
- var hrefMenu = $(this);
- //竖菜单的第一级有可能是虚菜单,则找这个虚节点下面的第一个有href的菜单
- if( $(this).attr('href') == null || $(this).attr('href') == "#" || $(this).attr('href') == "javascript:;"){
- $('a[href]', $(this).parent().children('ul')).each(function () {
- hrefMenu = $(this);
- if (hrefMenu != null && hrefMenu != "#" && hrefMenu != "javascript") {
- return false; //跳出循环
- }
- })
- }
- parentMenu.attr("href", hrefMenu.attr("href"));
- parentMenu.attr("shiftjs", hrefMenu.attr("shiftjs"));
- parentMenu.attr("cachenum", hrefMenu.attr("cachenum"));
- parentMenu.attr("iframeName", hrefMenu.attr("iframeName"));
- parentMenu.attr("xdomain", hrefMenu.attr("xdomain"));
- parentMenu.attr("cssSrc", hrefMenu.attr("cssSrc"));
- parentMenu.attr("category", hrefMenu.attr("category"));
- parentMenu.attr("breadcrumgroupbuttonsrc", hrefMenu.attr("breadcrumgroupbuttonsrc"));
- parentMenu.attr("operation", hrefMenu.attr("operation"));
- parentMenu.attr("iframeautoscroll", hrefMenu.attr("iframeautoscroll"));
- }
- });
-}
-function FMenuAuthentication(megaBarDivId , siderbarDivId){
- var beforeHparentId = {};
- $('a[hparentid]', $('#'+ siderbarDivId)).each(function(){
- var parentid = $(this).attr("hparentid");
- beforeHparentId[parentid] = 1;
- });
- checkFmenuRightByAttr('licenseid' , megaBarDivId , siderbarDivId , getLcsRight);
- checkFmenuRightByAttr('operation' , megaBarDivId , siderbarDivId, getAllOperCodeRights);
- rebuildSiderBarMenu();
- var afterHparentId={};
- $('a[hparentid]', $('#'+ siderbarDivId)).each(function(){
- var parentid = $(this).attr("hparentid");
- afterHparentId[parentid] = 1;
- });
- //比较鉴权前后的父菜单差异,如果这个父菜单自己没有href属性,且鉴权后,所有的子菜单都没有权限,那么这个父菜单需要从界面上去掉
- for( var parentid in beforeHparentId ){
- if( afterHparentId[parentid] == null ){
- var parent = $('#'+ parentid , $('#'+ megaBarDivId));
- if(parent.attr('href') == null || parent.attr('href') == "javascript:;" || parent.attr('href') == "#"){
- parent.parent().remove();
- }
- }
- }
-}
-function checkFmenuRightByAttr( attrName, megaBarDivId , siderbarDivId ,callback ){
- // license 鉴权
- var menuids = new Array();
- var parentMenuId = new Array();
- var operations = new Array();
- //从页面DOM取得菜单license项。
- $('a['+ attrName+']', $('#'+ siderbarDivId)).each(function () {
- var attrValue = $(this).attr(attrName);
- if (attrValue) {
- operations.push(attrValue);
- var id = $(this).attr("id");
- menuids.push({'id':id });
- }
- });
- var rights = callback(operations);// 取得license数据。
- if (rights && (rights.length == menuids.length)) {
- // 根据后台license值判断所在菜单项是否显示
- for (var i = 0; i < menuids.length; i++) {
- var id = menuids[i].id;
- var hparentId =menuids[i].hParentId;
- var key = operations[i];
- var item = rights[i];
- // 菜单项如果配了licenseid, 并且不是true字符串, 则移除菜单项
- if (item.value != "True") {
- $('#'+id, $('#'+ siderbarDivId)).parent().remove();
- }
- }
- }
-}
+
// “更多操作”分组按钮鉴权
function groupButtonAuthentication() {
// license 鉴权
diff --git a/openo-portal/portal-common/src/main/webapp/common/js/mainpage/load_mainPage.js b/openo-portal/portal-common/src/main/webapp/common/js/mainpage/load_mainPage.js
index a51d9ca9..3ba0f7ba 100644
--- a/openo-portal/portal-common/src/main/webapp/common/js/mainpage/load_mainPage.js
+++ b/openo-portal/portal-common/src/main/webapp/common/js/mainpage/load_mainPage.js
@@ -15,18 +15,17 @@
*/
var initMainPage = function() {
var modules;
- var resConfig;
- var propertiesFileName = "";
+ var propertiesFilePath = "i18n/";
+ var propertiesFileName = "web-framework-mainPage-i18n";
+ var i18nName = "openo_main_page_i18n";
$.ajax({
async : false,
"type" : "GET",
- url : "json/main-page.json",
+ url : "json/main_page.json",
dataType : "json",
"success" : function (res, textStatus, jqXHR) {
- resConfig = res;
modules = res.modules;
- propertiesFileName = res.propertiesFileNamePrefix;
},
error : function () {
}
@@ -91,6 +90,6 @@ var initMainPage = function() {
}
});
- loadi18n_WebFramework(propertiesFileName, 'i18n/', 'openo_main_page_i18n');
+ loadi18n_WebFramework(propertiesFileName, propertiesFilePath, i18nName);
});
} \ No newline at end of file
diff --git a/openo-portal/portal-common/src/main/webapp/common/js/menus/loadi18n-openo-menus.js b/openo-portal/portal-common/src/main/webapp/common/js/menus/loadi18n-openo-menus.js
deleted file mode 100644
index 2d6ac69e..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/js/menus/loadi18n-openo-menus.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2016 ZTE Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-function loadOpenoSideMenu(lang){
- loadPropertiesSideMenu(lang, 'openo-menus-i18n', '/openoui/common/js/menus/');
-}
-loadOpenoSideMenu(lang); \ No newline at end of file
diff --git a/openo-portal/portal-common/src/main/webapp/common/js/menus/openo-menus-i18n-en-US.properties b/openo-portal/portal-common/src/main/webapp/common/js/menus/openo-menus-i18n-en-US.properties
deleted file mode 100644
index b869ad58..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/js/menus/openo-menus-i18n-en-US.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright 2016 ZTE Corporation.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-org_openo_menu_service=Service
-org_openo_menu_resource=Resource
-org_openo_menu_monitor=Monitor
-
-org_openo_menu_service_design=Service Design
-org_openo_menu_service_design_model_design=Model Design
-
-org_openo_menu_service_catalog=Service Catalog
-org_openo_menu_service_catalog_package=Package
-org_openo_menu_service_catalog_service_template=Service Template
-
-org_openo_menu_external_system_register=External System Register
-org_openo_menu_vim_register=VIM
-org_openo_menu_vnfm_register=VNFM
-org_openo_menu_sdn_controller_register=SDNC
diff --git a/openo-portal/portal-common/src/main/webapp/common/js/menus/openo-menus-i18n-zh-CN.properties b/openo-portal/portal-common/src/main/webapp/common/js/menus/openo-menus-i18n-zh-CN.properties
deleted file mode 100644
index 99b8bb4b..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/js/menus/openo-menus-i18n-zh-CN.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright 2016 ZTE Corporation.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
diff --git a/openo-portal/portal-common/src/main/webapp/common/json/main-page.json b/openo-portal/portal-common/src/main/webapp/common/json/main_page.json
index 6f970022..39cd7b70 100644
--- a/openo-portal/portal-common/src/main/webapp/common/json/main-page.json
+++ b/openo-portal/portal-common/src/main/webapp/common/json/main_page.json
@@ -1,6 +1,4 @@
{
- "propertiesFileNamePrefix":"web-framework-mainPage-i18n",
- "productName":"OPEN-O System",
"modules":[
{
"cover":"org_openo_orchestrator_framework_main_page_service",
diff --git a/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json b/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json
new file mode 100644
index 00000000..8816e939
--- /dev/null
+++ b/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json
@@ -0,0 +1,62 @@
+{
+ "parentMenus":[
+ {
+ "id":"openo_menu_service",
+ "url":"",
+ "iconClass":"fa fa-comments"
+ },
+ {
+ "id":"openo_menu_resource_mgr",
+ "url":"",
+ "iconClass":"fa fa-folder-open-o"
+ },
+ {
+ "id":"openo_menu_user",
+ "url":"",
+ "iconClass":"fa fa-puzzle-piece"
+ },
+ {
+ "id":"openo_menu_manage_view",
+ "url":"",
+ "iconClass":"fa fa-coffee"
+ }
+ ],
+ "childMenus":[
+ {
+ "parentId":"openo_menu_service",
+ "id":"openo_menu_service_service_management",
+ "url":"../lifecyclemgr/gsolcmmain.html",
+ "iconClass":"fa fa-comments"
+ },
+ {
+ "parentId":"openo_menu_resource_mgr",
+ "id":"openo_menu_resource_mgr_sdno",
+ "url":"../resmgr-sdn/resource.html",
+ "iconClass":"fa fa-folder-open-o"
+ },
+ {
+ "parentId":"openo_menu_resource_mgr",
+ "id":"openo_menu_resource_mgr_nfvo",
+ "url":"../resmgr-nfv/resource.html",
+ "iconClass":"fa fa-folder-open-o"
+ },
+ {
+ "parentId":"openo_menu_user",
+ "id":"openo_menu_user_user_management",
+ "url":"../user/user.html",
+ "iconClass":"fa fa-puzzle-piece"
+ },
+ {
+ "parentId":"openo_menu_manage_view",
+ "id":"openo_menu_manage_view_vim_manage",
+ "url":"../extsys/vim/vimView.html",
+ "iconClass":"fa fa-coffee"
+ },
+ {
+ "parentId":"openo_menu_manage_view",
+ "id":"openo_menu_manage_view_vnfm",
+ "url":"../extsys/vnfm/vnfmView.html",
+ "iconClass":"fa fa-coffee"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openo-portal/portal-common/src/main/webapp/common/main_Fsiderbar.html b/openo-portal/portal-common/src/main/webapp/common/main_Fsiderbar.html
deleted file mode 100644
index 5eb41d5e..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/main_Fsiderbar.html
+++ /dev/null
@@ -1,188 +0,0 @@
-<!--
- Copyright 2016, CMCC Technologies Co., Ltd.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<script type="text/javascript" src="js/constants/menu_link.js"></script>
-<li>
- <a href="javascript:;" id="col-openo-umc-monitor-service" hparentid="openo-nsoc">
- <i class="fa fa-comments"></i>
- <span id="openo_menu_service" name_i18n="openo_frame_left_menu_i18n" class="title"></span>
- <span class="selected"></span>
- <span class="arrow"></span>
- </a>
- <ul class="sub-menu">
- <li>
- <a href="../lifecyclemgr/gsolcmmain.html" class="iframe" id="openo-umc-monitor-service-overview" parentid="openo-nsoc" hparentid="col-openo-umc-monitor-service" order="10.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-comments"></i>
- <span id="openo_menu_service_service_management" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- </ul>
-</li>
-<li>
- <a href="javascript:;" id="col-openo-roc-manageview" hparentid="openo-roc">
- <i class="fa fa-cube"></i>
- <span id="openo_menu_resource_mgr" name_i18n="openo_frame_left_menu_i18n" class="title"></span>
- <span class="selected"></span>
- <span class="arrow"></span>
- </a>
- <ul class="sub-menu">
- <li>
- <a href="../resmgr-sdn/resource.html" class="iframe" id="openo-roc-vim" parentid="openo-roc" hparentid="col-openo-roc-manageview" order="10.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-cube"></i>
- <span id="openo_menu_resource_mgr_sdno" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- <li>
- <a href="../resmgr-nfv/resource.html" class="iframe" id="openo-roc-vnfm" parentid="openo-roc" hparentid="col-openo-roc-manageview" order="20.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="ict-VNFM"></i>
- <span id="openo_menu_resource_mgr_nfvo" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- </ul>
-</li>
-<li>
- <a href="javascript:;" id="col-openo-umc-setting" hparentid="openo-umc">
- <i class="fa fa-puzzle-piece"></i>
- <span id="openo_menu_user" name_i18n="openo_frame_left_menu_i18n" class="title"></span>
- <span class="selected"></span>
- <span class="arrow"></span>
- </a>
- <ul class="sub-menu">
- <li>
- <a href="../user/user.html" class="iframe" id="openo-umc-monitor-setting" parentid="openo-umc" hparentid="col-openo-umc-setting" order="10.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-puzzle-piece"></i>
- <span id="openo_menu_user_user_management" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- </ul>
-</li>
-<li>
- <a href="javascript:;" id="col-openo-nsoc-orchestrator" hparentid="openo-nsoc">
- <i class="fa fa-folder-open-o"></i>
- <span id="openo_menu_orchestrator" name_i18n="openo_frame_left_menu_i18n" class="title"></span>
- <span class="selected"></span>
- <span class="arrow"></span>
- </a>
- <ul class="sub-menu">
- <li>
- <a href="/winery/servicetemplates.html" class="iframe" id="openo-nsoc-model-design" parentid="openo-nsoc" hparentid="col-openo-nsoc-orchestrator" order="10.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-folder-open-o"></i>
- <span id="openo_menu_orchestrator_model_design" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- <li>
- <a href="/openoui/catalog/csarPackage.html" class="iframe" id="openo-nsoc-vnfd" parentid="openo-nsoc" hparentid="col-openo-nsoc-orchestrator" order="30.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-folder-open-o"></i>
- <span id="openo_menu_orchestrator_package" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- <li>
- <a href="/openoui/catalog/template.html" class="iframe" id="openo-nsoc-template" parentid="openo-nsoc" hparentid="col-openo-nsoc-orchestrator" order="40.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-list-alt"></i>
- <span id="openo_menu_orchestrator_service_template" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- <li>
- <a href="/iui/nsoc/hostMirror.html" class="iframe" id="openo-nsoc-hostimage" parentid="openo-nsoc" hparentid="col-openo-nsoc-orchestrator" order="50.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-list-alt"></i>
- <span id="openo_menu_orchestrator_host_image" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- <li>
- <a href="/iui/nsoc/virtualApplication.html" class="iframe" id="openo-nsoc-vApp" parentid="openo-nsoc" hparentid="col-openo-nsoc-orchestrator" order="60.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="ict-VNF"></i>
- <span id="openo_menu_orchestrator_lifecycle" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- </ul>
-</li>
-<li>
- <a href="javascript:;" id="col-openo-roc-manageview" hparentid="openo-roc">
- <i class="fa fa-cube"></i>
- <span id="openo_menu_manage_view" name_i18n="openo_frame_left_menu_i18n" class="title"></span>
- <span class="selected"></span>
- <span class="arrow"></span>
- </a>
- <ul class="sub-menu">
- <li>
- <a href="/openoui/extsys/vim/vimView.html" class="iframe" id="openo-roc-vim" parentid="openo-roc" hparentid="col-openo-roc-manageview" order="10.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-cube"></i>
- <span id="openo_menu_manage_view_vim_manage" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- <li>
- <a href="/openoui/extsys/vnfm/vnfmView.html" class="iframe" id="openo-roc-vnfm" parentid="openo-roc" hparentid="col-openo-roc-manageview" order="20.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-cube"></i>
- <span id="openo_menu_manage_view_vnfm" name_i18n="openo_frame_left_menu_i18n"></span>
-
- </a>
- </li>
- </ul>
-</li>
-<li>
- <a href="javascript:;" id="col-openo-umc-topo" hparentid="openo-umc">
- <i class="fa fa-puzzle-piece"></i>
- <span id="openo_menu_topology" name_i18n="openo_frame_left_menu_i18n" class="title"></span>
- <span class="selected"></span>
- <span class="arrow"></span>
- </a>
- <ul class="sub-menu">
- <li>
- <a href="/iui/umctopo/physicalTopology.html" class="iframe" id="openo-umc-physical-topo" parentid="openo-umc" hparentid="col-openo-umc-topo" order="10.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-puzzle-piece"></i>
- <span id="openo_menu_topology_physical_topology" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- <li>
- <a href="/iui/umctopo/serviceTopology.html" class="iframe" id="openo-umc-service-topo" parentid="openo-umc" hparentid="col-openo-umc-topo" order="10.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-puzzle-piece"></i>
- <span id="openo_menu_topology_service_topology" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- </ul>
-</li>
-<li>
- <a href="javascript:;" id="col-openo-umc-fm" hparentid="openo-umc">
- <i class="fa fa-comments"></i>
- <span id="openo_menu_alarm" name_i18n="openo_frame_left_menu_i18n" class="title"></span>
- <span class="selected"></span>
- <span class="arrow"></span>
- </a>
- <ul class="sub-menu">
- <li>
- <a href="/iui/umcfm/html/fm_currentAlarm_view.html" class="iframe" id="openo-umc-monitor-alarm-currentAlarm" parentid="openo-umc" hparentid="col-openo-umc-fm" order="10.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-comments"></i>
- <span id="openo_menu_alarm_alarm_query" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- </ul>
-</li>
-<li>
- <a href="javascript:;" id="col-openo-umc-pm" hparentid="openo-umc">
- <i class="fa fa-coffee"></i>
- <span id="openo_menu_performance" name_i18n="openo_frame_left_menu_i18n" class="title"></span>
- <span class="selected"></span>
- <span class="arrow"></span>
- </a>
- <ul class="sub-menu">
- <li>
- <a href="/iui/umcpm/html/meatask/meataskQueryView.html" class="iframe" id="openo-umc-monitor-pm-historyQuery" parentid="openo-umc" hparentid="col-openo-umc-pm" order="10.0" horgroup="10.0" cachenum="" shiftjs="" iframeautoscroll="auto">
- <i class="fa fa-coffee"></i>
- <span id="openo_menu_performance_performance_query" name_i18n="openo_frame_left_menu_i18n"></span>
- </a>
- </li>
- </ul>
-</li>
-<script>loadi18n_WebFramework('web-framework-menu-i18n', 'i18n/', 'openo_frame_left_menu_i18n');</script>
diff --git a/openo-portal/portal-common/src/main/webapp/common/main_blank.html b/openo-portal/portal-common/src/main/webapp/common/main_blank.html
deleted file mode 100644
index 5897267e..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/main_blank.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!--
- Copyright 2016, CMCC Technologies Co., Ltd.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->