Commit 6ba272bc by Masaru Abe

i18n.jsのリファクタリング

parent d48d9121
......@@ -752,7 +752,7 @@ function showSystemError() {
}
// create DOM element for showing error message
var errMes = i18nText('sysErrorCallApi01');
var errMes = I18N.i18nText('sysErrorCallApi01');
var tags = '<div id="avw-sys-error"></div>';
//$('body').prepend(tags);
$('body').append(tags);
......@@ -830,7 +830,7 @@ function avwSetLogoutNortice() {
} else {
// メッセージ表示
// FFでは、https://bugzilla.mozilla.org/show_bug.cgi?id=588292 によりメッセージが出力されない
var message = i18nText('sysInfoWithoutLogout');
var message = I18N.i18nText('sysInfoWithoutLogout');
var e = event || window.event;
if(e) {
e.returnValue = message;
......
/// <reference path="avweb.js" />
/// <reference path="screenLock.js" />
/// <reference path="common.js" />
/// <reference path="i18n.js" />
/// <reference path="jquery-1.8.1.min.js" />
/// <reference path="jquery-ui-1.8.23.custom.min.js" />
/// <reference path="jquery.toastmessage.js" />
/// <reference path="pageViewer.js" />
/// <reference path="uuid.js" />
/**
* ABook Viewer for WEB
* common package
*
* Copyright (C) Agentec Co, Ltd. All rights reserved.
*/
//グローバルの名前空間用のオブジェクトを用意する
var COMMON = {};
......@@ -2059,12 +2056,12 @@ COMMON.LockScreen = function() {
}
var timeWaitLockScreen = COMMON.getTimeWaitLockScreen();
if (timeWaitLockScreen > 0) {
//var message = i18nText("sysInfoScrLock01");
//var message = I18N.i18nText("sysInfoScrLock01");
screenLock({
timeout: timeWaitLockScreen,
html: '<img src="img/1222.png" alt="Screen Lock" /><br />', //+ message,
unlockFunc: COMMON.unlockFunction,
errorMessage: i18nText('msgLoginErrWrong')
errorMessage: I18N.i18nText('msgLoginErrWrong')
});
}
......
......@@ -10,55 +10,58 @@
* Copyright (C) Agentec Co, Ltd. All rights reserved.
*/
//グローバルの名前空間用のオブジェクトを用意する
var I18N = {};
/**
* 定数:言語ファイル配置場所
*/
var avwsys_location = "";
var avwsys_dir = "";
var avwsys_storagekey = "";
var avwsys_currLang = "";
I18N.avwsys_location = "";
I18N.avwsys_dir = "";
I18N.avwsys_storagekey = "";
I18N.avwsys_currLang = "";
/* 言語の初期化 */
$(function() {
initi18n();
I18N.initi18n();
});
/** 言語リソース設定初期化 */
function initi18n(){
I18N.initi18n = function(){
avwsys_location = "/common/json/lang";
avwsys_dir = "/abvw";
avwsys_storagekey = "AVWUS_Lang";
avwsys_currLang = "AVW_CurrLang";
I18N.avwsys_location = "/common/json/lang";
I18N.avwsys_dir = "/abvw";
I18N.avwsys_storagekey = "AVWUS_Lang";
I18N.avwsys_currLang = "AVW_CurrLang";
// ログイン画面/直接アクセス対策
var location = window.location.toString().toLowerCase();
if (location.indexOf(avwsys_dir) < 0) {
// avwsys_dirディレクトリ配下ではない場合は、avwsys_dirディレクトリをつける
avwsys_location = "." + avwsys_dir + avwsys_location;
if (location.indexOf(I18N.avwsys_dir) < 0) {
// I18N.avwsys_dirディレクトリ配下ではない場合は、I18N.avwsys_dirディレクトリをつける
I18N.avwsys_location = "." + I18N.avwsys_dir + I18N.avwsys_location;
} else {
// avwsys_dirディレクトリ配下の場合は、相対パスに変換
avwsys_location = "." + avwsys_location;
// I18N.avwsys_dirディレクトリ配下の場合は、相対パスに変換
I18N.avwsys_location = "." + I18N.avwsys_location;
}
var lang = "en";
var storage = window.localStorage;
if(storage) {
var lang = storage.getItem(avwsys_storagekey);
var lang = storage.getItem(I18N.avwsys_storagekey);
if(!lang) {
lang = getNavigatorLanguage();
lang = I18N.getNavigatorLanguage();
}
}
// 言語ファイルを初期化する
loadLanguage(lang);
I18N.loadLanguage(lang);
}
};
/* ブラウザの言語設定を取得する */
function getNavigatorLanguage() {
var lang = (navigator.browserLanguage || navigator.language || navigator.userLanguage);
I18N.getNavigatorLanguage = function() {
var lang = (navigator.browserLanguage || navigator.language || navigator.userLanguage);
/* 対応言語 */
var languages = ['ja','ko','en']; // 対応言語を増やす場合はここを変更する
if(lang.match(/ja|ko|en/g)) {
......@@ -76,14 +79,14 @@ function getNavigatorLanguage() {
};
/* 言語リソースファイル読み込み */
function loadLanguage(lang) {
I18N.loadLanguage = function(lang) {
// 引数から言語ファイルを選択
var langfile = "lang-" + lang + ".json";
// 言語ファイルを読み込む
$.ajax({
url: avwsys_location + "/" + langfile,
url: I18N.avwsys_location + "/" + langfile,
async: false,
dataType: 'json',
cache: false,
......@@ -93,7 +96,7 @@ function loadLanguage(lang) {
// html の言語データを書換える
var jsonLangData = data;
replaceText(jsonLangData);
I18N.replaceText(jsonLangData);
// 言語設定、言語データをストレージにキャッシュしておく
storeCurrentLanguage(lang, jsonLangData);
......@@ -107,7 +110,7 @@ function loadLanguage(lang) {
};
/* ページ内のテキストをすべて言語に合わせて置換する */
function replaceText(jsonLangData) {
I18N.replaceText = function(jsonLangData) {
var itemCount = $('.lang').length;
if(itemCount > 0) {
......@@ -130,22 +133,24 @@ function replaceText(jsonLangData) {
}
}
};
/* 現在設定されている言語でHTMLテキストを置き換える */
function i18nReplaceText() {
I18N.i18nReplaceText = function() {
var storage = window.sessionStorage;
if(storage) {
var value = storage.getItem(avwsys_storagekey);
var value = storage.getItem(I18N.avwsys_storagekey);
if(value) {
var json = JSON.parse(value);
replaceText(json);
I18N.replaceText(json);
}
}
};
/* キーから文字列を取得 */
function i18nText(key) {
I18N.i18nText = function(key) {
var storage = window.sessionStorage;
if(storage) {
var value = storage.getItem(avwsys_storagekey);
var value = storage.getItem(I18N.avwsys_storagekey);
if(value) {
var json = JSON.parse(value);
return getLangText(json, key);
......@@ -169,11 +174,11 @@ function changeLanguage(lang) {
// 言語の切替を行った場合のみ選択言語をストアする
var storage = window.localStorage;
if(storage) {
storage.setItem(avwsys_storagekey, lang);
storage.setItem(I18N.avwsys_storagekey, lang);
}
// 言語ファイルを読み込み、テキスト文字列を変換する
loadLanguage(lang);
I18N.loadLanguage(lang);
};
/* 設定言語の保存 */
......@@ -181,9 +186,9 @@ function storeCurrentLanguage(lang, langData) {
var ss = window.sessionStorage;
if(ss) {
// language data
ss.setItem(avwsys_storagekey, JSON.stringify(langData));
ss.setItem(I18N.avwsys_storagekey, JSON.stringify(langData));
// current language
ss.setItem(avwsys_currLang, lang);
ss.setItem(I18N.avwsys_currLang, lang);
}
};
/* 設定言語の取得 */
......@@ -191,10 +196,10 @@ function getCurrentLanguage() {
var lang;
var storage = window.sessionStorage;
if(storage) {
lang = storage.getItem(avwsys_currLang);
lang = storage.getItem(I18N.avwsys_currLang);
}
if(!lang) {
lang = getNavigatorLanguage();
lang = I18N.getNavigatorLanguage();
}
return lang;
};
......@@ -14,7 +14,7 @@
* <https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt>
*/
/// <reference path="i18n.js" />
//Add custom i18n.js
(function($) {
'use strict';
......@@ -69,7 +69,7 @@
dataElem = $this.data('powertipjq'),
dataTarget = $this.data('powertiptarget'),
//title = $this.attr('title');
title = i18nText($this.attr('lang'));
title = I18N.i18nText($this.attr('lang'));
// attempt to use title attribute text if there is no data-powertip,
......
......@@ -14,6 +14,8 @@
*
*/
//Add custom i18n.js
;(function($) {
// TODO rewrite as a widget, removing all the extra plugins
......@@ -514,7 +516,7 @@ function TreeView() {
var tree = this;
tree.Id = containerId;
var newItem = new TreeNode();
newItem.Text = i18nText('txtAll');
newItem.Text = I18N.i18nText('txtAll');
newItem.Id = "all";
newItem.IsCategory = false;
newItem.ContentCount = this.TotalCount;
......
......@@ -160,9 +160,9 @@ removeLockState();
var tags = '<div id="' + elmId + '" class="screenLock">' +
'<div style="display:table; width:100%; height:100%;">' +
'<div style="display:table-cell; text-align:center; vertical-align:middle;">' +
'<p class="screenLock-content">' + html + i18nText('sysInfoScrLock01') + '</p>' +
'<p class="screenLock-content">' + html + I18N.i18nText('sysInfoScrLock01') + '</p>' +
'<div id="pw" style="display:none;">' +
'<input id="passwd-txt" placeholder="'+i18nText('sysLockScrPwdInput')+'" type="password" value="" />&nbsp;' +
'<input id="passwd-txt" placeholder="'+ I18N.i18nText('sysLockScrPwdInput')+'" type="password" value="" />&nbsp;' +
'<button id="unlock-btn">OK</button>' +
'<div id="screenLockErrMsg" class="screenLock-error" style="display:none;">' + errorMessage + '</div>' +
'</div>' +
......
{
"apiUrl" : "https://web3.agentec.jp/acms/{0}/abvapi",
"apiUrl1" : "https://web3.agentec.jp/acms/{0}/abvapi",
"apiUrl" : "",
"apiLoginUrl" : "https://web3.agentec.jp/acms/nuabvapi",
"apiResourceDlUrl" : "https://web3.agentec.jp/acms/{0}/dl",
"bookShelfCount" : 15,
......
......@@ -8,11 +8,11 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
if (levelContent == 1) {
if ($('#limit_level1').length <= 0) {
var html = '<section class="sectionLimitAccess" id="limit_level1">';
html += '<h1 class="lang" lang="txtContentWarning">' + i18nText("txtContentWarning") + '</h1>';
html += '<h1 class="lang" lang="txtContentWarning">' + I18N.i18nText("txtContentWarning") + '</h1>';
html += '<p class="message"></p>';
html += '<p class="deletebtn">';
html += '<a lang="dspOK" class="ok lang">' + i18nText("dspOK") + '</a>';
html += '<a lang="dspCancel" class="cancel lang">' + i18nText("dspCancel") + '</a>';
html += '<a lang="dspOK" class="ok lang">' + I18N.i18nText("dspOK") + '</a>';
html += '<a lang="dspCancel" class="cancel lang">' + I18N.i18nText("dspCancel") + '</a>';
html += '</p>';
html += '</section>';
$('body').append(html);
......@@ -48,15 +48,15 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
if ($('#limit_level2').length <= 0) {
var html = '<section class="sectionLimitAccess" id="limit_level2">';
html += '<h1 class="lang" lang="txtContentPWTitle">' + i18nText("txtContentPWTitle") + '</h1>';
html += '<h1 class="lang" lang="txtContentPWTitle">' + I18N.i18nText("txtContentPWTitle") + '</h1>';
html += '<p class="message">';
html += '<label class="text lang" lang="txtContentPWMsg">' + i18nText("txtContentPWMsg") + '</label>';
html += '<label class="text lang" lang="txtContentPWMsg">' + I18N.i18nText("txtContentPWMsg") + '</label>';
html += '<input type="password" />';
html += '<label class="error" id="lblMessageLimitError"></label>';
html += '</p>';
html += '<p class="deletebtn">';
html += '<a lang="dspOK" class="ok lang">' + i18nText("dspOK") + '</a>';
html += '<a lang="dspCancel" class="cancel lang">' + i18nText("dspCancel") + '</a>';
html += '<a lang="dspOK" class="ok lang">' + I18N.i18nText("dspOK") + '</a>';
html += '<a lang="dspCancel" class="cancel lang">' + I18N.i18nText("dspCancel") + '</a>';
html += '</p>';
html += '</section>';
......@@ -100,7 +100,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
function () {
var password = $('#limit_level2 .message input').val();
if (!ValidationUtil.CheckRequiredForText(password)) {
$('#lblMessageLimitError').html(i18nText('msgPwdEmpty')).show();
$('#lblMessageLimitError').html(I18N.i18nText('msgPwdEmpty')).show();
return;
}
......@@ -130,7 +130,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
funcOk();
}
else {
$('#lblMessageLimitError').html(AVWEB.format(i18nText('msgLoginErrWrong'), data.errorMessage).toString()).show();
$('#lblMessageLimitError').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), data.errorMessage).toString()).show();
}
},
function (xhr, statusText, errorThrown) {
......@@ -138,7 +138,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
if (xhr.responseText && xhr.status != 0) {
errorCode = JSON.parse(xhr.responseText).errorMessage;
}
$('#lblMessageLimitError').html(AVWEB.format(i18nText('msgLoginErrWrong'), errorCode).toString()).show();
$('#lblMessageLimitError').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), errorCode).toString()).show();
}
);
......
/// しおりリスト画面 - SCRSLS0100
/// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/screenLock.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="../common/js/i18n.js" />
/// <reference path="../common/js/jquery-1.8.1.min.js" />
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/pageViewer.js" />
/// <reference path="init.js" />
//var TotalThread = 0;
var contentTypes = {};
var contentName = {};
var pathImgContentNone = './img/page-none.png';
......@@ -31,7 +11,7 @@ $(document).ready(function () {
COMMON.LockScreen();
document.title = i18nText('dspShiori') + ' | ' + i18nText('sysAppTitle');
document.title = I18N.i18nText('dspShiori') + ' | ' + I18N.i18nText('sysAppTitle');
// Set bookmark screen
ClientData.BookmarkScreen(ScreenIds.BookmarkList);
......@@ -594,7 +574,7 @@ function insertRowError(contentid, pageTitle, pageNo) {
newRow += " <div class='text'>";
newRow += ' <label class="name">' + COMMON.truncate(pageTitle, 20) + '</label>';
newRow += ' <div class="info">';
newRow += " <label class='lang name' lang='msgShioriDeleted'>" + i18nText('msgShioriDeleted') + "</label>";
newRow += " <label class='lang name' lang='msgShioriDeleted'>" + I18N.i18nText('msgShioriDeleted') + "</label>";
newRow += " </div>";
newRow += " </div>";
......@@ -625,7 +605,7 @@ function insertRow(contentid, pageThumbnail, pageTitle, pageText, pageNo, hasMem
newRow += '<div class="info">';
newRow += '<ul class="date">';
newRow += '<li><label id="Label2" class="lang" lang="txtPage">' + i18nText('txtPage') + '</label><label id="Label3">' + pageNo + '</label></li>';
newRow += '<li><label id="Label2" class="lang" lang="txtPage">' + I18N.i18nText('txtPage') + '</label><label id="Label3">' + pageNo + '</label></li>';
var contentText = COMMON.htmlEncode(COMMON.getLines(pageText, 3));
newRow += '<li><label id="Label1">' + COMMON.truncate(contentText, 80) + '</label></li>';
......@@ -678,7 +658,7 @@ function insertRow(contentid, pageThumbnail, pageTitle, pageText, pageNo, hasMem
newRow += imgMarkingHide;
}
newRow += "</li>";
newRow += "<li><a class='read lang' name='dspRead' value='{\"contentid\":\"" + contentid + "\", \"pageNo\":\"" + pageNo + "\"}' lang='txtRead'>" + i18nText('txtRead') + "</a></li>";
newRow += "<li><a class='read lang' name='dspRead' value='{\"contentid\":\"" + contentid + "\", \"pageNo\":\"" + pageNo + "\"}' lang='txtRead'>" + I18N.i18nText('txtRead') + "</a></li>";
newRow += "</ul>";
newRow += "</div>";
newRow += "</div>";
......@@ -759,14 +739,14 @@ function insertRow(contentid, pageThumbnail, pageTitle, pageText, pageNo, hasMem
}
newRow += '<li class="pageno"><label id="Label2" class="lang" lang="txtPage">' + i18nText('txtPage') + '</label><label id="Label3">' + pageNo + '</label></li>';
newRow += '<li class="pageno"><label id="Label2" class="lang" lang="txtPage">' + I18N.i18nText('txtPage') + '</label><label id="Label3">' + pageNo + '</label></li>';
//newRow +='<li><a href="#"><img class="sticker" src="img/list/icon_sticker.png"></a></li>';
//newRow +='<li><a href="#"><img class="pen" src="img/list/icon_pen.png"></a></li>';
//newRow += "<li><a class='read lang' name='dspRead' value='{contentid:" + contentid + ", pageNo:" + pageNo + "}' lang='txtRead'>" + i18nText('txtRead') + "</a></li>";
newRow += "<li><a class='read lang' name='dspRead' value='{\"contentid\":\"" + contentid + "\", \"pageNo\":\"" + pageNo + "\", \"contentType\":\"" + contentType + "\" }' lang='txtRead'>" + i18nText('txtRead') + "</a></li>";
//newRow += "<li><a class='read lang' name='dspRead' value='{contentid:" + contentid + ", pageNo:" + pageNo + "}' lang='txtRead'>" + I18N.i18nText('txtRead') + "</a></li>";
newRow += "<li><a class='read lang' name='dspRead' value='{\"contentid\":\"" + contentid + "\", \"pageNo\":\"" + pageNo + "\", \"contentType\":\"" + contentType + "\" }' lang='txtRead'>" + I18N.i18nText('txtRead') + "</a></li>";
newRow +='</ul>';
newRow +='</div>';
newRow +='</div>';
......@@ -967,7 +947,7 @@ function changeLanguageCallBackFunction() {
HEADER.setStatusSort('#dspTitleNmKn', orderSort == Consts.ConstOrderSetting_Asc);
}
}
document.title = i18nText('dspShiori') + ' | ' + i18nText('sysAppTitle');
document.title = I18N.i18nText('dspShiori') + ' | ' + I18N.i18nText('sysAppTitle');
};
/*
Synchronize bookmark with server
......
/// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/screenLock.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="../common/js/i18n.js" />
/// <reference path="../common/js/jquery-1.8.1.min.js" />
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/pageViewer.js" />
/// <reference path="header.js" />
//Start Declare Variables
//----Constant-----------//
......@@ -62,7 +45,7 @@ $(document).ready(function(){
COMMON.LockScreen();
document.title = i18nText('txtSearchResult') + ' | ' + i18nText('sysAppTitle');
document.title = I18N.i18nText('txtSearchResult') + ' | ' + I18N.i18nText('sysAppTitle');
// Set bookmark screen
ClientData.BookmarkScreen(ScreenIds.ContentSearch);
......@@ -276,7 +259,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' <ul class="pic">'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentId + '" class="sticker" /></li>'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentId + '" class="pen" /></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">'+i18nText("txtRead")+'</a></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">'+I18N.i18nText("txtRead")+'</a></li>'
+ ' </ul>'
+ ' </div>'
+ ' </div>'
......@@ -344,7 +327,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
handleBackToTop();
//changeLanguage(ClientData.userInfo_language());
i18nReplaceText();
I18N.i18nReplaceText();
});
};
......@@ -1759,9 +1742,9 @@ function refreshGrid(){
//format text display more record
function formatDisplayMoreRecord(){
i18nReplaceText();
I18N.i18nReplaceText();
//changeLanguage(ClientData.userInfo_language());
$('#control-nextrecord').html(AVWEB.format(i18nText('dspViewMore'), returnNumberDispRecordForList()));
$('#control-nextrecord').html(AVWEB.format(I18N.i18nText('dspViewMore'), returnNumberDispRecordForList()));
};
......@@ -1781,12 +1764,12 @@ function changeLanguageCallBackFunction(){
enableSort();
}
document.title = i18nText('txtSearchResult') + ' | ' + i18nText('sysAppTitle');
document.title = I18N.i18nText('txtSearchResult') + ' | ' + I18N.i18nText('sysAppTitle');
};
function displayResultNoRecord(){
i18nReplaceText();
//$('#content-grid').html(i18nText('msgSearchNotExist'));
I18N.i18nReplaceText();
//$('#content-grid').html(I18N.i18nText('msgSearchNotExist'));
//$('#content-grid').css({ 'text-align': 'left', 'margin-top': '20px', 'clear': 'both' });
$('#content-grid').html('');
$('#msgSearchNotExist').show();
......
......@@ -20,12 +20,12 @@ function showAnket(url, fullscreen, objectId) {
$container.draggable({ handle: "h1" });
$container.html(
'<h1>'+i18nText('txtEnqueteTitle')
'<h1>'+I18N.i18nText('txtEnqueteTitle')
+ '<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
+ '</h1>'
+ '<div class="anket-container" id="anket-container"><iframe width="' + width + '" height="100%" frameborder="0" scrolling="auto" src="' + url + '">'
+ '</iframe></div>'
+ '<div class="anket-commands" id="anket-commands"><input type="button" value="' + i18nText('txtTransparent') + '" id="btnFullOpacity"/> <input type="button" value="' + i18nText('txtSemiTransparent') + '" id="btnApartOpacity"/> <input type="button" value="' + i18nText('txtNoTransparent') + '" id="btnNoOpacity"/></div><div style="clear:both;"></div>'
+ '<div class="anket-commands" id="anket-commands"><input type="button" value="' + I18N.i18nText('txtTransparent') + '" id="btnFullOpacity"/> <input type="button" value="' + I18N.i18nText('txtSemiTransparent') + '" id="btnApartOpacity"/> <input type="button" value="' + I18N.i18nText('txtNoTransparent') + '" id="btnNoOpacity"/></div><div style="clear:both;"></div>'
);
$('#dialog h1 img').click(function(){
......
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="contentview_VarDef.js" />
/// <reference path="contentview_CallApi.js" />
//START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
/* get Json stored content info */
function getJsonContentInfo() {
......@@ -922,13 +914,13 @@ function getBookmarklist(pos) {
if (isExistBookMarkInContent == false) {
$('#divListBookmark').children().remove();
$('#divListBookmark').append('<span class="last">' + i18nText('msgShioriNotExists') + '</span>');
$('#divListBookmark').append('<span class="last">' + I18N.i18nText('msgShioriNotExists') + '</span>');
//title start
$('#bookmarkBoxHdBM').children().remove();
$('#bookmarkBoxHdBM').html('<a id="bookmarkClosing" class="delete" > </a>');
$("#bookmarkClosing").click(closeBookmarkBox);
$('#bookmarkBoxHdBM').append(i18nText('txtShioriCtnLs'));
$('#bookmarkBoxHdBM').append(I18N.i18nText('txtShioriCtnLs'));
//title end
//COMMON.lockLayout();
$('#boxBookMark').css('z-index', '101');
......@@ -955,14 +947,14 @@ function getPageIndexJson(pos) {
// height:HEIGHT_DIALOG_INDEX,
// resizable:false,
// closeOnEscape: false,
// title: i18nText('txtIndex'),
// title: I18N.i18nText('txtIndex'),
// position: pos});
//title start
$('#indexBoxHdIndex').children().remove();
$('#indexBoxHdIndex').html('<a id="indexClosing" class="delete" > </a>');
$("#indexClosing").click(closeIndexBox);
$('#indexBoxHdIndex').append(i18nText('txtIndex'));
$('#indexBoxHdIndex').append(I18N.i18nText('txtIndex'));
//title end
//COMMON.lockLayout();
$('#boxIndex').css('z-index', '101');
......@@ -1002,7 +994,7 @@ function getPageIndexJson(pos) {
$(".treeview, .treeview ul").css('padding', '0px 8px 0');
} else {
$('#divListIndex').children().remove();
$('#divListIndex').append('<span class="no-item">' + i18nText('msgNoIndex') + '</span>');
$('#divListIndex').append('<span class="no-item">' + I18N.i18nText('msgNoIndex') + '</span>');
// //show dialog index
// $("#divListIndex").dialog({
......@@ -1011,14 +1003,14 @@ function getPageIndexJson(pos) {
// resizable:false,
// width: WIDTH_DIALOG_INDEX,
// height:HEIGHT_DIALOG_INDEX_NO_INDEX,
// title: i18nText('txtIndex'),
// title: I18N.i18nText('txtIndex'),
// position: pos});
//title start
$('#indexBoxHdIndex').children().remove();
$('#indexBoxHdIndex').html('<a id="indexClosing" class="delete" > </a>');
$("#indexClosing").click(closeIndexBox);
$('#indexBoxHdIndex').append(i18nText('txtIndex'));
$('#indexBoxHdIndex').append(I18N.i18nText('txtIndex'));
//title end
//COMMON.lockLayout();
$('#boxIndex').css('z-index', '101');
......@@ -1046,14 +1038,14 @@ function getText() {
}
}
if (sPageText == '') {
return { text: i18nText('txtNoTextCopy'), title: i18nText('txtTextCopy') + ' | ' + i18nText('sysAppTitle') };
return { text: I18N.i18nText('txtNoTextCopy'), title: I18N.i18nText('txtTextCopy') + ' | ' + I18N.i18nText('sysAppTitle') };
}
else {
var strPattern = "\n";
var strTemp = sPageText;
strTemp = strTemp.replaceAll(strPattern, "<br/>");
strTemp += "<br/>";
return { text: strTemp, title: i18nText('txtTextCopy') + ' | ' + i18nText('sysAppTitle') };
return { text: strTemp, title: I18N.i18nText('txtTextCopy') + ' | ' + I18N.i18nText('sysAppTitle') };
}
};
......@@ -1175,7 +1167,7 @@ function getContentDataForImageType(){
//Set default page No to image Type
imageTypeData["pageNo"] = 1;
document.title = data.contentData.contentName + ' | ' + i18nText('sysAppTitle');
document.title = data.contentData.contentName + ' | ' + I18N.i18nText('sysAppTitle');
});
};
......
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="contentview_VarDef.js" />
/// <reference path="contentview_CallApi.js" />
/// <reference path="contentview_GetData.js" />
/* init Image memo */
function initImageMemo() {
if (ClientData.IsDisplayMemo() == true) {
......@@ -328,12 +317,12 @@ function initPage() {
/* set pageTitle*/
if (dataPageTitle[0]) {
if (dataPageTitle[0] != '') {
document.title = contentName + '_' + dataPageTitle[0] + ' | ' + i18nText('sysAppTitle');
document.title = contentName + '_' + dataPageTitle[0] + ' | ' + I18N.i18nText('sysAppTitle');
} else {
document.title = contentName + ' | ' + i18nText('sysAppTitle');
document.title = contentName + ' | ' + I18N.i18nText('sysAppTitle');
}
} else {
document.title = contentName + ' | ' + i18nText('sysAppTitle');
document.title = contentName + ' | ' + I18N.i18nText('sysAppTitle');
}
/* handle slider bar */
......@@ -470,12 +459,12 @@ function initPage() {
/* set pageTitle*/
if (dataPageTitle[0]) {
if (dataPageTitle[0] != '') {
document.title = contentName + '_' + dataPageTitle[0] + ' | ' + i18nText('sysAppTitle');
document.title = contentName + '_' + dataPageTitle[0] + ' | ' + I18N.i18nText('sysAppTitle');
} else {
document.title = contentName + ' | ' + i18nText('sysAppTitle');
document.title = contentName + ' | ' + I18N.i18nText('sysAppTitle');
}
} else {
document.title = contentName + ' | ' + i18nText('sysAppTitle');
document.title = contentName + ' | ' + I18N.i18nText('sysAppTitle');
}
/* handle slider bar */
......
......@@ -9,7 +9,7 @@ var maker_chooseColor;
function ShowMaker(targetId){
maker_targetDiv = targetId;
i18nReplaceText();
I18N.i18nReplaceText();
$('#dlgMaker').show();
$('#dlgMaker').draggable();
Maker_handleColorPickerEvent();
......
......@@ -13,15 +13,15 @@ function createMemoDialog(){
targetDiv.html('');
targetDiv.append(
'<aside id="memoWrapper" class="MemoIndexBox">'
+ ' <h1 class="indexBoxHd">' + i18nText('txtMemo')
+ ' <h1 class="indexBoxHd">' + I18N.i18nText('txtMemo')
+' <a class="delete"></a>'
+' </h1>'
+' <div id="memoArea" class="indexBoxBody_on">'
+' <textarea id="txaMemoContent" style="resize: none; height: 302px; width: 452px; margin-bottom: 10px"></textarea>'
+' <div style="width: 450px;">'
+ ' <a id="Memo_btnCancel" style="float:right" class="lang cancelbtn" lang="dspCancel">' + i18nText('dspCancel') + '</a>'
+ ' <a id="Memo_btnDel" style="float:right" class="lang cancelbtn" lang="dspDelete">' + i18nText('dspDelete') + '</a>'
+ ' <a id="Memo_btnSave" style="float:right" class="lang cancelbtn" lang="dspSave">' + i18nText('dspSave') + '</a>'
+ ' <a id="Memo_btnCancel" style="float:right" class="lang cancelbtn" lang="dspCancel">' + I18N.i18nText('dspCancel') + '</a>'
+ ' <a id="Memo_btnDel" style="float:right" class="lang cancelbtn" lang="dspDelete">' + I18N.i18nText('dspDelete') + '</a>'
+ ' <a id="Memo_btnSave" style="float:right" class="lang cancelbtn" lang="dspSave">' + I18N.i18nText('dspSave') + '</a>'
+' </div>'
+' </div>'
+'</aside>');
......
......@@ -9,7 +9,7 @@ var pen_chooseColor;
function ShowPen(targetId) {
pen_targetDiv = targetId;
i18nReplaceText();
I18N.i18nReplaceText();
$('#dlgPen').show();
$('#dlgPen').draggable({ revert: false});
Pen_handleColorPickerEvent();
......
/// コンテンツ詳細画面
/// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/screenLock.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="../common/js/i18n.js" />
/// <reference path="../common/js/jquery-1.8.1.min.js" />
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/pageViewer.js" />
/// <reference path="init.js" />
/// <reference path="home.js" />
var resourceIdDetail="";
var displayData = {
......@@ -368,11 +348,11 @@ function insertRow(pageThumbnail, pageText, pageNo) {
newRow += "<ul>";
newRow += '<li class="list_img"><img src="' + pageThumbnail + '" alt="" width="90" /></li>';
newRow += '<li class="list_title"><a href="#">' + COMMON.htmlEncode(pageText) + '</a></li>';
newRow += '<li class="page"><label id="Label2" class="lang" lang="txtPage">' + i18nText('txtPage') + '</label>' + pageNo + '</li>';
newRow += '<li class="page"><label id="Label2" class="lang" lang="txtPage">' + I18N.i18nText('txtPage') + '</label>' + pageNo + '</li>';
newRow += "</ul>";
$('#book_list').append(newRow);
i18nReplaceText();
I18N.i18nReplaceText();
//Resize Image
var imgTemp = new Image();
......@@ -410,7 +390,7 @@ function insertRow1(pageThumbnail, pageText, pageNo) {
$('#contentdetail_grid tr:last').after(newRow);
//changeLanguage(ClientData.userInfo_language());
i18nReplaceText();
I18N.i18nReplaceText();
};
......
/// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/screenLock.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="../common/js/i18n.js" />
/// <reference path="../common/js/jquery-1.8.1.min.js" />
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/pageViewer.js" />
/// <reference path="header.js" />
//Start Declare Variables
//----Constant-----------//
......@@ -65,7 +48,7 @@ $(document).ready(function(){
COMMON.LockScreen();
document.title = i18nText('dspViewHistory') + ' | ' + i18nText('sysAppTitle');
document.title = I18N.i18nText('dspViewHistory') + ' | ' + I18N.i18nText('sysAppTitle');
ClientData.BookmarkScreen(ScreenIds.History);
......@@ -179,13 +162,13 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' <a id="title' + post.contentId + '" class="dialog name" contentid="' + post.contentId + '">' + COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 25) + '</a>'
+ ' <div class="info">'
+ ' <ul class="date">'
+ ' <li><span class="lang" lang="txtPubDt">' + i18nText("txtPubDt") + '</span> : ' + outputDate + '</li>'
+ ' <li><span class="lang" lang="txtViewDt">' + i18nText("txtViewDt") + '</span>:<span id="lblVdate' + post.contentId + '"> </span></li>'
+ ' <li><span class="lang" lang="txtPubDt">' + I18N.i18nText("txtPubDt") + '</span> : ' + outputDate + '</li>'
+ ' <li><span class="lang" lang="txtViewDt">' + I18N.i18nText("txtViewDt") + '</span>:<span id="lblVdate' + post.contentId + '"> </span></li>'
+ ' </ul>'
+ ' <ul class="pic">'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentId + '" class="sticker" /></li>'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentId + '" class="pen" /></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">' + i18nText("txtRead") + '</a></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">' + I18N.i18nText("txtRead") + '</a></li>'
+ ' </ul>'
+ ' </div>'
+ ' </div>'
......@@ -213,7 +196,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' <ul class="pic">'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentId + '" class="sticker" /></li>'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentId + '" class="pen" /></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">'+i18nText("txtRead")+'</a></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">'+I18N.i18nText("txtRead")+'</a></li>'
+ ' </ul>'
+ ' </div>'
+ ' </div>'
......@@ -320,7 +303,7 @@ function handleLanguage(){
$('#control-sort-titlekana-off').css('display','block');
$('#content-grid').html("<div id='msgHistoryNotExist'>" + i18nText('msgHistoryNotExist') + "</div>");
$('#content-grid').html("<div id='msgHistoryNotExist'>" + I18N.i18nText('msgHistoryNotExist') + "</div>");
}else{
$('#control-sort-titlekana').css('display','block');
$('#separate').css('display','block');
......@@ -1660,12 +1643,12 @@ function IsExistContent(strContentId) {
function changeLanguageCallBackFunction(){
handleLanguage();
document.title = i18nText('dspViewHistory') + ' | ' + i18nText('sysAppTitle');
document.title = I18N.i18nText('dspViewHistory') + ' | ' + I18N.i18nText('sysAppTitle');
};
function displayResultNoRecord(){
i18nReplaceText();
$('#content-grid').html("<div id='msgHistoryNotExist'>" + i18nText('msgHistoryNotExist') + "</div>");
I18N.i18nReplaceText();
$('#content-grid').html("<div id='msgHistoryNotExist'>" + I18N.i18nText('msgHistoryNotExist') + "</div>");
$('#control-nextrecord').css('visibility','hidden');
$('.control_sort_on').hide();
$('.control_sort_off').show();
......@@ -1811,13 +1794,13 @@ function renderContentAfterSort(contentSortArr){
+ ' <a id="title' + post.contentid + '" class="dialog name" contentid="' + post.contentid + '">' + COMMON.truncate(COMMON.htmlEncode(post.contenttitle), 25) + '</a>'
+ ' <div class="info">'
+ ' <ul class="date">'
+ ' <li><span class="lang" lang="txtPubDt">' + i18nText("txtPubDt") + '</span> : ' + outputDeliveryDate + '</li>'
+ ' <li><span class="lang" lang="txtViewDt">' + i18nText("txtViewDt") + '</span>:<span id="lblVdate' + post.contentid + '"> </span></li>'
+ ' <li><span class="lang" lang="txtPubDt">' + I18N.i18nText("txtPubDt") + '</span> : ' + outputDeliveryDate + '</li>'
+ ' <li><span class="lang" lang="txtViewDt">' + I18N.i18nText("txtViewDt") + '</span>:<span id="lblVdate' + post.contentid + '"> </span></li>'
+ ' </ul>'
+ ' <ul class="pic">'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentid + '" class="sticker" /></li>'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentid + '" class="pen" /></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentid + '" lang="txtRead">' + i18nText("txtRead") + '</a></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentid + '" lang="txtRead">' + I18N.i18nText("txtRead") + '</a></li>'
+ ' </ul>'
+ ' </div>'
+ ' </div>'
......@@ -1838,13 +1821,13 @@ function renderContentAfterSort(contentSortArr){
+ ' </a>'
+ ' <div class="info">'
+ ' <ul class="date">'
+ ' <li><span class="lang" lang="txtPubDt">'+i18nText("txtPubDt")+'</span> : ' + outputDeliveryDate + '</li>'
+ ' <li><span class="lang" lang="txtViewDt">'+i18nText("txtViewDt")+'</span>:<span id="lblVdate' + post.contentid + '"> </span></li>'
+ ' <li><span class="lang" lang="txtPubDt">'+I18N.i18nText("txtPubDt")+'</span> : ' + outputDeliveryDate + '</li>'
+ ' <li><span class="lang" lang="txtViewDt">'+I18N.i18nText("txtViewDt")+'</span>:<span id="lblVdate' + post.contentid + '"> </span></li>'
+ ' </ul>'
+ ' <ul class="pic">'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentid + '" class="sticker" /></li>'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentid + '" class="pen" /></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentid + '" lang="txtRead">'+i18nText("txtRead")+'</a></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentid + '" lang="txtRead">'+I18N.i18nText("txtRead")+'</a></li>'
+ ' </ul>'
+ ' </div>'
+ ' </div>'
......
/// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/screenLock.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="../common/js/i18n.js" />
/// <reference path="../common/js/jquery-1.8.1.min.js" />
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/pageViewer.js" />
/// <reference path="header.js" />
//Start Declare Variables
//----Constant-----------//
......@@ -63,7 +54,7 @@ $(document).ready(function () {
return;
}
document.title = i18nText('dspHome') + ' | ' + i18nText('sysAppTitle');
document.title = I18N.i18nText('dspHome') + ' | ' + I18N.i18nText('sysAppTitle');
// Set bookmark screen
ClientData.BookmarkScreen(ScreenIds.Home);
......@@ -2064,7 +2055,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
handleBackToTop();
//changeLanguage(ClientData.userInfo_language());
i18nReplaceText();
I18N.i18nReplaceText();
});
};
var genre_totalcontent = -1;
......@@ -2856,16 +2847,16 @@ function refreshGrid() {
function formatDisplayMoreRecord() {
//changeLanguage(ClientData.userInfo_language());
i18nReplaceText();
I18N.i18nReplaceText();
if (isShowBookShelf) {
$('#control-nextrecord').html(AVWEB.format(i18nText('dspViewMore'), returnNumberDispRecordForBookShelf()).toString());
$('#control-nextrecord').html(AVWEB.format(I18N.i18nText('dspViewMore'), returnNumberDispRecordForBookShelf()).toString());
}
else if (!isShowBookShelf) {
$('#control-nextrecord').html(AVWEB.format(i18nText('dspViewMore'), returnNumberDispRecordForList()));
$('#control-nextrecord').html(AVWEB.format(I18N.i18nText('dspViewMore'), returnNumberDispRecordForList()));
}
else {
$('#control-nextrecord').html(AVWEB.format(i18nText('dspViewMore'), returnNumberDispRecordForBookShelf()));
$('#control-nextrecord').html(AVWEB.format(I18N.i18nText('dspViewMore'), returnNumberDispRecordForBookShelf()));
}
};
......@@ -3167,7 +3158,7 @@ function SyncMarkingPages() {
function changeLanguageCallBackFunction() {
handleLanguage();
formatDisplayMoreRecord();
document.title = i18nText('dspHome') + ' | ' + i18nText('sysAppTitle');
document.title = I18N.i18nText('dspHome') + ' | ' + I18N.i18nText('sysAppTitle');
};
//function truncate(strInput, length) {
......
/// 設定変更画面
/// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/screenLock.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="../common/js/i18n.js" />
/// <reference path="../common/js/jquery-1.8.1.min.js" />
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/pageViewer.js" />
// Init function of page
$(document).ready(function () {
......@@ -22,7 +7,7 @@ $(document).ready(function () {
COMMON.ToogleLogoutNortice();
COMMON.LockScreen();
document.title = i18nText('dspSetting') + ' | ' + i18nText('sysAppTitle');
document.title = I18N.i18nText('dspSetting') + ' | ' + I18N.i18nText('sysAppTitle');
// Set bookmark screen
ClientData.BookmarkScreen(ScreenIds.Setting);
......@@ -132,7 +117,7 @@ $(document).ready(function () {
event of changing language
*/
function changeLanguageCallBackFunction() {
document.title = i18nText('dspSetting') + ' | ' + i18nText('sysAppTitle');
document.title = I18N.i18nText('dspSetting') + ' | ' + I18N.i18nText('sysAppTitle');
};
/*
......@@ -316,7 +301,7 @@ function dspOptBk_OK_Click(e) {
// $().toastmessage('showToast', {
// type: 'error',
// sticky: true,
// text: i18nText('msgBackupFailed')
// text: I18N.i18nText('msgBackupFailed')
// });
// });
......@@ -389,7 +374,7 @@ function setStatusButtonBackup() {
// $().toastmessage('showToast', {
// type: 'success',
// sticky: true,
// text: i18nText('msgBackupSuccess')
// text: I18N.i18nText('msgBackupSuccess')
// });
// }
// else {
......@@ -398,7 +383,7 @@ function setStatusButtonBackup() {
// $().toastmessage('showToast', {
// type: 'error',
// sticky: true,
// text: i18nText('msgBackupFailed')
// text: I18N.i18nText('msgBackupFailed')
// });
// }
//};
......@@ -431,7 +416,7 @@ function dspOptRes_OK_Click(e) {
// $().toastmessage('showToast', {
// type: 'error',
// sticky: true,
// text: i18nText('msgRestoreFailed')
// text: I18N.i18nText('msgRestoreFailed')
// });
// }
// else {
......@@ -466,10 +451,10 @@ function dspOptRes_OK_Click(e) {
// restore Marking Data
var res = restoreMarkingData();
if (!res) {
$('#divResultMessage').append("<div class='toast-item-image-error toast-item-message'>" + i18nText('txtBkMarking') + " " + i18nText('msgRestoreFailed') + "</div>");
$('#divResultMessage').append("<div class='toast-item-image-error toast-item-message'>" + I18N.i18nText('txtBkMarking') + " " + I18N.i18nText('msgRestoreFailed') + "</div>");
}
else {
$('#divResultMessage').append("<div class='toast-item-image-success toast-item-message'>" + i18nText('txtBkMarking') + " " + i18nText('msgRestoreSuccess') + "</div>");
$('#divResultMessage').append("<div class='toast-item-image-success toast-item-message'>" + I18N.i18nText('txtBkMarking') + " " + I18N.i18nText('msgRestoreSuccess') + "</div>");
}
}
if (isRestoreMemo) {
......@@ -477,10 +462,10 @@ function dspOptRes_OK_Click(e) {
// restore Memo data
var res = restoreMemoData();
if (!res) {
$('#divResultMessage').append("<div class='toast-item-image-error toast-item-message'>" + i18nText('txtBkMemo') + " " + i18nText('msgRestoreFailed') + "</div>");
$('#divResultMessage').append("<div class='toast-item-image-error toast-item-message'>" + I18N.i18nText('txtBkMemo') + " " + I18N.i18nText('msgRestoreFailed') + "</div>");
}
else {
$('#divResultMessage').append("<div class='toast-item-image-success toast-item-message'>" + i18nText('txtBkMemo') + " " + i18nText('msgRestoreSuccess') + "</div>");
$('#divResultMessage').append("<div class='toast-item-image-success toast-item-message'>" + I18N.i18nText('txtBkMemo') + " " + I18N.i18nText('msgRestoreSuccess') + "</div>");
}
}
if (isRestoreBookmark) {
......@@ -488,10 +473,10 @@ function dspOptRes_OK_Click(e) {
// restore Bookmark data
var res = restoreBookmarkData();
if (!res) {
$('#divResultMessage').append("<div class='toast-item-image-error toast-item-message'>" + i18nText('txtBkShiori') + " " + i18nText('msgRestoreFailed') + "</div>");
$('#divResultMessage').append("<div class='toast-item-image-error toast-item-message'>" + I18N.i18nText('txtBkShiori') + " " + I18N.i18nText('msgRestoreFailed') + "</div>");
}
else {
$('#divResultMessage').append("<div class='toast-item-image-success toast-item-message'>" + i18nText('txtBkShiori') + " " + i18nText('msgRestoreSuccess') + "</div>");
$('#divResultMessage').append("<div class='toast-item-image-success toast-item-message'>" + I18N.i18nText('txtBkShiori') + " " + I18N.i18nText('msgRestoreSuccess') + "</div>");
}
}
......@@ -522,7 +507,7 @@ function dspOptRes_OK_Click(e) {
// $().toastmessage('showToast', {
// type: 'success',
// sticky: true,
// text: i18nText('msgRestoreSuccess')
// text: I18N.i18nText('msgRestoreSuccess')
// });
// }
//};
......@@ -698,7 +683,7 @@ function dspSave_Click(e) {
$().toastmessage('showToast', {
type: 'success',
sticky: true,
text: i18nText('msgSaveOk')
text: I18N.i18nText('msgSaveOk')
});
};
......@@ -845,45 +830,45 @@ function dspPwdUpd1_Click(e) {
// Check validation
if (!ValidationUtil.CheckRequiredForText(getCurrentPassword())) {
isOK = false;
//alert(i18nText('msgPwdEmpty'));
//alert(I18N.i18nText('msgPwdEmpty'));
/* show error messages */
// $().toastmessage({ position: 'middle-center' });
// $().toastmessage('showToast', {
// type: 'error',
// sticky: true,
// text: i18nText('msgPwdEmpty')
// text: I18N.i18nText('msgPwdEmpty')
//});
msgError.html(i18nText('msgPwdEmpty'));
msgError.html(I18N.i18nText('msgPwdEmpty'));
msgError.show();
}
else {
if (!ValidationUtil.CheckRequiredForText(getNewPassword())) {
isOK = false;
//alert(i18nText('msgPwdEmpty'));
//alert(I18N.i18nText('msgPwdEmpty'));
/* show error messages */
//$().toastmessage({ position: 'middle-center' });
// $().toastmessage('showToast', {
// type: 'error',
// sticky: true,
// text: i18nText('msgPwdEmpty')
// text: I18N.i18nText('msgPwdEmpty')
//});
msgError.html(i18nText('msgPwdEmpty'));
msgError.html(I18N.i18nText('msgPwdEmpty'));
msgError.show();
}
else {
if (getNewPassword() != getNewPasswordRe()) {
isOK = false;
//alert(i18nText('msgPwdNotMatch'));
//alert(I18N.i18nText('msgPwdNotMatch'));
/* show error messages */
//$().toastmessage({ position: 'middle-center' });
// $().toastmessage('showToast', {
// type: 'error',
// sticky: true,
// text: i18nText('msgPwdNotMatch')
// text: I18N.i18nText('msgPwdNotMatch')
// });
msgError.html(i18nText('msgPwdNotMatch'));
msgError.html(I18N.i18nText('msgPwdNotMatch'));
msgError.show();
}
......@@ -951,11 +936,11 @@ function avwCmsApi_passwordChange_success(data) {
//$().toastmessage('showToast', {
// type: 'error',
// sticky: true,
// text: i18nText('msgPwdChangeNG')
// text: I18N.i18nText('msgPwdChangeNG')
//});
//alert(i18nText('msgPwdOldWrong'));
//alert(I18N.i18nText('msgPwdOldWrong'));
msgError.html(i18nText('msgPwdChangeNG'));
msgError.html(I18N.i18nText('msgPwdChangeNG'));
msgError.show();
}
else {
......@@ -967,7 +952,7 @@ function avwCmsApi_passwordChange_success(data) {
$().toastmessage('showToast', {
type: 'success',
sticky: true,
text: i18nText('msgPwdChangeOK')
text: I18N.i18nText('msgPwdChangeOK')
});
}
}
......@@ -977,7 +962,7 @@ function avwCmsApi_passwordChange_fail(xhr, b, c) {
/* show error messages */
var msgError = $('#dialog-error-message');
//msgError.html(i18nText('msgPwdChangeNG'));
//msgError.html(I18N.i18nText('msgPwdChangeNG'));
msgError.html(JSON.parse(xhr.responseText).errorMessage);
msgError.show();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment