Commit 88d73f51 by Masaru Abe

グローバル変数リファクタリング

parent baee790f
......@@ -52,7 +52,7 @@
<!--新着メッセージがあります!!!-->
</div>
<div class="cnt_header">
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<a class="logo" href="javascript:void(0);" onclick="AVWEB.avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<div class="menu_language">
<div class="clearfix">
<ul class="floatL">
......
......@@ -276,10 +276,10 @@ UserSession.prototype.show = function(elmid) {
/*
* Variables
*/
var avwUserSessionObj = null;
var avwUserSettingObj = null;
var avwUserEnvObj = null;
var avwSysSettingObj = null;
AVWEB.avwUserSessionObj = null;
AVWEB.avwUserSettingObj = null;
//AVWEB.avwUserEnvObj = null;
AVWEB.avwSysSettingObj = null;
/* Initialize system */
$(function () {
......@@ -300,7 +300,7 @@ $(function () {
cache: false,
dataType: 'json',
success: function (data) {
avwSysSettingObj = data;
AVWEB.avwSysSettingObj = data;
},
error: function (xmlHttpRequest, txtStatus, errorThrown) {
var error = 'Could not load the system configuration file. Please check it.';
......@@ -310,48 +310,48 @@ $(function () {
});
// ロード時に一旦エラー状態をクリアしておく
avwClearError();
AVWEB.avwClearError();
});
/* get system setting object */
function avwSysSetting() {
return avwSysSettingObj;
AVWEB.avwSysSetting = function() {
return AVWEB.avwSysSettingObj;
};
/* get user environment object */
function avwUserEnv() {
if(avwUserEnvObj == null) {
avwUserEnvObj = new UserEnvironment();
}
return avwUserEnvObj;
};
///* get user environment object */
//function avwUserEnv() {
// if(AVWEB.avwUserEnvObj == null) {
// AVWEB.avwUserEnvObj = new UserEnvironment();
// }
// return AVWEB.avwUserEnvObj;
//};
/* get user session object */
function avwUserSession() {
if(!avwUserSessionObj) {
AVWEB.avwUserSession = function() {
if(!AVWEB.avwUserSessionObj) {
var obj = new UserSession();
obj.init('restore');
if(obj.available) {
avwUserSessionObj = obj;
return avwUserSessionObj;
AVWEB.avwUserSessionObj = obj;
return AVWEB.avwUserSessionObj;
} else {
return null;
}
}
return avwUserSessionObj;
return AVWEB.avwUserSessionObj;
};
/* create user session object */
function avwCreateUserSession() {
if(avwUserSessionObj) {
avwUserSessionObj.destroy();
AVWEB.avwCreateUserSession = function() {
if(AVWEB.avwUserSessionObj) {
AVWEB.avwUserSessionObj.destroy();
} else {
avwUserSessionObj = new UserSession();
avwUserSessionObj.init();
AVWEB.avwUserSessionObj = new UserSession();
AVWEB.avwUserSessionObj.init();
}
return avwUserSessionObj;
return AVWEB.avwUserSessionObj;
};
/* check Login or not */
function avwCheckLogin(option) {
var userSession = avwUserSession();
AVWEB.avwCheckLogin = function(option) {
var userSession = AVWEB.avwUserSession();
if(!userSession) {
/* エラー画面を表示 */
......@@ -383,7 +383,7 @@ function avwCheckLogin(option) {
if(option) {
returnPage = option
} else {
var sysSetting = avwSysSetting();
var sysSetting = AVWEB.avwSysSetting();
returnPage = sysSetting.loginPage;
}
/* ログイン画面に戻る */
......@@ -395,37 +395,37 @@ function avwCheckLogin(option) {
return true;
};
/* get user setting object */
function avwUserSetting() {
if(avwUserSettingObj == null) {
avwUserSettingObj = new UserSetting();
AVWEB.avwUserSetting = function() {
if(AVWEB.avwUserSettingObj == null) {
AVWEB.avwUserSettingObj = new UserSetting();
}
return avwUserSettingObj;
return AVWEB.avwUserSettingObj;
};
/* CMS API Call(async. call) */
function avwCmsApi(accountPath, apiName, type, params, success, error) {
//var sysSettings = avwSysSetting();
_callCmsApi(ClientData.conf_apiUrl(), accountPath, apiName, type, params, true, success, error);
AVWEB.avwCmsApi = function(accountPath, apiName, type, params, success, error) {
//var sysSettings = AVWEB.avwSysSetting();
AVWEB._callCmsApi(ClientData.conf_apiUrl(), accountPath, apiName, type, params, true, success, error);
};
/* CMS API Call(sync. call) */
function avwCmsApiSync(accountPath, apiName, type, params, success, error) {
//var sysSettings = avwSysSetting();
_callCmsApi(ClientData.conf_apiUrl(), accountPath, apiName, type, params, false, success, error);
AVWEB.avwCmsApiSync = function(accountPath, apiName, type, params, success, error) {
//var sysSettings = AVWEB.avwSysSetting();
AVWEB._callCmsApi(ClientData.conf_apiUrl(), accountPath, apiName, type, params, false, success, error);
};
/* CMS API Call(async. call) */
function avwCmsApiWithUrl(url, accountPath, apiName, type, params, success, error) {
_callCmsApi(url, accountPath, apiName, type, params, true, success, error);
AVWEB.avwCmsApiWithUrl = function(url, accountPath, apiName, type, params, success, error) {
AVWEB._callCmsApi(url, accountPath, apiName, type, params, true, success, error);
};
/* CMS API Call(sync. call) */
function avwCmsApiSyncWithUrl(url, accountPath, apiName, type, params, success, error) {
_callCmsApi(url, accountPath, apiName, type, params, false, success, error);
AVWEB.avwCmsApiSyncWithUrl = function(url, accountPath, apiName, type, params, success, error) {
AVWEB._callCmsApi(url, accountPath, apiName, type, params, false, success, error);
};
/* CMS API Call */
function _callCmsApi(url, accountPath, apiName, type, params, async, success, error) {
AVWEB._callCmsApi = function(url, accountPath, apiName, type, params, async, success, error) {
// アプリケーション設定取得
var sysSettings = avwSysSetting();
var sysSettings = AVWEB.avwSysSetting();
// url 構築
var apiUrl;
......@@ -472,7 +472,7 @@ function _callCmsApi(url, accountPath, apiName, type, params, async, success, er
if(error) {
error(xmlHttpRequest, txtStatus, errorThrown);
} else {
showSystemError();
AVWEB.showSystemError();
}
}
});
......@@ -554,10 +554,10 @@ var ImageDataScheme = function () {
* success: function(string: this is image binary encoded string)
* error: function(XMLHttpRequest, XMLHttpRequest.status, XMLHttpRequest.statusText)
*/
function avwGrabContentPageImage(accountPath, params, success, error) {
AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
// API実行準備
var sysSettings = avwSysSetting();
var sysSettings = AVWEB.avwSysSetting();
var apiName = 'webContentPageImage'; // API名
//url 構築
......@@ -592,7 +592,7 @@ function avwGrabContentPageImage(accountPath, params, success, error) {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
ie = true;
}catch(e){
showSystemError();
AVWEB.showSystemError();
return;
}
}
......@@ -658,10 +658,10 @@ function avwGrabContentPageImage(accountPath, params, success, error) {
* { name: 'formFile', fileName: 'filename', contentType: 'text-plain' }
* ]
*/
function avwUploadBackupFile(accountPath, params, async, success, error) {
AVWEB.avwUploadBackupFile = function(accountPath, params, async, success, error) {
/* API実行準備*/
var sysSettings = avwSysSetting();
var sysSettings = AVWEB.avwSysSetting();
var apiName = 'uploadBackupFile'; // API名
//url 構築
......@@ -735,20 +735,20 @@ function avwUploadBackupFile(accountPath, params, async, success, error) {
if(error) {
error(xmlHttpRequest, txtStatus, errorThrown);
} else {
showSystemError();
AVWEB.showSystemError();
}
}
});
};
/* show system error message */
function showSystemError() {
AVWEB.showSystemError = function() {
if(avwHasError()) {
if(AVWEB.avwHasError()) {
// すでにエラー状態であればエラーを表示しない
return;
} else {
// エラー状態にセット
avwSetErrorState();
AVWEB.avwSetErrorState();
}
// create DOM element for showing error message
......@@ -784,8 +784,8 @@ function showSystemError() {
if( !HEADER.webLogoutEvent() ){
//ログアウト出来なかった
SessionStorageUtils.clear();
avwUserSetting().remove(COMMON.Keys.userInfo_sid);
avwScreenMove(COMMON.ScreenIds.Login);
AVWEB.avwUserSetting().remove(COMMON.Keys.userInfo_sid);
AVWEB.avwScreenMove(COMMON.ScreenIds.Login);
}
}
});
......@@ -799,7 +799,7 @@ function showSystemError() {
*/
};
/* エラー状態を取得 */
function avwHasError() {
AVWEB.avwHasError = function() {
var session = window.sessionStorage;
var isError = false;
if(session) {
......@@ -808,21 +808,21 @@ function avwHasError() {
return (isError == 'true');
};
/* エラー状態にセット */
function avwSetErrorState() {
AVWEB.avwSetErrorState = function() {
var session = window.sessionStorage;
if(session) {
session.setItem(AVWEB.hasErrorKey, true);
}
};
/* エラー状態をクリア */
function avwClearError() {
AVWEB.avwClearError = function() {
var session = window.sessionStorage;
if(session) {
session.setItem(AVWEB.hasErrorKey, false);
}
};
/* ブラウザunload時に警告メッセージの出力設定を行う関数 */
function avwSetLogoutNortice() {
AVWEB.avwSetLogoutNortice = function() {
window.onbeforeunload = function(event) {
if( ClientData.isGetitsMode() == true ){
COMMON.SetEndLog(contentID);
......@@ -840,13 +840,13 @@ function avwSetLogoutNortice() {
};
};
/* 警告メッセージを出力しないでページ遷移を行う関数 */
function avwScreenMove(url) {
AVWEB.avwScreenMove = function(url) {
window.onbeforeunload = null;
window.location = url;
};
/* Debug Log */
function avwLog(msg) {
if(avwSysSetting().debug) {
AVWEB.avwLog = function(msg) {
if(AVWEB.avwSysSetting().debug) {
console.log(msg);
}
};
......@@ -870,7 +870,7 @@ AVWEB.getByte = function(text) {
AVWEB.getApiUrl = function(accountPath) {
// url 構築
//var sysSettings = avwSysSetting();
//var sysSettings = AVWEB.avwSysSetting();
var apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath);
......@@ -881,7 +881,7 @@ AVWEB.getApiUrl = function(accountPath) {
/* get url */
AVWEB.getURL = function(apiName) {
//var sysSettings = avwSysSetting();
//var sysSettings = AVWEB.avwSysSetting();
var url = ClientData.conf_apiResourceDlUrl(); //sysSettings.apiResourceDlUrl;
url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
return url;
......
......@@ -592,33 +592,33 @@ var ClientData = {
// Local :ユーザ情報(userInfo)_アカウントパス:String
userInfo_accountPath: function (data) {
if (arguments.length > 0) {
avwUserSetting().set(COMMON.Keys.userInfo_accountPath, data);
AVWEB.avwUserSetting().set(COMMON.Keys.userInfo_accountPath, data);
} else {
return avwUserSetting().get(COMMON.Keys.userInfo_accountPath);
return AVWEB.avwUserSetting().get(COMMON.Keys.userInfo_accountPath);
}
},
// Local: ユーザ情報(userInfo)_セッションID:String
userInfo_sid_local: function (data) {
if (arguments.length > 0) {
avwUserSetting().set(COMMON.Keys.userInfo_sid, data);
AVWEB.avwUserSetting().set(COMMON.Keys.userInfo_sid, data);
} else {
return avwUserSetting().get(COMMON.Keys.userInfo_sid);
return AVWEB.avwUserSetting().get(COMMON.Keys.userInfo_sid);
}
},
// Local :ユーザ情報(userInfo)_ログインID:String
userInfo_loginId: function (data) {
if (arguments.length > 0) {
avwUserSetting().set(COMMON.Keys.userInfo_loginId, data);
AVWEB.avwUserSetting().set(COMMON.Keys.userInfo_loginId, data);
} else {
return avwUserSetting().get(COMMON.Keys.userInfo_loginId);
return AVWEB.avwUserSetting().get(COMMON.Keys.userInfo_loginId);
}
},
// Local :ユーザ情報(userInfo)_アカウント情報記憶フラグ:Char(Y:可能, N:不可)
userInfo_rememberLogin: function (data) {
if (arguments.length > 0) {
avwUserSetting().set(COMMON.Keys.userInfo_rememberLogin, data);
AVWEB.avwUserSetting().set(COMMON.Keys.userInfo_rememberLogin, data);
} else {
return avwUserSetting().get(COMMON.Keys.userInfo_rememberLogin);
return AVWEB.avwUserSetting().get(COMMON.Keys.userInfo_rememberLogin);
}
},
......@@ -1139,10 +1139,10 @@ var ClientData = {
userInfo_sid: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(COMMON.Keys.userInfo_sid, data);
avwUserSetting().set(COMMON.Keys.userInfo_sid, data);
AVWEB.avwUserSetting().set(COMMON.Keys.userInfo_sid, data);
} else {
//return avwUserSetting().get(COMMON.Keys.userInfo_sid);
if (avwUserSession()) {
//return AVWEB.avwUserSetting().get(COMMON.Keys.userInfo_sid);
if (AVWEB.avwUserSession()) {
return SessionStorageUtils.get(COMMON.Keys.userInfo_sid);
}
return null;
......@@ -1664,11 +1664,11 @@ var LocalStorageUtils = {
getUniqueId: function () {
var uniqueId = "";
if (avwUserSetting().get(COMMON.Keys.userInfo_accountPath)) {
uniqueId += avwUserSetting().get(COMMON.Keys.userInfo_accountPath);
if (AVWEB.avwUserSetting().get(COMMON.Keys.userInfo_accountPath)) {
uniqueId += AVWEB.avwUserSetting().get(COMMON.Keys.userInfo_accountPath);
}
if (avwUserSetting().get(COMMON.Keys.userInfo_loginId)) {
uniqueId += "." + avwUserSetting().get(COMMON.Keys.userInfo_loginId);
if (AVWEB.avwUserSetting().get(COMMON.Keys.userInfo_loginId)) {
uniqueId += "." + AVWEB.avwUserSetting().get(COMMON.Keys.userInfo_loginId);
}
if (uniqueId != "") {
uniqueId += ".";
......@@ -1679,29 +1679,29 @@ var LocalStorageUtils = {
get: function (strKey) {
var key = this.getUniqueId() + strKey;
return avwUserSetting().get(key);
return AVWEB.avwUserSetting().get(key);
},
set: function (strKey, objValue) {
var key = this.getUniqueId() + strKey;
avwUserSetting().set(key, objValue);
AVWEB.avwUserSetting().set(key, objValue);
},
remove: function (strKey) {
var key = this.getUniqueId() + strKey;
avwUserSetting().remove(key);
AVWEB.avwUserSetting().remove(key);
SessionStorageUtils.remove(strKey);
},
clear: function () {
var localStorageKeys = avwUserSetting().keys();
var localStorageKeys = AVWEB.avwUserSetting().keys();
for (var nIndex = 0; nIndex < localStorageKeys.length; nIndex++) {
var strKey = localStorageKeys[nIndex];
if ((strKey + "").contains(this.getUniqueId())) {
avwUserSetting().remove(strKey);
AVWEB.avwUserSetting().remove(strKey);
}
}
},
existKey: function (strKey) {
var keys = avwUserSetting().keys();
var keys = AVWEB.avwUserSetting().keys();
var findKey = this.getUniqueId() + strKey;
var isExisted = false;
if (keys != null && keys != undefined) {
......@@ -1722,26 +1722,26 @@ var LocalStorageUtils = {
var SessionStorageUtils = {
login: function () {
if (avwUserSession()) {
if (AVWEB.avwUserSession()) {
// Skip this case
}
else {
avwCreateUserSession();
AVWEB.avwCreateUserSession();
}
},
get: function (strKey) {
return avwUserSession().get(strKey);
return AVWEB.avwUserSession().get(strKey);
},
set: function (strKey, objValue) {
avwUserSession().set(strKey, objValue);
AVWEB.avwUserSession().set(strKey, objValue);
},
clear: function () {
if (avwUserSession()) {
avwUserSession().destroy();
if (AVWEB.avwUserSession()) {
AVWEB.avwUserSession().destroy();
}
},
remove: function (strKey) {
avwUserSession().set(strKey, null);
AVWEB.avwUserSession().set(strKey, null);
}
};
/*
......@@ -2078,7 +2078,7 @@ COMMON.getTimeWaitLockScreen = function() {
var timeWaitLockScreen = -1;
if (ClientData.serviceOpt_web_screen_lock() == "Y")
{
var sysSettings = avwSysSetting();
var sysSettings = AVWEB.avwSysSetting();
if (isNaN(ClientData.serviceOpt_web_screen_lock_wait())) {
timeWaitLockScreen = sysSettings.screenlockTimeDefault * 60000;
}
......@@ -2099,7 +2099,7 @@ COMMON.getTimeWaitLockScreen = function() {
// Do locking screen after idle time
COMMON.LockScreen = function() {
if (avwUserSession()) {
if (AVWEB.avwUserSession()) {
// no lockscreen for user anonymous
if (COMMON.isAnonymousLogin()) {
......@@ -2129,7 +2129,7 @@ COMMON.LockScreen = function() {
$(function () {
// Init setting values
if (avwUserSession()) { // Logged
if (AVWEB.avwUserSession()) { // Logged
// View mode default
if (ClientData.sortOpt_viewMode() == null || ClientData.sortOpt_viewMode() == undefined) {
......@@ -2201,10 +2201,10 @@ COMMON.unlockFunction = function(inputPass) {
};
// Get url to login
//var sysSettings = avwSysSetting();
//var sysSettings = AVWEB.avwSysSetting();
var apiLoginUrl = ClientData.conf_apiLoginUrl(); //sysSettings.apiLoginUrl;
var errorCode = '';
avwCmsApiSyncWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params,
AVWEB.avwCmsApiSyncWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params,
function (data) {
if (data.result == 'success') {
ClientData.userInfo_sid(data.sid);
......@@ -2501,7 +2501,7 @@ COMMON.RegisterLog = function() {
};
//API送信結果判定
arrContentLogs[nIndex].sendResult = false;
avwCmsApiSync(ClientData.userInfo_accountPath(), "contentReadingLog", 'post', params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "contentReadingLog", 'post', params,
function (data) {
if (data.result == 'success') {
//成功したログは削除
......@@ -2518,12 +2518,12 @@ COMMON.RegisterLog = function() {
}
}
else {
showSystemError();
AVWEB.showSystemError();
}
}
);
};
if (avwHasError()) {
if (AVWEB.avwHasError()) {
return;
}
// Clear logs in local
......@@ -2812,7 +2812,7 @@ COMMON.ToogleLogoutNortice = function() {
window.onbeforeunload = null;
}
else {
avwSetLogoutNortice();
AVWEB.avwSetLogoutNortice();
}
};
......@@ -2845,7 +2845,7 @@ COMMON.getUUID = function() {
Check is anonymous user login
*/
COMMON.isAnonymousLogin = function() {
return avwSysSetting().anonymousLoginFlg;
return AVWEB.avwSysSetting().anonymousLoginFlg;
};
/* Check if current browser is IE9 */
......
......@@ -48,7 +48,7 @@
<!--新着メッセージがあります!!!-->
</div>
<div class="cnt_header">
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<a class="logo" href="javascript:void(0);" onclick="AVWEB.avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<div class="menu_language">
<div class="clearfix">
<ul class="floatL">
......
......@@ -50,7 +50,7 @@
<!--新着メッセージがあります!!!-->
</div>
<div class="cnt_header">
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<a class="logo" href="javascript:void(0);" onclick="AVWEB.avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<div class="menu_language">
<div class="clearfix">
<ul class="floatL">
......
......@@ -53,7 +53,7 @@
<!--新着メッセージがあります!!!-->
</div>
<div class="cnt_header">
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<a class="logo" href="javascript:void(0);" onclick="AVWEB.avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<div class="menu_language">
<div class="clearfix">
<ul class="floatL">
......
......@@ -112,10 +112,10 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
urlpath: ClientData.userInfo_accountPath()
};
// Get url to login
var sysSettings = avwSysSetting();
var sysSettings = AVWEB.avwSysSetting();
var apiLoginUrl = sysSettings.apiLoginUrl;
avwCmsApiSyncWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params,
AVWEB.avwCmsApiSyncWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params,
function (data) {
if (data.result == 'success') {
......
......@@ -7,7 +7,7 @@ var pathImgContentNone = './img/page-none.png';
// Init function of page
$(document).ready(function () {
if (!avwCheckLogin(COMMON.ScreenIds.Login)) return;
if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)) return;
COMMON.LockScreen();
......@@ -187,7 +187,7 @@ function dspRead_Click_callback(data) {
ClientData.bookmark_pageNo(data.pageNo);
ClientData.contentInfo_contentType(data.contentType);
ClientData.IsRefresh(false);
avwScreenMove(COMMON.ScreenIds.ContentView);
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
};
......@@ -255,7 +255,7 @@ function dspDelete_Click() {
// Show detail content
function ShowBookmark() {
if (avwHasError()) {
if (AVWEB.avwHasError()) {
return;
}
else {
......@@ -695,7 +695,7 @@ function bookmark_collectAllPages() {
var strPageNos = buildPageNos(collection_contents[nIndex].pages);
// Call api to get all details of pages 1 time
avwCmsApiSync(ClientData.userInfo_accountPath(), "webContentPage", "GET",
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webContentPage", "GET",
{ contentId: contentid, sid: ClientData.userInfo_sid(), pageNos: strPageNos, thumbnailFlg: 1 },
function (data) {
......@@ -848,9 +848,9 @@ function SyncContent() {
// If content is ok + checked
if (IsOKCheckedContent(oneBookMark.contentid) == false) {
if (!IsExistContent(oneBookMark.contentid)["isExisted"]) {
if (avwHasError()) {
if (AVWEB.avwHasError()) {
// System error excepting 404
showSystemError();
AVWEB.showSystemError();
return;
}
else {
......@@ -893,7 +893,7 @@ function IsExistContent(strContentId) {
getType: '1',
contentId: strContentId
};
avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
function (data) {
isExisted = true;
contentType = data.contentData.contentType;
......@@ -915,7 +915,7 @@ function IsExistContent(strContentId) {
else {
// Show system error
isExisted = true; // Mark this flag to prevent bookmarks from deleting
showSystemError();
AVWEB.showSystemError();
}
});
......
......@@ -24,7 +24,7 @@ CONTENTSEARCH.home_isMove = false;
$(document).ready(function(){
if (!avwCheckLogin(COMMON.ScreenIds.Login)){
if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)){
return;
}
......@@ -155,7 +155,7 @@ CONTENTSEARCH.mainSearchKeyDownFunction = function(e){
//Call API
CONTENTSEARCH.abapi = function(name, param, method, callback){
avwCmsApi(ClientData.userInfo_accountPath(), name, method, param, callback, null);
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(), name, method, param, callback, null);
};
//Initial screen
......@@ -826,7 +826,7 @@ CONTENTSEARCH.readSubmenuFunction_callback = function(contentId)
}
else{
//Go to Conten view page
avwScreenMove(COMMON.ScreenIds.ContentView);
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
}
//End Function : No.12 -- Editor : Le Long -- Date : 08/02/2013 -- Summary : Check content type other for download.
};
......@@ -1258,7 +1258,7 @@ CONTENTSEARCH.titleClickFunction = function(e){
//Get Number Disp Record For List
CONTENTSEARCH.returnNumberDispRecordForList = function() {
var toPage = 0;
var sysSettings = avwSysSetting();
var sysSettings = AVWEB.avwSysSetting();
toPage = sysSettings.bookListCount;
return toPage;
};
......
......@@ -1070,7 +1070,7 @@ function changePage(page_index) {
clearCanvas(document.getElementById("offscreen"));
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: page_index + 1 },
function (data) {
pageImages = data;
......@@ -2002,7 +2002,7 @@ function changePageWithoutSlide(pageMove) {
clearCanvas(document.getElementById("offscreen"));
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageMove + 1 },
function (data) {
pageImages = data;
......@@ -2663,13 +2663,13 @@ function setViewportForTouchDevice(maximumScale){
$("document").ready(function () {
/* check login */
if (!avwCheckLogin(COMMON.ScreenIds.Login)) return;
if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)) return;
// Set event to prevent leave
COMMON.ToogleLogoutNortice();
//START TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary : Fix Jumpcontent
getContentID();
avwCmsApi(ClientData.userInfo_accountPath(),
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
{ contentId: contentID, sid: ClientData.userInfo_sid(), getType: 1 },
......@@ -2730,7 +2730,7 @@ $("document").ready(function () {
}
else {
// Show system error
showSystemError();
AVWEB.showSystemError();
}
}
);
......
......@@ -7,12 +7,12 @@
//Call API
function abapi(name, param, method, callback) {
avwCmsApiSync(ClientData.userInfo_accountPath(), name, method, param, callback, null);
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), name, method, param, callback, null);
};
//START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
/* get Json stored content info */
function getJsonContentInfo() {
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) {
pageImages = data;
......@@ -33,7 +33,7 @@ function getJsonContentInfo() {
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
function webGetPageImageContentSize() {
avwCmsApi(ClientData.userInfo_accountPath(),
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPageSize",
"GET",
{ contentId: contentID, sid: ClientData.userInfo_sid() },
......@@ -46,7 +46,7 @@ function webGetPageImageContentSize() {
//START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
function webGetContentPageSize(){
avwCmsApi(ClientData.userInfo_accountPath(),
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
{ contentId: contentID, sid: ClientData.userInfo_sid(), getType: 6 },
......@@ -79,7 +79,7 @@ function getPageSizeByPageNo(pageNo){
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
function webGetContentData() {
avwCmsApi(ClientData.userInfo_accountPath(),
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
{ contentId: contentID, sid: ClientData.userInfo_sid(), getType: 1 },
......@@ -91,7 +91,7 @@ function webGetContentData() {
/* get Json stored page title */
function getJsonDataPageTitle() {
avwCmsApi(ClientData.userInfo_accountPath(),
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
{ contentId: contentID, sid: ClientData.userInfo_sid(), getType: 3 },
......@@ -112,7 +112,7 @@ function getJsonDataPageTitle() {
/* get Json webGetContent4 */
function getJsonDataType4() {
avwCmsApi(ClientData.userInfo_accountPath(),
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
{ contentId: contentID, sid: ClientData.userInfo_sid(), getType: 4 },
......@@ -124,7 +124,7 @@ function getJsonDataType4() {
/* get Json webGetContent5 */
function getJsonDataType5() {
avwCmsApi(ClientData.userInfo_accountPath(),
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
{ contentId: contentID, sid: ClientData.userInfo_sid(), getType: 5 },
......@@ -137,7 +137,7 @@ function getJsonDataType5() {
/* read file Json -> get page objects */
function getDataJsonFile() {
//get content from JSON
avwCmsApi(ClientData.userInfo_accountPath(),
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
{ sid: ClientData.userInfo_sid(), contentId: contentID, getType: 2 },
......@@ -208,7 +208,7 @@ function getDataJsonFile() {
function loadDataBookmark(lstPageNo) {
if (isSendingData == true) {
avwCmsApi(ClientData.userInfo_accountPath(),
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPage",
"GET",
{ sid: ClientData.userInfo_sid(), contentId: contentID, pageNos: lstPageNo[0], thumbnailFlg: 1 },
......@@ -262,7 +262,7 @@ function getSearchDataFromJson() {
arrPageNo += "," + (nIndex + 1);
}
}
avwCmsApi(ClientData.userInfo_accountPath(),
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPage",
"GET",
{ sid: ClientData.userInfo_sid(), contentId: contentID, thumbnailFlg: 0 },
......@@ -277,7 +277,7 @@ function getSearchDataFromJson() {
function loadDataSearch(lstPageNo) {
if (isSendingData == true) {
avwCmsApi(ClientData.userInfo_accountPath(),
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPage",
"GET",
{ sid: ClientData.userInfo_sid(), contentId: contentID, pageNos: lstPageNo[0], thumbnailFlg: 1 },
......
......@@ -1116,7 +1116,7 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
//COMMON.SetEndLog(contentID);
//COMMON.RegisterLog();
//START TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content
avwCmsApi(ClientData.userInfo_accountPath(),
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
{ contentId: contentId, sid: ClientData.userInfo_sid(), getType: 1 },
......@@ -1164,7 +1164,7 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
var dataJump = ClientData.JumpQueue();
dataJump.push(oldContent);
ClientData.JumpQueue(dataJump);
avwScreenMove(COMMON.ScreenIds.ContentView);
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
}
}
//Type 0
......@@ -1177,7 +1177,7 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
var dataJump = ClientData.JumpQueue();
dataJump.push(oldContent);
ClientData.JumpQueue(dataJump);
avwScreenMove(COMMON.ScreenIds.ContentView);
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
}
},
......@@ -1187,7 +1187,7 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
}
else {
// Show system error
showSystemError();
AVWEB.showSystemError();
}
}
);
......@@ -1248,7 +1248,7 @@ function createAlertTypeDialog(msg){
var dataJump = ClientData.JumpQueue();
dataJump.push(moveContentParam.oldContent);
ClientData.JumpQueue(dataJump);
avwScreenMove(COMMON.ScreenIds.ContentView);
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
});
};
......@@ -1296,10 +1296,10 @@ function createPwdRequiredTypeDialog(){
urlpath: ClientData.userInfo_accountPath()
};
// Get url to login
var sysSettings = avwSysSetting();
var sysSettings = AVWEB.avwSysSetting();
var apiLoginUrl = sysSettings.apiLoginUrl;
avwCmsApiSyncWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params,
AVWEB.avwCmsApiSyncWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params,
function (data) {
if (data.result == 'success') {
ClientData.common_preContentId(moveContentParam.preContentId);
......@@ -1314,7 +1314,7 @@ function createPwdRequiredTypeDialog(){
// update sid id
ClientData.userInfo_sid(data.sid);
avwScreenMove(COMMON.ScreenIds.ContentView);
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
}
else {
$('#lblMessageLimitError').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), data.errorMessage).toString()).show();
......
......@@ -366,7 +366,7 @@ function firstPage_click() {
clearCanvas(document.getElementById("offscreen"));
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) {
pageImages = data;
......@@ -439,7 +439,7 @@ function lastPage_click() {
//pageImages = getURLPageImage("webContentPageImage") + "?contentId=" + contentID + "&sid=" + ClientData.userInfo_sid() + "&pageNo=" + (totalPage - 1);
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage },
function (data) {
pageImages = data;
......@@ -1306,12 +1306,12 @@ function imgBack_click() {
if (ClientData.JumpQueue()) {
var oldDataBack = ClientData.JumpQueue();
if (oldDataBack.length > 0) {
avwScreenMove(COMMON.ScreenIds.ContentView);
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
ClientData.IsJumpBack(true);
} else {
/*check back */
if (ClientData.BookmarkScreen()) {
avwScreenMove(ClientData.BookmarkScreen());
AVWEB.avwScreenMove(ClientData.BookmarkScreen());
} else {
window.history.back();
}
......@@ -1319,7 +1319,7 @@ function imgBack_click() {
} else {
/*check back */
if (ClientData.BookmarkScreen()) {
avwScreenMove(ClientData.BookmarkScreen());
AVWEB.avwScreenMove(ClientData.BookmarkScreen());
} else {
window.history.back();
}
......@@ -1335,7 +1335,7 @@ function imgHome_click(e) {
COMMON.RegisterLog();
//window.location.href = COMMON.ScreenIds.Home;
avwScreenMove(COMMON.ScreenIds.Home);
AVWEB.avwScreenMove(COMMON.ScreenIds.Home);
};
function closePopUpCopyMemo() {
......
......@@ -2,7 +2,7 @@
//START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
/* get Json stored content info */
function getJsonContentInfo() {
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) {
pageImages = data;
......@@ -24,7 +24,7 @@ function getJsonContentInfo() {
///* get url */
//function getURL(apiName) {
// var sysSettings = avwSysSetting();
// var sysSettings = AVWEB.avwSysSetting();
// var url = sysSettings.apiResourceDlUrl;
// url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
// return url;
......@@ -32,7 +32,7 @@ function getJsonContentInfo() {
/* get url */
function getURLPageImage(apiName) {
//var sysSettings = avwSysSetting();
//var sysSettings = AVWEB.avwSysSetting();
//var url = sysSettings.apiUrl;
var url = ClientData.conf_apiUrl();
url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
......@@ -1231,7 +1231,7 @@ function renderNextPage(){
//Get next page background image
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
nextPageImage = data;
......@@ -1264,7 +1264,7 @@ function renderPrevPage(){
//Get prev page background image
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
prevPageImage = data;
......
......@@ -71,7 +71,7 @@ DETAIL.openContentDetail = function() {
DETAIL.displayData.contentThumbnail = ClientData.contentInfo_contentThumbnail();
// Get content detail
avwCmsApi(ClientData.userInfo_accountPath(), "webGetContent", "GET", { contentId: DETAIL.displayData.contentID, sid: ClientData.userInfo_sid(), getType: 1 },
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(), "webGetContent", "GET", { contentId: DETAIL.displayData.contentID, sid: ClientData.userInfo_sid(), getType: 1 },
function (data) {
var contentType = ClientData.contentInfo_contentType();
// Get content detail
......@@ -91,7 +91,7 @@ DETAIL.openContentDetail = function() {
}
else{
// Get pages
avwCmsApiSync(ClientData.userInfo_accountPath(), "webContentPage", "GET", { contentId: ClientData.contentInfo_contentId(), sid: ClientData.userInfo_sid(), thumbnailFlg: 1, pageNos: '1,2,3,4,5,6'},
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webContentPage", "GET", { contentId: ClientData.contentInfo_contentId(), sid: ClientData.userInfo_sid(), thumbnailFlg: 1, pageNos: '1,2,3,4,5,6'},
function (data) {
// Get pages
for (var nIndex = 0; nIndex < data.pages.length; nIndex++) {
......@@ -201,7 +201,7 @@ DETAIL.contentdetail_dspRead_Click_callback = function(outputId) {
HEADER.viewLinkContentById(ClientData.contentInfo_contentId());
}
else {
avwScreenMove(COMMON.ScreenIds.ContentView);
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
}
};
......
......@@ -8,10 +8,10 @@ HEADER.isHoverOn = false;
$(document).ready(function () {
if (!avwCheckLogin(COMMON.ScreenIds.Login)) return;
if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)) return;
// Set event to prevent leave
//avwSetLogoutNortice();
//AVWEB.avwSetLogoutNortice();
if (ClientData.requirePasswordChange() != 1) {
COMMON.ToogleLogoutNortice();
}
......@@ -264,12 +264,12 @@ HEADER.searchHeaderButtonFunction = function(){
ClientData.searchCond_searchText(searchText);
ClientData.searchCond_searchDivision(searchDivision);
//window.location = COMMON.ScreenIds.ContentSearch;
avwScreenMove(COMMON.ScreenIds.ContentSearch);
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentSearch);
};
HEADER.homeClickFunction = function(){
//window.location = COMMON.ScreenIds.Home;
avwScreenMove(COMMON.ScreenIds.Home);
AVWEB.avwScreenMove(COMMON.ScreenIds.Home);
};
//Change Language Japanese function
......@@ -314,13 +314,13 @@ HEADER.changeLanguageKo = function(){
//Shiori function
HEADER.bookmarkFunction = function(){
//window.location = COMMON.ScreenIds.BookmarkList;
avwScreenMove(COMMON.ScreenIds.BookmarkList);
AVWEB.avwScreenMove(COMMON.ScreenIds.BookmarkList);
};
//Update Config function
HEADER.updateConfigFunction = function(){
//window.location = COMMON.ScreenIds.Setting;
avwScreenMove(COMMON.ScreenIds.Setting);
AVWEB.avwScreenMove(COMMON.ScreenIds.Setting);
};
//Logout function
......@@ -418,7 +418,7 @@ HEADER.logoutFunction = function() {
HEADER.historyClickFunction = function(){
//window.location = COMMON.ScreenIds.History;
avwScreenMove(COMMON.ScreenIds.History);
AVWEB.avwScreenMove(COMMON.ScreenIds.History);
};
//Web Logout Event
......@@ -430,14 +430,14 @@ HEADER.webLogoutEvent = function(){
sid: ClientData.userInfo_sid()
};
avwCmsApiSync(ClientData.userInfo_accountPath(), "webLogout", "GET", params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webLogout", "GET", params,
function (data) {
isExisted = true;
SessionStorageUtils.clear();
avwUserSetting().remove(COMMON.Keys.userInfo_sid);
AVWEB.avwUserSetting().remove(COMMON.Keys.userInfo_sid);
// Move to login screen
//window.location = COMMON.ScreenIds.Login;
avwScreenMove(COMMON.ScreenIds.Login);
AVWEB.avwScreenMove(COMMON.ScreenIds.Login);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
if (xmlHttpRequest.status == 403) {
......@@ -520,7 +520,7 @@ HEADER.DoBackup = function(isBackupMarking, isBackupMemo, isBackupBookmark,isLog
// { name: 'deviceType', content: '4' },
// { name: 'formFile', content: JSON.stringify(buildBackupData()), fileName: 'webBackupData.json', contentType: 'text-plain' }
// ];
// avwUploadBackupFile(ClientData.userInfo_accountPath(), params, false,
// AVWEB.avwUploadBackupFile(ClientData.userInfo_accountPath(), params, false,
// function (data) {
// if (JSON.parse(data).result == "success") {
// ClientData.isChangedBookmark(false);
......@@ -684,7 +684,7 @@ HEADER.backupFile = function(data, file,type) {
//{name: 'fileType', content: type },
{ name: 'formFile', content: data, fileName: file, contentType: 'text-plain' }
];
avwUploadBackupFile(ClientData.userInfo_accountPath(), params, false,
AVWEB.avwUploadBackupFile(ClientData.userInfo_accountPath(), params, false,
function (data)
{
if (JSON.parse(data).result == "success")
......@@ -700,7 +700,7 @@ HEADER.sendSignalBackupStart = function(typeBackup)
{
var result = false;
var params = { "sid": ClientData.userInfo_sid(), "fileType": typeBackup };
avwCmsApiSync(ClientData.userInfo_accountPath(), "notifyBackupStart", "post", params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "notifyBackupStart", "post", params,
function (data) {
if (data.result == "success") {
result = true;
......@@ -715,7 +715,7 @@ HEADER.sendSignalBackupFinish = function(typeBackup)
{
var result = false;
var params = { "sid": ClientData.userInfo_sid(), "fileType": typeBackup };
avwCmsApiSync(ClientData.userInfo_accountPath(), "notifyBackupFinish", "post", params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "notifyBackupFinish", "post", params,
function (data) {
if (data.result == "success") {
result = true;
......@@ -763,7 +763,7 @@ HEADER.showErrorScreenForceChangePassword = function(){
$('#avw-unauth-ok').click(function() {
ClientData.BookmarkScreen(COMMON.ScreenIds.Setting);
avwScreenMove(COMMON.ScreenIds.Setting);
AVWEB.avwScreenMove(COMMON.ScreenIds.Setting);
});
};
......@@ -830,7 +830,7 @@ HEADER.initPushMessage = function()
// get time wait check new push message
HEADER.getTimeWaitCheckNewPushMessage = function()
{
return avwSysSetting().pushTimePeriod * 1000;// time unit is seconds
return AVWEB.avwSysSetting().pushTimePeriod * 1000;// time unit is seconds
};
// get message new
......@@ -838,7 +838,7 @@ HEADER.getPushMessageNew = function()
{
//$('.notification-pushmessage').hide();
var params = { "sid": ClientData.userInfo_sid()};
avwCmsApi(ClientData.userInfo_accountPath(), "webPushMessageNew", "post", params,
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(), "webPushMessageNew", "post", params,
HEADER.callbackGetPushMessageNewSuccess,
function (xhr, b, c) { });
};
......@@ -885,14 +885,14 @@ HEADER.callbackGetPushMessageNewSuccess = function(data) {
// get message
HEADER.getPushMessageList = function() {
var sysSettings = avwSysSetting();
var sysSettings = AVWEB.avwSysSetting();
var pushPageCount=sysSettings.pushPageCount;
var from = (HEADER.currentPagePushMessage - 1) * pushPageCount + 1;
var to = HEADER.currentPagePushMessage * pushPageCount;
var params = { "sid": ClientData.userInfo_sid(), "recordFrom": from, "recordTo": to };
avwCmsApiSync(ClientData.userInfo_accountPath(), "webPushMessageList", "post", params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webPushMessageList", "post", params,
function (data) {
// reset number message
......@@ -904,7 +904,7 @@ HEADER.getPushMessageList = function() {
HEADER.showListPushMessage(data);
},
function (xhr, b, c) {
showSystemError();
AVWEB.showSystemError();
});
};
......@@ -1058,7 +1058,7 @@ HEADER.downloadResourceById = function(contentId){
contentId: contentId,
getType: '2'
};
avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", "get", params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", "get", params,
function (data) {
//Get resourceurl
var resourceUrl = HEADER.getResourceByIdFromAPI(data.contentData.content.resourceId);
......@@ -1099,7 +1099,7 @@ HEADER.viewLinkContentById = function(contentId){
contentId: contentId,
getType: '2'
};
avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", "get", params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", "get", params,
function (data) {
//Get linkUrl
var linkUrl = data.contentData.content.url;
......
......@@ -26,7 +26,7 @@ HISTORY.history_contentTitleKana = [];
$(document).ready(function(){
if (!avwCheckLogin(COMMON.ScreenIds.Login)){
if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)){
return;
}
......@@ -116,7 +116,7 @@ $(document).ready(function(){
//Call API
//HISTORY.abapi = function(name, param, method, callback){
// avwCmsApiSync(ClientData.userInfo_accountPath(), name, method, param, callback, null);
// AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), name, method, param, callback, null);
//};
///Render Content
......@@ -133,7 +133,7 @@ HISTORY.renderContent = function(id, text, division, type, order, from, to, cate
groupId: grpid
};
avwCmsApiSync(ClientData.userInfo_accountPath(), 'webContentList', 'POST', params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), 'webContentList', 'POST', params,
function (data) {
$('#content-grid').html('');
......@@ -680,7 +680,7 @@ HISTORY.readSubmenuFunction_callback = function(contentId)
}
else{
//Go to Conten view page
avwScreenMove(COMMON.ScreenIds.ContentView);
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
}
//End Function : No.12 -- Editor : Le Long -- Date : 08/02/2013 -- Summary : Check content type other for download.
}
......@@ -1161,7 +1161,7 @@ HISTORY.syncReadingContent = function(){
resourceArr.splice(i, 1);
}
// Do not process next
if (avwHasError()) {
if (AVWEB.avwHasError()) {
return;
}
}
......@@ -1195,7 +1195,7 @@ HISTORY.IsExistContent = function(strContentId) {
getType: '1',
contentId: strContentId
};
avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
function (data) {
isExisted = true;
HISTORY.history_contentTitleKana.push({ contentId: strContentId, contentNameKana: data.contentData.contentNameKana });
......@@ -1207,7 +1207,7 @@ HISTORY.IsExistContent = function(strContentId) {
else {
// Show system error
isExisted = true; // Mark this flag to prevent bookmarks from deleting
showSystemError();
AVWEB.showSystemError();
}
});
return isExisted;
......@@ -1431,7 +1431,7 @@ HISTORY.returnContentTitleKana = function(id) {
// Get all pages of content
avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
function (data) {
// Success
titleKana = data.contentData.contentNameKana;
......
......@@ -42,7 +42,7 @@ HOME.group_totalcontent = -1;
//==========================================================
$(document).ready(function () {
if (!avwCheckLogin(COMMON.ScreenIds.Login)) {
if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)) {
return;
}
......@@ -296,7 +296,7 @@ HOME.getAddMemberGroupId = function(strGroupName) {
sid: ClientData.userInfo_sid(),
groupName: strGroupName
};
avwCmsApiSync(ClientData.userInfo_accountPath(), "addMemberGroup", 'POST', params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "addMemberGroup", 'POST', params,
// Success
function (data) {
if (data.groupIds) {
......@@ -595,7 +595,7 @@ HOME.canvasClickFunction_callback = function(outputId)
}
else{
//Go to Conten view page
avwScreenMove(COMMON.ScreenIds.ContentView);
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
}
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : check for download content type other.
......@@ -1131,7 +1131,7 @@ HOME.reRenderPageNumber = function(dispRecord, dispTotal) {
//Call API
HOME.abapi = function(name, param, method, callback) {
avwCmsApiSync(ClientData.userInfo_accountPath(), name, method, param, callback, null);
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), name, method, param, callback, null);
};
//Dialog Details Button Click
......@@ -1306,7 +1306,7 @@ HOME.readSubmenuFunction_callback = function(contentId)
}
else{
//Go to Conten view page
avwScreenMove(COMMON.ScreenIds.ContentView);
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
}
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
};
......@@ -2116,7 +2116,7 @@ HOME.handleSortDisp = function() {
//Get Number Disp Record For List
HOME.returnNumberDispRecordForBookShelf = function() {
var toPage = 0;
var sysSettings = avwSysSetting();
var sysSettings = AVWEB.avwSysSetting();
toPage = sysSettings.bookShelfCount;
return toPage;
};
......@@ -2124,7 +2124,7 @@ HOME.returnNumberDispRecordForBookShelf = function() {
//Get Number Disp Record For List
HOME.returnNumberDispRecordForList = function() {
var toPage = 0;
var sysSettings = avwSysSetting();
var sysSettings = AVWEB.avwSysSetting();
toPage = sysSettings.bookListCount;
return toPage;
};
......@@ -2182,7 +2182,7 @@ HOME.IsExistContent = function(strContentId) {
getType: '1',
contentId: strContentId
};
avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
function (data) {
isExisted = true;
},
......@@ -2193,7 +2193,7 @@ HOME.IsExistContent = function(strContentId) {
else {
// Show system error
isExisted = true; // Mark this flag to prevent bookmarks from deleting
showSystemError();
AVWEB.showSystemError();
}
});
return isExisted;
......@@ -2215,7 +2215,7 @@ HOME.syncReadingContent = function() {
resourceArr.splice(i, 1);
}
// Do not process next
if (avwHasError()) {
if (AVWEB.avwHasError()) {
return;
}
}
......@@ -2349,7 +2349,7 @@ HOME.SyncMemoPages = function() {
var webContentPage;
// Get all pages of content
avwCmsApiSync(ClientData.userInfo_accountPath(), "webContentPage", 'GET', params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webContentPage", 'GET', params,
function (data) {
// Success
if (data.pages) {
......@@ -2415,7 +2415,7 @@ HOME.SyncMarkingPages = function() {
var webContentPage;
// Get all pages of content
avwCmsApiSync(ClientData.userInfo_accountPath(), "webContentPage", 'GET', params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webContentPage", 'GET', params,
function (data) {
// Success
if (data.pages) {
......
......@@ -3,7 +3,7 @@
// Init function of page
$(document).ready(function () {
if (!avwCheckLogin(COMMON.ScreenIds.Login)) return;
if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)) return;
COMMON.ToogleLogoutNortice();
COMMON.LockScreen();
......@@ -49,7 +49,7 @@ $(document).ready(function () {
// Get flag to determine must change password
avwCmsApi(ClientData.userInfo_accountPath(), "requirePasswordChange", 'GET', { sid: ClientData.userInfo_sid() },
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(), "requirePasswordChange", 'GET', { sid: ClientData.userInfo_sid() },
avwCmsApi_requirePasswordChange_success,
null
);
......@@ -127,7 +127,7 @@ Check backup file exists or not
// var isExisted = false;
// var params = { sid: ClientData.userInfo_sid(), deviceType: '4', filename: "webBackupData.json" };
// // Get list of files
// avwCmsApiSync(ClientData.userInfo_accountPath(), "getBackupFile", "post", params,
// AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "getBackupFile", "post", params,
// function (data) {
// if (data) {
// isExisted = true;
......@@ -138,7 +138,7 @@ Check backup file exists or not
// isExisted = false;
// }
// else {
// showSystemError();
// AVWEB.showSystemError();
// }
// });
// return isExisted;
......@@ -152,7 +152,7 @@ function IsExistBackupFile(file,type) {
var isExisted = false;
var params = { "sid": ClientData.userInfo_sid(), "filename": file, fileType: type }; //, deviceType: '4'
// Get list of files
avwCmsApiSync(ClientData.userInfo_accountPath(), "getBackupFile", "post", params,
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "getBackupFile", "post", params,
function (data) {
if (data) {
isExisted = true;
......@@ -163,7 +163,7 @@ function IsExistBackupFile(file,type) {
isExisted = false;
}
else {
showSystemError();
AVWEB.showSystemError();
}
});
return isExisted;
......@@ -294,7 +294,7 @@ function dspOptBk_OK_Click(e) {
// { name: 'deviceType', content: '4' },
// { name: 'formFile', content: JSON.stringify(buildBackupData()), fileName: 'webBackupData.json', contentType: 'text-plain' }
// ];
// avwUploadBackupFile(ClientData.userInfo_accountPath(), params, false, avwCmsApi_uploadBackupFile_success,
// AVWEB.avwUploadBackupFile(ClientData.userInfo_accountPath(), params, false, avwCmsApi_uploadBackupFile_success,
// function (a, b, c) {
// // Show error message: msgBackupFailed
// $().toastmessage({ position: 'middle-center' });
......@@ -406,7 +406,7 @@ function dspOptRes_OK_Click(e) {
return;
// Get list of files
// avwCmsApi(ClientData.userInfo_accountPath(), "getBackupFile", "post",
// AVWEB.avwCmsApi(ClientData.userInfo_accountPath(), "getBackupFile", "post",
// { sid: ClientData.userInfo_sid(), deviceType: '4', filename: "webBackupData.json" },
// avwCmsApi_getBackupFile_success,
// function (xhr, b, c) {
......@@ -420,7 +420,7 @@ function dspOptRes_OK_Click(e) {
// });
// }
// else {
// showSystemError();
// AVWEB.showSystemError();
// }
// }
// );
......@@ -520,7 +520,7 @@ function dspOptRes_OK_Click(e) {
function restoreBookmarkData()
{
var result = false;
avwCmsApiSync(ClientData.userInfo_accountPath(), "getBackupFile", "post",
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "getBackupFile", "post",
{ sid: ClientData.userInfo_sid(), filename: "Bookmark.json" }, // deviceType: '4',
function (data) {
if (data) {
......@@ -541,7 +541,7 @@ function restoreBookmarkData()
*/
function restoreMemoData() {
var result = false;
avwCmsApiSync(ClientData.userInfo_accountPath(), "getBackupFile", "post",
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "getBackupFile", "post",
{ sid: ClientData.userInfo_sid(), filename: "ContentMemo.json" }, //deviceType: '4',
function (data) {
if (data) {
......@@ -563,7 +563,7 @@ function restoreMemoData() {
function restoreMarkingData()
{
var result = false;
avwCmsApiSync(ClientData.userInfo_accountPath(), "getBackupFile", "post",
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "getBackupFile", "post",
{ sid: ClientData.userInfo_sid(), filename: "Marking.json" }, // deviceType: '4',
function (data) {
if (data) {
......@@ -916,7 +916,7 @@ function dspPwdUpd1_Click(e) {
if (isOK) {
avwCmsApi(ClientData.userInfo_accountPath(), "passwordChange", "GET", params,
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(), "passwordChange", "GET", params,
avwCmsApi_passwordChange_success,
avwCmsApi_passwordChange_fail);
}
......@@ -967,7 +967,7 @@ function avwCmsApi_passwordChange_fail(xhr, b, c) {
msgError.show();
}
else {
showSystemError();
AVWEB.showSystemError();
}
};
......
......@@ -125,7 +125,7 @@ SHARE.sendContentShare = function() {
};
// Get content detail
avwCmsApi(ClientData.userInfo_accountPath(), "getReaderShareUrl", "POST", params,
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(), "getReaderShareUrl", "POST", params,
function (data) {
if( data.httpStatus == '200' ){
......@@ -193,7 +193,7 @@ SHARE.sendContentShare = function() {
$('#dlgContentShare_error').html(xhrData.loginErrorMessage);
}
else {
showSystemError();
AVWEB.showSystemError();
}
}
);
......
......@@ -65,7 +65,7 @@
<!--新着メッセージがあります!!!-->
</div>
<div class="cnt_header">
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<a class="logo" href="javascript:void(0);" onclick="AVWEB.avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<div class="menu_language">
<div class="clearfix">
<ul class="floatL">
......
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