Commit 9aef5a8f by Ha Jonguk

プロジェクト一覧定期点検対応終了

プッシュメッセージ対応中
parent a0e1d90d
......@@ -12,6 +12,9 @@ div.container ul.addition_list >li {
cursor: auto;
display: flex;
}
div.container ul.addition_list {
padding-left: 0;
}
div.container ul.addition_list li.check .code {
background-color: #1B1BD2;
}
......@@ -62,7 +65,7 @@ header {
width: 30%;
}
#listValues {
margin: 15px 12px 0px;
margin: 65px 12px 0px;
}
#listValues li td {
align-items: center;
......@@ -158,6 +161,10 @@ header button.addition {
width: auto;
height: 50px;
display: flex;
position: fixed;
width: 100%;
top: 0;
left: 0;
}
.headerBar .titleInfo {
......@@ -170,6 +177,11 @@ header button.addition {
}
.headerBar .headerBtn {
display: flex;
margin: auto;
padding: 5px;
}
.headerBar .headerBtn a {
margin-right: 5px;
}
......@@ -12,7 +12,7 @@ body {
}
#content-grid {
margin: 15px 12px;
margin: 65px 12px;
min-width: 800px;
}
......
......@@ -11,15 +11,21 @@
<title></title>
<!-- 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="common/css/jquery-ui.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__" />
<link rel="stylesheet" type="text/css" href="css/layout/common.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/list_project.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/list_relation_content.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="common/css/jquery-ui.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__" />
<link rel="stylesheet" type="text/css" href="css/layout/common.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/list_project.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/list_relation_content.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/setting.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/backup.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/restore.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/login_validation.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./common/css/jquery.toastmessage.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./common/css/default.css?__UPDATEID__" />
<script type="text/javascript" src="./common/js/jquery-1.8.1.min.js?__UPDATEID__"></script>
......@@ -31,6 +37,7 @@
<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/home_check.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/settings.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>
......@@ -43,12 +50,11 @@
<script type="text/javascript" src="./common/js/promise-6.1.0.min.js?__UPDATEID__" ></script>
</head>
<body id="home_check" oncontextmenu="return false">
<div id="ws-body" >
<div id="inc_backup"></div>
<div id="projectBar" class="headerBar">
<div class="headerBtn">
<a href="#" id="dspLogout" ><img src="img/check/ic_exit_to_app_white_48dp.png" width="40" height="40"></a>
......@@ -57,18 +63,30 @@
プロジェクト一覧
</div>
<div class="headerBtn">
<a href="#" id="dspCommunication" ><img src="img/check/communication_menu_icon@3x.png" width="40" height="40"></a>
<a href="#" id="dspCommonContent" ><img src="img/check/ic_common_content_on.png" width="40" height="40"></a>
<a href="#" id="dspSettingCheck" ><img src="img/check/icon_setup.png" width="40" height="40"></a>
<a href="#" id="dspRefreshCheck" ><img src="img/check/menu_refresh.png" width="40" height="40"></a>
</div>
</div>
<div id="contentBar" class="headerBar" style="display: none;">
<div class="headerBtn">
<a href="#" id="dspBack" ><img src="img/check/first_back_icon.png" width="40" height="40"></a>
<a href="#" class="dspBack" ><img src="img/check/first_back_icon.png" width="40" height="40"></a>
</div>
<div class="titleInfo" >
関連資料
</div>
</div>
<div id="settingBar" class="headerBar" style="display: none;">
<div class="headerBtn">
<a href="#" class="dspBack" ><img src="img/check/first_back_icon.png" width="40" height="40"></a>
</div>
<div class="titleInfo" >
設定
</div>
</div>
<div id="listValues" class="container">
<ul class="addition_list"></ul>
......@@ -93,12 +111,197 @@
<div id="content-grid" style="display: none;">
</div>
<div class="sectionSetting" style="display: none;">
<div id="user_info">
<h2 class="lang" lang="txtUsrCap"><!--ユーザ情報--></h2>
<dl>
<dt class="lang label" lang="txtLoginId">ログインID</dt>
<dd class="show" id="txtLoginId">...</dd>
<dt class="lang label" lang="txtLoginAccPath"><!--アカウントパス--></dt>
<dd class="show" id="txtLoginPath">Deliv</dd>
<dt class="lang label" lang="txtLastLoginTime"><!--最終ログイン時間--></dt>
<dd class="show" id="txtLastLoginTime">...</dd>
</dl>
<p class="passchgbtn"><a href="#" class="lang" id="dspPwdUpd" lang="dspPwdUpd"><!--パスワード変更--></a> </p>
</div>
<div id="user_option">
<h3 class="lang" lang="txtOpt"><!--オプション--></h3>
<ul>
<!-- <li> -->
<!-- <span class="choice lang" lang="txtOpt001">初期表示</span> -->
<!-- <label class="firstview"><input type=radio name="firstview" value="bookshelf" id="rdoOpt001" checked="checked" checked/><label for="rdoOpt001" lang="txtHondana" class="lang">本棚</label></label> -->
<!-- <label class="firstview"><input type=radio name="firstview" value="booklist" id="rdoOpt0011"><label for="rdoOpt0011" lang="txtList" class="lang">リスト</label></label> -->
<!-- </li> -->
<li><label><input type=checkbox name="repeat" value="repeat" class="chkbx" id="chkOpt002" checked="checked" checked/><label for="chkOpt002" id="txtOpt002" lang="txtOpt002" class="lang"><!--動画、音楽を繰り返し再生する--></label></label></li>
<li><label><input type=checkbox name="marking" value="marking" class="chkbx" id="chkOpt003" checked="checked" checked /><label id="lblOpt003" for="chkOpt003" lang="txtOpt003" class="lang"><!--マーキング--></label></label><span class="notice lang" lang="txtOpt004"><!--※コンテンツを開いた時に表示する--></span></li>
<li><label><input type=checkbox name="confirmClose" value="confirmClose" class="chkbx" id="chkOpt005" checked="checked" /><label for="chkOpt005" id="txtOpt005" lang="txtOpt005" class="lang"><!--タブ・ブラウザ終了・F5時のアラートが表示する--></label></label></li>
<li>
<label lang="txtOptPageTrans" class="lang"><!--ビューのアニメーション種類--></label>
<select id="cboAnimation">
<option class="lang" lang="txtOptPageTransSlide" value="0"><!--スライド--></option>
<option class="lang" lang="txtOptPageTransFade" value="1"><!--フェード--></option>
<!--<option class="lang" lang="txtOptPageTransRev" value="2"><!--リヴェール&ムーブイン--></option>-->
</select>
</li>
<!-- <li> -->
<!-- <label class="lang lblOptPageTransPeriod" lang="txtOptPageTransPeriod">アニメーション時間(Sec)</label> -->
<!-- <input type="text" id="txtValueAnimation" value="1.0" /> -->
<!-- <span id="slidebar-container"><span id="slidebar-from">0.1</span><span id="slidebar-animation"></span><span id="slidebar-to">9.9</span></span> -->
<!-- </li> -->
</ul>
<h3 style="margin-top:50px" id="txtBkResCap" lang="txtBkResCap" class="lang"><!--サーバーにバックアップ/リストア--></h3>
<p class="logout_backup" id="regionOptionBackup">
<label>
<input type="checkbox" name="backup" value="backup" id="chkOptBkCfm" checked="checked">
<label id="txtOptBkCfm" for="chkOptBkCfm" lang="txtOptBkCfm" class="lang"><!--毎回ログアウトの時、バックアップするかどうかは必ず確認する--></label>
</label>
<br />
<!--<label class="option_backup">-->
<p class="option_backup" id="backup_default" style="font-size: 13px;margin-left:50px">
<label id="txtBkDefault" lang="txtBkDefault" class="lang"><!--バックアップのデフォルト : --></label>
<input type="checkbox" id="chkBkMarking" class="chkbx" checked="checked" /><label id="txtBkMarking" for="chkBkMarking" lang="txtBkMarking" class="lang"><!--マーキング--></label>
<input type="checkbox" id="chkBkMemo" class="chkbx" checked="checked" /><label id="txtBkMemo" for="chkBkMemo" lang="txtBkMemo" class="lang"><!--メモ--></label>
<input type="checkbox" id="chkBkShiori" class="chkbx" checked="checked" /><label id="txtBkShiori" for="chkBkShiori" lang="txtBkShiori" class="lang"><!--しおり--></label>
</p>
<!--</label>-->
</p>
<p class="backupbtn"><a class="backup lang" lang="dspOptBk" id="dspOptBk" href="#" style="display:none;"><!--バックアップ--></a><a href="#" id="dspOptRes" lang="dspOptRes" class="lang" style="visibility:hidden;"><!--リストア--></a></p>
<p class="savebtn"><a class="save lang" href="#" id="dspSave" lang="dspSave"><!--保存する--></a><a class="default lang" href="#" id="dspOptReset" lang="dspOptReset"><!--初期設定に戻る--></a><div style="clear:both;"></div></p>
</div>
</div>
</div>
<section id="dlgChangePassword" class="sectionchangepassword">
<h1 class="title lang" lang="msgChangePassword"><!--パスワードを変更してください。--></h1>
<span id="dialog-error-message" class="alertTxtDialog lang"> </span>
<dl>
<dt><label id="lblPwdCur" class="lang" lang="txtPwdCurr"><!--現在パスワード--></label></dt>
<dd><input type="password" id="txtPwdCur" maxlength="16" /></dd>
</dl>
<dl>
<dt><label id="lblPwdNew" class="lang" lang="txtPwdNew"><!--変更パスワード--></label></dt>
<dd><input type="password" id="txtPwdNew" maxlength="16" /></dd>
</dl>
<dl>
<dt><label id="lblPwdNewRe" class="lang" lang="txtPwdNewRe"><!--(再)変更パスワード--></label></dt>
<dd><input type="password" id="txtPwdNewRe" maxlength="16" /></dd>
</dl>
<p><label class="lang" lang="txtPwdRemind" id="txtChangePassComment"><!--※スキップを選択すると、30日間このメッセージは表示されません--></label></p>
<p class="loginbtn">
<a class="cancel lang" href="#" lang="dspCancel" id="dspCancel"><!--キャンセル--></a>
<a class="skip lang" href="#" lang="dspSkip" id="dspSkip"><!--スキップ--></a>
<a class="change lang" href="#" id="dspPwdUpd1" lang="dspChange"><!--変更--></a>
</p>
</section>
<section class="sectionbackup_logout" id="dlgConfirmBackup1">
<h1><label class="lang" lang="txtBackupTitle">バックアップ確認</label></h1>
<p class="message"><label lang="txtLogoutBkMsg" class="lang">ログアウトする前にバックアップしますか?</label></p>
<p class="message-options">
<label class="option_backup">
<label lang="txtBkSelectData" class="lang">バックアップするデータを選択してください。</label><br />
<input type="checkbox" id="chkBkAllMarking" class="chkbx" checked="checked" /><label for="chkBkAllMarking" lang="txtBkMarking" class="lang">マーキング</label>
<input type="checkbox" id="chkBkAllMemo" class="chkbx" checked="checked" /><label for="chkBkAllMemo" lang="txtBkMemo" class="lang">メモ</label>
<input type="checkbox" id="chkBkAllShiori" class="chkbx" checked="checked" /><label for="chkBkAllShiori" lang="txtBkShiori" class="lang">しおり</label>
</label>
</p>
<p class="notice">
<input type="checkbox" id="chkRememberBackup" /><label for="chkRememberBackup" class="lang" lang="txtLogoutOptBkCfm">今回の行動を記憶し、次回から確認せずに、同じことをする。</label>
</p>
<p class="backupbtn">
<a class="cancel lang" href="#" lang="dspBkCancel" id="dlgConfirmBackup-withoutbackup">バックアップしないでログアウト</a>
<a class="ok lang" href="#" id="dlgConfirmBackup-backup" lang="dspBkOK">バックアップしてログアウト</a>
</p>
</section>
<section class="sectionbackup" id="dlgConfirmBackup">
<h1><label class="title lang" lang="txtBackupTitle">バックアップ確認</label></h1>
<!--<p class="message"><label id="txtBkMsg" lang="txtBkMsg" class="lang">サーバにバックアップしますか?</label></p>-->
<p class="message">
<label lang="txtBkSelectData" class="lang">バックアップするデータを選択してください。</label>
</p>
<p class="message-options">
<!--<label class="option_backup">-->
<p class="option_backup" style="font-size: 13px;margin-left:50px">
<input type="checkbox" name="chkopBkMarking" id="chkopBkMarking" class="chkopbx" checked="checked" /><label for="chkopBkMarking" lang="txtBkMarking" class="lang">マーキング</label>
<input type="checkbox" name="chkopBkMemo" id="chkopBkMemo" class="chkopbx" checked="checked" /><label for="chkopBkMemo" lang="txtBkMemo" class="lang">メモ</label>
<input type="checkbox" name="chkopBkShiori" id="chkopBkShiori" class="chkopbx" checked="checked" /><label for="chkopBkShiori" lang="txtBkShiori" class="lang">しおり</label>
</P>
<!--</label>-->
</p>
<p class="backupbtn"><a class="ok lang" href="#" id="dspOptBk_OK" lang="dspOK">OK</a><a class="cancel lang" href="#" lang="dspCancel" id="dspOptBk_Cancel">キャンセル</a></p>
</section>
<section class="sectionrestore" id="dlgConfirmRestore">
<h1 class="title lang" lang="txtRestoreTitle"><!--リストア確認--></h1>
<p class="message">
<!--<label id="txtResMsg" class="lang" lang="txtResMsg"></label>-->
<label id="txtResSelect" class="lang" lang="txtResSelect"><!--リストアするデータを選択してください。--></label>
</p>
<p class="message-options">
<!--<label class="option_backup">-->
<p class="option_backup" style="font-size: 13px;margin-left:50px">
<input type="checkbox" name="chkopResMarking" id="chkopResMarking" class="chkopbx" checked="checked" /><label for="chkopResMarking" lang="txtBkMarking" class="lang">マーキング</label>
<input type="checkbox" name="chkopResMemo" id="chkopResMemo" class="chkopbx" checked="checked" /><label for="chkopResMemo" lang="txtBkMemo" class="lang">メモ</label>
<input type="checkbox" name="chkopResShiori" id="chkopResShiori" class="chkopbx" checked="checked" /><label for="chkopResShiori" lang="txtBkShiori" class="lang">しおり</label>
</P>
<!--</label>-->
</p>
<p class="notice"><label class="lang" lang="txtResMsgNotice"></label></p>
<p class="restorebtn"><a class="ok lang" href="#" id="dspOptRes_OK" lang="dspOK"><!--OK--></a><a class="cancel lang" href="#" id="dspOptRes_Cancel" lang="dspCancel"><!--キャンセル--></a></p>
</section>
<div id="viewer" style="display:none;" >
</div>
<div id="communication" style="display:none;z-index:10001;position: fixed;background: white;width:400px;height:180px;">
<div style="width:100%;height:auto;background:#ccc;font-size:24px;font-weight:bold;padding:5px 0;text-align: center;">
<span>コミュニケーション</span>
<a href="#" style="position:absolute;top:0;right:0;" onclick="HOME_CHECK.closeDialog();">
<img src="img/login/close.png" width="40" height="40" style="margin:3px 0;">
</a>
</div>
<ul style="width:100%;height:80%;display:inline;">
<li style="width:100%;cursor:pointer;" onclick="HOME_CHECK.closeDialog();">
<div style="display:flex;margin:3px 10px;border-bottom:0.5px solid black;">
<img src="img/check/communication_pushmsg_icon@3x.png" width="40" height="40" style="margin: 10px 0;">
<span style="width: 100%;margin: 0 40px;font-size: 16px;line-height: 60px;">プッシュメッセージ送信</span>
<img src="img/main_next.png" width="20" height="40" style="margin: 10px 0;">
</div>
</li>
<li style="width:100%;cursor:pointer;" onclick="HOME_CHECK.closeDialog();">
<div style="display:flex;margin:3px 10px;border-bottom:0.5px solid black;">
<img src="img/check/ic_communication_push_message_list.png" width="40" height="40" style="margin: 10px 0;">
<span style="width: 100%;margin: 0 40px;font-size: 16px;line-height: 60px;">プッシュメッセージ一覧</span>
<img src="img/main_next.png" width="20" height="40" style="margin: 10px 0;">
</div>
</li>
</ul>
</div>
<div id="recept_push_message">
<ul id="recept_push_message_list"></ul>
</div>
<div id="select_project_for_send">
<ul id="selectable_project_list"></ul>
</div>
<div id="send_push_message">
<div>
header
</div>
<div>
</div>
<div>
btn
</div>
</div>
<iframe style="height:0px;width:0px;visibility:hidden;display:none;" src="about:blank">
this frame prevents back forward cache
</iframe>
......
......@@ -18,6 +18,7 @@ HOME_CHECK.scrollTop = 0;
HOME_CHECK.projectTypeArr = []; //ProjectType array.
HOME_CHECK.pushMessageJsonList;
// ==========================================================
$(document).ready(function() {
......@@ -28,10 +29,16 @@ $(document).ready(function() {
document.title = I18N.i18nText('dspHome') + ' | ' + I18N.i18nText('sysAppTitle');
$('#dspCommunication').click(HOME_CHECK.showCommunicationDialog);
$('#dspCommunication').show();
$('#dspCommonContent').click(HOME_CHECK.viewCommonContent);
$('#dspCommonContent').show();
$('#dspSettingCheck').click(HOME_CHECK.viewSetting);
$('#dspSettingCheck').show();
$('#dspRefreshCheck').click(HOME_CHECK.refreshProject);
$('#dspRefreshCheck').show();
$('#dspBack').click(HOME_CHECK.backProjectList);
$('.dspBack').click(HOME_CHECK.backProjectList);
// プロジェクト一覧 初期表示
HOME_CHECK.initProjectView();
......@@ -52,6 +59,15 @@ HOME_CHECK.viewCommonContent = function() {
HOME_CHECK.initContentView(null, "2");
};
HOME_CHECK.viewSetting = function() {
$('#listValues').hide();
$('.sectionSetting').show();
$('.sectionSetting').css("margin-top", "65px");
$('#projectBar').hide();
$('#settingBar').show();
};
// Initial Project Screen
HOME_CHECK.initProjectView = function() {
......@@ -529,15 +545,23 @@ HOME_CHECK.renderAddProject = function(post) {
var dateStr = " ~ ";
var periodStr = "期間:";
var isInspect = post.projectReportType == "1";
var hasInspectTask = post.reportStartDate && post.reportEndDate;
if (isInspect) {
periodStr = "作業期間:";
if (hasInspectTask) {
var projectStartDate = post.projectStartDate.replace(/-/g, '/');
var projectEndDate = post.projectEndDate.replace(/-/g, '/');
if (!HOME_CHECK.isInspectingProject(projectStartDate)) {
// プロジェクトの開始日になってない場合
dateStr = periodStr + "作業データがありません。" + "「" + projectStartDate + "」から情報更新ができるようになります。";
} else if (post.reportStartDate && post.reportEndDate) {
startDate = post.reportStartDate.replace(/-/g, '/');
endDate = post.reportEndDate.replace(/-/g, '/');
dateStr = periodStr + startDate + dateStr + endDate;
} else if (HOME_CHECK.isCompletedProject(projectEndDate)) {
// 終了したプロジェクトの場合非表示
return;
} else {
// 対象作業がない場合
dateStr = periodStr + "作業データがありません。";
}
} else {
......@@ -557,7 +581,7 @@ HOME_CHECK.renderAddProject = function(post) {
var actionBtnDiv = $("#actionBtnDiv").clone().attr("id", post.projectId + "_actionBtnDiv");
actionBtnDiv.css("display", "flex");
if (isInspect && !hasInspectTask) {
if (isInspect && !HOME_CHECK.isInspectingProject(projectStartDate)) {
$(actionBtnDiv.children()[0]).find('img').attr("src","img/check/icon_working_off.png");
} else {
$(actionBtnDiv.children()[0]).on("click", function() {
......@@ -575,6 +599,9 @@ HOME_CHECK.renderAddProject = function(post) {
$(actionBtnDiv.children()[2]).find('img').attr("src","img/check/icon_document_reference_off.png");
$(actionBtnDiv.children()[2]).prop("disabled", true);
}
// プッシュメッセージを取得
HOME_CHECK.pushMessageJsonList = post.pushMessageList;
listLi.append(actionBtnDiv);
......@@ -582,6 +609,20 @@ HOME_CHECK.renderAddProject = function(post) {
};
// プロジェクトが始まったか判定
HOME_CHECK.isInspectingProject = function(projectStartDateStr) {
var now = new Date();
var projectStartDate = new Date(projectStartDateStr);
return now.getTime() >= projectStartDate.getTime();
}
// プロジェクトが終了したか判定
HOME_CHECK.isCompletedProject = function(projectEndDateStr) {
var now = new Date();
var projectEndDate = new Date(projectEndDateStr);
return now.getTime() > projectEndDate.getTime();
}
// Report Click function
HOME_CHECK.reportClickFunction = function(e) {
if (e) {
......@@ -657,177 +698,117 @@ HOME_CHECK.abapi = function(name, param, method, callback) {
};
HOME_CHECK.backProjectList = function() {
$('#listValues').show();
$('.sectionSetting').hide();
$('#content-grid').hide();
$('#listValues').show();
$('#content-grid').hide();
$('#projectBar').show();
$('#settingBar').hide();
$('#contentBar').hide();
$('.toast-container').remove();
};
$('#projectBar').show();
$('#contentBar').hide();
///Refresh Project
var isRefreshing = false;
HOME_CHECK.refreshProject = function() {
if (!isRefreshing) {
isRefreshing = true;
var params = {
sid : ClientData.userInfo_sid()
};
HOME_CHECK.lockLayout();
animateRefreshIcon();
HOME_CHECK.checkApi('webProjectList', params, 'POST', function(data) {
var countCnt = 0;
$(".addition_list").html("");
HOME_CHECK.projectTypeArr.clear();
$.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.unlockLayout();
isRefreshing = false;
});
}
};
//TODO Newマークを使うなら復元
//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;
// }
//
// }
//};
function animateRefreshIcon() {
$("#dspRefreshCheck").zIndex(0);
$("#dspRefreshCheck").animate({zIndex:1}, {duration:1500, easing: "swing",
step:function(now) {
$("#dspRefreshCheck").css({transform:'rotate(' + now * 360 + 'deg)'});
},
complete:function() {
if (isRefreshing) {
animateRefreshIcon();
}
}
});
}
/**
* コミュニケーションダイアログを表示
*
* @param message 表示メッセージ
*/
HOME_CHECK.showCommunicationDialog = function() {
$("#communication").css("top", ($(window).height()-$("#communication").height())/2);
$("#communication").css("left", ($(window).width()-$("#communication").width())/2);
HOME_CHECK.lockLayout();
$("#communication").show();
}
HOME_CHECK.closeDialog = function() {
HOME_CHECK.unlockLayout();
$("#communication").hide();
}
HOME_CHECK.showPushMessageList = function() {
$("#communication").hide();
}
//Hide the locking layout
HOME_CHECK.unlockLayout = function() {
$('#avw-sys-modal').hide();
};
// Show the locking layout
HOME_CHECK.lockLayout = function() {
if (document.getElementById('avw-sys-modal')) {
$('#avw-sys-modal').show();
} else {
var tags = '<div id="avw-sys-modal"></div>';
$('body').prepend(tags);
$('#avw-sys-modal').css({
'opacity' : 0.7,
'position' : 'fixed',
'top' : '0',
'left' : '0',
'width' : $(window).width(),
'height' : $(window).height(),
'background' : '#999',
'z-index' : 10000
});
// resize error page
$(window).resize(function() {
$('#avw-sys-modal').css({
'width' : $(window).width(),
'height' : $(window).height()
});
});
}
};
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