Commit d2982151 by Masaru Abe

common.jsリファクタリング

parent c99fd4b4
......@@ -52,7 +52,7 @@
新着メッセージがあります!!!
</div>
<div class="cnt_header">
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<div class="menu_language">
<div class="clearfix">
<ul class="floatL">
......
......@@ -784,8 +784,8 @@ function showSystemError() {
if( !HEADER.webLogoutEvent() ){
//ログアウト出来なかった
SessionStorageUtils.clear();
avwUserSetting().remove(Keys.userInfo_sid);
avwScreenMove(ScreenIds.Login);
avwUserSetting().remove(COMMON.Keys.userInfo_sid);
avwScreenMove(COMMON.ScreenIds.Login);
}
}
});
......
......@@ -54,7 +54,7 @@
新着メッセージがあります!!!
</div>
<div class="cnt_header">
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<div class="menu_language">
<div class="clearfix">
<ul class="floatL">
......
......@@ -56,7 +56,7 @@
新着メッセージがあります!!!
</div>
<div class="cnt_header">
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<div class="menu_language">
<div class="clearfix">
<ul class="floatL">
......
......@@ -64,7 +64,7 @@
新着メッセージがあります!!!
</div>
<div class="cnt_header">
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<div class="menu_language">
<div class="clearfix">
<ul class="floatL">
......
......@@ -7,14 +7,14 @@ var pathImgContentNone = './img/page-none.png';
// Init function of page
$(document).ready(function () {
if (!avwCheckLogin(ScreenIds.Login)) return;
if (!avwCheckLogin(COMMON.ScreenIds.Login)) return;
COMMON.LockScreen();
document.title = I18N.i18nText('dspShiori') + ' | ' + I18N.i18nText('sysAppTitle');
// Set bookmark screen
ClientData.BookmarkScreen(ScreenIds.BookmarkList);
ClientData.BookmarkScreen(COMMON.ScreenIds.BookmarkList);
//Check if Force Change password
if (ClientData.requirePasswordChange() != 1) {
......@@ -187,7 +187,7 @@ function dspRead_Click_callback(data) {
ClientData.bookmark_pageNo(data.pageNo);
ClientData.contentInfo_contentType(data.contentType);
ClientData.IsRefresh(false);
avwScreenMove(ScreenIds.ContentView);
avwScreenMove(COMMON.ScreenIds.ContentView);
};
......@@ -778,7 +778,7 @@ $(function () {
$("#dspPubDt").click(dspPubDt_Click);
// Check JP language and show title kana
if (getCurrentLanguage() != Consts.ConstLanguage_Ja) {
if (getCurrentLanguage() != COMMON.Consts.ConstLanguage_Ja) {
$("#dspTitleNmKn").hide();
$("#dspTitleNmKn_Seperate").hide();
}
......@@ -928,7 +928,7 @@ function AddContent(strContentId, contentType) {
event of changing language
*/
function changeLanguageCallBackFunction() {
if (getCurrentLanguage() != Consts.ConstLanguage_Ja) {
if (getCurrentLanguage() != COMMON.Consts.ConstLanguage_Ja) {
$("#dspTitleNmKn").hide();
$("#dspTitleNmKn_Seperate").hide();
$("#txtTitleNmKnAsc").hide();
......@@ -944,7 +944,7 @@ function changeLanguageCallBackFunction() {
// else {
// $("#txtTitleNmKnDesc").show();
// }
HEADER.setStatusSort('#dspTitleNmKn', orderSort == Consts.ConstOrderSetting_Asc);
HEADER.setStatusSort('#dspTitleNmKn', orderSort == COMMON.Consts.ConstOrderSetting_Asc);
}
}
document.title = I18N.i18nText('dspShiori') + ' | ' + I18N.i18nText('sysAppTitle');
......
......@@ -184,7 +184,7 @@ function getDataJsonFile() {
}
//Get Data Of page to draw page
if(contentType == ContentTypeKeys.Type_NoFile){
if(contentType == COMMON.ContentTypeKeys.Type_NoFile){
var pageDataInfo = [];
pageDataInfo["height"] = JsonFile.height;
......
......@@ -439,7 +439,7 @@ PageObject.prototype.drawPageObject = function (context, opt) {
/*set status is loading page */
//Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
isLoadingObject = false;
......@@ -458,7 +458,7 @@ PageObject.prototype.drawPageObject = function (context, opt) {
if (ClientData.IsAddingMarking() == true) {
disableAllControl();
//Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
enableButtonMarking();
......@@ -475,7 +475,7 @@ PageObject.prototype.drawPageObject = function (context, opt) {
}
else {
//Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
enableAllControl();
......@@ -493,7 +493,7 @@ PageObject.prototype.drawPageObject = function (context, opt) {
/*finish loading */
//Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
$('#divImageLoading').css('display', 'none');
......@@ -525,7 +525,7 @@ PageObject.prototype.drawPageObject = function (context, opt) {
if (ClientData.IsAddingMarking() == true) {
disableAllControl();
//Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
enableButtonMarking();
......@@ -541,7 +541,7 @@ PageObject.prototype.drawPageObject = function (context, opt) {
//End Function : No.4 - Summary : make sure all page is loaded
} else {
//Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
enableAllControl();
......@@ -559,7 +559,7 @@ PageObject.prototype.drawPageObject = function (context, opt) {
/*finish loading */
//Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
$('#divImageLoading').css('display', 'none');
......@@ -1164,7 +1164,7 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
var dataJump = ClientData.JumpQueue();
dataJump.push(oldContent);
ClientData.JumpQueue(dataJump);
avwScreenMove(ScreenIds.ContentView);
avwScreenMove(COMMON.ScreenIds.ContentView);
}
}
//Type 0
......@@ -1177,7 +1177,7 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
var dataJump = ClientData.JumpQueue();
dataJump.push(oldContent);
ClientData.JumpQueue(dataJump);
avwScreenMove(ScreenIds.ContentView);
avwScreenMove(COMMON.ScreenIds.ContentView);
}
},
......@@ -1248,7 +1248,7 @@ function createAlertTypeDialog(msg){
var dataJump = ClientData.JumpQueue();
dataJump.push(moveContentParam.oldContent);
ClientData.JumpQueue(dataJump);
avwScreenMove(ScreenIds.ContentView);
avwScreenMove(COMMON.ScreenIds.ContentView);
});
};
......@@ -1314,7 +1314,7 @@ function createPwdRequiredTypeDialog(){
// update sid id
ClientData.userInfo_sid(data.sid);
avwScreenMove(ScreenIds.ContentView);
avwScreenMove(COMMON.ScreenIds.ContentView);
}
else {
$('#lblMessageLimitError').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), data.errorMessage).toString()).show();
......@@ -2219,7 +2219,7 @@ function createPage(pageNumber, pageImage, pageObjects, onCompleteFunc) {
var page = new ContentPage(pageNumber, pageImage);
/* add page Object */
//Start Function: No.12
if (contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile) {
if (contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_NoFile) {
page.addPageObjects(pageObjects);
}
//End Function: No.12
......
......@@ -365,7 +365,7 @@ function firstPage_click() {
// Clear canvas offscreen
clearCanvas(document.getElementById("offscreen"));
if(contentType == ContentTypeKeys.Type_PDF){
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) {
......@@ -392,7 +392,7 @@ function firstPage_click() {
});
}
//START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
else if(contentType == ContentTypeKeys.Type_NoFile){
else if(contentType == COMMON.ContentTypeKeys.Type_NoFile){
getPageObjectsByPageIndex(pageObjectsData, 0);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
......@@ -438,7 +438,7 @@ function lastPage_click() {
//pageImages = getURLPageImage("webContentPageImage") + "?contentId=" + contentID + "&sid=" + ClientData.userInfo_sid() + "&pageNo=" + (totalPage - 1);
if(contentType == ContentTypeKeys.Type_PDF){
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage },
function (data) {
......@@ -460,7 +460,7 @@ function lastPage_click() {
});
}
//START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
else if(contentType == ContentTypeKeys.Type_NoFile){
else if(contentType == COMMON.ContentTypeKeys.Type_NoFile){
getPageObjectsByPageIndex(pageObjectsData, totalPage - 1);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
......@@ -522,15 +522,15 @@ $(document).keydown(function (e) {
} else {
switch (e.keyCode) {
/* move page */
case ShortKeys.MovePrevious: /* move prev */
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
case COMMON.ShortKeys.MovePrevious: /* move prev */
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_NoFile){
if (getContent().hasPreviousPage()) {
prevPage_click();
}
}
break;
case ShortKeys.MoveNext: /* move next */
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
case COMMON.ShortKeys.MoveNext: /* move next */
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_NoFile){
if (getContent().hasNextPage()) {
nextPage_click();
}
......@@ -539,31 +539,31 @@ $(document).keydown(function (e) {
break;
/* zoom */
case ShortKeys.ZoomIn: /* zoomIn */
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_Image
|| contentType == ContentTypeKeys.Type_NoFile){
case COMMON.ShortKeys.ZoomIn: /* zoomIn */
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_Image
|| contentType == COMMON.ContentTypeKeys.Type_NoFile){
zoomIn();
}
break;
case ShortKeys.ZoomOut: /* zoomOut */
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_Image
|| contentType == ContentTypeKeys.Type_NoFile){
case COMMON.ShortKeys.ZoomOut: /* zoomOut */
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_Image
|| contentType == COMMON.ContentTypeKeys.Type_NoFile){
zoomOut();
}
break;
case ShortKeys.ZoomFit: /* screenFit*/
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_Image
|| contentType == ContentTypeKeys.Type_NoFile){
case COMMON.ShortKeys.ZoomFit: /* screenFit*/
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_Image
|| contentType == COMMON.ContentTypeKeys.Type_NoFile){
screenFit();
}
break;
/* marking && toolbar */
case ShortKeys.ShowHideToolbar: /* handle toolbar */
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_Image
|| contentType == ContentTypeKeys.Type_NoFile){
case COMMON.ShortKeys.ShowHideToolbar: /* handle toolbar */
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_Image
|| contentType == COMMON.ContentTypeKeys.Type_NoFile){
handleDisplayToolbar();
}
else{
......@@ -576,9 +576,9 @@ $(document).keydown(function (e) {
}
break;
case ShortKeys.ShowHideMarking: /* hide marking */
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_Image
|| contentType == ContentTypeKeys.Type_NoFile){
case COMMON.ShortKeys.ShowHideMarking: /* hide marking */
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_Image
|| contentType == COMMON.ContentTypeKeys.Type_NoFile){
imgmarking_click();
}
......@@ -594,30 +594,30 @@ $(document).keydown(function (e) {
else {
switch (e.keyCode) {
/* zoom */
case ShortKeys.ZoomInAlt: /* zoomIn */
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_Image
|| contentType == ContentTypeKeys.Type_NoFile){
case COMMON.ShortKeys.ZoomInAlt: /* zoomIn */
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_Image
|| contentType == COMMON.ContentTypeKeys.Type_NoFile){
zoomIn();
}
break;
case ShortKeys.ZoomOutAlt: /* zoomOut */
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_Image
|| contentType == ContentTypeKeys.Type_NoFile){
case COMMON.ShortKeys.ZoomOutAlt: /* zoomOut */
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_Image
|| contentType == COMMON.ContentTypeKeys.Type_NoFile){
zoomOut();
}
break;
case ShortKeys.ZoominAlt_Firefox: /* zoomIn */
case COMMON.ShortKeys.ZoominAlt_Firefox: /* zoomIn */
if(avwUserEnvObj.browser == 'firefox'){
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_Image
|| contentType == ContentTypeKeys.Type_NoFile){
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_Image
|| contentType == COMMON.ContentTypeKeys.Type_NoFile){
zoomIn();
}
}
break;
case ShortKeys.ZoomOutAlt_Firefox: /* zoomOut */
case COMMON.ShortKeys.ZoomOutAlt_Firefox: /* zoomOut */
if(avwUserEnvObj.browser == 'firefox'){
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_Image
|| contentType == ContentTypeKeys.Type_NoFile){
if(contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_Image
|| contentType == COMMON.ContentTypeKeys.Type_NoFile){
zoomOut();
}
}
......@@ -1306,7 +1306,7 @@ function imgBack_click() {
if (ClientData.JumpQueue()) {
var oldDataBack = ClientData.JumpQueue();
if (oldDataBack.length > 0) {
avwScreenMove(ScreenIds.ContentView);
avwScreenMove(COMMON.ScreenIds.ContentView);
ClientData.IsJumpBack(true);
} else {
/*check back */
......@@ -1334,8 +1334,8 @@ function imgHome_click(e) {
COMMON.SetEndLog(contentID);
COMMON.RegisterLog();
//window.location.href = ScreenIds.Home;
avwScreenMove(ScreenIds.Home);
//window.location.href = COMMON.ScreenIds.Home;
avwScreenMove(COMMON.ScreenIds.Home);
};
function closePopUpCopyMemo() {
......
......@@ -296,7 +296,7 @@ function enableAllControl() {
$("#imgbookmark").css('cursor', 'pointer');
//Start Function: No.12
if (contentType == ContentTypeKeys.Type_PDF) {
if (contentType == COMMON.ContentTypeKeys.Type_PDF) {
$("#listindex").css('cursor', 'pointer');
$("#copytext").css('cursor', 'pointer');
}
......@@ -317,7 +317,7 @@ function enableAllControl() {
$("#control_screen_2").css('cursor', 'pointer');
//Start Function: No.12
if (contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile) {
if (contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_NoFile) {
$("#slider_page").css('cursor', 'pointer');
$(".ui-slider-handle").css('cursor', 'pointer');
}
......@@ -345,7 +345,7 @@ function enableAllControl() {
$('#imgbookmark').removeClass();
//Start Function: No.12
if (contentType == ContentTypeKeys.Type_PDF) {
if (contentType == COMMON.ContentTypeKeys.Type_PDF) {
$('#listindex').bind('click', showListPageIndex);
$('#listindex').removeClass();
......@@ -372,13 +372,13 @@ function enableAllControl() {
checkDisableButtonZoom();
//Start Function: No.12
if (contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile) {
if (contentType == COMMON.ContentTypeKeys.Type_PDF || contentType == COMMON.ContentTypeKeys.Type_NoFile) {
$("#slider_page").slider("option", "disabled", false);
if(contentType == ContentTypeKeys.Type_PDF){
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
COMMON.enable('#txtSearch', '#txtSlider');
}
else if(contentType == ContentTypeKeys.Type_NoFile){
else if(contentType == COMMON.ContentTypeKeys.Type_NoFile){
COMMON.enable('#txtSlider');
}
}
......
......@@ -1229,7 +1229,7 @@ function renderNextPage(){
var pageNo = parseInt(changePageIndex(getPageIndex())) + 1;
//Get next page background image
if(contentType == ContentTypeKeys.Type_PDF){
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
......@@ -1245,7 +1245,7 @@ function renderNextPage(){
});
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else if(contentType == ContentTypeKeys.Type_NoFile){
else if(contentType == COMMON.ContentTypeKeys.Type_NoFile){
nextPageImage = pageImages;
nextContent.setPageImages(totalPage, nextPageImage)
.setPageObjects(nextPageObjects)
......@@ -1262,7 +1262,7 @@ function renderPrevPage(){
var pageNo = parseInt(changePageIndex(getPageIndex())) - 1;
//Get prev page background image
if(contentType == ContentTypeKeys.Type_PDF){
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
......@@ -1278,7 +1278,7 @@ function renderPrevPage(){
});
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else if(contentType == ContentTypeKeys.Type_NoFile){
else if(contentType == COMMON.ContentTypeKeys.Type_NoFile){
prevPageImage = pageImages;
prevContent.setPageImages(totalPage, prevPageImage)
.setPageObjects(prevPageObjects)
......
......@@ -143,10 +143,10 @@ function initPage() {
/* get info of content */
//Start Function: No.12
if(contentType == ContentTypeKeys.Type_Image){
if(contentType == COMMON.ContentTypeKeys.Type_Image){
getContentInfoTypeImage();
}
else if(contentType == ContentTypeKeys.Type_NoFile){
else if(contentType == COMMON.ContentTypeKeys.Type_NoFile){
//Start Function: No.4 - Editor : Long - Date: 08/20/2013
getPageTransitionConfig();
//End Function : No.4 - Editor : Long - Date : 08/20/2013
......@@ -186,7 +186,7 @@ function initPage() {
//Start Function : No.12
if(contentType == ContentTypeKeys.Type_PDF){
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
/* page index */
$('#listindex').click(showListPageIndex);
$('#divSearchResult li').live('click', clickSearchDetail);
......@@ -219,7 +219,7 @@ function initPage() {
$('#liDeleteMemo').click(click_liDeleteMemo);
//Start Function: No.12
if(contentType == ContentTypeKeys.Type_PDF){
if(contentType == COMMON.ContentTypeKeys.Type_PDF){
/*event search*/
showListSearchResult();
}
......@@ -413,7 +413,7 @@ function initPage() {
//START TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary :
else if(nAjaxLoad == 4){
//END TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary :
if(contentType == ContentTypeKeys.Type_NoFile){
if(contentType == COMMON.ContentTypeKeys.Type_NoFile){
/* handle from bookmark page */
//handleFromBookMarkPage();
/* check move content */
......@@ -807,7 +807,7 @@ function initImageCheckMarking() {
//Start Function: No.12 - Editor : Long
var tempPageNo = 0;
if(contentType == ContentTypeKeys.Type_Image)
if(contentType == COMMON.ContentTypeKeys.Type_Image)
{
tempPageNo = 1;
}
......
......@@ -47,7 +47,7 @@ function dlgMarking_dspSave_click() {
/*create new entity marking */
var marking = new MarkingEntity();
marking.contentid = contentID;
if(contentType == ContentTypeKeys.Type_Image){
if(contentType == COMMON.ContentTypeKeys.Type_Image){
marking.pageNo = 1;
}else{
marking.pageNo = changePageIndex(getPageIndex());
......
......@@ -15,7 +15,7 @@ var displayData = {
// Init function of page
$(document).ready(function () {
//alert(ClientData.contentInfo_contentId());
//if (!avwCheckLogin(ScreenIds.Login)) return;
//if (!avwCheckLogin(COMMON.ScreenIds.Login)) return;
//openContentDetail();
......@@ -199,16 +199,16 @@ function contentdetail_dspRead_Click_callback(outputId) {
//$('body,html').animate({ scrollTop: 0 }, 0);
ClientData.IsRefresh(false);
if (ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Others) {
if (ClientData.contentInfo_contentType() == COMMON.ContentTypeKeys.Type_Others) {
// Get content detail
HEADER.downloadResourceById(ClientData.contentInfo_contentId());
}
else if(ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Link){
else if(ClientData.contentInfo_contentType() == COMMON.ContentTypeKeys.Type_Link){
// Get content detail
HEADER.viewLinkContentById(ClientData.contentInfo_contentId());
}
else {
avwScreenMove(ScreenIds.ContentView);
avwScreenMove(COMMON.ScreenIds.ContentView);
}
};
......@@ -224,7 +224,7 @@ function contentdetail_dspRead_Click_callback(outputId) {
//Check content type is pdf content
function isPdfContent(contentType){
if(!(contentType == ContentTypeKeys.Type_PDF)){
if(!(contentType == COMMON.ContentTypeKeys.Type_PDF)){
return false;
}
else{
......
......@@ -8,7 +8,7 @@ HEADER.isHoverOn = false;
$(document).ready(function () {
if (!avwCheckLogin(ScreenIds.Login)) return;
if (!avwCheckLogin(COMMON.ScreenIds.Login)) return;
// Set event to prevent leave
//avwSetLogoutNortice();
......@@ -261,19 +261,19 @@ HEADER.searchHeaderButtonFunction = function(){
ClientData.searchCond_searchText(searchText);
ClientData.searchCond_searchDivision(searchDivision);
//window.location = ScreenIds.ContentSearch;
avwScreenMove(ScreenIds.ContentSearch);
//window.location = COMMON.ScreenIds.ContentSearch;
avwScreenMove(COMMON.ScreenIds.ContentSearch);
};
HEADER.homeClickFunction = function(){
//window.location = ScreenIds.Home;
avwScreenMove(ScreenIds.Home);
//window.location = COMMON.ScreenIds.Home;
avwScreenMove(COMMON.ScreenIds.Home);
};
//Change Language Japanese function
HEADER.changeLanguageJa = function(){
changeLanguage(Consts.ConstLanguage_Ja);
//ClientData.userInfo_language(Consts.ConstLanguage_Ja);
changeLanguage(COMMON.Consts.ConstLanguage_Ja);
//ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ja);
//$('#control-sort-titlekana').css('display','inline-block');
//$('#separate').css('display','inline-block');
//formatDisplayMoreRecord();
......@@ -285,8 +285,8 @@ HEADER.changeLanguageJa = function(){
//Change Language English functions
HEADER.changeLanguageEn = function(){
changeLanguage(Consts.ConstLanguage_En);
//ClientData.userInfo_language(Consts.ConstLanguage_En);
changeLanguage(COMMON.Consts.ConstLanguage_En);
//ClientData.userInfo_language(COMMON.Consts.ConstLanguage_En);
//$('#control-sort-titlekana').css('display','none');
//$('#separate').css('display','none');
//formatDisplayMoreRecord();
......@@ -298,8 +298,8 @@ HEADER.changeLanguageEn = function(){
//Change Language English function
HEADER.changeLanguageKo = function(){
changeLanguage(Consts.ConstLanguage_Ko);
//ClientData.userInfo_language(Consts.ConstLanguage_Ko);
changeLanguage(COMMON.Consts.ConstLanguage_Ko);
//ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ko);
//$('#control-sort-titlekana').css('display','none');
//$('#separate').css('display','none');
//formatDisplayMoreRecord();
......@@ -311,14 +311,14 @@ HEADER.changeLanguageKo = function(){
//Shiori function
HEADER.bookmarkFunction = function(){
//window.location = ScreenIds.BookmarkList;
avwScreenMove(ScreenIds.BookmarkList);
//window.location = COMMON.ScreenIds.BookmarkList;
avwScreenMove(COMMON.ScreenIds.BookmarkList);
};
//Update Config function
HEADER.updateConfigFunction = function(){
//window.location = ScreenIds.Setting;
avwScreenMove(ScreenIds.Setting);
//window.location = COMMON.ScreenIds.Setting;
avwScreenMove(COMMON.ScreenIds.Setting);
};
//Logout function
......@@ -415,8 +415,8 @@ HEADER.logoutFunction = function() {
};
HEADER.historyClickFunction = function(){
//window.location = ScreenIds.History;
avwScreenMove(ScreenIds.History);
//window.location = COMMON.ScreenIds.History;
avwScreenMove(COMMON.ScreenIds.History);
};
//Web Logout Event
......@@ -432,10 +432,10 @@ HEADER.webLogoutEvent = function(){
function (data) {
isExisted = true;
SessionStorageUtils.clear();
avwUserSetting().remove(Keys.userInfo_sid);
avwUserSetting().remove(COMMON.Keys.userInfo_sid);
// Move to login screen
//window.location = ScreenIds.Login;
avwScreenMove(ScreenIds.Login);
//window.location = COMMON.ScreenIds.Login;
avwScreenMove(COMMON.ScreenIds.Login);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
if (xmlHttpRequest.status == 403) {
......@@ -463,7 +463,7 @@ function confirmWithoutBackupFunction(e) {
}
ClientData.userOpt_logoutMode(1); // In next time, if choose: [do not show dialog], will not backup and logout
//window.location = ScreenIds.Login;
//window.location = COMMON.ScreenIds.Login;
HEADER.webLogoutEvent();
};
......@@ -726,7 +726,7 @@ HEADER.sendSignalBackupFinish = function(typeBackup)
/* ------ */
HEADER.checkForceChangePassword = function(){
if(ClientData.BookmarkScreen() != ScreenIds.Setting){
if(ClientData.BookmarkScreen() != COMMON.ScreenIds.Setting){
if(ClientData.requirePasswordChange() == 1){
//alert(I18N.i18nText('msgPWDNeedChange'));
HEADER.showErrorScreenForceChangePassword();
......@@ -760,8 +760,8 @@ HEADER.showErrorScreenForceChangePassword = function(){
});
$('#avw-unauth-ok').click(function() {
ClientData.BookmarkScreen(ScreenIds.Setting);
avwScreenMove(ScreenIds.Setting);
ClientData.BookmarkScreen(COMMON.ScreenIds.Setting);
avwScreenMove(COMMON.ScreenIds.Setting);
});
};
......@@ -999,47 +999,47 @@ HEADER.getIconTypeContent = function(contentType) {
var src = '';
switch (contentType) {
case ContentTypeKeys.Type_PDF:
case COMMON.ContentTypeKeys.Type_PDF:
{
src = 'img/bookshelf/icon_01.jpg';
break;
}
case ContentTypeKeys.Type_Enquete:
case COMMON.ContentTypeKeys.Type_Enquete:
{
src = 'img/bookshelf/icon_05.jpg';
break;
}
case ContentTypeKeys.Type_Html:
case COMMON.ContentTypeKeys.Type_Html:
{
src = 'img/bookshelf/icon_05.jpg';
break;
}
case ContentTypeKeys.Type_Image:
case COMMON.ContentTypeKeys.Type_Image:
{
src = 'img/bookshelf/icon_02.jpg';
break;
}
case ContentTypeKeys.Type_Music:
case COMMON.ContentTypeKeys.Type_Music:
{
src = 'img/bookshelf/icon_06.jpg';
break;
}
case ContentTypeKeys.Type_NoFile:
case COMMON.ContentTypeKeys.Type_NoFile:
{
src = 'img/bookshelf/icon_07.png';
break;
}
case ContentTypeKeys.Type_Others:
case COMMON.ContentTypeKeys.Type_Others:
{
src = 'img/bookshelf/icon_03.jpg';
break;
}
case ContentTypeKeys.Type_Video:
case COMMON.ContentTypeKeys.Type_Video:
{
src = 'img/bookshelf/icon_04.jpg';
break;
}
case ContentTypeKeys.Type_Link:
case COMMON.ContentTypeKeys.Type_Link:
{
src = 'img/bookshelf/icon_08.png';
break;
......@@ -1136,25 +1136,25 @@ HEADER.viewLinkContentById = function(contentId){
HEADER.getThumbnailForOtherType = function(contentType){
var src = '';
if(contentType == ContentTypeKeys.Type_Image){
if(contentType == COMMON.ContentTypeKeys.Type_Image){
src = COMMON.ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
else if(contentType == COMMON.ContentTypeKeys.Type_Music){
src = COMMON.ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
else if(contentType == COMMON.ContentTypeKeys.Type_Video){
src = COMMON.ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
else if(contentType == COMMON.ContentTypeKeys.Type_NoFile){
src = COMMON.ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
else if(contentType == COMMON.ContentTypeKeys.Type_Others){
src = COMMON.ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
else if(contentType == COMMON.ContentTypeKeys.Type_Html){
src = COMMON.ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
else if(contentType == COMMON.ContentTypeKeys.Type_Link){
src = COMMON.ThumbnailForOtherType.Thumbnail_LinkType;
}
......
......@@ -200,7 +200,7 @@ LOGIN.processLogin = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
......@@ -235,7 +235,7 @@ LOGIN.processLogin = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
......@@ -254,7 +254,7 @@ LOGIN.processLogin = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
......@@ -283,7 +283,7 @@ LOGIN.processLogin = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
......@@ -305,7 +305,7 @@ LOGIN.processLogin = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
......@@ -352,7 +352,7 @@ LOGIN.changePasswordProcess = function(){
$('#dialog-error-message').css('display', 'none');
LOGIN.CloseChangePasswordDialog();
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
else {
$('#dialog-error-message').html(I18N.i18nText('msgPwdOldWrong'));
......@@ -373,9 +373,9 @@ LOGIN.changePasswordProcess = function(){
//Change Language Japanese
LOGIN.changeLanguageJa = function(){
changeLanguage(Consts.ConstLanguage_Ja);
changeLanguage(COMMON.Consts.ConstLanguage_Ja);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
//ClientData.userInfo_language(Consts.ConstLanguage_Ja);
//ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ja);
if (LOGIN.login_errorMessage != ""){
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
}
......@@ -383,9 +383,9 @@ LOGIN.changeLanguageJa = function(){
//Change Language Korean
LOGIN.changeLanguageKo = function(){
changeLanguage(Consts.ConstLanguage_Ko);
changeLanguage(COMMON.Consts.ConstLanguage_Ko);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
//ClientData.userInfo_language(Consts.ConstLanguage_Ko);
//ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ko);
if (LOGIN.login_errorMessage != ""){
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
}
......@@ -393,9 +393,9 @@ LOGIN.changeLanguageKo = function(){
//Change Language English
LOGIN.changeLanguageEn = function(){
changeLanguage(Consts.ConstLanguage_En);
changeLanguage(COMMON.Consts.ConstLanguage_En);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
//ClientData.userInfo_language(Consts.ConstLanguage_En);
//ClientData.userInfo_language(COMMON.Consts.ConstLanguage_En);
if (LOGIN.login_errorMessage != ""){
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
}
......@@ -421,7 +421,7 @@ LOGIN.skipPassFunction = function(){
ClientData.userInfo_pwdSkipDt(date);
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
};
......@@ -701,11 +701,11 @@ LOGIN.initLoginAnonymousUser = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
});
......@@ -792,7 +792,7 @@ LOGIN.initLoginGetitsUser = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
});
......@@ -847,7 +847,7 @@ LOGIN.showContentViewByOpenUrl = function(strContentId) {
ClientData.contentInfo_contentId(strContentId);
//コンテツタイプ判定
contentType = data.contentData.contentType;
if(contentType == ContentTypeKeys.Type_Others){
if(contentType == COMMON.ContentTypeKeys.Type_Others){
//Download content
HEADER.downloadResourceById(strContentId);
// redraw content remove new icon
......@@ -870,13 +870,13 @@ LOGIN.showContentViewByOpenUrl = function(strContentId) {
LOGIN.alertMessageCancelFunction_callback();
}
);
//avwScreenMove("abvw/" + ScreenIds.ContentView);
//avwScreenMove("abvw/" + COMMON.ScreenIds.ContentView);
}
},
function (xmlHttpRequest, txtStatus, errorThrown) {
//見つからないかエラーなのでホームに移動
avwScreenMove("abvw/" + ScreenIds.Home);
avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
);
......@@ -884,11 +884,11 @@ LOGIN.showContentViewByOpenUrl = function(strContentId) {
//警告表示時のOK処理
LOGIN.alertMessageOkFunction_callback = function(){
avwScreenMove("abvw/" + ScreenIds.ContentView);
avwScreenMove("abvw/" + COMMON.ScreenIds.ContentView);
};
//警告表示時のキャンセル処理
LOGIN.alertMessageCancelFunction_callback = function(){
avwScreenMove("abvw/" + ScreenIds.Home);
avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
};
//Get param url
......
......@@ -3,14 +3,14 @@
// Init function of page
$(document).ready(function () {
if (!avwCheckLogin(ScreenIds.Login)) return;
if (!avwCheckLogin(COMMON.ScreenIds.Login)) return;
COMMON.ToogleLogoutNortice();
COMMON.LockScreen();
document.title = I18N.i18nText('dspSetting') + ' | ' + I18N.i18nText('sysAppTitle');
// Set bookmark screen
ClientData.BookmarkScreen(ScreenIds.Setting);
ClientData.BookmarkScreen(COMMON.ScreenIds.Setting);
InitScreen();
......@@ -600,10 +600,10 @@ function dspSave_Click(e) {
// 最初の画面を選択
if ($("#rdoOpt001").attr('checked') == 'checked') {
ClientData.sortOpt_viewMode(Consts.ConstDisplayMode_BookShelf); // Bookshelf
ClientData.sortOpt_viewMode(COMMON.Consts.ConstDisplayMode_BookShelf); // Bookshelf
}
else {
ClientData.sortOpt_viewMode(Consts.ConstDisplayMode_List); // List
ClientData.sortOpt_viewMode(COMMON.Consts.ConstDisplayMode_List); // List
}
// 動画、音楽繰り返し
if ($("#chkOpt002").attr('checked') == 'checked') {
......@@ -930,7 +930,7 @@ function avwCmsApi_passwordChange_success(data) {
var msgError = $('#dialog-error-message');
if (data.result != undefined && data.result != null) {
if (data.result != Consts.ConstAPI_SUCCESS) {
if (data.result != COMMON.Consts.ConstAPI_SUCCESS) {
/* show error messages */
//$().toastmessage({ position: 'middle-center' });
//$().toastmessage('showToast', {
......@@ -1085,7 +1085,7 @@ function InitScreen() {
// 最初の画面を選択
if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List) {
if (ClientData.sortOpt_viewMode() == COMMON.Consts.ConstDisplayMode_List) {
$("#rdoOpt0011").attr('checked', 'checked');
}
else {
......
......@@ -65,7 +65,7 @@
新着メッセージがあります!!!
</div>
<div class="cnt_header">
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(COMMON.ScreenIds.Home)"> </a>
<div class="menu_language">
<div class="clearfix">
<ul class="floatL">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment