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