Commit 5224d11b by Motohisa Nakano

20121214

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