Commit 822c73cc by Masaru Abe

#12996 getits対応

parent 271dff71
......@@ -7,6 +7,12 @@
/*
* User Environment Check Class
*/
//グローバルの名前空間用のオブジェクトを用意する
var AVWEB = {};
AVWEB.hasErrorKey = 'AVW_HASERR';
var UserEnvironment = function() {
this.appName = navigator.appName;
......@@ -139,7 +145,7 @@ UserSetting.prototype.show = function(elmid) {
if(value) {
var js = JSON.parse(value);
$.each(js, function(k, v) {
tags = tags + "<b>" + k + "</b>:" + v + "<br />";
tags = tags + "<b>" + k + "</b>:" + v + "<br />";
});
}
tags = tags + "</p>";
......@@ -217,7 +223,7 @@ UserSession.prototype.set = function(key, value) {
if(storage) {
if(this.available == false) {
if(key == "init") {
storage.setItem("AVWS_" + key, value);
storage.setItem("AVWS_" + key, value);
} else {
throw new Error("Session destoryed.");
}
......@@ -230,9 +236,9 @@ UserSession.prototype.set = function(key, value) {
UserSession.prototype.get = function(key) {
var value = null;
if(this.available) {
value = this._get(key);
value = this._get(key);
} else {
throw new Error("Session Destroyed.");
throw new Error("Session Destroyed.");
}
return value;
};
......@@ -241,9 +247,9 @@ UserSession.prototype._get = function(key) {
var storage = window.sessionStorage;
var value = null;
if(storage) {
value = storage.getItem("AVWS_" + key);
value = storage.getItem("AVWS_" + key);
}
return value;
return value;
};
/* destroy user session */
UserSession.prototype.destroy = function() {
......@@ -338,7 +344,7 @@ function avwCreateUserSession() {
if(avwUserSessionObj) {
avwUserSessionObj.destroy();
} else {
avwUserSessionObj = new UserSession();
avwUserSessionObj = new UserSession();
avwUserSessionObj.init();
}
return avwUserSessionObj;
......@@ -382,13 +388,13 @@ function avwCheckLogin(option) {
}
/* ログイン画面に戻る */
$('#avw-unauth-ok').click(function() {
window.location = returnPage;
});
window.location = returnPage;
});
return false;
}
return true;
};
/* get user setting object */
/* get user setting object */
function avwUserSetting() {
if(avwUserSettingObj == null) {
avwUserSettingObj = new UserSetting();
......@@ -396,24 +402,15 @@ function avwUserSetting() {
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) */
function avwCmsApi(accountPath, apiName, type, params, success, error) {
var sysSettings = avwSysSetting();
_callCmsApi(sysSettings.apiUrl, accountPath, apiName, type, params, true, success, error);
//var sysSettings = avwSysSetting();
_callCmsApi(ClientData.conf_apiUrl(), accountPath, apiName, type, params, true, success, error);
};
/* CMS API Call(sync. call) */
function avwCmsApiSync(accountPath, apiName, type, params, success, error) {
var sysSettings = avwSysSetting();
_callCmsApi(sysSettings.apiUrl, accountPath, apiName, type, params, false, success, error);
//var sysSettings = avwSysSetting();
_callCmsApi(ClientData.conf_apiUrl(), accountPath, apiName, type, params, false, success, error);
};
/* CMS API Call(async. call) */
function avwCmsApiWithUrl(url, accountPath, apiName, type, params, success, error) {
......@@ -433,12 +430,12 @@ function _callCmsApi(url, accountPath, apiName, type, params, async, success, er
// url 構築
var apiUrl;
if(!url) {
apiUrl = sysSettings.apiUrl;
apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
} else {
apiUrl = url;
}
if(accountPath) {
apiUrl = format(apiUrl, accountPath)
apiUrl = AVWEB.format(apiUrl, accountPath)
}
apiUrl = apiUrl + '/' + apiName + '/';
......@@ -467,7 +464,7 @@ function _callCmsApi(url, accountPath, apiName, type, params, async, success, er
},
success: function(data) {
if(success) {
success(data);
success(data);
}
},
error: function(xmlHttpRequest, txtStatus, errorThrown) {
......@@ -565,9 +562,9 @@ function avwGrabContentPageImage(accountPath, params, success, error) {
//url 構築
var apiUrl;
apiUrl = sysSettings.apiUrl;
apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) {
apiUrl = format(apiUrl, accountPath)
apiUrl = AVWEB.format(apiUrl, accountPath)
}
apiUrl = apiUrl + '/' + apiName + '/';
......@@ -669,9 +666,9 @@ function avwUploadBackupFile(accountPath, params, async, success, error) {
//url 構築
var apiUrl;
apiUrl = sysSettings.apiUrl;
apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) {
apiUrl = format(apiUrl, accountPath)
apiUrl = AVWEB.format(apiUrl, accountPath)
}
apiUrl = apiUrl + '/' + apiName + '/';
......@@ -726,11 +723,11 @@ function avwUploadBackupFile(accountPath, params, async, success, error) {
* uploadBackupFileは multipart/form-data でPOST送信する
*/
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) {
if(success) {
success(data);
success(data);
}
},
error: function(xmlHttpRequest, txtStatus, errorThrown) {
......@@ -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 */
var hasErrorKey = 'AVW_HASERR';
function showSystemError() {
if(avwHasError()) {
......@@ -799,7 +781,7 @@ function showSystemError() {
text: errMes,
close: function() {
//ログアウト時と同じ後始末処理をしてログイン画面に戻す
if( !webLogoutEvent() ){
if( !HEADER.webLogoutEvent() ){
//ログアウト出来なかった
SessionStorageUtils.clear();
avwUserSetting().remove(Keys.userInfo_sid);
......@@ -821,7 +803,7 @@ function avwHasError() {
var session = window.sessionStorage;
var isError = false;
if(session) {
isError = session.getItem(hasErrorKey);
isError = session.getItem(AVWEB.hasErrorKey);
}
return (isError == 'true');
};
......@@ -829,14 +811,14 @@ function avwHasError() {
function avwSetErrorState() {
var session = window.sessionStorage;
if(session) {
session.setItem(hasErrorKey, true);
session.setItem(AVWEB.hasErrorKey, true);
}
};
/* エラー状態をクリア */
function avwClearError() {
var session = window.sessionStorage;
if(session) {
session.setItem(hasErrorKey, false);
session.setItem(AVWEB.hasErrorKey, false);
}
};
/* ブラウザunload時に警告メッセージの出力設定を行う関数 */
......@@ -860,18 +842,52 @@ function avwScreenMove(url) {
/* Debug Log */
function avwLog(msg) {
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 構築
var sysSettings = avwSysSetting();
var apiUrl = sysSettings.apiUrl;
//var sysSettings = avwSysSetting();
var apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) {
apiUrl = format(apiUrl, accountPath);
apiUrl = AVWEB.format(apiUrl, accountPath);
}
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();
if (unlockFunc) {
var val = unlockFunc($('#passwd-txt').val(), forceUnlockFunc);
if (!val.result) {
$('#screenLockErrMsg').text(format(errorMessage, val.errorCode.errorMessage));
$('#screenLockErrMsg').text(AVWEB.format(errorMessage, val.errorCode.errorMessage));
$('#screenLockErrMsg').fadeIn();
$('#passwd-txt').focus();
......
......@@ -46,8 +46,8 @@
<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="./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/home.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/jquery.cookie.js?#UPDATEID#" ></script>
......
......@@ -21,7 +21,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
$('#limit_level1 .deletebtn .cancel').unbind('click').click(
function () {
if (isNotUnlockScreen != 1) {
unlockLayout();
COMMON.unlockLayout();
}
$('#limit_level1').hide();
//キャンセル
......@@ -36,7 +36,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
$('#limit_level1 .deletebtn .ok').unbind('click').click(
function () {
if (isNotUnlockScreen != 1) {
unlockLayout();
COMMON.unlockLayout();
}
$('#limit_level1').hide();
funcOk();
......@@ -76,7 +76,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
$('#limit_level2 .deletebtn .cancel').unbind('click').click(
function () {
if (isNotUnlockScreen != 1) {
unlockLayout();
COMMON.unlockLayout();
}
$('#limit_level2').hide();
//キャンセル
......@@ -123,14 +123,14 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
ClientData.userInfo_sid(data.sid);
if (isNotUnlockScreen != 1) {
unlockLayout();
COMMON.unlockLayout();
}
$('#limit_level2').hide();
// open content
funcOk();
}
else {
$('#lblMessageLimitError').html(format(i18nText('msgLoginErrWrong'), data.errorMessage).toString()).show();
$('#lblMessageLimitError').html(AVWEB.format(i18nText('msgLoginErrWrong'), data.errorMessage).toString()).show();
}
},
function (xhr, statusText, errorThrown) {
......@@ -138,7 +138,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
if (xhr.responseText && xhr.status != 0) {
errorCode = JSON.parse(xhr.responseText).errorMessage;
}
$('#lblMessageLimitError').html(format(i18nText('msgLoginErrWrong'), errorCode).toString()).show();
$('#lblMessageLimitError').html(AVWEB.format(i18nText('msgLoginErrWrong'), errorCode).toString()).show();
}
);
......
......@@ -29,7 +29,7 @@ $(document).ready(function () {
if (!avwCheckLogin(ScreenIds.Login)) return;
LockScreen();
COMMON.LockScreen();
document.title = i18nText('dspShiori') + ' | ' + i18nText('sysAppTitle');
......@@ -79,10 +79,10 @@ $(document).ready(function () {
dspTitleNm_Click();
}
else {
checkForceChangePassword();
HEADER.checkForceChangePassword();
}
if (isAnonymousLogin()) {
if (COMMON.isAnonymousLogin()) {
//プッシュメッセージ隠す
$('#dspPushMessage').hide();
}
......@@ -127,7 +127,7 @@ function dspTitleNm_Click() {
// $("#dspPubDt").removeClass("active_tops");
//changeStatusSort(this, isAsc);
setStatusSort('#dspTitleNm', isAsc);
HEADER.setStatusSort('#dspTitleNm', isAsc);
};
function dspTitleNmKn_Click() {
......@@ -155,7 +155,7 @@ function dspTitleNmKn_Click() {
// $("#dspPubDt").removeClass("active_tops");
//changeStatusSort(this, isAsc);
setStatusSort('#dspTitleNmKn', isAsc);
HEADER.setStatusSort('#dspTitleNmKn', isAsc);
};
function dspPubDt_Click() {
......@@ -183,7 +183,7 @@ function dspPubDt_Click() {
// $("#dspPubDt").addClass("active_tops");
//changeStatusSort(this, isAsc);
setStatusSort('#dspPubDt', isAsc);
HEADER.setStatusSort('#dspPubDt', isAsc);
};
// Event of each button [読む]
......@@ -216,7 +216,7 @@ function dspCancel_Click() {
// Close dialog
//$('#dlgConfirm').dialog('close');
$("#delete_shiori").hide();
unlockLayout();
COMMON.unlockLayout();
};
// Process deleting
function dspConfirmOK_Click() {
......@@ -258,7 +258,7 @@ function dspConfirmOK_Click() {
// --------------------------------
$("#delete_shiori").hide();
unlockLayout();
COMMON.unlockLayout();
};
function dspDelete1_Click() {
......@@ -267,7 +267,7 @@ function dspDelete1_Click() {
function dspDelete_Click() {
if ($("input[name='chkDelete']:checked").length > 0) {
lockLayout();
COMMON.lockLayout();
$("#delete_shiori").show();
$("#delete_shiori").center();
}
......@@ -342,12 +342,12 @@ function ShowBookmark() {
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);
}
else {
// Not existed -> Show error
insertRowError(contentid, htmlEncode(contentTitle), pageDetail.pageNo);
insertRowError(contentid, COMMON.htmlEncode(contentTitle), pageDetail.pageNo);
}
}
......@@ -379,7 +379,7 @@ function SortTitleName(isAsc) {
// $("#txtTitleNmDesc").show();
// }
setStatusSort('#dspTitleNm', isAsc);
HEADER.setStatusSort('#dspTitleNm', isAsc);
var arrSource = ClientData.BookMarkData();
var arrTarget = [];
......@@ -451,7 +451,7 @@ function SortTitleNameKana(isAsc) {
// $("#txtTitleNmKnDesc").show();
// }
setStatusSort('#dspTitleNmKn', isAsc);
HEADER.setStatusSort('#dspTitleNmKn', isAsc);
var arrSource = ClientData.BookMarkData();
var arrTarget = [];
......@@ -507,7 +507,7 @@ function SortPubDate(isAsc) {
// $("#txtPubDtDesc").show();
// }
setStatusSort('#dspPubDt', isAsc);
HEADER.setStatusSort('#dspPubDt', isAsc);
var arrSource = ClientData.BookMarkData();
var arrTarget = [];
......@@ -592,7 +592,7 @@ function insertRowError(contentid, pageTitle, pageNo) {
newRow += '</span>';
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 += " <label class='lang name' lang='msgShioriDeleted'>" + i18nText('msgShioriDeleted') + "</label>";
......@@ -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 += "</a>";
newRow += "<div class='text'>";
//newRow += '<label id="Label1" class="name" style="color: #2D83DA;">' + 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 += '<label id="Label1" class="name" style="color: #2D83DA;">' + COMMON.truncate(pageTitle, 20) + '</label>';
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 += '<ul class="date">';
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 class="pic" style="align:right">';
......@@ -698,15 +698,15 @@ function insertRow(contentid, pageThumbnail, pageTitle, pageText, pageNo, hasMem
newRow +='</a>';
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="#">' + 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="#">' + COMMON.truncate(pageTitle, 20) + '</a>';
newRow +='<div class="info">';
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/18</li>';
......@@ -964,7 +964,7 @@ function changeLanguageCallBackFunction() {
// else {
// $("#txtTitleNmKnDesc").show();
// }
setStatusSort('#dspTitleNmKn', orderSort == Consts.ConstOrderSetting_Asc);
HEADER.setStatusSort('#dspTitleNmKn', orderSort == Consts.ConstOrderSetting_Asc);
}
}
document.title = i18nText('dspShiori') + ' | ' + i18nText('sysAppTitle');
......@@ -1078,13 +1078,13 @@ Setting dialog [ end ]
----------------------------------------------------------------------------
*/
function truncate(strInput, length){
if (strInput.length <= length)
{
return strInput;
}
else
{
return strInput.substring(0, length) + "...";
}
};
//function truncate(strInput, length){
// if (strInput.length <= length)
// {
// return strInput;
// }
// else
// {
// return strInput.substring(0, length) + "...";
// }
//};
......@@ -60,7 +60,7 @@ $(document).ready(function(){
return;
}
LockScreen();
COMMON.LockScreen();
document.title = i18nText('txtSearchResult') + ' | ' + i18nText('sysAppTitle');
......@@ -134,10 +134,10 @@ $(document).ready(function(){
});
}else{
//Check if Force Change password
checkForceChangePassword();
HEADER.checkForceChangePassword();
}
if (isAnonymousLogin()) {
if (COMMON.isAnonymousLogin()) {
//プッシュメッセージ隠す
$('#dspPushMessage').hide();
}
......@@ -237,7 +237,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' </a>'
+' <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">'
+' <ul class="date">'
+' <li><span class="lang" lang="txtPubDt"> </span> : '+outputDate+'</li>'
......@@ -265,8 +265,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' </a>'
+ ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="name dialog" contentid="' + post.contentId + '">'
+ ' <img class="listIcon" src="'+getIconTypeContent(post.contentType)+'" width="20" height="20">'
+ truncate(htmlEncode(post.contentTitle), 20)
+ ' <img class="listIcon" src="' + HEADER.getIconTypeContent(post.contentType)+'" width="20" height="20">'
+ COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 20)
+ ' </a>'
+ ' <div class="info">'
+ ' <ul class="date">'
......@@ -398,7 +398,7 @@ function handleLanguage(){
// $('#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){
$('#control-sort-titlekana').css('display','block');
......@@ -641,7 +641,7 @@ function sortByTitleFunction(){
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'){
recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
......@@ -713,7 +713,7 @@ function sortByTitleKanaFunction(){
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'){
recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
......@@ -786,7 +786,7 @@ function sortByReleaseDateFunction(){
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'){
recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
......@@ -879,13 +879,13 @@ function isPdfContent(contentType){
// return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
//};
/* get url */
function getURL(apiName) {
var sysSettings = avwSysSetting();
var url = sysSettings.apiResourceDlUrl;
url = format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
return url;
};
///* get url */
//function getURL(apiName) {
// var sysSettings = avwSysSetting();
// var url = sysSettings.apiResourceDlUrl;
// url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
// return url;
//};
//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)
//For testing without other Type.
if(contentType == ContentTypeKeys.Type_Others){
//Download content
downloadResourceById(contentId);
HEADER.downloadResourceById(contentId);
// redraw content remove new icon
drawEditImage(contentId);
}
else if( contentType == ContentTypeKeys.Type_Link ){
//link content
viewLinkContentById(contentId);
HEADER.viewLinkContentById(contentId);
// redraw content remove new icon
drawEditImage(contentId);
}
......@@ -1587,7 +1587,7 @@ function handleSortDisp(){
//
// $('#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){
......@@ -1609,7 +1609,7 @@ function handleSortDisp(){
//
// $('#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){
......@@ -1630,7 +1630,7 @@ function handleSortDisp(){
//
// $('#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(){
function formatDisplayMoreRecord(){
i18nReplaceText();
//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(){
}
};
function truncate(strInput, length){
if (strInput.length <= length)
{
return strInput;
}
else
{
return strInput.substring(0, length) + "...";
}
};
//function truncate(strInput, length){
// if (strInput.length <= length)
// {
// return strInput;
// }
// else
// {
// return strInput.substring(0, length) + "...";
// }
//};
function resizeResourceThumbnail(mg, width, height) {
var newWidth;
......@@ -1846,7 +1846,7 @@ function resizeResourceThumbnail(mg, width, height) {
function removeHoverCss(){
if(isTouchDevice()){
if(COMMON.isTouchDevice()){
$('#control-sort-title').removeClass('nottouchdevice');
$('#control-sort-titlekana').removeClass('nottouchdevice');
$('#control-sort-releasedate').removeClass('nottouchdevice');
......
......@@ -33,7 +33,7 @@ function showAnket(url, fullscreen, objectId) {
var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime);
SetObjectLogActionTime( contentID, objectId, actionTime );
COMMON.SetObjectLogActionTime( contentID, objectId, actionTime );
$container.removeAttr('style');
hideDialog();
......
......@@ -156,7 +156,7 @@ function closeBookmarkBox() {
//change class
$('#listbookmark').removeClass();
if (isTouchDevice() == true) {
if (COMMON.isTouchDevice() == true) {
$('#listbookmark').addClass('bmList_device');
} else {
$('#listbookmark').addClass('bmList');
......@@ -202,7 +202,7 @@ function closeIndexBox() {
//change class
$('#listindex').removeClass();
if (isTouchDevice() == true) {
if (COMMON.isTouchDevice() == true) {
$('#listindex').addClass('index_device');
} else {
$('#listindex').addClass('index');
......@@ -248,7 +248,7 @@ function closeCopyTextBox() {
//change class
$('#copytext').removeClass();
if (isTouchDevice() == true) {
if (COMMON.isTouchDevice() == true) {
$('#copytext').addClass('copy_device');
} else {
$('#copytext').addClass('copy');
......@@ -298,7 +298,7 @@ function nextPage_click() {
//abe
//alert("nextPage_click:" + contentID );
SetPageLog( contentID, getPageIndex() + 1);
COMMON.SetPageLog( contentID, getPageIndex() + 1);
playBGMOfContent();
playBGMOfPage(getPageIndex() + 1);
......@@ -324,7 +324,7 @@ function prevPage_click() {
//abe
//alert("prevPage_click:" + contentID);
SetPageLog( contentID, getPageIndex() - 1);
COMMON.SetPageLog( contentID, getPageIndex() - 1);
playBGMOfContent();
playBGMOfPage(getPageIndex() - 1);
......@@ -353,7 +353,7 @@ function firstPage_click() {
//abe
//alert("firstPage_click:" + contentID );
SetPageLog( contentID, 0 );
COMMON.SetPageLog( contentID, 0 );
playBGMOfContent();
playBGMOfPage(0);
......@@ -424,7 +424,7 @@ function lastPage_click() {
//abe
//alert("lastPage_click:" + contentID );
SetPageLog( contentID, totalPage - 1 );
COMMON.SetPageLog( contentID, totalPage - 1 );
playBGMOfContent();
playBGMOfPage(totalPage - 1);
......@@ -659,11 +659,11 @@ function update3DImagesArr(){
var tempX = object3d["x"];
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++){
var url = temp3dview[j];
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 = [];
......@@ -1298,8 +1298,8 @@ function mouseUp_CanvasMain(event) {
function imgBack_click() {
/* set end log */
SetEndLog(contentID);
RegisterLog();
COMMON.SetEndLog(contentID);
COMMON.RegisterLog();
window.onbeforeunload = null;
......@@ -1331,8 +1331,8 @@ function imgHome_click(e) {
e.preventDefault();
/* set end log */
SetEndLog(contentID);
RegisterLog();
COMMON.SetEndLog(contentID);
COMMON.RegisterLog();
//window.location.href = ScreenIds.Home;
avwScreenMove(ScreenIds.Home);
......
......@@ -278,7 +278,7 @@ function disableAllControl() {
$("#slider_page").slider("option", "disabled", true);
}
disable('#txtSearch', '#txtSlider');
COMMON.disable('#txtSearch', '#txtSlider');
$('#button_next_canvas').css('display', 'none');
$('#button_pre_canvas').css('display', 'none');
......@@ -376,10 +376,10 @@ function enableAllControl() {
$("#slider_page").slider("option", "disabled", false);
if(contentType == ContentTypeKeys.Type_PDF){
enable('#txtSearch', '#txtSlider');
COMMON.enable('#txtSearch', '#txtSlider');
}
else if(contentType == ContentTypeKeys.Type_NoFile){
enable('#txtSlider');
COMMON.enable('#txtSlider');
}
}
......@@ -389,7 +389,7 @@ function enableAllControl() {
$('#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');
$('#imgBack').addClass('back_device');
......
......@@ -124,7 +124,7 @@ function dlgGomu_dspOK_click() {
// Close dialog
//$("#dlgGomu").dialog('close');
/*$("#dlgGomu").fadeOut('medium', function(){
//unlockLayout();
//COMMON.unlockLayout();
});*/
$("#dlgGomu").hide();
......@@ -222,7 +222,7 @@ $(function () {
// ---------------------------------
// Setup for easer [start]
// ---------------------------------
if(isTouchDevice() == true){
if(COMMON.isTouchDevice() == true){
document.getElementById('dlgGomu_dspOK').addEventListener('touchstart',touchStart_BtnOk_Gomu,false);
document.getElementById('dlgGomu_dspCancel').addEventListener('touchstart',touchStart_BtnCancel_Gomu,false);
}
......
......@@ -177,7 +177,7 @@ function handleImagePreviewEvent(){
$('#main-control-prev').mouseleave(mainControlPrevMouseLeaveFunction);
if (isTouchDevice() == false) {
if (COMMON.isTouchDevice() == false) {
//$('.main-control').mouseenter(mainControlMouseEnterFunction);
$('#main-control-next').mouseenter(mainControlNextMouseEnterFunction);
$('#main-control-prev').mouseenter(mainControlPrevMouseEnterFunction);
......@@ -242,7 +242,7 @@ var slideshow_isTransaction = false;
//Main Image next icon function
function imageMainSelectNextFunction() {
if (isTouchDevice() == true) {
if (COMMON.isTouchDevice() == true) {
$('#main-control-next').css('opacity', '0.5');
}
......@@ -276,7 +276,7 @@ function imageMainSelectNextFunction() {
//Main Image prev icon function
function imageMainSelectPrevFunction() {
if (isTouchDevice() == true) {
if (COMMON.isTouchDevice() == true) {
$('#main-control-prev').css('opacity', '0.5');
}
......@@ -374,7 +374,7 @@ function renderMainImage(i) {
mainImg.css('background-image', 'url(' + slideshowImageCollection[i].thumbnail + ')');
slideshow_isTransaction = false;
if (isTouchDevice() == true) {
if (COMMON.isTouchDevice() == true) {
$('#main-control-next').css('opacity', '0');
$('#main-control-prev').css('opacity', '0');
}
......
......@@ -145,12 +145,12 @@ function initPage() {
initDisplayToolbarDevice();
// Lock screen
LockScreen();
COMMON.LockScreen();
StartTimerUpdateLog();
/* set start log */
SetStartLog(contentID);
COMMON.SetStartLog(contentID);
/* get info of content */
//Start Function: No.12
......@@ -346,7 +346,7 @@ function initPage() {
//START : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image
setLoadingSize();
//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") {
var tempRatio = document.documentElement.clientWidth / window.innerWidth;
if (tempRatio <= 1) {
......@@ -399,7 +399,7 @@ function initPage() {
//nAjaxLoad = 0;
if (isTouchDevice() == true) {
if (COMMON.isTouchDevice() == true) {
if (avwUserEnvObj.os == "android") {
standardRatio = document.documentElement.clientWidth / window.innerWidth;
startDetectZoom({ time: 500,
......@@ -486,7 +486,7 @@ function initPage() {
/* window resize event */
$(window).resize(function () {
if (isTouchDevice() == true) {
if (COMMON.isTouchDevice() == true) {
if (avwUserEnvObj.os == "android") {
var tempRatio = document.documentElement.clientWidth / window.innerWidth;
if (tempRatio <= 1) {
......@@ -539,7 +539,7 @@ function initPage() {
//nAjaxLoad = 0;
if (isTouchDevice() == true) {
if (COMMON.isTouchDevice() == true) {
if (avwUserEnvObj.os == "android") {
standardRatio = document.documentElement.clientWidth / window.innerWidth;
startDetectZoom({ time: 500,
......@@ -595,13 +595,13 @@ function initPageMediaAndHtmlType(){
initDisplayToolbarDevice();
// Lock screen
LockScreen();
COMMON.LockScreen();
//START TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log
StartTimerUpdateLog();
/* set start log */
SetStartLog(contentID);
COMMON.SetStartLog(contentID);
//END TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log
//enable SpecifyControl
......@@ -631,7 +631,7 @@ function initPageMediaAndHtmlType(){
$("#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
......
......@@ -65,7 +65,7 @@ function dlgMarking_dspSave_click() {
marking.content = saveCanvas.toDataURL("image/png");
//END TRB00098
//=== 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();
//=== End Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new marking/maker.
/* insert marking */
......
......@@ -66,7 +66,7 @@ function memoSaveFunction(){
//memoObj.posY = imagePt.y;
//=== 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();
//=== End Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new memo.
tempArr = ClientData.MemoData();
......
......@@ -109,7 +109,7 @@ function openContentDetail() {
// Get content detail
displayData.contentTitle = data.contentData.contentName;
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.
......@@ -126,7 +126,7 @@ function openContentDetail() {
}
}
// 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
);
......@@ -143,7 +143,7 @@ function openContentDetail() {
// Close content detail
function contentDetailClose_Click(e) {
e.preventDefault();
unlockLayout();
COMMON.unlockLayout();
$("#contentDetail").hide();
$("#sectionContentDetail").hide();
};
......@@ -221,11 +221,11 @@ function contentdetail_dspRead_Click_callback(outputId) {
if (ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Others) {
// Get content detail
downloadResourceById(ClientData.contentInfo_contentId());
HEADER.downloadResourceById(ClientData.contentInfo_contentId());
}
else if(ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Link){
// Get content detail
viewLinkContentById(ClientData.contentInfo_contentId());
HEADER.viewLinkContentById(ClientData.contentInfo_contentId());
}
else {
avwScreenMove(ScreenIds.ContentView);
......@@ -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.
/* get url */
function getURL(apiName) {
var sysSettings = avwSysSetting();
var url = sysSettings.apiResourceDlUrl;
url = format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
return url;
};
///* get url */
//function getURL(apiName) {
// var sysSettings = avwSysSetting();
// var url = sysSettings.apiResourceDlUrl;
// url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
// return url;
//};
//Check content type is pdf content
function isPdfContent(contentType){
......@@ -358,7 +358,7 @@ function ShowContent(contentID, contentTitle, contentDetail, contentThumbnail, d
// Show pages
for (var nIndex = 0; nIndex < pages.length; nIndex++) {
//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) {
var newRow = "";
newRow += "<ul>";
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 += "</ul>";
......@@ -539,16 +539,16 @@ $(function () {
Setting dialog [ end ]
----------------------------------------------------------------------------
*/
function truncate(strInput, length){
if (strInput.length <= length)
{
return strInput;
}
else
{
return strInput.substring(0, length) + "...";
}
};
//function truncate(strInput, length){
// if (strInput.length <= length)
// {
// return strInput;
// }
// else
// {
// return strInput.substring(0, length) + "...";
// }
//};
function resetLoadingImageSize(){
$("#imgContentThumbnail").attr('height','25px');
......
......@@ -63,7 +63,7 @@ $(document).ready(function(){
return;
}
LockScreen();
COMMON.LockScreen();
document.title = i18nText('dspViewHistory') + ' | ' + i18nText('sysAppTitle');
......@@ -123,10 +123,10 @@ $(document).ready(function(){
}
else{
//Check if Force Change password
checkForceChangePassword();
HEADER.checkForceChangePassword();
}
if (isAnonymousLogin()) {
if (COMMON.isAnonymousLogin()) {
//プッシュメッセージ隠す
$('#dspPushMessage').hide();
}
......@@ -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=""/>'
+ ' </a>'
+ ' <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">'
+ ' <ul class="date">'
+ ' <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)
+ ' </a>'
+ ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="name dialog" contentid="' + post.contentId + '">'
+ ' <img class="listIcon" src="'+getIconTypeContent(post.contentType)+'" width="20" height="20">'
+ truncate(htmlEncode(post.contentTitle), 20)
+ ' <img class="listIcon" src="' + HEADER.getIconTypeContent(post.contentType)+'" width="20" height="20">'
+ COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 20)
+ ' </a>'
+ ' <div class="info">'
+ ' <ul class="date">'
......@@ -298,7 +298,7 @@ function handleLanguage(){
var typeSort = ClientData.searchCond_sortType();
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 (orderSort == Consts.ConstOrderSetting_Asc) {
......@@ -513,7 +513,7 @@ function sortByTitleFunction(){
sortByTitleAsc();
}
setStatusSort('#control-sort-title',sortOrder == Consts.ConstOrderSetting_Asc);
HEADER.setStatusSort('#control-sort-title',sortOrder == Consts.ConstOrderSetting_Asc);
sortType = '1';
ClientData.searchCond_sortType(sortType);
......@@ -577,7 +577,7 @@ function sortByTitleKanaFunction(){
sortByTitleKanaAsc();
}
setStatusSort('#control-sort-titlekana',sortOrder == Consts.ConstOrderSetting_Asc);
HEADER.setStatusSort('#control-sort-titlekana',sortOrder == Consts.ConstOrderSetting_Asc);
sortType = '2';
//refresh gridview
......@@ -641,7 +641,7 @@ function sortByReleaseDateFunction(){
sortByPublishDateAsc();
}
setStatusSort('#control-sort-releasedate',sortOrder == Consts.ConstOrderSetting_Asc);
HEADER.setStatusSort('#control-sort-releasedate',sortOrder == Consts.ConstOrderSetting_Asc);
sortType = '3';
ClientData.searchCond_sortType(sortType);
......@@ -699,7 +699,7 @@ function sortByViewDateFunction(){
ClientData.searchCond_sortOrder(sortOrder);
}
setStatusSort('#control-sort-viewdate',sortOrder == Consts.ConstOrderSetting_Asc);
HEADER.setStatusSort('#control-sort-viewdate',sortOrder == Consts.ConstOrderSetting_Asc);
sortType = '4';
......@@ -775,13 +775,13 @@ function isPdfContent(contentType){
// return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
//};
/* get url */
function getURL(apiName) {
var sysSettings = avwSysSetting();
var url = sysSettings.apiResourceDlUrl;
url = format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
return url;
};
///* get url */
//function getURL(apiName) {
// var sysSettings = avwSysSetting();
// var url = sysSettings.apiResourceDlUrl;
// url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
// return url;
//};
//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)
if(contentType == ContentTypeKeys.Type_Others){
//Download content
downloadResourceById(contentId);
HEADER.downloadResourceById(contentId);
// redraw content remove new icon
drawEditImage(contentId);
}
else if( contentType == ContentTypeKeys.Type_Link ){
//link content
viewLinkContentById(contentId);
HEADER.viewLinkContentById(contentId);
// redraw content remove new icon
drawEditImage(contentId);
}
......@@ -1338,7 +1338,7 @@ function handleSortDisp(){
// }
//$('#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){
// if(orderSort == Consts.ConstOrderSetting_Asc){
......@@ -1359,7 +1359,7 @@ function handleSortDisp(){
// }
//$('#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){
// if(orderSort == Consts.ConstOrderSetting_Asc){
......@@ -1380,7 +1380,7 @@ function handleSortDisp(){
// }
//$('#control-sort-releasedate').addClass('active_tops');
setStatusSort('#control-sort-releasedate',orderSort == Consts.ConstOrderSetting_Asc);
HEADER.setStatusSort('#control-sort-releasedate',orderSort == Consts.ConstOrderSetting_Asc);
}
else{
// if(orderSort == Consts.ConstOrderSetting_Asc){
......@@ -1402,7 +1402,7 @@ function handleSortDisp(){
// }
//$('#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(){
$('.control_sort_off').hide();
};
function truncate(strInput, length){
if (strInput.length <= length)
{
return strInput;
}
else
{
return strInput.substring(0, length) + "...";
}
};
//function truncate(strInput, length){
// if (strInput.length <= length)
// {
// return strInput;
// }
// else
// {
// return strInput.substring(0, length) + "...";
// }
//};
function sortByTitleAsc(){
......@@ -1808,7 +1808,7 @@ function renderContentAfterSort(contentSortArr){
+ ' <img id="imgloading'+ post.contentid +'" src="./img/data_loading.gif" height="25px" class="home_canvas" width="25px"/>'
+ ' </a>'
+ ' <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">'
+ ' <ul class="date">'
+ ' <li><span class="lang" lang="txtPubDt">' + i18nText("txtPubDt") + '</span> : ' + outputDeliveryDate + '</li>'
......@@ -1833,8 +1833,8 @@ function renderContentAfterSort(contentSortArr){
+ ' </a>'
+ ' <div class="text">'
+ ' <a id="title' + post.contentid + '" class="name dialog" contentid="' + post.contentid + '">'
+ ' <img class="listIcon" src="'+getIconTypeContent(post.contenttype)+'" width="20" height="20">'
+ truncate(htmlEncode(post.contenttitle), 20)
+ ' <img class="listIcon" src="' + HEADER.getIconTypeContent(post.contenttype)+'" width="20" height="20">'
+ COMMON.truncate(COMMON.htmlEncode(post.contenttitle), 20)
+ ' </a>'
+ ' <div class="info">'
+ ' <ul class="date">'
......@@ -1938,7 +1938,7 @@ function resizeResourceThumbnail(mg, width, height) {
function removeHoverCss(){
if(isTouchDevice()){
if(COMMON.isTouchDevice()){
$('#control-sort-title').removeClass('nottouchdevice');
$('#control-sort-titlekana').removeClass('nottouchdevice');
$('#control-sort-releasedate').removeClass('nottouchdevice');
......
......@@ -19,8 +19,8 @@
$(document).ready(function () {
if (!avwCheckLogin(ScreenIds.Login)) return;
ToogleLogoutNortice();
LockScreen();
COMMON.ToogleLogoutNortice();
COMMON.LockScreen();
document.title = i18nText('dspSetting') + ' | ' + i18nText('sysAppTitle');
......@@ -56,7 +56,7 @@ $(document).ready(function () {
$("#dspOptBk").show();
// check disabled button backup
checkDisabledButton('#dlgConfirmBackup .option_backup input', '#dspOptBk_OK');
HEADER.checkDisabledButton('#dlgConfirmBackup .option_backup input', '#dspOptBk_OK');
}
else {
$("#dspOptBk").hide();
......@@ -119,7 +119,7 @@ $(document).ready(function () {
}
// check disabled button restore
checkDisabledButton('#dlgConfirmRestore .option_backup input', '#dspOptRes_OK');
HEADER.checkDisabledButton('#dlgConfirmRestore .option_backup input', '#dspOptRes_OK');
}
else {
......@@ -333,7 +333,7 @@ function dspOptBk_OK_Click(e) {
}
// call backup file at header
DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark, false,
HEADER.DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark, false,
function () {
// Check to hide/show backup button
......@@ -539,7 +539,7 @@ function restoreBookmarkData()
{ sid: ClientData.userInfo_sid(), filename: "Bookmark.json" }, // deviceType: '4',
function (data) {
if (data) {
getDataBookmark(data);
COMMON.getDataBookmark(data);
ClientData.isChangedBookmark(false);
result = true;
}
......@@ -560,7 +560,7 @@ function restoreMemoData() {
{ sid: ClientData.userInfo_sid(), filename: "ContentMemo.json" }, //deviceType: '4',
function (data) {
if (data) {
getDataMemo(data);
COMMON.getDataMemo(data);
//ClientData.isChangedMemo(true);
result = true;
}
......@@ -582,7 +582,7 @@ function restoreMarkingData()
{ sid: ClientData.userInfo_sid(), filename: "Marking.json" }, // deviceType: '4',
function (data) {
if (data) {
getDataMarking(data);
COMMON.getDataMarking(data);
ClientData.isChangedMarkingData(false);
result = true;
}
......@@ -639,11 +639,11 @@ function dspSave_Click(e) {
// Show/not show alert when press F5.close tab.broswer.
if ($("#chkOpt005").attr('checked') == 'checked') {
ClientData.userOpt_closeOrRefreshAlert(1);
ToogleLogoutNortice();
COMMON.ToogleLogoutNortice();
}
else {
ClientData.userOpt_closeOrRefreshAlert(0);
ToogleLogoutNortice();
COMMON.ToogleLogoutNortice();
}
// 毎回ログアウトの時、バックアップするかどうかは必ず確認する
if ($("#chkOptBkCfm").attr('checked') == 'checked') {
......@@ -731,7 +731,7 @@ function OpenChangePassword() {
function closeChangePassword(skip) {
//$("#dlgChangePassword").dialog("close");
$("#dlgChangePassword").hide();
unlockLayout();
COMMON.unlockLayout();
};
// Want to change password
......@@ -826,7 +826,7 @@ function dspOptBk_Click(e) {
$('#chkopBkMarking').removeAttr('disabled');
}
setDisabledButton('#dlgConfirmBackup .option_backup input', '#dspOptBk_OK');
HEADER.setDisabledButton('#dlgConfirmBackup .option_backup input', '#dspOptBk_OK');
openBackup();
};
......@@ -1049,7 +1049,7 @@ function closeBackup(cancel) {
}
//$("#dlgConfirmBackup").dialog("close");
$("#dlgConfirmBackup").hide();
unlockLayout();
COMMON.unlockLayout();
};
function openRestore() {
......@@ -1070,7 +1070,7 @@ function closeRestore(cancel) {
}
//$("#dlgConfirmRestore").dialog("close");
$("#dlgConfirmRestore").hide();
unlockLayout();
COMMON.unlockLayout();
};
// 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