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;
};
...@@ -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');
......
...@@ -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();
......
...@@ -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');
......
...@@ -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');
......
...@@ -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');
......
...@@ -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