2 * Copyright 2016-2017, CMCC Technologies Co., Ltd.
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
16 var iniAboutInfo = function() {
\r
20 var divId = "ict_about_table_div";
\r
21 var tableId = "abouttable";
\r
23 {"mData": "name", name: $.i18n.prop('com_zte_ums_ict_about_ppu_field_name'), "sWidth": '20%'},
\r
24 {"mData": "version", name: $.i18n.prop('com_zte_ums_ict_about_ppu_field_version'), "sWidth": '25%'},
\r
25 {"mData": "describe", name: $.i18n.prop('com_zte_ums_ict_about_ppu_field_desc'), "sWidth": '25%'},
\r
26 {"mData": "time", name: $.i18n.prop('com_zte_ums_ict_about_ppu_field_time'), "sWidth": '30%'}
\r
29 $('#' + divId).children().remove();
\r
30 var tableEleStr = '<table class="table table-striped table-bordered table-hover" id= ' + tableId + '>'
\r
32 + '<tr role="row" class="heading" >'
\r
38 $('#' + divId).append(tableEleStr);
\r
39 var trEle = $('#' + tableId + ' > thead >tr');
\r
41 for (var one in column) {
\r
42 var th = '<th>' + column[one].name + '</th>';
\r
45 var table = $("#" + tableId).dataTable({
\r
46 "bFilter": false,// 搜索栏
\r
55 url: FrameConst.REST_GET_VERSIONINFO,
\r
57 success: function (data) {
\r
60 $(".ict_main_version").append('<span>' + data.mainversion + '</span>');
\r
62 for( var i = 0 ; i < data.ppuinfo.length ; i++ ) {
\r
63 var eachPPU = data.ppuinfo[i];
\r
64 $('#'+ tableId).dataTable().fnAddData([eachPPU.name ,eachPPU.version ,eachPPU.describe , eachPPU.time ]);
\r
67 error: function (xhr, ajaxOptions, thrownError) {
\r
73 function internationalization(){
\r
74 var lang = getLanguage();
\r
76 jQuery.i18n.properties({
\r
78 name:'web-framework-mainPage-i18n',
\r
79 path:'i18n/', // 资源文件路径
\r
80 mode:'map', // 用 Map 的方式使用资源文件中的值
\r
81 callback: function() {// 加载成功后设置显示内容
\r
82 var i18nItems = $('[name_i18n=com_zte_ums_ict_framework_ui_i18n]' , '.aboutDlg');
\r
83 for(var i=0;i<i18nItems.length;i++){
\r
84 var $item = $(i18nItems.eq(i));
\r
85 var itemId = $item.attr('id');
\r
86 if(typeof($item.attr("title"))!="undefined"){
\r
87 $item.attr("title", $.i18n.prop(itemId));
\r
89 $item.text($.i18n.prop(itemId));
\r
97 function getAboutDlg(url){
\r
101 openoFrameWork.startPageLoading();//加载中....
\r
102 var aboutDiv =jQuery('.modal-dialog .aboutDlg');
\r
109 success: function (res) {
\r
110 jQuery('.modal-dialog .aboutDlg').append(res);
\r
112 internationalization();
\r
113 openoFrameWork.stopPageLoading();
\r
115 error: function (xhr, ajaxOptions, thrownError) {
\r
121 function iniAboutDlg(){
\r
122 var url=jQuery('.modal-dialog .aboutDlg').attr("dlgsrc");
\r
123 if(url&&url.length>0){
\r
128 var ict_about_dlg_close = function(){
\r
129 link_click('about');
\r
130 console.log("about click close");
\r
131 $('#aboutDlg').modal('hide');
\r
133 var link_click = function( pageName ){
\r
134 console.log("about click change");
\r
135 if(pageName === 'info'){
\r
136 $('.aboutmain').attr("style" , "display:none");
\r
137 $('.aboutinfo').attr("style" , "display:block");
\r
139 $('.aboutmain').attr("style" , "display:block");
\r
140 $('.aboutinfo').attr("style" , "display:none");
\r