Commit 527af281 by Masaru Abe

CheckWeb版対応 途中版

parent 6142d01d
@charset('utf-8');
/*
* {
font-family: "メイリオ", "MS Pゴシック", "ヒラギノ角ゴ Pro W3", "Osaka", "sans-serif";
font-size: 12pt;
-webkit-font-smoothing: antialiased;
}
*/
/**
* システムエラーメッセージスタイル
*/
.toast-container {
z-index: 90001;
}
.toast-item {
border-radius: 10px;
}
.toast-position-middle-center {
margin-left: -250px;
width: 500px;
}
@charset "utf-8";
/*
* {
font-family: "メイリオ", "MS Pゴシック", "ヒラギノ角ゴ Pro W3", "Osaka", "sans-serif";
font-size: 12pt;
-webkit-font-smoothing: antialiased;
}
*/
/**
* システムエラーメッセージスタイル
*/
.toast-container {
z-index: 90001;
}
.toast-item {
border-radius: 10px;
}
.toast-position-middle-center {
margin-left: -250px;
width: 500px;
}
......@@ -980,6 +980,30 @@ AVWEB.getApiUrl = function(accountPath) {
};
/** shop配下のアクションを呼ぶURLを作成 */
AVWEB.getShopApiUrl = function(accountPath) {
// Shop url 構築
var apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath);
}
return apiUrl.substring(0, apiUrl.length - 6) + "shop";
};
/** checkapi配下のアクションを呼ぶURLを作成 */
AVWEB.getCheckApiUrl = function(accountPath) {
// checkapi url 構築
var apiUrl = ClientData.conf_apiUrl(); //sysSettings.apiUrl;
if(accountPath) {
apiUrl = AVWEB.format(apiUrl, accountPath);
}
return apiUrl.substring(0, apiUrl.length - 6) + "checkapi";
};
/* get url */
AVWEB.getURL = function(apiName) {
//var sysSettings = AVWEB.avwSysSetting();
......@@ -1009,3 +1033,9 @@ AVWEB.format = function(fmt) {
return fmt;
};
......@@ -124,7 +124,8 @@ COMMON.ScreenIds = {
ContentViewOpenUri : 'contentview_openuri.html?__UPDATEID__',
ContentViewStreaming : 'contentview_streaming.html?__UPDATEID__',
ContentViewGetits : 'contentview_getits.html?__UPDATEID__',
ContentViewCheck : 'contentview_check.html?__UPDATEID__'
ContentViewCheck : 'contentview_check.html?__UPDATEID__',
HomeCheck : 'home_check.html?__UPDATEID__'
};
COMMON.Keys = {
......@@ -378,6 +379,7 @@ COMMON.Keys = {
conf_apiUrl : 'conf_apiUrl',
conf_apiLoginUrl : 'conf_apiLoginUrl',
conf_apiResourceDlUrl : 'conf_apiResourceDlUrl',
conf_checkApiUrl : 'conf_checkApiUrl',
storeUrl : 'storeUrl',
siteUrl : 'siteUrl',
......@@ -1745,6 +1747,13 @@ var ClientData = {
return SessionStorageUtils.get(COMMON.Keys.conf_apiResourceDlUrl);
}
},
conf_checkApiUrl : function(data) {
if (arguments.length > 0) {
SessionStorageUtils.set(COMMON.Keys.conf_checkApiUrl, data);
} else {
return SessionStorageUtils.get(COMMON.Keys.conf_checkApiUrl);
}
},
storeUrl : function(data) {
if (arguments.length > 0) {
......@@ -3338,3 +3347,195 @@ COMMON.isAuthoringPreview = function() {
}
};
// download resouce content id
COMMON.downloadResourceById = function(contentId){
var params = {
sid: ClientData.userInfo_sid(),
contentId: contentId,
getType: '2'
};
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", "get", params,
function (data) {
//Get resourceurl
if( data.contentData.content ){
var resourceUrl = COMMON.getResourceByIdFromAPI(data.contentData.content.resourceId);
// open url to download file
if (COMMON.isSafariNotOnIpad()) {
window.onbeforeunload = null;
window.open(resourceUrl, "_self"); // open url to download file on safari not for ipad
var toogleTime = setTimeout(function () { COMMON.ToogleLogoutNortice() }, 200);
}
else {
window.open(resourceUrl); //open url to download file on orther browser
}
} else {
alert("ダウンロード出来ません。");
}
},
function (xhr, b, c) { }
);
};
//Download resource
COMMON.getResourceByIdFromAPI = function(resourceId){
return AVWEB.getURL("webResourceDownload") + "&sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
};
// check is browser safari on Mac and Window devide ( not Ipad )
COMMON.isSafariNotOnIpad = function() {
if (!window.chrome) {
var ua = navigator.userAgent.toLowerCase();
if (!/ipad/.test(ua) && /safari/.test(ua)) {
return true;
}
}
return false;
};
//link content
COMMON.viewLinkContentById = function(contentId, isWindowOpen){
var params = {
sid: ClientData.userInfo_sid(),
contentId: contentId,
getType: '2'
};
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", "get", params,
function (data) {
//Get linkUrl
var linkUrl = data.contentData.content.url;
if( !linkUrl ){
return;
}
if (isWindowOpen) {
window.open(linkUrl, "_blank", "new window, scrollbars=yes");
} else {
location.href = linkUrl;
}
},
function (xhr, b, c) { });
};
COMMON.resizeResourceThumbnail = function(mg, width, height) {
var newWidth;
var newHeight;
var delta = Math.min(width / mg.width, height / mg.height);
newHeight = parseInt(delta * mg.height);
newWidth = parseInt(delta * mg.width);
var result = [ newWidth, newHeight ];
return result;
};
// get icon of content type
COMMON.getIconTypeContent = function(contentType) {
var src = '';
switch (contentType) {
case COMMON.ContentTypeKeys.Type_PDF:
{
src = 'img/bookshelf/icon_01.png';
break;
}
case COMMON.ContentTypeKeys.Type_Enquete:
{
src = 'img/bookshelf/icon_09.png';
break;
}
case COMMON.ContentTypeKeys.Type_Exam:
{
src = 'img/bookshelf/icon_10.png';
break;
}
case COMMON.ContentTypeKeys.Type_Html:
{
src = 'img/bookshelf/icon_05.png';
break;
}
case COMMON.ContentTypeKeys.Type_Image:
{
src = 'img/bookshelf/icon_02.png';
break;
}
case COMMON.ContentTypeKeys.Type_Music:
{
src = 'img/bookshelf/icon_06.png';
break;
}
case COMMON.ContentTypeKeys.Type_NoFile:
{
src = 'img/bookshelf/icon_07.png';
break;
}
case COMMON.ContentTypeKeys.Type_Others:
{
src = 'img/bookshelf/icon_03.png';
break;
}
case COMMON.ContentTypeKeys.Type_Video:
{
src = 'img/bookshelf/icon_04.png';
break;
}
case COMMON.ContentTypeKeys.Type_Link:
{
src = 'img/bookshelf/icon_08.png';
break;
}
case COMMON.ContentTypeKeys.Type_PanoMovie:
{
src = 'img/bookshelf/icon_11.png';
break;
}
case COMMON.ContentTypeKeys.Type_PanoImage:
{
src = 'img/bookshelf/icon_12.png';
break;
}
case COMMON.ContentTypeKeys.Type_ObjectVR:
{
src = 'img/bookshelf/icon_13.png';
break;
}
default: break;
}
return src;
};
// get ThumbnailForOtherType
COMMON.getThumbnailForOtherType = function(contentType){
var src = '';
if(contentType == COMMON.ContentTypeKeys.Type_Image){
src = COMMON.ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == COMMON.ContentTypeKeys.Type_Music){
src = COMMON.ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == COMMON.ContentTypeKeys.Type_Video){
src = COMMON.ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == COMMON.ContentTypeKeys.Type_NoFile){
src = COMMON.ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == COMMON.ContentTypeKeys.Type_Others){
src = COMMON.ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == COMMON.ContentTypeKeys.Type_Html){
src = COMMON.ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == COMMON.ContentTypeKeys.Type_Link){
src = COMMON.ThumbnailForOtherType.Thumbnail_LinkType;
}
return src;
};
{
"apiUrl" : "https://web180.abook.bz/acms/{0}/abvapi",
"apiLoginUrl" : "https://web180.abook.bz/acms/nuabvapi",
"apiResourceDlUrl" : "https://web180.abook.bz/acms/{0}/dl",
"1apiUrl" : "http://localhost:8080/acms/{0}/abvapi",
"1apiLoginUrl" : "http://localhost:8080/acms/nuabvapi",
"1apiResourceDlUrl" : "http://localhost:8080/acms/{0}/dl",
"1checkApiUrl" : "http://localhost:8080/acms/{0}/checkapi",
"apiUrl" : "https://abook189.abook.bz/acms/{0}/abvapi",
"apiLoginUrl" : "https://abook189.abook.bz/acms/nuabvapi",
"apiResourceDlUrl" : "https://abook189.abook.bz/acms/{0}/dl",
"checkApiUrl" : "https://abook189.abook.bz/acms/{0}/checkapi",
"bookShelfCount" : 15,
"bookListCount" : 15,
"screenlockTimeDefault" : 30,
......
#checkInput {
z-index: 9998;
width: 30%;
min-width: 400px;
height: calc(100% - 2px);
position: absolute;
margin: 0 auto;
right: 0;
top: 0;
overflow: auto;
-webkit-overflow-scrolling: touch;
border: solid 1px #0068CB;
}
#checkInput iframe {
border: none;
display: block;
}
#checkDetail {
z-index: 9998;
width: 80%;
height: 10%;
position: absolute;
margin: 50px auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
#checkList {
z-index: 9997;
width: 30%;
min-width: 400px;
height: auto;
position: absolute;
margin: 0 auto;
right: 0;
display: none;
font-family:"ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, "MS Pゴシック", "MS PGothic", "sans-serif" !important;
border: solid 1px #0068CB;
}
#checkListValues {
height: 100%;
position: relative;
display: none;
font-weight: bold;
background-color: #FFFFFF;
}
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
border-radius: 5px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
background-color: rgba(100, 178, 226, 0.8);
border-radius: 10px;
}
.inner{
width:100%;
height:800px;
}
#checkListValues #values {
overflow-x: none;
overflow-y: scroll;
height: calc(95vh - 116px);
}
.checkListSceneDiv {
display: flex;
padding: 10px;
margin-top: 20px;
}
.checkListScene {
background: #0068CB;
border: none;
border-radius: 5px;
box-shadow: 1px 1px 1px 1px rgba(0,0,0,0.16);
font-weight: bold;
font-size: 18px;
width: 88%;
height: 30px;
text-indent: 10px;
display: flex;
align-items: center;
cursor: pointer;
}
.checkListScene > div {
width: 85%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.accordionBtn {
width: 30px;
height: 30px;
background-color: #cccccc;
border-style: solid;
border-color: #cccccc;
border-width: 1px;
border-radius: 5px;
box-shadow: 1px 1px 1px 1px rgba(0,0,0,0.16);
font-weight: bold;
font-size: 18px;
color: #cccccc;
display: flex;
align-items: center;
justify-content: center;
margin-left: 10px;
cursor: auto;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
.checkListValue {
cursor: pointer;
padding: 10px 20px;
font-size: 20px;
border-style: solid;
border-width: 1px;
border-color: #0068CB;
border-radius: 5px;
box-shadow: 1px 1px 1px 1px rgba(0,0,0,0.16);
font-weight: bold;
font-size: 18px;
width: 85%;
align-items: center;
margin-left: 10px;
margin-bottom: 7px;
overflow: hidden;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
.checkListValue div div:last-child {
color:#0068CB;
font-weight:normal;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#checkListCount {
color: #0165C5;
width: 95%;
display: none;
padding: 15px 0 0 10px;
font-size: 18px;
border-bottom: solid 1px #0068CB;
height: 28px;
margin-left: auto;
margin-right: auto;
}
#checkListCount span {
font-size: 20px;
margin: 0 10px;
}
#reportModeView {
z-index: 99998;
width: 134px;
height: auto;
margin: 10px 3px 0px 3px;
}
#reportModeEdit {
z-index: 99998;
width: 134px;
height: auto;
margin: 0px 3px;
}
.reportModeComboBox {
width: 140px;
color: #ffffff;
text-align: center;
cursor: pointer;
padding: 5px 0;
font-size: 18px;
opacity: 0.9;
border: 1px solid #64b2e2;
background-color: #64b2e2;
display:block;
position:absolute;
z-index:99998;
}
.reportModeOpen {
background-color: #64b2e2;
color: #bdd6e5;
}
.reportMode {
text-align: center;
cursor: pointer;
padding: 5px 0;
font-size: 18px;
opacity: 0.9;
background-color: #ffffff;
color: #64b2e2;
}
.reportMode:hover {
background-color: #c9e2f1;
}
.dialog_okButton {
height: 43px;
min-width: 120px;
}
.dialog_cancelButton {
height: 43px;
min-width: 120px;
}
/***************
nav
***************/
/* line 5, ../../../sass/_nav.scss */
.nav {
z-index: 9999 !important;
position: relative;
background: #455765;
position: relative;
margin: 0;
padding: 0;
font-size: 14px;
/*ul end*/
}
/* line 10, ../../../sass/_nav.scss */
.nav li {
display: table-cell;
width: 120px;
/****
sub_nav
***/
/*sub nav end*/
}
/* line 13, ../../../sass/_nav.scss */
.nav li:hover {
background-color: #4C6473;
}
/* line 15, ../../../sass/_nav.scss */
.nav li:hover span {
display: block;
}
/* line 19, ../../../sass/_nav.scss */
.nav li:nth-child(2) {
width: 85px;
}
/* line 22, ../../../sass/_nav.scss */
.nav li:nth-child(3) {
width: 80px;
}
/* line 25, ../../../sass/_nav.scss */
.nav li:nth-child(4) {
width: 120px;
}
/* line 28, ../../../sass/_nav.scss */
.nav li:nth-child(5) {
width: 110px;
}
/* line 31, ../../../sass/_nav.scss */
.nav li span {
position: absolute;
left: 0;
top: 36px;
display: none;
width: 100%;
background: #DCDCDC;
z-index: 99999;
}
/* line 39, ../../../sass/_nav.scss */
.nav li span a {
display: inline;
padding: 10px 15px;
}
/* line 44, ../../../sass/_nav.scss */
.nav li a {
padding: 8px;
cursor: pointer;
}
/* line 47, ../../../sass/_nav.scss */
.nav li a p {
color: #ffffff;
display: inline-block;
vertical-align: middle;
line-height: 0.8em;
font-size: 13px;
}
/* line 52, ../../../sass/_nav.scss */
.nav li a p.nav_icon {
height: 20px;
width: 20px;
font-size: 22px;
margin: 0;
padding: 0;
}
/* line 57, ../../../sass/_nav.scss */
.nav li a p.nav_content:before {
content: '\f10c';
}
/* line 60, ../../../sass/_nav.scss */
.nav li a p.nav_input:before {
content: "\f308";
}
/* line 63, ../../../sass/_nav.scss */
.nav li a p.nav_list:before {
content: "\f325";
}
/* line 67, ../../../sass/_nav.scss */
.nav li a p.nav_preview:before {
content: "\f3a9";
}
/* line 70, ../../../sass/_nav.scss */
.nav li a p.nav_move:before {
content: "\f10a";
}
/* line 73, ../../../sass/_nav.scss */
.nav li a p.nav_preview_start:before {
content: "\f3a9";
}
/* line 76, ../../../sass/_nav.scss */
.nav li a p.nav_preview_stop:before {
content: "\f3a6";
}
/* line 79, ../../../sass/_nav.scss */
.nav li a p.nav_record_start:before {
content: "\f2e0";
}
/* line 82, ../../../sass/_nav.scss */
.nav li a p.nav_record_stop:before {
content: "\f2df";
}
/* line 90, ../../../sass/_nav.scss */
.nav li a p:last-child {
margin-left: 4px;
}
/* line 97, ../../../sass/_nav.scss */
.nav li .sub_label {
position: absolute;
bottom: 0px;
width: 100%;
}
/* line 101, ../../../sass/_nav.scss */
.nav li .sub_label p {
display: table-cell;
text-align: center;
padding: 4px 0;
width: 500px;
}
.sub_nav {
margin: 0;
padding: 0;
}
/* line 110, ../../../sass/_nav.scss */
.nav li .sub_nav li:hover {
background: none;
}
/* line 113, ../../../sass/_nav.scss */
.nav li .sub_nav li a {
width: 95px;
cursor: pointer;
text-align: center;
padding-top: 10px;
display: block;
height: 50px;
}
/* line 120, ../../../sass/_nav.scss */
.nav li .sub_nav li a:hover {
color: #3C4D5A;
background-color: #F5F5F5;
}
/* line 124, ../../../sass/_nav.scss */
.nav li .sub_nav li a p {
color: #555555;
display: block;
margin-right: auto;
margin-left: auto;
}
/* line 129, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_icon {
height: 20px;
width: 20px;
color: #555555;
font-size: 22px;
margin-top: 0;
margin-bottom: 0;
}
/* line 136, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_save:before {
content: '\f297';
}
/* line 139, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_save_end:before {
content: '\f105';
}
/* line 143, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_out:before {
content: '\f309';
}
/* line 146, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_save_play:before {
content: '\f151';
}
/* line 149, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_setting:before {
content: '\f1c6';
}
/* line 153, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_spot:before {
content: '\f384';
}
/* line 156, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_textspot:before {
content: '\f16a';
}
/* line 159, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_transparencyspot:before {
content: '\f37c';
}
/* line 162, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_scene:before {
content: '\f321';
}
/* line 165, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_map:before {
content: '\f196';
}
/* line 168, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_guide:before {
content: '\f1a6';
}
/* line 171, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_accordion:before {
content: '\f316';
}
/* line 174, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_nav:before {
content: '\f197';
}
/* line 177, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_stortlist:before {
content: '\f320';
}
/* line 180, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_scenelist:before {
content: '\f31a';
}
/* line 183, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_masu:before {
content: '\f31a';
}
/* line 186, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_list:before {
content: '\f31f';
}
/* line 189, ../../../sass/_nav.scss */
.nav li .sub_nav li a p.sub_nav_3d:before {
content: '\f101';
}
/* line 194, ../../../sass/_nav.scss */
.nav li .sub_nav li p:last-child {
margin-left: 0px;
line-height: 1.1em;
margin-top: 5px;
}
/* line 201, ../../../sass/_nav.scss */
.nav li .sub_nav.sub_nav_input {
height: 100px;
}
/* line 204, ../../../sass/_nav.scss */
.nav li .sub_nav.sub_nav_input li:nth-child(5) a {
border-left: 1px solid #9A9A9A;
padding: 2px 0 0;
}
/* line 208, ../../../sass/_nav.scss */
.nav li .sub_nav.sub_nav_input li:last-child {
border-right: 1px solid #9A9A9A;
padding: 2px 0 0;
}
.nav li .sub_nav li a p.sub_nav_download:before {
content: '\f220';
}
.nav li .sub_nav li a p.sub_nav_upload:before {
content: '\f22a';
}
/* saving dialog progressbar */
.meter {
background: #DCDCDC;
height: 15px;
padding: 0;
border-radius: 2px;
width: 80%;
margin: 20px auto 0;
position: relative;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
}
.meter > span {
display: block;
height: 100%;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
background-color: #455765;
position: relative;
overflow: hidden;
}
.iframeBorderShadow {
border:1px solid #cccccc;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
#checkLoadingMessage {
width: 100%;
text-align: center;
padding-top: 10px;
}
#checkLoadingImage {
width: 100%;
text-align: center;
padding-bottom: 10px;
}
#checkLoadingImage img {
width: 30px;
height: 30px;
}
header {
position: fixed;
top: 0;
width: 100%;
overflow: hidden;
background: #ffffff;
}
header div.belt {
width: 100%;
height: 75px;
background: #37648c;
display: table;
}
header div.belt p {
margin: 0;
color: #ffffff;
display: table-cell;
text-align: center;
vertical-align: middle;
font-size: 1.6rem;
font-weight: bold;
}
header button {
font-size: 1.6rem;
margin: 15px 10px 15px 0;
float: left;
}
header button:nth-child(1) {
margin-left: 22px;
}
header button.addition, button.updateInspect {
height: 40px;
border-radius: 3px;
box-shadow: 2px 2px 1px 1px rgba(0,0,0,0.16);
font-weight: bold;
font-size: calc(10px + 0.2vw);
text-indent: 20px;
color: #FFFFFF;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
border: 1px solid #cccccc;
cursor: pointer;
margin: 0 5px;
width: calc(30% - 20px);
background: #0068CB;
background-position: calc(20% - 0.3vw) center;
}
header button.updateInspect {
text-indent: 0px;
display: none;
}
header div.totalDiv {
font-weight: bold;
font-size: calc(10px + 0.4vw);
color: #095395;
padding: 0 5px;
border-bottom: 1px solid #cccccc;
margin-top: 10px;
text-align: center;
width: calc(30% - 20px);
white-space: nowrap;
}
header div.totalDiv em {
font-weight: bold;
font-size: calc(16px + 0.4vw);
color: #095395;
margin: 0 10px;
font-weight: bold;
font-style: normal;
}
header div.sceneNameDiv {
-webkit-appearance: none;
display: inline-block;
padding: 6px 30px;
border: none;
background-color: rgba(255, 255, 255, 0.8);
color: #000000;
font-weight: bold;
font-size: 16px;
border-radius: 3px;
}
#zoomController {
position:absolute;
margin:auto 0;
height:130px;
top:0;
bottom:0;
left:10px;
display:inline;
z-index:3002;
}
#zoomController div {
background-color:#FFFFFF;
border-style:solid;
border-width:1px;
border-color:#0068CB;
border-radius:3px;
box-shadow:1px 1px 1px 0px rgba(0,0,0,0.16);
width:20px;
height:7px;
margin:5px auto;
}
#zoomController img.zoomBtn {
/* border-width:2px; */
border-radius:5px;
box-shadow:1px 1px 1px 0px rgba(0,0,0,0.16);
width:30px;
height:30px;
/* font: bold 26px Meiryo; */
/* color:#0068CB; */
cursor:pointer;
display: flex;
align-items: center;
justify-content: center;
margin:5px auto;
/* -webkit-user-select: none; */
/* -khtml-user-select: none; */
/* -moz-user-select: none; */
/* -o-user-select: none; */
/* user-select: none; */
}
#zoomController div.selected {
background-color:#0068CB;
border-color:#FFFFFF;
width:30px;
height:7px;
}
#checkListSearch {
display: none;
padding:20px 10px 0;
}
#checkListSearch #searchWordDiv {
display: flex;
border-style: solid;
border-color: #999999;
border-width: 1px;
border-radius: 3px;
word-wrap: break-word;
height: 40px;
width: 60%;
}
#checkListSearch #searchWordDiv img {
width: 24px;
height: 24px;
margin: 9px;
}
#checkListSearch #searchWordDiv input {
margin: 0 5px;
border: none;
overflow: auto;
outline: none;
font-size: 16px;
width: 100%;
line-height: normal;
}
#checkListSearch #searchWordDiv input::placeholder {
color: rgba(0,0,0,0.2);
}
#checkListSearch #searchWordDiv input::-ms-input-placeholder {
color: rgba(0,0,0,0.2);
}
#checkListSearch #searchWordDiv input:-ms-input-placeholder {
color: rgba(0,0,0,0.2);
}
#checkListSearch #searchBtn {
margin: 1px 10px;
width: 25%;
height: 40px;
background: #0068CB;
border: none;
border-radius: 3px;
box-shadow: 2px 2px 1px 1px rgba(0,0,0,0.16);
font-weight: bold;
font-size: calc(16px + 0.3vw);
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
cursor: pointer;
}
#closeBtn {
display: none;
width: 25px;
height: 25px;
position: absolute;
right: 0.5vw;
top: 0.5vw;
padding: 5px;
cursor: pointer;
}
.nullValue {
display: none;
font-weight: bold;
font-size: 14px;
color: #000;
margin: 10px 40px;
}
.sceneValues {
z-index: 1;
overflow: hidden;
}
.visibleButtonDiv {
position: absolute;
cursor: pointer;
margin-top: 15%;
top: 0;
bottom: 0;
left: 10px;
display: inline;
z-index: 3002;
height: 30px;
}
.visibleButtonDiv:hover {
opacity: 0.7;
}
#visibleButton {
height: 30px;
}
\ No newline at end of file
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}
@charset "UTF-8";
html {
font-size: 62.5%;
font-family: "メイリオ", "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "小塚ゴシック Pr6N R", "Arial", "MS Pゴシック", "MS PGothic", sans-serif; }
body {
overflow: hidden;
font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, "MS Pゴシック", "MS PGothic", "sans-serif";
}
a {
display: block;
text-decoration: none; }
div.container {
overflow: auto;
-webkit-overflow-scrolling: touch;
height: calc(100vh - 122px);
margin: 140px 22px 22px; }
div.container ul.addition_list {
width: 100%;
list-style: none;
padding: 0; }
div.container ul.addition_list >li {
background: #ffffff;
border: 1px solid #cccccc;
padding: 18px 20px 18px 50px;
margin-top: -1px;
cursor: pointer; }
div.container ul.addition_list li .code {
display: inline-block;
padding: 5px 10px;
color: #fff;
margin-bottom: 5px;
text-align: center; }
div.container ul.addition_list li p {
font-size: 2rem;
font-weight: bold;
line-height: 150%;
margin: 5px 0;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;}
div.container ul.inspection_list {
width: 100%;
list-style: none;
padding: 0; }
div.container ul.inspection_list li .code {
font-size: 1.1rem;
color: #333333; }
div.container ul.inspection_list li p {
font-size: 1.8rem;
font-weight: bold;
line-height: 150%;
margin: 5px 0 0;
color: #000000; }
div.container ul.inspection_list li.check {
background: url("../img/check.png") no-repeat;
background-position: 10px center; }
div.container ul.inspection_list li.read {
background: url("../img/read.png") no-repeat;
background-position: 10px center; }
\ No newline at end of file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta name="viewport" content="">
<title></title>
<!--
<link rel="stylesheet" type="text/css" href="css/check/normalize.css?__UPDATEID__">
<link rel="stylesheet" type="text/css" href="css/check/template.css?__UPDATEID__">
<link rel="stylesheet" type="text/css" href="css/check/check.css?__UPDATEID__">
-->
<link rel="stylesheet" type="text/css" href="common/css/jquery-ui.css?__UPDATEID__" />
<!--
<link rel="stylesheet" type="text/css" href="css/reset.css?__UPDATEID__" />
-->
<link rel="stylesheet" type="text/css" href="css/layout/common.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/list.css?__UPDATEID__" />
<!-- CSSビュー -->
<link rel="stylesheet" type="text/css" href="css/layout/viewer.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="common/css/jquery.powertip.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/Anket.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/delete_shiori.css?__UPDATEID__" />
<script type="text/javascript" src="./common/js/jquery-1.8.1.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/jquery-ui-1.8.23.custom.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/jquery.toastmessage.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/avweb.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/uuid.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/Limit_Access_Content.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/check/home_check.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/header.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/scrolltopcontrol.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/tab.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/jquery.cookie.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./common/js/jquery.treeview.edit.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./common/js/jquery.treeview.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./common/js/screenLock.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./js/detail.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./common/js/html2canvas.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./common/js/promise-6.1.0.min.js?__UPDATEID__" ></script>
<style>
button.addition {
background: #ffffff url("/acms/check/images/addition.png") no-repeat;
background-position: 20% center;
}
div.container ul.addition_list >li {
background: #ffffff;
border: 1px solid #cccccc;
padding: 18px 20px;
margin-top: -1px;
cursor: auto;
display: flex;
}
div.container ul.addition_list li.check .code {
background-color: #1B1BD2;
}
div.container ul.addition_list li.read .code {
background-color: #FF7700;
}
div.container ul.addition_list li p.workContent {
font-weight: normal;
font-size: 1.5rem;
}
/*
.ui-widget {
font-size: 2.8em;
}
*/
#checkDetail {
position: fixed;
}
.nav li a {
padding: 0;
}
.nav li a p.nav_icon {
margin-left: 5px;
}
/*
header {
position: relative;
display: flex;
padding: 0 10px;
border: 2px solid #095395;
border-radius: 1px;
width: auto;
height: 60px;
margin: 15px 12px;
align-items: center;
justify-content: center;
}
*/
#checkListSearch {
display: flex;
width: 100%;
padding: 0 0;
}
#checkListSearch #searchWordDiv {
width: 70%;
}
#checkListSearch #searchBtn {
width: 30%;
}
#listValues {
margin: 15px 12px 0px;
}
#listValues li td {
align-items: center;
justify-content: center;
}
#listIcon {
width: 30px;
height: 30px;
}
#contentType {
font-weight: bold;
font-size: 2rem;
letter-spacing: 0.5rem;
color: #095395;
margin-left: 10px;
width: 30%;
}
.codeAndExpiration {
margin-bottom: 5px;
font-size: 16px;
font-weight: bold;
color: #37648C;
list-style-type: none;
margin: 0;
padding: 0;
}
.codeAndExpiration div {
font-weight: bold;
font-size: 1.7rem;
color: #37648C;
margin-top: 5px;
}
.nullValue {
text-align: center;
font-size: 24px;
color: #D50000;
}
.actionBtnDiv {
align-items: center;
justify-content: center;
display: none;
cursor: pointer;
}
.actionBtnDiv img {
width: 67px;
height: 67px;
border: none;
border-radius: 3px;
}
.actionBtnDiv p {
font-size: 14px !important;
color: #095395 !important;
text-align: center;
}
.taskInfoDiv {
width: 100%;
margin: 0 0.5em;
}
.actionBtn {
margin: 0 12px;
}
.actionBtn p {
margin-left: -3px !important;
}
/*
header .headerFormForMobile {
width: 100%;
}
header .headerFormForMobile >.childDiv {
display: flex;
align-items: center;
justify-content: center;
}
header button.addition {
background: #0068CB url(/acms/check/images/addition.png) no-repeat;
background-position: calc(20% - 0.3vw) center;
}
*/
.ui-dialog-popup {
border: 1px solid #dddddd;
background: #ffffff url(../images/datepicker/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
color: #444444;
padding: 0;
}
</style>
</head>
<body id="home_check" oncontextmenu="return false">
<div id="ws-body" >
<a href="#" id="dspLogout" ><img src="img/common/icon_logout.png" width="30" height="30"></a>
<!--
<header>
<div id="top">
<h1>作 業 一 覧</h1>
<form id="search">
<input class="text" type="text">
<input class="submit" type="submit" value="検索">
</form>
<p>合計 <span>3</span> カ所</p>
<input class="button" type="button" value="+ 作業追加">
</div>
</header>
-->
<div id="listValues" class="container">
<ul class="addition_list"></ul>
<div id="nullValue" class="nullValue" style="display: none;">該当作業はありません。</div>
<div id="noWork" class="nullValue" style="display: none;"></div>
</div>
<div id="actionBtnDiv" class="actionBtnDiv">
<div class="actionBtn">
<img src="img/check/taskFormBtnIcon.png">
<p>作業報告</p>
</div>
<div class="actionBtn">
<img src="img/check/taskFormBtnIcon.png">
<p>作業指示</p>
</div>
<div class="actionBtn">
<img src="img/check/taskDocumentBtnIcon.png">
<p>資料参照</p>
</div>
</div>
<div id="content-grid" style="display: none;">
</div>
</div>
<div id="viewer" style="display:none;" >
</div>
<iframe style="height:0px;width:0px;visibility:hidden;display:none;" src="about:blank">
this frame prevents back forward cache
</iframe>
</body>
</html>
......@@ -1037,6 +1037,6 @@ BOOKMARK.downloadFunction = function(e) {
var contentId = $(this).attr('contentid');
// Download content
HEADER.downloadResourceById(contentId);
COMMON.downloadResourceById(contentId);
};
......@@ -77,9 +77,15 @@ CHECKVIEW.processLogin = function(urlPath, contentKey) {
// set number new push message to 0
ClientData.pushInfo_newMsgNumber(0);
//ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// set info user login
ClientData.userInfo_accountPath(urlPath);
ClientData.userInfo_accountPath_session(urlPath);
//ClientData.userInfo_loginId(loginId);
//ClientData.userInfo_loginId_session(loginId);
ClientData.userInfo_userName(LOGIN.userInfo_userName);
ClientData.userInfo_sid(LOGIN.userinfo_sid);
ClientData.userInfo_sid_local(LOGIN.userinfo_sid);
$('#main-error-message').css('display', 'none');
//contentKey復号化
......@@ -134,7 +140,7 @@ CHECKVIEW.decodeContentKey = function(contentKey) {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Login);
} else {
// アラートメッセージ表示
LOGIN.showAlertScreen(I18N.i18nText('msgContentNotExist'), "abvw/" + COMMON.ScreenIds.Home);
LOGIN.showAlertScreen(I18N.i18nText('msgContentNotExist'), "");
}
});
......@@ -158,7 +164,10 @@ CHECKVIEW.showContentView = function(strContentId) {
contentType = data.contentData.contentType;
if (contentType == COMMON.ContentTypeKeys.Type_Others) {
// Download content
HEADER.downloadResourceById(strContentId);
COMMON.downloadResourceById(strContentId);
} else if (contentType == COMMON.ContentTypeKeys.Type_Link) {
// link content
COMMON.viewLinkContentById(strContentId, false);
} else {
// Go to Conten view page
// アラート表示組み込めるか
......@@ -181,7 +190,7 @@ CHECKVIEW.showContentView = function(strContentId) {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Login);
} else {
// アラートメッセージ表示
CHECKVIEW.showAlertScreen(I18N.i18nText('msgContentNotExist'), "abvw/" + COMMON.ScreenIds.Home);
LOGIN.showAlertScreen(I18N.i18nText('msgContentNotExist'), "");
}
});
......@@ -205,3 +214,4 @@ CHECKVIEW.debugLog = function(msg){
//$("#debug").html(msg);
};
//名前空間用のオブジェクトを用意する
var HOME_CHECK = {};
HOME_CHECK.DEFAULT_SORT_TYPE = "3";
HOME_CHECK.DEFAULT_SORT_ORDER = "2";
HOME_CHECK.DEFAULT_SEARCH_DIVISION = 0;
HOME_CHECK.home_realTotalRecord = 0;
// Thumbnail array
HOME_CHECK.thumbnailArr = [];
// Content type array.
HOME_CHECK.contentTypeArr = [];
HOME_CHECK.contentIdArray = [];
HOME_CHECK.totalPage;
// スクロール復帰
HOME_CHECK.scrollTop = 0;
HOME_CHECK.projectTypeArr = []; //ProjectType array.
// ==========================================================
$(document).ready(function() {
if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)) {
return;
}
document.title = I18N.i18nText('dspHome') + ' | ' + I18N.i18nText('sysAppTitle');
// プロジェクト一覧 初期表示
HOME_CHECK.initProjectView();
// Go To Details Page
//$('.button-report-details').live('click', HOME_CHECK.reportClickFunction);
//$('.button-report-details').live('touchend', HOME_CHECK.reportClickFunction);
// ビューア、共有表示パーツ読み込み
$("#viewer").load("./inc_contentview.html?__UPDATEID__", function(myData, myStatus, xhr) {
// 読み込み完了時の処理
I18N.i18nReplaceText();
});
});
// Initial Project Screen
HOME_CHECK.initProjectView = function() {
var sid = ClientData.userInfo_sid();
// Render Project
HOME_CHECK.renderProject(sid);
};
// Initial Content Screen
HOME_CHECK.initContentView = function() {
var sortType = HOME_CHECK.DEFAULT_SORT_TYPE;
var sortOrder = HOME_CHECK.DEFAULT_SORT_ORDER;
var searchText = '';
var searchDivision = HOME_CHECK.DEFAULT_SEARCH_DIVISION;
var genreId = '';
var groupId = '';
var sid = ClientData.userInfo_sid();
var offsetPage = 0;
var limitPage = 999; //暫定
//初期化
ClientData.searchCond_recordFrom(0);
ClientData.searchCond_recordTo(0);
ClientData.searchCond_sortType(sortType);
ClientData.searchCond_sortOrder(sortOrder);
ClientData.searchCond_searchText(searchText);
ClientData.searchCond_searchDivision(searchDivision);
ClientData.searchCond_genreId(genreId);
ClientData.searchCond_groupId(groupId);
// Language Handle
//HOME.handleLanguage();
// handle
//HOME.handleSortDisp();
$('#listValues').hide();
$('#content-grid').show();
// Refresh GridView
HOME_CHECK.refreshGrid();
//HOME.resetShowNextRecordCount();
// Render Gridview
HOME_CHECK.renderContent(sid, searchText, searchDivision, sortType, sortOrder, offsetPage, limitPage, genreId, groupId);
// Go To Details Page
$('.button-details').live('click', HOME_CHECK.readSubmenuFunction);
$('.button-details').live('touchend', HOME_CHECK.readSubmenuFunction);
$('.button-details').live('touchmove', function() {
//HOME_CHECK.home_isMove = true;
});
};
// refresh GridView
HOME_CHECK.refreshGrid = function() {
$('#control-nextrecord').hide();
$('#content-grid').html('');
$('.pageNumControl').css('visibility', 'hidden');
};
// /Render Content
HOME_CHECK.renderContent = function(id, text, division, type, order, offset, limit, cateid, grpid) {
var params = {
sid : id,
searchText : text,
searchDivision : division,
sortType : type,
sortOrder : order,
recordFrom : offset,
recordTo : limit,
genreId : cateid,
groupId : grpid
};
HOME_CHECK.abapi('webContentList', params, 'POST', function(data) {
var countCnt = 0;
var versionArr = ClientData.ResourceVersion();
var metaArr = ClientData.MetaVersion();
var readArr = ClientData.ReadingContentIds();
$.each(data.contentList, function(i, post) {
var outputDate = COMMON.formatDeliveryDate(post.contentDeliveryDate);
var gridHtml = '<section class="sectionhomelist">'
+ ' <div class="cnt_section_list">'
+ ' <a class="img">'
+ ' <canvas height="110" width="150" id="content-thumbnail' + post.contentId + '" contentid="' + post.contentId + '" style="display:none;"></canvas>'
+ ' <img id="loadingIcon' + post.contentId + '" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 46px; "/>'
+ ' </a>'
+ ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="dialog name lang" lang="lblTitle" contentid="' + post.contentId + '">'
+ ' <img class="listIcon" src="' + COMMON.getIconTypeContent(post.contentType) + '" width="20" height="20" style="float:left">'
+ ' <div class="content-list" style="">' + post.contentTitle + '</div>'
+ ' </a>'
+ ' <div class="info">'
+ ' <ul class="date">'
+ ' <li><span class="lang" lang="txtPubDt"> </span>:' + outputDate + '</li>'
+ ' <li><span class="lang" lang="txtViewDt"> </span>:<span id="lblVdate' + post.contentId + '"> </span></li>'
+ ' </ul>'
+ ' <ul class="pic">'
//+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentId + '" class="sticker" /></li>'
//+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentId + '" class="pen" /></li>'
+ ' <li><ul class="iconList"><li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">読む</a></li></ul></li>'
+ ' </ul>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ '</section>';
//var shareHtml = "";
//if (post.readerShare == '1') {
// shareHtml = '<li><a class="read lang button-share" contentid="' + post.contentId + '" lang="txtShare">共有</a></li>';
//}
//gridHtml = gridHtml.replace(/\{share\}/g, shareHtml);
$('#content-grid').append(gridHtml);
//HOME.getNextRecordNumForList();
// assign thumbnail to array
var formatThumbnail = post.contentThumbnail;
if ((formatThumbnail != null) && (formatThumbnail != 'undefined') && (formatThumbnail != '')) {
formatThumbnail = COMMON.formatStringBase64(formatThumbnail);
}
HOME_CHECK.thumbnailArr.push({
contentId : post.contentId,
thumbnail : formatThumbnail
});
// assign content type to array
HOME_CHECK.contentTypeArr.push({
contentId : post.contentId,
contentType : post.contentType
});
// save alert message level
LIMIT_ACCESS_CONTENT.messageLevel[post.contentId] = {
alertMessageLevel : post.alertMessageLevel,
alertMessage : post.alertMessage
};
// Check if user has read this content or not.
HOME_CHECK.checkUserHasReadContent(post.contentId, post.resourceVersion, post.metaVersion, versionArr, metaArr, readArr);
// assign version to array
COMMON.resourceVersionArr.push({
contentid : post.contentId,
resourceversion : post.resourceVersion
});
// assign meta version to array
COMMON.metaVersionArr.push({
contentid : post.contentId,
metaversion : post.metaVersion
});
// Check if content has marking or memo
//HOME_CHECK.checkContentMarkingMemoOption(post.contentId);
// renderViewDate
var viewdate = HOME_CHECK.renderViewDate(post.contentId,readArr);
if (viewdate != null || viewdate != 'undefined') {
$('#lblVdate' + post.contentId).html(viewdate);
}
});
HOME_CHECK.home_realTotalRecord += data.contentList.length;
// Save total record for tree:genere/group
//if (cateid == '' && grpid == '') {
// if (HOME.genre_totalcontent == -1) {
// HOME.genre_totalcontent = data.totalRecord;
// }
// if (HOME.group_totalcontent == -1) {
// HOME.group_totalcontent = data.totalRecord;
// }
//}
ClientData.searchCond_recordFrom(data.recordFrom);
ClientData.searchCond_recordTo(data.recordTo);
HOME_CHECK.totalPage = data.totalRecord;
//HOME.reRenderPageNumber(ClientData.searchCond_recordTo(), HOME.totalPage);
// Toggle scroll to top Control
//HOME.handleBackToTop();
// I18N.changeLanguage(ClientData.userInfo_language());
I18N.i18nReplaceText();
});
};
// Get Thumnail base on contentid
HOME_CHECK.returnThumbnail = function(contentid) {
var iArrCnt = HOME_CHECK.thumbnailArr.length;
for ( var i = 0; i < iArrCnt; i++) {
if (HOME_CHECK.thumbnailArr[i].contentId == contentid) {
return HOME_CHECK.thumbnailArr[i].thumbnail;
}
}
};
// Get content type base on contentid
HOME_CHECK.returnContentType = function(contentid) {
// Array Length
var iArrCnt = HOME_CHECK.contentTypeArr.length;
// Get contentType in array by contentId
for ( var i = 0; i < iArrCnt; i++) {
if (HOME_CHECK.contentTypeArr[i].contentId == contentid) {
return HOME_CHECK.contentTypeArr[i].contentType;
}
}
};
// Check if User has read content
HOME_CHECK.checkUserHasReadContent = function(contId, resourceVer, metaVer, versionArr, metaArr, readArr) {
var imgThumb = new Image();
var imgIconNew = new Image();
var imgIconEdit = new Image();
var c = document.getElementById('content-thumbnail' + contId);
var ctx = c.getContext('2d');
var readFlg = false;
var contentThumbnail = HOME_CHECK.returnThumbnail(contId);
var contentType = HOME_CHECK.returnContentType(contId);
if (readArr <= 0) {
imgThumb.onload = function() {
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconNew.onload = function() {
ctx.drawImage(imgIconNew, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
$("#loadingIcon" + contId).fadeOut('slow', function() {
$('#content-thumbnail' + contId).fadeIn('slow');
});
};
imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
};
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
}
} else {
imgThumb.src = contentThumbnail;
}
} else {
// Check if user has read this content or not
for ( var nIndex1 = 0; nIndex1 < ClientData.ReadingContentIds().length; nIndex1++) {
if (ClientData.ReadingContentIds()[nIndex1].contentid == contId) {
imgThumb.onload = function() {
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
$("#loadingIcon" + contId).fadeOut('slow', function() {
$('#content-thumbnail' + contId).fadeIn('slow');
});
};
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
}
} else {
imgThumb.src = contentThumbnail;
}
readFlg = true;
break;
}
}
}
// Check if resource version has change
if (readFlg) {
if (versionArr == null || versionArr <= 0 || versionArr == 'undefined') {
} else {
for ( var nIndex2 = 0; nIndex2 < versionArr.length; nIndex2++) {
if (versionArr[nIndex2].contentid == contId) {
if (versionArr[nIndex2].resourceversion != resourceVer) {
imgThumb.onload = function() {
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconEdit.onload = function() {
ctx.drawImage(imgIconEdit, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
$("#loadingIcon" + contId).fadeOut('slow', function() {
$('#content-thumbnail' + contId).fadeIn('slow');
});
};
imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
};
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
}
} else {
imgThumb.src = contentThumbnail;
}
break;
}
}
}
}
if (metaArr == null || metaArr <= 0 || metaArr == 'undefined') {
} else {
for ( var nIndex2 = 0; nIndex2 < metaArr.length; nIndex2++) {
if (metaArr[nIndex2].contentid == contId) {
if (metaArr[nIndex2].metaversion != metaVer) {
imgThumb.onload = function() {
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconEdit.onload = function() {
ctx.drawImage(imgIconEdit, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
$("#loadingIcon" + contId).fadeOut('slow', function() {
$('#content-thumbnail' + contId).fadeIn('slow');
});
};
imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
};
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
}
} else {
imgThumb.src = contentThumbnail;
}
break;
}
}
}
}
} else {
imgThumb.onload = function() {
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconNew.onload = function() {
ctx.drawImage(imgIconNew, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
$("#loadingIcon" + contId).fadeOut('slow', function() {
$('#content-thumbnail' + contId).fadeIn('slow');
});
};
imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
};
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
}
} else {
imgThumb.src = contentThumbnail;
}
}
};
// draw Edit Image
HOME_CHECK.drawEditImage = function(id) {
var img = new Image();
var imgSrc = HOME_CHECK.returnThumbnail(id);
if (imgSrc != null) {
} else {
var contentType = HOME_CHECK.returnContentType(id);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgSrc = src;
}
}
var c = document.getElementById('content-thumbnail' + id);
// use getContext to use the canvas for drawing
var ctx = c.getContext('2d');
ctx.clearRect(0, 0, c.width, c.height);
img.onload = function() {
var resizeImg = COMMON.resizeResourceThumbnail(img, c.width, c.height);
ctx.drawImage(img, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
$("#loadingIcon" + id).fadeOut('slow', function() {
$('#content-thumbnail' + id).fadeIn('slow');
});
};
img.src = imgSrc;
};
// Render User view date
HOME_CHECK.renderViewDate = function(id, readArr) {
for ( var i = 0; i < readArr.length; i++) {
if (readArr[i].contentid == id) {
return readArr[i].viewdate;
}
}
};
// Dialog Read Button CLick
HOME_CHECK.readSubmenuFunction = function(e) {
if (e) {
e.preventDefault();
}
//HOME_CHECK.allowTimerCloseSubMenu = false;
//if (HOME_CHECK.home_isMove == true) {
// HOME_CHECK.home_isMove = false;
// return;
//}
// hide dialog sub menu
//$('#dlgSubMenu').hide();
var contentId = $(this).attr('contentid');
// check limit of content
LIMIT_ACCESS_CONTENT.checkLimitContent(contentId, function() {
HOME_CHECK.readSubmenuFunction_callback(contentId);
}, function() {
});
};
// Dialog Read Button CLick callback
HOME_CHECK.readSubmenuFunction_callback = function(contentId) {
var contentThumbnail = HOME_CHECK.returnThumbnail(contentId);
var date = new Date();
var month = date.getMonth() + 1;
var day = date.getDate();
var outputDate = COMMON.formatNormalDate(day, month, date.getFullYear());
ClientData.contentInfo_contentId(contentId);
ClientData.contentInfo_contentThumbnail(contentThumbnail);
var contentType = HOME_CHECK.returnContentType(contentId);
ClientData.contentInfo_contentType(contentType);
var checkflag = false;
// Store Content id that user has read
HOME_CHECK.contentIdArray = ClientData.ReadingContentIds();
if (HOME_CHECK.contentIdArray.length > 0) {
for ( var nIndex = 0; nIndex < HOME_CHECK.contentIdArray.length; nIndex++) {
if (HOME_CHECK.contentIdArray[nIndex].contentid == contentId) {
checkflag = true;
if (HOME_CHECK.contentIdArray[nIndex].viewdate == '' || HOME_CHECK.contentIdArray[nIndex].viewdate == null || HOME_CHECK.contentIdArray[nIndex].viewdate == 'undefined') {
HOME_CHECK.contentIdArray[nIndex].viewdate = outputDate;
HOME_CHECK.contentIdArray[nIndex].originviewdate = date;
}
break;
}
}
if (!checkflag) {
HOME_CHECK.contentIdArray.push({
contentid : contentId,
viewdate : outputDate,
originviewdate : date
});
}
} else {
HOME_CHECK.contentIdArray.push({
contentid : contentId,
viewdate : outputDate,
originviewdate : date
});
}
// Renew ReadingContentID
var newArray = [];
ClientData.ReadingContentIds(newArray);
// Set ResouceVersion for content
COMMON.setResourceVersionData(contentId);
// Set MetaVersion for content
COMMON.setMetaVersionData(contentId);
// Set data for readingcontentid
ClientData.ReadingContentIds(HOME_CHECK.contentIdArray);
// Close Submenu
$('#dlgSubMenu').hide();
// $('body,html').animate({ scrollTop: 0 }, 0);
ClientData.IsRefresh(false);
// For testing without other Type.
if (contentType == COMMON.ContentTypeKeys.Type_Others) {
// Download content
COMMON.downloadResourceById(contentId);
// redraw content remove new icon
HOME_CHECK.drawEditImage(contentId);
} else if (contentType == COMMON.ContentTypeKeys.Type_Link) {
// link content
COMMON.viewLinkContentById(contentId, true);
// redraw content remove new icon
HOME_CHECK.drawEditImage(contentId);
} else {
// Go to Conten view page
HOME_CHECK.drawEditImage(contentId);
HOME_CHECK.showContentView();
}
};
$(function() {
//HOME_CHECK.cssInit();
});
HOME_CHECK.cssInit = function() {
$('html').css({
'overflow-y' : 'scroll'
});
$('html,body').css({
'height' : '100%',
'margin' : '0',
'padding' : '0'
});
//$('html>body').css({
// 'font-size' : '16px',
// 'font-size' : '68.75%'
//});
$('body').css({
'background' : '#f4f4f4',
'color' : '#333'
});
};
HOME_CHECK.showContentView = function() {
var y = 0;
if (document.documentElement.scrollTop) {
y = document.documentElement.scrollTop;
}
if (document.body.scrollTop) {
if (y == undefined || y == 0) {
y = document.body.scrollTop;
}
}
if (y == undefined || y == null) {
y = 0;
}
HOME_CHECK.scrollTop = y;
window.scrollTo(0, 0);
// 試験
$("#header-ws").hide();
$("#ws-body").hide();
$("#topcontrol").hide();
CONTENTVIEW_INITOBJECT.clearViewerComponent();
CONTENTVIEW.cssInit();
$("#viewer").show();
// CONTENTVIEW_FILESYSTEM.initFS(CONTENTVIEW.ready);
CONTENTVIEW.ready();
};
// /Render Project
HOME_CHECK.renderProject = function(sid) {
var params = {
sid : sid
};
HOME_CHECK.checkApi('webProjectList', params, 'POST', function(data) {
var countCnt = 0;
$.each(data.projectList, function(i, post) {
HOME_CHECK.renderAddProject(post);
// assign content type to array
HOME_CHECK.projectTypeArr.push({
projectId : post.projectId,
projectType : post.projectType
});
});
});
};
HOME_CHECK.renderAddProject = function(post) {
var listLi = $("<li></li>", {
id: "list_" + post.projectId,
class: "read"
});
var startDate = "-/-/-";
var endDate = "-/-/-";
startDate = post.projectStartDate.replace(/-/g, '/');
endDate = post.projectEndDate.replace(/-/g, '/');
var taskInfo = $("<div/>", {class: "taskInfoDiv"});
var codeAndExpiration = $("<ul/>", {class: "codeAndExpiration"});
codeAndExpiration.append($("<li/>", {class: "period"}).text("期間:" + startDate + " ~ " + endDate));
taskInfo.append(codeAndExpiration);
taskInfo.append($("<p/>").text(post.projectName));
taskInfo.append($("<p/>", {class: "workContent"}).text(post.projectDescriptions));
listLi.append(taskInfo);
var actionBtnDiv = $("#actionBtnDiv").clone().attr("id", post.projectId + "_actionBtnDiv");
actionBtnDiv.css("display", "flex");
$(actionBtnDiv.children()[0]).on("click", function() {
//CHK.reportMode = "1";
HOME_CHECK.createSession(post.projectId, post.projectType, post.projectReportType);
});
$(actionBtnDiv.children()[1]).hide();
$(actionBtnDiv.children()[2]).on("click", function() {
//CHK.reportMode = "1";
//HOME_CHECK.createSession(post.projectId);
HOME_CHECK.initContentView();
});
listLi.append(actionBtnDiv);
$(".addition_list").append(listLi);
};
// Report Click function
HOME_CHECK.reportClickFunction = function(e) {
if (e) {
e.preventDefault();
}
//if (HOME.home_isMove == true) {
// HOME.home_isMove = false;
// return;
//}
var projectId = $(this).attr('id');
HOME_CHECK.createSession(projectId);
};
HOME_CHECK.createSession = function(projectId, projectType, projectReportType) {
var checkApiUrl = AVWEB.getCheckApiUrl(ClientData.userInfo_accountPath()) + "/webCreateSession/";
//var type = HOME_CHECK.returnProjectType(projectId);
var linkUrl = AVWEB.getShopApiUrl(ClientData.userInfo_accountPath()) + "/vtour/report/" + projectId + "/?view_mode=1&project_type=" + projectType + "&project_report_type=" + projectReportType + "&is_cms=0&is_web=1";
console.log("linkUrl:" + linkUrl);
var params = {
sid: ClientData.userInfo_sid()
};
var sysSettings = AVWEB.avwSysSetting();
// ajax によるAPIの実行(dataType text)
$.ajax( {
async: false,
type: 'GET',
url: checkApiUrl,
dataType: 'text',
data: params,
crossDomain: true,
beforeSend: function(xhr) {
xhr.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xhr.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
},
success: function(data) {
//var linkUrlTmp2 = linkUrl + "&;jsessionid=" + data;
window.open().location.href = linkUrl;
},
error: function(xmlHttpRequest, txtStatus, errorThrown) {
/* call custom error process */
AVWEB.avwLog("error" + errorThrown);
}
});
};
// Get project type base on projectId
HOME_CHECK.returnProjectType = function(projectId) {
// Array Length
var iArrCnt = HOME_CHECK.projectTypeArr.length;
// Get contentType in array by contentId
for ( var i = 0; i < iArrCnt; i++) {
if (HOME_CHECK.projectTypeArr[i].projectId == projectId) {
return HOME_CHECK.projectTypeArr[i].projectType;
}
}
return -1;
};
// Call API
HOME_CHECK.checkApi = function(name, params, method, callback) {
var checkApiUrl = ClientData.conf_checkApiUrl(); // sysSettings.checkApiUrl;
AVWEB.avwCmsApiWithUrl(checkApiUrl, ClientData.userInfo_accountPath(), name, method, params, callback, null);
};
// Call API
HOME_CHECK.abapi = function(name, param, method, callback) {
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), name, method, param, callback, null);
};
......@@ -237,7 +237,7 @@ CONTENTSEARCH.renderContent = function(id, text, division, type, order, offset,
+ ' </a>'
+ ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="name dialog" contentid="' + post.contentId + '">'
+ ' <img class="listIcon" src="' + HEADER.getIconTypeContent(post.contentType) + '" width="20" height="20">'
+ ' <img class="listIcon" src="' + COMMON.getIconTypeContent(post.contentType) + '" width="20" height="20">'
+ ' <div class="contentsearch_title">' + post.contentTitle + '</div>'
+ ' </a>'
+ ' <div class="info">'
......@@ -760,12 +760,12 @@ CONTENTSEARCH.readSubmenuFunction_callback = function(contentId) {
// For testing without other Type.
if (contentType == COMMON.ContentTypeKeys.Type_Others) {
// Download content
HEADER.downloadResourceById(contentId);
COMMON.downloadResourceById(contentId);
// redraw content remove new icon
CONTENTSEARCH.drawEditImage(contentId);
} else if (contentType == COMMON.ContentTypeKeys.Type_Link) {
// link content
HEADER.viewLinkContentById(contentId);
COMMON.viewLinkContentById(contentId, true);
// redraw content remove new icon
CONTENTSEARCH.drawEditImage(contentId);
} else {
......@@ -829,7 +829,7 @@ CONTENTSEARCH.checkUserHasReadContent = function(contId, resourceVer, metaVer, v
if (readArr == null || readArr <= 0 || readArr == 'undefined') {
imgThumb.onload = function() {
var resizeImg = CONTENTSEARCH.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconNew.onload = function() {
ctx.drawImage(imgIconNew, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
......@@ -842,7 +842,7 @@ CONTENTSEARCH.checkUserHasReadContent = function(contId, resourceVer, metaVer, v
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -856,7 +856,7 @@ CONTENTSEARCH.checkUserHasReadContent = function(contId, resourceVer, metaVer, v
for ( var nIndex1 = 0; nIndex1 < ClientData.ReadingContentIds().length; nIndex1++) {
if (ClientData.ReadingContentIds()[nIndex1].contentid == contId) {
imgThumb.onload = function() {
var resizeImg = CONTENTSEARCH.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
$("#loadingIcon" + contId).fadeOut('slow', function() {
$('#content-thumbnail' + contId).fadeIn('slow');
......@@ -865,7 +865,7 @@ CONTENTSEARCH.checkUserHasReadContent = function(contId, resourceVer, metaVer, v
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -888,7 +888,7 @@ CONTENTSEARCH.checkUserHasReadContent = function(contId, resourceVer, metaVer, v
if (versionArr[nIndex2].contentid == contId) {
if (versionArr[nIndex2].resourceversion != resourceVer) {
imgThumb.onload = function() {
var resizeImg = CONTENTSEARCH.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconEdit.onload = function() {
ctx.drawImage(imgIconEdit, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
......@@ -903,7 +903,7 @@ CONTENTSEARCH.checkUserHasReadContent = function(contId, resourceVer, metaVer, v
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -925,7 +925,7 @@ CONTENTSEARCH.checkUserHasReadContent = function(contId, resourceVer, metaVer, v
if (metaArr[nIndex2].contentid == contId) {
if (metaArr[nIndex2].metaversion != metaVer) {
imgThumb.onload = function() {
var resizeImg = CONTENTSEARCH.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconEdit.onload = function() {
ctx.drawImage(imgIconEdit, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
......@@ -938,7 +938,7 @@ CONTENTSEARCH.checkUserHasReadContent = function(contId, resourceVer, metaVer, v
// thumbnail.
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -955,7 +955,7 @@ CONTENTSEARCH.checkUserHasReadContent = function(contId, resourceVer, metaVer, v
}
} else {
imgThumb.onload = function() {
var resizeImg = CONTENTSEARCH.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconNew.onload = function() {
ctx.drawImage(imgIconNew, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
......@@ -968,7 +968,7 @@ CONTENTSEARCH.checkUserHasReadContent = function(contId, resourceVer, metaVer, v
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -989,7 +989,7 @@ CONTENTSEARCH.drawEditImage = function(id) {
} else {
var contentType = CONTENTSEARCH.returnContentType(id);
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgSrc = src;
}
......@@ -1001,7 +1001,7 @@ CONTENTSEARCH.drawEditImage = function(id) {
var ctx = c.getContext('2d');
ctx.clearRect(0, 0, c.width, c.height);
img.onload = function() {
var resizeImg = CONTENTSEARCH.resizeResourceThumbnail(img, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(img, c.width, c.height);
ctx.drawImage(img, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
$("#loadingIcon" + id).fadeOut('slow', function() {
$('#content-thumbnail' + id).fadeIn('slow');
......@@ -1219,19 +1219,6 @@ CONTENTSEARCH.enableSort = function() {
}
};
CONTENTSEARCH.resizeResourceThumbnail = function(mg, width, height) {
var newWidth;
var newHeight;
var delta = Math.min(width / mg.width, height / mg.height);
newHeight = parseInt(delta * mg.height);
newWidth = parseInt(delta * mg.width);
var result = [ newWidth, newHeight ];
return result;
};
CONTENTSEARCH.removeHoverCss = function() {
if (COMMON.isTouchDevice()) {
$('#control-sort-title').removeClass('nottouchdevice');
......@@ -1331,6 +1318,6 @@ CONTENTSEARCH.downloadSubmenuFunction = function(e) {
var contentId = $(this).attr('contentid');
// Download content
HEADER.downloadResourceById(contentId);
COMMON.downloadResourceById(contentId);
};
......@@ -2159,6 +2159,7 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
if( resourceUrl == null ){
resourceUrl = CONTENTVIEW.downloadResourceById(CONTENTVIEW_GENERAL.contentID);
}
//CONTENTVIEW_GENERAL.contentType = COMMON.ContentTypeKeys.Type_Html;
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Music){
CONTENTVIEW.handleForContentTypeMusic(resourceUrl);
......@@ -5844,12 +5845,24 @@ CONTENTVIEW.screenBack = function(){
//元の位置に戻す
window.scrollTo(0,CONTENTSEARCH.scrollTop);
} else if( $('#home_check').length ){
HOME_CHECK.cssInit();
//$("#header-ws").show();
$("#ws-body").show();
//$("#topcontrol").show();
//document.title = I18N.i18nText('txtSearchResult') + ' | ' + I18N.i18nText('sysAppTitle');
//元の位置に戻す
window.scrollTo(0,HOME_CHECK.scrollTop);
}
//プッシュメッセージ再開
// check new push message
if (COMMON.isAnonymousLogin() == false ) {
// continue check new push message
setTimeout(HEADER.getPushMessageNew, HEADER.getTimeWaitCheckNewPushMessage());
if( $('#header-ws').length ){
//プッシュメッセージ再開
// check new push message
if (COMMON.isAnonymousLogin() == false ) {
// continue check new push message
setTimeout(HEADER.getPushMessageNew, HEADER.getTimeWaitCheckNewPushMessage());
}
}
};
......@@ -6326,10 +6339,10 @@ CONTENTVIEW.panoContentLink = function(targetContentId, page){
}
else if(data.contentData.alertMessageLevel == CONTENTVIEW_CREATEOBJECT.alertMessageLevel.None){
if(data.contentData.contentType == COMMON.ContentTypeKeys.Type_Link){
HEADER.viewLinkContentById(targetContentId);
COMMON.viewLinkContentById(targetContentId, true);
}else if(data.contentData.contentType == COMMON.ContentTypeKeys.Type_Others){
HEADER.downloadResourceById(targetContentId);
COMMON.downloadResourceById(targetContentId);
}else{
ClientData.common_preContentId(targetContentId);
ClientData.common_prePageNo(page);
......
......@@ -1457,7 +1457,7 @@ CONTENTVIEW_CREATEOBJECT.moveToContent = function (mediaType, actionType, id, im
}
else if(data.contentData.alertMessageLevel == CONTENTVIEW_CREATEOBJECT.alertMessageLevel.None){
if(data.contentData.contentType == COMMON.ContentTypeKeys.Type_Link){
HEADER.viewLinkContentById(contentId);
COMMON.viewLinkContentById(contentId, true);
}else{
ClientData.common_preContentId(contentId);
ClientData.common_prePageNo(pageNo);
......@@ -1560,10 +1560,10 @@ CONTENTVIEW_CREATEOBJECT.createAlertTypeDialog = function(msg, contentType){
$('#dialog a#contentAlertOk').click(function(){
if(contentType == COMMON.ContentTypeKeys.Type_Link){
HEADER.viewLinkContentById(CONTENTVIEW_CREATEOBJECT.moveContentParam.preContentId);
COMMON.viewLinkContentById(CONTENTVIEW_CREATEOBJECT.moveContentParam.preContentId, true);
}else if(contentType == COMMON.ContentTypeKeys.Type_Others){
HEADER.downloadResourceById(CONTENTVIEW_CREATEOBJECT.moveContentParam.preContentId);
COMMON.downloadResourceById(CONTENTVIEW_CREATEOBJECT.moveContentParam.preContentId);
}else{
ClientData.common_preContentId(CONTENTVIEW_CREATEOBJECT.moveContentParam.preContentId);
ClientData.common_prePageNo(CONTENTVIEW_CREATEOBJECT.moveContentParam.prePageNo);
......@@ -1638,10 +1638,10 @@ CONTENTVIEW_CREATEOBJECT.createPwdRequiredTypeDialog = function(contentType){
function (data) {
if (data.result == 'success') {
if(contentType == COMMON.ContentTypeKeys.Type_Link){
HEADER.viewLinkContentById(CONTENTVIEW_CREATEOBJECT.moveContentParam.preContentId);
COMMON.viewLinkContentById(CONTENTVIEW_CREATEOBJECT.moveContentParam.preContentId, true);
}else if(contentType == COMMON.ContentTypeKeys.Type_Others){
HEADER.downloadResourceById(CONTENTVIEW_CREATEOBJECT.moveContentParam.preContentId);
COMMON.downloadResourceById(CONTENTVIEW_CREATEOBJECT.moveContentParam.preContentId);
}else{
ClientData.common_preContentId(CONTENTVIEW_CREATEOBJECT.moveContentParam.preContentId);
ClientData.common_prePageNo(CONTENTVIEW_CREATEOBJECT.moveContentParam.prePageNo);
......
......@@ -1346,8 +1346,13 @@ CONTENTVIEW_EVENTS.imgHome_click = function(e) {
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
COMMON.RegisterLog();
//window.location.href = COMMON.ScreenIds.Home;
AVWEB.avwScreenMove(COMMON.ScreenIds.Home);
// ホームへ移動
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove(COMMON.ScreenIds.HomeCheck);
} else {
AVWEB.avwScreenMove(COMMON.ScreenIds.Home);
}
};
CONTENTVIEW_EVENTS.closePopUpCopyMemo = function() {
......
......@@ -642,7 +642,7 @@ CONTENTVIEW_INITOBJECT.initPageMediaAndHtmlType = function(){
}
//Display overlay dialog for specify content type
CONTENTVIEW.displayOverlayForSpecifyContentType();
CONTENTVIEW.displayOverlayForSpecifyContentType(null);
//Resize window
$(window).resize(function () {
......
......@@ -204,11 +204,11 @@ DETAIL.contentdetail_dspRead_Click_callback = function(outputId) {
if (ClientData.contentInfo_contentType() == COMMON.ContentTypeKeys.Type_Others) {
// Get content detail
HEADER.downloadResourceById(ClientData.contentInfo_contentId());
COMMON.downloadResourceById(ClientData.contentInfo_contentId());
}
else if(ClientData.contentInfo_contentType() == COMMON.ContentTypeKeys.Type_Link){
// Get content detail
HEADER.viewLinkContentById(ClientData.contentInfo_contentId());
COMMON.viewLinkContentById(ClientData.contentInfo_contentId(), true);
}
else {
//AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
......@@ -252,7 +252,7 @@ DETAIL.showContentNotPDF = function(displayData) {
if(displayData.contentThumbnail == '' || displayData.contentThumbnail == null || displayData.contentThumbnail == 'undefined'){
if(!COMMON.isPdfContent(tempContentType)){
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if( src != '' ){
displayData.contentThumbnail = src;
}
......
......@@ -1036,195 +1036,3 @@ HEADER.setStatusSort = function(currentid, isAsc) {
$('#menu_sort li').removeClass('current');
$(currentid).addClass(isAsc ? 'ascending_sort' : 'descending_sort').parent().addClass("current");
};
// get icon of content type
HEADER.getIconTypeContent = function(contentType) {
var src = '';
switch (contentType) {
case COMMON.ContentTypeKeys.Type_PDF:
{
src = 'img/bookshelf/icon_01.png';
break;
}
case COMMON.ContentTypeKeys.Type_Enquete:
{
src = 'img/bookshelf/icon_09.png';
break;
}
case COMMON.ContentTypeKeys.Type_Exam:
{
src = 'img/bookshelf/icon_10.png';
break;
}
case COMMON.ContentTypeKeys.Type_Html:
{
src = 'img/bookshelf/icon_05.png';
break;
}
case COMMON.ContentTypeKeys.Type_Image:
{
src = 'img/bookshelf/icon_02.png';
break;
}
case COMMON.ContentTypeKeys.Type_Music:
{
src = 'img/bookshelf/icon_06.png';
break;
}
case COMMON.ContentTypeKeys.Type_NoFile:
{
src = 'img/bookshelf/icon_07.png';
break;
}
case COMMON.ContentTypeKeys.Type_Others:
{
src = 'img/bookshelf/icon_03.png';
break;
}
case COMMON.ContentTypeKeys.Type_Video:
{
src = 'img/bookshelf/icon_04.png';
break;
}
case COMMON.ContentTypeKeys.Type_Link:
{
src = 'img/bookshelf/icon_08.png';
break;
}
case COMMON.ContentTypeKeys.Type_PanoMovie:
{
src = 'img/bookshelf/icon_11.png';
break;
}
case COMMON.ContentTypeKeys.Type_PanoImage:
{
src = 'img/bookshelf/icon_12.png';
break;
}
case COMMON.ContentTypeKeys.Type_ObjectVR:
{
src = 'img/bookshelf/icon_13.png';
break;
}
default: break;
}
return src;
};
// download resouce content id
HEADER.downloadResourceById = function(contentId){
var params = {
sid: ClientData.userInfo_sid(),
contentId: contentId,
getType: '2'
};
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", "get", params,
function (data) {
//Get resourceurl
if( data.contentData.content ){
var resourceUrl = HEADER.getResourceByIdFromAPI(data.contentData.content.resourceId);
// open url to download file
if (HEADER.isSafariNotOnIpad()) {
window.onbeforeunload = null;
window.open(resourceUrl, "_self"); // open url to download file on safari not for ipad
var toogleTime = setTimeout(function () { COMMON.ToogleLogoutNortice() }, 200);
}
else {
window.open(resourceUrl); //open url to download file on orther browser
}
} else {
alert("ダウンロード出来ません。");
}
},
function (xhr, b, c) { }
);
};
//Download resource
HEADER.getResourceByIdFromAPI = function(resourceId){
return AVWEB.getURL("webResourceDownload") + "&sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
};
// check is browser safari on Mac and Window devide ( not Ipad )
HEADER.isSafariNotOnIpad = function() {
if (!window.chrome) {
var ua = navigator.userAgent.toLowerCase();
if (!/ipad/.test(ua) && /safari/.test(ua)) {
return true;
}
}
return false;
};
//link content
HEADER.viewLinkContentById = function(contentId){
var params = {
sid: ClientData.userInfo_sid(),
contentId: contentId,
getType: '2'
};
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", "get", params,
function (data) {
//Get linkUrl
var linkUrl = data.contentData.content.url;
if( !linkUrl ){
return;
}
window.open(linkUrl, "_blank", "new window, scrollbars=yes");
/*
//httpで始まる場合は別ウィンドウで開く
if (linkUrl.toLowerCase().indexOf('http') === 0) {
window.open(linkUrl, "_blank", "new window, scrollbars=yes");
}
else if( linkUrl.toLowerCase().indexOf('mailto') === 0 ){
//window.open(linkUrl, "_self");
location.href=linkUrl;
}
else {
// open url to download file
if (HEADER.isSafariNotOnIpad()) {
window.onbeforeunload = null;
window.open(linkUrl, "_self"); // open url to download file on safari not for ipad
var toogleTime = setTimeout(function () { COMMON.ToogleLogoutNortice() }, 200);
}
else {
window.open(linkUrl); //open url to download file on orther browser
}
}
*/
},
function (xhr, b, c) { });
};
// get ThumbnailForOtherType
HEADER.getThumbnailForOtherType = function(contentType){
var src = '';
if(contentType == COMMON.ContentTypeKeys.Type_Image){
src = COMMON.ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == COMMON.ContentTypeKeys.Type_Music){
src = COMMON.ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == COMMON.ContentTypeKeys.Type_Video){
src = COMMON.ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == COMMON.ContentTypeKeys.Type_NoFile){
src = COMMON.ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == COMMON.ContentTypeKeys.Type_Others){
src = COMMON.ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == COMMON.ContentTypeKeys.Type_Html){
src = COMMON.ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == COMMON.ContentTypeKeys.Type_Link){
src = COMMON.ThumbnailForOtherType.Thumbnail_LinkType;
}
return src;
};
......@@ -643,12 +643,12 @@ HISTORY.readSubmenuFunction_callback = function(contentId) {
if (contentType == COMMON.ContentTypeKeys.Type_Others) {
// Download content
HEADER.downloadResourceById(contentId);
COMMON.downloadResourceById(contentId);
// redraw content remove new icon
HISTORY.drawEditImage(contentId);
} else if (contentType == COMMON.ContentTypeKeys.Type_Link) {
// link content
HEADER.viewLinkContentById(contentId);
COMMON.viewLinkContentById(contentId, true);
// redraw content remove new icon
HISTORY.drawEditImage(contentId);
} else {
......@@ -709,7 +709,7 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer, version
if (readArr == null || readArr <= 0 || readArr == 'undefined') {
imgThumb.onload = function() {
var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, c.width / 2 - resizeImg[0] / 2, 0, resizeImg[0], resizeImg[1]);
imgIconNew.onload = function() {
ctx.drawImage(imgIconNew, c.width / 2 - resizeImg[0] / 2, 0);
......@@ -720,7 +720,7 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer, version
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -734,13 +734,13 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer, version
for ( var nIndex1 = 0; nIndex1 < ClientData.ReadingContentIds().length; nIndex1++) {
if (ClientData.ReadingContentIds()[nIndex1].contentid == contId) {
imgThumb.onload = function() {
var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, c.width / 2 - resizeImg[0] / 2, 0, resizeImg[0], resizeImg[1]);
HISTORY.showContentThumbnail(contId);
};
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -762,7 +762,7 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer, version
if (versionArr[nIndex2].contentid == contId) {
if (versionArr[nIndex2].resourceversion != resourceVer) {
imgThumb.onload = function() {
var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, c.width / 2 - resizeImg[0] / 2, 0, resizeImg[0], resizeImg[1]);
HISTORY.showContentThumbnail(contId);
imgIconEdit.onload = function() {
......@@ -773,7 +773,7 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer, version
// thumbnail.
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -794,7 +794,7 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer, version
if (metaArr[nIndex2].contentid == contId) {
if (metaArr[nIndex2].metaversion != metaVer) {
imgThumb.onload = function() {
var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, c.width / 2 - resizeImg[0] / 2, 0, resizeImg[0], resizeImg[1]);
HISTORY.showContentThumbnail(contId);
imgIconEdit.onload = function() {
......@@ -805,7 +805,7 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer, version
// thumbnail.
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -831,7 +831,7 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer, version
};
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -852,7 +852,7 @@ HISTORY.drawEditImage = function(id) {
} else {
var contentType = HISTORY.returnContentType(id);
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgSrc = src;
}
......@@ -865,7 +865,7 @@ HISTORY.drawEditImage = function(id) {
var ctx = c.getContext('2d');
ctx.clearRect(0, 0, c.width, c.height);
img.onload = function() {
var resizeImg = HISTORY.resizeResourceThumbnail(img, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(img, c.width, c.height);
ctx.drawImage(img, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
$("#loadingIcon" + id).fadeOut('slow', function() {
$('#content-thumbnail' + id).fadeIn('slow');
......@@ -1299,7 +1299,7 @@ HISTORY.renderContentAfterSort = function(contentSortArr) {
+ ' </a>'
+ ' <div class="text">'
+ ' <a id="title' + post.contentid + '" class="name dialog" contentid="' + post.contentid + '">'
+ ' <img class="listIcon" src="' + HEADER.getIconTypeContent(post.contenttype) + '" width="20" height="20" align="left">'
+ ' <img class="listIcon" src="' + COMMON.getIconTypeContent(post.contenttype) + '" width="20" height="20" align="left">'
+ ' <div class="history_title">' + COMMON.htmlEncode(post.contenttitle) + '</div>'
+ ' </a>'
+ ' <div class="info">'
......@@ -1376,19 +1376,6 @@ HISTORY.formatOriginalPublishDate = function(date) {
// return titleKana;
//};
HISTORY.resizeResourceThumbnail = function(mg, width, height) {
var newWidth;
var newHeight;
var delta = Math.min(width / mg.width, height / mg.height);
newHeight = parseInt(delta * mg.height);
newWidth = parseInt(delta * mg.width);
var result = [ newWidth, newHeight ];
return result;
};
HISTORY.removeHoverCss = function() {
if (COMMON.isTouchDevice()) {
$('#control-sort-title').removeClass('nottouchdevice');
......@@ -1481,7 +1468,7 @@ HISTORY.downloadFunction = function(e) {
var contentId = $(this).attr('contentid');
// Download content
HEADER.downloadResourceById(contentId);
COMMON.downloadResourceById(contentId);
};
......@@ -610,12 +610,12 @@ HOME.canvasClickFunction_callback = function(outputId) {
if (contentType == COMMON.ContentTypeKeys.Type_Others) {
// Download content
HEADER.downloadResourceById(outputId);
COMMON.downloadResourceById(outputId);
// redraw content remove new icon
HOME.drawEditImage(outputId);
} else if (contentType == COMMON.ContentTypeKeys.Type_Link) {
// link content
HEADER.viewLinkContentById(outputId);
COMMON.viewLinkContentById(outputId, true);
// redraw content remove new icon
HOME.drawEditImage(outputId);
} else {
......@@ -1294,12 +1294,12 @@ HOME.readSubmenuFunction_callback = function(contentId) {
// For testing without other Type.
if (contentType == COMMON.ContentTypeKeys.Type_Others) {
// Download content
HEADER.downloadResourceById(contentId);
COMMON.downloadResourceById(contentId);
// redraw content remove new icon
HOME.drawEditImage(contentId);
} else if (contentType == COMMON.ContentTypeKeys.Type_Link) {
// link content
HEADER.viewLinkContentById(contentId);
COMMON.viewLinkContentById(contentId, true);
// redraw content remove new icon
HOME.drawEditImage(contentId);
} else {
......@@ -1555,7 +1555,7 @@ HOME.renderContent = function(id, text, division, type, order, offset, limit, ca
+ ' <img id="loadingIcon' + post.contentId + '" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 86px; "/>'
+ ' </div>'
+ ' <a id="title' + post.contentId + '" class="name dialog lang" lang="lblTitle" contentid="' + post.contentId + '">'
+ ' <img src="' + HEADER.getIconTypeContent(post.contentType) + '" width="20" height="20">'
+ ' <img src="' + COMMON.getIconTypeContent(post.contentType) + '" width="20" height="20">'
+ ' <div class="content-title" style="float:right;text-indent:0px">' + post.contentTitle + '</div>'
+ ' </a>'
+ '</section>'
......@@ -1574,7 +1574,7 @@ HOME.renderContent = function(id, text, division, type, order, offset, limit, ca
+ ' </a>'
+ ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="dialog name lang" lang="lblTitle" contentid="' + post.contentId + '">'
+ ' <img class="listIcon" src="' + HEADER.getIconTypeContent(post.contentType) + '" width="20" height="20" style="float:left">'
+ ' <img class="listIcon" src="' + COMMON.getIconTypeContent(post.contentType) + '" width="20" height="20" style="float:left">'
+ ' <div class="content-list" style="">' + post.contentTitle + '</div>'
+ ' </a>'
+ ' <div class="info">'
......@@ -1799,7 +1799,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer, versionArr
if (readArr <= 0) {
imgThumb.onload = function() {
var resizeImg = HOME.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconNew.onload = function() {
ctx.drawImage(imgIconNew, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
......@@ -1812,7 +1812,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer, versionArr
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -1826,7 +1826,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer, versionArr
for ( var nIndex1 = 0; nIndex1 < ClientData.ReadingContentIds().length; nIndex1++) {
if (ClientData.ReadingContentIds()[nIndex1].contentid == contId) {
imgThumb.onload = function() {
var resizeImg = HOME.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
$("#loadingIcon" + contId).fadeOut('slow', function() {
$('#content-thumbnail' + contId).fadeIn('slow');
......@@ -1835,7 +1835,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer, versionArr
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -1846,34 +1846,6 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer, versionArr
readFlg = true;
break;
} else {
// imgThumb.onload = function() {
// var resizeImg = HOME.resizeResourceThumbnail(imgThumb, c.width, c.height);
// ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
// imgIconNew.onload = function() {
// ctx.drawImage(imgIconNew, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
// $("#loadingIcon" + contId).fadeOut('slow', function() {
// $('#content-thumbnail' + contId).fadeIn('slow');
// });
// };
// imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
// };
// // Start Function : No.12 -- Editor : Le Long -- Date :
// // 07/31/2013 -- Summary : Check contentType to set thumbnail.
//
// if (contentThumbnail == '' || contentThumbnail == null) {
// if (!COMMON.isPdfContent(contentType)) {
// var src = HEADER.getThumbnailForOtherType(contentType);
// if (src != '') {
// imgThumb.src = src;
// }
// }
// } else {
// imgThumb.src = contentThumbnail;
// }
//
// // End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013
// // -- Summary : Check contentType to set thumbnail.
}
}
}
......@@ -1886,7 +1858,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer, versionArr
if (versionArr[nIndex2].contentid == contId) {
if (versionArr[nIndex2].resourceversion != resourceVer) {
imgThumb.onload = function() {
var resizeImg = HOME.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconEdit.onload = function() {
ctx.drawImage(imgIconEdit, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
......@@ -1900,7 +1872,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer, versionArr
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -1921,7 +1893,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer, versionArr
if (metaArr[nIndex2].contentid == contId) {
if (metaArr[nIndex2].metaversion != metaVer) {
imgThumb.onload = function() {
var resizeImg = HOME.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconEdit.onload = function() {
ctx.drawImage(imgIconEdit, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
......@@ -1934,7 +1906,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer, versionArr
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -1950,7 +1922,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer, versionArr
}
} else {
imgThumb.onload = function() {
var resizeImg = HOME.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconNew.onload = function() {
ctx.drawImage(imgIconNew, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
......@@ -1963,7 +1935,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer, versionArr
if (contentThumbnail == '' || contentThumbnail == null) {
if (!COMMON.isPdfContent(contentType)) {
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgThumb.src = src;
}
......@@ -1984,7 +1956,7 @@ HOME.drawEditImage = function(id) {
} else {
var contentType = HOME.returnContentType(id);
var src = HEADER.getThumbnailForOtherType(contentType);
var src = COMMON.getThumbnailForOtherType(contentType);
if (src != '') {
imgSrc = src;
}
......@@ -1996,7 +1968,7 @@ HOME.drawEditImage = function(id) {
var ctx = c.getContext('2d');
ctx.clearRect(0, 0, c.width, c.height);
img.onload = function() {
var resizeImg = HOME.resizeResourceThumbnail(img, c.width, c.height);
var resizeImg = COMMON.resizeResourceThumbnail(img, c.width, c.height);
ctx.drawImage(img, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
$("#loadingIcon" + id).fadeOut('slow', function() {
$('#content-thumbnail' + id).fadeIn('slow');
......@@ -2463,25 +2435,6 @@ function changeLanguageCallBackFunction() {
document.title = I18N.i18nText('dspHome') + ' | ' + I18N.i18nText('sysAppTitle');
};
HOME.resizeResourceThumbnail = function(mg, width, height) {
var newWidth;
var newHeight;
/*
* if (mg.width > mg.height) { newWidth = width; newHeight = (mg.height *
* width) / mg.width; } else { newHeight = height; newWidth = (mg.width *
* height) / mg.height; }
*/
var delta = Math.min(width / mg.width, height / mg.height);
newHeight = parseInt(delta * mg.height);
newWidth = parseInt(delta * mg.width);
var result = [ newWidth, newHeight ];
return result;
};
HOME.resetShowNextRecordCount = function() {
HOME.showNextRecordClickNumber = 1;
};
......@@ -2617,7 +2570,7 @@ HOME.downloadSubmenuFunction = function(e) {
var contentId = $(this).attr('contentid');
// Download content
HEADER.downloadResourceById(contentId);
COMMON.downloadResourceById(contentId);
};
......@@ -203,6 +203,10 @@ LOGIN.processLogin = function() {
data.requirePasswordChange = 0;
}
console.log("data.requirePasswordChange:" + data.requirePasswordChange);
console.log("ClientData.serviceOpt_abook_check:" + ClientData.serviceOpt_abook_check());
if (data.requirePasswordChange == 0) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
......@@ -211,7 +215,11 @@ LOGIN.processLogin = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
// ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
} else {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
} else if (data.requirePasswordChange == 1) {
......@@ -245,7 +253,11 @@ LOGIN.processLogin = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
// ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
} else {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
} else if (numDay > 30) {
LOGIN.OpenChangePasswordDialog();
......@@ -261,7 +273,11 @@ LOGIN.processLogin = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
// ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
} else {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
}
......@@ -290,7 +306,11 @@ LOGIN.processLogin = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
// ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
} else {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
} else if (numDay > 30) {
......@@ -313,7 +333,11 @@ LOGIN.processLogin = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
// ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
} else {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
}
......@@ -360,7 +384,13 @@ LOGIN.changePasswordProcess = function() {
$('#dialog-error-message').css('display', 'none');
LOGIN.CloseChangePasswordDialog();
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
} else {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
} else {
$('#dialog-error-message').html(I18N.i18nText('msgPwdOldWrong'));
$('#dialog-error-message').show();
......@@ -426,7 +456,12 @@ LOGIN.skipPassFunction = function() {
ClientData.userInfo_pwdSkipDt(date);
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
} else {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
};
......@@ -486,6 +521,8 @@ LOGIN.saveServiceUserOption = function() {
ClientData.serviceOpt_encryption(option.value);
} else if (option.serviceOptionId == 137) {
ClientData.serviceOpt_html_custom_log(option.value);
} else if (option.serviceOptionId == 161) {
ClientData.serviceOpt_abook_check(option.value);
}
});
};
......@@ -613,11 +650,19 @@ LOGIN.initLoginAnonymousUser = function() {
LOGIN.showContentViewByOpenUrl(paramContentID);
} else {
// ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
} else {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
} else {
// ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
} else {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
});
......@@ -747,7 +792,7 @@ LOGIN.showContentViewByOpenUrl = function(strContentId) {
contentType = data.contentData.contentType;
if (contentType == COMMON.ContentTypeKeys.Type_Others) {
// Download content
HEADER.downloadResourceById(strContentId);
COMMON.downloadResourceById(strContentId);
} else {
// Go to Conten view page
if(ClientData.isGetitsMode()){
......@@ -791,7 +836,11 @@ LOGIN.showContentViewByOpenUrl = function(strContentId) {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Login);
} else {
// アラートメッセージ表示
LOGIN.showAlertScreen(I18N.i18nText('msgContentNotExist'), "abvw/" + COMMON.ScreenIds.Home);
if (ClientData.serviceOpt_abook_check() == 'Y') {
LOGIN.showAlertScreen(I18N.i18nText('msgContentNotExist'), "abvw/" + COMMON.ScreenIds.HomeCheck);
} else {
LOGIN.showAlertScreen(I18N.i18nText('msgContentNotExist'), "abvw/" + COMMON.ScreenIds.Home);
}
}
});
......@@ -810,7 +859,11 @@ LOGIN.alertMessageCancelFunction_callback = function() {
if (ClientData.isGetitsMode() == true) {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Login);
} else {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
} else {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
};
......@@ -906,6 +959,8 @@ LOGIN.ready = function() {
// モード初期化
ClientData.isGetitsMode(false);
ClientData.isStreamingMode(false);
ClientData.isCheckViewMode(false);
ClientData.isCheckMode(false);
ClientData.storeUrl("");
// getitsサーバー設定確認
......@@ -940,6 +995,7 @@ LOGIN.ready = function() {
ClientData.conf_apiUrl(sysSettings.apiUrl);
ClientData.conf_apiLoginUrl(sysSettings.apiLoginUrl);
ClientData.conf_apiResourceDlUrl(sysSettings.apiResourceDlUrl);
ClientData.conf_checkApiUrl(sysSettings.checkApiUrl);
}
if (ClientData.isGetitsMode() == true) {
......
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