Commit ff02a188 by vietdo

#15771 【Chrome42】CMS でオーサリングのプレビューを行うと、Web Viewer で多重ログインの問題が発生する

parent 3debc584
......@@ -14,100 +14,100 @@ AVWEB.hasErrorKey = 'AVW_HASERR';
*/
var UserEnvironment = function() {
this.appName = navigator.appName;
this.userAgent = navigator.userAgent;
this.os = checkOS(this.userAgent);
this.browser = checkBrowser(this.userAgent);
/* windows os check */
this.isWindows = function() {
return (this.os == "windows");
};
/* mac os check */
this.isMac = function() {
return (this.os == "mac");
};
/* ipad check */
this.isIpad = function() {
return (this.os == "ipad");
};
/* iphone check */
this.isIphone = function() {
return (this.os == "iphone");
};
/* android check */
this.isAndroid = function() {
return (this.os == "android");
};
/* iOS check */
this.isIos = function() {
if(this.os == "ipad" || this.os == "iphone"){
return true;
} else {
return false;
}
};
/* mobile check */
this.isMobile = function() {
if(this.os == "ipad" || this.os == "iphone" || this.os == "android"){
return true;
} else {
return false;
}
};
/** check operating system */
function checkOS(userAgent) {
if(userAgent.toLowerCase().indexOf("windows") >= 0) {
return "windows";
}
if(userAgent.toLowerCase().indexOf("mac") >= 0) {
if(userAgent.toLowerCase().indexOf("ipad") >= 0) {
return "ipad";
}
if(userAgent.toLowerCase().indexOf("iphone") >= 0) {
return "iphone";
}
return "mac";
}
if(userAgent.toLowerCase().indexOf("android") >= 0) {
return "android";
}
return "unknown";
};
/** check user browser */
function checkBrowser(userAgent) {
if(userAgent.toLowerCase().indexOf("msie") >= 0) {
return "msie";
}
if(userAgent.toLowerCase().indexOf("trident") >= 0) {
return "msie";
}
if(userAgent.toLowerCase().indexOf("firefox") >= 0) {
return "firefox";
}
if(userAgent.toLowerCase().indexOf("safari") >= 0) {
if(userAgent.toLowerCase().indexOf("chrome") >= 0) {
return "chrome";
}
return "safari";
}
if(userAgent.toLowerCase().indexOf("opera") >= 0) {
return "opera";
}
return "unknown";
};
this.appName = navigator.appName;
this.userAgent = navigator.userAgent;
this.os = checkOS(this.userAgent);
this.browser = checkBrowser(this.userAgent);
/* windows os check */
this.isWindows = function() {
return (this.os == "windows");
};
/* mac os check */
this.isMac = function() {
return (this.os == "mac");
};
/* ipad check */
this.isIpad = function() {
return (this.os == "ipad");
};
/* iphone check */
this.isIphone = function() {
return (this.os == "iphone");
};
/* android check */
this.isAndroid = function() {
return (this.os == "android");
};
/* iOS check */
this.isIos = function() {
if(this.os == "ipad" || this.os == "iphone"){
return true;
} else {
return false;
}
};
/* mobile check */
this.isMobile = function() {
if(this.os == "ipad" || this.os == "iphone" || this.os == "android"){
return true;
} else {
return false;
}
};
/** check operating system */
function checkOS(userAgent) {
if(userAgent.toLowerCase().indexOf("windows") >= 0) {
return "windows";
}
if(userAgent.toLowerCase().indexOf("mac") >= 0) {
if(userAgent.toLowerCase().indexOf("ipad") >= 0) {
return "ipad";
}
if(userAgent.toLowerCase().indexOf("iphone") >= 0) {
return "iphone";
}
return "mac";
}
if(userAgent.toLowerCase().indexOf("android") >= 0) {
return "android";
}
return "unknown";
};
/** check user browser */
function checkBrowser(userAgent) {
if(userAgent.toLowerCase().indexOf("msie") >= 0) {
return "msie";
}
if(userAgent.toLowerCase().indexOf("trident") >= 0) {
return "msie";
}
if(userAgent.toLowerCase().indexOf("firefox") >= 0) {
return "firefox";
}
if(userAgent.toLowerCase().indexOf("safari") >= 0) {
if(userAgent.toLowerCase().indexOf("chrome") >= 0) {
return "chrome";
}
return "safari";
}
if(userAgent.toLowerCase().indexOf("opera") >= 0) {
return "opera";
}
return "unknown";
};
};
/*
* User Settings Class Definition
*/
var UserSetting = function() {
this.US_KEY="AVWUS";
this.userSetting = this.load();
this.US_KEY="AVWUS";
this.userSetting = this.load();
};
/* get user setting from localStorage */
UserSetting.prototype.load = function () {
......@@ -125,169 +125,169 @@ UserSetting.prototype.load = function () {
};
/* store user setting */
UserSetting.prototype.set = function(key, value) {
//if(!this.userSetting) {
this.userSetting = this.load();
//}
var values = this.userSetting;
if(!values) {
values = { key: value };
} else {
values[key] = value;
}
var storage = window.localStorage;
if(storage) {
var jsonStr = JSON.stringify(values);
storage.setItem(this.US_KEY, jsonStr);
}
this.userSetting = values;
//if(!this.userSetting) {
this.userSetting = this.load();
//}
var values = this.userSetting;
if(!values) {
values = { key: value };
} else {
values[key] = value;
}
var storage = window.localStorage;
if(storage) {
var jsonStr = JSON.stringify(values);
storage.setItem(this.US_KEY, jsonStr);
}
this.userSetting = values;
};
/* grab user setting */
UserSetting.prototype.get = function(key) {
//if(!this.userSetting) {
this.userSetting = this.load();
//}
var values = this.userSetting;
if(values) {
return values[key];
}
return null;
//if(!this.userSetting) {
this.userSetting = this.load();
//}
var values = this.userSetting;
if(values) {
return values[key];
}
return null;
};
/* show user setting object list */
UserSetting.prototype.show = function(elmid) {
var storage = window.localStorage;
var tags = "<p>";
if(storage) {
var value = storage.getItem(this.US_KEY);
if(value) {
var js = JSON.parse(value);
$.each(js, function(k, v) {
tags = tags + "<b>" + k + "</b>:" + v + "<br />";
});
}
tags = tags + "</p>";
$(elmid).html(tags);
}
var storage = window.localStorage;
var tags = "<p>";
if(storage) {
var value = storage.getItem(this.US_KEY);
if(value) {
var js = JSON.parse(value);
$.each(js, function(k, v) {
tags = tags + "<b>" + k + "</b>:" + v + "<br />";
});
}
tags = tags + "</p>";
$(elmid).html(tags);
}
};
/* ユーザ設定のキーリストを取得 */
UserSetting.prototype.keys = function() {
var storage = window.localStorage;
var keyList = [];
if(storage) {
var value = storage.getItem(this.US_KEY);
if(value) {
var js = JSON.parse(value);
var i = 0;
$.each(js, function(k, v) {
keyList[i++] = k;
});
}
return keyList;
}
return null;
var storage = window.localStorage;
var keyList = [];
if(storage) {
var value = storage.getItem(this.US_KEY);
if(value) {
var js = JSON.parse(value);
var i = 0;
$.each(js, function(k, v) {
keyList[i++] = k;
});
}
return keyList;
}
return null;
};
/* ユーザ設定を削除 */
UserSetting.prototype.remove = function(key) {
var storage = window.localStorage;
if(storage) {
var value = storage.getItem(this.US_KEY);
if(value) {
var js = JSON.parse(value);
if(js) {
delete js[key];
storage.setItem(this.US_KEY, JSON.stringify(js));
}
}
}
var storage = window.localStorage;
if(storage) {
var value = storage.getItem(this.US_KEY);
if(value) {
var js = JSON.parse(value);
if(js) {
delete js[key];
storage.setItem(this.US_KEY, JSON.stringify(js));
}
}
}
};
/* ユーザ設定をすべて削除 */
UserSetting.prototype.removeAll = function() {
var storage = window.localStorage;
if(storage) {
storage.remove(this.US_KEY);
}
var storage = window.localStorage;
if(storage) {
storage.remove(this.US_KEY);
}
};
/*
* User Session Class Definition
*/
var UserSession = function() {
this.available = false;
this.available = false;
};
/* Initialize User Session */
UserSession.prototype.init = function(option) {
this.available = false;
if(option == 'restore') {
var value = null;
try {
value = this._get('init');
} catch(e) {
value = null;
} finally {
if(value) {
this.available = true;
}
}
} else {
this.set("init", new Date().toLocaleString());
this.available = true;
}
this.available = false;
if(option == 'restore') {
var value = null;
try {
value = this._get('init');
} catch(e) {
value = null;
} finally {
if(value) {
this.available = true;
}
}
} else {
this.set("init", new Date().toLocaleString());
this.available = true;
}
};
/* store key, value item to user session */
UserSession.prototype.set = function(key, value) {
var storage = window.sessionStorage;
if(storage) {
if(this.available == false) {
if(key == "init") {
storage.setItem("AVWS_" + key, value);
} else {
throw new Error("Session destoryed.");
}
} else {
storage.setItem("AVWS_" + key, value);
}
}
var storage = window.sessionStorage;
if(storage) {
if(this.available == false) {
if(key == "init") {
storage.setItem("AVWS_" + key, value);
} else {
throw new Error("Session destoryed.");
}
} else {
storage.setItem("AVWS_" + key, value);
}
}
};
/* get session item value */
UserSession.prototype.get = function(key) {
var value = null;
if(this.available) {
value = this._get(key);
} else {
throw new Error("Session Destroyed.");
}
return value;
var value = null;
if(this.available) {
value = this._get(key);
} else {
throw new Error("Session Destroyed.");
}
return value;
};
/* get item value from session storage */
UserSession.prototype._get = function(key) {
var storage = window.sessionStorage;
var value = null;
if(storage) {
value = storage.getItem("AVWS_" + key);
}
return value;
var storage = window.sessionStorage;
var value = null;
if(storage) {
value = storage.getItem("AVWS_" + key);
}
return value;
};
/* destroy user session */
UserSession.prototype.destroy = function() {
var storage = window.sessionStorage;
if(storage) {
storage.clear();
this.available = false;
}
var storage = window.sessionStorage;
if(storage) {
storage.clear();
this.available = false;
}
};
/* show user session object list */
UserSession.prototype.show = function(elmid) {
var storage = window.sessionStorage;
var tags = "<p>";
if(storage) {
for(var i = 0; i < storage.length; i++) {
var key = storage.key(i);
var value = storage.getItem(key);
tags = tags + "<b>" + key + "</b>:" + value + "<br />";
}
tags = tags + "</p>";
$(elmid).html(tags);
}
var storage = window.sessionStorage;
var tags = "<p>";
if(storage) {
for(var i = 0; i < storage.length; i++) {
var key = storage.key(i);
var value = storage.getItem(key);
tags = tags + "<b>" + key + "</b>:" + value + "<br />";
}
tags = tags + "</p>";
$(elmid).html(tags);
}
};
/*
* Variables
......@@ -301,13 +301,13 @@ AVWEB.avwSysSettingObj = null;
$(function () {
// システム設定ファイルの配置先パスの決定
var location = window.location.toString().toLowerCase();
var sysFile = '';
if (location.indexOf('/abvw') < 0) {
sysFile = './abvw/common/json/sys/conf.json';
} else {
var location = window.location.toString().toLowerCase();
var sysFile = '';
if (location.indexOf('/abvw') < 0) {
sysFile = './abvw/common/json/sys/conf.json';
} else {
sysFile = './common/json/sys/conf.json';
}
}
// システム設定ファイルを読み込む
$.ajax({
......@@ -331,7 +331,7 @@ $(function () {
/* get system setting object */
AVWEB.avwSysSetting = function() {
return AVWEB.avwSysSettingObj;
return AVWEB.avwSysSettingObj;
};
///* get user environment object */
......@@ -343,166 +343,166 @@ AVWEB.avwSysSetting = function() {
//};
/* get user session object */
AVWEB.avwUserSession = function() {
if(!AVWEB.avwUserSessionObj) {
var obj = new UserSession();
obj.init('restore');
if(obj.available) {
AVWEB.avwUserSessionObj = obj;
return AVWEB.avwUserSessionObj;
} else {
return null;
}
}
return AVWEB.avwUserSessionObj;
if(!AVWEB.avwUserSessionObj) {
var obj = new UserSession();
obj.init('restore');
if(obj.available) {
AVWEB.avwUserSessionObj = obj;
return AVWEB.avwUserSessionObj;
} else {
return null;
}
}
return AVWEB.avwUserSessionObj;
};
/* create user session object */
AVWEB.avwCreateUserSession = function() {
if(AVWEB.avwUserSessionObj) {
AVWEB.avwUserSessionObj.destroy();
} else {
AVWEB.avwUserSessionObj = new UserSession();
AVWEB.avwUserSessionObj.init();
}
return AVWEB.avwUserSessionObj;
if(AVWEB.avwUserSessionObj) {
AVWEB.avwUserSessionObj.destroy();
} else {
AVWEB.avwUserSessionObj = new UserSession();
AVWEB.avwUserSessionObj.init();
}
return AVWEB.avwUserSessionObj;
};
/* check Login or not */
AVWEB.avwCheckLogin = function(option) {
var userSession = AVWEB.avwUserSession();
if(!userSession) {
/* エラー画面を表示 */
var tags = '<div id="avw-auth-error">' +
'<div style="display:table; width:100%; height:100%;">' +
'<div style="display:table-cell; text-align:center; vertical-align:middle;">' +
'<p><h4>Authentication error</h4>Please use it after login.</p>' +
'<div><button id="avw-unauth-ok">OK</button></div>' +
'</div></div></div>';
$('body').prepend(tags);
$('#avw-auth-error').css({
'opacity': 1,
'position': 'fixed',
'top': '0',
'left': '0',
'width': $(window).width(),
'height': $(window).height(),
'zIndex': '10000'
});
// resize error page
$(window).resize(function() {
$('#avw-auth-error').css( {
'width': $(window).width(),
'height': $(window).height()
});
});
var returnPage;
if(option) {
returnPage = option
} else {
var sysSetting = AVWEB.avwSysSetting();
returnPage = sysSetting.loginPage;
}
/* ログイン画面に戻る */
$('#avw-unauth-ok').click(function() {
window.location = returnPage;
});
return false;
}
return true;
var userSession = AVWEB.avwUserSession();
if(!userSession) {
/* エラー画面を表示 */
var tags = '<div id="avw-auth-error">' +
'<div style="display:table; width:100%; height:100%;">' +
'<div style="display:table-cell; text-align:center; vertical-align:middle;">' +
'<p><h4>Authentication error</h4>Please use it after login.</p>' +
'<div><button id="avw-unauth-ok">OK</button></div>' +
'</div></div></div>';
$('body').prepend(tags);
$('#avw-auth-error').css({
'opacity': 1,
'position': 'fixed',
'top': '0',
'left': '0',
'width': $(window).width(),
'height': $(window).height(),
'zIndex': '10000'
});
// resize error page
$(window).resize(function() {
$('#avw-auth-error').css( {
'width': $(window).width(),
'height': $(window).height()
});
});
var returnPage;
if(option) {
returnPage = option
} else {
var sysSetting = AVWEB.avwSysSetting();
returnPage = sysSetting.loginPage;
}
/* ログイン画面に戻る */
$('#avw-unauth-ok').click(function() {
window.location = returnPage;
});
return false;
}
return true;
};
/* get user setting object */
AVWEB.avwUserSetting = function() {
if(AVWEB.avwUserSettingObj == null) {
AVWEB.avwUserSettingObj = new UserSetting();
}
return AVWEB.avwUserSettingObj;
if(AVWEB.avwUserSettingObj == null) {
AVWEB.avwUserSettingObj = new UserSetting();
}
return AVWEB.avwUserSettingObj;
};
/* CMS API Call(async. call) */
AVWEB.avwCmsApi = function(accountPath, apiName, type, params, success, error) {
//var sysSettings = AVWEB.avwSysSetting();
AVWEB._callCmsApi(ClientData.conf_apiUrl(), accountPath, apiName, type, params, true, success, error);
//var sysSettings = AVWEB.avwSysSetting();
AVWEB._callCmsApi(ClientData.conf_apiUrl(), accountPath, apiName, type, params, true, success, error);
};
/* CMS API Call(sync. call) */
AVWEB.avwCmsApiSync = function(accountPath, apiName, type, params, success, error) {
//var sysSettings = AVWEB.avwSysSetting();
AVWEB._callCmsApi(ClientData.conf_apiUrl(), accountPath, apiName, type, params, false, success, error);
//var sysSettings = AVWEB.avwSysSetting();
AVWEB._callCmsApi(ClientData.conf_apiUrl(), accountPath, apiName, type, params, false, success, error);
};
/* CMS API Call(async. call) */
AVWEB.avwCmsApiWithUrl = function(url, accountPath, apiName, type, params, success, error) {
AVWEB._callCmsApi(url, accountPath, apiName, type, params, true, success, error);
AVWEB._callCmsApi(url, accountPath, apiName, type, params, true, success, error);
};
/* CMS API Call(sync. call) */
AVWEB.avwCmsApiSyncWithUrl = function(url, accountPath, apiName, type, params, success, error) {
AVWEB._callCmsApi(url, accountPath, apiName, type, params, false, success, error);
AVWEB._callCmsApi(url, accountPath, apiName, type, params, false, success, error);
};
/* CMS API Call */
AVWEB._callCmsApi = function(url, accountPath, apiName, type, params, async, success, error) {
// アプリケーション設定取得
var sysSettings = AVWEB.avwSysSetting();
// url 構築
var apiUrl;
if(!url) {
apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
} else {
apiUrl = url;
}
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath);
}
apiUrl = apiUrl + '/' + apiName + '/';
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
params.pid = CONTENTVIEW_GENERAL.pid;
}
//----------------------------------------------------------------------------------
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
$.support.cors = true;
//----------------------------------------------------------------------------------
// ajax によるAPIの実行(json)
$.ajax( {
async: (async) ? async : false,
type: (type) ? type : 'get',
url: apiUrl,
cache: false,
dataType: 'json',
data: params,
crossDomain: true,
beforeSend: function(xhr) {
/*
* ABook viewer for WEB 用のリクエストヘッダに、以下のヘッダを付加する
* X-AGT-AppId: ABookWebCL
* X-AGT-AppVersion: 0.0.1
*/
xhr.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xhr.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
},
success: function(data) {
if(success) {
success(data);
}
},
error: function(xmlHttpRequest, txtStatus, errorThrown) {
/* call custom error process */
if(error) {
error(xmlHttpRequest, txtStatus, errorThrown);
} else {
if(xmlHttpRequest.status == 403) {
AVWEB.showSystemError('sysErrorCallApi02');
}
else {
AVWEB.showSystemError();
}
}
}
});
// アプリケーション設定取得
var sysSettings = AVWEB.avwSysSetting();
// url 構築
var apiUrl;
if(!url) {
apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
} else {
apiUrl = url;
}
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath);
}
apiUrl = apiUrl + '/' + apiName + '/';
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
params.pid = CONTENTVIEW_GENERAL.pid;
}
//----------------------------------------------------------------------------------
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
$.support.cors = true;
//----------------------------------------------------------------------------------
// ajax によるAPIの実行(json)
$.ajax( {
async: (async) ? async : false,
type: (type) ? type : 'get',
url: apiUrl,
cache: false,
dataType: 'json',
data: params,
crossDomain: true,
beforeSend: function(xhr) {
/*
* ABook viewer for WEB 用のリクエストヘッダに、以下のヘッダを付加する
* X-AGT-AppId: ABookWebCL
* X-AGT-AppVersion: 0.0.1
*/
xhr.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xhr.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
},
success: function(data) {
if(success) {
success(data);
}
},
error: function(xmlHttpRequest, txtStatus, errorThrown) {
/* call custom error process */
if(error) {
error(xmlHttpRequest, txtStatus, errorThrown);
} else {
if(xmlHttpRequest.status == 403) {
AVWEB.showSystemError('sysErrorCallApi02');
}
else {
AVWEB.showSystemError();
}
}
}
});
};
......@@ -510,47 +510,47 @@ AVWEB._callCmsApi = function(url, accountPath, apiName, type, params, async, suc
/* CMS API Call */
AVWEB._callCmsApiWhen = function(accountPath, apiName, type, params ) {
// アプリケーション設定取得
var sysSettings = AVWEB.avwSysSetting();
// url 構築
var apiUrl = ClientData.conf_apiUrl();
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath);
}
apiUrl = apiUrl + '/' + apiName + '/';
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
params.pid = CONTENTVIEW_GENERAL.pid;
}
//----------------------------------------------------------------------------------
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
$.support.cors = true;
//----------------------------------------------------------------------------------
// ajax によるAPIの実行(json)
var ajaxObj = $.ajax( {
async: true,
type: (type) ? type : 'get',
url: apiUrl,
cache: false,
dataType: 'json',
data: params,
crossDomain: true,
beforeSend: function(xhr) {
/*
* ABook viewer for WEB 用のリクエストヘッダに、以下のヘッダを付加する
* X-AGT-AppId: ABookWebCL
* X-AGT-AppVersion: 0.0.1
*/
xhr.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xhr.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
}
});
return ajaxObj;
// アプリケーション設定取得
var sysSettings = AVWEB.avwSysSetting();
// url 構築
var apiUrl = ClientData.conf_apiUrl();
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath);
}
apiUrl = apiUrl + '/' + apiName + '/';
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
params.pid = CONTENTVIEW_GENERAL.pid;
}
//----------------------------------------------------------------------------------
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
$.support.cors = true;
//----------------------------------------------------------------------------------
// ajax によるAPIの実行(json)
var ajaxObj = $.ajax( {
async: true,
type: (type) ? type : 'get',
url: apiUrl,
cache: false,
dataType: 'json',
data: params,
crossDomain: true,
beforeSend: function(xhr) {
/*
* ABook viewer for WEB 用のリクエストヘッダに、以下のヘッダを付加する
* X-AGT-AppId: ABookWebCL
* X-AGT-AppVersion: 0.0.1
*/
xhr.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xhr.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
}
});
return ajaxObj;
};
......@@ -632,104 +632,103 @@ var ImageDataScheme = function () {
*/
AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
// API実行準備
var sysSettings = AVWEB.avwSysSetting();
var apiName = 'webContentPageImage'; // API名
//url 構築
var apiUrl;
apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath)
}
apiUrl = apiUrl + '/' + apiName + '/';
// 送信パラメータの構築
var requestParams = 'contentId=' + params.contentId + '&sid=' + params.sid + '&pageNo=' + params.pageNo;
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
requestParams = requestParams + '&pid=' + CONTENTVIEW_GENERAL.pid;
}
apiUrl += '?' + requestParams + '&isBase64=true';
if( ClientData.isStreamingMode() ){
apiUrl += '&isStreaming=true';
}
// バイナリ形式で画像イメージを取得し、Base64にエンコードする
var xmlHttp;
var ie = false;
//if(window.ActiveXObject) {
// xmlHttp = new ActiveXObject('Msxml2.XMLHTTP');
// ie = true;
//} else {
//xmlHttp = new XMLHttpRequest();
//}
//IE10以降はXMLHttpRequestを優先して使う
try{
xmlHttp = new XMLHttpRequest();
}catch(e){
try{
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
ie = true;
}catch(e){
AVWEB.showSystemError();
return;
}
}
xmlHttp.open('get', apiUrl);
xmlHttp.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xmlHttp.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
/*
if(xmlHttp.overrideMimeType) {
// for FF, Chrome, Safari
xmlHttp.overrideMimeType('text/plain; charset=x-user-defined');
}
*/
xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState == 4) {
if (xmlHttp.status == 200) {
/*
//base64 encode
var ids = new ImageDataScheme();
var src; // Image Data URI
if(ie) {
// for IE
src = ids.convImageToDataScheme(xmlHttp.responseBody, ie);
} else {
// for FF, Chrome, Safari
src = ids.convImageToDataScheme(xmlHttp.responseText, ie);
}
*/
var src; // Image Data URI
/*
if(ie) {
// for IE
src = 'data:image/png;base64,' + xmlHttp.responseBody;
} else {
// for FF, Chrome, Safari
src = 'data:image/png;base64,' + xmlHttp.responseText;
}
*/
src = 'data:image/png;base64,' + xmlHttp.responseText;
if (success) {
success(src);
}
} else {
if (error) {
error(xmlHttp, xmlHttp.status, xmlHttp.statusText);
} else {
AVWEB.avwLog(xmlHttp.status + ' ' + xmlHttp.statusText);
}
}
}
};
xmlHttp.send();
// API実行準備
var sysSettings = AVWEB.avwSysSetting();
var apiName = 'webContentPageImage'; // API名
//url 構築
var apiUrl;
apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath)
}
apiUrl = apiUrl + '/' + apiName + '/';
// 送信パラメータの構築
var requestParams = 'contentId=' + params.contentId + '&sid=' + params.sid + '&pageNo=' + params.pageNo;
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
requestParams = requestParams + '&pid=' + CONTENTVIEW_GENERAL.pid;
}
apiUrl += '?' + requestParams + '&isBase64=true';
if( ClientData.isStreamingMode() ){
apiUrl += '&isStreaming=true';
}
// バイナリ形式で画像イメージを取得し、Base64にエンコードする
var xmlHttp;
var ie = false;
//if(window.ActiveXObject) {
// xmlHttp = new ActiveXObject('Msxml2.XMLHTTP');
// ie = true;
//} else {
//xmlHttp = new XMLHttpRequest();
//}
//IE10以降はXMLHttpRequestを優先して使う
try{
xmlHttp = new XMLHttpRequest();
}catch(e){
try{
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
ie = true;
}catch(e){
AVWEB.showSystemError();
return;
}
}
xmlHttp.open('get', apiUrl);
xmlHttp.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xmlHttp.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
/*
if(xmlHttp.overrideMimeType) {
// for FF, Chrome, Safari
xmlHttp.overrideMimeType('text/plain; charset=x-user-defined');
}
*/
xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState == 4) {
if (xmlHttp.status == 200) {
/*
//base64 encode
var ids = new ImageDataScheme();
var src; // Image Data URI
if(ie) {
// for IE
src = ids.convImageToDataScheme(xmlHttp.responseBody, ie);
} else {
// for FF, Chrome, Safari
src = ids.convImageToDataScheme(xmlHttp.responseText, ie);
}
*/
var src; // Image Data URI
/*
if(ie) {
// for IE
src = 'data:image/png;base64,' + xmlHttp.responseBody;
} else {
// for FF, Chrome, Safari
src = 'data:image/png;base64,' + xmlHttp.responseText;
}
*/
src = 'data:image/png;base64,' + xmlHttp.responseText;
if (success) {
success(src);
}
} else {
if (error) {
error(xmlHttp, xmlHttp.status, xmlHttp.statusText);
} else {
AVWEB.avwLog(xmlHttp.status + ' ' + xmlHttp.statusText);
}
}
}
};
xmlHttp.send();
};
/*
......@@ -743,232 +742,232 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
*/
AVWEB.avwUploadBackupFile = function(accountPath, params, async, success, error) {
/* API実行準備*/
var sysSettings = AVWEB.avwSysSetting();
var apiName = 'uploadBackupFile'; // API名
//url 構築
var apiUrl;
apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath)
}
apiUrl = apiUrl + '/' + apiName + '/';
/* POST(multipart/form-data)送信準備 */
var body = '';
var boundary = '';
// boundaryを構築
var date = new Date();
boundary = '------------------------' + date.getMilliseconds()
+ (date.getMonth() + 1)
+ date.getMinutes()
+ date.getFullYear()
+ date.getDay()
+ date.getHours()
+ date.getSeconds();
// bodyを構築
for(var i = 0; i < params.length; i++) {
var item = params[i];
body += '--' + boundary + '\r\n';
body += 'Content-Disposition: form-data; name="' + item.name + '"';
if(item.fileName) {
body += '; filename="' + item.fileName + '"\r\n';
} else {
body += '\r\n';
}
if(item.contentType) {
body += 'Content-Type="' + item.contentType + '"\r\n';
}
body += '\r\n';
body += item.content + '\r\n';
}
body += '--' + boundary + '--\r\n';
// ajax によるAPIの実行(json)
$.ajax( {
async: (async) ? async : false,
type: 'post',
url: apiUrl,
data: body,
beforeSend: function(xhr) {
/*
* ABook viewer for WEB 用のリクエストヘッダに、以下のヘッダを付加する
* X-AGT-AppId: ABookWebCL
* X-AGT-AppVersion: 0.0.1
*/
xhr.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xhr.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
/*
* uploadBackupFileは multipart/form-data でPOST送信する
*/
/* API実行準備*/
var sysSettings = AVWEB.avwSysSetting();
var apiName = 'uploadBackupFile'; // API名
//url 構築
var apiUrl;
apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath)
}
apiUrl = apiUrl + '/' + apiName + '/';
/* POST(multipart/form-data)送信準備 */
var body = '';
var boundary = '';
// boundaryを構築
var date = new Date();
boundary = '------------------------' + date.getMilliseconds()
+ (date.getMonth() + 1)
+ date.getMinutes()
+ date.getFullYear()
+ date.getDay()
+ date.getHours()
+ date.getSeconds();
// bodyを構築
for(var i = 0; i < params.length; i++) {
var item = params[i];
body += '--' + boundary + '\r\n';
body += 'Content-Disposition: form-data; name="' + item.name + '"';
if(item.fileName) {
body += '; filename="' + item.fileName + '"\r\n';
} else {
body += '\r\n';
}
if(item.contentType) {
body += 'Content-Type="' + item.contentType + '"\r\n';
}
body += '\r\n';
body += item.content + '\r\n';
}
body += '--' + boundary + '--\r\n';
// ajax によるAPIの実行(json)
$.ajax( {
async: (async) ? async : false,
type: 'post',
url: apiUrl,
data: body,
beforeSend: function(xhr) {
/*
* ABook viewer for WEB 用のリクエストヘッダに、以下のヘッダを付加する
* X-AGT-AppId: ABookWebCL
* X-AGT-AppVersion: 0.0.1
*/
xhr.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xhr.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
/*
* uploadBackupFileは multipart/form-data でPOST送信する
*/
xhr.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + boundary);
//xhr.setRequestHeader('Content-Length', AVWEB.getByte(body));
},
success: function(data) {
if(success) {
success(data);
}
},
error: function(xmlHttpRequest, txtStatus, errorThrown) {
/* call custom error process */
if(error) {
error(xmlHttpRequest, txtStatus, errorThrown);
} else {
AVWEB.showSystemError();
}
}
});
},
success: function(data) {
if(success) {
success(data);
}
},
error: function(xmlHttpRequest, txtStatus, errorThrown) {
/* call custom error process */
if(error) {
error(xmlHttpRequest, txtStatus, errorThrown);
} else {
AVWEB.showSystemError();
}
}
});
};
/* show system error message */
AVWEB.showSystemError = function(textId) {
if(AVWEB.avwHasError()) {
// すでにエラー状態であればエラーを表示しない
return;
} else {
// エラー状態にセット
AVWEB.avwSetErrorState();
}
if( !textId ){
textId = 'sysErrorCallApi01';
}
// create DOM element for showing error message
var errMes = I18N.i18nText(textId);
var tags = '<div id="avw-sys-error"></div>';
//$('body').prepend(tags);
$('body').append(tags);
$('#avw-sys-error').css({
'opacity': 0.7,
'position': 'fixed',
'top': '0',
'left': '0',
'width': $(window).width(),
'height': $(window).height(),
'background': '#999',
'z-index': 90000
});
// resize error page
$(window).resize(function() {
$('#avw-sys-error').css( {
'width': $(window).width(),
'height': $(window).height()
});
});
// show error messages
$().toastmessage({ position: 'middle-center' });
$().toastmessage('showToast', {
type: 'error',
sticky: true,
text: errMes,
close: function() {
if( ClientData.isStreamingMode() == false && COMMON.isAuthoringPreview() == false){
//ストリーミングでなければログアウト時と同じ後始末処理をしてログイン画面に戻す
if( !HEADER.webLogoutEvent() ){
//ログアウト出来なかった
SessionStorageUtils.clear();
//カスタムURI起動対応のため sidのバックアップは消さない
AVWEB.avwUserSetting().remove(COMMON.Keys.userInfo_sid);
//AVWEB.avwUserSetting().remove(COMMON.Keys.userInfo_sid_bak);
AVWEB.avwScreenMove(COMMON.ScreenIds.Login);
}
}
}
});
if(AVWEB.avwHasError()) {
// すでにエラー状態であればエラーを表示しない
return;
} else {
// エラー状態にセット
AVWEB.avwSetErrorState();
}
if( !textId ){
textId = 'sysErrorCallApi01';
}
// create DOM element for showing error message
var errMes = I18N.i18nText(textId);
var tags = '<div id="avw-sys-error"></div>';
//$('body').prepend(tags);
$('body').append(tags);
$('#avw-sys-error').css({
'opacity': 0.7,
'position': 'fixed',
'top': '0',
'left': '0',
'width': $(window).width(),
'height': $(window).height(),
'background': '#999',
'z-index': 90000
});
// resize error page
$(window).resize(function() {
$('#avw-sys-error').css( {
'width': $(window).width(),
'height': $(window).height()
});
});
// show error messages
$().toastmessage({ position: 'middle-center' });
$().toastmessage('showToast', {
type: 'error',
sticky: true,
text: errMes,
close: function() {
if( ClientData.isStreamingMode() == false && COMMON.isAuthoringPreview() == false){
//ストリーミングでなければログアウト時と同じ後始末処理をしてログイン画面に戻す
if( !HEADER.webLogoutEvent() ){
//ログアウト出来なかった
SessionStorageUtils.clear();
//カスタムURI起動対応のため sidのバックアップは消さない
AVWEB.avwUserSetting().remove(COMMON.Keys.userInfo_sid);
//AVWEB.avwUserSetting().remove(COMMON.Keys.userInfo_sid_bak);
AVWEB.avwScreenMove(COMMON.ScreenIds.Login);
}
}
}
});
/*
$().toastmessage('showToast', {
type: 'error',
sticky: true,
text: errMes,
close: function() { isShowErrorMessage = false; }
});
$().toastmessage('showToast', {
type: 'error',
sticky: true,
text: errMes,
close: function() { isShowErrorMessage = false; }
});
*/
};
/* エラー状態を取得 */
AVWEB.avwHasError = function() {
var session = window.sessionStorage;
var isError = false;
if(session) {
isError = session.getItem(AVWEB.hasErrorKey);
}
return (isError == 'true');
var session = window.sessionStorage;
var isError = false;
if(session) {
isError = session.getItem(AVWEB.hasErrorKey);
}
return (isError == 'true');
};
/* エラー状態にセット */
AVWEB.avwSetErrorState = function() {
var session = window.sessionStorage;
if(session) {
session.setItem(AVWEB.hasErrorKey, true);
}
var session = window.sessionStorage;
if(session) {
session.setItem(AVWEB.hasErrorKey, true);
}
};
/* エラー状態をクリア */
AVWEB.avwClearError = function() {
var session = window.sessionStorage;
if(session) {
session.setItem(AVWEB.hasErrorKey, false);
}
var session = window.sessionStorage;
if(session) {
session.setItem(AVWEB.hasErrorKey, false);
}
};
/* ブラウザunload時に警告メッセージの出力設定を行う関数 */
AVWEB.avwSetLogoutNortice = function() {
window.onbeforeunload = function(event) {
if(ClientData.isGetitsMode() || ClientData.isStreamingMode()){
if(ClientData.isGetitsMode()){
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
COMMON.RegisterLog();
}
} else {
// メッセージ表示
// FFでは、https://bugzilla.mozilla.org/show_bug.cgi?id=588292 によりメッセージが出力されない
var message = I18N.i18nText('sysInfoWithoutLogout');
var e = event || window.event;
if(e) {
e.returnValue = message;
}
return message;
}
};
window.onbeforeunload = function(event) {
if(ClientData.isGetitsMode() || ClientData.isStreamingMode()){
if(ClientData.isGetitsMode()){
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
COMMON.RegisterLog();
}
} else {
// メッセージ表示
// FFでは、https://bugzilla.mozilla.org/show_bug.cgi?id=588292 によりメッセージが出力されない
var message = I18N.i18nText('sysInfoWithoutLogout');
var e = event || window.event;
if(e) {
e.returnValue = message;
}
return message;
}
};
};
/* 警告メッセージを出力しないでページ遷移を行う関数 */
AVWEB.avwScreenMove = function(url) {
window.onbeforeunload = null;
window.location = url;
window.onbeforeunload = null;
window.location = url;
};
/* Debug Log */
AVWEB.avwLog = function(msg) {
if(AVWEB.avwSysSetting().debug) {
console.log(msg);
}
if(AVWEB.avwSysSetting().debug) {
console.log(msg);
}
};
/* 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;
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 = AVWEB.avwSysSetting();
var apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath);
}
return apiUrl;
// url 構築
//var sysSettings = AVWEB.avwSysSetting();
var apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath);
}
return apiUrl;
};
......@@ -984,10 +983,10 @@ AVWEB.getURL = function(apiName) {
var url = ClientData.conf_apiResourceDlUrl(); //sysSettings.apiResourceDlUrl;
url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName + '/?isStreaming=' + isStreaming;
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
url = url + '&pid=' + CONTENTVIEW_GENERAL.pid;
}
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
url = url + '&pid=' + CONTENTVIEW_GENERAL.pid;
}
return url;
};
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,66 +3,66 @@
var CONTENTPREVIEW = {};
CONTENTPREVIEW.ready = function(){
if(!AVWEB.avwUserSessionObj){
AVWEB.avwCreateUserSession();
}
if(!AVWEB.avwUserSessionObj){
AVWEB.avwCreateUserSession();
}
var sysSettings = AVWEB.avwSysSetting(); // get info in conf.json
var sid = COMMON.getUrlParam('sid','');
var contentId = COMMON.getUrlParam('contentId','');
var urlPath = COMMON.getUrlParam('urlpath','');
ClientData.userInfo_sid_preview(sid);
ClientData.userInfo_sid_local_preview(sid);
ClientData.userInfo_accountPath(urlPath);
ClientData.contentInfo_contentId(contentId);
ClientData.conf_apiUrl( sysSettings.apiUrl );
ClientData.conf_apiLoginUrl( sysSettings.apiLoginUrl );
ClientData.conf_apiResourceDlUrl( sysSettings. apiResourceDlUrl );
//ビューア、共有表示パーツ読み込み
$("#viewer").load("./inc_contentview.html?__UPDATEID__", function (myData, myStatus, xhr){
//メニュー表示設定
$('#top_toolbar').hide();
$('#search_toolbar').hide();
$('#close_toolbar').show();
//読み込み完了時の処理
I18N.i18nReplaceText();
CONTENTPREVIEW.defaultValue = {
pageTransition : CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide,
pageTransitionPeriod : 1,
bookmarkData : [],
memoData: [],
markingData: [],
isMarkingDsp : false,
isMemoDsp: false,
userOpt_marking : 'N'
};
ClientData.userOpt_pageTransition(CONTENTPREVIEW.defaultValue.pageTransition);
ClientData.userOpt_pageTransitionPeriod(CONTENTPREVIEW.defaultValue.pageTransitionPeriod);
ClientData.BookMarkData(CONTENTPREVIEW.defaultValue.bookmarkData);
ClientData.MemoData(CONTENTPREVIEW.defaultValue.memoData);
ClientData.MarkingData(CONTENTPREVIEW.defaultValue.markingData);
ClientData.userOpt_makingDsp(CONTENTPREVIEW.defaultValue.isMarkingDsp);
ClientData.serviceOpt_marking(CONTENTPREVIEW.defaultValue.userOpt_marking);
ClientData.IsAddingMarking(false);
ClientData.IsAddingMemo(false);
ClientData.IsDisplayMarking(false);
ClientData.IsDisplayMemo(false);
CONTENTVIEW_INITOBJECT.clearViewerComponent();
CONTENTVIEW.cssInit();
$("#viewer").show();
CONTENTVIEW.ready(contentId);
});
var sysSettings = AVWEB.avwSysSetting(); // get info in conf.json
var sid = COMMON.getUrlParam('sid','');
var contentId = COMMON.getUrlParam('contentId','');
var urlPath = COMMON.getUrlParam('urlpath','');
ClientData.userInfo_sid(sid);
ClientData.userInfo_sid_local(sid);
ClientData.userInfo_accountPath(urlPath);
ClientData.contentInfo_contentId(contentId);
ClientData.conf_apiUrl( sysSettings.apiUrl );
ClientData.conf_apiLoginUrl( sysSettings.apiLoginUrl );
ClientData.conf_apiResourceDlUrl( sysSettings. apiResourceDlUrl );
//ビューア、共有表示パーツ読み込み
$("#viewer").load("./inc_contentview.html?__UPDATEID__", function (myData, myStatus, xhr){
//メニュー表示設定
$('#top_toolbar').hide();
$('#search_toolbar').hide();
$('#close_toolbar').show();
//読み込み完了時の処理
I18N.i18nReplaceText();
CONTENTPREVIEW.defaultValue = {
pageTransition : CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide,
pageTransitionPeriod : 1,
bookmarkData : [],
memoData: [],
markingData: [],
isMarkingDsp : false,
isMemoDsp: false,
userOpt_marking : 'N'
};
ClientData.userOpt_pageTransition(CONTENTPREVIEW.defaultValue.pageTransition);
ClientData.userOpt_pageTransitionPeriod(CONTENTPREVIEW.defaultValue.pageTransitionPeriod);
ClientData.BookMarkData(CONTENTPREVIEW.defaultValue.bookmarkData);
ClientData.MemoData(CONTENTPREVIEW.defaultValue.memoData);
ClientData.MarkingData(CONTENTPREVIEW.defaultValue.markingData);
ClientData.userOpt_makingDsp(CONTENTPREVIEW.defaultValue.isMarkingDsp);
ClientData.serviceOpt_marking(CONTENTPREVIEW.defaultValue.userOpt_marking);
ClientData.IsAddingMarking(false);
ClientData.IsAddingMemo(false);
ClientData.IsDisplayMarking(false);
ClientData.IsDisplayMemo(false);
CONTENTVIEW_INITOBJECT.clearViewerComponent();
CONTENTVIEW.cssInit();
$("#viewer").show();
CONTENTVIEW.ready(contentId);
});
};
$(document).ready(function(){
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4,69 +4,69 @@ var CONTENTVIEW_CALLAPI = {};
//Call API
CONTENTVIEW_CALLAPI.abapi = function(name, param, method, callback) {
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), name, method, param, callback, null);
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), name, method, param, callback, null);
};
/* get Json stored content info */
CONTENTVIEW_CALLAPI.getJsonContentInfo = function( doneFunc ) {
//console.log("CONTENTVIEW_CALLAPI.getJsonContentInfo");
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) {
CONTENTVIEW_GENERAL.pageImages = data;
CONTENTVIEW_CALLAPI.getJsonContentInfoDone(doneFunc);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
);
//console.log("CONTENTVIEW_CALLAPI.getJsonContentInfo");
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: CONTENTVIEW.getSessionId(), pageNo: 1 },
function (data) {
CONTENTVIEW_GENERAL.pageImages = data;
CONTENTVIEW_CALLAPI.getJsonContentInfoDone(doneFunc);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
);
};
CONTENTVIEW_CALLAPI.getJsonContentInfoDone = function(doneFunc){
var ajax1 = CONTENTVIEW_CALLAPI.webGetContentDataWhen();
var ajax2 = CONTENTVIEW_CALLAPI.getSearchDataFromJsonWhen();
var ajax3 = CONTENTVIEW_CALLAPI.getJsonDataPageTitleWhen();
var ajax4 = CONTENTVIEW_CALLAPI.getJsonDataType4When();
var ajax5 = CONTENTVIEW_CALLAPI.getJsonDataType5When();
var ajax6 = CONTENTVIEW_CALLAPI.getDataJsonFileWhen();
var ajax7 = CONTENTVIEW_CALLAPI.webGetContentPageSizeWhen();
$.when(
ajax1,ajax2,ajax3,ajax4,ajax5,ajax6,ajax7
).done(function(data1, data2, data3, data4, data5, data6, data7) {
//console.log("done:data1:" + data1);
//console.log("done:data2:" + data2);
//console.log("done:data3:" + data3);
//console.log("done:data4:" + data4);
//console.log("done:data5:" + data5);
//console.log("done:data6:" + data6);
//console.log("done:data7:" + data7);
if(data1){
CONTENTVIEW_CALLAPI.webGetContentDataDone(data1[0]);
}
if(data2){
CONTENTVIEW_CALLAPI.getSearchDataFromJsonDone(data2[0]);
}
if(data3){
CONTENTVIEW_CALLAPI.getJsonDataPageTitleDone(data3[0]);
}
if(data4){
CONTENTVIEW_CALLAPI.getJsonDataType4Done(data4[0]);
}
if(data5){
CONTENTVIEW_CALLAPI.getJsonDataType5Done(data5[0]);
}
if(data6){
CONTENTVIEW_CALLAPI.getDataJsonFileDone(data6[0]);
}
if(data7){
CONTENTVIEW_CALLAPI.webGetContentPageSizeDone(data7[0]);
}
if(doneFunc){
doneFunc();
}
});
var ajax1 = CONTENTVIEW_CALLAPI.webGetContentDataWhen();
var ajax2 = CONTENTVIEW_CALLAPI.getSearchDataFromJsonWhen();
var ajax3 = CONTENTVIEW_CALLAPI.getJsonDataPageTitleWhen();
var ajax4 = CONTENTVIEW_CALLAPI.getJsonDataType4When();
var ajax5 = CONTENTVIEW_CALLAPI.getJsonDataType5When();
var ajax6 = CONTENTVIEW_CALLAPI.getDataJsonFileWhen();
var ajax7 = CONTENTVIEW_CALLAPI.webGetContentPageSizeWhen();
$.when(
ajax1,ajax2,ajax3,ajax4,ajax5,ajax6,ajax7
).done(function(data1, data2, data3, data4, data5, data6, data7) {
//console.log("done:data1:" + data1);
//console.log("done:data2:" + data2);
//console.log("done:data3:" + data3);
//console.log("done:data4:" + data4);
//console.log("done:data5:" + data5);
//console.log("done:data6:" + data6);
//console.log("done:data7:" + data7);
if(data1){
CONTENTVIEW_CALLAPI.webGetContentDataDone(data1[0]);
}
if(data2){
CONTENTVIEW_CALLAPI.getSearchDataFromJsonDone(data2[0]);
}
if(data3){
CONTENTVIEW_CALLAPI.getJsonDataPageTitleDone(data3[0]);
}
if(data4){
CONTENTVIEW_CALLAPI.getJsonDataType4Done(data4[0]);
}
if(data5){
CONTENTVIEW_CALLAPI.getJsonDataType5Done(data5[0]);
}
if(data6){
CONTENTVIEW_CALLAPI.getDataJsonFileDone(data6[0]);
}
if(data7){
CONTENTVIEW_CALLAPI.webGetContentPageSizeDone(data7[0]);
}
if(doneFunc){
doneFunc();
}
});
};
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
......@@ -75,51 +75,51 @@ CONTENTVIEW_CALLAPI.getJsonContentInfoDone = function(doneFunc){
CONTENTVIEW_CALLAPI.webGetPageImageContentSize = function() {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
isStreaming: ClientData.isStreamingMode()
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
isStreaming: ClientData.isStreamingMode()
};
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPageSize",
"GET",
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: CONTENTVIEW.getSessionId() },
function (data) {
CONTENTVIEW_GENERAL.widthContentImage = data.width;
CONTENTVIEW_GENERAL.heightContentImage = data.height;
},
null);
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPageSize",
"GET",
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: CONTENTVIEW.getSessionId() },
function (data) {
CONTENTVIEW_GENERAL.widthContentImage = data.width;
CONTENTVIEW_GENERAL.heightContentImage = data.height;
},
null);
};
CONTENTVIEW_CALLAPI.webGetContentPageSizeWhen = function(){
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 6,
isStreaming: ClientData.isStreamingMode()
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 6,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.webGetContentPageSizeDone = function(data){
if( data.contentData.pageInfoData.pagesInfo ){
$.each(data.contentData.pageInfoData.pagesInfo, function(i, n){
CONTENTVIEW_GENERAL.contentPageSizeArr.push(n);
});
//Get Page size of firstPage
CONTENTVIEW_CALLAPI.getPageSizeByPageNo(1);
} else {
CONTENTVIEW.showErrorScreen();
}
if( data.contentData.pageInfoData.pagesInfo ){
$.each(data.contentData.pageInfoData.pagesInfo, function(i, n){
CONTENTVIEW_GENERAL.contentPageSizeArr.push(n);
});
//Get Page size of firstPage
CONTENTVIEW_CALLAPI.getPageSizeByPageNo(1);
} else {
CONTENTVIEW.showErrorScreen();
}
};
//Get Pagesize by pageNo
......@@ -128,8 +128,8 @@ CONTENTVIEW_CALLAPI.getPageSizeByPageNo = function(pageNo){
var page = CONTENTVIEW_GENERAL.contentPageSizeArr[i];
if(page.pageNo == pageNo){
CONTENTVIEW_GENERAL.widthContentImage = page.pageWidth;
CONTENTVIEW_GENERAL.heightContentImage = page.pageHeight;
CONTENTVIEW_GENERAL.widthContentImage = page.pageWidth;
CONTENTVIEW_GENERAL.heightContentImage = page.pageHeight;
}
}
};
......@@ -137,53 +137,53 @@ CONTENTVIEW_CALLAPI.getPageSizeByPageNo = function(pageNo){
CONTENTVIEW_CALLAPI.webGetContentDataWhen = function() {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 1,
isStreaming: ClientData.isStreamingMode()
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 1,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.webGetContentDataDone = function(data) {
CONTENTVIEW_GENERAL.totalPage = data.contentData.allPageNum;
CONTENTVIEW_GENERAL.totalPage = data.contentData.allPageNum;
};
/* get Json stored page title */
CONTENTVIEW_CALLAPI.getJsonDataPageTitleWhen = function() {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 3,
isStreaming: ClientData.isStreamingMode()
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 3,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.getJsonDataPageTitleDone = function(data) {
CONTENTVIEW_GENERAL.dataPageTitle = [];
CONTENTVIEW_GENERAL.dataPageTitle = [];
for (var nIndex = 0; nIndex < CONTENTVIEW_GENERAL.totalPage; nIndex++) {
CONTENTVIEW_GENERAL.dataPageTitle.push("");
CONTENTVIEW_GENERAL.dataPageTitle.push("");
}
if (data.contentData) {
if (data.contentData.titleInfo) {
CONTENTVIEW_GENERAL.dataPageTitle = data.contentData.titleInfo;
CONTENTVIEW_GENERAL.dataPageTitle = data.contentData.titleInfo;
}
}
};
......@@ -192,63 +192,63 @@ CONTENTVIEW_CALLAPI.getJsonDataPageTitleDone = function(data) {
CONTENTVIEW_CALLAPI.getJsonDataType4When = function() {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 4,
isStreaming: ClientData.isStreamingMode()
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 4,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.getJsonDataType4Done = function(data) {
CONTENTVIEW_GENERAL.dataJsonType4 = data.contentData.linkData;
CONTENTVIEW_GENERAL.dataJsonType4 = data.contentData.linkData;
};
/* get Json webGetContent5 */
CONTENTVIEW_CALLAPI.getJsonDataType5When = function() {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 5,
isStreaming: ClientData.isStreamingMode()
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 5,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.getJsonDataType5Done = function(data) {
CONTENTVIEW_GENERAL.dataJsonType5 = data.contentData.outlineData;
CONTENTVIEW_GENERAL.dataJsonType5 = data.contentData.outlineData;
};
/* read file Json -> get page objects */
CONTENTVIEW_CALLAPI.getDataJsonFileWhen = function() {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 2,
isStreaming: ClientData.isStreamingMode()
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 2,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
);
};
......@@ -259,7 +259,7 @@ CONTENTVIEW_CALLAPI.getDataJsonFileDone = function(data) {
CONTENTVIEW_GENERAL.pageObjectsData = [];
if (JsonFile.vertical) {
if (JsonFile.vertical.pages) {
CONTENTVIEW_GENERAL.pageObjectsData = JsonFile.vertical.pages;
CONTENTVIEW_GENERAL.pageObjectsData = JsonFile.vertical.pages;
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
if(data.contentDataSub != null && data.contentDataSub.length > 0){
......@@ -273,7 +273,7 @@ CONTENTVIEW_CALLAPI.getDataJsonFileDone = function(data) {
}
else if (JsonFile.horizontal) {
if (JsonFile.horizontal.pages) {
CONTENTVIEW_GENERAL.pageObjectsData = JsonFile.horizontal.pages;
CONTENTVIEW_GENERAL.pageObjectsData = JsonFile.horizontal.pages;
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
if(data.contentDataSub != null && data.contentDataSub.length > 0){
for(var i = 0; i < CONTENTVIEW_GENERAL.pageObjectsData.length; i++){
......@@ -286,7 +286,7 @@ CONTENTVIEW_CALLAPI.getDataJsonFileDone = function(data) {
}
//Start : Function : No.12 - Editor : Long - Date: 08/27/2013 - Summary : Get Page Object for content type none
else{
CONTENTVIEW_GENERAL.pageObjectsData = JsonFile.content.pages;
CONTENTVIEW_GENERAL.pageObjectsData = JsonFile.content.pages;
if(data.contentDataSub != null && data.contentDataSub.length > 0){
for(var i = 0; i < CONTENTVIEW_GENERAL.pageObjectsData.length; i++){
......@@ -321,52 +321,52 @@ CONTENTVIEW_CALLAPI.loadDataBookmark = function(lstPageNo) {
if (CONTENTVIEW_GENERAL.isSendingData == true) {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
pageNos: lstPageNo[0],
thumbnailFlg: 1,
isStreaming: ClientData.isStreamingMode()
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
pageNos: lstPageNo[0],
thumbnailFlg: 1,
isStreaming: ClientData.isStreamingMode()
};
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPage",
"GET",
params,
function (data) {
CONTENTVIEW_GETDATA.getDataLoaded(data.pages);
//Resize Image
var imgTemp = new Image();
$('#img_bookmark_' + data.pages[0].pageNo).attr('src', COMMON.formatStringBase64(data.pages[0].pageThumbnail));
imgTemp.onload = function () {
if (imgTemp.width > imgTemp.height) {
$("img.imgbox").attr('height', '');
$("img.imgbox").removeAttr('height');
$("img.imgbox").attr('width', '43');
}
else {
$("img.imgbox").attr('width', '');
$("img.imgbox").removeAttr('width');
$("img.imgbox").attr('height', '43');
}
};
imgTemp.src = COMMON.formatStringBase64(data.pages[0].pageThumbnail);
lstPageNo = jQuery.grep(lstPageNo, function (value) {
return value != lstPageNo[0];
});
if (lstPageNo.length > 0) {
CONTENTVIEW_CALLAPI.loadDataBookmark(lstPageNo);
} else {
CONTENTVIEW_GENERAL.isSendingData = false;
}
},
null);
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPage",
"GET",
params,
function (data) {
CONTENTVIEW_GETDATA.getDataLoaded(data.pages);
//Resize Image
var imgTemp = new Image();
$('#img_bookmark_' + data.pages[0].pageNo).attr('src', COMMON.formatStringBase64(data.pages[0].pageThumbnail));
imgTemp.onload = function () {
if (imgTemp.width > imgTemp.height) {
$("img.imgbox").attr('height', '');
$("img.imgbox").removeAttr('height');
$("img.imgbox").attr('width', '43');
}
else {
$("img.imgbox").attr('width', '');
$("img.imgbox").removeAttr('width');
$("img.imgbox").attr('height', '43');
}
};
imgTemp.src = COMMON.formatStringBase64(data.pages[0].pageThumbnail);
lstPageNo = jQuery.grep(lstPageNo, function (value) {
return value != lstPageNo[0];
});
if (lstPageNo.length > 0) {
CONTENTVIEW_CALLAPI.loadDataBookmark(lstPageNo);
} else {
CONTENTVIEW_GENERAL.isSendingData = false;
}
},
null);
}
};
......@@ -384,76 +384,76 @@ CONTENTVIEW_CALLAPI.getSearchDataFromJsonWhen = function() {
}
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
thumbnailFlg: 0,
isStreaming: ClientData.isStreamingMode()
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
thumbnailFlg: 0,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webContentPage",
"GET",
params
ClientData.userInfo_accountPath(),
"webContentPage",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.getSearchDataFromJsonDone = function(data) {
CONTENTVIEW_GENERAL.contentName = data.contentTitle;
CONTENTVIEW_GENERAL.dataWebContentPage = data;
CONTENTVIEW_GENERAL.contentName = data.contentTitle;
CONTENTVIEW_GENERAL.dataWebContentPage = data;
};
CONTENTVIEW_CALLAPI.loadDataSearch = function(lstPageNo) {
if (CONTENTVIEW_GENERAL.isSendingData == true) {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
pageNos: lstPageNo[0],
thumbnailFlg: 1,
isStreaming: ClientData.isStreamingMode()
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
pageNos: lstPageNo[0],
thumbnailFlg: 1,
isStreaming: ClientData.isStreamingMode()
};
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPage",
"GET",
params,
function (data) {
CONTENTVIEW_GETDATA.getDataLoaded(data.pages);
//Resize Image
var imgTemp = new Image();
$('#img_search_' + data.pages[0].pageNo).attr('src', COMMON.formatStringBase64(data.pages[0].pageThumbnail));
imgTemp.onload = function () {
if (imgTemp.width > imgTemp.height) {
$("img.imgbox").attr('height', '');
$("img.imgbox").removeAttr('height');
$("img.imgbox").attr('width', '43');
}
else {
$("img.imgbox").attr('width', '');
$("img.imgbox").removeAttr('width');
$("img.imgbox").attr('height', '43');
}
};
imgTemp.src = COMMON.formatStringBase64(data.pages[0].pageThumbnail);
lstPageNo = jQuery.grep(lstPageNo, function (value) {
return value != lstPageNo[0];
});
if (lstPageNo.length > 0) {
CONTENTVIEW_CALLAPI.loadDataSearch(lstPageNo);
} else {
CONTENTVIEW_GENERAL.isSendingData = false;
}
},
null);
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPage",
"GET",
params,
function (data) {
CONTENTVIEW_GETDATA.getDataLoaded(data.pages);
//Resize Image
var imgTemp = new Image();
$('#img_search_' + data.pages[0].pageNo).attr('src', COMMON.formatStringBase64(data.pages[0].pageThumbnail));
imgTemp.onload = function () {
if (imgTemp.width > imgTemp.height) {
$("img.imgbox").attr('height', '');
$("img.imgbox").removeAttr('height');
$("img.imgbox").attr('width', '43');
}
else {
$("img.imgbox").attr('width', '');
$("img.imgbox").removeAttr('width');
$("img.imgbox").attr('height', '43');
}
};
imgTemp.src = COMMON.formatStringBase64(data.pages[0].pageThumbnail);
lstPageNo = jQuery.grep(lstPageNo, function (value) {
return value != lstPageNo[0];
});
if (lstPageNo.length > 0) {
CONTENTVIEW_CALLAPI.loadDataSearch(lstPageNo);
} else {
CONTENTVIEW_GENERAL.isSendingData = false;
}
},
null);
}
};
......
......@@ -14,11 +14,11 @@ CONTENTVIEW_EVENTS.handleAddMemo = function(event) {
//Start Function : No.4
if(CONTENTVIEW_GETDATA.getContent().hasNextPage()){
CONTENTVIEW.drawMemoOnScreen(1);
CONTENTVIEW.drawMemoOnScreen(1);
}
if(CONTENTVIEW_GETDATA.getContent().hasPreviousPage()){
CONTENTVIEW.drawMemoOnScreen(2);
CONTENTVIEW.drawMemoOnScreen(2);
}
//End Function : No.4
......@@ -46,11 +46,11 @@ CONTENTVIEW_EVENTS.handleAddMemo = function(event) {
CONTENTVIEW.drawMemoOnScreen();
//Start Function : No.4
if(CONTENTVIEW_GETDATA.getContent().hasNextPage()){
CONTENTVIEW.drawMemoOnScreen(1);
CONTENTVIEW.drawMemoOnScreen(1);
}
if(CONTENTVIEW_GETDATA.getContent().hasPreviousPage()){
CONTENTVIEW.drawMemoOnScreen(2);
CONTENTVIEW.drawMemoOnScreen(2);
}
//End Function : No.4
//change class
......@@ -83,11 +83,11 @@ CONTENTVIEW_EVENTS.imgmarking_click = function() {
//Start Function : No.4
if(CONTENTVIEW_GETDATA.getContent().hasNextPage()){
CONTENTVIEW.drawCanvas(1);
CONTENTVIEW.drawCanvas(1);
}
if(CONTENTVIEW_GETDATA.getContent().hasPreviousPage()){
CONTENTVIEW.drawCanvas(2);
CONTENTVIEW.drawCanvas(2);
}
//End Function : No.4
......@@ -109,11 +109,11 @@ CONTENTVIEW_EVENTS.imgmarking_click = function() {
//Start Function : No.4
if(CONTENTVIEW_GETDATA.getContent().hasNextPage()){
CONTENTVIEW.drawCanvas(1);
CONTENTVIEW.drawCanvas(1);
}
if(CONTENTVIEW_GETDATA.getContent().hasPreviousPage()){
CONTENTVIEW.drawCanvas(2);
CONTENTVIEW.drawCanvas(2);
}
}
//End Function : No.4
......@@ -127,7 +127,7 @@ CONTENTVIEW_EVENTS.clickBookmark = function() {
var targetPageIndex = $(this).attr('id');
if(targetPageIndex != CONTENTVIEW_GETDATA.getPageIndex()){
CONTENTVIEW.changePage(targetPageIndex);
CONTENTVIEW.changePage(targetPageIndex);
}
/* close popup */
......@@ -179,7 +179,7 @@ CONTENTVIEW_EVENTS.showListBookMark = function(e) {
/*event click show dialog index*/
CONTENTVIEW_EVENTS.showListPageIndex = function(e) {
CONTENTVIEW_GENERAL.isDisplayListIndex = true;
CONTENTVIEW_GENERAL.isDisplayListIndex = true;
var array = [e.pageX, e.pageY];
CONTENTVIEW_GETDATA.getPageIndexJson(array);
......@@ -193,7 +193,7 @@ CONTENTVIEW_EVENTS.showListPageIndex = function(e) {
/* event close list bookmark box */
CONTENTVIEW_EVENTS.closeIndexBox = function() {
CONTENTVIEW_GENERAL.isDisplayListIndex = false;
CONTENTVIEW_GENERAL.isDisplayListIndex = false;
$("#divListIndex").hide();
$('#boxIndex').css('display', 'none');
......@@ -224,9 +224,9 @@ CONTENTVIEW_EVENTS.listIndex_Callback = function(selectedNode) {
CONTENTVIEW_EVENTS.showCopyText = function(e) {
/* display dialog overlay */
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
CONTENTVIEW.copyText();
CONTENTVIEW.copyText();
} else {
CONTENTVIEW_GENERAL.isDisplayCopyText = true;
CONTENTVIEW_GENERAL.isDisplayCopyText = true;
//change class
$('#copytext').removeClass();
$('#copytext').addClass('copy_hover');
......@@ -239,7 +239,7 @@ CONTENTVIEW_EVENTS.showCopyText = function(e) {
/* event close copy text box */
CONTENTVIEW_EVENTS.closeCopyTextBox = function() {
CONTENTVIEW_GENERAL.isDisplayCopyText = false;
CONTENTVIEW_GENERAL.isDisplayCopyText = false;
$("#divCopyText").hide();
$('#boxCopyText').css('display', 'none');
......@@ -260,7 +260,7 @@ CONTENTVIEW_EVENTS.closeCopyTextBox = function() {
CONTENTVIEW_EVENTS.showListSearchResult = function() {
$('#txtSearch').keydown(function (e) {
if (e.keyCode == 13) {
CONTENTVIEW.searchHandle();
CONTENTVIEW.searchHandle();
/* display dialog overlay */
//$("#overlay").show();
......@@ -271,7 +271,7 @@ CONTENTVIEW_EVENTS.showListSearchResult = function() {
/* event close searching result box */
CONTENTVIEW_EVENTS.closeSearchingBox = function() {
CONTENTVIEW_GENERAL.isSendingData = false;
CONTENTVIEW_GENERAL.isSendingData = false;
$("#divSearchResult").hide();
$('#boxSearching').css('display', 'none');
......@@ -293,7 +293,7 @@ CONTENTVIEW_EVENTS.nextPage_click = function() {
if (CONTENTVIEW_GETDATA.getContent().hasNextPage()) {
var pageNo = CONTENTVIEW_GETDATA.getPageIndex() + 1;
var pageNo = CONTENTVIEW_GETDATA.getPageIndex() + 1;
COMMON.SetPageLog( CONTENTVIEW_GENERAL.contentID, pageNo);
......@@ -319,7 +319,7 @@ CONTENTVIEW_EVENTS.prevPage_click = function() {
if (CONTENTVIEW_GETDATA.getContent().hasPreviousPage()) {
var pageNo = CONTENTVIEW_GETDATA.getPageIndex() - 1;
var pageNo = CONTENTVIEW_GETDATA.getPageIndex() - 1;
COMMON.SetPageLog( CONTENTVIEW_GENERAL.contentID, pageNo);
......@@ -344,7 +344,7 @@ CONTENTVIEW_EVENTS.firstPage_click = function() {
if (CONTENTVIEW_GETDATA.getContent().pageIndex != 0) {
if(CONTENTVIEW_GETDATA.getContent().pageIndex == 1){
CONTENTVIEW_EVENTS.prevPage_click();
CONTENTVIEW_EVENTS.prevPage_click();
}
else{
......@@ -364,31 +364,31 @@ CONTENTVIEW_EVENTS.firstPage_click = function() {
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) {
CONTENTVIEW_GENERAL.pageImages = data;
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: CONTENTVIEW.getSessionId(), pageNo: 1 },
function (data) {
CONTENTVIEW_GENERAL.pageImages = data;
/* get page Objects */
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, 0);
CONTENTVIEW_GETDATA.getContent().setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.pageImages).setPageObjects(CONTENTVIEW_GENERAL.pageObjects);
/* get page Objects */
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, 0);
CONTENTVIEW_GETDATA.getContent().setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.pageImages).setPageObjects(CONTENTVIEW_GENERAL.pageObjects);
$('#divImageLoading').css('display', 'none');
$('#divImageLoading').css('display', 'none');
CONTENTVIEW.checkDisableButtonZoom();
var tran = new CONTENTVIEW_CREATEOBJECT.Transition();
tran.flipToPage(0);
CONTENTVIEW.checkDisableButtonZoom();
var tran = new CONTENTVIEW_CREATEOBJECT.Transition();
tran.flipToPage(0);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
);
}
//START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, 0);
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, 0);
CONTENTVIEW_GETDATA.getContent().setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.pageImages).setPageObjects(CONTENTVIEW_GENERAL.pageObjects);
$('#divImageLoading').css('display', 'none');
......@@ -411,7 +411,7 @@ CONTENTVIEW_EVENTS.lastPage_click = function() {
if (CONTENTVIEW_GETDATA.getContent().pageIndex != (CONTENTVIEW_GENERAL.totalPage - 1)) {
if(CONTENTVIEW_GETDATA.getContent().pageIndex == CONTENTVIEW_GENERAL.totalPage - 2){
CONTENTVIEW_EVENTS.nextPage_click();
CONTENTVIEW_EVENTS.nextPage_click();
}
else{
......@@ -433,30 +433,30 @@ CONTENTVIEW_EVENTS.lastPage_click = function() {
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){
AVWEB.avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: ClientData.userInfo_sid(), pageNo: CONTENTVIEW_GENERAL.totalPage },
function (data) {
CONTENTVIEW_GENERAL.pageImages = data;
/* get page Objects */
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GENERAL.totalPage - 1);
CONTENTVIEW_GETDATA.getContent().setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.pageImages).setPageObjects(CONTENTVIEW_GENERAL.pageObjects);
$('#divImageLoading').css('display', 'none');
CONTENTVIEW.checkDisableButtonZoom();
var tran = new CONTENTVIEW_CREATEOBJECT.Transition();
tran.flipToPage(CONTENTVIEW_GENERAL.totalPage - 1);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
AVWEB.avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: CONTENTVIEW.getSessionId(), pageNo: CONTENTVIEW_GENERAL.totalPage },
function (data) {
CONTENTVIEW_GENERAL.pageImages = data;
/* get page Objects */
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GENERAL.totalPage - 1);
CONTENTVIEW_GETDATA.getContent().setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.pageImages).setPageObjects(CONTENTVIEW_GENERAL.pageObjects);
$('#divImageLoading').css('display', 'none');
CONTENTVIEW.checkDisableButtonZoom();
var tran = new CONTENTVIEW_CREATEOBJECT.Transition();
tran.flipToPage(CONTENTVIEW_GENERAL.totalPage - 1);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
);
}
//START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GENERAL.totalPage - 1);
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GENERAL.totalPage - 1);
CONTENTVIEW_GETDATA.getContent().setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.pageImages).setPageObjects(CONTENTVIEW_GENERAL.pageObjects);
$('#divImageLoading').css('display', 'none');
......@@ -502,11 +502,11 @@ CONTENTVIEW_EVENTS.createLockLayout = function(opt){
$(document).keydown(function (e) {
/* set fag true when click ctrl */
if (e.ctrlKey) {
CONTENTVIEW_GENERAL.ctrlMode = true;
CONTENTVIEW_GENERAL.ctrlMode = true;
}
if(e.altKey){
CONTENTVIEW_EVENTS.altMode = true;
CONTENTVIEW_EVENTS.altMode = true;
}
/* set hot key */
......@@ -519,14 +519,14 @@ $(document).keydown(function (e) {
case COMMON.ShortKeys.MovePrevious: /* move prev */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
if (CONTENTVIEW_GETDATA.getContent().hasPreviousPage()) {
CONTENTVIEW_EVENTS.prevPage_click();
CONTENTVIEW_EVENTS.prevPage_click();
}
}
break;
case COMMON.ShortKeys.MoveNext: /* move next */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
if (CONTENTVIEW_GETDATA.getContent().hasNextPage()) {
CONTENTVIEW_EVENTS.nextPage_click();
CONTENTVIEW_EVENTS.nextPage_click();
}
}
......@@ -536,21 +536,21 @@ $(document).keydown(function (e) {
case COMMON.ShortKeys.ZoomIn: /* zoomIn */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.zoomIn();
CONTENTVIEW.zoomIn();
}
break;
case COMMON.ShortKeys.ZoomOut: /* zoomOut */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.zoomOut();
CONTENTVIEW.zoomOut();
}
break;
case COMMON.ShortKeys.ZoomFit: /* screenFit*/
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.screenFit();
CONTENTVIEW.screenFit();
}
break;
......@@ -558,14 +558,14 @@ $(document).keydown(function (e) {
case COMMON.ShortKeys.ShowHideToolbar: /* handle toolbar */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.handleDisplayToolbar();
CONTENTVIEW.handleDisplayToolbar();
}
else{
if(CONTENTVIEW.isZoomingContent){
CONTENTVIEW.originalScreenForNotPdfType();
CONTENTVIEW.originalScreenForNotPdfType();
}
else{
CONTENTVIEW.fullScreenForNotPdfType();
CONTENTVIEW.fullScreenForNotPdfType();
}
}
......@@ -573,7 +573,7 @@ $(document).keydown(function (e) {
case COMMON.ShortKeys.ShowHideMarking: /* hide marking */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW_EVENTS.imgmarking_click();
CONTENTVIEW_EVENTS.imgmarking_click();
}
break;
......@@ -591,20 +591,20 @@ $(document).keydown(function (e) {
case COMMON.ShortKeys.ZoomInAlt: /* zoomIn */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.zoomIn();
CONTENTVIEW.zoomIn();
}
break;
case COMMON.ShortKeys.ZoomOutAlt: /* zoomOut */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.zoomOut();
CONTENTVIEW.zoomOut();
}
break;
case COMMON.ShortKeys.ZoominAlt_Firefox: /* zoomIn */
if(CONTENTVIEW_GENERAL.avwUserEnvObj.browser == 'firefox'){
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.zoomIn();
CONTENTVIEW.zoomIn();
}
}
break;
......@@ -612,7 +612,7 @@ $(document).keydown(function (e) {
if(CONTENTVIEW_GENERAL.avwUserEnvObj.browser == 'firefox'){
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.zoomOut();
CONTENTVIEW.zoomOut();
}
}
break;
......@@ -624,7 +624,7 @@ $(document).keydown(function (e) {
/* handle keydown */
$(document).keyup(function (e) {
CONTENTVIEW_GENERAL.ctrlMode = false;
CONTENTVIEW_GENERAL.ctrlMode = false;
CONTENTVIEW_EVENTS.altMode = false;
});
//END TRB00049 - Editor: Long - Date: 09/26/2013 - Summary : Add short key alt
......@@ -686,9 +686,9 @@ CONTENTVIEW_EVENTS.update3DImagesArr = function(){
//END TRB - Editor : Long -Date : 10/01/2013 - Summary : Re Assign sid for image 3d
CONTENTVIEW_EVENTS.onUnlock = function() {
CONTENTVIEW.removeObject();
CONTENTVIEW_EVENTS.update3DImagesArr();
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, 0);
CONTENTVIEW.removeObject();
CONTENTVIEW_EVENTS.update3DImagesArr();
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, 0);
/* handle play BGM of content jump */
for (var nIndex = 0; nIndex < CONTENTVIEW_GENERAL.pageObjects.length; nIndex++) {
if (CONTENTVIEW_GENERAL.pageObjects[nIndex].mediaType == '3' && CONTENTVIEW_GENERAL.pageObjects[nIndex].playType == '1') {
......@@ -698,7 +698,7 @@ CONTENTVIEW_EVENTS.onUnlock = function() {
document.getElementById("play_audio_1").play();
CONTENTVIEW_GENERAL.isPlayBGMUnlock = true;
} else {
CONTENTVIEW_CREATEOBJECT.createAudio(CONTENTVIEW_GENERAL.pageObjects[nIndex].audioFile, CONTENTVIEW_GENERAL.pageObjects[nIndex].playType);
CONTENTVIEW_CREATEOBJECT.createAudio(CONTENTVIEW_GENERAL.pageObjects[nIndex].audioFile, CONTENTVIEW_GENERAL.pageObjects[nIndex].playType);
}
}
}
......@@ -710,12 +710,12 @@ CONTENTVIEW_EVENTS.onUnlock = function() {
CONTENTVIEW_CREATEOBJECT.createPageBGM();
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
if(CONTENTVIEW_GETDATA.getPageIndex() < CONTENTVIEW_GENERAL.totalPage - 1){
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() + 1);
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() + 1);
CONTENTVIEW_GETDATA.renderNextPage();
}
if(CONTENTVIEW_GETDATA.getPageIndex() > 0){
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() - 1);
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() - 1);
CONTENTVIEW_GETDATA.renderPrevPage();
}
......@@ -730,7 +730,7 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
return;
}
else{
CONTENTVIEW.cancelClick = false;
CONTENTVIEW.cancelClick = false;
}
if (!CONTENTVIEW.cancelClick) {
......@@ -746,7 +746,7 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
if (ClientData.IsAddingMemo() == true) {
if (!ClientData.memo_copyText()) {
CONTENTVIEW_MEMO.AddMemo(CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), event.pageX, event.pageY, function () {
CONTENTVIEW_MEMO.AddMemo(CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), event.pageX, event.pageY, function () {
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
......@@ -760,7 +760,7 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
});
} else {
if (CONTENTVIEW_GENERAL.typeSelectMemo == 1) { /* add new */
CONTENTVIEW_MEMO.AddMemo(CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_GENERAL.posXPopupMemo, CONTENTVIEW_GENERAL.posYPopupMemo, function () {
CONTENTVIEW_MEMO.AddMemo(CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_GENERAL.posXPopupMemo, CONTENTVIEW_GENERAL.posYPopupMemo, function () {
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
......@@ -774,7 +774,7 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
});
} else if (CONTENTVIEW_GENERAL.typeSelectMemo == 2) { /* copy */
CONTENTVIEW_MEMO.CopyMemo(ClientData.memo_copyText(), CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_GENERAL.posXPopupMemo, CONTENTVIEW_GENERAL.posYPopupMemo, function () {
CONTENTVIEW_MEMO.CopyMemo(ClientData.memo_copyText(), CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_GENERAL.posXPopupMemo, CONTENTVIEW_GENERAL.posYPopupMemo, function () {
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
......@@ -795,18 +795,18 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
var isClickMemo = false;
if (CONTENTVIEW_GENERAL.isOpenPopUpText == true) {
CONTENTVIEW_GENERAL.isOpenPopUpText = false;
CONTENTVIEW_POPUPTEXT.ClosePopupText();
CONTENTVIEW_GENERAL.isOpenPopUpText = false;
CONTENTVIEW_POPUPTEXT.ClosePopupText();
}
if (CONTENTVIEW_GENERAL.isOpenPopUpMemo == true) {
CONTENTVIEW_GENERAL.isOpenPopUpMemo = false;
CONTENTVIEW_GENERAL.isOpenPopUpMemo = false;
$("#pop_up_memo").hide();
}
/* click memo edit */
if (ClientData.IsDisplayMemo() == true) {
CONTENTVIEW_GETDATA.getAllMemoOfPage();
CONTENTVIEW_GETDATA.getAllMemoOfPage();
/* check exist object memo in mouse position */
for (var nIndex = 0; nIndex < CONTENTVIEW_CREATEOBJECT.memoObjects.length; nIndex++) {
var hitPageObjMemo = CONTENTVIEW_CREATEOBJECT.memoObjects[nIndex];
......@@ -815,7 +815,7 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
//hitPageObjMemo.action();
/* save object memo */
CONTENTVIEW_GENERAL.objEditMemo = hitPageObjMemo;
CONTENTVIEW_GENERAL.objEditMemo = hitPageObjMemo;
var posMemoX = event.pageX;
var posMemoY = event.pageY;
......@@ -854,9 +854,9 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
}
if (hitPageObj) {
if(!CONTENTVIEW.is3DObject(hitPageObj)){
if(((CONTENTVIEW_GENERAL.positonX != CONTENTVIEW_GENERAL.newpositionX) || (CONTENTVIEW_GENERAL.positonY != CONTENTVIEW_GENERAL.newpositionY)) && (CONTENTVIEW_GENERAL.positonX != undefined)) {
CONTENTVIEW_GENERAL.number = 0;
}
if(((CONTENTVIEW_GENERAL.positonX != CONTENTVIEW_GENERAL.newpositionX) || (CONTENTVIEW_GENERAL.positonY != CONTENTVIEW_GENERAL.newpositionY)) && (CONTENTVIEW_GENERAL.positonX != undefined)) {
CONTENTVIEW_GENERAL.number = 0;
}
hitPageObj.action();
}
else{
......@@ -886,29 +886,29 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
if(!CONTENTVIEW_EVENTS.isPreventClick){
//START TRB00097
if(CONTENTVIEW.userScale == 1){
CONTENTVIEW_EVENTS.prevPage_click();
CONTENTVIEW_EVENTS.prevPage_click();
}
//END TRB00097
}
else{
CONTENTVIEW_EVENTS.isPreventClick = false;
CONTENTVIEW_EVENTS.isPreventClick = false;
}
} else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) {
if(!CONTENTVIEW_EVENTS.isPreventClick){
//START TRB00097
if(CONTENTVIEW.userScale == 1){
CONTENTVIEW_EVENTS.nextPage_click();
CONTENTVIEW_EVENTS.nextPage_click();
}
//END TRB00097
}
else{
CONTENTVIEW_EVENTS.isPreventClick = false;
CONTENTVIEW_EVENTS.isPreventClick = false;
}
}
if(!CONTENTVIEW_EVENTS.isPreventClick){
//その他のエリア
//console.log("click!!");
//その他のエリア
//console.log("click!!");
}
}
......@@ -922,20 +922,20 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
if (event.pageX > 0 && event.pageX < 300) {
if(!CONTENTVIEW_EVENTS.isPreventClick){
CONTENTVIEW_EVENTS.prevPage_click();
CONTENTVIEW_EVENTS.prevPage_click();
//CONTENTVIEW_EVENTS.isPreventClick = true;
}
else{
CONTENTVIEW_EVENTS.isPreventClick = false;
CONTENTVIEW_EVENTS.isPreventClick = false;
}
} else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) {
if(!CONTENTVIEW_EVENTS.isPreventClick){
CONTENTVIEW_EVENTS.nextPage_click();
CONTENTVIEW_EVENTS.nextPage_click();
}
else{
CONTENTVIEW_EVENTS.isPreventClick = false;
CONTENTVIEW_EVENTS.isPreventClick = false;
}
}
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
......@@ -960,7 +960,7 @@ CONTENTVIEW_EVENTS.mouseWheel_CanvasMain = function(event, detail) {
}
if(CONTENTVIEW_GENERAL.isLoadingObject){
CONTENTVIEW.moveFlag = false;
CONTENTVIEW.moveFlag = false;
}
/* base image move when userScale over 1 */
......@@ -999,7 +999,7 @@ CONTENTVIEW_EVENTS.mouseMove_CanvasMain = function(event) {
}
if(CONTENTVIEW_GENERAL.isLoadingObject){
CONTENTVIEW.moveFlag = false;
CONTENTVIEW.moveFlag = false;
}
//End Function : No.20 - Editor : Long
......@@ -1032,12 +1032,12 @@ CONTENTVIEW_EVENTS.mouseMove_CanvasMain = function(event) {
// store current mouse point
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() == false && CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid() == false) {
CONTENTVIEW_GENERAL.px = event.pageX;
CONTENTVIEW_GENERAL.py = event.pageY;
CONTENTVIEW_GENERAL.px = event.pageX;
CONTENTVIEW_GENERAL.py = event.pageY;
} else {
//event.preventDefault();
CONTENTVIEW_GENERAL.px = event.targetTouches[0].pageX;
CONTENTVIEW_GENERAL.py = event.targetTouches[0].pageY;
CONTENTVIEW_GENERAL.px = event.targetTouches[0].pageX;
CONTENTVIEW_GENERAL.py = event.targetTouches[0].pageY;
}
// redraw
......@@ -1051,10 +1051,10 @@ CONTENTVIEW_EVENTS.mouseMove_CanvasMain = function(event) {
else if(CONTENTVIEW.moveFlag && CONTENTVIEW.userScale == 1){
//Prevent 3d animate when moving
CONTENTVIEW_EVENTS.isPageTransition = true;
CONTENTVIEW_EVENTS.isPageTransition = true;
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
CONTENTVIEW_EVENTS.isPreventClick = true;
CONTENTVIEW_EVENTS.isPreventClick = true;
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
var x = event.pageX;
......@@ -1082,23 +1082,23 @@ CONTENTVIEW_EVENTS.mouseMove_CanvasMain = function(event) {
//examinate direction
if(CONTENTVIEW_GENERAL._moveNum==0 && deltaX < 0){
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left => next page
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left => next page
}
if(CONTENTVIEW_GENERAL._moveNum==2 && deltaX > 0){
CONTENTVIEW_GENERAL._moveNum = 1; // go from right to left and back to right => no move
CONTENTVIEW_GENERAL._moveNum = 1; // go from right to left and back to right => no move
}
if(CONTENTVIEW_GENERAL._moveNum==1 && deltaX < 0){
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left + back to right + go to left => next page
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left + back to right + go to left => next page
}
if(CONTENTVIEW_GENERAL._moveNum==0 && deltaX > 0){
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right=> priveous page
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right=> priveous page
}
if(CONTENTVIEW_GENERAL._moveNum==-2 && deltaX < 0){
CONTENTVIEW_GENERAL._moveNum = -1; // go from left to right and back to left => no move
CONTENTVIEW_GENERAL._moveNum = -1; // go from left to right and back to left => no move
}
if(CONTENTVIEW_GENERAL._moveNum==0 && deltaX > 0){
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right + back to left + go to right=> priveous page
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right + back to left + go to right=> priveous page
}
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide){
......@@ -1114,12 +1114,12 @@ CONTENTVIEW_EVENTS.mouseMove_CanvasMain = function(event) {
var hitObj = CONTENTVIEW_GETDATA.getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if(hitObj){
if(CONTENTVIEW.is3DObject(hitObj)){
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchMove_MouseMove;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchMove_MouseMove;
hitObj.action(imagePt);
}
}
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._3dAnimate = false;
}
}
......@@ -1185,10 +1185,10 @@ CONTENTVIEW_EVENTS.mouseDown_CanvasMain = function(event) {
//End Function : No.20 - Editor : Long - Date: 08/17/2013 - Summary :
if(!CONTENTVIEW_GENERAL.isLoadingObject){
CONTENTVIEW.moveFlag = true;
CONTENTVIEW.moveFlag = true;
}
else{
CONTENTVIEW.moveFlag = false;
CONTENTVIEW.moveFlag = false;
}
//event.preventDefault();
......@@ -1196,12 +1196,12 @@ CONTENTVIEW_EVENTS.mouseDown_CanvasMain = function(event) {
$('#main').css('cursor', 'default');
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() == false && CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid() == false) {
CONTENTVIEW_GENERAL.px = event.pageX;
CONTENTVIEW_GENERAL.py = event.pageY;
CONTENTVIEW_GENERAL.px = event.pageX;
CONTENTVIEW_GENERAL.py = event.pageY;
//Start Function : No.20
CONTENTVIEW_GENERAL._clickFirstPos = {x:event.pageX, y: event.pageY};
CONTENTVIEW_GENERAL._clickLastPos = {x:event.pageX, y: event.pageY};
CONTENTVIEW_GENERAL._clickFirstPos = {x:event.pageX, y: event.pageY};
CONTENTVIEW_GENERAL._clickLastPos = {x:event.pageX, y: event.pageY};
CONTENTVIEW_GENERAL._moveNum = 0;
......@@ -1223,28 +1223,28 @@ CONTENTVIEW_EVENTS.mouseDown_CanvasMain = function(event) {
//START TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
if(!CONTENTVIEW_EVENTS.isPageTransition){
CONTENTVIEW_EVENTS._3dAnimate = true;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchStart_MouseDown;
CONTENTVIEW_3D._curr3dObject = hitPageObj;
CONTENTVIEW_EVENTS._3dAnimate = true;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchStart_MouseDown;
CONTENTVIEW_3D._curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
CONTENTVIEW.moveFlag = false;
}
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW.moveFlag = true;
}
//END TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
}
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._3dAnimate = false;
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
}
else {
//event.preventDefault();
CONTENTVIEW_GENERAL.px = event.targetTouches[0].pageX;
CONTENTVIEW_GENERAL.py = event.targetTouches[0].pageY;
CONTENTVIEW_GENERAL.px = event.targetTouches[0].pageX;
CONTENTVIEW_GENERAL.py = event.targetTouches[0].pageY;
}
};
......@@ -1257,15 +1257,15 @@ CONTENTVIEW_EVENTS.mouseUp_CanvasMain = function(event) {
}
if(CONTENTVIEW.moveFlag) {
CONTENTVIEW.moveFlag = false;
CONTENTVIEW.moveFlag = false;
$('#main').css('cursor', 'default');
// navigate page
if(CONTENTVIEW_GENERAL._moveNum == 2){
CONTENTVIEW_EVENTS.nextPage_click();
CONTENTVIEW_EVENTS.nextPage_click();
}else if (CONTENTVIEW_GENERAL._moveNum == -2){
CONTENTVIEW_EVENTS.prevPage_click();
CONTENTVIEW_EVENTS.prevPage_click();
}else {
CONTENTVIEW_GETDATA.correctCanvasPosition();
CONTENTVIEW_GETDATA.correctCanvasPosition();
}
//Check if mouse move is fired to prevent click next/ prev page
......@@ -1274,15 +1274,15 @@ CONTENTVIEW_EVENTS.mouseUp_CanvasMain = function(event) {
}
if(CONTENTVIEW_EVENTS._3dAnimate == true){
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchEnd_MouseUp;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchEnd_MouseUp;
CONTENTVIEW_3D._curr3dObject.action();
CONTENTVIEW_3D._curr3dObject.action();
}
if(CONTENTVIEW_EVENTS.isPageTransition){
CONTENTVIEW_EVENTS.isPageTransition = false;
CONTENTVIEW_EVENTS.isPageTransition = false;
}
//End Function : No.20
......@@ -1302,8 +1302,8 @@ CONTENTVIEW_EVENTS.imgBack_click = function() {
var oldDataBack = ClientData.JumpQueue();
if (oldDataBack.length > 0) {
//AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
CONTENTVIEW.screenMove();
//AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
CONTENTVIEW.screenMove();
ClientData.IsJumpBack(true);
} else {
/*check back */
......@@ -1313,8 +1313,8 @@ CONTENTVIEW_EVENTS.imgBack_click = function() {
// window.history.back();
//}
//元の画面に戻って画面復帰
CONTENTVIEW.screenBack();
//元の画面に戻って画面復帰
CONTENTVIEW.screenBack();
}
} else {
/*check back */
......@@ -1324,8 +1324,8 @@ CONTENTVIEW_EVENTS.imgBack_click = function() {
// window.history.back();
//}
//元の画面に戻って画面復帰
CONTENTVIEW.screenBack();
//元の画面に戻って画面復帰
CONTENTVIEW.screenBack();
}
......@@ -1356,7 +1356,7 @@ CONTENTVIEW_EVENTS.closePopUpCopyMemo = function() {
};
CONTENTVIEW_EVENTS.click_liAddMemo = function(event) {
CONTENTVIEW_GENERAL.typeSelectMemo = 1;
CONTENTVIEW_GENERAL.typeSelectMemo = 1;
$('#boxAddMemo').hide();
/* unlock dialog overlay */
......@@ -1367,7 +1367,7 @@ CONTENTVIEW_EVENTS.click_liAddMemo = function(event) {
};
CONTENTVIEW_EVENTS.click_liCopyMemo = function() {
CONTENTVIEW_GENERAL.typeSelectMemo = 2;
CONTENTVIEW_GENERAL.typeSelectMemo = 2;
$('#boxAddMemo').hide();
/* unlock dialog overlay */
......@@ -1396,7 +1396,7 @@ CONTENTVIEW_EVENTS.click_liDeleteMemo = function() {
* reset navi action as point session increase
*/
CONTENTVIEW_EVENTS.resetNaviAction = function(){
CONTENTVIEW_GENERAL._isPageNaviTouch = true;
CONTENTVIEW_GENERAL._isPageNaviTouch = true;
CONTENTVIEW_GENERAL._moveNum = 0;
CONTENTVIEW_GENERAL.touchStartedTime = new Date();
$('#mainPre').css("display",'none');
......@@ -1415,8 +1415,8 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
}
//evt.preventDefault();
//$('#debug').html("CONTENTVIEW_EVENTS.onTouchstart");
//CONTENTVIEW_STREAMING.handleDisplayToolbar();
//$('#debug').html("CONTENTVIEW_EVENTS.onTouchstart");
//CONTENTVIEW_STREAMING.handleDisplayToolbar();
var bContinue = true;
......@@ -1430,22 +1430,22 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
}
if( evt.pointerType != null ){
//console.log("evt.pointerType:" + evt.pointerType);
//console.log("evt.pointerType:" + evt.pointerType);
//evt.pointerType は IE以外 undef
switch (evt.pointerType) {
case evt.MSPOINTER_TYPE_TOUCH:
CONTENTVIEW_EVENTS._isTouching = true;
CONTENTVIEW_EVENTS._isTouching = true;
break;
case evt.MSPOINTER_TYPE_PEN:
bContinue = false;
break;
case evt.MSPOINTER_TYPE_MOUSE:
CONTENTVIEW_EVENTS._isTouching = false;
CONTENTVIEW_EVENTS._isTouching = false;
bContinue = false;
break;
}
} else {
CONTENTVIEW_EVENTS._isTouching = true;
CONTENTVIEW_EVENTS._isTouching = true;
}
if(!bContinue){
......@@ -1462,18 +1462,18 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
if(CONTENTVIEW_GENERAL._bWin8TouchEnabled){
CONTENTVIEW_GENERAL._bufferPoints = [];
CONTENTVIEW_GENERAL._bufferPoints = [];
if(CONTENTVIEW_GENERAL._startPoints.length == 0){
// start navi page case
touch1 = {clientX: evt.clientX, clientY: evt.clientY,pointerId: evt.pointerId};
CONTENTVIEW_GENERAL._startPoints.push(touch1);
if(CONTENTVIEW.userScale != 1){
CONTENTVIEW_GENERAL.px = evt.pageX;
CONTENTVIEW_GENERAL.py = evt.pageY;
CONTENTVIEW_GENERAL.px = evt.pageX;
CONTENTVIEW_GENERAL.py = evt.pageY;
}
else{
CONTENTVIEW_EVENTS.touchDownFirstPosX = evt.clientX;
CONTENTVIEW_EVENTS.touchDownFirstPosY = evt.clientY;
CONTENTVIEW_EVENTS.touchDownFirstPosX = evt.clientX;
CONTENTVIEW_EVENTS.touchDownFirstPosY = evt.clientY;
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
var imagePt = CONTENTVIEW.screenToImage(evt.pageX, evt.pageY);
......@@ -1484,17 +1484,17 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
//START TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
if(CONTENTVIEW.is3DObject(hitPageObj)){
if(CONTENTVIEW_EVENTS.isPageTransition){
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._3dAnimate = false;
}
else{
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchStart_MouseDown;
CONTENTVIEW_3D._curr3dObject = hitPageObj;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchStart_MouseDown;
CONTENTVIEW_3D._curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
CONTENTVIEW_EVENTS._3dAnimate = true;
}
}
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._3dAnimate = false;
}
//END TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
}
......@@ -1505,7 +1505,7 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
// start zoom page action
if(CONTENTVIEW_GENERAL._isPageNaviTouch){
// reset navi page action if exists
CONTENTVIEW_EVENTS.resetNaviAction();
CONTENTVIEW_EVENTS.resetNaviAction();
}
touch1 = CONTENTVIEW_GENERAL._startPoints[0];
......@@ -1530,11 +1530,11 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
touch1 = {clientX: evt.clientX, clientY: evt.clientY,pointerId: evt.pointerId};
CONTENTVIEW_GENERAL._startPoints.push(touch1);
if(CONTENTVIEW_GENERAL._isPageNaviTouch){
CONTENTVIEW_EVENTS.resetNaviAction();
CONTENTVIEW_EVENTS.resetNaviAction();
}
if(CONTENTVIEW_GENERAL._isPageZoomTouch){
CONTENTVIEW_EVENTS.resetZoomAction();
CONTENTVIEW_EVENTS.resetZoomAction();
}
}
}
......@@ -1544,7 +1544,7 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
touch1 = evt.touches[0];
touch2 = evt.touches[1];
if(touch2 == null){
CONTENTVIEW_EVENTS._isClick = true;
CONTENTVIEW_EVENTS._isClick = true;
CONTENTVIEW_EVENTS._touchPageX = evt.touches[0].pageX;
CONTENTVIEW_EVENTS._touchPageY = evt.touches[0].pageY;
//set touch to move page flag
......@@ -1571,12 +1571,12 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
if(CONTENTVIEW.is3DObject(hitPageObj)){
//START TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
if(CONTENTVIEW_EVENTS.isPageTransition){
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._isClick = true;
}
else{
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchStart_MouseDown;
CONTENTVIEW_3D._curr3dObject = hitPageObj;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchStart_MouseDown;
CONTENTVIEW_3D._curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
CONTENTVIEW_EVENTS._3dAnimate = true;
CONTENTVIEW_EVENTS._isClick = false;
......@@ -1584,18 +1584,18 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
//END TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
}
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._isClick = true;
}
}
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._isClick = true;
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
}
else if(CONTENTVIEW.userScale != 1){
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
//CONTENTVIEW_GENERAL.px = evt.pageX;
//CONTENTVIEW_GENERAL.py = evt.pageY;
//試験
......@@ -1604,14 +1604,14 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
}
else {
//ここにこない
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
}
}
//set begin value for zoom
if(touch1 && touch2) {
CONTENTVIEW_GENERAL._lastDist = CONTENTVIEW_EVENTS.getDistance({
CONTENTVIEW_GENERAL._lastDist = CONTENTVIEW_EVENTS.getDistance({
x: touch1.clientX,
y: touch1.clientY
}, {
......@@ -1643,18 +1643,18 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
//evt.pointerType は IE以外 undef
switch (evt.pointerType) {
case evt.MSPOINTER_TYPE_TOUCH:
CONTENTVIEW_EVENTS._isTouching = true;
CONTENTVIEW_EVENTS._isTouching = true;
break;
case evt.MSPOINTER_TYPE_PEN:
bContinue = false;
break;
case evt.MSPOINTER_TYPE_MOUSE:
CONTENTVIEW_EVENTS._isTouching = false;
CONTENTVIEW_EVENTS._isTouching = false;
bContinue = false;
break;
}
} else {
CONTENTVIEW_EVENTS._isTouching = true;
CONTENTVIEW_EVENTS._isTouching = true;
}
if(!bContinue){
......@@ -1666,9 +1666,9 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
evt.stopPropagation();
}
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
// CONTENTVIEW_EVENTS.TouchmoveCount = CONTENTVIEW_EVENTS.TouchmoveCount + 1;
//}
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
// CONTENTVIEW_EVENTS.TouchmoveCount = CONTENTVIEW_EVENTS.TouchmoveCount + 1;
//}
var touch1 = null;
var touch2 = null;
......@@ -1678,7 +1678,7 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
//move page case
//when change from zoom mode
if(CONTENTVIEW.userScale != 1){
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
//START TRB00097
CONTENTVIEW.cancelClick = true;
//END TRB00097
......@@ -1705,11 +1705,11 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
// store current mouse point
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() == false && CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid() == false) {
CONTENTVIEW_GENERAL.px = evt.pageX;
CONTENTVIEW_GENERAL.py = evt.pageY;
CONTENTVIEW_GENERAL.px = evt.pageX;
CONTENTVIEW_GENERAL.py = evt.pageY;
} else {
CONTENTVIEW_GENERAL.px = evt.targetTouches[0].pageX;
CONTENTVIEW_GENERAL.py = evt.targetTouches[0].pageY;
CONTENTVIEW_GENERAL.px = evt.targetTouches[0].pageX;
CONTENTVIEW_GENERAL.py = evt.targetTouches[0].pageY;
}
// redraw
......@@ -1719,32 +1719,32 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
}
else{
if(CONTENTVIEW_EVENTS._3dAnimate){
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
var imagePt = CONTENTVIEW.screenToImage(evt.pageX, evt.pageY);
var hitObj = CONTENTVIEW_GETDATA.getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if(hitObj){
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchMove_MouseMove;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchMove_MouseMove;
hitObj.action(imagePt);
}
}
else{
CONTENTVIEW_GENERAL._isPageNaviTouch = true;
CONTENTVIEW_GENERAL._isPageNaviTouch = true;
//Detect is page transition to prevent 3d object animate
var posDiffX = evt.clientX - CONTENTVIEW_EVENTS.touchDownFirstPosX ;
var posDiffY = evt.clientY - CONTENTVIEW_EVENTS.touchDownFirstPosY ;
if(Math.abs(posDiffX) < CONTENTVIEW_EVENTS.clickLimitArea && Math.abs(posDiffY) < CONTENTVIEW_EVENTS.clickLimitArea){
CONTENTVIEW_EVENTS.isPageTransition = false;
CONTENTVIEW_EVENTS.isPreventClick = false;
CONTENTVIEW_EVENTS.isPageTransition = false;
CONTENTVIEW_EVENTS.isPreventClick = false;
}
else{
CONTENTVIEW_EVENTS.isPageTransition = true;
CONTENTVIEW_EVENTS.isPageTransition = true;
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
//Prevent CLick when page is being transit
CONTENTVIEW_EVENTS.isPreventClick = true;
CONTENTVIEW_EVENTS.isPreventClick = true;
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
}
......@@ -1762,11 +1762,11 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
var temp = CONTENTVIEW_GENERAL._startPoints[0];
// set first and last Pos
if(CONTENTVIEW_GENERAL._touchFirstPos == null){
CONTENTVIEW_GENERAL._touchFirstPos = {x:temp.clientX, y: temp.clientX};
CONTENTVIEW_GENERAL._touchFirstPos = {x:temp.clientX, y: temp.clientX};
CONTENTVIEW_GENERAL._moveNum = 0;
}
if(CONTENTVIEW_GENERAL._touchLastPos==null){
CONTENTVIEW_GENERAL._touchLastPos = {x:temp.clientX, y: temp.clientX};
CONTENTVIEW_GENERAL._touchLastPos = {x:temp.clientX, y: temp.clientX};
}
}
}
......@@ -1774,10 +1774,10 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
else if(CONTENTVIEW_GENERAL._startPoints.length == 2){
//zoom page case
CONTENTVIEW_GENERAL._isPageZoomTouch = true;
CONTENTVIEW_GENERAL._isPageZoomTouch = true;
//rest navi touch if active
if(CONTENTVIEW_GENERAL._isPageNaviTouch){
CONTENTVIEW_EVENTS.resetNaviAction();
CONTENTVIEW_EVENTS.resetNaviAction();
}
//console.log("zoom page case");
......@@ -1796,7 +1796,7 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
// in this case do nothing and go to get next pointerId
return;
}else if(touch1.pointerId > evt.pointerId){
CONTENTVIEW_GENERAL._bufferPoints = []; // reset buffer to get pointerId with correct order from begin
CONTENTVIEW_GENERAL._bufferPoints = []; // reset buffer to get pointerId with correct order from begin
return;
}
touch2 = {clientX: evt.clientX, clientY: evt.clientY, pointerId: evt.pointerId};
......@@ -1808,11 +1808,11 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
else {
//reset navi touch if active
if(CONTENTVIEW_GENERAL._isPageNaviTouch){
CONTENTVIEW_EVENTS.resetNaviAction();
CONTENTVIEW_EVENTS.resetNaviAction();
}
if(CONTENTVIEW_GENERAL._isPageZoomTouch){
CONTENTVIEW_EVENTS.resetZoomAction();
CONTENTVIEW_EVENTS.resetZoomAction();
}
return;
}
......@@ -1830,17 +1830,17 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
// zoom page case
if(CONTENTVIEW_GENERAL._isPageZoomTouch) {
CONTENTVIEW_EVENTS.processZoomPage(touch1, touch2);
CONTENTVIEW_EVENTS.processZoomPage(touch1, touch2);
}
}
else{
//CONTENTVIEW_EVENTS._isClick = false;
//CONTENTVIEW_EVENTS._isClick = false;
// for android or ipad
touch1 = evt.touches[0];
touch2 = evt.touches[1];
if( touch2 != null ){
CONTENTVIEW_EVENTS._isClick = false;
CONTENTVIEW_EVENTS._isClick = false;
}
if(CONTENTVIEW_EVENTS._3dAnimate){
......@@ -1850,13 +1850,13 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
//START TRB00090 - Editor: Long - Date 09/30/2013 - Summary: Fix animate 3d object in ipad
if(hitObj){
if(CONTENTVIEW.is3DObject(hitObj)){
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchMove_MouseMove;
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchMove_MouseMove;
hitObj.action(imagePt);
}
}
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._3dAnimate = false;
//CONTENTVIEW_GENERAL._isPageNaviTouch = true;
}
//END TRB00090 - Editor: Long - Date 09/30/2013 - Summary: Fix animate 3d object in ipad
......@@ -1864,7 +1864,7 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
else{
//update last touch position
if(touch2 == null && CONTENTVIEW_GENERAL._isPageNaviTouch){
CONTENTVIEW_EVENTS.isPageTransition = true;
CONTENTVIEW_EVENTS.isPageTransition = true;
currPos = {x:touch1.clientX, y: touch1.clientY};
if(!CONTENTVIEW_EVENTS._transitionObject.processNaviPage(currPos)){
......@@ -1900,17 +1900,17 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
CONTENTVIEW_GENERAL.px = evt.targetTouches[0].pageX;
CONTENTVIEW_GENERAL.py = evt.targetTouches[0].pageY;
// redraw
CONTENTVIEW.flip();
CONTENTVIEW.zoomVideo();
CONTENTVIEW.closeDialogPopUpText();
// redraw
CONTENTVIEW.flip();
CONTENTVIEW.zoomVideo();
CONTENTVIEW.closeDialogPopUpText();
}
}
// zoom page case
if(touch1 && touch2) {
CONTENTVIEW_EVENTS.processZoomPage(touch1, touch2);
CONTENTVIEW_EVENTS.processZoomPage(touch1, touch2);
}
}
}
......@@ -1932,20 +1932,20 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
//evt.pointerType は IE以外 undef
switch (evt.pointerType) {
case evt.MSPOINTER_TYPE_TOUCH:
CONTENTVIEW_EVENTS._isTouching = true;
CONTENTVIEW_EVENTS._isTouching = true;
break;
case evt.MSPOINTER_TYPE_PEN:
CONTENTVIEW_EVENTS._isTouching = false;
CONTENTVIEW_EVENTS._isTouching = false;
bContinue = false;
break;
case evt.MSPOINTER_TYPE_MOUSE:
CONTENTVIEW_EVENTS._isTouching = false;
CONTENTVIEW_EVENTS._isTouching = false;
bContinue = false;
break;
}
} else {
//タッチ操作終了
CONTENTVIEW_EVENTS._isTouching = false;
CONTENTVIEW_EVENTS._isTouching = false;
}
if(!bContinue){
......@@ -1962,17 +1962,17 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
if(CONTENTVIEW_GENERAL._bWin8TouchEnabled){
// reset all flag
CONTENTVIEW_GENERAL._startPoints = [];
CONTENTVIEW_GENERAL._bufferPoints = [];
CONTENTVIEW_GENERAL._startPoints = [];
CONTENTVIEW_GENERAL._bufferPoints = [];
if(CONTENTVIEW_EVENTS._3dAnimate == true){
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchEnd_MouseUp;
CONTENTVIEW_3D._curr3dObject.action();
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchEnd_MouseUp;
CONTENTVIEW_3D._curr3dObject.action();
}
if(CONTENTVIEW_EVENTS.isPageTransition){
CONTENTVIEW_EVENTS.isPageTransition = false;
CONTENTVIEW_EVENTS.isPageTransition = false;
CONTENTVIEW_EVENTS.touchDownFirstPosX = 0;
CONTENTVIEW_EVENTS.touchDownFirstPosY = 0;
}
......@@ -1982,27 +1982,27 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
//move page if enough condition
if(CONTENTVIEW_GENERAL._bTransitionEnable){
if(CONTENTVIEW_GENERAL._isPageNaviTouch){
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
//calculate time period from last time of touchstart event
var currDate = new Date();
var period = currDate - CONTENTVIEW_GENERAL.touchStartedTime;
if(period >= CONTENTVIEW_GENERAL._touchMoveTimePeriod && period < CONTENTVIEW_GENERAL._touchMoveTimePeriodInvalid){
CONTENTVIEW_GENERAL.touchStartedTime= 0;
CONTENTVIEW_GENERAL.touchStartedTime= 0;
if(CONTENTVIEW_GENERAL._moveNum == 2){
CONTENTVIEW_EVENTS.nextPage_click();
//変数後始末
CONTENTVIEW_EVENTS.nextPage_click();
//変数後始末
CONTENTVIEW.cancelClick = false;
CONTENTVIEW_EVENTS._isClick = false;
return;
return;
}else if (CONTENTVIEW_GENERAL._moveNum == -2){
CONTENTVIEW_EVENTS.prevPage_click();
//変数後始末
CONTENTVIEW_EVENTS.prevPage_click();
//変数後始末
CONTENTVIEW.cancelClick = false;
CONTENTVIEW_EVENTS._isClick = false;
return;
return;
}else {
CONTENTVIEW_GETDATA.correctCanvasPosition();
CONTENTVIEW_GETDATA.correctCanvasPosition();
}
}
}
......@@ -2012,11 +2012,11 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
if(CONTENTVIEW_EVENTS._isClick == true){
if(CONTENTVIEW_GENERAL.isLoadingObject){
CONTENTVIEW_EVENTS._isClick = false;
CONTENTVIEW_EVENTS._isClick = false;
return;
}
else{
CONTENTVIEW.cancelClick = false;
CONTENTVIEW.cancelClick = false;
}
if (!CONTENTVIEW.cancelClick) {
......@@ -2029,7 +2029,7 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
if ((CONTENTVIEW_EVENTS._touchPageX - CONTENTVIEW.marginX) >= CONTENTVIEW.destRect.left && (CONTENTVIEW_EVENTS._touchPageX - CONTENTVIEW.marginX) <= CONTENTVIEW.destRect.right) {
if (ClientData.IsAddingMemo() == true) {
if (!ClientData.memo_copyText()) {
CONTENTVIEW_MEMO.AddMemo(CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_EVENTS._touchPageX, CONTENTVIEW_EVENTS._touchPageY, function () {
CONTENTVIEW_MEMO.AddMemo(CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_EVENTS._touchPageX, CONTENTVIEW_EVENTS._touchPageY, function () {
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
......@@ -2044,7 +2044,7 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
}
else {
if (CONTENTVIEW_GENERAL.typeSelectMemo == 1) { /* add new */
CONTENTVIEW_MEMO.AddMemo(CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_GENERAL.posXPopupMemo, CONTENTVIEW_GENERAL.posYPopupMemo, function () {
CONTENTVIEW_MEMO.AddMemo(CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_GENERAL.posXPopupMemo, CONTENTVIEW_GENERAL.posYPopupMemo, function () {
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
......@@ -2058,7 +2058,7 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
});
} else if (CONTENTVIEW_GENERAL.typeSelectMemo == 2) { /* copy */
CONTENTVIEW_MEMO.CopyMemo(ClientData.memo_copyText(), CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_GENERAL.posXPopupMemo, CONTENTVIEW_GENERAL.posYPopupMemo, function () {
CONTENTVIEW_MEMO.CopyMemo(ClientData.memo_copyText(), CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_GENERAL.posXPopupMemo, CONTENTVIEW_GENERAL.posYPopupMemo, function () {
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
......@@ -2077,18 +2077,18 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
var isClickMemo = false;
if (CONTENTVIEW_GENERAL.isOpenPopUpText == true) {
CONTENTVIEW_GENERAL.isOpenPopUpText = false;
CONTENTVIEW_POPUPTEXT.ClosePopupText();
CONTENTVIEW_GENERAL.isOpenPopUpText = false;
CONTENTVIEW_POPUPTEXT.ClosePopupText();
}
if (CONTENTVIEW_GENERAL.isOpenPopUpMemo == true) {
CONTENTVIEW_GENERAL.isOpenPopUpMemo = false;
CONTENTVIEW_GENERAL.isOpenPopUpMemo = false;
$("#pop_up_memo").hide();
}
/* click memo edit */
if (ClientData.IsDisplayMemo() == true) {
CONTENTVIEW_GETDATA.getAllMemoOfPage();
CONTENTVIEW_GETDATA.getAllMemoOfPage();
/* check exist object memo in mouse position */
for (var nIndex = 0; nIndex < CONTENTVIEW_CREATEOBJECT.memoObjects.length; nIndex++) {
var hitPageObjMemo = CONTENTVIEW_CREATEOBJECT.memoObjects[nIndex];
......@@ -2097,7 +2097,7 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
//hitPageObjMemo.action();
/* save object memo */
CONTENTVIEW_GENERAL.objEditMemo = hitPageObjMemo;
CONTENTVIEW_GENERAL.objEditMemo = hitPageObjMemo;
var posMemoX = CONTENTVIEW_EVENTS._touchPageX;
var posMemoY = CONTENTVIEW_EVENTS._touchPageY;
......@@ -2160,19 +2160,19 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
//}
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() == false && CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid() == false) {
/* area next and prev page */
var cwMain = $('#main').width();
if (CONTENTVIEW_EVENTS._touchPageX > 0 && CONTENTVIEW_EVENTS._touchPageX < 300) {
CONTENTVIEW_EVENTS.prevPage_click();
} else if (CONTENTVIEW_EVENTS._touchPageX > (cwMain - 300) && CONTENTVIEW_EVENTS._touchPageX < cwMain) {
CONTENTVIEW_EVENTS.nextPage_click();
}
/* area next and prev page */
var cwMain = $('#main').width();
if (CONTENTVIEW_EVENTS._touchPageX > 0 && CONTENTVIEW_EVENTS._touchPageX < 300) {
CONTENTVIEW_EVENTS.prevPage_click();
} else if (CONTENTVIEW_EVENTS._touchPageX > (cwMain - 300) && CONTENTVIEW_EVENTS._touchPageX < cwMain) {
CONTENTVIEW_EVENTS.nextPage_click();
}
}
//CONTENTVIEW_STREAMING.debugLog("CONTENTVIEW_EVENTS.onTouchEnd");
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isMobile()) {
CONTENTVIEW.handleDisplayMobileToolbar();
}
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isMobile()) {
CONTENTVIEW.handleDisplayMobileToolbar();
}
}
}
}
......@@ -2191,12 +2191,12 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() == false && CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid() == false) {
var cwMain = $('#main').width();
if (CONTENTVIEW_EVENTS._touchPageX > 0 && CONTENTVIEW_EVENTS._touchPageX < 300) {
CONTENTVIEW_EVENTS.prevPage_click();
} else if (CONTENTVIEW_EVENTS._touchPageX > (cwMain - 300) && CONTENTVIEW_EVENTS._touchPageX < cwMain) {
CONTENTVIEW_EVENTS.nextPage_click();
}
var cwMain = $('#main').width();
if (CONTENTVIEW_EVENTS._touchPageX > 0 && CONTENTVIEW_EVENTS._touchPageX < 300) {
CONTENTVIEW_EVENTS.prevPage_click();
} else if (CONTENTVIEW_EVENTS._touchPageX > (cwMain - 300) && CONTENTVIEW_EVENTS._touchPageX < cwMain) {
CONTENTVIEW_EVENTS.nextPage_click();
}
//}
}
}
......@@ -2207,13 +2207,13 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
else{
//Do nothing
if(CONTENTVIEW_EVENTS._3dAnimate == true){
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchEnd_MouseUp;
CONTENTVIEW_3D._curr3dObject.action();
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchEnd_MouseUp;
CONTENTVIEW_3D._curr3dObject.action();
}
if(CONTENTVIEW_EVENTS.isPageTransition){
CONTENTVIEW_EVENTS.isPageTransition = false;
CONTENTVIEW_EVENTS.isPageTransition = false;
}
}
};
......@@ -2231,12 +2231,12 @@ CONTENTVIEW_EVENTS.processZoomPage = function(touch1, touch2){
if(CONTENTVIEW_GENERAL._lastDist != dist) {
if(dist > CONTENTVIEW_GENERAL._lastDist){
CONTENTVIEW.userScale += 0.05;
CONTENTVIEW.userScale += 0.05;
if (CONTENTVIEW.userScale > 4) {
CONTENTVIEW.userScale = 4;
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
CONTENTVIEW.userScale = 4;
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
}else {
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
CONTENTVIEW.flip();
//Start Function : No.4 - Editor : Long - Date : 08/13/2013 - Summary : Fix for zooming
......@@ -2261,13 +2261,13 @@ CONTENTVIEW_EVENTS.processZoomPage = function(touch1, touch2){
}
else if (dist < CONTENTVIEW_GENERAL._lastDist)
{
CONTENTVIEW.userScale -= 0.05;
CONTENTVIEW.userScale -= 0.05;
if (CONTENTVIEW.userScale < 1) {
CONTENTVIEW.userScale = 1;
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
CONTENTVIEW.userScale = 1;
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
}else{
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
CONTENTVIEW.flip();
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
CONTENTVIEW.flip();
//Start Function : No.4 - Editor : Long - Date : 08/13/2013 - Summary : Fix for zooming
if(CONTENTVIEW_GETDATA.getPageIndex() < CONTENTVIEW_GENERAL.totalPage - 1){
//START TRB00097
......@@ -2318,23 +2318,23 @@ CONTENTVIEW_EVENTS.processNaviPage = function(currPos){
//examinate direction
if(CONTENTVIEW_GENERAL._moveNum==0 && lMoveX < 0){
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left => next page
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left => next page
}
if(CONTENTVIEW_GENERAL._moveNum==2 && lMoveX > 0){
CONTENTVIEW_GENERAL._moveNum = 1; // go from right to left and back to right => no move
CONTENTVIEW_GENERAL._moveNum = 1; // go from right to left and back to right => no move
}
if(CONTENTVIEW_GENERAL._moveNum==1 && lMoveX < 0){
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left + back to right + go to left => next page
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left + back to right + go to left => next page
}
if(CONTENTVIEW_GENERAL._moveNum==0 && lMoveX > 0){
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right=> priveous page
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right=> priveous page
}
if(CONTENTVIEW_GENERAL._moveNum==-2 && lMoveX < 0){
CONTENTVIEW_GENERAL._moveNum = -1; // go from left to right and back to left => no move
CONTENTVIEW_GENERAL._moveNum = -1; // go from left to right and back to left => no move
}
if(CONTENTVIEW_GENERAL._moveNum==0 && lMoveX > 0){
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right + back to left + go to right=> priveous page
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right + back to left + go to right=> priveous page
}
//console.log("_moveNum:" +CONTENTVIEW_GENERAL._moveNum);
......@@ -2381,23 +2381,23 @@ TransitionObject.prototype.processNaviPage = function (currPos) {
}
//examinate direction
if(CONTENTVIEW_GENERAL._moveNum==0 && lMoveX < 0){
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left => next page
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left => next page
}
if(CONTENTVIEW_GENERAL._moveNum==2 && lMoveX > 0){
CONTENTVIEW_GENERAL._moveNum = 1; // go from right to left and back to right => no move
CONTENTVIEW_GENERAL._moveNum = 1; // go from right to left and back to right => no move
}
if(CONTENTVIEW_GENERAL._moveNum==1 && lMoveX < 0){
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left + back to right + go to left => next page
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left + back to right + go to left => next page
}
if(CONTENTVIEW_GENERAL._moveNum==0 && lMoveX > 0){
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right=> priveous page
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right=> priveous page
}
if(CONTENTVIEW_GENERAL._moveNum==-2 && lMoveX < 0){
CONTENTVIEW_GENERAL._moveNum = -1; // go from left to right and back to left => no move
CONTENTVIEW_GENERAL._moveNum = -1; // go from left to right and back to left => no move
}
if(CONTENTVIEW_GENERAL._moveNum==0 && lMoveX > 0){
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right + back to left + go to right=> priveous page
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right + back to left + go to right=> priveous page
}
//console.log("_moveNum:" +CONTENTVIEW_GENERAL._moveNum);
......@@ -2414,31 +2414,31 @@ TransitionObject.prototype.processNaviPage = function (currPos) {
CONTENTVIEW_EVENTS._transitionObject = new TransitionObject();
$(function () {
//CONTENTVIEW_EVENTS.ready();
//CONTENTVIEW_EVENTS.ready();
});
CONTENTVIEW_EVENTS.ready = function(){
CONTENTVIEW_EVENTS.altMode = false;
//limit area to detech if it is click(on win8)
CONTENTVIEW_EVENTS.clickLimitArea = 20;
//touch position
CONTENTVIEW_EVENTS.touchDownFirstPosX = 0;
CONTENTVIEW_EVENTS.touchDownFirstPosY = 0;
//position for click event on touch device
CONTENTVIEW_EVENTS._touchPageX = 0;
CONTENTVIEW_EVENTS._touchPageY = 0;
//Detect touch
CONTENTVIEW_EVENTS._isTouching = false;
//Detect click on touch device
CONTENTVIEW_EVENTS._isClick = false;
//Detech if page is being transition
CONTENTVIEW_EVENTS.isPageTransition = false;
//Is 3d animating
CONTENTVIEW_EVENTS._3dAnimate = false;
//is prevent click event
CONTENTVIEW_EVENTS.isPreventClick = false;
CONTENTVIEW_EVENTS.altMode = false;
//limit area to detech if it is click(on win8)
CONTENTVIEW_EVENTS.clickLimitArea = 20;
//touch position
CONTENTVIEW_EVENTS.touchDownFirstPosX = 0;
CONTENTVIEW_EVENTS.touchDownFirstPosY = 0;
//position for click event on touch device
CONTENTVIEW_EVENTS._touchPageX = 0;
CONTENTVIEW_EVENTS._touchPageY = 0;
//Detect touch
CONTENTVIEW_EVENTS._isTouching = false;
//Detect click on touch device
CONTENTVIEW_EVENTS._isClick = false;
//Detech if page is being transition
CONTENTVIEW_EVENTS.isPageTransition = false;
//Is 3d animating
CONTENTVIEW_EVENTS._3dAnimate = false;
//is prevent click event
CONTENTVIEW_EVENTS.isPreventClick = false;
};
......@@ -12,17 +12,17 @@ CONTENTVIEW_GETDATA.getURLPageImage = function(apiName) {
var url = ClientData.conf_apiUrl();
url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName + '/?isStreaming=' + isStreaming;
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
url = url + '&pid=' + CONTENTVIEW_GENERAL.pid;
url = url + '&pid=' + CONTENTVIEW_GENERAL.pid;
}
return url;
};
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex = function(contentData, nIndexPage) {
CONTENTVIEW_GENERAL.pageObjects = [];
CONTENTVIEW_GENERAL.pageObjects = [];
var currentPageObjects;
for (var nIndex = 0; nIndex < contentData.length; nIndex++) {
......@@ -335,7 +335,7 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
}
//END TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get
//CONTENTVIEW_STREAMING.debugLog("resourceUrl:" + obj.resourceUrl);
//CONTENTVIEW_STREAMING.debugLog("resourceUrl:" + obj.resourceUrl);
pageObject["imageUrl"] = AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
pageObject["resourceUrl"] = resourceUrl;
......@@ -824,21 +824,21 @@ CONTENTVIEW_GETDATA.getMediaType11 = function(iValueObj) {
CONTENTVIEW_GETDATA.getMediaType12 = function(iValueObj) {
var pageObject = [];
var pageObject = [];
//Get object Info
pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType12_" + iValueObj.mediaInfo.resourceId;
pageObject['actionType'] = iValueObj.action.actionType;
//Get object Info
pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType12_" + iValueObj.mediaInfo.resourceId;
pageObject['actionType'] = iValueObj.action.actionType;
//Get object Location
pageObject['x'] = iValueObj.location.x;
pageObject['y'] = iValueObj.location.y;
pageObject['width'] = iValueObj.location.width;
pageObject['height'] = iValueObj.location.height;
pageObject['visible'] = true;
//Get object Location
pageObject['x'] = iValueObj.location.x;
pageObject['y'] = iValueObj.location.y;
pageObject['width'] = iValueObj.location.width;
pageObject['height'] = iValueObj.location.height;
pageObject['visible'] = true;
//詳細ログ用
//詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
......@@ -846,11 +846,11 @@ CONTENTVIEW_GETDATA.getMediaType12 = function(iValueObj) {
}
if(iValueObj.action.actionType == 14){
var resourceId = iValueObj.mediaInfo.resourceId;
var resourceId = iValueObj.mediaInfo.resourceId;
pageObject["imageUrl"] = 'img/test.png';
pageObject["imageUrl"] = 'img/test.png';
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
pageObject["saveAs"] = iValueObj.action.saveAs;
pageObject["resourceId"] = resourceId;
......@@ -865,21 +865,21 @@ CONTENTVIEW_GETDATA.getMediaType12 = function(iValueObj) {
CONTENTVIEW_GETDATA.getMediaType13 = function(iValueObj) {
var pageObject = [];
var pageObject = [];
//Get object Info
pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType12_" + iValueObj.mediaInfo.resourceId;
pageObject['actionType'] = iValueObj.action.actionType;
//Get object Info
pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType12_" + iValueObj.mediaInfo.resourceId;
pageObject['actionType'] = iValueObj.action.actionType;
//Get object Location
pageObject['x'] = iValueObj.location.x;
pageObject['y'] = iValueObj.location.y;
pageObject['width'] = iValueObj.location.width;
pageObject['height'] = iValueObj.location.height;
pageObject['visible'] = true;
//Get object Location
pageObject['x'] = iValueObj.location.x;
pageObject['y'] = iValueObj.location.y;
pageObject['width'] = iValueObj.location.width;
pageObject['height'] = iValueObj.location.height;
pageObject['visible'] = true;
//詳細ログ用
//詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
......@@ -887,11 +887,11 @@ CONTENTVIEW_GETDATA.getMediaType13 = function(iValueObj) {
}
if(iValueObj.action.actionType == 15){
var resourceId = iValueObj.mediaInfo.resourceId;
var resourceId = iValueObj.mediaInfo.resourceId;
pageObject["imageUrl"] = 'img/quize.png';
pageObject["imageUrl"] = 'img/quize.png';
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
pageObject["saveAs"] = iValueObj.action.saveAs;
pageObject["resourceId"] = resourceId;
......@@ -981,7 +981,7 @@ CONTENTVIEW_GETDATA.getDataLoaded = function(data) {
/* insert if not exist */
if (isExist == false) {
CONTENTVIEW_GENERAL.arrThumbnailsLoaded.push(data[i]);
CONTENTVIEW_GENERAL.arrThumbnailsLoaded.push(data[i]);
}
}
......@@ -1018,14 +1018,14 @@ CONTENTVIEW_GETDATA.getBookmarklist = function(pos) {
$('#bookmarkBoxHdBM').html('<a id="bookmarkClosing" class="delete" > </a>');
//$("#bookmarkClosing").click(CONTENTVIEW_EVENTS.closeBookmarkBox);
$("#bookmarkClosing").on({
'click touchend': function(ev){
CONTENTVIEW_EVENTS.closeBookmarkBox(ev);
'click touchend': function(ev){
CONTENTVIEW_EVENTS.closeBookmarkBox(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
$('#bookmarkBoxHdBM').append(I18N.i18nText('txtShioriCtnLs'));
......@@ -1039,7 +1039,7 @@ CONTENTVIEW_GETDATA.getBookmarklist = function(pos) {
$("#divListBookmark").offset({ left: pos[0], top: (pos[1] + $('#bookmarkBoxHdBM').height()) });
}
else {
CONTENTVIEW.handleAPIWebContentPage(CONTENTVIEW_GENERAL.dataWebContentPage, pos)
CONTENTVIEW.handleAPIWebContentPage(CONTENTVIEW_GENERAL.dataWebContentPage, pos)
}
};
......@@ -1064,14 +1064,14 @@ CONTENTVIEW_GETDATA.getPageIndexJson = function(pos) {
//$("#indexClosing").click(CONTENTVIEW_EVENTS.closeIndexBox);
$("#indexClosing").on({
'click touchend': function(ev){
CONTENTVIEW_EVENTS.closeIndexBox(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
'click touchend': function(ev){
CONTENTVIEW_EVENTS.closeIndexBox(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
$('#indexBoxHdIndex').append(I18N.i18nText('txtIndex'));
......@@ -1132,14 +1132,14 @@ CONTENTVIEW_GETDATA.getPageIndexJson = function(pos) {
//$("#indexClosing").click(CONTENTVIEW_EVENTS.closeIndexBox);
$("#indexClosing").on({
'click touchend': function(ev){
CONTENTVIEW_EVENTS.closeIndexBox(ev);
'click touchend': function(ev){
CONTENTVIEW_EVENTS.closeIndexBox(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
}
});
$('#indexBoxHdIndex').append(I18N.i18nText('txtIndex'));
......@@ -1186,7 +1186,7 @@ CONTENTVIEW_GETDATA.getText = function() {
CONTENTVIEW_GETDATA.getContentID = function() {
/* init contentID */
if (ClientData.common_preContentId()) {
CONTENTVIEW_GENERAL.contentID = ClientData.common_preContentId();
CONTENTVIEW_GENERAL.contentID = ClientData.common_preContentId();
ClientData.common_preContentId(null);
} else if (ClientData.IsJumpBack() == true) {
var dataJump = ClientData.JumpQueue();
......@@ -1194,11 +1194,11 @@ CONTENTVIEW_GETDATA.getContentID = function() {
//ストリーミングならデバイスに通知
if(ClientData.isStreamingMode()){
CONTENTVIEW_STREAMING.moveContent(CONTENTVIEW_GENERAL.contentID);
CONTENTVIEW_STREAMING.moveContent(CONTENTVIEW_GENERAL.contentID);
}
} else {
CONTENTVIEW_GENERAL.contentID = ClientData.contentInfo_contentId();
CONTENTVIEW_GENERAL.contentID = ClientData.contentInfo_contentId();
}
};
......@@ -1213,8 +1213,8 @@ CONTENTVIEW_GETDATA.getContentInfoTypeImage = function(){
var resourceUrl = CONTENTVIEW.downloadResourceById(CONTENTVIEW_GENERAL.contentID);
CONTENTVIEW_GENERAL.resourceImage.onload = function(){
CONTENTVIEW_GENERAL.widthContentImage = CONTENTVIEW_GENERAL.resourceImage.width;
CONTENTVIEW_GENERAL.heightContentImage = CONTENTVIEW_GENERAL.resourceImage.height;
CONTENTVIEW_GENERAL.widthContentImage = CONTENTVIEW_GENERAL.resourceImage.width;
CONTENTVIEW_GENERAL.heightContentImage = CONTENTVIEW_GENERAL.resourceImage.height;
CONTENTVIEW_GETDATA.getContent().setPageImages(1, resourceUrl).setUpPage(0);
CONTENTVIEW.handleSliderBar();
......@@ -1272,10 +1272,10 @@ CONTENTVIEW_GETDATA.getContentInfoTypeImage = function(){
if (COMMON.isTouchDevice() == true) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
CONTENTVIEW_GENERAL.standardRatio = document.documentElement.clientWidth / window.innerWidth;
CONTENTVIEW_GENERAL.standardRatio = document.documentElement.clientWidth / window.innerWidth;
ZOOM_DETECTOR.startDetectZoom({ time: 500,
callbackFunction: function (oldRatio, newRatio, oldW, oldH, newW, newH) {
CONTENTVIEW_GENERAL.currentRatio = newRatio;
CONTENTVIEW_GENERAL.currentRatio = newRatio;
}
});
......@@ -1302,9 +1302,9 @@ CONTENTVIEW_GETDATA.getContentDataForImageType = function(){
};
CONTENTVIEW_CALLAPI.abapi('webGetContent', params, 'GET', function (data) {
CONTENTVIEW_GENERAL.imageTypeData = data.contentData;
CONTENTVIEW_GENERAL.imageTypeData = data.contentData;
//Set default page No to image Type
CONTENTVIEW_GENERAL.imageTypeData["pageNo"] = 1;
CONTENTVIEW_GENERAL.imageTypeData["pageNo"] = 1;
document.title = data.contentData.contentName + ' | ' + I18N.i18nText('sysAppTitle');
});
......@@ -1318,7 +1318,7 @@ CONTENTVIEW_GETDATA.getContent = function() {
/* get all memo on page */
CONTENTVIEW_GETDATA.getAllMemoOfPage = function() {
if (ClientData.IsDisplayMemo() == true) {
CONTENTVIEW_CREATEOBJECT.memoObjects = [];
CONTENTVIEW_CREATEOBJECT.memoObjects = [];
/*get data memo */
var memoData = ClientData.MemoData();
......@@ -1353,11 +1353,11 @@ CONTENTVIEW_GETDATA.getAllMemoOfPage = function() {
};
CONTENTVIEW_GETDATA.getPosVideo = function(px, py, width, height, scale) {
CONTENTVIEW_GENERAL.pxVideo = px;
CONTENTVIEW_GENERAL.pyVideo = py;
CONTENTVIEW_GENERAL.wVideo = width;
CONTENTVIEW_GENERAL.hVideo = height;
CONTENTVIEW_GENERAL.videoScale = scale;
CONTENTVIEW_GENERAL.pxVideo = px;
CONTENTVIEW_GENERAL.pyVideo = py;
CONTENTVIEW_GENERAL.wVideo = width;
CONTENTVIEW_GENERAL.hVideo = height;
CONTENTVIEW_GENERAL.videoScale = scale;
};
//Start Function: No.4 - Editor : Long - Summary : Render Next Page Content
......@@ -1371,27 +1371,27 @@ CONTENTVIEW_GETDATA.renderNextPage = function(){
//Get next page background image
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){
//console.log("CONTENTVIEW_GETDATA.renderNextPage");
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
CONTENTVIEW_GENERAL.nextPageImage = data;
//console.log("CONTENTVIEW_GETDATA.renderNextPage");
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: CONTENTVIEW.getSessionId(), pageNo: pageNo },
function (data) {
CONTENTVIEW_GENERAL.nextPageImage = data;
CONTENTVIEW_GENERAL.nextContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.nextPageImage)
CONTENTVIEW_GENERAL.nextContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.nextPageImage)
.setPageObjects(CONTENTVIEW_GENERAL.nextPageObjects)
.nextPage();
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
);
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW_GENERAL.nextPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.nextContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.nextPageImage)
CONTENTVIEW_GENERAL.nextPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.nextContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.nextPageImage)
.setPageObjects(CONTENTVIEW_GENERAL.nextPageObjects)
.nextPage();
}
......@@ -1408,24 +1408,24 @@ CONTENTVIEW_GETDATA.renderPrevPage = function(){
//Get prev page background image
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){
//console.log("CONTENTVIEW_GETDATA.renderPrevPage");
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
CONTENTVIEW_GENERAL.prevPageImage = data;
CONTENTVIEW_GENERAL.prevContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.prevPageImage)
//console.log("CONTENTVIEW_GETDATA.renderPrevPage");
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: CONTENTVIEW.getSessionId(), pageNo: pageNo },
function (data) {
CONTENTVIEW_GENERAL.prevPageImage = data;
CONTENTVIEW_GENERAL.prevContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.prevPageImage)
.setPageObjects(CONTENTVIEW_GENERAL.prevPageObjects)
.previousPage();
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
);
}
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW_GENERAL.prevPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.prevContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.prevPageImage)
CONTENTVIEW_GENERAL.prevPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.prevContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.prevPageImage)
.setPageObjects(CONTENTVIEW_GENERAL.prevPageObjects)
.previousPage();
}
......@@ -1434,7 +1434,7 @@ CONTENTVIEW_GETDATA.renderPrevPage = function(){
//Get next page objects by page index
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndexPage) {
CONTENTVIEW_GENERAL.nextPageObjects = [];
CONTENTVIEW_GENERAL.nextPageObjects = [];
var currentPageObjects;
for (var nIndex = 0; nIndex < contentData.length; nIndex++) {
if (contentData[nIndex].page == nIndexPage) {
......@@ -1458,8 +1458,8 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex
/*get object page*/
if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
/*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType2(currentPageObjects[nIndex]);
/*add object to page */
......@@ -1497,14 +1497,14 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex
/*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 12) { /*mediaType = 12*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType12(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 13) { /*mediaType = 12*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType13(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
}
var pageObject = CONTENTVIEW_GETDATA.getMediaType12(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 13) { /*mediaType = 12*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType13(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
}
}
}
......@@ -1513,7 +1513,7 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex
//Get prev page objects by page index
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndexPage) {
CONTENTVIEW_GENERAL.prevPageObjects = [];
CONTENTVIEW_GENERAL.prevPageObjects = [];
var currentPageObjects;
for (var nIndex = 0; nIndex < contentData.length; nIndex++) {
......@@ -1537,8 +1537,8 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex
/*get object page*/
if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
/*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType2(currentPageObjects[nIndex]);
/*add object to page */
......@@ -1576,14 +1576,14 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex
/*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 12) { /*mediaType = 12*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType12(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 13) { /*mediaType = 12*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType13(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
}
var pageObject = CONTENTVIEW_GETDATA.getMediaType12(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 13) { /*mediaType = 12*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType13(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
}
}
}
......@@ -1682,7 +1682,7 @@ CONTENTVIEW_GETDATA.assignCurrentContentPage = function(nav){
if(nav == 1){
CONTENTVIEW_GENERAL.prevPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.prevPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.pageImages = CONTENTVIEW_GENERAL.nextPageImage;
CONTENTVIEW_GENERAL.prevContent.currentPage = CONTENTVIEW.content.currentPage;
......@@ -1702,7 +1702,7 @@ CONTENTVIEW_GETDATA.assignCurrentContentPage = function(nav){
}
else{
CONTENTVIEW_GENERAL.nextPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.nextPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.pageImages = CONTENTVIEW_GENERAL.prevPageImage;
CONTENTVIEW_GENERAL.nextContent.currentPage = CONTENTVIEW.content.currentPage;
......@@ -1733,7 +1733,7 @@ CONTENTVIEW_GETDATA.correctCanvasPosition = function(){
// Set default value for moving3D object to prevent other object fired when
//hold on 3d object and move next or prev page.
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._3dAnimate = false;
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide){
$('#canvasWrapper').css("left",'0px');
......@@ -1754,8 +1754,8 @@ CONTENTVIEW_GETDATA.correctCanvasPosition = function(){
//Get Page Transition configuration
CONTENTVIEW_GETDATA.getPageTransitionConfig = function(){
CONTENTVIEW_GENERAL.animateType = ClientData.userOpt_pageTransition();
CONTENTVIEW_GENERAL.animatePeriod = eval(ClientData.userOpt_pageTransitionPeriod()) * 1000;
CONTENTVIEW_GENERAL.animateType = ClientData.userOpt_pageTransition();
CONTENTVIEW_GENERAL.animatePeriod = eval(ClientData.userOpt_pageTransitionPeriod()) * 1000;
};
//End Function: No.4 - Editor : Long - Summary : Render Next Page Content
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -38,79 +38,79 @@
<![endif]-->
<script type="text/javascript">
$(document).ready(function(){
LOGIN.ready();
});
$(document).ready(function(){
LOGIN.ready();
});
</script>
</head>
<body id="login">
<div id="anonymous">
<img src="./abvw/img/login/logo_login.png" width="200" class="clearboth"/>
<img src="./abvw/img/login/logo_login.png" width="200" class="clearboth"/>
</div>
<div id="normalUser">
<!--
<div id="loader"><img src="./abvw/img/login/loading_icon.gif" width="200" height="200"></div>
<div id="fade"></div>
-->
<div class="wrapper">
<div id="main-ws">
<ul class="floatR" id="menu-language"><li class="language"><a id="language-ja"><img src="./abvw/img/common/flg_jpn.png" width="29" height="20"></a></li><li class="language"><a id="language-en"><img src="./abvw/img/common/flg_usa.png" width="29" height="20"></a></li><li class="language"><a id="language-ko"><img src="./abvw/img/common/flg_kor.png" width="29" height="20"></a></li></ul>
<article>
<img src="./abvw/img/login/logo_login.png" width="200" class="clearboth" id="logologin">
<section id="formlogin" style="display:none;">
<table width="440" border="0" cellspacing="0">
<tr>
<th width="33%" class="lang" lang="txtLoginAccPath">アカウントパス</th>
<td width="67%"><input type="text" id="txtAccPath" maxlength="60" /></td>
</tr>
<tr>
<th class="lang" lang="txtLoginId">ログインID</th>
<td><input type="text" id="txtAccId" maxlength="54" /></td>
</tr>
<tr>
<th class="lang" lang="txtLoginPwd">パスワード</th>
<td><input type="password" id="txtPassword"/></td>
</tr>
</table>
<p class="error lang" id="main-error-message" style="display:none;">パスワードまたはIDに誤りがあります</p>
<p class="memory"><input type="checkbox" id="chkRemember" /><label class="lang" lang="txtLoginPwdRbr" for="chkRemember">アカウントパスとログインIDを記憶する</label></p>
<a class="loginbtn lang" id="btnLogin" lang="dspLogin">ログイン</a>
</section>
</article>
</div>
</div>
<footer>
<div class="border">
<div class="cnt_footer">
COPYRIGHT &copy; 2014 AGENTEC Co., Ltd. ALL RIGHTS RESERVED.
</div>
</div>
</footer>
<!--
<div id="loader"><img src="./abvw/img/login/loading_icon.gif" width="200" height="200"></div>
<div id="fade"></div>
-->
<div class="wrapper">
<div id="main-ws">
<ul class="floatR" id="menu-language"><li class="language"><a id="language-ja"><img src="./abvw/img/common/flg_jpn.png" width="29" height="20"></a></li><li class="language"><a id="language-en"><img src="./abvw/img/common/flg_usa.png" width="29" height="20"></a></li><li class="language"><a id="language-ko"><img src="./abvw/img/common/flg_kor.png" width="29" height="20"></a></li></ul>
<article>
<img src="./abvw/img/login/logo_login.png" width="200" class="clearboth" id="logologin">
<section id="formlogin" style="display:none;">
<table width="440" border="0" cellspacing="0">
<tr>
<th width="33%" class="lang" lang="txtLoginAccPath">アカウントパス</th>
<td width="67%"><input type="text" id="txtAccPath" maxlength="60" /></td>
</tr>
<tr>
<th class="lang" lang="txtLoginId">ログインID</th>
<td><input type="text" id="txtAccId" maxlength="54" /></td>
</tr>
<tr>
<th class="lang" lang="txtLoginPwd">パスワード</th>
<td><input type="password" id="txtPassword"/></td>
</tr>
</table>
<p class="error lang" id="main-error-message" style="display:none;">パスワードまたはIDに誤りがあります</p>
<p class="memory"><input type="checkbox" id="chkRemember" /><label class="lang" lang="txtLoginPwdRbr" for="chkRemember">アカウントパスとログインIDを記憶する</label></p>
<a class="loginbtn lang" id="btnLogin" lang="dspLogin">ログイン</a>
</section>
</article>
</div>
</div>
<footer>
<div class="border">
<div class="cnt_footer">
COPYRIGHT &copy; 2014 AGENTEC Co., Ltd. ALL RIGHTS RESERVED.
</div>
</div>
</footer>
</div>
<section id="main-password-change" class="sectionchangepassword">
<h1 class="title lang" lang="msgChangePassword"><!--パスワードを変更してください。--></h1>
<span id="dialog-error-message" class="alertTxtDialog lang"></span>
<dl>
<dt class="lang" lang="txtPwdCurr"><!--旧パスワード:--></dt>
<dd><input type="password" id="txtCurrentPass" maxlength="16" /></dd>
</dl>
<dl>
<dt class="lang" lang="txtPwdNew"><!--旧パスワード:--></dt>
<dd><input type="password" id="txtNewPass" maxlength="16" /></dd>
</dl>
<dl>
<dt class="lang" lang="txtPwdNewRe"><!--新パスワード(確認):--></dt>
<dd><input type="password" id="txtConfirmNew" maxlength="16" /></dd>
</dl>
<p class="lang" lang="txtPwdRemind" id="txtPwdRemind"><!--※スキップを選択すると、30日間このメッセージは表示されません--></p>
<p class="loginbtn">
<a class="skip lang" id="btnSkip" lang="dspSkip"><!--スキップ--></a>
<a class="change lang" id="btnChange" lang="dspChange"><!--変更--></a>
</p>
<h1 class="title lang" lang="msgChangePassword"><!--パスワードを変更してください。--></h1>
<span id="dialog-error-message" class="alertTxtDialog lang"></span>
<dl>
<dt class="lang" lang="txtPwdCurr"><!--旧パスワード:--></dt>
<dd><input type="password" id="txtCurrentPass" maxlength="16" /></dd>
</dl>
<dl>
<dt class="lang" lang="txtPwdNew"><!--旧パスワード:--></dt>
<dd><input type="password" id="txtNewPass" maxlength="16" /></dd>
</dl>
<dl>
<dt class="lang" lang="txtPwdNewRe"><!--新パスワード(確認):--></dt>
<dd><input type="password" id="txtConfirmNew" maxlength="16" /></dd>
</dl>
<p class="lang" lang="txtPwdRemind" id="txtPwdRemind"><!--※スキップを選択すると、30日間このメッセージは表示されません--></p>
<p class="loginbtn">
<a class="skip lang" id="btnSkip" lang="dspSkip"><!--スキップ--></a>
<a class="change lang" id="btnChange" lang="dspChange"><!--変更--></a>
</p>
</section>
</body>
......
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