Commit 822c73cc by Masaru Abe

#12996 getits対応

parent 271dff71
...@@ -7,6 +7,12 @@ ...@@ -7,6 +7,12 @@
/* /*
* User Environment Check Class * User Environment Check Class
*/ */
//グローバルの名前空間用のオブジェクトを用意する
var AVWEB = {};
AVWEB.hasErrorKey = 'AVW_HASERR';
var UserEnvironment = function() { var UserEnvironment = function() {
this.appName = navigator.appName; this.appName = navigator.appName;
...@@ -139,7 +145,7 @@ UserSetting.prototype.show = function(elmid) { ...@@ -139,7 +145,7 @@ UserSetting.prototype.show = function(elmid) {
if(value) { if(value) {
var js = JSON.parse(value); var js = JSON.parse(value);
$.each(js, function(k, v) { $.each(js, function(k, v) {
tags = tags + "<b>" + k + "</b>:" + v + "<br />"; tags = tags + "<b>" + k + "</b>:" + v + "<br />";
}); });
} }
tags = tags + "</p>"; tags = tags + "</p>";
...@@ -217,7 +223,7 @@ UserSession.prototype.set = function(key, value) { ...@@ -217,7 +223,7 @@ UserSession.prototype.set = function(key, value) {
if(storage) { if(storage) {
if(this.available == false) { if(this.available == false) {
if(key == "init") { if(key == "init") {
storage.setItem("AVWS_" + key, value); storage.setItem("AVWS_" + key, value);
} else { } else {
throw new Error("Session destoryed."); throw new Error("Session destoryed.");
} }
...@@ -230,9 +236,9 @@ UserSession.prototype.set = function(key, value) { ...@@ -230,9 +236,9 @@ UserSession.prototype.set = function(key, value) {
UserSession.prototype.get = function(key) { UserSession.prototype.get = function(key) {
var value = null; var value = null;
if(this.available) { if(this.available) {
value = this._get(key); value = this._get(key);
} else { } else {
throw new Error("Session Destroyed."); throw new Error("Session Destroyed.");
} }
return value; return value;
}; };
...@@ -241,9 +247,9 @@ UserSession.prototype._get = function(key) { ...@@ -241,9 +247,9 @@ UserSession.prototype._get = function(key) {
var storage = window.sessionStorage; var storage = window.sessionStorage;
var value = null; var value = null;
if(storage) { if(storage) {
value = storage.getItem("AVWS_" + key); value = storage.getItem("AVWS_" + key);
} }
return value; return value;
}; };
/* destroy user session */ /* destroy user session */
UserSession.prototype.destroy = function() { UserSession.prototype.destroy = function() {
...@@ -338,7 +344,7 @@ function avwCreateUserSession() { ...@@ -338,7 +344,7 @@ function avwCreateUserSession() {
if(avwUserSessionObj) { if(avwUserSessionObj) {
avwUserSessionObj.destroy(); avwUserSessionObj.destroy();
} else { } else {
avwUserSessionObj = new UserSession(); avwUserSessionObj = new UserSession();
avwUserSessionObj.init(); avwUserSessionObj.init();
} }
return avwUserSessionObj; return avwUserSessionObj;
...@@ -382,13 +388,13 @@ function avwCheckLogin(option) { ...@@ -382,13 +388,13 @@ function avwCheckLogin(option) {
} }
/* ログイン画面に戻る */ /* ログイン画面に戻る */
$('#avw-unauth-ok').click(function() { $('#avw-unauth-ok').click(function() {
window.location = returnPage; window.location = returnPage;
}); });
return false; return false;
} }
return true; return true;
}; };
/* get user setting object */ /* get user setting object */
function avwUserSetting() { function avwUserSetting() {
if(avwUserSettingObj == null) { if(avwUserSettingObj == null) {
avwUserSettingObj = new UserSetting(); avwUserSettingObj = new UserSetting();
...@@ -396,24 +402,15 @@ function avwUserSetting() { ...@@ -396,24 +402,15 @@ function avwUserSetting() {
return avwUserSettingObj; return avwUserSettingObj;
}; };
/* String.format function def. */
function format(fmt) {
for (var i = 1; i < arguments.length; i++) {
var reg = new RegExp("\\{" + (i - 1) + "\\}", "g");
fmt = fmt.replace(reg,arguments[i]);
}
return fmt;
};
/* CMS API Call(async. call) */ /* CMS API Call(async. call) */
function avwCmsApi(accountPath, apiName, type, params, success, error) { function avwCmsApi(accountPath, apiName, type, params, success, error) {
var sysSettings = avwSysSetting(); //var sysSettings = avwSysSetting();
_callCmsApi(sysSettings.apiUrl, accountPath, apiName, type, params, true, success, error); _callCmsApi(ClientData.conf_apiUrl(), accountPath, apiName, type, params, true, success, error);
}; };
/* CMS API Call(sync. call) */ /* CMS API Call(sync. call) */
function avwCmsApiSync(accountPath, apiName, type, params, success, error) { function avwCmsApiSync(accountPath, apiName, type, params, success, error) {
var sysSettings = avwSysSetting(); //var sysSettings = avwSysSetting();
_callCmsApi(sysSettings.apiUrl, accountPath, apiName, type, params, false, success, error); _callCmsApi(ClientData.conf_apiUrl(), accountPath, apiName, type, params, false, success, error);
}; };
/* CMS API Call(async. call) */ /* CMS API Call(async. call) */
function avwCmsApiWithUrl(url, accountPath, apiName, type, params, success, error) { function avwCmsApiWithUrl(url, accountPath, apiName, type, params, success, error) {
...@@ -433,12 +430,12 @@ function _callCmsApi(url, accountPath, apiName, type, params, async, success, er ...@@ -433,12 +430,12 @@ function _callCmsApi(url, accountPath, apiName, type, params, async, success, er
// url 構築 // url 構築
var apiUrl; var apiUrl;
if(!url) { if(!url) {
apiUrl = sysSettings.apiUrl; apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
} else { } else {
apiUrl = url; apiUrl = url;
} }
if(accountPath) { if(accountPath) {
apiUrl = format(apiUrl, accountPath) apiUrl = AVWEB.format(apiUrl, accountPath)
} }
apiUrl = apiUrl + '/' + apiName + '/'; apiUrl = apiUrl + '/' + apiName + '/';
...@@ -467,7 +464,7 @@ function _callCmsApi(url, accountPath, apiName, type, params, async, success, er ...@@ -467,7 +464,7 @@ function _callCmsApi(url, accountPath, apiName, type, params, async, success, er
}, },
success: function(data) { success: function(data) {
if(success) { if(success) {
success(data); success(data);
} }
}, },
error: function(xmlHttpRequest, txtStatus, errorThrown) { error: function(xmlHttpRequest, txtStatus, errorThrown) {
...@@ -565,9 +562,9 @@ function avwGrabContentPageImage(accountPath, params, success, error) { ...@@ -565,9 +562,9 @@ function avwGrabContentPageImage(accountPath, params, success, error) {
//url 構築 //url 構築
var apiUrl; var apiUrl;
apiUrl = sysSettings.apiUrl; apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) { if(accountPath) {
apiUrl = format(apiUrl, accountPath) apiUrl = AVWEB.format(apiUrl, accountPath)
} }
apiUrl = apiUrl + '/' + apiName + '/'; apiUrl = apiUrl + '/' + apiName + '/';
...@@ -669,9 +666,9 @@ function avwUploadBackupFile(accountPath, params, async, success, error) { ...@@ -669,9 +666,9 @@ function avwUploadBackupFile(accountPath, params, async, success, error) {
//url 構築 //url 構築
var apiUrl; var apiUrl;
apiUrl = sysSettings.apiUrl; apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) { if(accountPath) {
apiUrl = format(apiUrl, accountPath) apiUrl = AVWEB.format(apiUrl, accountPath)
} }
apiUrl = apiUrl + '/' + apiName + '/'; apiUrl = apiUrl + '/' + apiName + '/';
...@@ -726,11 +723,11 @@ function avwUploadBackupFile(accountPath, params, async, success, error) { ...@@ -726,11 +723,11 @@ function avwUploadBackupFile(accountPath, params, async, success, error) {
* uploadBackupFileは multipart/form-data でPOST送信する * uploadBackupFileは multipart/form-data でPOST送信する
*/ */
xhr.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + boundary); xhr.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + boundary);
//xhr.setRequestHeader('Content-Length', getByte(body)); //xhr.setRequestHeader('Content-Length', AVWEB.getByte(body));
}, },
success: function(data) { success: function(data) {
if(success) { if(success) {
success(data); success(data);
} }
}, },
error: function(xmlHttpRequest, txtStatus, errorThrown) { error: function(xmlHttpRequest, txtStatus, errorThrown) {
...@@ -743,22 +740,7 @@ function avwUploadBackupFile(accountPath, params, async, success, error) { ...@@ -743,22 +740,7 @@ function avwUploadBackupFile(accountPath, params, async, success, error) {
} }
}); });
}; };
/* get bytes of text */
function getByte(text) {
count = 0;
for (i=0; i<text.length; i++) {
n = escape(text.charAt(i));
if (n.length < 4) {
count++;
}
else {
count+=2;
}
}
return count;
};
/* show system error message */ /* show system error message */
var hasErrorKey = 'AVW_HASERR';
function showSystemError() { function showSystemError() {
if(avwHasError()) { if(avwHasError()) {
...@@ -799,7 +781,7 @@ function showSystemError() { ...@@ -799,7 +781,7 @@ function showSystemError() {
text: errMes, text: errMes,
close: function() { close: function() {
//ログアウト時と同じ後始末処理をしてログイン画面に戻す //ログアウト時と同じ後始末処理をしてログイン画面に戻す
if( !webLogoutEvent() ){ if( !HEADER.webLogoutEvent() ){
//ログアウト出来なかった //ログアウト出来なかった
SessionStorageUtils.clear(); SessionStorageUtils.clear();
avwUserSetting().remove(Keys.userInfo_sid); avwUserSetting().remove(Keys.userInfo_sid);
...@@ -821,7 +803,7 @@ function avwHasError() { ...@@ -821,7 +803,7 @@ function avwHasError() {
var session = window.sessionStorage; var session = window.sessionStorage;
var isError = false; var isError = false;
if(session) { if(session) {
isError = session.getItem(hasErrorKey); isError = session.getItem(AVWEB.hasErrorKey);
} }
return (isError == 'true'); return (isError == 'true');
}; };
...@@ -829,14 +811,14 @@ function avwHasError() { ...@@ -829,14 +811,14 @@ function avwHasError() {
function avwSetErrorState() { function avwSetErrorState() {
var session = window.sessionStorage; var session = window.sessionStorage;
if(session) { if(session) {
session.setItem(hasErrorKey, true); session.setItem(AVWEB.hasErrorKey, true);
} }
}; };
/* エラー状態をクリア */ /* エラー状態をクリア */
function avwClearError() { function avwClearError() {
var session = window.sessionStorage; var session = window.sessionStorage;
if(session) { if(session) {
session.setItem(hasErrorKey, false); session.setItem(AVWEB.hasErrorKey, false);
} }
}; };
/* ブラウザunload時に警告メッセージの出力設定を行う関数 */ /* ブラウザunload時に警告メッセージの出力設定を行う関数 */
...@@ -860,18 +842,52 @@ function avwScreenMove(url) { ...@@ -860,18 +842,52 @@ function avwScreenMove(url) {
/* Debug Log */ /* Debug Log */
function avwLog(msg) { function avwLog(msg) {
if(avwSysSetting().debug) { if(avwSysSetting().debug) {
console.log(msg); console.log(msg);
} }
}; };
function getApiUrl(accountPath) { /* get bytes of text */
AVWEB.getByte = function(text) {
var count = 0;
var n;
for(var i=0; i<text.length; i++) {
n = escape(text.charAt(i));
if (n.length < 4) {
count++;
}
else {
count+=2;
}
}
return count;
};
AVWEB.getApiUrl = function(accountPath) {
// url 構築 // url 構築
var sysSettings = avwSysSetting(); //var sysSettings = avwSysSetting();
var apiUrl = sysSettings.apiUrl; var apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) { if(accountPath) {
apiUrl = format(apiUrl, accountPath); apiUrl = AVWEB.format(apiUrl, accountPath);
} }
return apiUrl; return apiUrl;
}; };
\ No newline at end of file
/* get url */
AVWEB.getURL = function(apiName) {
//var sysSettings = avwSysSetting();
var url = ClientData.conf_apiResourceDlUrl(); //sysSettings.apiResourceDlUrl;
url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
return url;
};
/* String.format function def. */
AVWEB.format = function(fmt) {
for (var i = 1; i < arguments.length; i++) {
var reg = new RegExp("\\{" + (i - 1) + "\\}", "g");
fmt = fmt.replace(reg,arguments[i]);
}
return fmt;
};
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
/// <reference path="pageViewer.js" /> /// <reference path="pageViewer.js" />
/// <reference path="uuid.js" /> /// <reference path="uuid.js" />
//グローバルの名前空間用のオブジェクトを用意する
var COMMON = {};
// ============================================================================================= // =============================================================================================
// Constants [start] // Constants [start]
// ============================================================================================= // =============================================================================================
...@@ -322,7 +325,12 @@ var Keys = { ...@@ -322,7 +325,12 @@ var Keys = {
// Local :ユーザオプション(userOpt)_ビューのアニメーション種類:Interger // Local :ユーザオプション(userOpt)_ビューのアニメーション種類:Interger
userOpt_pageTransition: 'userOpt_pageTransition', userOpt_pageTransition: 'userOpt_pageTransition',
// Local :ユーザオプション(userOpt)_アニメーション時間:Float // Local :ユーザオプション(userOpt)_アニメーション時間:Float
userOpt_pageTransitionPeriod: 'userOpt_pageTransitionPeriod' userOpt_pageTransitionPeriod: 'userOpt_pageTransitionPeriod',
isGetitsMode: 'isGetitsMode',
conf_apiUrl: 'conf_apiUrl',
conf_apiLoginUrl: 'conf_apiLoginUrl',
conf_apiResourceDlUrl: 'conf_apiResourceDlUrl'
/* -------------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------------- */
...@@ -404,7 +412,7 @@ function ObjectLogEntity(){ ...@@ -404,7 +412,7 @@ function ObjectLogEntity(){
/* /*
* Extract memo data from result of API and merge with local memo * Extract memo data from result of API and merge with local memo
*/ */
function getDataMemo(jsonString) { COMMON.getDataMemo = function(jsonString) {
var memoDataFromServer = jsonString.data; var memoDataFromServer = jsonString.data;
var arrLocalMemo = ClientData.MemoData(); var arrLocalMemo = ClientData.MemoData();
...@@ -457,7 +465,7 @@ function getDataMemo(jsonString) { ...@@ -457,7 +465,7 @@ function getDataMemo(jsonString) {
/* /*
* Extract marking data from result of API and replace to local marking * Extract marking data from result of API and replace to local marking
*/ */
function getDataMarking(jsonString) { COMMON.getDataMarking = function(jsonString) {
var data = jsonString.data; var data = jsonString.data;
var arr = ClientData.MarkingData(); var arr = ClientData.MarkingData();
arr.clear(); arr.clear();
...@@ -483,7 +491,7 @@ function getDataMarking(jsonString) { ...@@ -483,7 +491,7 @@ function getDataMarking(jsonString) {
/* /*
* Extract bookmark data from result of API and replace to local bookmark * Extract bookmark data from result of API and replace to local bookmark
*/ */
function getDataBookmark(jsonString) { COMMON.getDataBookmark = function(jsonString) {
var data = jsonString.data; var data = jsonString.data;
var arr = ClientData.BookMarkData(); var arr = ClientData.BookMarkData();
arr.clear(); arr.clear();
...@@ -518,7 +526,7 @@ If has not param (args.length = 0) -> getter ...@@ -518,7 +526,7 @@ If has not param (args.length = 0) -> getter
otherwise, return default result. otherwise, return default result.
*/ */
function operateData(args, strKey, returnDefaultData) { COMMON.operateData = function(args, strKey, returnDefaultData) {
if (args.length > 0) { if (args.length > 0) {
var data = args[0]; var data = args[0];
...@@ -605,456 +613,456 @@ var ClientData = { ...@@ -605,456 +613,456 @@ var ClientData = {
// Local // Local
JumpQueue: function (data) { JumpQueue: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.JumpQueue, []); COMMON.operateData(arguments, Keys.JumpQueue, []);
} }
else { else {
return operateData(arguments, Keys.JumpQueue, []); return COMMON.operateData(arguments, Keys.JumpQueue, []);
} }
}, },
// Local // Local
ResourceVersion: function (data) { ResourceVersion: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.ResourceVersion, []); COMMON.operateData(arguments, Keys.ResourceVersion, []);
} }
else { else {
return operateData(arguments, Keys.ResourceVersion, []); return COMMON.operateData(arguments, Keys.ResourceVersion, []);
} }
}, },
// Local // Local
ContentViewDetail: function (data) { ContentViewDetail: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.ContentViewDetail, []); COMMON.operateData(arguments, Keys.ContentViewDetail, []);
} }
else { else {
return operateData(arguments, Keys.ContentViewDetail, []); return COMMON.operateData(arguments, Keys.ContentViewDetail, []);
} }
}, },
// Local // Local
MetaVersion: function (data) { MetaVersion: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.MetaVersion, []); COMMON.operateData(arguments, Keys.MetaVersion, []);
} }
else { else {
return operateData(arguments, Keys.MetaVersion, []); return COMMON.operateData(arguments, Keys.MetaVersion, []);
} }
}, },
// Local // Local
ReadingContentIds: function (data) { ReadingContentIds: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.ReadingContentIds, []); COMMON.operateData(arguments, Keys.ReadingContentIds, []);
} }
else { else {
return operateData(arguments, Keys.ReadingContentIds, []); return COMMON.operateData(arguments, Keys.ReadingContentIds, []);
} }
}, },
// Local: Bookmark collection // Local: Bookmark collection
BookMarkData: function (data) { BookMarkData: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.BookMarkData, []); COMMON.operateData(arguments, Keys.BookMarkData, []);
} }
else { else {
return operateData(arguments, Keys.BookMarkData, []); return COMMON.operateData(arguments, Keys.BookMarkData, []);
} }
}, },
// Local: Marking collection // Local: Marking collection
MarkingData: function (data) { MarkingData: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.MarkingData, []); COMMON.operateData(arguments, Keys.MarkingData, []);
} }
else { else {
return operateData(arguments, Keys.MarkingData, []); return COMMON.operateData(arguments, Keys.MarkingData, []);
} }
}, },
// Local: content log collection // Local: content log collection
ContentLogData: function (data) { ContentLogData: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.ContentLogData, []); COMMON.operateData(arguments, Keys.ContentLogData, []);
} }
else { else {
return operateData(arguments, Keys.ContentLogData, []); return COMMON.operateData(arguments, Keys.ContentLogData, []);
} }
}, },
// Local: Memo collection // Local: Memo collection
MemoData: function (data) { MemoData: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.MemoData, []); COMMON.operateData(arguments, Keys.MemoData, []);
} }
else { else {
return operateData(arguments, Keys.MemoData, []); return COMMON.operateData(arguments, Keys.MemoData, []);
} }
}, },
// Local // Local
IsJumpBack: function (data) { IsJumpBack: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.IsJumpBack, undefined); COMMON.operateData(arguments, Keys.IsJumpBack, undefined);
} }
else { else {
return operateData(arguments, Keys.IsJumpBack, undefined); return COMMON.operateData(arguments, Keys.IsJumpBack, undefined);
} }
}, },
// Local // Local
IsHideToolbar: function (data) { IsHideToolbar: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.IsHideToolbar, undefined); COMMON.operateData(arguments, Keys.IsHideToolbar, undefined);
} }
else { else {
return operateData(arguments, Keys.IsHideToolbar, undefined); return COMMON.operateData(arguments, Keys.IsHideToolbar, undefined);
} }
}, },
// Local // Local
IsAddingMarking: function (data) { IsAddingMarking: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.IsAddingMarking, undefined); COMMON.operateData(arguments, Keys.IsAddingMarking, undefined);
} }
else { else {
return operateData(arguments, Keys.IsAddingMarking, undefined); return COMMON.operateData(arguments, Keys.IsAddingMarking, undefined);
} }
}, },
// Local // Local
IsAddingMemo: function (data) { IsAddingMemo: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.IsAddingMemo, undefined); COMMON.operateData(arguments, Keys.IsAddingMemo, undefined);
} }
else { else {
return operateData(arguments, Keys.IsAddingMemo, undefined); return COMMON.operateData(arguments, Keys.IsAddingMemo, undefined);
} }
}, },
// Local // Local
IsDisplayMarking: function (data) { IsDisplayMarking: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.IsDisplayMarking, undefined); COMMON.operateData(arguments, Keys.IsDisplayMarking, undefined);
} }
else { else {
return operateData(arguments, Keys.IsDisplayMarking, undefined); return COMMON.operateData(arguments, Keys.IsDisplayMarking, undefined);
} }
}, },
// Local // Local
IsDisplayMemo: function (data) { IsDisplayMemo: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.IsDisplayMemo, undefined); COMMON.operateData(arguments, Keys.IsDisplayMemo, undefined);
} }
else { else {
return operateData(arguments, Keys.IsDisplayMemo, undefined); return COMMON.operateData(arguments, Keys.IsDisplayMemo, undefined);
} }
}, },
// Local // Local
MarkingType: function (data) { MarkingType: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.MarkingType, undefined); COMMON.operateData(arguments, Keys.MarkingType, undefined);
} }
else { else {
return operateData(arguments, Keys.MarkingType, undefined); return COMMON.operateData(arguments, Keys.MarkingType, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_ログアウトモード: Interger(0:logout with backup, 1:logout without backup) // Local :ユーザオプション(userOpt)_ログアウトモード: Interger(0:logout with backup, 1:logout without backup)
userOpt_logoutMode: function (data) { userOpt_logoutMode: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_logoutMode, undefined); COMMON.operateData(arguments, Keys.userOpt_logoutMode, undefined);
} }
else { else {
return operateData(arguments, Keys.userOpt_logoutMode, undefined); return COMMON.operateData(arguments, Keys.userOpt_logoutMode, undefined);
} }
}, },
// Local // Local
BookmarkScreen: function (data) { BookmarkScreen: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.BookmarkScreen, undefined); COMMON.operateData(arguments, Keys.BookmarkScreen, undefined);
} }
else { else {
return operateData(arguments, Keys.BookmarkScreen, undefined); return COMMON.operateData(arguments, Keys.BookmarkScreen, undefined);
} }
}, },
// Local: isChangedMemo: boolean (true: changed, false: not change) // Local: isChangedMemo: boolean (true: changed, false: not change)
isChangedMemo: function (data) { isChangedMemo: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.isChangedMemo, undefined); COMMON.operateData(arguments, Keys.isChangedMemo, undefined);
} }
else { else {
return operateData(arguments, Keys.isChangedMemo, undefined); return COMMON.operateData(arguments, Keys.isChangedMemo, undefined);
} }
}, },
// Local: isChangedMakingData: boolean (true: changed, false: not change) // Local: isChangedMakingData: boolean (true: changed, false: not change)
isChangedMarkingData: function (data) { isChangedMarkingData: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.isChangedMarkingData, undefined); COMMON.operateData(arguments, Keys.isChangedMarkingData, undefined);
} }
else { else {
return operateData(arguments, Keys.isChangedMarkingData, undefined); return COMMON.operateData(arguments, Keys.isChangedMarkingData, undefined);
} }
}, },
// Local: isChangedBookmark: boolean (true: changed, false: not change) // Local: isChangedBookmark: boolean (true: changed, false: not change)
isChangedBookmark: function (data) { isChangedBookmark: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.isChangedBookmark, undefined); COMMON.operateData(arguments, Keys.isChangedBookmark, undefined);
} }
else { else {
return operateData(arguments, Keys.isChangedBookmark, undefined); return COMMON.operateData(arguments, Keys.isChangedBookmark, undefined);
} }
}, },
// Local :共通(common)_コンテンツID:Integer // Local :共通(common)_コンテンツID:Integer
common_preContentId: function (data) { common_preContentId: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.common_preContentId, undefined); COMMON.operateData(arguments, Keys.common_preContentId, undefined);
} }
else { else {
return operateData(arguments, Keys.common_preContentId, undefined); return COMMON.operateData(arguments, Keys.common_preContentId, undefined);
} }
}, },
// Local :ページ情報データ(common)_ページNo:Integer // Local :ページ情報データ(common)_ページNo:Integer
common_prePageNo: function (data) { common_prePageNo: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.common_prePageNo, undefined); COMMON.operateData(arguments, Keys.common_prePageNo, undefined);
} }
else { else {
return operateData(arguments, Keys.common_prePageNo, undefined); return COMMON.operateData(arguments, Keys.common_prePageNo, undefined);
} }
}, },
// Local :ペン書式設定(penOpt)_色:String // Local :ペン書式設定(penOpt)_色:String
penOpt_color: function (data) { penOpt_color: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.penOpt_color, undefined); COMMON.operateData(arguments, Keys.penOpt_color, undefined);
} }
else { else {
return operateData(arguments, Keys.penOpt_color, undefined); return COMMON.operateData(arguments, Keys.penOpt_color, undefined);
} }
}, },
// Local :ペン書式設定(penOpt)_サイズ:Interger // Local :ペン書式設定(penOpt)_サイズ:Interger
penOpt_size: function (data) { penOpt_size: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.penOpt_size, undefined); COMMON.operateData(arguments, Keys.penOpt_size, undefined);
} }
else { else {
return operateData(arguments, Keys.penOpt_size, undefined); return COMMON.operateData(arguments, Keys.penOpt_size, undefined);
} }
}, },
// Local :マーカ書式設定(maker)_色:String // Local :マーカ書式設定(maker)_色:String
maker_color: function (data) { maker_color: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.maker_color, undefined); COMMON.operateData(arguments, Keys.maker_color, undefined);
} }
else { else {
return operateData(arguments, Keys.maker_color, undefined); return COMMON.operateData(arguments, Keys.maker_color, undefined);
} }
}, },
// Local :マーカ書式設定(maker)_サイズ:Interger // Local :マーカ書式設定(maker)_サイズ:Interger
maker_size: function (data) { maker_size: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.maker_size, undefined); COMMON.operateData(arguments, Keys.maker_size, undefined);
} }
else { else {
return operateData(arguments, Keys.maker_size, undefined); return COMMON.operateData(arguments, Keys.maker_size, undefined);
} }
}, },
// Local :消しゴム書式設定(erase)_色:String // Local :消しゴム書式設定(erase)_色:String
erase_color: function (data) { erase_color: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.erase_color, undefined); COMMON.operateData(arguments, Keys.erase_color, undefined);
} }
else { else {
return operateData(arguments, Keys.erase_color, undefined); return COMMON.operateData(arguments, Keys.erase_color, undefined);
} }
}, },
// Local :消しゴム書式設定(erase)_サイズ:Interger // Local :消しゴム書式設定(erase)_サイズ:Interger
erase_size: function (data) { erase_size: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.erase_size, undefined); COMMON.operateData(arguments, Keys.erase_size, undefined);
} }
else { else {
return operateData(arguments, Keys.erase_size, undefined); return COMMON.operateData(arguments, Keys.erase_size, undefined);
} }
}, },
// Local :ユーザ情報(userInfo)_最終ログイン日時:Datetime // Local :ユーザ情報(userInfo)_最終ログイン日時:Datetime
userInfo_lastLoginTime: function (data) { userInfo_lastLoginTime: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userInfo_lastLoginTime, undefined); COMMON.operateData(arguments, Keys.userInfo_lastLoginTime, undefined);
} }
else { else {
return operateData(arguments, Keys.userInfo_lastLoginTime, undefined); return COMMON.operateData(arguments, Keys.userInfo_lastLoginTime, undefined);
} }
}, },
// Local :ユーザ情報(userInfo)_パスワードスキップ日時:Datetime // Local :ユーザ情報(userInfo)_パスワードスキップ日時:Datetime
userInfo_pwdSkipDt: function (data) { userInfo_pwdSkipDt: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userInfo_pwdSkipDt, undefined); COMMON.operateData(arguments, Keys.userInfo_pwdSkipDt, undefined);
} }
else { else {
return operateData(arguments, Keys.userInfo_pwdSkipDt, undefined); return COMMON.operateData(arguments, Keys.userInfo_pwdSkipDt, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_動画繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり) // Local :ユーザオプション(userOpt)_動画繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり)
userOpt_videoMode: function (data) { userOpt_videoMode: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_videoMode, undefined); COMMON.operateData(arguments, Keys.userOpt_videoMode, undefined);
} }
else { else {
return operateData(arguments, Keys.userOpt_videoMode, undefined); return COMMON.operateData(arguments, Keys.userOpt_videoMode, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_音楽繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり) // Local :ユーザオプション(userOpt)_音楽繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり)
userOpt_musicMode: function (data) { userOpt_musicMode: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_musicMode, undefined); COMMON.operateData(arguments, Keys.userOpt_musicMode, undefined);
} }
else { else {
return operateData(arguments, Keys.userOpt_musicMode, undefined); return COMMON.operateData(arguments, Keys.userOpt_musicMode, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_マーキング表示設定:Interger(0:表示しない, 1:表示する) // Local :ユーザオプション(userOpt)_マーキング表示設定:Interger(0:表示しない, 1:表示する)
userOpt_makingDsp: function (data) { userOpt_makingDsp: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_makingDsp, undefined); COMMON.operateData(arguments, Keys.userOpt_makingDsp, undefined);
} }
else { else {
return operateData(arguments, Keys.userOpt_makingDsp, undefined); return COMMON.operateData(arguments, Keys.userOpt_makingDsp, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_アラート表示設定:Interger(0:表示しない, 1:表示する) // Local :ユーザオプション(userOpt)_アラート表示設定:Interger(0:表示しない, 1:表示する)
userOpt_closeOrRefreshAlert: function (data) { userOpt_closeOrRefreshAlert: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_closeOrRefreshAlert, undefined); COMMON.operateData(arguments, Keys.userOpt_closeOrRefreshAlert, undefined);
} }
else { else {
return operateData(arguments, Keys.userOpt_closeOrRefreshAlert, undefined); return COMMON.operateData(arguments, Keys.userOpt_closeOrRefreshAlert, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_バックアップ確認フラグ:Interger(0:する, 1:しない) // Local :ユーザオプション(userOpt)_バックアップ確認フラグ:Interger(0:する, 1:しない)
userOpt_bkConfirmFlg: function (data) { userOpt_bkConfirmFlg: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_bkConfirmFlg, undefined); COMMON.operateData(arguments, Keys.userOpt_bkConfirmFlg, undefined);
} }
else { else {
return operateData(arguments, Keys.userOpt_bkConfirmFlg, undefined); return COMMON.operateData(arguments, Keys.userOpt_bkConfirmFlg, undefined);
} }
}, },
// Local :並び順(sortOpt)_表示モード:Interger(0:本棚, 1:リスト) // Local :並び順(sortOpt)_表示モード:Interger(0:本棚, 1:リスト)
sortOpt_viewMode: function (data) { sortOpt_viewMode: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.sortOpt_viewMode, undefined); COMMON.operateData(arguments, Keys.sortOpt_viewMode, undefined);
} }
else { else {
return operateData(arguments, Keys.sortOpt_viewMode, undefined); return COMMON.operateData(arguments, Keys.sortOpt_viewMode, undefined);
} }
}, },
// Local :並び順(sortOpt)_表示区分:Interger(0:ジャンル, 1:グループ) // Local :並び順(sortOpt)_表示区分:Interger(0:ジャンル, 1:グループ)
sortOpt_viewType: function (data) { sortOpt_viewType: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.sortOpt_viewType, undefined); COMMON.operateData(arguments, Keys.sortOpt_viewType, undefined);
} }
else { else {
return operateData(arguments, Keys.sortOpt_viewType, undefined); return COMMON.operateData(arguments, Keys.sortOpt_viewType, undefined);
} }
}, },
// Local :並び順(sortOpt)_ソート基準:Interger(1:コンテンツ検索, 2:タグ検索, 3:全文検索) // Local :並び順(sortOpt)_ソート基準:Interger(1:コンテンツ検索, 2:タグ検索, 3:全文検索)
sortOpt_searchDivision: function (data) { sortOpt_searchDivision: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.sortOpt_searchDivision, undefined); COMMON.operateData(arguments, Keys.sortOpt_searchDivision, undefined);
} }
else { else {
return operateData(arguments, Keys.sortOpt_searchDivision, undefined); return COMMON.operateData(arguments, Keys.sortOpt_searchDivision, undefined);
} }
}, },
// Local: 並び順(sortOpt)_ソート方法:Interger(1:タイトル名, 2:タイトル名(かな), 3:公開順) // Local: 並び順(sortOpt)_ソート方法:Interger(1:タイトル名, 2:タイトル名(かな), 3:公開順)
sortOpt_sortType: function (data) { sortOpt_sortType: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.sortOpt_sortType, undefined); COMMON.operateData(arguments, Keys.sortOpt_sortType, undefined);
} }
else { else {
return operateData(arguments, Keys.sortOpt_sortType, undefined); return COMMON.operateData(arguments, Keys.sortOpt_sortType, undefined);
} }
}, },
// Local :しおりデータ(bookmark)_ページNo:Interger // Local :しおりデータ(bookmark)_ページNo:Interger
bookmark_pageNo: function (data) { bookmark_pageNo: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.bookmark_pageNo, undefined); COMMON.operateData(arguments, Keys.bookmark_pageNo, undefined);
} }
else { else {
return operateData(arguments, Keys.bookmark_pageNo, undefined); return COMMON.operateData(arguments, Keys.bookmark_pageNo, undefined);
} }
}, },
// Local :メモデータ(memo)_コンテンツID:Interger // Local :メモデータ(memo)_コンテンツID:Interger
memo_contentNo: function (data) { memo_contentNo: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.memo_contentNo, undefined); COMMON.operateData(arguments, Keys.memo_contentNo, undefined);
} }
else { else {
return operateData(arguments, Keys.memo_contentNo, undefined); return COMMON.operateData(arguments, Keys.memo_contentNo, undefined);
} }
}, },
// Local :メモデータ(memo)_ページNo:Interger // Local :メモデータ(memo)_ページNo:Interger
memo_pageNo: function (data) { memo_pageNo: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.memo_pageNo, undefined); COMMON.operateData(arguments, Keys.memo_pageNo, undefined);
} }
else { else {
return operateData(arguments, Keys.memo_pageNo, undefined); return COMMON.operateData(arguments, Keys.memo_pageNo, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_バックアップデフォルト_マーキング:Interger // Local :ユーザオプション(userOpt)_バックアップデフォルト_マーキング:Interger
userOpt_bkMakingFlag: function (data) { userOpt_bkMakingFlag: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_bkMakingFlag, undefined); COMMON.operateData(arguments, Keys.userOpt_bkMakingFlag, undefined);
} }
else { else {
return operateData(arguments, Keys.userOpt_bkMakingFlag, undefined); return COMMON.operateData(arguments, Keys.userOpt_bkMakingFlag, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_バックアップデフォルト_メモ:Interger // Local :ユーザオプション(userOpt)_バックアップデフォルト_メモ:Interger
userOpt_bkMemoFlag: function (data) { userOpt_bkMemoFlag: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_bkMemoFlag, undefined); COMMON.operateData(arguments, Keys.userOpt_bkMemoFlag, undefined);
} }
else { else {
return operateData(arguments, Keys.userOpt_bkMemoFlag, undefined); return COMMON.operateData(arguments, Keys.userOpt_bkMemoFlag, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_バックアップデフォルト_しおり:Interger // Local :ユーザオプション(userOpt)_バックアップデフォルト_しおり:Interger
userOpt_bkShioriFlag: function (data) { userOpt_bkShioriFlag: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_bkShioriFlag, undefined); COMMON.operateData(arguments, Keys.userOpt_bkShioriFlag, undefined);
} }
else { else {
return operateData(arguments, Keys.userOpt_bkShioriFlag, undefined); return COMMON.operateData(arguments, Keys.userOpt_bkShioriFlag, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_ビューのアニメーション種類:Interger // Local :ユーザオプション(userOpt)_ビューのアニメーション種類:Interger
userOpt_pageTransition: function (data) { userOpt_pageTransition: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_pageTransition, undefined); COMMON.operateData(arguments, Keys.userOpt_pageTransition, undefined);
} }
else { else {
return operateData(arguments, Keys.userOpt_pageTransition, undefined); return COMMON.operateData(arguments, Keys.userOpt_pageTransition, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_アニメーション時間:Float // Local :ユーザオプション(userOpt)_アニメーション時間:Float
userOpt_pageTransitionPeriod: function (data) { userOpt_pageTransitionPeriod: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_pageTransitionPeriod, undefined); COMMON.operateData(arguments, Keys.userOpt_pageTransitionPeriod, undefined);
} }
else { else {
return operateData(arguments, Keys.userOpt_pageTransitionPeriod, undefined); return COMMON.operateData(arguments, Keys.userOpt_pageTransitionPeriod, undefined);
} }
}, },
...@@ -1560,7 +1568,38 @@ var ClientData = { ...@@ -1560,7 +1568,38 @@ var ClientData = {
} else { } else {
return SessionStorageUtils.get(Keys.serviceOpt_web_screen_lock_wait); return SessionStorageUtils.get(Keys.serviceOpt_web_screen_lock_wait);
} }
},
isGetitsMode: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(Keys.isGetitsMode, data);
} else {
return SessionStorageUtils.get(Keys.isGetitsMode);
}
},
conf_apiUrl: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(Keys.conf_apiUrl, data);
} else {
return SessionStorageUtils.get(Keys.conf_apiUrl);
}
},
conf_apiLoginUrl: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(Keys.conf_apiLoginUrl, data);
} else {
return SessionStorageUtils.get(Keys.conf_apiLoginUrl);
}
},
conf_apiResourceDlUrl: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(Keys.conf_apiResourceDlUrl, data);
} else {
return SessionStorageUtils.get(Keys.conf_apiResourceDlUrl);
}
} }
}; };
// ------------------------------------------------- // -------------------------------------------------
...@@ -1843,7 +1882,7 @@ Array.prototype.clear = function () { ...@@ -1843,7 +1882,7 @@ Array.prototype.clear = function () {
Remove extension of specified name Remove extension of specified name
Ex: aaaa.mp3 -> aaa Ex: aaaa.mp3 -> aaa
*/ */
function removeExt(strName) { COMMON.removeExt = function(strName) {
if (strName) { if (strName) {
var arrString = strName.split('.'); var arrString = strName.split('.');
var strResult = ""; var strResult = "";
...@@ -1983,12 +2022,12 @@ var ValidationUtil = { ...@@ -1983,12 +2022,12 @@ var ValidationUtil = {
}; };
// Get format based64 string to show inline // Get format based64 string to show inline
function getBase64Image(imgSource) { COMMON.getBase64Image = function(imgSource) {
return imgSource.replace(/^data:image\/(png|jpg);base64,/, ""); return imgSource.replace(/^data:image\/(png|jpg);base64,/, "");
}; };
// get time wait lockscreen // get time wait lockscreen
function getTimeWaitLockScreen() { COMMON.getTimeWaitLockScreen = function() {
var timeWaitLockScreen = -1; var timeWaitLockScreen = -1;
if (ClientData.serviceOpt_web_screen_lock() == "Y") if (ClientData.serviceOpt_web_screen_lock() == "Y")
{ {
...@@ -2012,34 +2051,24 @@ function getTimeWaitLockScreen() { ...@@ -2012,34 +2051,24 @@ function getTimeWaitLockScreen() {
}; };
// Do locking screen after idle time // Do locking screen after idle time
function LockScreen() { COMMON.LockScreen = function() {
if (avwUserSession()) { if (avwUserSession()) {
// no lockscreen for user anonymous // no lockscreen for user anonymous
if (isAnonymousLogin()) { if (COMMON.isAnonymousLogin()) {
return; return;
} }
var timeWaitLockScreen = getTimeWaitLockScreen(); var timeWaitLockScreen = COMMON.getTimeWaitLockScreen();
if (timeWaitLockScreen > 0) { if (timeWaitLockScreen > 0) {
//var message = i18nText("sysInfoScrLock01"); //var message = i18nText("sysInfoScrLock01");
screenLock({ screenLock({
timeout: timeWaitLockScreen, timeout: timeWaitLockScreen,
html: '<img src="img/1222.png" alt="Screen Lock" /><br />', //+ message, html: '<img src="img/1222.png" alt="Screen Lock" /><br />', //+ message,
unlockFunc: unlockFunction, unlockFunc: COMMON.unlockFunction,
errorMessage: i18nText('msgLoginErrWrong') errorMessage: i18nText('msgLoginErrWrong')
}); });
} }
// if (ClientData.serviceOpt_force_login_periodically() == "Y") {
// //var message = i18nText("sysInfoScrLock01");
// screenLock({
// timeout: Consts.ConstLockScreenTime,
// html: '<img src="img/1222.png" alt="Screen Lock" /><br />', //+ message,
// unlockFunc: unlockFunction,
// errorMessage: i18nText('msgLoginErrWrong')
// });
// }
} }
}; };
...@@ -2109,7 +2138,7 @@ $(function () { ...@@ -2109,7 +2138,7 @@ $(function () {
}); });
// Unlock the locked screen by inputing password on screen to check authentication // Unlock the locked screen by inputing password on screen to check authentication
function unlockFunction(inputPass) { COMMON.unlockFunction = function(inputPass) {
var forceUnlockFunc = arguments[1]; // added secret arguments : forceUnlockFunction var forceUnlockFunc = arguments[1]; // added secret arguments : forceUnlockFunction
var result = false; var result = false;
var params = { var params = {
...@@ -2120,8 +2149,8 @@ function unlockFunction(inputPass) { ...@@ -2120,8 +2149,8 @@ function unlockFunction(inputPass) {
}; };
// Get url to login // Get url to login
var sysSettings = avwSysSetting(); //var sysSettings = avwSysSetting();
var apiLoginUrl = sysSettings.apiLoginUrl; var apiLoginUrl = ClientData.conf_apiLoginUrl(); //sysSettings.apiLoginUrl;
var errorCode = ''; var errorCode = '';
avwCmsApiSyncWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params, avwCmsApiSyncWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params,
function (data) { function (data) {
...@@ -2159,7 +2188,7 @@ function unlockFunction(inputPass) { ...@@ -2159,7 +2188,7 @@ function unlockFunction(inputPass) {
onUnlock(); onUnlock();
} }
} }
return { 'result': result, 'errorCode': errorCode, 'newTimeout': getTimeWaitLockScreen() }; return { 'result': result, 'errorCode': errorCode, 'newTimeout': COMMON.getTimeWaitLockScreen() };
}; };
...@@ -2167,7 +2196,7 @@ function unlockFunction(inputPass) { ...@@ -2167,7 +2196,7 @@ function unlockFunction(inputPass) {
/* /*
Set starting log for reading content Set starting log for reading content
*/ */
function SetStartLog(strContentId) { COMMON.SetStartLog = function(strContentId) {
//abe pageLogもセット //abe pageLogもセット
...@@ -2213,7 +2242,7 @@ function SetStartLog(strContentId) { ...@@ -2213,7 +2242,7 @@ function SetStartLog(strContentId) {
}; };
// Set ending log for reading content // Set ending log for reading content
function SetEndLog(strContentId) { COMMON.SetEndLog = function(strContentId) {
//abe pageLogもセット //abe pageLogもセット
...@@ -2236,7 +2265,7 @@ function SetEndLog(strContentId) { ...@@ -2236,7 +2265,7 @@ function SetEndLog(strContentId) {
}; };
// 1ページ分のページ閲覧ログを作成 // 1ページ分のページ閲覧ログを作成
function SetPageLog( strContentId, strPageNo ){ COMMON.SetPageLog = function( strContentId, strPageNo ){
var arrContentLogs = ClientData.ContentLogData(); var arrContentLogs = ClientData.ContentLogData();
...@@ -2256,7 +2285,7 @@ function SetPageLog( strContentId, strPageNo ){ ...@@ -2256,7 +2285,7 @@ function SetPageLog( strContentId, strPageNo ){
} }
// 1アクションのオブジェクトログを作成 // 1アクションのオブジェクトログを作成
function SetObjectLog( strContentId, objectLog ){ COMMON.SetObjectLog = function( strContentId, objectLog ){
var arrContentLogs = ClientData.ContentLogData(); var arrContentLogs = ClientData.ContentLogData();
...@@ -2272,7 +2301,7 @@ function SetObjectLog( strContentId, objectLog ){ ...@@ -2272,7 +2301,7 @@ function SetObjectLog( strContentId, objectLog ){
} }
// 前回の1アクションのオブジェクトログの利用時間を設定 // 前回の1アクションのオブジェクトログの利用時間を設定
function SetObjectLogActionTime( strContentId, objectId, actionTime ){ COMMON.SetObjectLogActionTime = function( strContentId, objectId, actionTime ){
var arrContentLogs = ClientData.ContentLogData(); var arrContentLogs = ClientData.ContentLogData();
...@@ -2293,7 +2322,7 @@ function SetObjectLogActionTime( strContentId, objectId, actionTime ){ ...@@ -2293,7 +2322,7 @@ function SetObjectLogActionTime( strContentId, objectId, actionTime ){
/* /*
Register reading log of content to server by calling api Register reading log of content to server by calling api
*/ */
function RegisterLog() { COMMON.RegisterLog = function() {
var arrContentLogs = ClientData.ContentLogData(); var arrContentLogs = ClientData.ContentLogData();
var isError = false; var isError = false;
...@@ -2463,8 +2492,7 @@ function RegisterLog() { ...@@ -2463,8 +2492,7 @@ function RegisterLog() {
// Disable specified objects // Disable specified objects
function disable() { COMMON.disable = function() {
for (var nIndex = 0; nIndex < arguments.length; nIndex++) { for (var nIndex = 0; nIndex < arguments.length; nIndex++) {
if($(arguments[nIndex])) { if($(arguments[nIndex])) {
$(arguments[nIndex]).attr('disabled', 'disabled'); $(arguments[nIndex]).attr('disabled', 'disabled');
...@@ -2472,8 +2500,7 @@ function disable() { ...@@ -2472,8 +2500,7 @@ function disable() {
} }
}; };
// Enable specified objects // Enable specified objects
function enable() { COMMON.enable = function() {
for (var nIndex = 0; nIndex < arguments.length; nIndex++) { for (var nIndex = 0; nIndex < arguments.length; nIndex++) {
if($(arguments[nIndex])) { if($(arguments[nIndex])) {
$(arguments[nIndex]).removeAttr('disabled'); $(arguments[nIndex]).removeAttr('disabled');
...@@ -2482,12 +2509,12 @@ function enable() { ...@@ -2482,12 +2509,12 @@ function enable() {
}; };
// Stop waiting screen // Stop waiting screen
function StopWaitProcess() { COMMON.StopWaitProcess = function() {
$('#avw-sys-modal-wait').hide(); $('#avw-sys-modal-wait').hide();
}; };
// Show waiting screen // Show waiting screen
function WaitProcess() { COMMON.WaitProcess = function() {
if (document.getElementById('avw-sys-modal-wait')) { if (document.getElementById('avw-sys-modal-wait')) {
$('#avw-sys-modal-wait').show(); $('#avw-sys-modal-wait').show();
} }
...@@ -2519,12 +2546,12 @@ function WaitProcess() { ...@@ -2519,12 +2546,12 @@ function WaitProcess() {
}; };
// Hide the locking layout // Hide the locking layout
function unlockLayout() { COMMON.unlockLayout = function() {
$('#avw-sys-modal').hide(); $('#avw-sys-modal').hide();
}; };
// Show the locking layout // Show the locking layout
function lockLayout() { COMMON.lockLayout = function() {
if (document.getElementById('avw-sys-modal')) { if (document.getElementById('avw-sys-modal')) {
$('#avw-sys-modal').show(); $('#avw-sys-modal').show();
} }
...@@ -2593,7 +2620,7 @@ String.prototype.replaceAll = function (oldText, newText) { ...@@ -2593,7 +2620,7 @@ String.prototype.replaceAll = function (oldText, newText) {
/* /*
Get string by number of lines Get string by number of lines
*/ */
function getLines(source, number) { COMMON.getLines = function(source, number) {
var result = ""; var result = "";
var arrSource = new Array(); var arrSource = new Array();
arrSource = source.split('\n'); arrSource = source.split('\n');
...@@ -2613,7 +2640,7 @@ function getLines(source, number) { ...@@ -2613,7 +2640,7 @@ function getLines(source, number) {
/* /*
Convert yyyy-MM-dd hh:mm:ss.f to Date Convert yyyy-MM-dd hh:mm:ss.f to Date
*/ */
function convertToDate(input) { COMMON.convertToDate = function(input) {
var dateResult; var dateResult;
var nYear = 0; var nYear = 0;
var nMonth = 0; var nMonth = 0;
...@@ -2661,14 +2688,14 @@ function convertToDate(input) { ...@@ -2661,14 +2688,14 @@ function convertToDate(input) {
/* /*
Escape html Escape html
*/ */
function htmlEncode(value) { COMMON.htmlEncode = function(value) {
return jQuery('<div/>').text(value || '').html(); return jQuery('<div/>').text(value || '').html();
}; };
/* /*
Check if browser is on touch device Check if browser is on touch device
*/ */
function isTouchDevice() { COMMON.isTouchDevice = function() {
var is_touch_device = 'ontouchstart' in document.documentElement; var is_touch_device = 'ontouchstart' in document.documentElement;
if (is_touch_device) { if (is_touch_device) {
return true; return true;
...@@ -2679,7 +2706,7 @@ function isTouchDevice() { ...@@ -2679,7 +2706,7 @@ function isTouchDevice() {
/* /*
Get total bytes of jp chars Get total bytes of jp chars
*/ */
function getBytes(value) { COMMON.getBytes = function(value) {
var escapedStr = encodeURI(value); var escapedStr = encodeURI(value);
if (escapedStr.indexOf("%") != -1) { if (escapedStr.indexOf("%") != -1) {
...@@ -2697,10 +2724,10 @@ function getBytes(value) { ...@@ -2697,10 +2724,10 @@ function getBytes(value) {
/* /*
Truncate by bytes Truncate by bytes
*/ */
function truncateByBytes(value, byteCount) { COMMON.truncateByBytes = function(value, byteCount) {
var strResult = ""; var strResult = "";
for (var nIndex = 0; nIndex < value.length; nIndex++) { for (var nIndex = 0; nIndex < value.length; nIndex++) {
if (getBytes(strResult + value[nIndex]) <= byteCount) { if (COMMON.getBytes(strResult + value[nIndex]) <= byteCount) {
strResult += value[nIndex]; strResult += value[nIndex];
} }
else { else {
...@@ -2710,8 +2737,19 @@ function truncateByBytes(value, byteCount) { ...@@ -2710,8 +2737,19 @@ function truncateByBytes(value, byteCount) {
return strResult; return strResult;
}; };
function ToogleLogoutNortice() { COMMON.truncate = function(strInput, length){
if (isAnonymousLogin()) { if (strInput.length <= length)
{
return strInput;
}
else
{
return strInput.substring(0, length) + "...";
}
};
COMMON.ToogleLogoutNortice = function() {
if (COMMON.isAnonymousLogin()) {
return; return;
} }
var isShow = false; var isShow = false;
...@@ -2730,7 +2768,7 @@ function ToogleLogoutNortice() { ...@@ -2730,7 +2768,7 @@ function ToogleLogoutNortice() {
/* /*
Get UTC Time ( GMT + 0 ) Get UTC Time ( GMT + 0 )
*/ */
function getUtcTime() { COMMON.getUtcTime = function() {
var curTime = new Date(); var curTime = new Date();
/* get time zone */ /* get time zone */
...@@ -2743,24 +2781,24 @@ function getUtcTime() { ...@@ -2743,24 +2781,24 @@ function getUtcTime() {
}; };
// Convert UTC time to Date object // Convert UTC time to Date object
function convertUtcToDate(utcTime) { COMMON.convertUtcToDate = function(utcTime) {
return new Date(Number(utcTime)); return new Date(Number(utcTime));
}; };
// Get UUID version 4 // Get UUID version 4
function getUUID() { COMMON.getUUID = function() {
return uuid.v4(); return uuid.v4();
}; };
/* /*
Check is anonymous user login Check is anonymous user login
*/ */
function isAnonymousLogin() { COMMON.isAnonymousLogin = function() {
return avwSysSetting().anonymousLoginFlg; return avwSysSetting().anonymousLoginFlg;
} }
/* Check if current browser is IE9 */ /* Check if current browser is IE9 */
function isIE9() { COMMON.isIE9 = function() {
var ua = window.navigator.userAgent.toLowerCase(); var ua = window.navigator.userAgent.toLowerCase();
if (/msie 9.0/.test(ua)) { if (/msie 9.0/.test(ua)) {
...@@ -2770,20 +2808,10 @@ function isIE9() { ...@@ -2770,20 +2808,10 @@ function isIE9() {
}; };
/* Check if current browser is IE10 */ /* Check if current browser is IE10 */
function isIE10() { COMMON.isIE10 = function() {
var ua = window.navigator.userAgent.toLowerCase(); var ua = window.navigator.userAgent.toLowerCase();
if (/msie 10.0/.test(ua)) { if (/msie 10.0/.test(ua)) {
return true; return true;
} }
/*
if (window.navigator.msPointerEnabled) {
return true;
} else {
var ua = window.navigator.userAgent.toLowerCase();
if (/msie 10.0/.test(ua)) {
return true;
}
}
*/
return false; return false;
}; };
...@@ -219,7 +219,7 @@ removeLockState(); ...@@ -219,7 +219,7 @@ removeLockState();
if (unlockFunc) { if (unlockFunc) {
var val = unlockFunc($('#passwd-txt').val(), forceUnlockFunc); var val = unlockFunc($('#passwd-txt').val(), forceUnlockFunc);
if (!val.result) { if (!val.result) {
$('#screenLockErrMsg').text(format(errorMessage, val.errorCode.errorMessage)); $('#screenLockErrMsg').text(AVWEB.format(errorMessage, val.errorCode.errorMessage));
$('#screenLockErrMsg').fadeIn(); $('#screenLockErrMsg').fadeIn();
$('#passwd-txt').focus(); $('#passwd-txt').focus();
......
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
<script type="text/javascript" src="./common/js/common.js?#UPDATEID#"></script> <script type="text/javascript" src="./common/js/common.js?#UPDATEID#"></script>
<script type="text/javascript" src="./common/js/uuid.js?#UPDATEID#"></script> <script type="text/javascript" src="./common/js/uuid.js?#UPDATEID#"></script>
<script type="text/javascript" src="./js/Limit_Access_Content.js?#UPDATEID#"></script> <script type="text/javascript" src="./js/Limit_Access_Content.js?#UPDATEID#"></script>
<script type="text/javascript" src="./js/home.js?#UPDATEID#"></script>
<script type="text/javascript" src="./js/header.js?#UPDATEID#"></script> <script type="text/javascript" src="./js/header.js?#UPDATEID#"></script>
<script type="text/javascript" src="./js/home.js?#UPDATEID#"></script>
<script type="text/javascript" src="./common/js/scrolltopcontrol.js?#UPDATEID#"></script> <script type="text/javascript" src="./common/js/scrolltopcontrol.js?#UPDATEID#"></script>
<script type="text/javascript" src="./common/js/tab.js?#UPDATEID#"></script> <script type="text/javascript" src="./common/js/tab.js?#UPDATEID#"></script>
<script type="text/javascript" src="./common/js/jquery.cookie.js?#UPDATEID#" ></script> <script type="text/javascript" src="./common/js/jquery.cookie.js?#UPDATEID#" ></script>
......
...@@ -21,7 +21,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) { ...@@ -21,7 +21,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
$('#limit_level1 .deletebtn .cancel').unbind('click').click( $('#limit_level1 .deletebtn .cancel').unbind('click').click(
function () { function () {
if (isNotUnlockScreen != 1) { if (isNotUnlockScreen != 1) {
unlockLayout(); COMMON.unlockLayout();
} }
$('#limit_level1').hide(); $('#limit_level1').hide();
//キャンセル //キャンセル
...@@ -36,7 +36,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) { ...@@ -36,7 +36,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
$('#limit_level1 .deletebtn .ok').unbind('click').click( $('#limit_level1 .deletebtn .ok').unbind('click').click(
function () { function () {
if (isNotUnlockScreen != 1) { if (isNotUnlockScreen != 1) {
unlockLayout(); COMMON.unlockLayout();
} }
$('#limit_level1').hide(); $('#limit_level1').hide();
funcOk(); funcOk();
...@@ -76,7 +76,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) { ...@@ -76,7 +76,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
$('#limit_level2 .deletebtn .cancel').unbind('click').click( $('#limit_level2 .deletebtn .cancel').unbind('click').click(
function () { function () {
if (isNotUnlockScreen != 1) { if (isNotUnlockScreen != 1) {
unlockLayout(); COMMON.unlockLayout();
} }
$('#limit_level2').hide(); $('#limit_level2').hide();
//キャンセル //キャンセル
...@@ -123,14 +123,14 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) { ...@@ -123,14 +123,14 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
ClientData.userInfo_sid(data.sid); ClientData.userInfo_sid(data.sid);
if (isNotUnlockScreen != 1) { if (isNotUnlockScreen != 1) {
unlockLayout(); COMMON.unlockLayout();
} }
$('#limit_level2').hide(); $('#limit_level2').hide();
// open content // open content
funcOk(); funcOk();
} }
else { else {
$('#lblMessageLimitError').html(format(i18nText('msgLoginErrWrong'), data.errorMessage).toString()).show(); $('#lblMessageLimitError').html(AVWEB.format(i18nText('msgLoginErrWrong'), data.errorMessage).toString()).show();
} }
}, },
function (xhr, statusText, errorThrown) { function (xhr, statusText, errorThrown) {
...@@ -138,7 +138,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) { ...@@ -138,7 +138,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
if (xhr.responseText && xhr.status != 0) { if (xhr.responseText && xhr.status != 0) {
errorCode = JSON.parse(xhr.responseText).errorMessage; errorCode = JSON.parse(xhr.responseText).errorMessage;
} }
$('#lblMessageLimitError').html(format(i18nText('msgLoginErrWrong'), errorCode).toString()).show(); $('#lblMessageLimitError').html(AVWEB.format(i18nText('msgLoginErrWrong'), errorCode).toString()).show();
} }
); );
......
...@@ -29,7 +29,7 @@ $(document).ready(function () { ...@@ -29,7 +29,7 @@ $(document).ready(function () {
if (!avwCheckLogin(ScreenIds.Login)) return; if (!avwCheckLogin(ScreenIds.Login)) return;
LockScreen(); COMMON.LockScreen();
document.title = i18nText('dspShiori') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspShiori') + ' | ' + i18nText('sysAppTitle');
...@@ -79,10 +79,10 @@ $(document).ready(function () { ...@@ -79,10 +79,10 @@ $(document).ready(function () {
dspTitleNm_Click(); dspTitleNm_Click();
} }
else { else {
checkForceChangePassword(); HEADER.checkForceChangePassword();
} }
if (isAnonymousLogin()) { if (COMMON.isAnonymousLogin()) {
//プッシュメッセージ隠す //プッシュメッセージ隠す
$('#dspPushMessage').hide(); $('#dspPushMessage').hide();
} }
...@@ -127,7 +127,7 @@ function dspTitleNm_Click() { ...@@ -127,7 +127,7 @@ function dspTitleNm_Click() {
// $("#dspPubDt").removeClass("active_tops"); // $("#dspPubDt").removeClass("active_tops");
//changeStatusSort(this, isAsc); //changeStatusSort(this, isAsc);
setStatusSort('#dspTitleNm', isAsc); HEADER.setStatusSort('#dspTitleNm', isAsc);
}; };
function dspTitleNmKn_Click() { function dspTitleNmKn_Click() {
...@@ -155,7 +155,7 @@ function dspTitleNmKn_Click() { ...@@ -155,7 +155,7 @@ function dspTitleNmKn_Click() {
// $("#dspPubDt").removeClass("active_tops"); // $("#dspPubDt").removeClass("active_tops");
//changeStatusSort(this, isAsc); //changeStatusSort(this, isAsc);
setStatusSort('#dspTitleNmKn', isAsc); HEADER.setStatusSort('#dspTitleNmKn', isAsc);
}; };
function dspPubDt_Click() { function dspPubDt_Click() {
...@@ -183,7 +183,7 @@ function dspPubDt_Click() { ...@@ -183,7 +183,7 @@ function dspPubDt_Click() {
// $("#dspPubDt").addClass("active_tops"); // $("#dspPubDt").addClass("active_tops");
//changeStatusSort(this, isAsc); //changeStatusSort(this, isAsc);
setStatusSort('#dspPubDt', isAsc); HEADER.setStatusSort('#dspPubDt', isAsc);
}; };
// Event of each button [読む] // Event of each button [読む]
...@@ -216,7 +216,7 @@ function dspCancel_Click() { ...@@ -216,7 +216,7 @@ function dspCancel_Click() {
// Close dialog // Close dialog
//$('#dlgConfirm').dialog('close'); //$('#dlgConfirm').dialog('close');
$("#delete_shiori").hide(); $("#delete_shiori").hide();
unlockLayout(); COMMON.unlockLayout();
}; };
// Process deleting // Process deleting
function dspConfirmOK_Click() { function dspConfirmOK_Click() {
...@@ -258,7 +258,7 @@ function dspConfirmOK_Click() { ...@@ -258,7 +258,7 @@ function dspConfirmOK_Click() {
// -------------------------------- // --------------------------------
$("#delete_shiori").hide(); $("#delete_shiori").hide();
unlockLayout(); COMMON.unlockLayout();
}; };
function dspDelete1_Click() { function dspDelete1_Click() {
...@@ -267,7 +267,7 @@ function dspDelete1_Click() { ...@@ -267,7 +267,7 @@ function dspDelete1_Click() {
function dspDelete_Click() { function dspDelete_Click() {
if ($("input[name='chkDelete']:checked").length > 0) { if ($("input[name='chkDelete']:checked").length > 0) {
lockLayout(); COMMON.lockLayout();
$("#delete_shiori").show(); $("#delete_shiori").show();
$("#delete_shiori").center(); $("#delete_shiori").center();
} }
...@@ -342,12 +342,12 @@ function ShowBookmark() { ...@@ -342,12 +342,12 @@ function ShowBookmark() {
var pageThumbnail = (pageDetail.pageThumbnail != pathImgContentNone) ? ("data:image/jpeg;base64," + pageDetail.pageThumbnail) : pathImgContentNone; var pageThumbnail = (pageDetail.pageThumbnail != pathImgContentNone) ? ("data:image/jpeg;base64," + pageDetail.pageThumbnail) : pathImgContentNone;
insertRow(contentid, pageThumbnail, htmlEncode(contentTitle), insertRow(contentid, pageThumbnail, COMMON.htmlEncode(contentTitle),
pageDetail.pageText, pageDetail.pageNo, hasMemo, hasMarking, nIndex, contentType); pageDetail.pageText, pageDetail.pageNo, hasMemo, hasMarking, nIndex, contentType);
} }
else { else {
// Not existed -> Show error // Not existed -> Show error
insertRowError(contentid, htmlEncode(contentTitle), pageDetail.pageNo); insertRowError(contentid, COMMON.htmlEncode(contentTitle), pageDetail.pageNo);
} }
} }
...@@ -379,7 +379,7 @@ function SortTitleName(isAsc) { ...@@ -379,7 +379,7 @@ function SortTitleName(isAsc) {
// $("#txtTitleNmDesc").show(); // $("#txtTitleNmDesc").show();
// } // }
setStatusSort('#dspTitleNm', isAsc); HEADER.setStatusSort('#dspTitleNm', isAsc);
var arrSource = ClientData.BookMarkData(); var arrSource = ClientData.BookMarkData();
var arrTarget = []; var arrTarget = [];
...@@ -451,7 +451,7 @@ function SortTitleNameKana(isAsc) { ...@@ -451,7 +451,7 @@ function SortTitleNameKana(isAsc) {
// $("#txtTitleNmKnDesc").show(); // $("#txtTitleNmKnDesc").show();
// } // }
setStatusSort('#dspTitleNmKn', isAsc); HEADER.setStatusSort('#dspTitleNmKn', isAsc);
var arrSource = ClientData.BookMarkData(); var arrSource = ClientData.BookMarkData();
var arrTarget = []; var arrTarget = [];
...@@ -507,7 +507,7 @@ function SortPubDate(isAsc) { ...@@ -507,7 +507,7 @@ function SortPubDate(isAsc) {
// $("#txtPubDtDesc").show(); // $("#txtPubDtDesc").show();
// } // }
setStatusSort('#dspPubDt', isAsc); HEADER.setStatusSort('#dspPubDt', isAsc);
var arrSource = ClientData.BookMarkData(); var arrSource = ClientData.BookMarkData();
var arrTarget = []; var arrTarget = [];
...@@ -592,7 +592,7 @@ function insertRowError(contentid, pageTitle, pageNo) { ...@@ -592,7 +592,7 @@ function insertRowError(contentid, pageTitle, pageNo) {
newRow += '</span>'; newRow += '</span>';
newRow += " <div class='text'>"; newRow += " <div class='text'>";
newRow += ' <label class="name">' + truncate(pageTitle, 20) + '</label>'; newRow += ' <label class="name">' + COMMON.truncate(pageTitle, 20) + '</label>';
newRow += ' <div class="info">'; newRow += ' <div class="info">';
newRow += " <label class='lang name' lang='msgShioriDeleted'>" + i18nText('msgShioriDeleted') + "</label>"; newRow += " <label class='lang name' lang='msgShioriDeleted'>" + i18nText('msgShioriDeleted') + "</label>";
...@@ -620,15 +620,15 @@ function insertRow(contentid, pageThumbnail, pageTitle, pageText, pageNo, hasMem ...@@ -620,15 +620,15 @@ function insertRow(contentid, pageThumbnail, pageTitle, pageText, pageNo, hasMem
newRow += '<img id="loadingIcon' + contentid + "_" + pageNo + '" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 46px; "/>'; newRow += '<img id="loadingIcon' + contentid + "_" + pageNo + '" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 46px; "/>';
newRow += "</a>"; newRow += "</a>";
newRow += "<div class='text'>"; newRow += "<div class='text'>";
//newRow += '<label id="Label1" class="name" style="color: #2D83DA;">' + truncate(pageTitle, 20) + '</label>'; //newRow += '<label id="Label1" class="name" style="color: #2D83DA;">' + COMMON.truncate(pageTitle, 20) + '</label>';
newRow += '<a class="name" href="#" id="Label1">' + truncate(pageTitle, 20) + '</a>'; //<img src="img/bookshelf/icon_01.jpg" width="20" height="20" class="listIcon"> newRow += '<a class="name" href="#" id="Label1">' + COMMON.truncate(pageTitle, 20) + '</a>'; //<img src="img/bookshelf/icon_01.jpg" width="20" height="20" class="listIcon">
newRow += '<div class="info">'; newRow += '<div class="info">';
newRow += '<ul class="date">'; 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">' + i18nText('txtPage') + '</label><label id="Label3">' + pageNo + '</label></li>';
var contentText = htmlEncode(getLines(pageText, 3)); var contentText = COMMON.htmlEncode(COMMON.getLines(pageText, 3));
newRow += '<li><label id="Label1">' + truncate(contentText, 80) + '</label></li>'; newRow += '<li><label id="Label1">' + COMMON.truncate(contentText, 80) + '</label></li>';
newRow += "</ul>"; newRow += "</ul>";
newRow += '<ul class="pic" style="align:right">'; newRow += '<ul class="pic" style="align:right">';
...@@ -698,15 +698,15 @@ function insertRow(contentid, pageThumbnail, pageTitle, pageText, pageNo, hasMem ...@@ -698,15 +698,15 @@ function insertRow(contentid, pageThumbnail, pageTitle, pageText, pageNo, hasMem
newRow +='</a>'; newRow +='</a>';
newRow +='<div class="text">'; newRow +='<div class="text">';
//newRow += '<a class="name" href="#"><img src="img/bookshelf/icon_01.jpg" width="20" height="20" class="listIcon">' + truncate(pageTitle, 20) + '</a>'; //newRow += '<a class="name" href="#"><img src="img/bookshelf/icon_01.jpg" width="20" height="20" class="listIcon">' + COMMON.truncate(pageTitle, 20) + '</a>';
newRow += '<a class="name" href="#">' + truncate(pageTitle, 20) + '</a>'; newRow += '<a class="name" href="#">' + COMMON.truncate(pageTitle, 20) + '</a>';
newRow +='<div class="info">'; newRow +='<div class="info">';
newRow += '<ul class="date">'; newRow += '<ul class="date">';
var contentText = htmlEncode(getLines(pageText, 3)); var contentText = COMMON.htmlEncode(COMMON.getLines(pageText, 3));
newRow += '<li><label id="Label1">' + truncate(contentText, 60) + '</label></li>'; newRow += '<li><label id="Label1">' + COMMON.truncate(contentText, 60) + '</label></li>';
// newRow +='<li>公開日:2012/09/14</li>'; // newRow +='<li>公開日:2012/09/14</li>';
// newRow += '<li>閲覧日:2012/09/18</li>'; // newRow += '<li>閲覧日:2012/09/18</li>';
...@@ -964,7 +964,7 @@ function changeLanguageCallBackFunction() { ...@@ -964,7 +964,7 @@ function changeLanguageCallBackFunction() {
// else { // else {
// $("#txtTitleNmKnDesc").show(); // $("#txtTitleNmKnDesc").show();
// } // }
setStatusSort('#dspTitleNmKn', orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#dspTitleNmKn', orderSort == Consts.ConstOrderSetting_Asc);
} }
} }
document.title = i18nText('dspShiori') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspShiori') + ' | ' + i18nText('sysAppTitle');
...@@ -1078,13 +1078,13 @@ Setting dialog [ end ] ...@@ -1078,13 +1078,13 @@ Setting dialog [ end ]
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
*/ */
function truncate(strInput, length){ //function truncate(strInput, length){
if (strInput.length <= length) // if (strInput.length <= length)
{ // {
return strInput; // return strInput;
} // }
else // else
{ // {
return strInput.substring(0, length) + "..."; // return strInput.substring(0, length) + "...";
} // }
}; //};
...@@ -60,7 +60,7 @@ $(document).ready(function(){ ...@@ -60,7 +60,7 @@ $(document).ready(function(){
return; return;
} }
LockScreen(); COMMON.LockScreen();
document.title = i18nText('txtSearchResult') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('txtSearchResult') + ' | ' + i18nText('sysAppTitle');
...@@ -134,10 +134,10 @@ $(document).ready(function(){ ...@@ -134,10 +134,10 @@ $(document).ready(function(){
}); });
}else{ }else{
//Check if Force Change password //Check if Force Change password
checkForceChangePassword(); HEADER.checkForceChangePassword();
} }
if (isAnonymousLogin()) { if (COMMON.isAnonymousLogin()) {
//プッシュメッセージ隠す //プッシュメッセージ隠す
$('#dspPushMessage').hide(); $('#dspPushMessage').hide();
} }
...@@ -237,7 +237,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid) ...@@ -237,7 +237,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' </a>' + ' </a>'
+' <div class="text">' +' <div class="text">'
+' <a id="title'+post.contentId+'" class="dialog name" contentid="'+post.contentId+'">'+ truncate(htmlEncode(post.contentTitle), 25)+'</a>' +' <a id="title'+post.contentId+'" class="dialog name" contentid="'+post.contentId+'">'+ COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 25)+'</a>'
+' <div class="info">' +' <div class="info">'
+' <ul class="date">' +' <ul class="date">'
+' <li><span class="lang" lang="txtPubDt"> </span> : '+outputDate+'</li>' +' <li><span class="lang" lang="txtPubDt"> </span> : '+outputDate+'</li>'
...@@ -265,8 +265,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid) ...@@ -265,8 +265,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' </a>' + ' </a>'
+ ' <div class="text">' + ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="name dialog" contentid="' + post.contentId + '">' + ' <a id="title' + post.contentId + '" class="name dialog" contentid="' + post.contentId + '">'
+ ' <img class="listIcon" src="'+getIconTypeContent(post.contentType)+'" width="20" height="20">' + ' <img class="listIcon" src="' + HEADER.getIconTypeContent(post.contentType)+'" width="20" height="20">'
+ truncate(htmlEncode(post.contentTitle), 20) + COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 20)
+ ' </a>' + ' </a>'
+ ' <div class="info">' + ' <div class="info">'
+ ' <ul class="date">' + ' <ul class="date">'
...@@ -398,7 +398,7 @@ function handleLanguage(){ ...@@ -398,7 +398,7 @@ function handleLanguage(){
// $('#titlekana-sorttype').css('width', '12px'); // $('#titlekana-sorttype').css('width', '12px');
// } // }
// } // }
setStatusSort('#'+$('#menu_sort li.current a').attr('id'),orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#'+$('#menu_sort li.current a').attr('id'),orderSort == Consts.ConstOrderSetting_Asc);
} }
if(noRecordFlg){ if(noRecordFlg){
$('#control-sort-titlekana').css('display','block'); $('#control-sort-titlekana').css('display','block');
...@@ -641,7 +641,7 @@ function sortByTitleFunction(){ ...@@ -641,7 +641,7 @@ function sortByTitleFunction(){
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
} }
setStatusSort('#control-sort-title',sortOrder == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-title',sortOrder == Consts.ConstOrderSetting_Asc);
if(recordFrom == null || recordFrom == 'undefined'){ if(recordFrom == null || recordFrom == 'undefined'){
recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM; recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
...@@ -713,7 +713,7 @@ function sortByTitleKanaFunction(){ ...@@ -713,7 +713,7 @@ function sortByTitleKanaFunction(){
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
} }
setStatusSort('#control-sort-titlekana',sortOrder == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-titlekana',sortOrder == Consts.ConstOrderSetting_Asc);
if(recordFrom == null || recordFrom == 'undefined'){ if(recordFrom == null || recordFrom == 'undefined'){
recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM; recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
...@@ -786,7 +786,7 @@ function sortByReleaseDateFunction(){ ...@@ -786,7 +786,7 @@ function sortByReleaseDateFunction(){
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
} }
setStatusSort('#control-sort-releasedate',sortOrder == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-releasedate',sortOrder == Consts.ConstOrderSetting_Asc);
if(recordFrom == null || recordFrom == 'undefined'){ if(recordFrom == null || recordFrom == 'undefined'){
recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM; recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
...@@ -879,13 +879,13 @@ function isPdfContent(contentType){ ...@@ -879,13 +879,13 @@ function isPdfContent(contentType){
// return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true"; // return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
//}; //};
/* get url */ ///* get url */
function getURL(apiName) { //function getURL(apiName) {
var sysSettings = avwSysSetting(); // var sysSettings = avwSysSetting();
var url = sysSettings.apiResourceDlUrl; // var url = sysSettings.apiResourceDlUrl;
url = format(url, ClientData.userInfo_accountPath()) + '/' + apiName; // url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
return url; // return url;
}; //};
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new function to return content type of content. //End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new function to return content type of content.
...@@ -976,13 +976,13 @@ function readSubmenuFunction_callback(contentId) ...@@ -976,13 +976,13 @@ function readSubmenuFunction_callback(contentId)
//For testing without other Type. //For testing without other Type.
if(contentType == ContentTypeKeys.Type_Others){ if(contentType == ContentTypeKeys.Type_Others){
//Download content //Download content
downloadResourceById(contentId); HEADER.downloadResourceById(contentId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(contentId); drawEditImage(contentId);
} }
else if( contentType == ContentTypeKeys.Type_Link ){ else if( contentType == ContentTypeKeys.Type_Link ){
//link content //link content
viewLinkContentById(contentId); HEADER.viewLinkContentById(contentId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(contentId); drawEditImage(contentId);
} }
...@@ -1587,7 +1587,7 @@ function handleSortDisp(){ ...@@ -1587,7 +1587,7 @@ function handleSortDisp(){
// //
// $('#control-sort-title').addClass('active_tops'); // $('#control-sort-title').addClass('active_tops');
setStatusSort('#control-sort-title',orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-title',orderSort == Consts.ConstOrderSetting_Asc);
} }
else if(typeSort == 2){ else if(typeSort == 2){
...@@ -1609,7 +1609,7 @@ function handleSortDisp(){ ...@@ -1609,7 +1609,7 @@ function handleSortDisp(){
// //
// $('#control-sort-titlekana').addClass('active_tops'); // $('#control-sort-titlekana').addClass('active_tops');
setStatusSort('#control-sort-titlekana',orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-titlekana',orderSort == Consts.ConstOrderSetting_Asc);
} }
else if(typeSort == 3){ else if(typeSort == 3){
...@@ -1630,7 +1630,7 @@ function handleSortDisp(){ ...@@ -1630,7 +1630,7 @@ function handleSortDisp(){
// //
// $('#control-sort-releasedate').addClass('active_tops'); // $('#control-sort-releasedate').addClass('active_tops');
setStatusSort('#control-sort-releasedate',orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-releasedate',orderSort == Consts.ConstOrderSetting_Asc);
} }
} }
} }
...@@ -1761,7 +1761,7 @@ function refreshGrid(){ ...@@ -1761,7 +1761,7 @@ function refreshGrid(){
function formatDisplayMoreRecord(){ function formatDisplayMoreRecord(){
i18nReplaceText(); i18nReplaceText();
//changeLanguage(ClientData.userInfo_language()); //changeLanguage(ClientData.userInfo_language());
$('#control-nextrecord').html(format(i18nText('dspViewMore'), returnNumberDispRecordForList())); $('#control-nextrecord').html(AVWEB.format(i18nText('dspViewMore'), returnNumberDispRecordForList()));
}; };
...@@ -1811,16 +1811,16 @@ function enableSort(){ ...@@ -1811,16 +1811,16 @@ function enableSort(){
} }
}; };
function truncate(strInput, length){ //function truncate(strInput, length){
if (strInput.length <= length) // if (strInput.length <= length)
{ // {
return strInput; // return strInput;
} // }
else // else
{ // {
return strInput.substring(0, length) + "..."; // return strInput.substring(0, length) + "...";
} // }
}; //};
function resizeResourceThumbnail(mg, width, height) { function resizeResourceThumbnail(mg, width, height) {
var newWidth; var newWidth;
...@@ -1846,7 +1846,7 @@ function resizeResourceThumbnail(mg, width, height) { ...@@ -1846,7 +1846,7 @@ function resizeResourceThumbnail(mg, width, height) {
function removeHoverCss(){ function removeHoverCss(){
if(isTouchDevice()){ if(COMMON.isTouchDevice()){
$('#control-sort-title').removeClass('nottouchdevice'); $('#control-sort-title').removeClass('nottouchdevice');
$('#control-sort-titlekana').removeClass('nottouchdevice'); $('#control-sort-titlekana').removeClass('nottouchdevice');
$('#control-sort-releasedate').removeClass('nottouchdevice'); $('#control-sort-releasedate').removeClass('nottouchdevice');
......
...@@ -13,7 +13,7 @@ function sizingScreen() { ...@@ -13,7 +13,7 @@ function sizingScreen() {
w = $(window).width(); w = $(window).width();
h = $(window).height(); h = $(window).height();
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
if (avwUserEnvObj.os == "android") { if (avwUserEnvObj.os == "android") {
var tempRatio = document.documentElement.clientWidth / window.innerWidth; var tempRatio = document.documentElement.clientWidth / window.innerWidth;
if (tempRatio <= 1) { if (tempRatio <= 1) {
...@@ -58,7 +58,7 @@ function handleMemo() { ...@@ -58,7 +58,7 @@ function handleMemo() {
//change class //change class
$('#imgmemo').removeClass(); $('#imgmemo').removeClass();
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#imgmemo').addClass('memoDisplay_device'); $('#imgmemo').addClass('memoDisplay_device');
} else { } else {
$('#imgmemo').addClass('memoDisplay'); $('#imgmemo').addClass('memoDisplay');
...@@ -69,7 +69,7 @@ function handleMemo() { ...@@ -69,7 +69,7 @@ function handleMemo() {
//change class //change class
$('#imgaddmemo').removeClass(); $('#imgaddmemo').removeClass();
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#imgaddmemo').addClass('memoAdd_device'); $('#imgaddmemo').addClass('memoAdd_device');
} else { } else {
$('#imgaddmemo').addClass('memoAdd'); $('#imgaddmemo').addClass('memoAdd');
...@@ -201,7 +201,7 @@ function bookmarkPage() { ...@@ -201,7 +201,7 @@ function bookmarkPage() {
} }
//=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new bookmark. //=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new bookmark.
enBookmark.bookmarkid = getUUID(); enBookmark.bookmarkid = COMMON.getUUID();
enBookmark.registerDate = new Date(); enBookmark.registerDate = new Date();
//=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new bookmark. //=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new bookmark.
var listBM = []; var listBM = [];
...@@ -225,7 +225,7 @@ function bookmarkPage() { ...@@ -225,7 +225,7 @@ function bookmarkPage() {
//change class //change class
$('#imgbookmark').removeClass(); $('#imgbookmark').removeClass();
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#imgbookmark').addClass('bmAdd_device'); $('#imgbookmark').addClass('bmAdd_device');
} else { } else {
$('#imgbookmark').addClass('bmAdd'); $('#imgbookmark').addClass('bmAdd');
...@@ -333,7 +333,7 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -333,7 +333,7 @@ function handleAPIWebContentPage(dataJson, pos) {
' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="' + formatStringBase64(dataStored[nStored].pageThumbnail) + '"/>' + ' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="' + formatStringBase64(dataStored[nStored].pageThumbnail) + '"/>' +
' <span class="mdltext">' + ' <span class="mdltext">' +
i18nText('txtPage') + (changePageNo(bmList[nIndex].pageNo) + 1) + '<br /> ' + i18nText('txtPage') + (changePageNo(bmList[nIndex].pageNo) + 1) + '<br /> ' +
truncate(htmlEncode(contentPage[nIndexBookMark].pageText), 20) + COMMON.truncate(COMMON.htmlEncode(contentPage[nIndexBookMark].pageText), 20) +
' </span>' + ' </span>' +
' </li>' ' </li>'
); );
...@@ -365,7 +365,7 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -365,7 +365,7 @@ function handleAPIWebContentPage(dataJson, pos) {
' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="img/view_loading.gif" />' + ' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="img/view_loading.gif" />' +
' <span class="mdltext">' + ' <span class="mdltext">' +
i18nText('txtPage') + (changePageNo(bmList[nIndex].pageNo) + 1) + '<br /> ' + i18nText('txtPage') + (changePageNo(bmList[nIndex].pageNo) + 1) + '<br /> ' +
truncate(htmlEncode(contentPage[nIndexBookMark].pageText), 20) + COMMON.truncate(COMMON.htmlEncode(contentPage[nIndexBookMark].pageText), 20) +
' </span>' + ' </span>' +
' </li>' ' </li>'
); );
...@@ -430,7 +430,7 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -430,7 +430,7 @@ function handleAPIWebContentPage(dataJson, pos) {
' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="img/view_loading.gif" />' + ' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="img/view_loading.gif" />' +
' <span class="mdltext">' + ' <span class="mdltext">' +
i18nText('txtPage') + 1 + '<br /> ' + i18nText('txtPage') + 1 + '<br /> ' +
truncate(htmlEncode(contentPage.contentName), 20) + COMMON.truncate(COMMON.htmlEncode(contentPage.contentName), 20) +
' </span>' + ' </span>' +
' </li>' ' </li>'
); );
...@@ -491,7 +491,7 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -491,7 +491,7 @@ function handleAPIWebContentPage(dataJson, pos) {
' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="img/view_loading.gif" />' + ' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="img/view_loading.gif" />' +
' <span class="mdltext">' + ' <span class="mdltext">' +
i18nText('txtPage') + bmList[nIndex].pageNo + '<br /> ' + i18nText('txtPage') + bmList[nIndex].pageNo + '<br /> ' +
//truncate(htmlEncode(contentPage.contentName), 20) + //COMMON.truncate(COMMON.htmlEncode(contentPage.contentName), 20) +
' </span>' + ' </span>' +
' </li>' ' </li>'
); );
...@@ -575,12 +575,12 @@ function AddChidrenNode(nodeParent, data) { ...@@ -575,12 +575,12 @@ function AddChidrenNode(nodeParent, data) {
//add child node //add child node
var item = new TreeNode(); var item = new TreeNode();
item.IsCategory = false; item.IsCategory = false;
//item.Text = htmlEncode(truncateByBytes(dataChild[i].title,30)); //item.Text = COMMON.htmlEncode(COMMON.truncateByBytes(dataChild[i].title,30));
/* check data text */ /* check data text */
if (getBytes(dataChild[i].title) > 30) { if (COMMON.getBytes(dataChild[i].title) > 30) {
item.Text = htmlEncode(truncateByBytes(dataChild[i].title, 30)) + '...'; item.Text = COMMON.htmlEncode(COMMON.truncateByBytes(dataChild[i].title, 30)) + '...';
} else { } else {
item.Text = htmlEncode(dataChild[i].title); item.Text = COMMON.htmlEncode(dataChild[i].title);
} }
item.id = dataChild[i].ID; item.id = dataChild[i].ID;
item.Value = dataChild[i].destPageNumber; item.Value = dataChild[i].destPageNumber;
...@@ -612,7 +612,7 @@ function handleCopyTextData(data, pos) { ...@@ -612,7 +612,7 @@ function handleCopyTextData(data, pos) {
for (var nIndex = 0; nIndex < data.length; nIndex++) { for (var nIndex = 0; nIndex < data.length; nIndex++) {
/* get text of current page */ /* get text of current page */
if (data[nIndex].pageNo == changePageIndex(getPageIndex())) { if (data[nIndex].pageNo == changePageIndex(getPageIndex())) {
sPageText = htmlEncode(data[nIndex].pageText); sPageText = COMMON.htmlEncode(data[nIndex].pageText);
break; break;
} }
} }
...@@ -638,7 +638,7 @@ function handleCopyTextData(data, pos) { ...@@ -638,7 +638,7 @@ function handleCopyTextData(data, pos) {
$('#bookmarkBoxHdCT').append(i18nText('txtTextCopy')); $('#bookmarkBoxHdCT').append(i18nText('txtTextCopy'));
//title end //title end
//lockLayout(); //COMMON.lockLayout();
$('#boxCopyText').css('z-index', '101'); $('#boxCopyText').css('z-index', '101');
$('#boxCopyText').css('display', 'block'); $('#boxCopyText').css('display', 'block');
$('#boxCopyText').draggable({ handle: "h1" }); $('#boxCopyText').draggable({ handle: "h1" });
...@@ -677,7 +677,7 @@ function handleCopyTextData(data, pos) { ...@@ -677,7 +677,7 @@ function handleCopyTextData(data, pos) {
//title end //title end
//lockLayout(); //COMMON.lockLayout();
$('#boxCopyText').css('z-index', '101'); $('#boxCopyText').css('z-index', '101');
$('#boxCopyText').css('display', 'block'); $('#boxCopyText').css('display', 'block');
//$('#boxCopyText').draggable({ handle: "h1" }); //$('#boxCopyText').draggable({ handle: "h1" });
...@@ -693,7 +693,7 @@ function handleCopyTextData(data, pos) { ...@@ -693,7 +693,7 @@ function handleCopyTextData(data, pos) {
$('#boxCopyText').unbind('draggable'); $('#boxCopyText').unbind('draggable');
});*/ });*/
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
document.getElementById('bookmarkBoxHdCT').addEventListener('touchstart', eventStart_CopyText, false); document.getElementById('bookmarkBoxHdCT').addEventListener('touchstart', eventStart_CopyText, false);
document.getElementById('bookmarkBoxHdCT').addEventListener('touchend', eventEnd_CopyText, false); document.getElementById('bookmarkBoxHdCT').addEventListener('touchend', eventEnd_CopyText, false);
} else { } else {
...@@ -729,15 +729,15 @@ function formatStringBase64(imgStr) { ...@@ -729,15 +729,15 @@ function formatStringBase64(imgStr) {
return outputString; return outputString;
}; };
/* cut string */ ///* cut string */
function truncate(strInput, length) { //function truncate(strInput, length) {
if (strInput.length <= length) { // if (strInput.length <= length) {
return strInput; // return strInput;
} // }
else { // else {
return strInput.substring(0, length) + "..."; // return strInput.substring(0, length) + "...";
} // }
}; //};
/* search content */ /* search content */
function searchHandle() { function searchHandle() {
...@@ -767,7 +767,7 @@ function searchHandle() { ...@@ -767,7 +767,7 @@ function searchHandle() {
$('#bookmarkBoxHdSearching').append(i18nText('txtSearchResult')); $('#bookmarkBoxHdSearching').append(i18nText('txtSearchResult'));
//title end //title end
//lockLayout(); //COMMON.lockLayout();
$('#boxSearching').css('z-index', '101'); $('#boxSearching').css('z-index', '101');
$('#boxSearching').css('display', 'block'); $('#boxSearching').css('display', 'block');
$('#boxSearching').draggable({ handle: "h1" }); $('#boxSearching').draggable({ handle: "h1" });
...@@ -785,7 +785,7 @@ function searchHandle() { ...@@ -785,7 +785,7 @@ function searchHandle() {
' <img id="img_search_' + sPageNo[i].pageNo + '" class="imgbox" src="' + formatStringBase64(dataStored[nStored].pageThumbnail) + '"/>' + ' <img id="img_search_' + sPageNo[i].pageNo + '" class="imgbox" src="' + formatStringBase64(dataStored[nStored].pageThumbnail) + '"/>' +
' <span class="mdltext">' + ' <span class="mdltext">' +
i18nText('txtPage') + (changePageNo(sPageNo[i].pageNo) + 1) + '<br /> ' + i18nText('txtPage') + (changePageNo(sPageNo[i].pageNo) + 1) + '<br /> ' +
htmlEncode(truncate(sPageNo[i].pageText, 20)) + COMMON.htmlEncode(COMMON.truncate(sPageNo[i].pageText, 20)) +
' </span>' + ' </span>' +
' </li>' ' </li>'
); );
...@@ -815,7 +815,7 @@ function searchHandle() { ...@@ -815,7 +815,7 @@ function searchHandle() {
' <img id="img_search_' + sPageNo[i].pageNo + '" class="imgbox" src="img/view_loading.gif"/>' + ' <img id="img_search_' + sPageNo[i].pageNo + '" class="imgbox" src="img/view_loading.gif"/>' +
' <span class="mdltext">' + ' <span class="mdltext">' +
i18nText('txtPage') + (changePageNo(sPageNo[i].pageNo) + 1) + '<br /> ' + i18nText('txtPage') + (changePageNo(sPageNo[i].pageNo) + 1) + '<br /> ' +
htmlEncode(truncate(sPageNo[i].pageText, 20)) + COMMON.htmlEncode(COMMON.truncate(sPageNo[i].pageText, 20)) +
' </span>' + ' </span>' +
' </li>' ' </li>'
); );
...@@ -859,7 +859,7 @@ function searchHandle() { ...@@ -859,7 +859,7 @@ function searchHandle() {
$('#bookmarkBoxHdSearching').append(i18nText('txtSearchResult')); $('#bookmarkBoxHdSearching').append(i18nText('txtSearchResult'));
//title end //title end
//lockLayout(); //COMMON.lockLayout();
$('#boxSearching').css('z-index', '101'); $('#boxSearching').css('z-index', '101');
$('#boxSearching').css('display', 'block'); $('#boxSearching').css('display', 'block');
$('#boxSearching').draggable({ handle: "h1" }); $('#boxSearching').draggable({ handle: "h1" });
...@@ -899,7 +899,7 @@ function loadDataToDialogSearch(searchResultTemp) { ...@@ -899,7 +899,7 @@ function loadDataToDialogSearch(searchResultTemp) {
' <img class="imgbox" src="' + formatStringBase64(searchResult[nIndex].pageThumbnail) + '"/>' + ' <img class="imgbox" src="' + formatStringBase64(searchResult[nIndex].pageThumbnail) + '"/>' +
' <span class="mdltext">' + ' <span class="mdltext">' +
i18nText('txtPage') + (changePageNo(searchResult[nIndex].pageNo) + 1) + '<br /> ' + i18nText('txtPage') + (changePageNo(searchResult[nIndex].pageNo) + 1) + '<br /> ' +
htmlEncode(truncate(searchResult[nIndex].pageText, 20)) + COMMON.htmlEncode(COMMON.truncate(searchResult[nIndex].pageText, 20)) +
' </span>' + ' </span>' +
' </li>' ' </li>'
); );
...@@ -1001,7 +1001,7 @@ function showErrorScreen() { ...@@ -1001,7 +1001,7 @@ function showErrorScreen() {
// errMes = i18nText('msgPageImgErr'); // errMes = i18nText('msgPageImgErr');
//} //}
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
lockLayout(); COMMON.lockLayout();
/* show error messages */ /* show error messages */
$().toastmessage({ position: 'middle-center' }); $().toastmessage({ position: 'middle-center' });
$().toastmessage('showToast', { $().toastmessage('showToast', {
...@@ -1023,7 +1023,7 @@ function showAlertScreen(errMes) { ...@@ -1023,7 +1023,7 @@ function showAlertScreen(errMes) {
errMes = "message."; //i18nText('msgPageImgErr'); errMes = "message."; //i18nText('msgPageImgErr');
} }
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
lockLayout(); COMMON.lockLayout();
/* show error messages */ /* show error messages */
$().toastmessage({ position: 'middle-center' }); $().toastmessage({ position: 'middle-center' });
$().toastmessage('showToast', { $().toastmessage('showToast', {
...@@ -1036,7 +1036,7 @@ function showAlertScreen(errMes) { ...@@ -1036,7 +1036,7 @@ function showAlertScreen(errMes) {
$('.toast-type-error > p').css('padding-top', '35px'); $('.toast-type-error > p').css('padding-top', '35px');
$('.toast-item-close').live('click', $('.toast-item-close').live('click',
function () { function () {
unlockLayout(); COMMON.unlockLayout();
} }
); );
}; };
...@@ -1071,7 +1071,7 @@ function changePage(page_index) { ...@@ -1071,7 +1071,7 @@ function changePage(page_index) {
else{ else{
//ページ閲覧ログセット //ページ閲覧ログセット
SetPageLog( contentID, page_index); COMMON.SetPageLog( contentID, page_index);
// Clear canvas offscreen // Clear canvas offscreen
clearCanvas(document.getElementById("offscreen")); clearCanvas(document.getElementById("offscreen"));
...@@ -1127,7 +1127,7 @@ function changePage(page_index) { ...@@ -1127,7 +1127,7 @@ function changePage(page_index) {
/* add event draw on canvas */ /* add event draw on canvas */
function drawOnCanvas() { function drawOnCanvas() {
tool = new tool_drawing(); tool = new tool_drawing();
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
initializeCanvas(document.getElementById('draw_canvas')); initializeCanvas(document.getElementById('draw_canvas'));
initializeCanvas(document.getElementById('marker_canvas')); initializeCanvas(document.getElementById('marker_canvas'));
...@@ -1909,7 +1909,7 @@ function handleTooltip() { ...@@ -1909,7 +1909,7 @@ function handleTooltip() {
function StartTimerUpdateLog() { function StartTimerUpdateLog() {
/* set end log */ /* set end log */
SetEndLog(contentID); COMMON.SetEndLog(contentID);
setTimeout("StartTimerUpdateLog();", 1000); setTimeout("StartTimerUpdateLog();", 1000);
}; };
...@@ -1970,7 +1970,7 @@ function changePageWithoutSlide(pageMove) { ...@@ -1970,7 +1970,7 @@ function changePageWithoutSlide(pageMove) {
//abe コンテンツリンクで移動時 //abe コンテンツリンクで移動時
//alert("changePageWithoutSlide:" + pageMove); //alert("changePageWithoutSlide:" + pageMove);
//ページ閲覧ログセット //ページ閲覧ログセット
SetPageLog( contentID, pageMove); COMMON.SetPageLog( contentID, pageMove);
disableAllControl(); disableAllControl();
var isExistBGMPageContent = false; var isExistBGMPageContent = false;
...@@ -2186,13 +2186,13 @@ function displayOverlayForSpecifyContentType(){ ...@@ -2186,13 +2186,13 @@ function displayOverlayForSpecifyContentType(){
var linkUrlTmp = resourceUrl; var linkUrlTmp = resourceUrl;
//DHカスタム //DHカスタム
if( ClientData.serviceOpt_daihatsu() == 'Y'){ if( ClientData.serviceOpt_daihatsu() == 'Y'){
var apiUrl = getApiUrl(ClientData.userInfo_accountPath()); var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath());
linkUrlTmp = linkUrlTmp + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl ; linkUrlTmp = linkUrlTmp + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl ;
} }
handleForContentTypeHTML(linkUrlTmp); handleForContentTypeHTML(linkUrlTmp);
} }
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
if (avwUserEnvObj.os == "android") { if (avwUserEnvObj.os == "android") {
standardRatio = document.documentElement.clientWidth / window.innerWidth; standardRatio = document.documentElement.clientWidth / window.innerWidth;
startDetectZoom({ time: 500, startDetectZoom({ time: 500,
...@@ -2228,7 +2228,7 @@ function displayOverlayForSpecifyContentType(){ ...@@ -2228,7 +2228,7 @@ function displayOverlayForSpecifyContentType(){
//START : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image //START : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image
setLoadingSize(); setLoadingSize();
//END : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image //END : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
if (avwUserEnvObj.os == "android") { if (avwUserEnvObj.os == "android") {
var tempRatio = document.documentElement.clientWidth / window.innerWidth; var tempRatio = document.documentElement.clientWidth / window.innerWidth;
if (tempRatio <= 1) { if (tempRatio <= 1) {
...@@ -2455,7 +2455,7 @@ function enableControlForMediaAndHtmlType(){ ...@@ -2455,7 +2455,7 @@ function enableControlForMediaAndHtmlType(){
$("#control_screen").bind('click', fullScreenForNotPdfType); $("#control_screen").bind('click', fullScreenForNotPdfType);
$("#control_screen_2").bind('click', originalScreenForNotPdfType); $("#control_screen_2").bind('click', originalScreenForNotPdfType);
if (isTouchDevice() == true) {/* set css for device */ if (COMMON.isTouchDevice() == true) {/* set css for device */
$('#imgHome').addClass('home_device'); $('#imgHome').addClass('home_device');
$('#imgBack').addClass('back_device'); $('#imgBack').addClass('back_device');
...@@ -2490,7 +2490,7 @@ function enableControlForImageAndNoneType(){ ...@@ -2490,7 +2490,7 @@ function enableControlForImageAndNoneType(){
$("#control_screen").bind('click', fullScreenForNotPdfType); $("#control_screen").bind('click', fullScreenForNotPdfType);
$("#control_screen_2").bind('click', originalScreenForNotPdfType); $("#control_screen_2").bind('click', originalScreenForNotPdfType);
if (isTouchDevice() == true) {/* set css for device */ if (COMMON.isTouchDevice() == true) {/* set css for device */
$('#imgHome').addClass('home_device'); $('#imgHome').addClass('home_device');
$('#imgBack').addClass('back_device'); $('#imgBack').addClass('back_device');
...@@ -2643,7 +2643,7 @@ function setViewportForWin8(){ ...@@ -2643,7 +2643,7 @@ function setViewportForWin8(){
//Start : TRB00022 - Editor : Long - Date : 08/28/2013 - Summary : For ipad rotate handling. //Start : TRB00022 - Editor : Long - Date : 08/28/2013 - Summary : For ipad rotate handling.
function setViewportForTouchDevice(maximumScale){ function setViewportForTouchDevice(maximumScale){
if (isTouchDevice()) { if (COMMON.isTouchDevice()) {
if(avwUserEnvObj.os == 'ipad'){ if(avwUserEnvObj.os == 'ipad'){
var viewportmeta = document.querySelector('meta[name="viewport"]'); var viewportmeta = document.querySelector('meta[name="viewport"]');
if (viewportmeta) { if (viewportmeta) {
...@@ -2659,7 +2659,7 @@ $("document").ready(function () { ...@@ -2659,7 +2659,7 @@ $("document").ready(function () {
/* check login */ /* check login */
if (!avwCheckLogin(ScreenIds.Login)) return; if (!avwCheckLogin(ScreenIds.Login)) return;
// Set event to prevent leave // Set event to prevent leave
ToogleLogoutNortice(); COMMON.ToogleLogoutNortice();
//START TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary : Fix Jumpcontent //START TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary : Fix Jumpcontent
getContentID(); getContentID();
...@@ -3452,14 +3452,14 @@ function checkExistNextPrePage() { ...@@ -3452,14 +3452,14 @@ function checkExistNextPrePage() {
if (getContent().hasNextPage()) { if (getContent().hasNextPage()) {
//$('#nextpage').show(); //$('#nextpage').show();
//enable('#nextpage'); //COMMON.enable('#nextpage');
$('#nextpage').unbind('click'); $('#nextpage').unbind('click');
$('#nextpage').bind('click', nextPage_click); $('#nextpage').bind('click', nextPage_click);
$('#lastpage').unbind('click'); $('#lastpage').unbind('click');
$('#lastpage').bind('click', lastPage_click); $('#lastpage').bind('click', lastPage_click);
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#nextpage').removeClass(); $('#nextpage').removeClass();
$('#nextpage').addClass('next_device'); $('#nextpage').addClass('next_device');
...@@ -3474,11 +3474,11 @@ function checkExistNextPrePage() { ...@@ -3474,11 +3474,11 @@ function checkExistNextPrePage() {
} }
} else { } else {
//$('#nextpage').hide(); //$('#nextpage').hide();
//disable('#nextpage'); //COMMON.disable('#nextpage');
$('#nextpage').unbind('click'); $('#nextpage').unbind('click');
$('#lastpage').unbind('click'); $('#lastpage').unbind('click');
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#nextpage').removeClass(); $('#nextpage').removeClass();
$('#nextpage').addClass('next_off'); $('#nextpage').addClass('next_off');
...@@ -3497,14 +3497,14 @@ function checkExistNextPrePage() { ...@@ -3497,14 +3497,14 @@ function checkExistNextPrePage() {
//check prev page //check prev page
if (getContent().hasPreviousPage()) { if (getContent().hasPreviousPage()) {
//$('#prevpage').show(); //$('#prevpage').show();
//enable('#prevpage'); //COMMON.enable('#prevpage');
$('#prevpage').unbind('click'); $('#prevpage').unbind('click');
$('#prevpage').bind('click', prevPage_click); $('#prevpage').bind('click', prevPage_click);
$('#firstpage').unbind('click'); $('#firstpage').unbind('click');
$('#firstpage').bind('click', firstPage_click); $('#firstpage').bind('click', firstPage_click);
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#prevpage').removeClass(); $('#prevpage').removeClass();
$('#prevpage').addClass('prev_device'); $('#prevpage').addClass('prev_device');
...@@ -3519,11 +3519,11 @@ function checkExistNextPrePage() { ...@@ -3519,11 +3519,11 @@ function checkExistNextPrePage() {
} }
} else { } else {
//$('#prevpage').hide(); //$('#prevpage').hide();
//disable('#prevpage'); //COMMON.disable('#prevpage');
$('#prevpage').unbind('click'); $('#prevpage').unbind('click');
$('#firstpage').unbind('click'); $('#firstpage').unbind('click');
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#prevpage').removeClass(); $('#prevpage').removeClass();
$('#prevpage').addClass('prev_off'); $('#prevpage').addClass('prev_off');
...@@ -3651,7 +3651,7 @@ function removeObject() { ...@@ -3651,7 +3651,7 @@ function removeObject() {
/* View Component setDefaultEvent */ /* View Component setDefaultEvent */
function setDefaultEvent() { function setDefaultEvent() {
_bTouchDeviceEnabled = isTouchDevice(); _bTouchDeviceEnabled = COMMON.isTouchDevice();
var canvasPre = document.getElementById('mainPre'); var canvasPre = document.getElementById('mainPre');
var canvasNext = document.getElementById('mainNext'); var canvasNext = document.getElementById('mainNext');
...@@ -3838,7 +3838,7 @@ function disableControlsCopyMemo() { ...@@ -3838,7 +3838,7 @@ function disableControlsCopyMemo() {
if (avwUserEnvObj.os != "android") { if (avwUserEnvObj.os != "android") {
$("#slider_page").slider("option", "disabled", true); $("#slider_page").slider("option", "disabled", true);
} }
disable('#txtSearch', '#txtSlider'); COMMON.disable('#txtSearch', '#txtSlider');
$('#button_next_canvas').css('display', 'none'); $('#button_next_canvas').css('display', 'none');
$('#button_pre_canvas').css('display', 'none'); $('#button_pre_canvas').css('display', 'none');
...@@ -3908,11 +3908,11 @@ function enableControlsCopyMemo() { ...@@ -3908,11 +3908,11 @@ function enableControlsCopyMemo() {
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF){
$("#slider_page").slider("option", "disabled", false); $("#slider_page").slider("option", "disabled", false);
enable('#txtSearch', '#txtSlider'); COMMON.enable('#txtSearch', '#txtSlider');
} }
else if(contentType == ContentTypeKeys.Type_NoFile){ else if(contentType == ContentTypeKeys.Type_NoFile){
$("#slider_page").slider("option", "disabled", false); $("#slider_page").slider("option", "disabled", false);
enable('#txtSlider'); COMMON.enable('#txtSlider');
} }
...@@ -3921,7 +3921,7 @@ function enableControlsCopyMemo() { ...@@ -3921,7 +3921,7 @@ function enableControlsCopyMemo() {
$('#button_pre_canvas').css('display', 'block'); $('#button_pre_canvas').css('display', 'block');
} }
if (isTouchDevice() == true) {/* set css for device */ if (COMMON.isTouchDevice() == true) {/* set css for device */
$('#imgHome').addClass('home_device'); $('#imgHome').addClass('home_device');
$('#imgBack').addClass('back_device'); $('#imgBack').addClass('back_device');
/*$('#firstpage').addClass('begin_device'); /*$('#firstpage').addClass('begin_device');
...@@ -4970,7 +4970,7 @@ function sizingNotFull(width, height) { ...@@ -4970,7 +4970,7 @@ function sizingNotFull(width, height) {
//END TRB //END TRB
else{ else{
//adjust size of canvas using for draw //adjust size of canvas using for draw
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$("#main").css('top', marginY); $("#main").css('top', marginY);
$("#main").attr('height', height - (marginY * 2)) $("#main").attr('height', height - (marginY * 2))
.attr('width', width - (marginX * 2)); .attr('width', width - (marginX * 2));
...@@ -5039,7 +5039,7 @@ function sizingFullSize(width, height) { ...@@ -5039,7 +5039,7 @@ function sizingFullSize(width, height) {
} }
//END TRB //END TRB
else{ else{
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$("#main").css('top', '0px'); $("#main").css('top', '0px');
$("#main").attr('height', height) $("#main").attr('height', height)
.attr('width', width - (marginX * 2)); .attr('width', width - (marginX * 2));
...@@ -5240,7 +5240,7 @@ function checkDisableButtonZoom() { ...@@ -5240,7 +5240,7 @@ function checkDisableButtonZoom() {
$('#zoomin').bind('click', zoomIn); $('#zoomin').bind('click', zoomIn);
$('#zoomin').removeClass(); $('#zoomin').removeClass();
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#zoomin').addClass('expansion_device'); $('#zoomin').addClass('expansion_device');
} else { } else {
$('#zoomin').addClass('expansion'); $('#zoomin').addClass('expansion');
...@@ -5257,7 +5257,7 @@ function checkDisableButtonZoom() { ...@@ -5257,7 +5257,7 @@ function checkDisableButtonZoom() {
$('#zoomout').bind('click', zoomOut); $('#zoomout').bind('click', zoomOut);
$('#zoomout').removeClass(); $('#zoomout').removeClass();
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#zoomout').addClass('reduction_device'); $('#zoomout').addClass('reduction_device');
} else { } else {
$('#zoomout').addClass('reduction'); $('#zoomout').addClass('reduction');
...@@ -5274,7 +5274,7 @@ function checkDisableButtonZoom() { ...@@ -5274,7 +5274,7 @@ function checkDisableButtonZoom() {
$('#zoomfit').bind('click', screenFit); $('#zoomfit').bind('click', screenFit);
$('#zoomfit').removeClass(); $('#zoomfit').removeClass();
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#zoomfit').addClass('fit_device'); $('#zoomfit').addClass('fit_device');
} else { } else {
$('#zoomfit').addClass('fit'); $('#zoomfit').addClass('fit');
...@@ -5486,7 +5486,7 @@ function changeScale(scale) { ...@@ -5486,7 +5486,7 @@ function changeScale(scale) {
objectLog.locationHeight = ""; objectLog.locationHeight = "";
objectLog.locationWidth = ""; objectLog.locationWidth = "";
objectLog.eventType = "5"; //暫定でピンチアウト objectLog.eventType = "5"; //暫定でピンチアウト
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
} }
......
...@@ -33,7 +33,7 @@ function showAnket(url, fullscreen, objectId) { ...@@ -33,7 +33,7 @@ function showAnket(url, fullscreen, objectId) {
var dateEnd = new Date(); var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart); var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime); //alert("actionTime:" + actionTime);
SetObjectLogActionTime( contentID, objectId, actionTime ); COMMON.SetObjectLogActionTime( contentID, objectId, actionTime );
$container.removeAttr('style'); $container.removeAttr('style');
hideDialog(); hideDialog();
......
...@@ -211,7 +211,7 @@ var webContentType4 = function (id, x, y, w, h, imageUrl, linkKind, destURI, des ...@@ -211,7 +211,7 @@ var webContentType4 = function (id, x, y, w, h, imageUrl, linkKind, destURI, des
//window.open(destURI, "_blank", "new window"); //window.open(destURI, "_blank", "new window");
window.open(destURI, "_self"); window.open(destURI, "_self");
setTimeout(function(){ToogleLogoutNortice();}, 200); setTimeout(function(){COMMON.ToogleLogoutNortice();}, 200);
//END TRB00070 //END TRB00070
...@@ -639,7 +639,7 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, ...@@ -639,7 +639,7 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt,
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
} }
...@@ -683,7 +683,7 @@ var listImage = function (mediaType, id, imageUrl, x, y, w, h, visible, imageObj ...@@ -683,7 +683,7 @@ var listImage = function (mediaType, id, imageUrl, x, y, w, h, visible, imageObj
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
//SetObjectLog(contentID, objectLog); //COMMON.SetObjectLog(contentID, objectLog);
//--- //---
mediaType4_changeImage++; mediaType4_changeImage++;
...@@ -695,7 +695,7 @@ var listImage = function (mediaType, id, imageUrl, x, y, w, h, visible, imageObj ...@@ -695,7 +695,7 @@ var listImage = function (mediaType, id, imageUrl, x, y, w, h, visible, imageObj
//リソースIDセット //リソースIDセット
objectLog.resourceId = imageObjects[mediaType4_changeImage].resourceId; objectLog.resourceId = imageObjects[mediaType4_changeImage].resourceId;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
/* draw image */ /* draw image */
var imageObj = new Image(); var imageObj = new Image();
...@@ -787,7 +787,7 @@ var trigger = function (mediaType, actionType, id, imageUrl, x, y, w, h, index, ...@@ -787,7 +787,7 @@ var trigger = function (mediaType, actionType, id, imageUrl, x, y, w, h, index,
} }
//詳細ログ格納 //詳細ログ格納
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
}; };
...@@ -822,7 +822,7 @@ var htmlLinkButton = function (mediaType, actionType, id, imageUrl, x, y, w, h, ...@@ -822,7 +822,7 @@ var htmlLinkButton = function (mediaType, actionType, id, imageUrl, x, y, w, h,
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
showHtml(resourceUrl, objectId ); showHtml(resourceUrl, objectId );
...@@ -872,7 +872,7 @@ function showHtml(url, objectId ){ ...@@ -872,7 +872,7 @@ function showHtml(url, objectId ){
var dateEnd = new Date(); var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart); var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime); //alert("actionTime:" + actionTime);
SetObjectLogActionTime( contentID, objectId, actionTime ); COMMON.SetObjectLogActionTime( contentID, objectId, actionTime );
$container.removeAttr('style'); $container.removeAttr('style');
hideDialog(); hideDialog();
...@@ -905,7 +905,7 @@ var anket = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, ...@@ -905,7 +905,7 @@ var anket = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible,
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
/*stop audio on page */ /*stop audio on page */
...@@ -951,7 +951,7 @@ var audioType3 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi ...@@ -951,7 +951,7 @@ var audioType3 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
createAudio(audioFile, playType); createAudio(audioFile, playType);
...@@ -981,7 +981,7 @@ var audioType3 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi ...@@ -981,7 +981,7 @@ var audioType3 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
createAudio(audioFile, playType); createAudio(audioFile, playType);
...@@ -1017,7 +1017,7 @@ var jumpPage = function (mediaType, actionType, id, imageUrl, x, y, w, h, visibl ...@@ -1017,7 +1017,7 @@ var jumpPage = function (mediaType, actionType, id, imageUrl, x, y, w, h, visibl
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
if ((Number(jumpPage) - 1) != getPageIndex()) { if ((Number(jumpPage) - 1) != getPageIndex()) {
...@@ -1048,7 +1048,7 @@ var sendMail = function (mediaType, actionType, id, imageUrl, x, y, w, h, visibl ...@@ -1048,7 +1048,7 @@ var sendMail = function (mediaType, actionType, id, imageUrl, x, y, w, h, visibl
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
MailTo(emailAddress, emailSubject); MailTo(emailAddress, emailSubject);
...@@ -1078,7 +1078,7 @@ var openPopUp = function (mediaType, actionType, id, imageUrl, x, y, w, h, visib ...@@ -1078,7 +1078,7 @@ var openPopUp = function (mediaType, actionType, id, imageUrl, x, y, w, h, visib
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
isOpenPopUpText = true; isOpenPopUpText = true;
...@@ -1116,12 +1116,12 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v ...@@ -1116,12 +1116,12 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
///* set end log */ ///* set end log */
//SetEndLog(contentID); //COMMON.SetEndLog(contentID);
//RegisterLog(); //COMMON.RegisterLog();
//START TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content //START TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content
avwCmsApi(ClientData.userInfo_accountPath(), avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent", "webGetContent",
...@@ -1130,8 +1130,8 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v ...@@ -1130,8 +1130,8 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
function (data) { function (data) {
/* set end log */ /* set end log */
SetEndLog(contentID); COMMON.SetEndLog(contentID);
RegisterLog(); COMMON.RegisterLog();
if(data.contentData.alertMessageLevel){ if(data.contentData.alertMessageLevel){
...@@ -1324,7 +1324,7 @@ function createPwdRequiredTypeDialog(){ ...@@ -1324,7 +1324,7 @@ function createPwdRequiredTypeDialog(){
avwScreenMove(ScreenIds.ContentView); avwScreenMove(ScreenIds.ContentView);
} }
else { else {
$('#lblMessageLimitError').html(format(i18nText('msgLoginErrWrong'), data.errorMessage).toString()).show(); $('#lblMessageLimitError').html(AVWEB.format(i18nText('msgLoginErrWrong'), data.errorMessage).toString()).show();
} }
}, },
function (xhr, statusText, errorThrown) { function (xhr, statusText, errorThrown) {
...@@ -1332,7 +1332,7 @@ function createPwdRequiredTypeDialog(){ ...@@ -1332,7 +1332,7 @@ function createPwdRequiredTypeDialog(){
if (xhr.responseText && xhr.status != 0) { if (xhr.responseText && xhr.status != 0) {
errorCode = JSON.parse(xhr.responseText).errorMessage; errorCode = JSON.parse(xhr.responseText).errorMessage;
} }
$('#lblMessageLimitError').html(format(i18nText('msgLoginErrWrong'), errorCode).toString()).show(); $('#lblMessageLimitError').html(AVWEB.format(i18nText('msgLoginErrWrong'), errorCode).toString()).show();
}); });
} }
...@@ -1363,7 +1363,7 @@ var videoType2 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi ...@@ -1363,7 +1363,7 @@ var videoType2 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
/*stop audio on page */ /*stop audio on page */
...@@ -1427,7 +1427,7 @@ var videoType1 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi ...@@ -1427,7 +1427,7 @@ var videoType1 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
/* stop all audio on page */ /* stop all audio on page */
...@@ -1441,7 +1441,7 @@ var videoType1 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi ...@@ -1441,7 +1441,7 @@ var videoType1 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
var dateEnd = new Date(); var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart); var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime); //alert("actionTime:" + actionTime);
SetObjectLogActionTime( contentID, objectId, actionTime ); COMMON.SetObjectLogActionTime( contentID, objectId, actionTime );
hideDialog(); hideDialog();
/* play audio */ /* play audio */
...@@ -1480,7 +1480,7 @@ var audioType1 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi ...@@ -1480,7 +1480,7 @@ var audioType1 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
createAudio(audioFile, "0") createAudio(audioFile, "0")
...@@ -1510,13 +1510,13 @@ var linkURL = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible ...@@ -1510,13 +1510,13 @@ var linkURL = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible
objectLog.locationY = y; objectLog.locationY = y;
objectLog.locationHeight = h; objectLog.locationHeight = h;
objectLog.locationWidth = w; objectLog.locationWidth = w;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
var linkUrlTmp = linkUrl; var linkUrlTmp = linkUrl;
//DHカスタム //DHカスタム
if( ClientData.serviceOpt_daihatsu() == 'Y'){ if( ClientData.serviceOpt_daihatsu() == 'Y'){
var apiUrl = getApiUrl(ClientData.userInfo_accountPath()); var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath());
linkUrlTmp = linkUrlTmp + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl ; linkUrlTmp = linkUrlTmp + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl ;
} }
...@@ -1565,7 +1565,7 @@ var imagePreview = function (mediaType, actionType, id, imageUrl, x, y, w, h, vi ...@@ -1565,7 +1565,7 @@ var imagePreview = function (mediaType, actionType, id, imageUrl, x, y, w, h, vi
} }
objectLog.actionValue = actionVal; objectLog.actionValue = actionVal;
SetObjectLog(contentID, objectLog); COMMON.SetObjectLog(contentID, objectLog);
//--- //---
createImagePreview(); createImagePreview();
...@@ -1578,7 +1578,7 @@ var imagePreview = function (mediaType, actionType, id, imageUrl, x, y, w, h, vi ...@@ -1578,7 +1578,7 @@ var imagePreview = function (mediaType, actionType, id, imageUrl, x, y, w, h, vi
var dateEnd = new Date(); var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart); var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime); //alert("actionTime:" + actionTime);
SetObjectLogActionTime( contentID, objectId, actionTime ); COMMON.SetObjectLogActionTime( contentID, objectId, actionTime );
hideDialog(); hideDialog();
}); });
...@@ -1794,7 +1794,7 @@ Transition.prototype.flipNextPage = function () { ...@@ -1794,7 +1794,7 @@ Transition.prototype.flipNextPage = function () {
document.title = contentName + ' | ' + i18nText('sysAppTitle'); document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
/* set end log */ /* set end log */
SetEndLog(contentID); COMMON.SetEndLog(contentID);
createLockLayout(false); createLockLayout(false);
initImageCheckMarking(); initImageCheckMarking();
...@@ -1867,7 +1867,7 @@ Transition.prototype.flipNextPage = function () { ...@@ -1867,7 +1867,7 @@ Transition.prototype.flipNextPage = function () {
document.title = contentName + ' | ' + i18nText('sysAppTitle'); document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
/* set end log */ /* set end log */
SetEndLog(contentID); COMMON.SetEndLog(contentID);
createLockLayout(false); createLockLayout(false);
initImageCheckMarking(); initImageCheckMarking();
} }
...@@ -1955,7 +1955,7 @@ Transition.prototype.flipPreviousPage = function () { ...@@ -1955,7 +1955,7 @@ Transition.prototype.flipPreviousPage = function () {
document.title = contentName + ' | ' + i18nText('sysAppTitle'); document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
/* set end log */ /* set end log */
SetEndLog(contentID); COMMON.SetEndLog(contentID);
createLockLayout(false); createLockLayout(false);
initImageCheckMarking(); initImageCheckMarking();
...@@ -2027,7 +2027,7 @@ Transition.prototype.flipPreviousPage = function () { ...@@ -2027,7 +2027,7 @@ Transition.prototype.flipPreviousPage = function () {
document.title = contentName + ' | ' + i18nText('sysAppTitle'); document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
/* set end log */ /* set end log */
SetEndLog(contentID); COMMON.SetEndLog(contentID);
createLockLayout(false); createLockLayout(false);
initImageCheckMarking(); initImageCheckMarking();
} }
...@@ -2111,7 +2111,7 @@ Transition.prototype.flipToPage = function (index) { ...@@ -2111,7 +2111,7 @@ Transition.prototype.flipToPage = function (index) {
document.title = contentName + ' | ' + i18nText('sysAppTitle'); document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
/* set end log */ /* set end log */
SetEndLog(contentID); COMMON.SetEndLog(contentID);
initImageCheckMarking(); initImageCheckMarking();
createLockLayout(false); createLockLayout(false);
...@@ -2190,7 +2190,7 @@ Transition.prototype.flipToPage = function (index) { ...@@ -2190,7 +2190,7 @@ Transition.prototype.flipToPage = function (index) {
document.title = contentName + ' | ' + i18nText('sysAppTitle'); document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
/* set end log */ /* set end log */
SetEndLog(contentID); COMMON.SetEndLog(contentID);
initImageCheckMarking(); initImageCheckMarking();
createLockLayout(false); createLockLayout(false);
......
...@@ -156,7 +156,7 @@ function closeBookmarkBox() { ...@@ -156,7 +156,7 @@ function closeBookmarkBox() {
//change class //change class
$('#listbookmark').removeClass(); $('#listbookmark').removeClass();
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#listbookmark').addClass('bmList_device'); $('#listbookmark').addClass('bmList_device');
} else { } else {
$('#listbookmark').addClass('bmList'); $('#listbookmark').addClass('bmList');
...@@ -202,7 +202,7 @@ function closeIndexBox() { ...@@ -202,7 +202,7 @@ function closeIndexBox() {
//change class //change class
$('#listindex').removeClass(); $('#listindex').removeClass();
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#listindex').addClass('index_device'); $('#listindex').addClass('index_device');
} else { } else {
$('#listindex').addClass('index'); $('#listindex').addClass('index');
...@@ -248,7 +248,7 @@ function closeCopyTextBox() { ...@@ -248,7 +248,7 @@ function closeCopyTextBox() {
//change class //change class
$('#copytext').removeClass(); $('#copytext').removeClass();
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#copytext').addClass('copy_device'); $('#copytext').addClass('copy_device');
} else { } else {
$('#copytext').addClass('copy'); $('#copytext').addClass('copy');
...@@ -298,7 +298,7 @@ function nextPage_click() { ...@@ -298,7 +298,7 @@ function nextPage_click() {
//abe //abe
//alert("nextPage_click:" + contentID ); //alert("nextPage_click:" + contentID );
SetPageLog( contentID, getPageIndex() + 1); COMMON.SetPageLog( contentID, getPageIndex() + 1);
playBGMOfContent(); playBGMOfContent();
playBGMOfPage(getPageIndex() + 1); playBGMOfPage(getPageIndex() + 1);
...@@ -324,7 +324,7 @@ function prevPage_click() { ...@@ -324,7 +324,7 @@ function prevPage_click() {
//abe //abe
//alert("prevPage_click:" + contentID); //alert("prevPage_click:" + contentID);
SetPageLog( contentID, getPageIndex() - 1); COMMON.SetPageLog( contentID, getPageIndex() - 1);
playBGMOfContent(); playBGMOfContent();
playBGMOfPage(getPageIndex() - 1); playBGMOfPage(getPageIndex() - 1);
...@@ -353,7 +353,7 @@ function firstPage_click() { ...@@ -353,7 +353,7 @@ function firstPage_click() {
//abe //abe
//alert("firstPage_click:" + contentID ); //alert("firstPage_click:" + contentID );
SetPageLog( contentID, 0 ); COMMON.SetPageLog( contentID, 0 );
playBGMOfContent(); playBGMOfContent();
playBGMOfPage(0); playBGMOfPage(0);
...@@ -424,7 +424,7 @@ function lastPage_click() { ...@@ -424,7 +424,7 @@ function lastPage_click() {
//abe //abe
//alert("lastPage_click:" + contentID ); //alert("lastPage_click:" + contentID );
SetPageLog( contentID, totalPage - 1 ); COMMON.SetPageLog( contentID, totalPage - 1 );
playBGMOfContent(); playBGMOfContent();
playBGMOfPage(totalPage - 1); playBGMOfPage(totalPage - 1);
...@@ -659,11 +659,11 @@ function update3DImagesArr(){ ...@@ -659,11 +659,11 @@ function update3DImagesArr(){
var tempX = object3d["x"]; var tempX = object3d["x"];
var tempY = object3d["y"]; var tempY = object3d["y"];
tempInitImage = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + getUrlParams(tempInitImage, 'resourceId'); tempInitImage = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + getUrlParams(tempInitImage, 'resourceId');
for(var j = 0; j< temp3dview.length; j++){ for(var j = 0; j< temp3dview.length; j++){
var url = temp3dview[j]; var url = temp3dview[j];
var id = getUrlParamByUrl(url, 'resourceId'); var id = getUrlParamByUrl(url, 'resourceId');
temp3dview[j] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + id; temp3dview[j] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + id;
} }
var arr3D = []; var arr3D = [];
...@@ -1298,8 +1298,8 @@ function mouseUp_CanvasMain(event) { ...@@ -1298,8 +1298,8 @@ function mouseUp_CanvasMain(event) {
function imgBack_click() { function imgBack_click() {
/* set end log */ /* set end log */
SetEndLog(contentID); COMMON.SetEndLog(contentID);
RegisterLog(); COMMON.RegisterLog();
window.onbeforeunload = null; window.onbeforeunload = null;
...@@ -1331,8 +1331,8 @@ function imgHome_click(e) { ...@@ -1331,8 +1331,8 @@ function imgHome_click(e) {
e.preventDefault(); e.preventDefault();
/* set end log */ /* set end log */
SetEndLog(contentID); COMMON.SetEndLog(contentID);
RegisterLog(); COMMON.RegisterLog();
//window.location.href = ScreenIds.Home; //window.location.href = ScreenIds.Home;
avwScreenMove(ScreenIds.Home); avwScreenMove(ScreenIds.Home);
......
...@@ -278,7 +278,7 @@ function disableAllControl() { ...@@ -278,7 +278,7 @@ function disableAllControl() {
$("#slider_page").slider("option", "disabled", true); $("#slider_page").slider("option", "disabled", true);
} }
disable('#txtSearch', '#txtSlider'); COMMON.disable('#txtSearch', '#txtSlider');
$('#button_next_canvas').css('display', 'none'); $('#button_next_canvas').css('display', 'none');
$('#button_pre_canvas').css('display', 'none'); $('#button_pre_canvas').css('display', 'none');
...@@ -376,10 +376,10 @@ function enableAllControl() { ...@@ -376,10 +376,10 @@ function enableAllControl() {
$("#slider_page").slider("option", "disabled", false); $("#slider_page").slider("option", "disabled", false);
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF){
enable('#txtSearch', '#txtSlider'); COMMON.enable('#txtSearch', '#txtSlider');
} }
else if(contentType == ContentTypeKeys.Type_NoFile){ else if(contentType == ContentTypeKeys.Type_NoFile){
enable('#txtSlider'); COMMON.enable('#txtSlider');
} }
} }
...@@ -389,7 +389,7 @@ function enableAllControl() { ...@@ -389,7 +389,7 @@ function enableAllControl() {
$('#button_pre_canvas').css('display', 'block'); $('#button_pre_canvas').css('display', 'block');
} }
if (isTouchDevice() == true) {/* set css for device */ if (COMMON.isTouchDevice() == true) {/* set css for device */
$('#imgHome').addClass('home_device'); $('#imgHome').addClass('home_device');
$('#imgBack').addClass('back_device'); $('#imgBack').addClass('back_device');
......
...@@ -30,19 +30,19 @@ function getJsonContentInfo() { ...@@ -30,19 +30,19 @@ function getJsonContentInfo() {
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content //END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
/* get url */ ///* get url */
function getURL(apiName) { //function getURL(apiName) {
var sysSettings = avwSysSetting(); // var sysSettings = avwSysSetting();
var url = sysSettings.apiResourceDlUrl; // var url = sysSettings.apiResourceDlUrl;
url = format(url, ClientData.userInfo_accountPath()) + '/' + apiName; // url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
return url; // return url;
}; //};
/* get url */ /* get url */
function getURLPageImage(apiName) { function getURLPageImage(apiName) {
var sysSettings = avwSysSetting(); var sysSettings = avwSysSetting();
var url = sysSettings.apiUrl; var url = sysSettings.apiUrl;
url = format(url, ClientData.userInfo_accountPath()) + '/' + apiName; url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
return url; return url;
}; };
...@@ -155,7 +155,7 @@ function getMediaType1(iValueObj) { ...@@ -155,7 +155,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */ /*get mediaInfo */
if (iValueObj.mediaInfo) { if (iValueObj.mediaInfo) {
/* get image from Json */ /* get image from Json */
pageObject['imageUrl'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['imageUrl'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
} else { } else {
pageObject['imageUrl'] = null; pageObject['imageUrl'] = null;
} }
...@@ -163,14 +163,14 @@ function getMediaType1(iValueObj) { ...@@ -163,14 +163,14 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */ /*get mediaInfo */
if (iValueObj.mediaInfo) { if (iValueObj.mediaInfo) {
/* get image from Json */ /* get image from Json */
pageObject['imageUrl'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['imageUrl'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
} else { } else {
pageObject['imageUrl'] = null; pageObject['imageUrl'] = null;
} }
/*get video file */ /*get video file */
if (iValueObj.action.video) { if (iValueObj.action.video) {
pageObject['mediaFile'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceName=" + removeExt(iValueObj.action.video); pageObject['mediaFile'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceName=" + COMMON.removeExt(iValueObj.action.video);
pageObject['media'] = iValueObj.action.video; pageObject['media'] = iValueObj.action.video;
pageObject['mediaResourceId'] = iValueObj.action.resourceId; pageObject['mediaResourceId'] = iValueObj.action.resourceId;
} else { } else {
...@@ -183,7 +183,7 @@ function getMediaType1(iValueObj) { ...@@ -183,7 +183,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */ /*get mediaInfo */
if (iValueObj.mediaInfo) { if (iValueObj.mediaInfo) {
/* get image from Json */ /* get image from Json */
pageObject['imageUrl'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['imageUrl'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
} else { } else {
pageObject['imageUrl'] = null; pageObject['imageUrl'] = null;
} }
...@@ -191,9 +191,9 @@ function getMediaType1(iValueObj) { ...@@ -191,9 +191,9 @@ function getMediaType1(iValueObj) {
/*get video file */ /*get video file */
if (iValueObj.action.music) { if (iValueObj.action.music) {
if (avwUserEnvObj.browser == 'msie') { if (avwUserEnvObj.browser == 'msie') {
pageObject['audioFile'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceName=" + removeExt(iValueObj.action.music) + "&isIE=true"; pageObject['audioFile'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceName=" + COMMON.removeExt(iValueObj.action.music) + "&isIE=true";
} else { } else {
pageObject['audioFile'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceName=" + removeExt(iValueObj.action.music); pageObject['audioFile'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceName=" + COMMON.removeExt(iValueObj.action.music);
} }
pageObject['audio'] = iValueObj.action.music; pageObject['audio'] = iValueObj.action.music;
pageObject['audioResourceId'] = iValueObj.action.resourceId; pageObject['audioResourceId'] = iValueObj.action.resourceId;
...@@ -228,7 +228,7 @@ function getMediaType1(iValueObj) { ...@@ -228,7 +228,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */ /*get mediaInfo */
if (iValueObj.mediaInfo) { if (iValueObj.mediaInfo) {
/* get image from Json */ /* get image from Json */
pageObject['imageUrl'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['imageUrl'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
} else { } else {
pageObject['imageUrl'] = null; pageObject['imageUrl'] = null;
} }
...@@ -240,7 +240,7 @@ function getMediaType1(iValueObj) { ...@@ -240,7 +240,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */ /*get mediaInfo */
if (iValueObj.mediaInfo.resourceId) { if (iValueObj.mediaInfo.resourceId) {
/* get image from Json */ /* get image from Json */
pageObject['imageUrl'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['imageUrl'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
} else { } else {
pageObject['imageUrl'] = null; pageObject['imageUrl'] = null;
} }
...@@ -252,7 +252,7 @@ function getMediaType1(iValueObj) { ...@@ -252,7 +252,7 @@ function getMediaType1(iValueObj) {
//START TRB00077 - Editor : Long - Date: 09/24/2013- Summary : Display image preview no image //START TRB00077 - Editor : Long - Date: 09/24/2013- Summary : Display image preview no image
if(dataResourceImage){ if(dataResourceImage){
for (var nIndex = 0; nIndex < dataResourceImage.length; nIndex++) { for (var nIndex = 0; nIndex < dataResourceImage.length; nIndex++) {
dataImageFromResource.push(getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceName=" + removeExt(dataResourceImage[nIndex])); dataImageFromResource.push(AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceName=" + COMMON.removeExt(dataResourceImage[nIndex]));
} }
pageObject['imagePreviewResourceIds'] = iValueObj.action.resourceIds; pageObject['imagePreviewResourceIds'] = iValueObj.action.resourceIds;
} }
...@@ -263,7 +263,7 @@ function getMediaType1(iValueObj) { ...@@ -263,7 +263,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */ /*get mediaInfo */
if (iValueObj.mediaInfo.resourceId) { if (iValueObj.mediaInfo.resourceId) {
/* get image from Json */ /* get image from Json */
pageObject['imageUrl'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['imageUrl'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
} else { } else {
pageObject['imageUrl'] = null; pageObject['imageUrl'] = null;
} }
...@@ -280,7 +280,7 @@ function getMediaType1(iValueObj) { ...@@ -280,7 +280,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */ /*get mediaInfo */
if (iValueObj.mediaInfo.resourceId) { if (iValueObj.mediaInfo.resourceId) {
/* get image from Json */ /* get image from Json */
pageObject['imageUrl'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['imageUrl'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
} else { } else {
pageObject['imageUrl'] = null; pageObject['imageUrl'] = null;
} }
...@@ -304,7 +304,7 @@ function getMediaType1(iValueObj) { ...@@ -304,7 +304,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */ /*get mediaInfo */
if (iValueObj.mediaInfo.resourceId) { if (iValueObj.mediaInfo.resourceId) {
/* get image from Json */ /* get image from Json */
pageObject['imageUrl'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['imageUrl'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
} else { } else {
pageObject['imageUrl'] = null; pageObject['imageUrl'] = null;
} }
...@@ -316,7 +316,7 @@ function getMediaType1(iValueObj) { ...@@ -316,7 +316,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */ /*get mediaInfo */
if (iValueObj.mediaInfo.resourceId) { if (iValueObj.mediaInfo.resourceId) {
/* get image from Json */ /* get image from Json */
pageObject['imageUrl'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['imageUrl'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
} else { } else {
pageObject['imageUrl'] = null; pageObject['imageUrl'] = null;
} }
...@@ -344,7 +344,7 @@ function getMediaType1(iValueObj) { ...@@ -344,7 +344,7 @@ function getMediaType1(iValueObj) {
resourceUrl = tempData.resourceUrl; resourceUrl = tempData.resourceUrl;
//DHカスタム //DHカスタム
if( ClientData.serviceOpt_daihatsu() == 'Y'){ if( ClientData.serviceOpt_daihatsu() == 'Y'){
var apiUrl = getApiUrl(ClientData.userInfo_accountPath()); var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath());
resourceUrl = resourceUrl + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl ; resourceUrl = resourceUrl + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl ;
} }
break; break;
...@@ -353,12 +353,12 @@ function getMediaType1(iValueObj) { ...@@ -353,12 +353,12 @@ function getMediaType1(iValueObj) {
} }
//END TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get //END TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get
pageObject["imageUrl"] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject["imageUrl"] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
pageObject["resourceUrl"] = resourceUrl; pageObject["resourceUrl"] = resourceUrl;
} }
else if(iValueObj.action.actionType == 12){ else if(iValueObj.action.actionType == 12){
pageObject["imageUrl"] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject["imageUrl"] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
pageObject["resourceUrl"] = resourceUrl; pageObject["resourceUrl"] = resourceUrl;
pageObject["questionNo"] = iValueObj.action.questionNo; pageObject["questionNo"] = iValueObj.action.questionNo;
...@@ -389,7 +389,7 @@ function getMediaType2(iValueObj) { ...@@ -389,7 +389,7 @@ function getMediaType2(iValueObj) {
/*get mediaInfo */ /*get mediaInfo */
if (iValueObj.mediaInfo.resourceId) { if (iValueObj.mediaInfo.resourceId) {
pageObject['mediaFile'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['mediaFile'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
pageObject['media'] = iValueObj.mediaInfo.resourceId; //video1のほうはリソース名で取得している。IDのほうが良いのでは。 pageObject['media'] = iValueObj.mediaInfo.resourceId; //video1のほうはリソース名で取得している。IDのほうが良いのでは。
} else { } else {
pageObject['mediaFile'] = ''; pageObject['mediaFile'] = '';
...@@ -439,9 +439,9 @@ function getMediaType3(iValueObj) { ...@@ -439,9 +439,9 @@ function getMediaType3(iValueObj) {
/*get mediaInfo */ /*get mediaInfo */
if (iValueObj.mediaInfo.resourceId) { if (iValueObj.mediaInfo.resourceId) {
if (avwUserEnvObj.browser == 'msie') { if (avwUserEnvObj.browser == 'msie') {
pageObject['audioFile'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId + "&isIE=true"; pageObject['audioFile'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId + "&isIE=true";
} else { } else {
pageObject['audioFile'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['audioFile'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
} }
pageObject['audioResourceId'] = iValueObj.mediaInfo.resourceId; pageObject['audioResourceId'] = iValueObj.mediaInfo.resourceId;
} else { } else {
...@@ -483,7 +483,7 @@ function getMediaType4(iValueObj) { ...@@ -483,7 +483,7 @@ function getMediaType4(iValueObj) {
for (var nIndex = 0; nIndex < imageObjects.length; nIndex++) { for (var nIndex = 0; nIndex < imageObjects.length; nIndex++) {
/* get image from Json */ /* get image from Json */
imageObjects[nIndex].fileName = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + imageObjects[nIndex].resourceId; imageObjects[nIndex].fileName = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + imageObjects[nIndex].resourceId;
} }
pageObject['dataObjects'] = imageObjects; pageObject['dataObjects'] = imageObjects;
...@@ -530,7 +530,7 @@ function getMediaType5(iValueObj) { ...@@ -530,7 +530,7 @@ function getMediaType5(iValueObj) {
var videoObjects = iValueObj.mediaInfo.media; var videoObjects = iValueObj.mediaInfo.media;
for (var nIndex = 0; nIndex < videoObjects.length; nIndex++) { for (var nIndex = 0; nIndex < videoObjects.length; nIndex++) {
/* get image from Json */ /* get image from Json */
videoObjects[nIndex].fileName = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + videoObjects[nIndex].resourceId; videoObjects[nIndex].fileName = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + videoObjects[nIndex].resourceId;
} }
pageObject['dataObjects'] = videoObjects; pageObject['dataObjects'] = videoObjects;
...@@ -580,7 +580,7 @@ function getMediaType6(iValueObj) { ...@@ -580,7 +580,7 @@ function getMediaType6(iValueObj) {
if(iValueObj.mediaInfo.resourceId){ if(iValueObj.mediaInfo.resourceId){
/* get image from Json */ /* get image from Json */
pageObject['imageUrl'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['imageUrl'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
} }
else{ else{
pageObject['imageUrl'] = 'img/iPad_video.png'; pageObject['imageUrl'] = 'img/iPad_video.png';
...@@ -686,7 +686,7 @@ function getMediaType8(iValueObj) { ...@@ -686,7 +686,7 @@ function getMediaType8(iValueObj) {
pageObject['horizonCount'] = iValueObj.mediaInfo.horizonCount; pageObject['horizonCount'] = iValueObj.mediaInfo.horizonCount;
pageObject['verticalCount'] = iValueObj.mediaInfo.verticalCount; pageObject['verticalCount'] = iValueObj.mediaInfo.verticalCount;
pageObject['initImage'] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject['initImage'] = AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
var _3dViewObject = []; var _3dViewObject = [];
var data3d = iValueObj.action["3dview"]; var data3d = iValueObj.action["3dview"];
...@@ -706,7 +706,7 @@ function getMediaType8(iValueObj) { ...@@ -706,7 +706,7 @@ function getMediaType8(iValueObj) {
} }
_3dViewObject[convNumTo2Char(verticalCnt)+"-"+convNumTo2Char(horizonCnt)] = _3dViewObject[convNumTo2Char(verticalCnt)+"-"+convNumTo2Char(horizonCnt)] =
getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid()
+ "&resourceId=" + data3d[convNumTo2Char(verticalCnt) +"-"+ convNumTo2Char(horizonCnt)].resourceId; + "&resourceId=" + data3d[convNumTo2Char(verticalCnt) +"-"+ convNumTo2Char(horizonCnt)].resourceId;
} }
...@@ -758,7 +758,7 @@ function getMediaType9(iValueObj) { ...@@ -758,7 +758,7 @@ function getMediaType9(iValueObj) {
resourceUrl = tempData.resourceUrl; resourceUrl = tempData.resourceUrl;
//DHカスタム //DHカスタム
if( ClientData.serviceOpt_daihatsu() == 'Y'){ if( ClientData.serviceOpt_daihatsu() == 'Y'){
var apiUrl = getApiUrl(ClientData.userInfo_accountPath()); var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath());
resourceUrl = resourceUrl + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl ; resourceUrl = resourceUrl + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl ;
} }
break; break;
...@@ -930,7 +930,7 @@ function getBookmarklist(pos) { ...@@ -930,7 +930,7 @@ function getBookmarklist(pos) {
$("#bookmarkClosing").click(closeBookmarkBox); $("#bookmarkClosing").click(closeBookmarkBox);
$('#bookmarkBoxHdBM').append(i18nText('txtShioriCtnLs')); $('#bookmarkBoxHdBM').append(i18nText('txtShioriCtnLs'));
//title end //title end
//lockLayout(); //COMMON.lockLayout();
$('#boxBookMark').css('z-index', '101'); $('#boxBookMark').css('z-index', '101');
$('#boxBookMark').css('display', 'block'); $('#boxBookMark').css('display', 'block');
$('#boxBookMark').draggable({ handle: "h1" }); $('#boxBookMark').draggable({ handle: "h1" });
...@@ -964,7 +964,7 @@ function getPageIndexJson(pos) { ...@@ -964,7 +964,7 @@ function getPageIndexJson(pos) {
$("#indexClosing").click(closeIndexBox); $("#indexClosing").click(closeIndexBox);
$('#indexBoxHdIndex').append(i18nText('txtIndex')); $('#indexBoxHdIndex').append(i18nText('txtIndex'));
//title end //title end
//lockLayout(); //COMMON.lockLayout();
$('#boxIndex').css('z-index', '101'); $('#boxIndex').css('z-index', '101');
$('#boxIndex').css('display', 'block'); $('#boxIndex').css('display', 'block');
$('#boxIndex').draggable({ handle: "h1" }); $('#boxIndex').draggable({ handle: "h1" });
...@@ -980,12 +980,12 @@ function getPageIndexJson(pos) { ...@@ -980,12 +980,12 @@ function getPageIndexJson(pos) {
//add parent node //add parent node
var node = new TreeNode(); var node = new TreeNode();
node.IsCategory = true; node.IsCategory = true;
//node.Text = htmlEncode(truncateByBytes(dataContent[i].title, 30)); //node.Text = COMMON.htmlEncode(COMMON.truncateByBytes(dataContent[i].title, 30));
/* check data text */ /* check data text */
if (getBytes(dataContent[i].title) > 30) { if (COMMON.getBytes(dataContent[i].title) > 30) {
node.Text = htmlEncode(truncateByBytes(dataContent[i].title, 30)) + '...'; node.Text = COMMON.htmlEncode(COMMON.truncateByBytes(dataContent[i].title, 30)) + '...';
} else { } else {
node.Text = htmlEncode(dataContent[i].title); node.Text = COMMON.htmlEncode(dataContent[i].title);
} }
node.id = dataContent[i].ID; node.id = dataContent[i].ID;
node.Value = dataContent[i].destPageNumber; node.Value = dataContent[i].destPageNumber;
...@@ -1020,7 +1020,7 @@ function getPageIndexJson(pos) { ...@@ -1020,7 +1020,7 @@ function getPageIndexJson(pos) {
$("#indexClosing").click(closeIndexBox); $("#indexClosing").click(closeIndexBox);
$('#indexBoxHdIndex').append(i18nText('txtIndex')); $('#indexBoxHdIndex').append(i18nText('txtIndex'));
//title end //title end
//lockLayout(); //COMMON.lockLayout();
$('#boxIndex').css('z-index', '101'); $('#boxIndex').css('z-index', '101');
$('#boxIndex').css('display', 'block'); $('#boxIndex').css('display', 'block');
$('#boxIndex').draggable({ handle: "h1" }); $('#boxIndex').draggable({ handle: "h1" });
...@@ -1041,7 +1041,7 @@ function getText() { ...@@ -1041,7 +1041,7 @@ function getText() {
for (var nIndex = 0; nIndex < data.length; nIndex++) { for (var nIndex = 0; nIndex < data.length; nIndex++) {
/* get text of current page */ /* get text of current page */
if (data[nIndex].pageNo == changePageIndex(getPageIndex())) { if (data[nIndex].pageNo == changePageIndex(getPageIndex())) {
sPageText = htmlEncode(data[nIndex].pageText); sPageText = COMMON.htmlEncode(data[nIndex].pageText);
break; break;
} }
} }
...@@ -1074,7 +1074,7 @@ function getContentID() { ...@@ -1074,7 +1074,7 @@ function getContentID() {
//Download resource //Download resource
function getResourceByIdFromAPI(resourceId){ function getResourceByIdFromAPI(resourceId){
return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId; return AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId;
}; };
//Get content info type Image //Get content info type Image
...@@ -1097,7 +1097,7 @@ function getContentInfoTypeImage(){ ...@@ -1097,7 +1097,7 @@ function getContentInfoTypeImage(){
/* window resize event */ /* window resize event */
$(window).resize(function () { $(window).resize(function () {
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
if (avwUserEnvObj.os == "android") { if (avwUserEnvObj.os == "android") {
var tempRatio = document.documentElement.clientWidth / window.innerWidth; var tempRatio = document.documentElement.clientWidth / window.innerWidth;
if (tempRatio <= 1) { if (tempRatio <= 1) {
...@@ -1140,7 +1140,7 @@ function getContentInfoTypeImage(){ ...@@ -1140,7 +1140,7 @@ function getContentInfoTypeImage(){
trackTransforms(context_main); trackTransforms(context_main);
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
if (avwUserEnvObj.os == "android") { if (avwUserEnvObj.os == "android") {
standardRatio = document.documentElement.clientWidth / window.innerWidth; standardRatio = document.documentElement.clientWidth / window.innerWidth;
startDetectZoom({ time: 500, startDetectZoom({ time: 500,
......
...@@ -124,7 +124,7 @@ function dlgGomu_dspOK_click() { ...@@ -124,7 +124,7 @@ function dlgGomu_dspOK_click() {
// Close dialog // Close dialog
//$("#dlgGomu").dialog('close'); //$("#dlgGomu").dialog('close');
/*$("#dlgGomu").fadeOut('medium', function(){ /*$("#dlgGomu").fadeOut('medium', function(){
//unlockLayout(); //COMMON.unlockLayout();
});*/ });*/
$("#dlgGomu").hide(); $("#dlgGomu").hide();
...@@ -222,7 +222,7 @@ $(function () { ...@@ -222,7 +222,7 @@ $(function () {
// --------------------------------- // ---------------------------------
// Setup for easer [start] // Setup for easer [start]
// --------------------------------- // ---------------------------------
if(isTouchDevice() == true){ if(COMMON.isTouchDevice() == true){
document.getElementById('dlgGomu_dspOK').addEventListener('touchstart',touchStart_BtnOk_Gomu,false); document.getElementById('dlgGomu_dspOK').addEventListener('touchstart',touchStart_BtnOk_Gomu,false);
document.getElementById('dlgGomu_dspCancel').addEventListener('touchstart',touchStart_BtnCancel_Gomu,false); document.getElementById('dlgGomu_dspCancel').addEventListener('touchstart',touchStart_BtnCancel_Gomu,false);
} }
......
...@@ -177,7 +177,7 @@ function handleImagePreviewEvent(){ ...@@ -177,7 +177,7 @@ function handleImagePreviewEvent(){
$('#main-control-prev').mouseleave(mainControlPrevMouseLeaveFunction); $('#main-control-prev').mouseleave(mainControlPrevMouseLeaveFunction);
if (isTouchDevice() == false) { if (COMMON.isTouchDevice() == false) {
//$('.main-control').mouseenter(mainControlMouseEnterFunction); //$('.main-control').mouseenter(mainControlMouseEnterFunction);
$('#main-control-next').mouseenter(mainControlNextMouseEnterFunction); $('#main-control-next').mouseenter(mainControlNextMouseEnterFunction);
$('#main-control-prev').mouseenter(mainControlPrevMouseEnterFunction); $('#main-control-prev').mouseenter(mainControlPrevMouseEnterFunction);
...@@ -242,7 +242,7 @@ var slideshow_isTransaction = false; ...@@ -242,7 +242,7 @@ var slideshow_isTransaction = false;
//Main Image next icon function //Main Image next icon function
function imageMainSelectNextFunction() { function imageMainSelectNextFunction() {
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#main-control-next').css('opacity', '0.5'); $('#main-control-next').css('opacity', '0.5');
} }
...@@ -276,7 +276,7 @@ function imageMainSelectNextFunction() { ...@@ -276,7 +276,7 @@ function imageMainSelectNextFunction() {
//Main Image prev icon function //Main Image prev icon function
function imageMainSelectPrevFunction() { function imageMainSelectPrevFunction() {
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#main-control-prev').css('opacity', '0.5'); $('#main-control-prev').css('opacity', '0.5');
} }
...@@ -374,7 +374,7 @@ function renderMainImage(i) { ...@@ -374,7 +374,7 @@ function renderMainImage(i) {
mainImg.css('background-image', 'url(' + slideshowImageCollection[i].thumbnail + ')'); mainImg.css('background-image', 'url(' + slideshowImageCollection[i].thumbnail + ')');
slideshow_isTransaction = false; slideshow_isTransaction = false;
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
$('#main-control-next').css('opacity', '0'); $('#main-control-next').css('opacity', '0');
$('#main-control-prev').css('opacity', '0'); $('#main-control-prev').css('opacity', '0');
} }
......
...@@ -145,12 +145,12 @@ function initPage() { ...@@ -145,12 +145,12 @@ function initPage() {
initDisplayToolbarDevice(); initDisplayToolbarDevice();
// Lock screen // Lock screen
LockScreen(); COMMON.LockScreen();
StartTimerUpdateLog(); StartTimerUpdateLog();
/* set start log */ /* set start log */
SetStartLog(contentID); COMMON.SetStartLog(contentID);
/* get info of content */ /* get info of content */
//Start Function: No.12 //Start Function: No.12
...@@ -346,7 +346,7 @@ function initPage() { ...@@ -346,7 +346,7 @@ function initPage() {
//START : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image //START : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image
setLoadingSize(); setLoadingSize();
//END : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image //END : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
if (avwUserEnvObj.os == "android") { if (avwUserEnvObj.os == "android") {
var tempRatio = document.documentElement.clientWidth / window.innerWidth; var tempRatio = document.documentElement.clientWidth / window.innerWidth;
if (tempRatio <= 1) { if (tempRatio <= 1) {
...@@ -399,7 +399,7 @@ function initPage() { ...@@ -399,7 +399,7 @@ function initPage() {
//nAjaxLoad = 0; //nAjaxLoad = 0;
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
if (avwUserEnvObj.os == "android") { if (avwUserEnvObj.os == "android") {
standardRatio = document.documentElement.clientWidth / window.innerWidth; standardRatio = document.documentElement.clientWidth / window.innerWidth;
startDetectZoom({ time: 500, startDetectZoom({ time: 500,
...@@ -486,7 +486,7 @@ function initPage() { ...@@ -486,7 +486,7 @@ function initPage() {
/* window resize event */ /* window resize event */
$(window).resize(function () { $(window).resize(function () {
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
if (avwUserEnvObj.os == "android") { if (avwUserEnvObj.os == "android") {
var tempRatio = document.documentElement.clientWidth / window.innerWidth; var tempRatio = document.documentElement.clientWidth / window.innerWidth;
if (tempRatio <= 1) { if (tempRatio <= 1) {
...@@ -539,7 +539,7 @@ function initPage() { ...@@ -539,7 +539,7 @@ function initPage() {
//nAjaxLoad = 0; //nAjaxLoad = 0;
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
if (avwUserEnvObj.os == "android") { if (avwUserEnvObj.os == "android") {
standardRatio = document.documentElement.clientWidth / window.innerWidth; standardRatio = document.documentElement.clientWidth / window.innerWidth;
startDetectZoom({ time: 500, startDetectZoom({ time: 500,
...@@ -595,13 +595,13 @@ function initPageMediaAndHtmlType(){ ...@@ -595,13 +595,13 @@ function initPageMediaAndHtmlType(){
initDisplayToolbarDevice(); initDisplayToolbarDevice();
// Lock screen // Lock screen
LockScreen(); COMMON.LockScreen();
//START TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log //START TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log
StartTimerUpdateLog(); StartTimerUpdateLog();
/* set start log */ /* set start log */
SetStartLog(contentID); COMMON.SetStartLog(contentID);
//END TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log //END TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log
//enable SpecifyControl //enable SpecifyControl
...@@ -631,7 +631,7 @@ function initPageMediaAndHtmlType(){ ...@@ -631,7 +631,7 @@ function initPageMediaAndHtmlType(){
$("#slider_page").slider("option", "disabled", true); $("#slider_page").slider("option", "disabled", true);
} }
disable('#txtSearch', '#txtSlider'); COMMON.disable('#txtSearch', '#txtSlider');
}; };
//Start: Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary : Create next and previous canvas //Start: Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary : Create next and previous canvas
......
...@@ -65,7 +65,7 @@ function dlgMarking_dspSave_click() { ...@@ -65,7 +65,7 @@ function dlgMarking_dspSave_click() {
marking.content = saveCanvas.toDataURL("image/png"); marking.content = saveCanvas.toDataURL("image/png");
//END TRB00098 //END TRB00098
//=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new marking/maker. //=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new marking/maker.
marking.markingid = getUUID(); marking.markingid = COMMON.getUUID();
marking.registerDate = new Date(); marking.registerDate = new Date();
//=== End Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new marking/maker. //=== End Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new marking/maker.
/* insert marking */ /* insert marking */
......
...@@ -66,7 +66,7 @@ function memoSaveFunction(){ ...@@ -66,7 +66,7 @@ function memoSaveFunction(){
//memoObj.posY = imagePt.y; //memoObj.posY = imagePt.y;
//=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new memo. //=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new memo.
memoObj.memoid = getUUID(); memoObj.memoid = COMMON.getUUID();
memoObj.registerDate = new Date(); memoObj.registerDate = new Date();
//=== End Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new memo. //=== End Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new memo.
tempArr = ClientData.MemoData(); tempArr = ClientData.MemoData();
......
...@@ -109,7 +109,7 @@ function openContentDetail() { ...@@ -109,7 +109,7 @@ function openContentDetail() {
// Get content detail // Get content detail
displayData.contentTitle = data.contentData.contentName; displayData.contentTitle = data.contentData.contentName;
displayData.contentDetail = data.contentData.contentDetail; displayData.contentDetail = data.contentData.contentDetail;
displayData.deliveryDate = convertToDate(data.contentData.deliveryStartDate); displayData.deliveryDate = COMMON.convertToDate(data.contentData.deliveryStartDate);
//Start Function : No.12 -- Editor : Viet Nguyen -- Date : 08/01/2013 -- Summary : Create new function to return content type of content. //Start Function : No.12 -- Editor : Viet Nguyen -- Date : 08/01/2013 -- Summary : Create new function to return content type of content.
...@@ -126,7 +126,7 @@ function openContentDetail() { ...@@ -126,7 +126,7 @@ function openContentDetail() {
} }
} }
// Show to screen // Show to screen
ShowContent(displayData.contentID, truncate(displayData.contentTitle, 20), displayData.contentDetail, ClientData.contentInfo_contentThumbnail(), displayData.deliveryDate, displayData.pages); ShowContent(displayData.contentID, COMMON.truncate(displayData.contentTitle, 20), displayData.contentDetail, ClientData.contentInfo_contentThumbnail(), displayData.deliveryDate, displayData.pages);
}, },
null null
); );
...@@ -143,7 +143,7 @@ function openContentDetail() { ...@@ -143,7 +143,7 @@ function openContentDetail() {
// Close content detail // Close content detail
function contentDetailClose_Click(e) { function contentDetailClose_Click(e) {
e.preventDefault(); e.preventDefault();
unlockLayout(); COMMON.unlockLayout();
$("#contentDetail").hide(); $("#contentDetail").hide();
$("#sectionContentDetail").hide(); $("#sectionContentDetail").hide();
}; };
...@@ -221,11 +221,11 @@ function contentdetail_dspRead_Click_callback(outputId) { ...@@ -221,11 +221,11 @@ function contentdetail_dspRead_Click_callback(outputId) {
if (ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Others) { if (ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Others) {
// Get content detail // Get content detail
downloadResourceById(ClientData.contentInfo_contentId()); HEADER.downloadResourceById(ClientData.contentInfo_contentId());
} }
else if(ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Link){ else if(ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Link){
// Get content detail // Get content detail
viewLinkContentById(ClientData.contentInfo_contentId()); HEADER.viewLinkContentById(ClientData.contentInfo_contentId());
} }
else { else {
avwScreenMove(ScreenIds.ContentView); avwScreenMove(ScreenIds.ContentView);
...@@ -234,13 +234,13 @@ function contentdetail_dspRead_Click_callback(outputId) { ...@@ -234,13 +234,13 @@ function contentdetail_dspRead_Click_callback(outputId) {
//Start Function : No.12 -- Editor : Viet Nguyen -- Date : 08/01/2013 -- Summary : Create new function to return content type of content. //Start Function : No.12 -- Editor : Viet Nguyen -- Date : 08/01/2013 -- Summary : Create new function to return content type of content.
/* get url */ ///* get url */
function getURL(apiName) { //function getURL(apiName) {
var sysSettings = avwSysSetting(); // var sysSettings = avwSysSetting();
var url = sysSettings.apiResourceDlUrl; // var url = sysSettings.apiResourceDlUrl;
url = format(url, ClientData.userInfo_accountPath()) + '/' + apiName; // url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
return url; // return url;
}; //};
//Check content type is pdf content //Check content type is pdf content
function isPdfContent(contentType){ function isPdfContent(contentType){
...@@ -358,7 +358,7 @@ function ShowContent(contentID, contentTitle, contentDetail, contentThumbnail, d ...@@ -358,7 +358,7 @@ function ShowContent(contentID, contentTitle, contentDetail, contentThumbnail, d
// Show pages // Show pages
for (var nIndex = 0; nIndex < pages.length; nIndex++) { for (var nIndex = 0; nIndex < pages.length; nIndex++) {
//insertRow(imgSample, pages[nIndex].pageText, pages[nIndex].pageNo); //insertRow(imgSample, pages[nIndex].pageText, pages[nIndex].pageNo);
insertRow(pages[nIndex].pageThumbnail, truncate(getLines(pages[nIndex].pageText, 3), 45), pages[nIndex].pageNo); //55 insertRow(pages[nIndex].pageThumbnail, COMMON.truncate(COMMON.getLines(pages[nIndex].pageText, 3), 45), pages[nIndex].pageNo); //55
} }
}; };
...@@ -367,7 +367,7 @@ function insertRow(pageThumbnail, pageText, pageNo) { ...@@ -367,7 +367,7 @@ function insertRow(pageThumbnail, pageText, pageNo) {
var newRow = ""; var newRow = "";
newRow += "<ul>"; newRow += "<ul>";
newRow += '<li class="list_img"><img src="' + pageThumbnail + '" alt="" width="90" /></li>'; newRow += '<li class="list_img"><img src="' + pageThumbnail + '" alt="" width="90" /></li>';
newRow += '<li class="list_title"><a href="#">' + htmlEncode(pageText) + '</a></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">' + i18nText('txtPage') + '</label>' + pageNo + '</li>';
newRow += "</ul>"; newRow += "</ul>";
...@@ -539,16 +539,16 @@ $(function () { ...@@ -539,16 +539,16 @@ $(function () {
Setting dialog [ end ] Setting dialog [ end ]
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
*/ */
function truncate(strInput, length){ //function truncate(strInput, length){
if (strInput.length <= length) // if (strInput.length <= length)
{ // {
return strInput; // return strInput;
} // }
else // else
{ // {
return strInput.substring(0, length) + "..."; // return strInput.substring(0, length) + "...";
} // }
}; //};
function resetLoadingImageSize(){ function resetLoadingImageSize(){
$("#imgContentThumbnail").attr('height','25px'); $("#imgContentThumbnail").attr('height','25px');
......
...@@ -5,13 +5,12 @@ ...@@ -5,13 +5,12 @@
/// <reference path="../common/js/jquery-ui-1.8.23.custom.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/jquery.toastmessage.js" />
var timeWaitCloseNewInfoPushMessage = 5000; // time wait close info new push message 5 seconds
var currentPagePushMessage = 1;
var isHoverOn = false;
//名前空間用のオブジェクトを用意する //名前空間用のオブジェクトを用意する
var header = {}; var HEADER = {};
HEADER.timeWaitCloseNewInfoPushMessage = 5000; // time wait close info new push message 5 seconds
HEADER.currentPagePushMessage = 1;
HEADER.isHoverOn = false;
$(document).ready(function () { $(document).ready(function () {
...@@ -20,52 +19,52 @@ $(document).ready(function () { ...@@ -20,52 +19,52 @@ $(document).ready(function () {
// Set event to prevent leave // Set event to prevent leave
//avwSetLogoutNortice(); //avwSetLogoutNortice();
if (ClientData.requirePasswordChange() != 1) { if (ClientData.requirePasswordChange() != 1) {
ToogleLogoutNortice(); COMMON.ToogleLogoutNortice();
} }
//Toggle Searchbox //Toggle Searchbox
$('input#searchbox-key').click(toggleSearchPanel); $('input#searchbox-key').click(HEADER.toggleSearchPanel);
$("#searchbox-key").attr('placeholder', i18nText('msgPlaceHolder')); $("#searchbox-key").attr('placeholder', i18nText('msgPlaceHolder'));
//Go to Search Page //Go to Search Page
$('#searchbox-search').click(searchHeaderButtonFunction); $('#searchbox-search').click(HEADER.searchHeaderButtonFunction);
//Change Language JP //Change Language JP
$('#language-jp').click(changeLanguageJa); $('#language-jp').click(HEADER.changeLanguageJa);
//Change Language KR //Change Language KR
$('#language-kr').click(changeLanguageKo); $('#language-kr').click(HEADER.changeLanguageKo);
//Change Language EN //Change Language EN
$('#language-en').click(changeLanguageEn); $('#language-en').click(HEADER.changeLanguageEn);
//Go To Bookmark Page //Go To Bookmark Page
$('#dspShiori').click(bookmarkFunction); $('#dspShiori').click(HEADER.bookmarkFunction);
//Go To update configuration //Go To update configuration
$('#dspSetting').click(updateConfigFunction); $('#dspSetting').click(HEADER.updateConfigFunction);
// hide logout button with anonymous user // hide logout button with anonymous user
if (isAnonymousLogin()) { if (COMMON.isAnonymousLogin()) {
$('#dspLogout').hide(); $('#dspLogout').hide();
$('#dspSetting').hide(); $('#dspSetting').hide();
} }
else { else {
//Go To Login Page //Go To Login Page
$('#dspLogout').click(logoutFunction); $('#dspLogout').click(HEADER.logoutFunction);
$('#dspLogout').show(); $('#dspLogout').show();
$('#dspSetting').show(); $('#dspSetting').show();
} }
$('#dspViewHistory').click(historyClickFunction); $('#dspViewHistory').click(HEADER.historyClickFunction);
$('#dspHome').click(homeClickFunction); $('#dspHome').click(HEADER.homeClickFunction);
//Hide search panel until click on text field //Hide search panel until click on text field
$('div#header-searchbox').css('display', 'none'); $('div#header-searchbox').css('display', 'none');
if (isAnonymousLogin()) { if (COMMON.isAnonymousLogin()) {
$('#li-login-username').hide(); $('#li-login-username').hide();
} }
else { else {
...@@ -76,59 +75,59 @@ $(document).ready(function () { ...@@ -76,59 +75,59 @@ $(document).ready(function () {
$('#login-username').attr("title", ClientData.userInfo_userName()); $('#login-username').attr("title", ClientData.userInfo_userName());
} }
$('#dlgConfirmBackup-backup').click(confirmWithBackupFunction); $('#dlgConfirmBackup-backup').click(HEADER.confirmWithBackupFunction);
$('#dlgConfirmBackup-withoutbackup').click(confirmWithoutBackupFunction); $('#dlgConfirmBackup-withoutbackup').click(confirmWithoutBackupFunction);
$('#dlgConfirmBackup1').hide(); $('#dlgConfirmBackup1').hide();
$('#searchbox-key').keydown(headerSearchKeyDownEventFunction); $('#searchbox-key').keydown(HEADER.headerSearchKeyDownEventFunction);
$('#searchbox-content-header').click(headerSearchContentClickFunction); $('#searchbox-content-header').click(HEADER.headerSearchContentClickFunction);
$('#searchbox-tag-header').click(headerSearchTagClickFunction); $('#searchbox-tag-header').click(HEADER.headerSearchTagClickFunction);
$('#searchbox-body-header').click(headerSearchBodyClickFunction); $('#searchbox-body-header').click(HEADER.headerSearchBodyClickFunction);
//init push message //init push message
initPushMessage(); HEADER.initPushMessage();
//$('*').click(handleHeaderSearchBoxEvent); //$('*').click(handleHeaderSearchBoxEvent);
if (isTouchDevice() == false) { if (COMMON.isTouchDevice() == false) {
$('#searchbox-key').hover(searchBoxHoverFunction, searchBoxHoverOffFunction); $('#searchbox-key').hover(HEADER.searchBoxHoverFunction, HEADER.searchBoxHoverOffFunction);
$('#header-searchbox').hover(searchBoxHoverFunction, searchBoxHoverOffFunction); $('#header-searchbox').hover(HEADER.searchBoxHoverFunction, HEADER.searchBoxHoverOffFunction);
} }
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
var bodyTag = document.getElementsByTagName('body')[0]; var bodyTag = document.getElementsByTagName('body')[0];
bodyTag.addEventListener('touchstart', bodyClickFunction, false); bodyTag.addEventListener('touchstart', HEADER.bodyClickFunction, false);
} }
else { else {
$('body').click(bodyClickFunction); $('body').click(HEADER.bodyClickFunction);
} }
}); });
function searchBoxHoverFunction(){ HEADER.searchBoxHoverFunction = function(){
isHoverOn = true; HEADER.isHoverOn = true;
}; };
function searchBoxHoverOffFunction() { HEADER.searchBoxHoverOffFunction = function() {
isHoverOn = false; HEADER.isHoverOn = false;
}; };
// check disabled button // check disabled button
function checkDisabledButton(selector, buttonid) { HEADER.checkDisabledButton = function(selector, buttonid) {
$(selector).click( $(selector).click(
function () { function () {
setDisabledButton(selector, buttonid); HEADER.setDisabledButton(selector, buttonid);
}); });
setDisabledButton(selector, buttonid); HEADER.setDisabledButton(selector, buttonid);
}; };
function setDisabledButton(selector, buttonid) { HEADER.setDisabledButton = function(selector, buttonid) {
var isDisabled = $(selector + ':checked').length == 0; var isDisabled = $(selector + ':checked').length == 0;
if (isDisabled) { if (isDisabled) {
$(buttonid).addClass('disabled'); $(buttonid).addClass('disabled');
...@@ -139,8 +138,8 @@ function setDisabledButton(selector, buttonid) { ...@@ -139,8 +138,8 @@ function setDisabledButton(selector, buttonid) {
}; };
function bodyClickFunction(event) { HEADER.bodyClickFunction = function(event) {
if (isTouchDevice()) { if (COMMON.isTouchDevice()) {
// Check mouse is in rectangle of searching panel // Check mouse is in rectangle of searching panel
if ($('#header-searchbox').is(":visible")) //if ($('#header-searchbox').css('display') != "none") if ($('#header-searchbox').is(":visible")) //if ($('#header-searchbox').css('display') != "none")
...@@ -166,10 +165,10 @@ function bodyClickFunction(event) { ...@@ -166,10 +165,10 @@ function bodyClickFunction(event) {
// check mouse position in search region // check mouse position in search region
if (currPosX >= leftsearch && currPosX <= rightsearch && currPosY >= topsearch && currPosY <= bottomsearch) { if (currPosX >= leftsearch && currPosX <= rightsearch && currPosY >= topsearch && currPosY <= bottomsearch) {
isHoverOn = true; HEADER.isHoverOn = true;
} }
else { else {
isHoverOn = false; HEADER.isHoverOn = false;
$('#header-searchbox').hide(); $('#header-searchbox').hide();
} }
...@@ -179,56 +178,56 @@ function bodyClickFunction(event) { ...@@ -179,56 +178,56 @@ function bodyClickFunction(event) {
// && currPosY >= $('#header-searchbox').position().top // && currPosY >= $('#header-searchbox').position().top
// && currPosY <= ($('#header-searchbox').position().top + $('#header-searchbox').height())) { // && currPosY <= ($('#header-searchbox').position().top + $('#header-searchbox').height())) {
// isHoverOn = true; // HEADER.isHoverOn = true;
// } // }
// else { // else {
// isHoverOn = false; // HEADER.isHoverOn = false;
// } // }
} }
} }
else { else {
if (!isHoverOn) { if (!HEADER.isHoverOn) {
$('#header-searchbox').hide(); $('#header-searchbox').hide();
} }
} }
}; };
function headerSearchBodyClickFunction() { HEADER.headerSearchBodyClickFunction = function() {
$('#searchbox-body').attr('checked','checked'); $('#searchbox-body').attr('checked','checked');
$('#searchbox-tag').removeAttr('checked'); $('#searchbox-tag').removeAttr('checked');
$('#searchbox-content').removeAttr('checked'); $('#searchbox-content').removeAttr('checked');
isHoverOn = true; HEADER.isHoverOn = true;
}; };
function headerSearchTagClickFunction() { HEADER.headerSearchTagClickFunction = function() {
$('#searchbox-tag').attr('checked','checked'); $('#searchbox-tag').attr('checked','checked');
$('#searchbox-body').removeAttr('checked'); $('#searchbox-body').removeAttr('checked');
$('#searchbox-content').removeAttr('checked'); $('#searchbox-content').removeAttr('checked');
isHoverOn = true; HEADER.isHoverOn = true;
}; };
function headerSearchContentClickFunction() { HEADER.headerSearchContentClickFunction = function() {
$('#searchbox-content').attr('checked','checked'); $('#searchbox-content').attr('checked','checked');
$('#searchbox-tag').removeAttr('checked'); $('#searchbox-tag').removeAttr('checked');
$('#searchbox-body').removeAttr('checked'); $('#searchbox-body').removeAttr('checked');
isHoverOn = true; HEADER.isHoverOn = true;
}; };
//function header search box key down function //function header search box key down function
function headerSearchKeyDownEventFunction(e){ HEADER.headerSearchKeyDownEventFunction = function(e){
var code = (e.keyCode ? e.keyCode : e.which); var code = (e.keyCode ? e.keyCode : e.which);
if(code == 13) { //Enter keycode if(code == 13) { //Enter keycode
$('#searchbox-search').click(); $('#searchbox-search').click();
} }
isHoverOn = true; HEADER.isHoverOn = true;
}; };
//Toggle Search Panel Click function //Toggle Search Panel Click function
function toggleSearchPanel(){ HEADER.toggleSearchPanel = function(){
if ($("div#header-searchbox").is(":hidden")) { if ($("div#header-searchbox").is(":hidden")) {
// show radio options // show radio options
...@@ -246,7 +245,7 @@ function toggleSearchPanel(){ ...@@ -246,7 +245,7 @@ function toggleSearchPanel(){
}; };
//Button Search Event function //Button Search Event function
function searchHeaderButtonFunction(){ HEADER.searchHeaderButtonFunction = function(){
var content = $('#searchbox-content').attr('checked'); var content = $('#searchbox-content').attr('checked');
var tag = $('#searchbox-tag').attr('checked'); var tag = $('#searchbox-tag').attr('checked');
var body = $('#searchbox-body').attr('checked'); var body = $('#searchbox-body').attr('checked');
...@@ -272,13 +271,13 @@ function searchHeaderButtonFunction(){ ...@@ -272,13 +271,13 @@ function searchHeaderButtonFunction(){
avwScreenMove(ScreenIds.ContentSearch); avwScreenMove(ScreenIds.ContentSearch);
}; };
function homeClickFunction(){ HEADER.homeClickFunction = function(){
//window.location = ScreenIds.Home; //window.location = ScreenIds.Home;
avwScreenMove(ScreenIds.Home); avwScreenMove(ScreenIds.Home);
}; };
//Change Language Japanese function //Change Language Japanese function
function changeLanguageJa(){ HEADER.changeLanguageJa = function(){
changeLanguage(Consts.ConstLanguage_Ja); changeLanguage(Consts.ConstLanguage_Ja);
//ClientData.userInfo_language(Consts.ConstLanguage_Ja); //ClientData.userInfo_language(Consts.ConstLanguage_Ja);
//$('#control-sort-titlekana').css('display','inline-block'); //$('#control-sort-titlekana').css('display','inline-block');
...@@ -291,7 +290,7 @@ function changeLanguageJa(){ ...@@ -291,7 +290,7 @@ function changeLanguageJa(){
}; };
//Change Language English functions //Change Language English functions
function changeLanguageEn(){ HEADER.changeLanguageEn = function(){
changeLanguage(Consts.ConstLanguage_En); changeLanguage(Consts.ConstLanguage_En);
//ClientData.userInfo_language(Consts.ConstLanguage_En); //ClientData.userInfo_language(Consts.ConstLanguage_En);
//$('#control-sort-titlekana').css('display','none'); //$('#control-sort-titlekana').css('display','none');
...@@ -304,7 +303,7 @@ function changeLanguageEn(){ ...@@ -304,7 +303,7 @@ function changeLanguageEn(){
}; };
//Change Language English function //Change Language English function
function changeLanguageKo(){ HEADER.changeLanguageKo = function(){
changeLanguage(Consts.ConstLanguage_Ko); changeLanguage(Consts.ConstLanguage_Ko);
//ClientData.userInfo_language(Consts.ConstLanguage_Ko); //ClientData.userInfo_language(Consts.ConstLanguage_Ko);
//$('#control-sort-titlekana').css('display','none'); //$('#control-sort-titlekana').css('display','none');
...@@ -317,19 +316,19 @@ function changeLanguageKo(){ ...@@ -317,19 +316,19 @@ function changeLanguageKo(){
}; };
//Shiori function //Shiori function
function bookmarkFunction(){ HEADER.bookmarkFunction = function(){
//window.location = ScreenIds.BookmarkList; //window.location = ScreenIds.BookmarkList;
avwScreenMove(ScreenIds.BookmarkList); avwScreenMove(ScreenIds.BookmarkList);
}; };
//Update Config function //Update Config function
function updateConfigFunction(){ HEADER.updateConfigFunction = function(){
//window.location = ScreenIds.Setting; //window.location = ScreenIds.Setting;
avwScreenMove(ScreenIds.Setting); avwScreenMove(ScreenIds.Setting);
}; };
//Logout function //Logout function
function logoutFunction() { HEADER.logoutFunction = function() {
// check content is changed, update status option backup // check content is changed, update status option backup
...@@ -385,7 +384,7 @@ function logoutFunction() { ...@@ -385,7 +384,7 @@ function logoutFunction() {
$('#dlgConfirmBackup1').center(); $('#dlgConfirmBackup1').center();
// check disabled button backup // check disabled button backup
checkDisabledButton('#dlgConfirmBackup1 .option_backup input', '#dlgConfirmBackup-backup'); HEADER.checkDisabledButton('#dlgConfirmBackup1 .option_backup input', '#dlgConfirmBackup-backup');
} }
else { // Do not show confirming dialog else { // Do not show confirming dialog
if (ClientData.userOpt_logoutMode() == null || ClientData.userOpt_logoutMode() == undefined) { if (ClientData.userOpt_logoutMode() == null || ClientData.userOpt_logoutMode() == undefined) {
...@@ -401,33 +400,33 @@ function logoutFunction() { ...@@ -401,33 +400,33 @@ function logoutFunction() {
var isBackupMemo=ClientData.userOpt_bkMemoFlag() == 1; var isBackupMemo=ClientData.userOpt_bkMemoFlag() == 1;
var isBackupBookmark = ClientData.userOpt_bkShioriFlag() == 1; var isBackupBookmark = ClientData.userOpt_bkShioriFlag() == 1;
DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark, true); HEADER.DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark, true);
} }
else if (ClientData.userOpt_logoutMode() == 1) { // Logout without backup else if (ClientData.userOpt_logoutMode() == 1) { // Logout without backup
// Do nothing // Do nothing
//Logout //Logout
webLogoutEvent(); HEADER.webLogoutEvent();
} }
} }
} }
} }
// In case: user_data_backup != "Y" -> No backup, logout // In case: user_data_backup != "Y" -> No backup, logout
else { else {
webLogoutEvent(); HEADER.webLogoutEvent();
} }
} }
else{ else{
webLogoutEvent(); HEADER.webLogoutEvent();
} }
}; };
function historyClickFunction(){ HEADER.historyClickFunction = function(){
//window.location = ScreenIds.History; //window.location = ScreenIds.History;
avwScreenMove(ScreenIds.History); avwScreenMove(ScreenIds.History);
}; };
//Web Logout Event //Web Logout Event
function webLogoutEvent(){ HEADER.webLogoutEvent = function(){
var isExisted = false; var isExisted = false;
...@@ -471,11 +470,11 @@ function confirmWithoutBackupFunction(e) { ...@@ -471,11 +470,11 @@ function confirmWithoutBackupFunction(e) {
ClientData.userOpt_logoutMode(1); // In next time, if choose: [do not show dialog], will not backup and logout ClientData.userOpt_logoutMode(1); // In next time, if choose: [do not show dialog], will not backup and logout
//window.location = ScreenIds.Login; //window.location = ScreenIds.Login;
webLogoutEvent(); HEADER.webLogoutEvent();
}; };
//Logout With Backup function //Logout With Backup function
function confirmWithBackupFunction(e) { HEADER.confirmWithBackupFunction = function(e) {
e.preventDefault(); e.preventDefault();
// check button is disabled // check button is disabled
...@@ -489,7 +488,7 @@ function confirmWithBackupFunction(e) { ...@@ -489,7 +488,7 @@ function confirmWithBackupFunction(e) {
var isBackupBookmark = $("#chkBkAllShiori").attr('checked') == 'checked'; var isBackupBookmark = $("#chkBkAllShiori").attr('checked') == 'checked';
var remember = $('#chkRememberBackup').attr('checked'); var remember = $('#chkRememberBackup').attr('checked');
unlockLayout(); COMMON.unlockLayout();
$('#dlgConfirmBackup1').css('z-index', '99'); $('#dlgConfirmBackup1').css('z-index', '99');
lockLayout(); lockLayout();
...@@ -502,18 +501,18 @@ function confirmWithBackupFunction(e) { ...@@ -502,18 +501,18 @@ function confirmWithBackupFunction(e) {
ClientData.userOpt_bkMemoFlag(isBackupMemo); ClientData.userOpt_bkMemoFlag(isBackupMemo);
ClientData.userOpt_bkShioriFlag(isBackupBookmark); ClientData.userOpt_bkShioriFlag(isBackupBookmark);
DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark, true); HEADER.DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark, true);
} }
else{ else{
ClientData.userOpt_bkConfirmFlg(1); // Show dialog in next time ClientData.userOpt_bkConfirmFlg(1); // Show dialog in next time
DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark, true); HEADER.DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark, true);
} }
ClientData.userOpt_logoutMode(0); // In next time, if choose: [do not show dialog], will backup and logout ClientData.userOpt_logoutMode(0); // In next time, if choose: [do not show dialog], will backup and logout
//webLogoutEvent(); //HEADER.webLogoutEvent();
}; };
//Confirm Back Up Ok //Confirm Back Up Ok
function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcCallback) { HEADER.DoBackup = function(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcCallback) {
// ---------------------------- // ----------------------------
// Process backup here // Process backup here
// ---------------------------- // ----------------------------
...@@ -542,7 +541,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC ...@@ -542,7 +541,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
// }); // });
// $('.toast-position-middle-center').css('width', '500px'); // $('.toast-position-middle-center').css('width', '500px');
// $('.toast-position-middle-center').css('margin-left', '-250px'); // $('.toast-position-middle-center').css('margin-left', '-250px');
// $('.toast-item-close').live('click', webLogoutEvent); // $('.toast-item-close').live('click', HEADER.webLogoutEvent);
// } // }
// else { // else {
// //alert(i18nText('msgBackupFailed')); // //alert(i18nText('msgBackupFailed'));
...@@ -555,7 +554,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC ...@@ -555,7 +554,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
// }); // });
// $('.toast-position-middle-center').css('width', '500px'); // $('.toast-position-middle-center').css('width', '500px');
// $('.toast-position-middle-center').css('margin-left', '-250px'); // $('.toast-position-middle-center').css('margin-left', '-250px');
// $('.toast-item-close').live('click', webLogoutEvent); // $('.toast-item-close').live('click', HEADER.webLogoutEvent);
// } // }
// }, // },
// function (a, b, c) { // function (a, b, c) {
...@@ -569,7 +568,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC ...@@ -569,7 +568,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
// }); // });
// $('.toast-position-middle-center').css('width', '500px'); // $('.toast-position-middle-center').css('width', '500px');
// $('.toast-position-middle-center').css('margin-left', '-250px'); // $('.toast-position-middle-center').css('margin-left', '-250px');
// $('.toast-item-close').live('click', webLogoutEvent); // $('.toast-item-close').live('click', HEADER.webLogoutEvent);
// }); // });
// Backup for No.17 // Backup for No.17
...@@ -603,15 +602,15 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC ...@@ -603,15 +602,15 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
var isBackupBookmarkOK = true; var isBackupBookmarkOK = true;
if (isBackupMarking && ClientData.isChangedMarkingData() == true) { if (isBackupMarking && ClientData.isChangedMarkingData() == true) {
isBackupMarkingOK = sendSignalBackupStart(2); // start backup type marking isBackupMarkingOK = HEADER.sendSignalBackupStart(2); // start backup type marking
if (isBackupMarkingOK) { if (isBackupMarkingOK) {
isBackupMarkingOK = backupFile(JSON.stringify({ "type": 2, "data": ClientData.MarkingData() }), 'Marking.json', 2); isBackupMarkingOK = HEADER.backupFile(JSON.stringify({ "type": 2, "data": ClientData.MarkingData() }), 'Marking.json', 2);
if (isBackupMarkingOK) { if (isBackupMarkingOK) {
ClientData.isChangedMarkingData(false); ClientData.isChangedMarkingData(false);
$('#divResultMessage').append("<div class='toast-item-image-success toast-item-message'>" + i18nText('txtBkMarking') + " " + i18nText('msgBackupSuccess') + "</div>"); $('#divResultMessage').append("<div class='toast-item-image-success toast-item-message'>" + i18nText('txtBkMarking') + " " + i18nText('msgBackupSuccess') + "</div>");
} }
// finish backup marking if start backup marking success // finish backup marking if start backup marking success
sendSignalBackupFinish(2); HEADER.sendSignalBackupFinish(2);
} }
if (!isBackupMarkingOK) { if (!isBackupMarkingOK) {
$('#divResultMessage').append("<div class='toast-item-image-error toast-item-message'>" + i18nText('txtBkMarking') + " " + i18nText('msgBackupFailed') + "</div>"); $('#divResultMessage').append("<div class='toast-item-image-error toast-item-message'>" + i18nText('txtBkMarking') + " " + i18nText('msgBackupFailed') + "</div>");
...@@ -620,16 +619,16 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC ...@@ -620,16 +619,16 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
// Backup bookmark // Backup bookmark
if (isBackupBookmark && ClientData.isChangedBookmark() == true) { if (isBackupBookmark && ClientData.isChangedBookmark() == true) {
isBackupBookmarkOK = sendSignalBackupStart(4); // start backup type bookmark isBackupBookmarkOK = HEADER.sendSignalBackupStart(4); // start backup type bookmark
if (isBackupBookmarkOK) { if (isBackupBookmarkOK) {
isBackupBookmarkOK = backupFile(JSON.stringify({ "type": 3, "data": ClientData.BookMarkData() }), 'Bookmark.json', 4); isBackupBookmarkOK = HEADER.backupFile(JSON.stringify({ "type": 3, "data": ClientData.BookMarkData() }), 'Bookmark.json', 4);
if (isBackupBookmarkOK) { if (isBackupBookmarkOK) {
ClientData.isChangedBookmark(false); ClientData.isChangedBookmark(false);
$('#divResultMessage').append("<div class='toast-item-image-success toast-item-message'>" + i18nText('txtBkShiori') + " " + i18nText('msgBackupSuccess') + "</div>"); $('#divResultMessage').append("<div class='toast-item-image-success toast-item-message'>" + i18nText('txtBkShiori') + " " + i18nText('msgBackupSuccess') + "</div>");
} }
// finish backup bookmark if start backup bookmark ok // finish backup bookmark if start backup bookmark ok
sendSignalBackupFinish(4); HEADER.sendSignalBackupFinish(4);
} }
if (!isBackupBookmarkOK) { if (!isBackupBookmarkOK) {
$('#divResultMessage').append("<div class='toast-item-image-error toast-item-message'>" + i18nText('txtBkShiori') + " " + i18nText('msgBackupFailed') + "</div>"); $('#divResultMessage').append("<div class='toast-item-image-error toast-item-message'>" + i18nText('txtBkShiori') + " " + i18nText('msgBackupFailed') + "</div>");
...@@ -639,15 +638,15 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC ...@@ -639,15 +638,15 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
// Backup Memo // Backup Memo
if (isBackupMemo && ClientData.isChangedMemo() == true) { if (isBackupMemo && ClientData.isChangedMemo() == true) {
isBackupMemoOK = sendSignalBackupStart(1); // start backup type memo isBackupMemoOK = HEADER.sendSignalBackupStart(1); // start backup type memo
if (isBackupMemoOK) { if (isBackupMemoOK) {
isBackupMemoOK = backupFile(JSON.stringify({ "type": 1, "data": ClientData.MemoData() }), 'ContentMemo.json', 1); isBackupMemoOK = HEADER.backupFile(JSON.stringify({ "type": 1, "data": ClientData.MemoData() }), 'ContentMemo.json', 1);
if (isBackupMemoOK) { if (isBackupMemoOK) {
ClientData.isChangedMemo(false); ClientData.isChangedMemo(false);
$('#divResultMessage').append("<div class='toast-item-image-success toast-item-message'>" + i18nText('txtBkMemo') + " " + i18nText('msgBackupSuccess') + "</div>"); $('#divResultMessage').append("<div class='toast-item-image-success toast-item-message'>" + i18nText('txtBkMemo') + " " + i18nText('msgBackupSuccess') + "</div>");
} }
// finish backup memo if start backup memo ok // finish backup memo if start backup memo ok
sendSignalBackupFinish(1); HEADER.sendSignalBackupFinish(1);
} }
if (!isBackupMemoOK) { if (!isBackupMemoOK) {
$('#divResultMessage').append("<div class='toast-item-image-error toast-item-message'>" + i18nText('txtBkMemo') + " " + i18nText('msgBackupFailed') + "</div>"); $('#divResultMessage').append("<div class='toast-item-image-error toast-item-message'>" + i18nText('txtBkMemo') + " " + i18nText('msgBackupFailed') + "</div>");
...@@ -663,7 +662,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC ...@@ -663,7 +662,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
if (isLogout) { if (isLogout) {
$('.toast-position-middle-center').css('width', '500px'); $('.toast-position-middle-center').css('width', '500px');
$('.toast-position-middle-center').css('margin-left', '-250px'); $('.toast-position-middle-center').css('margin-left', '-250px');
$('.toast-item-close').live('click', webLogoutEvent); $('.toast-item-close').live('click', HEADER.webLogoutEvent);
} }
// check call back function // check call back function
...@@ -676,16 +675,16 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC ...@@ -676,16 +675,16 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
else else
{ {
if (isLogout) { if (isLogout) {
webLogoutEvent(); HEADER.webLogoutEvent();
} }
} }
}; };
function backupFile(data, file,type) { HEADER.backupFile = function(data, file,type) {
var result = false; var result = false;
var params = [ var params = [
{ name: 'sid', content: ClientData.userInfo_sid() }, { name: 'sid', content: ClientData.userInfo_sid() },
//{ name: 'deviceType', content: '4' }, //{ name: 'deviceType', content: '4' },
//{name: 'fileType', content: type }, //{name: 'fileType', content: type },
{ name: 'formFile', content: data, fileName: file, contentType: 'text-plain' } { name: 'formFile', content: data, fileName: file, contentType: 'text-plain' }
]; ];
...@@ -701,7 +700,7 @@ function backupFile(data, file,type) { ...@@ -701,7 +700,7 @@ function backupFile(data, file,type) {
}; };
// send signal backup start // send signal backup start
function sendSignalBackupStart(typeBackup) HEADER.sendSignalBackupStart = function(typeBackup)
{ {
var result = false; var result = false;
var params = { "sid": ClientData.userInfo_sid(), "fileType": typeBackup }; var params = { "sid": ClientData.userInfo_sid(), "fileType": typeBackup };
...@@ -716,7 +715,7 @@ function sendSignalBackupStart(typeBackup) ...@@ -716,7 +715,7 @@ function sendSignalBackupStart(typeBackup)
}; };
// send signal backup finish // send signal backup finish
function sendSignalBackupFinish(typeBackup) HEADER.sendSignalBackupFinish = function(typeBackup)
{ {
var result = false; var result = false;
var params = { "sid": ClientData.userInfo_sid(), "fileType": typeBackup }; var params = { "sid": ClientData.userInfo_sid(), "fileType": typeBackup };
...@@ -732,16 +731,16 @@ function sendSignalBackupFinish(typeBackup) ...@@ -732,16 +731,16 @@ function sendSignalBackupFinish(typeBackup)
/* ------ */ /* ------ */
function checkForceChangePassword(){ HEADER.checkForceChangePassword = function(){
if(ClientData.BookmarkScreen() != ScreenIds.Setting){ if(ClientData.BookmarkScreen() != ScreenIds.Setting){
if(ClientData.requirePasswordChange() == 1){ if(ClientData.requirePasswordChange() == 1){
//alert(i18nText('msgPWDNeedChange')); //alert(i18nText('msgPWDNeedChange'));
showErrorScreenForceChangePassword(); HEADER.showErrorScreenForceChangePassword();
} }
} }
}; };
function showErrorScreenForceChangePassword(){ HEADER.showErrorScreenForceChangePassword = function(){
var tags = '<div id="avw-auth-error">' + var tags = '<div id="avw-auth-error">' +
'<div style="display:table; width:100%; height:100%;">' + '<div style="display:table; width:100%; height:100%;">' +
'<div style="display:table-cell; text-align:center; vertical-align:middle;">' + '<div style="display:table-cell; text-align:center; vertical-align:middle;">' +
...@@ -775,7 +774,7 @@ function showErrorScreenForceChangePassword(){ ...@@ -775,7 +774,7 @@ function showErrorScreenForceChangePassword(){
/* region for Push message */ /* region for Push message */
// init for push message // init for push message
function initPushMessage() HEADER.initPushMessage = function()
{ {
$('#liPushMessage').click( $('#liPushMessage').click(
function () { function () {
...@@ -789,8 +788,8 @@ function initPushMessage() ...@@ -789,8 +788,8 @@ function initPushMessage()
$('.notification-pushmessage').hide(); // hide notification $('.notification-pushmessage').hide(); // hide notification
$(this).removeClass('hide').addClass('show'); $(this).removeClass('hide').addClass('show');
currentPagePushMessage = 1; HEADER.currentPagePushMessage = 1;
getPushMessageList(); HEADER.getPushMessageList();
} }
} }
); );
...@@ -799,12 +798,12 @@ function initPushMessage() ...@@ -799,12 +798,12 @@ function initPushMessage()
$('#liPushMessage').removeClass('show').addClass('hide'); $('#liPushMessage').removeClass('show').addClass('hide');
$('#prev-page-message').click(function (e) { $('#prev-page-message').click(function (e) {
previousPushMessageClick(); HEADER.previousPushMessageClick();
e.stopPropagation(); e.stopPropagation();
return false; return false;
}); });
$('#next-page-message').click(function (e) { $('#next-page-message').click(function (e) {
nextPushMessageClick(); HEADER.nextPushMessageClick();
e.stopPropagation(); e.stopPropagation();
return false; return false;
}); });
...@@ -827,29 +826,29 @@ function initPushMessage() ...@@ -827,29 +826,29 @@ function initPushMessage()
); );
// check new push message // check new push message
if (isAnonymousLogin() == false ) { if (COMMON.isAnonymousLogin() == false ) {
getPushMessageNew(); HEADER.getPushMessageNew();
} }
}; };
// get time wait check new push message // get time wait check new push message
function getTimeWaitCheckNewPushMessage() HEADER.getTimeWaitCheckNewPushMessage = function()
{ {
return avwSysSetting().pushTimePeriod * 1000;// time unit is seconds return avwSysSetting().pushTimePeriod * 1000;// time unit is seconds
} }
// get message new // get message new
function getPushMessageNew() HEADER.getPushMessageNew = function()
{ {
//$('.notification-pushmessage').hide(); //$('.notification-pushmessage').hide();
var params = { "sid": ClientData.userInfo_sid()}; var params = { "sid": ClientData.userInfo_sid()};
avwCmsApi(ClientData.userInfo_accountPath(), "webPushMessageNew", "post", params, avwCmsApi(ClientData.userInfo_accountPath(), "webPushMessageNew", "post", params,
callbackGetPushMessageNewSuccess, HEADER.callbackGetPushMessageNewSuccess,
function (xhr, b, c) { }); function (xhr, b, c) { });
}; };
// callback get number new message success // callback get number new message success
function callbackGetPushMessageNewSuccess(data) { HEADER.callbackGetPushMessageNewSuccess = function(data) {
if (data) { if (data) {
// get current number message in session // get current number message in session
var currentMessage = parseInt(ClientData.pushInfo_newMsgNumber()); var currentMessage = parseInt(ClientData.pushInfo_newMsgNumber());
...@@ -878,23 +877,23 @@ function callbackGetPushMessageNewSuccess(data) { ...@@ -878,23 +877,23 @@ function callbackGetPushMessageNewSuccess(data) {
setTimeout(function () { setTimeout(function () {
$('.notification-pushmessage').slideUp(); $('.notification-pushmessage').slideUp();
}, timeWaitCloseNewInfoPushMessage); }, HEADER.timeWaitCloseNewInfoPushMessage);
} }
} }
// continue check new push message // continue check new push message
setTimeout(getPushMessageNew, getTimeWaitCheckNewPushMessage()); setTimeout(HEADER.getPushMessageNew, HEADER.getTimeWaitCheckNewPushMessage());
}; };
// get message // get message
function getPushMessageList() { HEADER.getPushMessageList = function() {
var sysSettings = avwSysSetting(); var sysSettings = avwSysSetting();
var pushPageCount=sysSettings.pushPageCount; var pushPageCount=sysSettings.pushPageCount;
var from = (currentPagePushMessage - 1) * pushPageCount + 1; var from = (HEADER.currentPagePushMessage - 1) * pushPageCount + 1;
var to = currentPagePushMessage * pushPageCount; var to = HEADER.currentPagePushMessage * pushPageCount;
var params = { "sid": ClientData.userInfo_sid(), "recordFrom": from, "recordTo": to }; var params = { "sid": ClientData.userInfo_sid(), "recordFrom": from, "recordTo": to };
avwCmsApiSync(ClientData.userInfo_accountPath(), "webPushMessageList", "post", params, avwCmsApiSync(ClientData.userInfo_accountPath(), "webPushMessageList", "post", params,
...@@ -906,7 +905,7 @@ function getPushMessageList() { ...@@ -906,7 +905,7 @@ function getPushMessageList() {
// hide number new message // hide number new message
$('#numbermessage').html(''); $('#numbermessage').html('');
showListPushMessage(data); HEADER.showListPushMessage(data);
}, },
function (xhr, b, c) { function (xhr, b, c) {
showSystemError(); showSystemError();
...@@ -915,20 +914,20 @@ function getPushMessageList() { ...@@ -915,20 +914,20 @@ function getPushMessageList() {
// get string from date crate pushmessage // get string from date crate pushmessage
function getDateCreatePushMessage(data) { HEADER.getDateCreatePushMessage = function(data) {
return (data.year + 1900) + "/" + (data.month + 1) + "/" + data.date + " " + data.hours + ":" + data.minutes; return (data.year + 1900) + "/" + (data.month + 1) + "/" + data.date + " " + data.hours + ":" + data.minutes;
} }
// show push message list // show push message list
function showListPushMessage(data) HEADER.showListPushMessage = function(data)
{ {
$('#show-push-message').html(''); $('#show-push-message').html('');
for (var i = 0; i < data.messageList.length && i <= (data.recordTo - data.recordFrom); i++) for (var i = 0; i < data.messageList.length && i <= (data.recordTo - data.recordFrom); i++)
{ {
var titleMessage = truncate(data.messageList[i].messageDetail, 30).replace(/</g, '&lt;').replace(/>/g, '&gt;'); var titleMessage = COMMON.truncate(data.messageList[i].messageDetail, 30).replace(/</g, '&lt;').replace(/>/g, '&gt;');
var detailMessage = data.messageList[i].messageDetail.replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\n/g, '<br/>'); var detailMessage = data.messageList[i].messageDetail.replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\n/g, '<br/>');
var message = '<div class="newmsg">'; var message = '<div class="newmsg">';
message += '<h5 class="postItem"><a href="#">' + titleMessage + '</a></h5>'; message += '<h5 class="postItem"><a href="#">' + titleMessage + '</a></h5>';
message += '<p>' + detailMessage + '<span class="date">' + getDateCreatePushMessage(data.messageList[i].messageSendDate) + '</span></p></div>'; message += '<p>' + detailMessage + '<span class="date">' + HEADER.getDateCreatePushMessage(data.messageList[i].messageSendDate) + '</span></p></div>';
$('#show-push-message').append(message); $('#show-push-message').append(message);
} }
...@@ -938,7 +937,7 @@ function showListPushMessage(data) ...@@ -938,7 +937,7 @@ function showListPushMessage(data)
// show list title message // show list title message
$('#accordion').slideDown(); $('#accordion').slideDown();
if (currentPagePushMessage > 1 || data.recordTo < data.totalRecord) { if (HEADER.currentPagePushMessage > 1 || data.recordTo < data.totalRecord) {
$('#accordion .pagechange').show(); $('#accordion .pagechange').show();
} }
else { else {
...@@ -954,7 +953,7 @@ function showListPushMessage(data) ...@@ -954,7 +953,7 @@ function showListPushMessage(data)
} }
// check show previous button // check show previous button
if (currentPagePushMessage > 1) { if (HEADER.currentPagePushMessage > 1) {
$('#prev-page-message').css({ "visibility": "visible" }); $('#prev-page-message').css({ "visibility": "visible" });
} }
else { else {
...@@ -975,31 +974,22 @@ function showListPushMessage(data) ...@@ -975,31 +974,22 @@ function showListPushMessage(data)
}; };
// load next page message // load next page message
function nextPushMessageClick() { HEADER.nextPushMessageClick = function() {
currentPagePushMessage++; HEADER.currentPagePushMessage++;
getPushMessageList(); HEADER.getPushMessageList();
}; };
// load previous page message // load previous page message
function previousPushMessageClick() { HEADER.previousPushMessageClick = function() {
if (currentPagePushMessage > 1) if (HEADER.currentPagePushMessage > 1){
currentPagePushMessage--; HEADER.currentPagePushMessage--;
else currentPagePushMessage = 1; } else {
getPushMessageList(); HEADER.currentPagePushMessage = 1;
};
function truncate(strInput, length){
if (strInput.length <= length)
{
return strInput;
}
else
{
return strInput.substring(0, length) + "...";
} }
HEADER.getPushMessageList();
}; };
function setStatusSort(currentid, isAsc) { HEADER.setStatusSort = function(currentid, isAsc) {
$('#menu_sort li a').removeClass('descending_sort').removeClass('ascending_sort'); $('#menu_sort li a').removeClass('descending_sort').removeClass('ascending_sort');
if($('#menu_sort li a#off-default').size()){ if($('#menu_sort li a#off-default').size()){
...@@ -1011,7 +1001,7 @@ function setStatusSort(currentid, isAsc) { ...@@ -1011,7 +1001,7 @@ function setStatusSort(currentid, isAsc) {
}; };
// get icon of content type // get icon of content type
function getIconTypeContent(contentType) { HEADER.getIconTypeContent = function(contentType) {
var src = ''; var src = '';
switch (contentType) { switch (contentType) {
...@@ -1066,7 +1056,7 @@ function getIconTypeContent(contentType) { ...@@ -1066,7 +1056,7 @@ function getIconTypeContent(contentType) {
}; };
// download resouce content id // download resouce content id
function downloadResourceById(contentId){ HEADER.downloadResourceById = function(contentId){
var params = { var params = {
sid: ClientData.userInfo_sid(), sid: ClientData.userInfo_sid(),
contentId: contentId, contentId: contentId,
...@@ -1075,13 +1065,13 @@ function downloadResourceById(contentId){ ...@@ -1075,13 +1065,13 @@ function downloadResourceById(contentId){
avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", "get", params, avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", "get", params,
function (data) { function (data) {
//Get resourceurl //Get resourceurl
var resourceUrl = getResourceByIdFromAPI(data.contentData.content.resourceId); var resourceUrl = HEADER.getResourceByIdFromAPI(data.contentData.content.resourceId);
// open url to download file // open url to download file
if (isSafariNotOnIpad()) { if (HEADER.isSafariNotOnIpad()) {
window.onbeforeunload = null; window.onbeforeunload = null;
window.open(resourceUrl, "_self"); // open url to download file on safari not for ipad window.open(resourceUrl, "_self"); // open url to download file on safari not for ipad
var toogleTime = setTimeout(function () { ToogleLogoutNortice() }, 200); var toogleTime = setTimeout(function () { COMMON.ToogleLogoutNortice() }, 200);
} }
else { else {
window.open(resourceUrl); //open url to download file on orther browser window.open(resourceUrl); //open url to download file on orther browser
...@@ -1091,12 +1081,12 @@ function downloadResourceById(contentId){ ...@@ -1091,12 +1081,12 @@ function downloadResourceById(contentId){
}; };
//Download resource //Download resource
function getResourceByIdFromAPI(resourceId){ HEADER.getResourceByIdFromAPI = function(resourceId){
return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true"; return AVWEB.getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
}; };
// check is browser safari on Mac and Window devide ( not Ipad ) // check is browser safari on Mac and Window devide ( not Ipad )
function isSafariNotOnIpad() { HEADER.isSafariNotOnIpad = function() {
if (!window.chrome) { if (!window.chrome) {
var ua = navigator.userAgent.toLowerCase(); var ua = navigator.userAgent.toLowerCase();
if (!/ipad/.test(ua) && /safari/.test(ua)) { if (!/ipad/.test(ua) && /safari/.test(ua)) {
...@@ -1107,7 +1097,7 @@ function isSafariNotOnIpad() { ...@@ -1107,7 +1097,7 @@ function isSafariNotOnIpad() {
}; };
//link content //link content
function viewLinkContentById(contentId){ HEADER.viewLinkContentById = function(contentId){
var params = { var params = {
sid: ClientData.userInfo_sid(), sid: ClientData.userInfo_sid(),
contentId: contentId, contentId: contentId,
...@@ -1134,10 +1124,10 @@ function viewLinkContentById(contentId){ ...@@ -1134,10 +1124,10 @@ function viewLinkContentById(contentId){
} }
else { else {
// open url to download file // open url to download file
if (isSafariNotOnIpad()) { if (HEADER.isSafariNotOnIpad()) {
window.onbeforeunload = null; window.onbeforeunload = null;
window.open(linkUrl, "_self"); // open url to download file on safari not for ipad window.open(linkUrl, "_self"); // open url to download file on safari not for ipad
var toogleTime = setTimeout(function () { ToogleLogoutNortice() }, 200); var toogleTime = setTimeout(function () { COMMON.ToogleLogoutNortice() }, 200);
} }
else { else {
window.open(linkUrl); //open url to download file on orther browser window.open(linkUrl); //open url to download file on orther browser
...@@ -1149,7 +1139,7 @@ function viewLinkContentById(contentId){ ...@@ -1149,7 +1139,7 @@ function viewLinkContentById(contentId){
}; };
// get ThumbnailForOtherType // get ThumbnailForOtherType
header.getThumbnailForOtherType = function(contentType){ HEADER.getThumbnailForOtherType = function(contentType){
var src = ''; var src = '';
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
......
...@@ -63,7 +63,7 @@ $(document).ready(function(){ ...@@ -63,7 +63,7 @@ $(document).ready(function(){
return; return;
} }
LockScreen(); COMMON.LockScreen();
document.title = i18nText('dspViewHistory') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspViewHistory') + ' | ' + i18nText('sysAppTitle');
...@@ -123,10 +123,10 @@ $(document).ready(function(){ ...@@ -123,10 +123,10 @@ $(document).ready(function(){
} }
else{ else{
//Check if Force Change password //Check if Force Change password
checkForceChangePassword(); HEADER.checkForceChangePassword();
} }
if (isAnonymousLogin()) { if (COMMON.isAnonymousLogin()) {
//プッシュメッセージ隠す //プッシュメッセージ隠す
$('#dspPushMessage').hide(); $('#dspPushMessage').hide();
} }
...@@ -176,7 +176,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid) ...@@ -176,7 +176,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' <img id="imgloading'+ post.contentId +'" class="home_canvas" src="./img/data_loading.gif" height="25px" width="25px" style=""/>' + ' <img id="imgloading'+ post.contentId +'" class="home_canvas" src="./img/data_loading.gif" height="25px" width="25px" style=""/>'
+ ' </a>' + ' </a>'
+ ' <div class="text">' + ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="dialog name" contentid="' + post.contentId + '">' + truncate(htmlEncode(post.contentTitle), 25) + '</a>' + ' <a id="title' + post.contentId + '" class="dialog name" contentid="' + post.contentId + '">' + COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 25) + '</a>'
+ ' <div class="info">' + ' <div class="info">'
+ ' <ul class="date">' + ' <ul class="date">'
+ ' <li><span class="lang" lang="txtPubDt">' + i18nText("txtPubDt") + '</span> : ' + outputDate + '</li>' + ' <li><span class="lang" lang="txtPubDt">' + i18nText("txtPubDt") + '</span> : ' + outputDate + '</li>'
...@@ -202,8 +202,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid) ...@@ -202,8 +202,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' </a>' + ' </a>'
+ ' <div class="text">' + ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="name dialog" contentid="' + post.contentId + '">' + ' <a id="title' + post.contentId + '" class="name dialog" contentid="' + post.contentId + '">'
+ ' <img class="listIcon" src="'+getIconTypeContent(post.contentType)+'" width="20" height="20">' + ' <img class="listIcon" src="' + HEADER.getIconTypeContent(post.contentType)+'" width="20" height="20">'
+ truncate(htmlEncode(post.contentTitle), 20) + COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 20)
+ ' </a>' + ' </a>'
+ ' <div class="info">' + ' <div class="info">'
+ ' <ul class="date">' + ' <ul class="date">'
...@@ -298,7 +298,7 @@ function handleLanguage(){ ...@@ -298,7 +298,7 @@ function handleLanguage(){
var typeSort = ClientData.searchCond_sortType(); var typeSort = ClientData.searchCond_sortType();
var orderSort = ClientData.searchCond_sortOrder(); var orderSort = ClientData.searchCond_sortOrder();
setStatusSort('#'+$('#menu_sort li.current a').attr('id'),orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#'+$('#menu_sort li.current a').attr('id'),orderSort == Consts.ConstOrderSetting_Asc);
// if (typeSort == 2) { // if (typeSort == 2) {
// if (orderSort == Consts.ConstOrderSetting_Asc) { // if (orderSort == Consts.ConstOrderSetting_Asc) {
...@@ -513,7 +513,7 @@ function sortByTitleFunction(){ ...@@ -513,7 +513,7 @@ function sortByTitleFunction(){
sortByTitleAsc(); sortByTitleAsc();
} }
setStatusSort('#control-sort-title',sortOrder == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-title',sortOrder == Consts.ConstOrderSetting_Asc);
sortType = '1'; sortType = '1';
ClientData.searchCond_sortType(sortType); ClientData.searchCond_sortType(sortType);
...@@ -577,7 +577,7 @@ function sortByTitleKanaFunction(){ ...@@ -577,7 +577,7 @@ function sortByTitleKanaFunction(){
sortByTitleKanaAsc(); sortByTitleKanaAsc();
} }
setStatusSort('#control-sort-titlekana',sortOrder == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-titlekana',sortOrder == Consts.ConstOrderSetting_Asc);
sortType = '2'; sortType = '2';
//refresh gridview //refresh gridview
...@@ -641,7 +641,7 @@ function sortByReleaseDateFunction(){ ...@@ -641,7 +641,7 @@ function sortByReleaseDateFunction(){
sortByPublishDateAsc(); sortByPublishDateAsc();
} }
setStatusSort('#control-sort-releasedate',sortOrder == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-releasedate',sortOrder == Consts.ConstOrderSetting_Asc);
sortType = '3'; sortType = '3';
ClientData.searchCond_sortType(sortType); ClientData.searchCond_sortType(sortType);
...@@ -699,7 +699,7 @@ function sortByViewDateFunction(){ ...@@ -699,7 +699,7 @@ function sortByViewDateFunction(){
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
} }
setStatusSort('#control-sort-viewdate',sortOrder == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-viewdate',sortOrder == Consts.ConstOrderSetting_Asc);
sortType = '4'; sortType = '4';
...@@ -775,13 +775,13 @@ function isPdfContent(contentType){ ...@@ -775,13 +775,13 @@ function isPdfContent(contentType){
// return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true"; // return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
//}; //};
/* get url */ ///* get url */
function getURL(apiName) { //function getURL(apiName) {
var sysSettings = avwSysSetting(); // var sysSettings = avwSysSetting();
var url = sysSettings.apiResourceDlUrl; // var url = sysSettings.apiResourceDlUrl;
url = format(url, ClientData.userInfo_accountPath()) + '/' + apiName; // url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
return url; // return url;
}; //};
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new function to return content type of content. //End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new function to return content type of content.
...@@ -875,13 +875,13 @@ function readSubmenuFunction_callback(contentId) ...@@ -875,13 +875,13 @@ function readSubmenuFunction_callback(contentId)
if(contentType == ContentTypeKeys.Type_Others){ if(contentType == ContentTypeKeys.Type_Others){
//Download content //Download content
downloadResourceById(contentId); HEADER.downloadResourceById(contentId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(contentId); drawEditImage(contentId);
} }
else if( contentType == ContentTypeKeys.Type_Link ){ else if( contentType == ContentTypeKeys.Type_Link ){
//link content //link content
viewLinkContentById(contentId); HEADER.viewLinkContentById(contentId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(contentId); drawEditImage(contentId);
} }
...@@ -1338,7 +1338,7 @@ function handleSortDisp(){ ...@@ -1338,7 +1338,7 @@ function handleSortDisp(){
// } // }
//$('#control-sort-title').addClass('active_tops'); //$('#control-sort-title').addClass('active_tops');
setStatusSort('#control-sort-title',orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-title',orderSort == Consts.ConstOrderSetting_Asc);
} }
else if(typeSort == 2){ else if(typeSort == 2){
// if(orderSort == Consts.ConstOrderSetting_Asc){ // if(orderSort == Consts.ConstOrderSetting_Asc){
...@@ -1359,7 +1359,7 @@ function handleSortDisp(){ ...@@ -1359,7 +1359,7 @@ function handleSortDisp(){
// } // }
//$('#control-sort-titlekana').addClass('active_tops'); //$('#control-sort-titlekana').addClass('active_tops');
setStatusSort('#control-sort-titlekana',orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-titlekana',orderSort == Consts.ConstOrderSetting_Asc);
} }
else if(typeSort == 3){ else if(typeSort == 3){
// if(orderSort == Consts.ConstOrderSetting_Asc){ // if(orderSort == Consts.ConstOrderSetting_Asc){
...@@ -1380,7 +1380,7 @@ function handleSortDisp(){ ...@@ -1380,7 +1380,7 @@ function handleSortDisp(){
// } // }
//$('#control-sort-releasedate').addClass('active_tops'); //$('#control-sort-releasedate').addClass('active_tops');
setStatusSort('#control-sort-releasedate',orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-releasedate',orderSort == Consts.ConstOrderSetting_Asc);
} }
else{ else{
// if(orderSort == Consts.ConstOrderSetting_Asc){ // if(orderSort == Consts.ConstOrderSetting_Asc){
...@@ -1402,7 +1402,7 @@ function handleSortDisp(){ ...@@ -1402,7 +1402,7 @@ function handleSortDisp(){
// } // }
//$('#control-sort-viewdate').addClass('active_tops'); //$('#control-sort-viewdate').addClass('active_tops');
setStatusSort('#control-sort-viewdate',orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-viewdate',orderSort == Consts.ConstOrderSetting_Asc);
} }
} }
} }
...@@ -1677,16 +1677,16 @@ function enableSort(){ ...@@ -1677,16 +1677,16 @@ function enableSort(){
$('.control_sort_off').hide(); $('.control_sort_off').hide();
}; };
function truncate(strInput, length){ //function truncate(strInput, length){
if (strInput.length <= length) // if (strInput.length <= length)
{ // {
return strInput; // return strInput;
} // }
else // else
{ // {
return strInput.substring(0, length) + "..."; // return strInput.substring(0, length) + "...";
} // }
}; //};
function sortByTitleAsc(){ function sortByTitleAsc(){
...@@ -1808,7 +1808,7 @@ function renderContentAfterSort(contentSortArr){ ...@@ -1808,7 +1808,7 @@ function renderContentAfterSort(contentSortArr){
+ ' <img id="imgloading'+ post.contentid +'" src="./img/data_loading.gif" height="25px" class="home_canvas" width="25px"/>' + ' <img id="imgloading'+ post.contentid +'" src="./img/data_loading.gif" height="25px" class="home_canvas" width="25px"/>'
+ ' </a>' + ' </a>'
+ ' <div class="text">' + ' <div class="text">'
+ ' <a id="title' + post.contentid + '" class="dialog name" contentid="' + post.contentid + '">' + truncate(htmlEncode(post.contenttitle), 25) + '</a>' + ' <a id="title' + post.contentid + '" class="dialog name" contentid="' + post.contentid + '">' + COMMON.truncate(COMMON.htmlEncode(post.contenttitle), 25) + '</a>'
+ ' <div class="info">' + ' <div class="info">'
+ ' <ul class="date">' + ' <ul class="date">'
+ ' <li><span class="lang" lang="txtPubDt">' + i18nText("txtPubDt") + '</span> : ' + outputDeliveryDate + '</li>' + ' <li><span class="lang" lang="txtPubDt">' + i18nText("txtPubDt") + '</span> : ' + outputDeliveryDate + '</li>'
...@@ -1833,8 +1833,8 @@ function renderContentAfterSort(contentSortArr){ ...@@ -1833,8 +1833,8 @@ function renderContentAfterSort(contentSortArr){
+ ' </a>' + ' </a>'
+ ' <div class="text">' + ' <div class="text">'
+ ' <a id="title' + post.contentid + '" class="name dialog" contentid="' + post.contentid + '">' + ' <a id="title' + post.contentid + '" class="name dialog" contentid="' + post.contentid + '">'
+ ' <img class="listIcon" src="'+getIconTypeContent(post.contenttype)+'" width="20" height="20">' + ' <img class="listIcon" src="' + HEADER.getIconTypeContent(post.contenttype)+'" width="20" height="20">'
+ truncate(htmlEncode(post.contenttitle), 20) + COMMON.truncate(COMMON.htmlEncode(post.contenttitle), 20)
+ ' </a>' + ' </a>'
+ ' <div class="info">' + ' <div class="info">'
+ ' <ul class="date">' + ' <ul class="date">'
...@@ -1938,7 +1938,7 @@ function resizeResourceThumbnail(mg, width, height) { ...@@ -1938,7 +1938,7 @@ function resizeResourceThumbnail(mg, width, height) {
function removeHoverCss(){ function removeHoverCss(){
if(isTouchDevice()){ if(COMMON.isTouchDevice()){
$('#control-sort-title').removeClass('nottouchdevice'); $('#control-sort-title').removeClass('nottouchdevice');
$('#control-sort-titlekana').removeClass('nottouchdevice'); $('#control-sort-titlekana').removeClass('nottouchdevice');
$('#control-sort-releasedate').removeClass('nottouchdevice'); $('#control-sort-releasedate').removeClass('nottouchdevice');
......
...@@ -71,7 +71,7 @@ $(document).ready(function () { ...@@ -71,7 +71,7 @@ $(document).ready(function () {
//Check if Force Change password //Check if Force Change password
if (ClientData.requirePasswordChange() != 1) { if (ClientData.requirePasswordChange() != 1) {
// Register log // Register log
RegisterLog(); COMMON.RegisterLog();
//Sync Data //Sync Data
if (ClientData.ReadingContentIds() == null || ClientData.ReadingContentIds() == 'undefined' || ClientData.ReadingContentIds().length == 0) { if (ClientData.ReadingContentIds() == null || ClientData.ReadingContentIds() == 'undefined' || ClientData.ReadingContentIds().length == 0) {
...@@ -100,7 +100,7 @@ $(document).ready(function () { ...@@ -100,7 +100,7 @@ $(document).ready(function () {
getDataJsonFileGroup(); getDataJsonFileGroup();
// Lock screen is here, because of in getDataJsonFileGroup() called click to expand speified nodes of treeview // Lock screen is here, because of in getDataJsonFileGroup() called click to expand speified nodes of treeview
LockScreen(); COMMON.LockScreen();
//Change display type to bookshelf type //Change display type to bookshelf type
$('#control-bookshelf-type').click(changeDispBookShelfFunction); $('#control-bookshelf-type').click(changeDispBookShelfFunction);
...@@ -152,7 +152,7 @@ $(document).ready(function () { ...@@ -152,7 +152,7 @@ $(document).ready(function () {
$('#dlgSubMenu').hover(subMenuHoverFunction, subMenuHoverOffFunction); $('#dlgSubMenu').hover(subMenuHoverFunction, subMenuHoverOffFunction);
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
var avwUserEnvObj = new UserEnvironment(); var avwUserEnvObj = new UserEnvironment();
if (avwUserEnvObj.os == 'ipad') { if (avwUserEnvObj.os == 'ipad') {
$('#dlgSubMenu').click(function () { $('#dlgSubMenu').click(function () {
...@@ -162,7 +162,7 @@ $(document).ready(function () { ...@@ -162,7 +162,7 @@ $(document).ready(function () {
} }
$('body').click(bodyHomeClickFunction); $('body').click(bodyHomeClickFunction);
if (isTouchDevice() == true) { if (COMMON.isTouchDevice() == true) {
var avwUserEnvObj = new UserEnvironment(); var avwUserEnvObj = new UserEnvironment();
if (avwUserEnvObj.os == 'ipad') { if (avwUserEnvObj.os == 'ipad') {
$('body').bind('touchstart', function () { $('body').bind('touchstart', function () {
...@@ -187,7 +187,7 @@ $(document).ready(function () { ...@@ -187,7 +187,7 @@ $(document).ready(function () {
} }
}); });
} else { } else {
checkForceChangePassword(); HEADER.checkForceChangePassword();
} }
//日比谷用設定ボタン隠す //日比谷用設定ボタン隠す
...@@ -203,7 +203,7 @@ $(document).ready(function () { ...@@ -203,7 +203,7 @@ $(document).ready(function () {
} }
// hide tab group with user anonymous // hide tab group with user anonymous
if (isAnonymousLogin()) { if (COMMON.isAnonymousLogin()) {
//グループ選択隠す //グループ選択隠す
$('.switchingTab .colright').hide(); $('.switchingTab .colright').hide();
...@@ -591,13 +591,13 @@ function canvasClickFunction_callback(outputId) ...@@ -591,13 +591,13 @@ function canvasClickFunction_callback(outputId)
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : check for download content type other. //Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : check for download content type other.
if(contentType == ContentTypeKeys.Type_Others){ if(contentType == ContentTypeKeys.Type_Others){
//Download content //Download content
downloadResourceById(outputId); HEADER.downloadResourceById(outputId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(outputId); drawEditImage(outputId);
} }
else if( contentType == ContentTypeKeys.Type_Link ){ else if( contentType == ContentTypeKeys.Type_Link ){
//link content //link content
viewLinkContentById(outputId); HEADER.viewLinkContentById(outputId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(outputId); drawEditImage(outputId);
} }
...@@ -703,13 +703,13 @@ function canvasClickFunction_callback(outputId) ...@@ -703,13 +703,13 @@ function canvasClickFunction_callback(outputId)
//For testing without other Type. //For testing without other Type.
if(contentType == ContentTypeKeys.Type_Others){ if(contentType == ContentTypeKeys.Type_Others){
//Download content //Download content
downloadResourceById(outputId); HEADER.downloadResourceById(outputId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(outputId); drawEditImage(outputId);
} }
else if( contentType == ContentTypeKeys.Type_Link ){ else if( contentType == ContentTypeKeys.Type_Link ){
//link content //link content
viewLinkContentById(outputId); HEADER.viewLinkContentById(outputId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(outputId); drawEditImage(outputId);
} }
...@@ -1015,7 +1015,7 @@ function getDataJsonFileGenre() { ...@@ -1015,7 +1015,7 @@ function getDataJsonFileGenre() {
if (dataGenre[i].parentCategoryId == 0) { if (dataGenre[i].parentCategoryId == 0) {
var node = new TreeNode(); var node = new TreeNode();
//node.IsCategory = true; //node.IsCategory = true;
node.Text = htmlEncode(dataGenre[i].categoryName); node.Text = COMMON.htmlEncode(dataGenre[i].categoryName);
node.id = dataGenre[i].categoryId; node.id = dataGenre[i].categoryId;
node.Value = dataGenre[i].categoryId; node.Value = dataGenre[i].categoryId;
node.ContentCount = dataGenre[i].contentCount; node.ContentCount = dataGenre[i].contentCount;
...@@ -1065,7 +1065,7 @@ function AddChidrenNodeGenre(node1) { ...@@ -1065,7 +1065,7 @@ function AddChidrenNodeGenre(node1) {
$.each(dataChild, function (i, value) { $.each(dataChild, function (i, value) {
var item = new TreeNode(); var item = new TreeNode();
//item.IsCategory = true; //item.IsCategory = true;
item.Text = htmlEncode(dataChild[i].categoryName); item.Text = COMMON.htmlEncode(dataChild[i].categoryName);
item.id = dataChild[i].categoryId; item.id = dataChild[i].categoryId;
item.Value = dataChild[i].categoryId; item.Value = dataChild[i].categoryId;
item.ContentCount = dataChild[i].contentCount; item.ContentCount = dataChild[i].contentCount;
...@@ -1169,7 +1169,7 @@ function getDataJsonFileGroup() { ...@@ -1169,7 +1169,7 @@ function getDataJsonFileGroup() {
if (dataGroup[i].parentGroupId == 0 || dataGroup[i].groupLevel == "0") { if (dataGroup[i].parentGroupId == 0 || dataGroup[i].groupLevel == "0") {
var node = new TreeNode(); var node = new TreeNode();
node.IsCategory = true; node.IsCategory = true;
node.Text = htmlEncode(dataGroup[i].groupName); node.Text = COMMON.htmlEncode(dataGroup[i].groupName);
node.id = dataGroup[i].groupId; node.id = dataGroup[i].groupId;
node.Value = dataGroup[i].groupId; node.Value = dataGroup[i].groupId;
node.ContentCount = dataGroup[i].contentCount; node.ContentCount = dataGroup[i].contentCount;
...@@ -1240,7 +1240,7 @@ function AddChidrenNodeGroup(node1) { ...@@ -1240,7 +1240,7 @@ function AddChidrenNodeGroup(node1) {
$.each(dataChild, function (i, value) { $.each(dataChild, function (i, value) {
var item = new TreeNode(); var item = new TreeNode();
//item.IsCategory = true; //item.IsCategory = true;
item.Text = htmlEncode(dataChild[i].groupName); item.Text = COMMON.htmlEncode(dataChild[i].groupName);
item.id = dataChild[i].groupId; item.id = dataChild[i].groupId;
item.Value = dataChild[i].groupId; item.Value = dataChild[i].groupId;
item.ContentCount = dataChild[i].contentCount; item.ContentCount = dataChild[i].contentCount;
...@@ -1510,13 +1510,13 @@ function readSubmenuFunction_callback(contentId) ...@@ -1510,13 +1510,13 @@ function readSubmenuFunction_callback(contentId)
//For testing without other Type. //For testing without other Type.
if(contentType == ContentTypeKeys.Type_Others){ if(contentType == ContentTypeKeys.Type_Others){
//Download content //Download content
downloadResourceById(contentId); HEADER.downloadResourceById(contentId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(contentId); drawEditImage(contentId);
} }
else if( contentType == ContentTypeKeys.Type_Link ){ else if( contentType == ContentTypeKeys.Type_Link ){
//link content //link content
viewLinkContentById(contentId); HEADER.viewLinkContentById(contentId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(contentId); drawEditImage(contentId);
} }
...@@ -1644,7 +1644,7 @@ function sortByTitleFunction() { ...@@ -1644,7 +1644,7 @@ function sortByTitleFunction() {
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
} }
setStatusSort('#control-sort-title',sortOrder == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-title',sortOrder == Consts.ConstOrderSetting_Asc);
if (recordFrom == null || recordFrom == 'undefined') { if (recordFrom == null || recordFrom == 'undefined') {
recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM; recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
...@@ -1720,7 +1720,7 @@ function sortByTitleKanaFunction() { ...@@ -1720,7 +1720,7 @@ function sortByTitleKanaFunction() {
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
} }
setStatusSort('#control-sort-titlekana',sortOrder == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-titlekana',sortOrder == Consts.ConstOrderSetting_Asc);
if (recordFrom == null || recordFrom == 'undefined') { if (recordFrom == null || recordFrom == 'undefined') {
recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM; recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
...@@ -1797,7 +1797,7 @@ function sortByReleaseDateFunction() { ...@@ -1797,7 +1797,7 @@ function sortByReleaseDateFunction() {
// $('#rDate-sorttype').css('width', '12px'); // $('#rDate-sorttype').css('width', '12px');
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
} }
setStatusSort('#control-sort-releasedate',sortOrder == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-releasedate',sortOrder == Consts.ConstOrderSetting_Asc);
if (recordFrom == null || recordFrom == 'undefined') { if (recordFrom == null || recordFrom == 'undefined') {
recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM; recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
...@@ -1842,7 +1842,7 @@ function handleLanguage() { ...@@ -1842,7 +1842,7 @@ function handleLanguage() {
var typeSort = ClientData.searchCond_sortType(); var typeSort = ClientData.searchCond_sortType();
var orderSort = ClientData.searchCond_sortOrder(); var orderSort = ClientData.searchCond_sortOrder();
setStatusSort('#'+$('#menu_sort li.current a').attr('id'),orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#'+$('#menu_sort li.current a').attr('id'),orderSort == Consts.ConstOrderSetting_Asc);
if (typeSort == 2) { if (typeSort == 2) {
if (orderSort == Consts.ConstOrderSetting_Asc) { if (orderSort == Consts.ConstOrderSetting_Asc) {
...@@ -1894,8 +1894,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid) ...@@ -1894,8 +1894,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' <img id="loadingIcon' + post.contentId + '" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 86px; "/>' + ' <img id="loadingIcon' + post.contentId + '" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 86px; "/>'
+ ' </div>' + ' </div>'
+ ' <a id="title' + post.contentId + '" class="dialog name lang" lang="lblTitle" contentid="' + post.contentId + '">' + ' <a id="title' + post.contentId + '" class="dialog name lang" lang="lblTitle" contentid="' + post.contentId + '">'
+ ' <img src="'+getIconTypeContent(post.contentType)+'" width="20" height="20">' + ' <img src="' + HEADER.getIconTypeContent(post.contentType)+'" width="20" height="20">'
+ truncate(htmlEncode(post.contentTitle), 20) + COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 20)
+ ' </a>' + ' </a>'
+ '</section>' + '</section>'
); );
...@@ -1917,8 +1917,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid) ...@@ -1917,8 +1917,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' </a>' + ' </a>'
+ ' <div class="text">' + ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="name dialog" contentid="' + post.contentId + '">' + ' <a id="title' + post.contentId + '" class="name dialog" contentid="' + post.contentId + '">'
+ ' <img class="listIcon" src="'+getIconTypeContent(post.contentType)+'" width="20" height="20">' + ' <img class="listIcon" src="' + HEADER.getIconTypeContent(post.contentType)+'" width="20" height="20">'
+ truncate(htmlEncode(post.contentTitle), 20) + COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 20)
+ ' </a>' + ' </a>'
+ ' <div class="info">' + ' <div class="info">'
+ ' <ul class="date">' + ' <ul class="date">'
...@@ -1954,8 +1954,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid) ...@@ -1954,8 +1954,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' <img id="loadingIcon' + post.contentId + '" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 86px; "/>' + ' <img id="loadingIcon' + post.contentId + '" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 86px; "/>'
+ ' </div>' + ' </div>'
+ ' <a id="title' + post.contentId + '" class="dialog name lang" lang="lblTitle" contentid="' + post.contentId + '">' + ' <a id="title' + post.contentId + '" class="dialog name lang" lang="lblTitle" contentid="' + post.contentId + '">'
+ ' <img src="'+getIconTypeContent(post.contentType)+'" width="20" height="20">' + ' <img src="' + HEADER.getIconTypeContent(post.contentType)+'" width="20" height="20">'
+ truncate(htmlEncode(post.contentTitle), 20) + COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 20)
+ ' </a>' + ' </a>'
+ '</section>' + '</section>'
); );
...@@ -1977,8 +1977,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid) ...@@ -1977,8 +1977,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' </a>' + ' </a>'
+ ' <div class="text">' + ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="dialog name lang" lang="lblTitle" contentid="' + post.contentId + '">' + ' <a id="title' + post.contentId + '" class="dialog name lang" lang="lblTitle" contentid="' + post.contentId + '">'
+ ' <img class="listIcon" src="'+getIconTypeContent(post.contentType)+'" width="20" height="20">' + ' <img class="listIcon" src="' + HEADER.getIconTypeContent(post.contentType)+'" width="20" height="20">'
+ truncate(htmlEncode(post.contentTitle), 20) + COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 20)
+ ' </a>' + ' </a>'
+ ' <div class="info">' + ' <div class="info">'
+ ' <ul class="date">' + ' <ul class="date">'
...@@ -2190,16 +2190,15 @@ function isPdfContent(contentType){ ...@@ -2190,16 +2190,15 @@ function isPdfContent(contentType){
// return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true"; // return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
//}; //};
/* get url */ ///* get url */
function getURL(apiName) { //function getURL(apiName) {
var sysSettings = avwSysSetting(); // var sysSettings = avwSysSetting();
var url = sysSettings.apiResourceDlUrl; // var url = sysSettings.apiResourceDlUrl;
url = format(url, ClientData.userInfo_accountPath()) + '/' + apiName; // url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
return url; // return url;
}; //};
function createIframeForDownload(url){ function createIframeForDownload(url){
}; };
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new function to return content type of content. //End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new function to return content type of content.
...@@ -2740,7 +2739,7 @@ function handleSortDisp() { ...@@ -2740,7 +2739,7 @@ function handleSortDisp() {
// } // }
// $('#control-sort-title').addClass('active_tops'); // $('#control-sort-title').addClass('active_tops');
setStatusSort('#control-sort-title',orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-title',orderSort == Consts.ConstOrderSetting_Asc);
} }
else if (typeSort == 2) { else if (typeSort == 2) {
...@@ -2760,7 +2759,7 @@ function handleSortDisp() { ...@@ -2760,7 +2759,7 @@ function handleSortDisp() {
// } // }
// $('#control-sort-titlekana').addClass('active_tops'); // $('#control-sort-titlekana').addClass('active_tops');
setStatusSort('#control-sort-titlekana',orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-titlekana',orderSort == Consts.ConstOrderSetting_Asc);
} }
else if (typeSort == 3) { else if (typeSort == 3) {
// if (orderSort == Consts.ConstOrderSetting_Asc) { // if (orderSort == Consts.ConstOrderSetting_Asc) {
...@@ -2779,7 +2778,7 @@ function handleSortDisp() { ...@@ -2779,7 +2778,7 @@ function handleSortDisp() {
// } // }
// $('#control-sort-releasedate').addClass('active_tops'); // $('#control-sort-releasedate').addClass('active_tops');
setStatusSort('#control-sort-releasedate',orderSort == Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-releasedate',orderSort == Consts.ConstOrderSetting_Asc);
} }
} }
} }
...@@ -2855,18 +2854,20 @@ function refreshGrid() { ...@@ -2855,18 +2854,20 @@ function refreshGrid() {
//format text display more record //format text display more record
function formatDisplayMoreRecord() { function formatDisplayMoreRecord() {
//changeLanguage(ClientData.userInfo_language()); //changeLanguage(ClientData.userInfo_language());
i18nReplaceText(); i18nReplaceText();
if (isShowBookShelf) { if (isShowBookShelf) {
$('#control-nextrecord').html(format(i18nText('dspViewMore'), returnNumberDispRecordForBookShelf()).toString()); $('#control-nextrecord').html(AVWEB.format(i18nText('dspViewMore'), returnNumberDispRecordForBookShelf()).toString());
} }
else if (!isShowBookShelf) { else if (!isShowBookShelf) {
$('#control-nextrecord').html(format(i18nText('dspViewMore'), returnNumberDispRecordForList())); $('#control-nextrecord').html(AVWEB.format(i18nText('dspViewMore'), returnNumberDispRecordForList()));
} }
else { else {
$('#control-nextrecord').html(format(i18nText('dspViewMore'), returnNumberDispRecordForBookShelf())); $('#control-nextrecord').html(AVWEB.format(i18nText('dspViewMore'), returnNumberDispRecordForBookShelf()));
} }
}; };
/* /*
...@@ -3169,14 +3170,14 @@ function changeLanguageCallBackFunction() { ...@@ -3169,14 +3170,14 @@ function changeLanguageCallBackFunction() {
document.title = i18nText('dspHome') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspHome') + ' | ' + i18nText('sysAppTitle');
}; };
function truncate(strInput, length) { //function truncate(strInput, length) {
if (strInput.length <= length) { // if (strInput.length <= length) {
return strInput; // return strInput;
} // }
else { // else {
return strInput.substring(0, length) + "..."; // return strInput.substring(0, length) + "...";
} // }
}; //};
function resizeResourceThumbnail(mg, width, height) { function resizeResourceThumbnail(mg, width, height) {
...@@ -3246,7 +3247,7 @@ function setDefaultViewMode() { ...@@ -3246,7 +3247,7 @@ function setDefaultViewMode() {
function removeHoverCss() { function removeHoverCss() {
if (isTouchDevice()) { if (COMMON.isTouchDevice()) {
$('#control-sort-title').removeClass('nottouchdevice'); $('#control-sort-title').removeClass('nottouchdevice');
$('#control-sort-titlekana').removeClass('nottouchdevice'); $('#control-sort-titlekana').removeClass('nottouchdevice');
$('#control-sort-releasedate').removeClass('nottouchdevice'); $('#control-sort-releasedate').removeClass('nottouchdevice');
......
...@@ -7,27 +7,25 @@ ...@@ -7,27 +7,25 @@
/// <reference path="../common/js/jquery.toastmessage.js" /> /// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/pageViewer.js" /> /// <reference path="../common/js/pageViewer.js" />
var requirePasswordChange; //グローバルの名前空間用のオブジェクトを用意する
var userinfo_sid; var LOGIN = {};
var userInfo_userName;
var optionList = [];
var force_pw_change_on_login; //var requirePasswordChange;
var force_pw_change_periodically; LOGIN.userinfo_sid;
var user_data_backup; LOGIN.userInfo_userName;
var marking; LOGIN.optionList = [];
var force_login_periodically;
var login_errorMessage = ""; LOGIN.force_pw_change_on_login;
LOGIN.force_pw_change_periodically;
LOGIN.user_data_backup;
LOGIN.marking;
LOGIN.force_login_periodically;
LOGIN.login_errorMessage = "";
var timeWaitSplashScreen = 2000;// wait splash screen 2 second LOGIN.timeWaitSplashScreen = 2000;// wait splash screen 2 second
//名前空間用のオブジェクトを用意する
var login = {};
//Load login Info //Load login Info
function loadLoginInfo() { LOGIN.loadLoginInfo = function() {
$('#chkRemember').attr('checked', 'checked'); $('#chkRemember').attr('checked', 'checked');
if (ClientData.userInfo_accountPath() != null) { if (ClientData.userInfo_accountPath() != null) {
$('#txtAccPath').val(ClientData.userInfo_accountPath()); $('#txtAccPath').val(ClientData.userInfo_accountPath());
...@@ -39,32 +37,27 @@ function loadLoginInfo() { ...@@ -39,32 +37,27 @@ function loadLoginInfo() {
}; };
//Initial Screen //Initial Screen
function initialScreen() { LOGIN.initialScreen = function() {
//Check Last time display language //Check Last time display language
//ClientData.userInfo_language(localStorage.getItem(avwsys_storagekey)); //ClientData.userInfo_language(localStorage.getItem(avwsys_storagekey));
if (ClientData.userInfo_rememberLogin()) { if (ClientData.userInfo_rememberLogin()) {
loadLoginInfo(); LOGIN.loadLoginInfo();
} }
}; };
//check Save Login Info //check Save Login Info
function saveLoginInfo() { LOGIN.saveLoginInfo = function() {
var lang = getCurrentLanguage(); var lang = getCurrentLanguage();
//clear session of old user //clear session of old user
SessionStorageUtils.clear(); //SessionStorageUtils.clear();
avwUserSessionObj = null; //avwUserSessionObj = null;
// create new session for anonymous user // create new session for anonymous user
avwCreateUserSession(); //avwCreateUserSession();
// load language // load language
changeLanguage(lang); changeLanguage(lang);
//SessionStorageUtils.login();
// Set flag コンテンツデータチェックフラグ = true to sync local with server // Set flag コンテンツデータチェックフラグ = true to sync local with server
ClientData.common_contentDataChkFlg(true); ClientData.common_contentDataChkFlg(true);
...@@ -78,7 +71,7 @@ function saveLoginInfo() { ...@@ -78,7 +71,7 @@ function saveLoginInfo() {
ClientData.userInfo_loginId(loginId); ClientData.userInfo_loginId(loginId);
ClientData.userInfo_accountPath_session(accountPath); ClientData.userInfo_accountPath_session(accountPath);
ClientData.userInfo_loginId_session(loginId); ClientData.userInfo_loginId_session(loginId);
ClientData.userInfo_userName(userInfo_userName); ClientData.userInfo_userName(LOGIN.userInfo_userName);
if(chkRemember == 'checked') if(chkRemember == 'checked')
{ {
...@@ -90,33 +83,33 @@ function saveLoginInfo() { ...@@ -90,33 +83,33 @@ function saveLoginInfo() {
} }
ClientData.userInfo_lastLoginTime(date.jpDateTimeString()); ClientData.userInfo_lastLoginTime(date.jpDateTimeString());
ClientData.userInfo_sid_local(userinfo_sid); ClientData.userInfo_sid_local(LOGIN.userinfo_sid);
saveServiceUserOption(); LOGIN.saveServiceUserOption();
}; };
//Check validation //Check validation
function checkValidation() { LOGIN.checkValidation = function() {
var accountPath = $('#txtAccPath').val(); var accountPath = $('#txtAccPath').val();
var loginId = $('#txtAccId').val(); var loginId = $('#txtAccId').val();
var password = $('#txtPassword').val(); var password = $('#txtPassword').val();
var msgError = $('#main-error-message'); var msgError = $('#main-error-message');
if (!ValidationUtil.CheckRequiredForText(accountPath)) { if (!ValidationUtil.CheckRequiredForText(accountPath)) {
login_errorMessage = ""; LOGIN.login_errorMessage = "";
msgError.html(i18nText('msgLoginEmpty')); msgError.html(i18nText('msgLoginEmpty'));
msgError.attr('lang', 'msgLoginEmpty'); msgError.attr('lang', 'msgLoginEmpty');
msgError.show(); msgError.show();
return false; return false;
} }
else if (!ValidationUtil.CheckRequiredForText(loginId)) { else if (!ValidationUtil.CheckRequiredForText(loginId)) {
login_errorMessage = ""; LOGIN.login_errorMessage = "";
msgError.html(i18nText('msgLoginEmpty')); msgError.html(i18nText('msgLoginEmpty'));
msgError.attr('lang', 'msgLoginEmpty'); msgError.attr('lang', 'msgLoginEmpty');
msgError.show(); msgError.show();
return false; return false;
} }
else if (!ValidationUtil.CheckRequiredForText(password)) { else if (!ValidationUtil.CheckRequiredForText(password)) {
login_errorMessage = ""; LOGIN.login_errorMessage = "";
msgError.html(i18nText('msgLoginEmpty')); msgError.html(i18nText('msgLoginEmpty'));
msgError.attr('lang', 'msgLoginEmpty'); msgError.attr('lang', 'msgLoginEmpty');
msgError.show(); msgError.show();
...@@ -128,21 +121,21 @@ function checkValidation() { ...@@ -128,21 +121,21 @@ function checkValidation() {
}; };
//Check Dialog validation //Check Dialog validation
function checkDialogValidation() { LOGIN.checkDialogValidation = function() {
var currentPass = $('#txtCurrentPass').val(); var currentPass = $('#txtCurrentPass').val();
var newPass = $('#txtNewPass').val(); var newPass = $('#txtNewPass').val();
var confirmPass = $('#txtConfirmNew').val(); var confirmPass = $('#txtConfirmNew').val();
var msgError = $('#dialog-error-message'); var msgError = $('#dialog-error-message');
if (!ValidationUtil.CheckRequiredForText(currentPass)) { if (!ValidationUtil.CheckRequiredForText(currentPass)) {
login_errorMessage = ""; LOGIN.login_errorMessage = "";
msgError.html(i18nText('msgPwdEmpty')); msgError.html(i18nText('msgPwdEmpty'));
msgError.attr('lang', 'msgPwdEmpty'); msgError.attr('lang', 'msgPwdEmpty');
msgError.show(); msgError.show();
return false; return false;
} }
else if (!ValidationUtil.CheckRequiredForText(newPass)) { else if (!ValidationUtil.CheckRequiredForText(newPass)) {
login_errorMessage = ""; LOGIN.login_errorMessage = "";
msgError.html(i18nText('msgPwdEmpty')); msgError.html(i18nText('msgPwdEmpty'));
msgError.attr('lang', 'msgPwdEmpty'); msgError.attr('lang', 'msgPwdEmpty');
msgError.show(); msgError.show();
...@@ -151,7 +144,7 @@ function checkDialogValidation() { ...@@ -151,7 +144,7 @@ function checkDialogValidation() {
else else
{ {
if(newPass != confirmPass){ if(newPass != confirmPass){
login_errorMessage = ""; LOGIN.login_errorMessage = "";
msgError.html(i18nText('msgPwdNotMatch')); msgError.html(i18nText('msgPwdNotMatch'));
msgError.attr('lang', 'msgPwdNotMatch'); msgError.attr('lang', 'msgPwdNotMatch');
msgError.show(); msgError.show();
...@@ -164,7 +157,7 @@ function checkDialogValidation() { ...@@ -164,7 +157,7 @@ function checkDialogValidation() {
}; };
//Login Process //Login Process
function processLogin() { LOGIN.processLogin = function() {
var accountPath = $('#txtAccPath').val(); var accountPath = $('#txtAccPath').val();
var loginId = $('#txtAccId').val(); var loginId = $('#txtAccId').val();
var password = $('#txtPassword').val(); var password = $('#txtPassword').val();
...@@ -184,24 +177,24 @@ function processLogin() { ...@@ -184,24 +177,24 @@ function processLogin() {
} }
// Get url to login // Get url to login
var sysSettings = avwSysSetting(); //var sysSettings = avwSysSetting();
var apiLoginUrl = sysSettings.apiLoginUrl; var apiLoginUrl = ClientData.conf_apiLoginUrl(); //sysSettings.apiLoginUrl;
//引数パラメータがあれば取得 //引数パラメータがあれば取得
var paramContentID = login.getUrlParams('cid'); var paramContentID = LOGIN.getUrlParams('cid');
avwCmsApiWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params, function (data) { avwCmsApiWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params, function (data) {
requirePasswordChange = data.requirePasswordChange; //requirePasswordChange = data.requirePasswordChange;
userinfo_sid = data.sid; LOGIN.userinfo_sid = data.sid;
userInfo_userName = data.userName; LOGIN.userInfo_userName = data.userName;
optionList = data.serviceOptionList; LOGIN.optionList = data.serviceOptionList;
getServiceOptionList(); LOGIN.getServiceOptionList();
if (data.result == 'success') { if (data.result == 'success') {
// Save retrieved info // Save retrieved info
saveLoginInfo(); LOGIN.saveLoginInfo();
// set number new push message to 0 // set number new push message to 0
ClientData.pushInfo_newMsgNumber(0); ClientData.pushInfo_newMsgNumber(0);
...@@ -212,7 +205,7 @@ function processLogin() { ...@@ -212,7 +205,7 @@ function processLogin() {
//OpenUrlでコンテンツ開く場合 //OpenUrlでコンテンツ開く場合
if( paramContentID != '' ){ if( paramContentID != '' ){
login.showContentViewByOpenUrl(paramContentID); LOGIN.showContentViewByOpenUrl(paramContentID);
} else { } else {
//ホームへ移動 //ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home); avwScreenMove("abvw/" + ScreenIds.Home);
...@@ -221,20 +214,20 @@ function processLogin() { ...@@ -221,20 +214,20 @@ function processLogin() {
} }
else if (data.requirePasswordChange == 1) { else if (data.requirePasswordChange == 1) {
if (force_pw_change_on_login == 2) { // force to change password if (LOGIN.force_pw_change_on_login == 2) { // force to change password
OpenChangePasswordDialog(); LOGIN.OpenChangePasswordDialog();
$(".ui-dialog-titlebar").hide(); $(".ui-dialog-titlebar").hide();
$('#btnSkip').hide(); $('#btnSkip').hide();
$("#txtPwdRemind").css('visibility', 'hidden'); $("#txtPwdRemind").css('visibility', 'hidden');
} }
else if (force_pw_change_on_login == 1) { // recommend to change password else if (LOGIN.force_pw_change_on_login == 1) { // recommend to change password
// Check 30 days // Check 30 days
skipPwdDate = ClientData.userInfo_pwdSkipDt(); skipPwdDate = ClientData.userInfo_pwdSkipDt();
if (skipPwdDate == null || skipPwdDate == 'undefined') { if (skipPwdDate == null || skipPwdDate == 'undefined') {
OpenChangePasswordDialog(); LOGIN.OpenChangePasswordDialog();
$('#btnSkip').show(); $('#btnSkip').show();
$(".ui-dialog-titlebar").hide(); $(".ui-dialog-titlebar").hide();
} }
...@@ -247,7 +240,7 @@ function processLogin() { ...@@ -247,7 +240,7 @@ function processLogin() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
//OpenUrlでコンテンツ開く場合 //OpenUrlでコンテンツ開く場合
if( paramContentID != '' ){ if( paramContentID != '' ){
login.showContentViewByOpenUrl(paramContentID); LOGIN.showContentViewByOpenUrl(paramContentID);
} else { } else {
//ホームへ移動 //ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home); avwScreenMove("abvw/" + ScreenIds.Home);
...@@ -255,7 +248,7 @@ function processLogin() { ...@@ -255,7 +248,7 @@ function processLogin() {
} }
else if (numDay > 30) { else if (numDay > 30) {
OpenChangePasswordDialog(); LOGIN.OpenChangePasswordDialog();
$('#btnSkip').show(); $('#btnSkip').show();
$(".ui-dialog-titlebar").hide(); $(".ui-dialog-titlebar").hide();
} }
...@@ -266,7 +259,7 @@ function processLogin() { ...@@ -266,7 +259,7 @@ function processLogin() {
//OpenUrlでコンテンツ開く場合 //OpenUrlでコンテンツ開く場合
if( paramContentID != '' ){ if( paramContentID != '' ){
login.showContentViewByOpenUrl(paramContentID); LOGIN.showContentViewByOpenUrl(paramContentID);
} else { } else {
//ホームへ移動 //ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home); avwScreenMove("abvw/" + ScreenIds.Home);
...@@ -276,12 +269,12 @@ function processLogin() { ...@@ -276,12 +269,12 @@ function processLogin() {
} }
else if (data.requirePasswordChange == 2) { else if (data.requirePasswordChange == 2) {
if (force_pw_change_periodically == 1) { // recommend to change password if (LOGIN.force_pw_change_periodically == 1) { // recommend to change password
$('#btnSkip').show(); $('#btnSkip').show();
skipPwdDate = ClientData.userInfo_pwdSkipDt(); skipPwdDate = ClientData.userInfo_pwdSkipDt();
if (skipPwdDate == null || skipPwdDate == 'undefined') { if (skipPwdDate == null || skipPwdDate == 'undefined') {
OpenChangePasswordDialog(); LOGIN.OpenChangePasswordDialog();
$(".ui-dialog-titlebar").hide(); $(".ui-dialog-titlebar").hide();
} }
else { else {
...@@ -295,7 +288,7 @@ function processLogin() { ...@@ -295,7 +288,7 @@ function processLogin() {
//OpenUrlでコンテンツ開く場合 //OpenUrlでコンテンツ開く場合
if( paramContentID != '' ){ if( paramContentID != '' ){
login.showContentViewByOpenUrl(paramContentID); LOGIN.showContentViewByOpenUrl(paramContentID);
} else { } else {
//ホームへ移動 //ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home); avwScreenMove("abvw/" + ScreenIds.Home);
...@@ -303,12 +296,12 @@ function processLogin() { ...@@ -303,12 +296,12 @@ function processLogin() {
} }
else if (numDay > 30) { else if (numDay > 30) {
OpenChangePasswordDialog(); LOGIN.OpenChangePasswordDialog();
$(".ui-dialog-titlebar").hide(); $(".ui-dialog-titlebar").hide();
} }
} }
} else if (force_pw_change_periodically == 2) { // Force to change password } else if (LOGIN.force_pw_change_periodically == 2) { // Force to change password
OpenChangePasswordDialog(); LOGIN.OpenChangePasswordDialog();
$('#btnSkip').hide(); $('#btnSkip').hide();
$(".ui-dialog-titlebar").hide(); $(".ui-dialog-titlebar").hide();
$("#txtPwdRemind").css('visibility', 'hidden'); $("#txtPwdRemind").css('visibility', 'hidden');
...@@ -317,7 +310,7 @@ function processLogin() { ...@@ -317,7 +310,7 @@ function processLogin() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
//OpenUrlでコンテンツ開く場合 //OpenUrlでコンテンツ開く場合
if( paramContentID != '' ){ if( paramContentID != '' ){
login.showContentViewByOpenUrl(paramContentID); LOGIN.showContentViewByOpenUrl(paramContentID);
} else { } else {
//ホームへ移動 //ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home); avwScreenMove("abvw/" + ScreenIds.Home);
...@@ -327,28 +320,27 @@ function processLogin() { ...@@ -327,28 +320,27 @@ function processLogin() {
} }
} }
else { else {
login_errorMessage = data.errorMessage; LOGIN.login_errorMessage = data.errorMessage;
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), data.errorMessage).toString()); $('#main-error-message').html(AVWEB.format(i18nText('msgLoginErrWrong'), data.errorMessage).toString());
$('#main-error-message').show(); $('#main-error-message').show();
} }
}, function (xhr, statusText, errorThrown) { }, function (xhr, statusText, errorThrown) {
if (xhr.responseText && xhr.status != 0) { if (xhr.responseText && xhr.status != 0) {
login_errorMessage = JSON.parse(xhr.responseText).errorMessage; LOGIN.login_errorMessage = JSON.parse(xhr.responseText).errorMessage;
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), JSON.parse(xhr.responseText).errorMessage).toString()); $('#main-error-message').html(AVWEB.format(i18nText('msgLoginErrWrong'), JSON.parse(xhr.responseText).errorMessage).toString());
} else { } else {
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), 'E001')); $('#main-error-message').html(AVWEB.format(i18nText('msgLoginErrWrong'), 'E001'));
} }
$('#main-error-message').show(); $('#main-error-message').show();
}); });
}; };
//Change Password Process //Change Password Process
function changePasswordProcess(){ LOGIN.changePasswordProcess = function(){
var accountPath = $('#txtAccPath').val(); var accountPath = $('#txtAccPath').val();
//var sid = ClientData.userInfo_sid();
var sid = ClientData.userInfo_sid_local(); var sid = ClientData.userInfo_sid_local();
var loginId = $('#txtAccId').val(); var loginId = $('#txtAccId').val();
var password = $('#txtCurrentPass').val(); var password = $('#txtCurrentPass').val();
...@@ -366,7 +358,7 @@ function changePasswordProcess(){ ...@@ -366,7 +358,7 @@ function changePasswordProcess(){
var result = data.result; var result = data.result;
if (result == 'success') { if (result == 'success') {
$('#dialog-error-message').css('display', 'none'); $('#dialog-error-message').css('display', 'none');
CloseChangePasswordDialog(); LOGIN.CloseChangePasswordDialog();
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home); avwScreenMove("abvw/" + ScreenIds.Home);
} }
...@@ -388,79 +380,76 @@ function changePasswordProcess(){ ...@@ -388,79 +380,76 @@ function changePasswordProcess(){
}; };
//Change Language Japanese //Change Language Japanese
function changeLanguageJa(){ LOGIN.changeLanguageJa = function(){
changeLanguage(Consts.ConstLanguage_Ja); changeLanguage(Consts.ConstLanguage_Ja);
document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle');
//ClientData.userInfo_language(Consts.ConstLanguage_Ja); //ClientData.userInfo_language(Consts.ConstLanguage_Ja);
if (login_errorMessage != ""){ if (LOGIN.login_errorMessage != ""){
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), login_errorMessage).toString()); $('#main-error-message').html(AVWEB.format(i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
} }
}; };
//Change Language Korean //Change Language Korean
function changeLanguageKo(){ LOGIN.changeLanguageKo = function(){
changeLanguage(Consts.ConstLanguage_Ko); changeLanguage(Consts.ConstLanguage_Ko);
document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle');
//ClientData.userInfo_language(Consts.ConstLanguage_Ko); //ClientData.userInfo_language(Consts.ConstLanguage_Ko);
if (login_errorMessage != ""){ if (LOGIN.login_errorMessage != ""){
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), login_errorMessage).toString()); $('#main-error-message').html(AVWEB.format(i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
} }
}; };
//Change Language English //Change Language English
function changeLanguageEn(){ LOGIN.changeLanguageEn = function(){
changeLanguage(Consts.ConstLanguage_En); changeLanguage(Consts.ConstLanguage_En);
document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle');
//ClientData.userInfo_language(Consts.ConstLanguage_En); //ClientData.userInfo_language(Consts.ConstLanguage_En);
if (login_errorMessage != ""){ if (LOGIN.login_errorMessage != ""){
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), login_errorMessage).toString()); $('#main-error-message').html(AVWEB.format(i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
} }
}; };
//Login click function //Login click function
function loginFunction() { LOGIN.loginFunction = function() {
if (checkValidation()) { if (LOGIN.checkValidation()) {
processLogin(); LOGIN.processLogin();
} }
}; };
//Change Password function //Change Password function
function changePassFunction(){ LOGIN.changePassFunction = function(){
if(checkDialogValidation()){ if(LOGIN.checkDialogValidation()){
changePasswordProcess(); LOGIN.changePasswordProcess();
} }
}; };
//Skip Password function //Skip Password function
function skipPassFunction(){ LOGIN.skipPassFunction = function(){
var date = new Date(); var date = new Date();
ClientData.userInfo_pwdSkipDt(date); ClientData.userInfo_pwdSkipDt(date);
//window.location = "abvw/" + ScreenIds.Home;
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home); avwScreenMove("abvw/" + ScreenIds.Home);
}; };
//Open Change Password Dialog //Open Change Password Dialog
function OpenChangePasswordDialog(){ LOGIN.OpenChangePasswordDialog = function(){
// Clear all input values // Clear all input values
$("#main-password-change").show(); $("#main-password-change").show();
$("#main-password-change").center(); $("#main-password-change").center();
lockLayout(); lockLayout();
}; };
//Close Chnage Password Dialog //Close Chnage Password Dialog
function CloseChangePasswordDialog(){ LOGIN.CloseChangePasswordDialog = function(){
$("#main-password-change").dialog('close'); $("#main-password-change").dialog('close');
}; };
//Save Service Option //Save Service Option
function saveServiceUserOption(){ LOGIN.saveServiceUserOption = function(){
$.each(optionList, function (i, option) { $.each(LOGIN.optionList, function (i, option) {
if (option.serviceName == 'force_pw_change_periodically') { if (option.serviceName == 'force_pw_change_periodically') {
ClientData.serviceOpt_force_pw_change_periodically(option.value); ClientData.serviceOpt_force_pw_change_periodically(option.value);
...@@ -484,7 +473,6 @@ function saveServiceUserOption(){ ...@@ -484,7 +473,6 @@ function saveServiceUserOption(){
} }
else if (option.serviceName == 'web_screen_lock_wait') { else if (option.serviceName == 'web_screen_lock_wait') {
ClientData.serviceOpt_web_screen_lock_wait(option.value); ClientData.serviceOpt_web_screen_lock_wait(option.value);
} }
else if( option.serviceName == 'catalog_edition' ) { else if( option.serviceName == 'catalog_edition' ) {
...@@ -506,104 +494,145 @@ function saveServiceUserOption(){ ...@@ -506,104 +494,145 @@ function saveServiceUserOption(){
}; };
//Get Service Option //Get Service Option
function getServiceOptionList(){ LOGIN.getServiceOptionList = function(){
$.each(optionList, function(i, option){ $.each(LOGIN.optionList, function(i, option){
if(option.serviceName == 'force_pw_change_periodically'){ if(option.serviceName == 'force_pw_change_periodically'){
force_pw_change_periodically = option.value; LOGIN.force_pw_change_periodically = option.value;
} }
else if(option.serviceName == 'force_pw_change_on_login'){ else if(option.serviceName == 'force_pw_change_on_login'){
force_pw_change_on_login = option.value; LOGIN.force_pw_change_on_login = option.value;
} }
else if(option.serviceName == 'force_login_periodically'){ else if(option.serviceName == 'force_login_periodically'){
force_login_periodically = option.value; LOGIN.force_login_periodically = option.value;
} }
else if(option.serviceName == 'marking'){ else if(option.serviceName == 'marking'){
marking = option.value; LOGIN.marking = option.value;
} }
else if(option.serviceName == 'user_data_backup'){ else if(option.serviceName == 'user_data_backup'){
user_data_backup = option.value; LOGIN.user_data_backup = option.value;
} }
}); });
}; };
function OpenChangePassword() { //function OpenChangePassword() {
//$("#dlgChangePassword").dialog("open"); // //$("#dlgChangePassword").dialog("open");
//$(".ui-dialog-titlebar").hide(); // //$(".ui-dialog-titlebar").hide();
}; //};
function loginWhenClickEnter(e){ LOGIN.loginWhenClickEnter = function(e){
var code = (e.keyCode ? e.keyCode : e.which); var code = (e.keyCode ? e.keyCode : e.which);
if(code == 13) { //Enter keycode if(code == 13) { //Enter keycode
$('#btnLogin').click(); $('#btnLogin').click();
} }
}; };
$(document).ready(function (e) { $(document).ready(function (e) {
if (isAnonymousLogin()) { //セッションストレージクリア
//SessionStorageUtils.clear();
//avwUserSessionObj = null;
// create new session
avwCreateUserSession();
initi18n();
var sysSettings = avwSysSetting(); // get info in conf.json
//getitsサーバー設定確認
//getitsモード初期化
ClientData.isGetitsMode(false);
if( sysSettings.apiUrl == "" ){
//引数パラメータを取得
var siteUrl = LOGIN.getUrlParams('siteUrl');
var urlPath = LOGIN.getUrlParams('urlPath');
if(siteUrl != "" && urlPath != ""){
//getitsモード有効
ClientData.isGetitsMode(true);
//api接続先設定
ClientData.conf_apiUrl( siteUrl + "{0}/abvapi" );
ClientData.conf_apiLoginUrl( siteUrl + "nuabvapi" );
ClientData.conf_apiResourceDlUrl( siteUrl + "{0}/dl" );
//アカウント関連
ClientData.userInfo_accountPath(urlPath);
ClientData.userInfo_accountPath_session(urlPath);
ClientData.userInfo_loginId("");
ClientData.userInfo_loginId_session("");
}
} else {
//confのパラメータセット
ClientData.conf_apiUrl( sysSettings.apiUrl );
ClientData.conf_apiLoginUrl( sysSettings.apiLoginUrl );
ClientData.conf_apiResourceDlUrl( sysSettings. apiResourceDlUrl );
}
if( ClientData.isGetitsMode() == true ){
$('#anonymous').show();
setTimeout(
function () {
LOGIN.initLoginGetitsUser();
},
LOGIN.timeWaitSplashScreen
);
} else if (COMMON.isAnonymousLogin()) {
console.log("COMMON.isAnonymousLogin");
$('#anonymous').show(); $('#anonymous').show();
setTimeout( setTimeout(
function () { function () {
initLoginAnonymousUser(); LOGIN.initLoginAnonymousUser();
}, timeWaitSplashScreen); }, LOGIN.timeWaitSplashScreen);
} }
else { else {
$('#normalUser').show(); $('#normalUser').show();
$('#formlogin').hide(); $('#formlogin').hide();
$('#logologin').animate({ "margin-top": 0 }, timeWaitSplashScreen, $('#logologin').animate({ "margin-top": 0 }, LOGIN.timeWaitSplashScreen,
function () { function () {
$('#formlogin').show(); $('#formlogin').show();
$('#menu-language').animate({ opacity: 1 }, timeWaitSplashScreen); $('#menu-language').animate({ opacity: 1 }, LOGIN.timeWaitSplashScreen);
$('#formlogin').animate({ opacity: 1 }, timeWaitSplashScreen); $('#formlogin').animate({ opacity: 1 }, LOGIN.timeWaitSplashScreen);
$('.cnt_footer').animate({ opacity: 1 }, timeWaitSplashScreen); $('.cnt_footer').animate({ opacity: 1 }, LOGIN.timeWaitSplashScreen);
} }
); );
initLoginNormalUser(); LOGIN.initLoginNormalUser();
} }
// setTimeout(function () {
// if (isAnonymousLogin()) {
// initLoginAnonymousUser();
// }
// else {
// $('#splashscreen').fadeOut(timeWaitSplashScreen, 'swing', function () {
// $('#login-screen').fadeIn(1000, 'swing');
// });
// initLoginNormalUser();
// }
// }, timeWaitSplashScreen);
}); });
// init login for normal user // init login for normal user
function initLoginNormalUser() { LOGIN.initLoginNormalUser = function() {
document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle');
//Initial Screen //Initial Screen
initialScreen(); LOGIN.initialScreen();
//Change language japanese //Change language japanese
$('#language-ja').click(changeLanguageJa); $('#language-ja').click(LOGIN.changeLanguageJa);
//Change language korean //Change language korean
$('#language-ko').click(changeLanguageKo); $('#language-ko').click(LOGIN.changeLanguageKo);
//Change laguage english //Change laguage english
$('#language-en').click(changeLanguageEn); $('#language-en').click(LOGIN.changeLanguageEn);
//Button login click event //Button login click event
$('#btnLogin').click(loginFunction); $('#btnLogin').click(LOGIN.loginFunction);
//Button Change click event //Button Change click event
$('#btnChange').click(changePassFunction); $('#btnChange').click(LOGIN.changePassFunction);
//Button Skip click event //Button Skip click event
$('#btnSkip').click(skipPassFunction); $('#btnSkip').click(LOGIN.skipPassFunction);
$('#txtPassword').keydown(loginWhenClickEnter); $('#txtPassword').keydown(LOGIN.loginWhenClickEnter);
}; };
// init login for anonymous user // init login for anonymous user
function initLoginAnonymousUser() { LOGIN.initLoginAnonymousUser = function() {
document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle');
...@@ -615,18 +644,18 @@ function initLoginAnonymousUser() { ...@@ -615,18 +644,18 @@ function initLoginAnonymousUser() {
urlpath: sysSettings.anonymousLoginPath urlpath: sysSettings.anonymousLoginPath
}; };
avwCmsApiWithUrl(sysSettings.apiLoginUrl, null, 'webClientAnonymousLogin', 'post', params, function (data) { avwCmsApiWithUrl(ClientData.conf_apiLoginUrl(), null, 'webClientAnonymousLogin', 'post', params, function (data) {
if (data.result == 'success') { if (data.result == 'success') {
//clear session of old anonymous user //clear session of old anonymous user
SessionStorageUtils.clear(); //SessionStorageUtils.clear();
//警告表示を組み込んだら i18nText()の値が未定義になるので言語リソース再読み込み //警告表示を組み込んだら i18nText()の値が未定義になるので言語リソース再読み込み
initi18n(); initi18n();
avwUserSessionObj = null; //avwUserSessionObj = null;
// create new session for anonymous user // create new session for anonymous user
avwCreateUserSession(); //avwCreateUserSession();
// set info user anonymous login // set info user anonymous login
ClientData.userInfo_accountPath(sysSettings.anonymousLoginPath); ClientData.userInfo_accountPath(sysSettings.anonymousLoginPath);
...@@ -647,36 +676,21 @@ function initLoginAnonymousUser() { ...@@ -647,36 +676,21 @@ function initLoginAnonymousUser() {
ClientData.pushInfo_newMsgNumber(0); ClientData.pushInfo_newMsgNumber(0);
// get service option list // get service option list
optionList = data.serviceOptionList; LOGIN.optionList = data.serviceOptionList;
// save service user option // save service user option
saveServiceUserOption(); LOGIN.saveServiceUserOption();
//$.each(data.serviceOptionList, function (i, option) {
// if (option.serviceName == 'marking') {
// ClientData.serviceOpt_marking(option.value);
// } else if( option.serviceName == 'catalog_edition' ) {
// ClientData.serviceOpt_catalog_edition(option.value);
// } else if( option.serviceName == 'hibiyakadan_catalog' ) {
// ClientData.serviceOpt_hibiyakadan_catalog(option.value);
// } else if( option.serviceName == 'usable_readinglog_gps' ) {
// ClientData.serviceOpt_usable_readinglog_gps(option.value);
// } else if( option.serviceName == 'usable_readinglog_object' ) {
// ClientData.serviceOpt_usable_readinglog_object(option.value);
// }
//});
// hide splash screen then move to home page // hide splash screen then move to home page
$('#anonymous').fadeOut('slow', 'swing', function () { $('#anonymous').fadeOut('slow', 'swing', function () {
//avwScreenMove("abvw/" + ScreenIds.Home);
//カタログエディション対応判定 //カタログエディション対応判定
if( ClientData.serviceOpt_catalog_edition() == 'Y'){ if( ClientData.serviceOpt_catalog_edition() == 'Y'){
//引数パラメータがあれば取得 //引数パラメータがあれば取得
var paramContentID = login.getUrlParams('cid'); var paramContentID = LOGIN.getUrlParams('cid');
//カタログ対応 //カタログ対応
if( paramContentID != '' ){ if( paramContentID != '' ){
//OpenUrlでコンテンツ開く //OpenUrlでコンテンツ開く
login.showContentViewByOpenUrl(paramContentID); LOGIN.showContentViewByOpenUrl(paramContentID);
} else { } else {
//ホームへ移動 //ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home); avwScreenMove("abvw/" + ScreenIds.Home);
...@@ -690,28 +704,115 @@ function initLoginAnonymousUser() { ...@@ -690,28 +704,115 @@ function initLoginAnonymousUser() {
} }
else { else {
if (data.errorMessage != null && data.errorMessage != undefined) { if (data.errorMessage != null && data.errorMessage != undefined) {
showMessageErrorLoginAnonymous(format(i18nText('msgAnonymousLoginErr'), data.errorMessage).toString()); LOGIN.showMessageErrorLoginAnonymous(AVWEB.format(i18nText('msgAnonymousLoginErr'), data.errorMessage).toString());
}
else {
LOGIN.showMessageErrorLoginAnonymous(i18nText('msgAnonymousLoginErr2'));
}
}
}, function (xhr, statusText, errorThrown) {
if (xhr.responseText && xhr.status != 0) {
var errorMessage = JSON.parse(xhr.responseText).errorMessage;
if (errorMessage) {
LOGIN.showMessageErrorLoginAnonymous(AVWEB.format(i18nText('msgAnonymousLoginErr'), errorMessage).toString());
}
else {
LOGIN.showMessageErrorLoginAnonymous(i18nText('msgAnonymousLoginErr2'));
}
} else {
LOGIN.showMessageErrorLoginAnonymous(i18nText('msgAnonymousLoginErr2'));
}
});
};
// init login for getits user
LOGIN.initLoginGetitsUser = function() {
document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle');
//var sysSettings = avwSysSetting(); // get info in conf.json
var params = {
urlpath: ClientData.userInfo_accountPath()
};
initi18n();
avwCmsApiWithUrl(ClientData.conf_apiLoginUrl(), ClientData.userInfo_accountPath(), 'webClientGetitsLogin', 'post', params, function (data) {
if (data.result == 'success') {
//clear session of old anonymous user
//SessionStorageUtils.clear();
//警告表示を組み込んだら i18nText()の値が未定義になるので言語リソース再読み込み
//initi18n();
//avwUserSessionObj = null;
// create new session for getits user
//avwCreateUserSession();
// set info user anonymous login
//ClientData.userInfo_accountPath(sysSettings.anonymousLoginPath);
//ClientData.userInfo_accountPath_session(sysSettings.anonymousLoginPath);
//ClientData.userInfo_loginId(sysSettings.anonymousLoginId);
//ClientData.userInfo_loginId_session(sysSettings.anonymousLoginId);
ClientData.userInfo_userName(data.userName);
ClientData.userInfo_sid(data.sid);
ClientData.userInfo_sid_local(data.sid);
// clear all local storage data of old anonymous
LocalStorageUtils.clear();
// set number new push message to 0
ClientData.pushInfo_newMsgNumber(0);
// get service option list
LOGIN.optionList = data.serviceOptionList;
// save service user option
LOGIN.saveServiceUserOption();
// hide splash screen then move to home page
$('#anonymous').fadeOut('slow', 'swing', function () {
//引数パラメータがあれば取得
var paramContentID = LOGIN.getUrlParams('cid');
//カタログ対応
if( paramContentID != '' ){
//OpenUrlでコンテンツ開く
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
}
});
}
else {
if (data.errorMessage != null && data.errorMessage != undefined) {
LOGIN.showMessageErrorLoginAnonymous(AVWEB.format(i18nText('msgAnonymousLoginErr'), data.errorMessage).toString());
} }
else { else {
showMessageErrorLoginAnonymous(i18nText('msgAnonymousLoginErr2')); LOGIN.showMessageErrorLoginAnonymous(i18nText('msgAnonymousLoginErr2'));
} }
} }
}, function (xhr, statusText, errorThrown) { }, function (xhr, statusText, errorThrown) {
if (xhr.responseText && xhr.status != 0) { if (xhr.responseText && xhr.status != 0) {
var errorMessage = JSON.parse(xhr.responseText).errorMessage; var errorMessage = JSON.parse(xhr.responseText).errorMessage;
if (errorMessage) { if (errorMessage) {
showMessageErrorLoginAnonymous(format(i18nText('msgAnonymousLoginErr'), errorMessage).toString()); LOGIN.showMessageErrorLoginAnonymous(AVWEB.format(i18nText('msgAnonymousLoginErr'), errorMessage).toString());
} }
else { else {
showMessageErrorLoginAnonymous(i18nText('msgAnonymousLoginErr2')); LOGIN.showMessageErrorLoginAnonymous(i18nText('msgAnonymousLoginErr2'));
} }
} else { } else {
showMessageErrorLoginAnonymous(i18nText('msgAnonymousLoginErr2')); LOGIN.showMessageErrorLoginAnonymous(i18nText('msgAnonymousLoginErr2'));
} }
}); });
}; };
function showMessageErrorLoginAnonymous(errorMessage) { LOGIN.showMessageErrorLoginAnonymous = function(errorMessage) {
$().toastmessage({ position: 'middle-center' }); $().toastmessage({ position: 'middle-center' });
$().toastmessage('showToast', { $().toastmessage('showToast', {
type: 'error', type: 'error',
...@@ -722,7 +823,7 @@ function showMessageErrorLoginAnonymous(errorMessage) { ...@@ -722,7 +823,7 @@ function showMessageErrorLoginAnonymous(errorMessage) {
}; };
// OpenUriで開いた場合の直接コンテンツ表示 // OpenUriで開いた場合の直接コンテンツ表示
login.showContentViewByOpenUrl = function(strContentId) { LOGIN.showContentViewByOpenUrl = function(strContentId) {
var contentType = ''; var contentType = '';
var result = []; var result = [];
...@@ -740,7 +841,7 @@ login.showContentViewByOpenUrl = function(strContentId) { ...@@ -740,7 +841,7 @@ login.showContentViewByOpenUrl = function(strContentId) {
contentType = data.contentData.contentType; contentType = data.contentData.contentType;
if(contentType == ContentTypeKeys.Type_Others){ if(contentType == ContentTypeKeys.Type_Others){
//Download content //Download content
downloadResourceById(strContentId); HEADER.downloadResourceById(strContentId);
// redraw content remove new icon // redraw content remove new icon
//drawEditImage(contentId); 不要 //drawEditImage(contentId); 不要
} else { } else {
...@@ -754,11 +855,11 @@ login.showContentViewByOpenUrl = function(strContentId) { ...@@ -754,11 +855,11 @@ login.showContentViewByOpenUrl = function(strContentId) {
data.contentData.contentId, data.contentData.contentId,
function() function()
{ {
login.alertMessageOkFunction_callback(); LOGIN.alertMessageOkFunction_callback();
}, },
function() function()
{ {
login.alertMessageCancelFunction_callback(); LOGIN.alertMessageCancelFunction_callback();
} }
); );
//avwScreenMove("abvw/" + ScreenIds.ContentView); //avwScreenMove("abvw/" + ScreenIds.ContentView);
...@@ -774,16 +875,16 @@ login.showContentViewByOpenUrl = function(strContentId) { ...@@ -774,16 +875,16 @@ login.showContentViewByOpenUrl = function(strContentId) {
}; };
//警告表示時のOK処理 //警告表示時のOK処理
login.alertMessageOkFunction_callback = function(){ LOGIN.alertMessageOkFunction_callback = function(){
avwScreenMove("abvw/" + ScreenIds.ContentView); avwScreenMove("abvw/" + ScreenIds.ContentView);
}; };
//警告表示時のキャンセル処理 //警告表示時のキャンセル処理
login.alertMessageCancelFunction_callback = function(){ LOGIN.alertMessageCancelFunction_callback = function(){
avwScreenMove("abvw/" + ScreenIds.Home); avwScreenMove("abvw/" + ScreenIds.Home);
}; };
//Get param url //Get param url
login.getUrlParams = function(name){ LOGIN.getUrlParams = function(name){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)"; var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS ); var regex = new RegExp( regexS );
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
$(document).ready(function () { $(document).ready(function () {
if (!avwCheckLogin(ScreenIds.Login)) return; if (!avwCheckLogin(ScreenIds.Login)) return;
ToogleLogoutNortice(); COMMON.ToogleLogoutNortice();
LockScreen(); COMMON.LockScreen();
document.title = i18nText('dspSetting') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspSetting') + ' | ' + i18nText('sysAppTitle');
...@@ -56,7 +56,7 @@ $(document).ready(function () { ...@@ -56,7 +56,7 @@ $(document).ready(function () {
$("#dspOptBk").show(); $("#dspOptBk").show();
// check disabled button backup // check disabled button backup
checkDisabledButton('#dlgConfirmBackup .option_backup input', '#dspOptBk_OK'); HEADER.checkDisabledButton('#dlgConfirmBackup .option_backup input', '#dspOptBk_OK');
} }
else { else {
$("#dspOptBk").hide(); $("#dspOptBk").hide();
...@@ -119,7 +119,7 @@ $(document).ready(function () { ...@@ -119,7 +119,7 @@ $(document).ready(function () {
} }
// check disabled button restore // check disabled button restore
checkDisabledButton('#dlgConfirmRestore .option_backup input', '#dspOptRes_OK'); HEADER.checkDisabledButton('#dlgConfirmRestore .option_backup input', '#dspOptRes_OK');
} }
else { else {
...@@ -333,7 +333,7 @@ function dspOptBk_OK_Click(e) { ...@@ -333,7 +333,7 @@ function dspOptBk_OK_Click(e) {
} }
// call backup file at header // call backup file at header
DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark, false, HEADER.DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark, false,
function () { function () {
// Check to hide/show backup button // Check to hide/show backup button
...@@ -539,7 +539,7 @@ function restoreBookmarkData() ...@@ -539,7 +539,7 @@ function restoreBookmarkData()
{ sid: ClientData.userInfo_sid(), filename: "Bookmark.json" }, // deviceType: '4', { sid: ClientData.userInfo_sid(), filename: "Bookmark.json" }, // deviceType: '4',
function (data) { function (data) {
if (data) { if (data) {
getDataBookmark(data); COMMON.getDataBookmark(data);
ClientData.isChangedBookmark(false); ClientData.isChangedBookmark(false);
result = true; result = true;
} }
...@@ -560,7 +560,7 @@ function restoreMemoData() { ...@@ -560,7 +560,7 @@ function restoreMemoData() {
{ sid: ClientData.userInfo_sid(), filename: "ContentMemo.json" }, //deviceType: '4', { sid: ClientData.userInfo_sid(), filename: "ContentMemo.json" }, //deviceType: '4',
function (data) { function (data) {
if (data) { if (data) {
getDataMemo(data); COMMON.getDataMemo(data);
//ClientData.isChangedMemo(true); //ClientData.isChangedMemo(true);
result = true; result = true;
} }
...@@ -582,7 +582,7 @@ function restoreMarkingData() ...@@ -582,7 +582,7 @@ function restoreMarkingData()
{ sid: ClientData.userInfo_sid(), filename: "Marking.json" }, // deviceType: '4', { sid: ClientData.userInfo_sid(), filename: "Marking.json" }, // deviceType: '4',
function (data) { function (data) {
if (data) { if (data) {
getDataMarking(data); COMMON.getDataMarking(data);
ClientData.isChangedMarkingData(false); ClientData.isChangedMarkingData(false);
result = true; result = true;
} }
...@@ -639,11 +639,11 @@ function dspSave_Click(e) { ...@@ -639,11 +639,11 @@ function dspSave_Click(e) {
// Show/not show alert when press F5.close tab.broswer. // Show/not show alert when press F5.close tab.broswer.
if ($("#chkOpt005").attr('checked') == 'checked') { if ($("#chkOpt005").attr('checked') == 'checked') {
ClientData.userOpt_closeOrRefreshAlert(1); ClientData.userOpt_closeOrRefreshAlert(1);
ToogleLogoutNortice(); COMMON.ToogleLogoutNortice();
} }
else { else {
ClientData.userOpt_closeOrRefreshAlert(0); ClientData.userOpt_closeOrRefreshAlert(0);
ToogleLogoutNortice(); COMMON.ToogleLogoutNortice();
} }
// 毎回ログアウトの時、バックアップするかどうかは必ず確認する // 毎回ログアウトの時、バックアップするかどうかは必ず確認する
if ($("#chkOptBkCfm").attr('checked') == 'checked') { if ($("#chkOptBkCfm").attr('checked') == 'checked') {
...@@ -731,7 +731,7 @@ function OpenChangePassword() { ...@@ -731,7 +731,7 @@ function OpenChangePassword() {
function closeChangePassword(skip) { function closeChangePassword(skip) {
//$("#dlgChangePassword").dialog("close"); //$("#dlgChangePassword").dialog("close");
$("#dlgChangePassword").hide(); $("#dlgChangePassword").hide();
unlockLayout(); COMMON.unlockLayout();
}; };
// Want to change password // Want to change password
...@@ -826,7 +826,7 @@ function dspOptBk_Click(e) { ...@@ -826,7 +826,7 @@ function dspOptBk_Click(e) {
$('#chkopBkMarking').removeAttr('disabled'); $('#chkopBkMarking').removeAttr('disabled');
} }
setDisabledButton('#dlgConfirmBackup .option_backup input', '#dspOptBk_OK'); HEADER.setDisabledButton('#dlgConfirmBackup .option_backup input', '#dspOptBk_OK');
openBackup(); openBackup();
}; };
...@@ -1049,7 +1049,7 @@ function closeBackup(cancel) { ...@@ -1049,7 +1049,7 @@ function closeBackup(cancel) {
} }
//$("#dlgConfirmBackup").dialog("close"); //$("#dlgConfirmBackup").dialog("close");
$("#dlgConfirmBackup").hide(); $("#dlgConfirmBackup").hide();
unlockLayout(); COMMON.unlockLayout();
}; };
function openRestore() { function openRestore() {
...@@ -1070,7 +1070,7 @@ function closeRestore(cancel) { ...@@ -1070,7 +1070,7 @@ function closeRestore(cancel) {
} }
//$("#dlgConfirmRestore").dialog("close"); //$("#dlgConfirmRestore").dialog("close");
$("#dlgConfirmRestore").hide(); $("#dlgConfirmRestore").hide();
unlockLayout(); COMMON.unlockLayout();
}; };
// Get input current password // Get input current password
......
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