Commit 5224d11b by Motohisa Nakano

20121214

parent f2a72203
...@@ -3,7 +3,11 @@ ...@@ -3,7 +3,11 @@
margin: 0; margin: 0;
list-style: none; list-style: none;
} }
.treeview
{
white-space: nowrap;
overflow-x: auto;
}
.treeview ul { .treeview ul {
background-color: white; background-color: white;
margin-top: 4px; margin-top: 4px;
......
...@@ -88,6 +88,8 @@ var ScreenIds = { ...@@ -88,6 +88,8 @@ var ScreenIds = {
}; };
var Keys = { var Keys = {
zoom_ratioPre: 'zoom_ratioPre',
IsRefresh: 'IsRefresh', IsRefresh: 'IsRefresh',
// Local // Local
BookmarkScreen: 'BookmarkScreen', BookmarkScreen: 'BookmarkScreen',
...@@ -267,8 +269,6 @@ var Keys = { ...@@ -267,8 +269,6 @@ var Keys = {
sortOpt_searchDivision: 'sortOpt_searchDivision', sortOpt_searchDivision: 'sortOpt_searchDivision',
// Local: 並び順(sortOpt)_ソート方法:Interger(1:タイトル名, 2:タイトル名(かな), 3:公開順) // Local: 並び順(sortOpt)_ソート方法:Interger(1:タイトル名, 2:タイトル名(かな), 3:公開順)
sortOpt_sortType: 'sortOpt_sortType', sortOpt_sortType: 'sortOpt_sortType',
// Local :しおりデータ(bookmark)_コンテンツID:Interger
bookmark_contentNo: 'bookmark_contentNo',
// Local :しおりデータ(bookmark)_ページNo:Interger // Local :しおりデータ(bookmark)_ページNo:Interger
bookmark_pageNo: 'bookmark_pageNo', bookmark_pageNo: 'bookmark_pageNo',
// Local :メモデータ(memo)_コンテンツID:Interger // Local :メモデータ(memo)_コンテンツID:Interger
...@@ -483,7 +483,20 @@ function operateData(args, strKey, returnDefaultData) { ...@@ -483,7 +483,20 @@ function operateData(args, strKey, returnDefaultData) {
} }
} }
var ClientData = { var ClientData = {
zoom_ratioPre: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(Keys.zoom_ratioPre, JSON.stringify(data));
} else {
if (SessionStorageUtils.get(Keys.zoom_ratioPre) != 'undefined'
&& SessionStorageUtils.get(Keys.zoom_ratioPre) != undefined
&& SessionStorageUtils.get(Keys.zoom_ratioPre) != ''
&& SessionStorageUtils.get(Keys.zoom_ratioPre) != null
&& SessionStorageUtils.get(Keys.zoom_ratioPre) != 'null') {
return JSON.parse(SessionStorageUtils.get(Keys.zoom_ratioPre));
}
return 1;
}
},
// Local :ユーザ情報(userInfo)_アカウントパス:String // Local :ユーザ情報(userInfo)_アカウントパス:String
userInfo_accountPath: function (data) { userInfo_accountPath: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
...@@ -893,17 +906,6 @@ var ClientData = { ...@@ -893,17 +906,6 @@ var ClientData = {
return operateData(arguments, Keys.sortOpt_sortType, undefined); return operateData(arguments, Keys.sortOpt_sortType, undefined);
} }
}, },
// Local :しおりデータ(bookmark)_コンテンツID:Interger
bookmark_contentNo: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.bookmark_contentNo, undefined);
}
else {
return operateData(arguments, Keys.bookmark_contentNo, undefined);
}
},
// Local :しおりデータ(bookmark)_ページNo:Interger // Local :しおりデータ(bookmark)_ページNo:Interger
bookmark_pageNo: function (data) { bookmark_pageNo: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
...@@ -1851,15 +1853,25 @@ function unlockFunction(inputPass) { ...@@ -1851,15 +1853,25 @@ function unlockFunction(inputPass) {
} }
}, },
function (xhr, statusText, errorThrown) { function (xhr, statusText, errorThrown) {
errorCode = JSON.parse(xhr.responseText); if (xhr.responseText && xhr.status != 0) {
errorCode = JSON.parse(xhr.responseText);
}
else {
// System error
showSystemError();
}
}); });
// Check error
if (avwHasError()) {
return;
}
if (result == true) { if (result == true) {
if(window.onUnlock) { if (window.onUnlock) {
onUnlock(); onUnlock();
} }
} }
return { 'result' : result, 'errorCode' : errorCode }; return { 'result': result, 'errorCode': errorCode };
} }
...@@ -1945,12 +1957,19 @@ function RegisterLog() { ...@@ -1945,12 +1957,19 @@ function RegisterLog() {
} }
avwCmsApiSync(ClientData.userInfo_accountPath(), "contentReadingLog", 'get', params, avwCmsApiSync(ClientData.userInfo_accountPath(), "contentReadingLog", 'get', params,
null, null,
function (a, b, c) { function (xhr, b, c) {
isError = true; if (xhr.status != 0) {
isError = true;
}
else {
showSystemError();
}
}); });
}; };
if (avwHasError()) {
// Clear logs in local return;
}
// Clear logs in local
if (!isError) { if (!isError) {
ClientData.ContentLogData([]); ClientData.ContentLogData([]);
} }
......
...@@ -7,7 +7,7 @@ var zoom_miliSeconds = 1000; // Default is 1 second ...@@ -7,7 +7,7 @@ var zoom_miliSeconds = 1000; // Default is 1 second
var zoom_oldW = -1; var zoom_oldW = -1;
var zoom_oldH = -1; var zoom_oldH = -1;
function calculateZoomLevel() { function calculateZoomLevel() {
zoom_ratioPre = ClientData.zoom_ratioPre();
if (zoom_timer) { if (zoom_timer) {
clearTimeout(zoom_timer); clearTimeout(zoom_timer);
zoom_timer = null; zoom_timer = null;
...@@ -25,6 +25,7 @@ function calculateZoomLevel() { ...@@ -25,6 +25,7 @@ function calculateZoomLevel() {
zoom_callbackFunction(zoom_ratioPre, zoom_ratio, zoom_oldW, zoom_oldH, window.innerWidth, window.innerHeight); zoom_callbackFunction(zoom_ratioPre, zoom_ratio, zoom_oldW, zoom_oldH, window.innerWidth, window.innerHeight);
} }
zoom_ratioPre = zoom_ratio; zoom_ratioPre = zoom_ratio;
ClientData.zoom_ratioPre(zoom_ratioPre);
zoom_oldW = window.innerWidth; zoom_oldW = window.innerWidth;
zoom_oldH = window.innerHeight; zoom_oldH = window.innerHeight;
} }
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"Logout", "dspBkCancel":"Logout",
"txtSearchResult":"Result", "txtSearchResult":"Result",
"dspHome":"Home", "dspHome":"Home",
"txtLoginUser":"(Ver.20121213-1)User:", "txtLoginUser":"(Ver.20121214-1)User:",
"txtAll":"All", "txtAll":"All",
"txtMkgSize":"Size", "txtMkgSize":"Size",
"txtMkgS":"S", "txtMkgS":"S",
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト", "dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果", "txtSearchResult":"検索結果",
"dspHome":"ホーム", "dspHome":"ホーム",
"txtLoginUser":"(Ver.20121213-1)ログイン中:", "txtLoginUser":"(Ver.20121214-1)ログイン中:",
"txtAll":"すべて", "txtAll":"すべて",
"txtMkgSize":"太さ", "txtMkgSize":"太さ",
"txtMkgS":"小", "txtMkgS":"小",
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃", "dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과", "txtSearchResult":"검색 결과",
"dspHome":"홈", "dspHome":"홈",
"txtLoginUser":"(Ver.20121213-1)로그인 중:", "txtLoginUser":"(Ver.20121214-1)로그인 중:",
"txtAll":"전체", "txtAll":"전체",
"txtMkgSize":"두께", "txtMkgSize":"두께",
"txtMkgS":"소", "txtMkgS":"소",
......
...@@ -418,7 +418,7 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max { ...@@ -418,7 +418,7 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max {
z-index: 102; z-index: 102;
font-family: Verdana; font-family: Verdana;
font-size: 10pt; font-size: 10pt;
border-radius: 15px; border-radius: 10px;
} }
.popuptext_arrow { .popuptext_arrow {
...@@ -430,7 +430,7 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max { ...@@ -430,7 +430,7 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max {
border-style: solid; border-style: solid;
width: 0; width: 0;
height: 0; height: 0;
border-width: 18px 18px 18px 18px; border-width: 12px 12px 12px 12px;
} }
/* HOVER STYLES */ /* HOVER STYLES */
.pop-up-memo { .pop-up-memo {
......
...@@ -74,6 +74,8 @@ header{ ...@@ -74,6 +74,8 @@ header{
max-width:none; max-width:none;
min-width:1000px; min-width:1000px;
height:60px; height:60px;
position:absolute;
width:100%;
} }
/*ヘッダー左カラム*/ /*ヘッダー左カラム*/
......
...@@ -74,6 +74,9 @@ function openContentDetail() { ...@@ -74,6 +74,9 @@ function openContentDetail() {
$("#sectionContentDetail").show(); $("#sectionContentDetail").show();
$("#contentDetail").show(); $("#contentDetail").show();
$("#contentDetail").center(); $("#contentDetail").center();
if ($("#contentDetail").height() > $(window).height()){
$("#contentDetail").css('top', '0');
}
// Get contentid, thumbnail from list screen // Get contentid, thumbnail from list screen
displayData.contentID = ClientData.contentInfo_contentId(); displayData.contentID = ClientData.contentInfo_contentId();
......
...@@ -156,7 +156,6 @@ function dspRead_Click() { ...@@ -156,7 +156,6 @@ function dspRead_Click() {
var jsondata = $(this).attr("value"); var jsondata = $(this).attr("value");
var data = JSON.parse(jsondata); var data = JSON.parse(jsondata);
ClientData.contentInfo_contentId(data.contentid); ClientData.contentInfo_contentId(data.contentid);
ClientData.bookmark_contentNo(data.contentid);
ClientData.bookmark_pageNo(data.pageNo); ClientData.bookmark_pageNo(data.pageNo);
ClientData.IsRefresh(false); ClientData.IsRefresh(false);
......
...@@ -105,6 +105,9 @@ $(document).ready(function(){ ...@@ -105,6 +105,9 @@ $(document).ready(function(){
if ($("#contentDetail").css("display") != "none") { if ($("#contentDetail").css("display") != "none") {
// Refresh panel of detail to center. // Refresh panel of detail to center.
$("#contentDetail").center(); $("#contentDetail").center();
if ($("#contentDetail").height() > $(window).height()){
$("#contentDetail").css('top', '0');
}
} }
}); });
}); });
......
...@@ -1220,7 +1220,7 @@ function onClick_CanvasMain(event){ ...@@ -1220,7 +1220,7 @@ function onClick_CanvasMain(event){
} }
/* click memo edit */ /* click memo edit */
if (ClientData.IsDisplayMemo() == true){ if (ClientData.IsDisplayMemo() == true){
getAllMemoOfPage(); getAllMemoOfPage();
/* check exist object memo in mouse position */ /* check exist object memo in mouse position */
for(var nIndex = 0; nIndex < memoObjects.length; nIndex++){ for(var nIndex = 0; nIndex < memoObjects.length; nIndex++){
...@@ -1257,7 +1257,7 @@ function onClick_CanvasMain(event){ ...@@ -1257,7 +1257,7 @@ function onClick_CanvasMain(event){
/* click pageObject */ /* click pageObject */
if(isClickMemo == false){ if(isClickMemo == false){
isClickLinkList = false; var isClickLinkList = false;
/* check exist object in mouse position */ /* check exist object in mouse position */
var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y); var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
...@@ -2039,7 +2039,7 @@ function initImageCheckMarking(){ ...@@ -2039,7 +2039,7 @@ function initImageCheckMarking(){
/* init image display or not */ /* init image display or not */
if(ClientData.IsAddingMarking() == true){ if(ClientData.IsAddingMarking() == true){
$('#divCheckExistMarking').hide(); $('#divCheckExistMarking').hide();
}else{ }else{
if(isExistMarking == true){ if(isExistMarking == true){
$('#divCheckExistMarking').show(); $('#divCheckExistMarking').show();
}else{ }else{
...@@ -2326,6 +2326,8 @@ var openPopUp = function(mediaType, actionType, id, imageUrl, x, y, w, h, visibl ...@@ -2326,6 +2326,8 @@ var openPopUp = function(mediaType, actionType, id, imageUrl, x, y, w, h, visibl
if(userScale > 1){ if(userScale > 1){
OpenPopupText(posXPopupMemo, posYPopupMemo, content, $('#dialogPopUp'), $('#arrow')); OpenPopupText(posXPopupMemo, posYPopupMemo, content, $('#dialogPopUp'), $('#arrow'));
}else if ($("#header_toolbar").is(":hidden")){
OpenPopupText(pt1.x, pt1.y - 65, content, $('#dialogPopUp'), $('#arrow'));
}else{ }else{
OpenPopupText(pt1.x, pt1.y, content, $('#dialogPopUp'), $('#arrow')); OpenPopupText(pt1.x, pt1.y, content, $('#dialogPopUp'), $('#arrow'));
} }
...@@ -3070,7 +3072,7 @@ function zoomOut() { ...@@ -3070,7 +3072,7 @@ function zoomOut() {
checkDisableButtonZoom(); checkDisableButtonZoom();
/* close dialog popuptext */ /* close dialog popuptext */
closeDialogPopUpText(); closeDialogResize();
}; };
/* restore screen size */ /* restore screen size */
...@@ -3092,7 +3094,7 @@ function screenFit() { ...@@ -3092,7 +3094,7 @@ function screenFit() {
checkDisableButtonZoom(); checkDisableButtonZoom();
/* close dialog popuptext */ /* close dialog popuptext */
closeDialogPopUpText(); closeDialogResize();
}; };
......
...@@ -9,7 +9,7 @@ var conid; ...@@ -9,7 +9,7 @@ var conid;
var pageid; var pageid;
function createMemoDialog(){ function createMemoDialog(){
targetDiv.show();
targetDiv.html(''); targetDiv.html('');
targetDiv.append( targetDiv.append(
'<aside id="memoWrapper" class="MemoIndexBox">' '<aside id="memoWrapper" class="MemoIndexBox">'
...@@ -80,6 +80,7 @@ function MemoDelFunction(){ ...@@ -80,6 +80,7 @@ function MemoDelFunction(){
} }
$("#overlay").hide(); $("#overlay").hide();
targetDiv.children().remove(); targetDiv.children().remove();
targetDiv.hide();
$("#pop_up_memo").hide(); $("#pop_up_memo").hide();
...@@ -92,8 +93,9 @@ function MemoDelFunction(){ ...@@ -92,8 +93,9 @@ function MemoDelFunction(){
function MemoCancelFunction(){ function MemoCancelFunction(){
//targetDiv.dialog('close'); //targetDiv.dialog('close');
$("#overlay").hide(); $("#overlay").hide();
targetDiv.children().remove(); targetDiv.children().remove();
targetDiv.hide();
isCopyMemo = false; isCopyMemo = false;
$("#pop_up_memo").hide(); $("#pop_up_memo").hide();
...@@ -225,6 +227,7 @@ function buttonSaveFunction(){ ...@@ -225,6 +227,7 @@ function buttonSaveFunction(){
//targetDiv.dialog('close'); //targetDiv.dialog('close');
$("#overlay").hide(); $("#overlay").hide();
targetDiv.children().remove(); targetDiv.children().remove();
targetDiv.hide();
isCopyMemo = false; isCopyMemo = false;
$("#pop_up_memo").hide(); $("#pop_up_memo").hide();
......
...@@ -20,8 +20,8 @@ function OpenPopupText(posX, posY, content, dialogDiv, arrowDiv) { ...@@ -20,8 +20,8 @@ function OpenPopupText(posX, posY, content, dialogDiv, arrowDiv) {
dialogDiv.fadeIn(300); dialogDiv.fadeIn(300);
arrowDiv.fadeIn(300); arrowDiv.fadeIn(300);
arrowDiv.css("left", (posX - 20) + "px"); arrowDiv.css("left", (posX - 14) + "px");
arrowDiv.css("top", (posY - 20) + "px"); arrowDiv.css("top", (posY - 14) + "px");
dialogDiv.html(content) dialogDiv.html(content)
......
...@@ -94,6 +94,9 @@ $(document).ready(function(){ ...@@ -94,6 +94,9 @@ $(document).ready(function(){
if ($("#contentDetail").css("display") != "none") { if ($("#contentDetail").css("display") != "none") {
// Refresh panel of detail to center. // Refresh panel of detail to center.
$("#contentDetail").center(); $("#contentDetail").center();
if ($("#contentDetail").height() > $(window).height()){
$("#contentDetail").css('top', '0');
}
} }
}); });
}); });
...@@ -1113,15 +1116,19 @@ function syncReadingContent(){ ...@@ -1113,15 +1116,19 @@ function syncReadingContent(){
var readArr = ClientData.ReadingContentIds(); var readArr = ClientData.ReadingContentIds();
var metaArr = ClientData.MetaVersion(); var metaArr = ClientData.MetaVersion();
var resourceArr = ClientData.ResourceVersion(); var resourceArr = ClientData.ResourceVersion();
for(var i = readArr.length - 1; i >= 0; i--){ for (var i = readArr.length - 1; i >= 0; i--) {
var readContent = readArr[i]; var readContent = readArr[i];
if(!IsExistContent(readContent.contentid)){ if (!IsExistContent(readContent.contentid)) {
readArr.splice(i, 1); readArr.splice(i, 1);
metaArr.splice(i, 1); metaArr.splice(i, 1);
resourceArr.splice(i, 1); resourceArr.splice(i, 1);
} }
// Do not process next
if (avwHasError()) {
return;
}
} }
ClientData.ReadingContentIds(readArr); ClientData.ReadingContentIds(readArr);
...@@ -1162,6 +1169,11 @@ function IsExistContent(strContentId) { ...@@ -1162,6 +1169,11 @@ function IsExistContent(strContentId) {
if (xmlHttpRequest.status == 404) { if (xmlHttpRequest.status == 404) {
isExisted = false; isExisted = false;
} }
else {
// Show system error
isExisted = true; // Mark this flag to prevent bookmarks from deleting
showSystemError();
}
}); });
return isExisted; return isExisted;
} }
......
...@@ -329,9 +329,9 @@ function processLogin() { ...@@ -329,9 +329,9 @@ function processLogin() {
} }
}, function (xhr, statusText, errorThrown) { }, function (xhr, statusText, errorThrown) {
login_errorMessage = JSON.parse(xhr.responseText).errorMessage; if (xhr.responseText && xhr.status != 0) {
//$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), formatErrorCode(a.status)).toString()); login_errorMessage = JSON.parse(xhr.responseText).errorMessage;
if(xhr.responseText && xhr.status != 0) {
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), JSON.parse(xhr.responseText).errorMessage).toString()); $('#main-error-message').html(format(i18nText('msgLoginErrWrong'), JSON.parse(xhr.responseText).errorMessage).toString());
} else { } else {
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), 'E001')); $('#main-error-message').html(format(i18nText('msgLoginErrWrong'), 'E001'));
...@@ -370,10 +370,15 @@ function changePasswordProcess(){ ...@@ -370,10 +370,15 @@ function changePasswordProcess(){
$('#dialog-error-message').show(); $('#dialog-error-message').show();
} }
}, },
function (a, b, c) { function (xhr, b, c) {
//$('#dialog-error-message').html(i18nText('msgPwdOldWrong')); if (xhr.responseText && xhr.status != 0) {
$('#dialog-error-message').html(JSON.parse(a.responseText).errorMessage); $('#dialog-error-message').html(JSON.parse(xhr.responseText).errorMessage);
$('#dialog-error-message').show(); $('#dialog-error-message').show();
}
else {
// Show systemerror
showSystemError();
}
}); });
} }
......
...@@ -103,8 +103,13 @@ function IsExistBackupFile() { ...@@ -103,8 +103,13 @@ function IsExistBackupFile() {
isExisted = true; isExisted = true;
} }
}, },
function (a, b, c) { function (xhr, b, c) {
isExisted = false; if (xhr.status != 0) {
isExisted = false;
}
else {
showSystemError();
}
}); });
return isExisted; return isExisted;
} }
...@@ -235,12 +240,6 @@ function dspOptBk_OK_Click(e) { ...@@ -235,12 +240,6 @@ function dspOptBk_OK_Click(e) {
text: i18nText('msgBackupFailed') text: i18nText('msgBackupFailed')
}); });
}); });
// avwCmsApi(ClientData.userInfo_accountPath(), "uploadBackupFile", "post",
// { sid: ClientData.userInfo_sid(), "webBackupData.json": JSON.stringify(buildBackupData()), deviceType: "4" },
// avwCmsApi_uploadBackupFile_success,
// null
// );
closeBackup(); closeBackup();
} }
...@@ -288,14 +287,19 @@ function dspOptRes_OK_Click(e) { ...@@ -288,14 +287,19 @@ function dspOptRes_OK_Click(e) {
avwCmsApi(ClientData.userInfo_accountPath(), "getBackupFile", "post", avwCmsApi(ClientData.userInfo_accountPath(), "getBackupFile", "post",
{ sid: ClientData.userInfo_sid(), deviceType: '4', filename: "webBackupData.json" }, { sid: ClientData.userInfo_sid(), deviceType: '4', filename: "webBackupData.json" },
avwCmsApi_getBackupFile_success, avwCmsApi_getBackupFile_success,
function (a, b, c) { function (xhr, b, c) {
// Show error message if (xhr.status != 0) {
$().toastmessage({ position: 'middle-center' }); // Show error message
$().toastmessage('showToast', { $().toastmessage({ position: 'middle-center' });
type: 'error', $().toastmessage('showToast', {
sticky: true, type: 'error',
text: i18nText('msgRestoreFailed') sticky: true,
}); text: i18nText('msgRestoreFailed')
});
}
else {
showSystemError();
}
} }
); );
...@@ -595,19 +599,18 @@ function avwCmsApi_passwordChange_success(data) { ...@@ -595,19 +599,18 @@ function avwCmsApi_passwordChange_success(data) {
} }
} }
} }
function avwCmsApi_passwordChange_fail(a, b, c) { function avwCmsApi_passwordChange_fail(xhr, b, c) {
/* show error messages */ if (xhr.responseText && xhr.status != 0) {
var msgError = $('#dialog-error-message'); /* show error messages */
//$().toastmessage({ position: 'middle-center' }); var msgError = $('#dialog-error-message');
//$().toastmessage('showToast', {
// type: 'error', //msgError.html(i18nText('msgPwdChangeNG'));
// sticky: true, msgError.html(JSON.parse(xhr.responseText).errorMessage);
// text: i18nText('msgPwdChangeNG') msgError.show();
//}); }
else {
//msgError.html(i18nText('msgPwdChangeNG')); showSystemError();
msgError.html(JSON.parse(a.responseText).errorMessage); }
msgError.show();
} }
......
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