Commit 834b55cf by vietdo

#15640 【Web】閲覧履歴のリスト表示で無駄な処理

parent 021926e6
...@@ -14,7 +14,7 @@ HISTORY.DEFAULT_SEARCH_DIVISION = 0; ...@@ -14,7 +14,7 @@ HISTORY.DEFAULT_SEARCH_DIVISION = 0;
//Thumbnail array //Thumbnail array
HISTORY.thumbnailArr = []; HISTORY.thumbnailArr = [];
//Content type array. //Contdent type array.
HISTORY.contentTypeArr = []; HISTORY.contentTypeArr = [];
HISTORY.contentIdArray = []; HISTORY.contentIdArray = [];
...@@ -27,63 +27,63 @@ HISTORY.history_contentTitleKana = []; ...@@ -27,63 +27,63 @@ HISTORY.history_contentTitleKana = [];
HISTORY.scrollTop = 0; HISTORY.scrollTop = 0;
$(document).ready(function(){ $(document).ready(function(){
if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)){ if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)){
return; return;
} }
COMMON.LockScreen(); COMMON.LockScreen();
document.title = I18N.i18nText('dspViewHistory') + ' | ' + I18N.i18nText('sysAppTitle'); document.title = I18N.i18nText('dspViewHistory') + ' | ' + I18N.i18nText('sysAppTitle');
ClientData.BookmarkScreen(COMMON.ScreenIds.History); ClientData.BookmarkScreen(COMMON.ScreenIds.History);
if(ClientData.requirePasswordChange() != 1){ if(ClientData.requirePasswordChange() != 1){
if(ClientData.ReadingContentIds() == null || ClientData.ReadingContentIds() == 'undefined' || ClientData.ReadingContentIds().length == 0){ if(ClientData.ReadingContentIds() == null || ClientData.ReadingContentIds() == 'undefined' || ClientData.ReadingContentIds().length == 0){
}else{ }else{
HISTORY.syncReadingContent(); HISTORY.syncReadingContent();
} }
//remove hover effect when is touch device //remove hover effect when is touch device
HISTORY.removeHoverCss(); HISTORY.removeHoverCss();
//Render Grid //Render Grid
HISTORY.renderGridView(); HISTORY.renderGridView();
//Go To Details Page //Go To Details Page
$('#main-ws canvas').live('click', HISTORY.canvasClickFunction); $('#main-ws canvas').live('click', HISTORY.canvasClickFunction);
$('#main-ws canvas').live('touchend', HISTORY.canvasClickFunction); $('#main-ws canvas').live('touchend', HISTORY.canvasClickFunction);
$('#main-ws canvas').live('touchmove', function () { HISTORY.home_isMove = true; }); $('#main-ws canvas').live('touchmove', function () { HISTORY.home_isMove = true; });
//Open dialog //Open dialog
$('.dialog').live('click', HISTORY.titleClickFunction); $('.dialog').live('click', HISTORY.titleClickFunction);
//$('.dialog').live('touchstart', HISTORY.titleClickFunction); //$('.dialog').live('touchstart', HISTORY.titleClickFunction);
$('.dialog').live('touchend', HISTORY.titleClickFunction); $('.dialog').live('touchend', HISTORY.titleClickFunction);
$('.dialog').live('touchmove', function () { HISTORY.home_isMove = true; }); $('.dialog').live('touchmove', function () { HISTORY.home_isMove = true; });
//Sort Title //Sort Title
$('#control-sort-title').click(HISTORY.sortByTitleFunction); $('#control-sort-title').click(HISTORY.sortByTitleFunction);
//Sort by title kana //Sort by title kana
$('#control-sort-titlekana').click(HISTORY.sortByTitleKanaFunction); $('#control-sort-titlekana').click(HISTORY.sortByTitleKanaFunction);
//sort by release date //sort by release date
$('#control-sort-releasedate').click(HISTORY.sortByReleaseDateFunction); $('#control-sort-releasedate').click(HISTORY.sortByReleaseDateFunction);
$('#control-sort-viewdate').click(HISTORY.sortByViewDateFunction); $('#control-sort-viewdate').click(HISTORY.sortByViewDateFunction);
//Go To Details Page //Go To Details Page
$('.button-details').live('click', HISTORY.readSubmenuFunction); $('.button-details').live('click', HISTORY.readSubmenuFunction);
//$('.button-details').live('touchstart', HISTORY.readSubmenuFunction); //$('.button-details').live('touchstart', HISTORY.readSubmenuFunction);
$('.button-details').live('touchend', HISTORY.readSubmenuFunction); $('.button-details').live('touchend', HISTORY.readSubmenuFunction);
$('.button-details').live('touchmove', function () { HISTORY.home_isMove = true; }); $('.button-details').live('touchmove', function () { HISTORY.home_isMove = true; });
//Show Share Dialog //Show Share Dialog
$('.button-share').live('click', HISTORY.showContentShareDlgFunction); $('.button-share').live('click', HISTORY.showContentShareDlgFunction);
$('.button-share').live('touchend', HISTORY.showContentShareDlgFunction); $('.button-share').live('touchend', HISTORY.showContentShareDlgFunction);
$('.button-share').live('touchmove', function () { HISTORY.home_isMove = true; }); $('.button-share').live('touchmove', function () { HISTORY.home_isMove = true; });
$(window).resize(function () { $(window).resize(function () {
if ($("#contentDetail").css("display") != "none") { if ($("#contentDetail").css("display") != "none") {
// Refresh panel of detail to center. // Refresh panel of detail to center.
...@@ -98,12 +98,12 @@ $(document).ready(function(){ ...@@ -98,12 +98,12 @@ $(document).ready(function(){
//Check if Force Change password //Check if Force Change password
HEADER.checkForceChangePassword(); HEADER.checkForceChangePassword();
} }
if (COMMON.isAnonymousLogin()) { if (COMMON.isAnonymousLogin()) {
//プッシュメッセージ隠す //プッシュメッセージ隠す
$('#dspPushMessage').hide(); $('#dspPushMessage').hide();
} }
//詳細、共有表示パーツ読み込み //詳細、共有表示パーツ読み込み
$("#inc_detail").load("./inc_detail.html?__UPDATEID__", function (myData, myStatus, xhr){ $("#inc_detail").load("./inc_detail.html?__UPDATEID__", function (myData, myStatus, xhr){
//読み込み完了時の処理 //読み込み完了時の処理
...@@ -112,14 +112,14 @@ $(document).ready(function(){ ...@@ -112,14 +112,14 @@ $(document).ready(function(){
format: 'yyyy-mm-dd' format: 'yyyy-mm-dd'
}); });
}); });
//ビューア、共有表示パーツ読み込み //ビューア、共有表示パーツ読み込み
$("#viewer").load("./inc_contentview.html?__UPDATEID__", function (myData, myStatus, xhr){ $("#viewer").load("./inc_contentview.html?__UPDATEID__", function (myData, myStatus, xhr){
//読み込み完了時の処理 //読み込み完了時の処理
I18N.i18nReplaceText(); I18N.i18nReplaceText();
}); });
}); });
//Call API //Call API
//HISTORY.abapi = function(name, param, method, callback){ //HISTORY.abapi = function(name, param, method, callback){
...@@ -142,16 +142,16 @@ HISTORY.renderContent = function(id, text, division, type, order, from, to, cate ...@@ -142,16 +142,16 @@ HISTORY.renderContent = function(id, text, division, type, order, from, to, cate
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), 'webContentList', 'POST', params, AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), 'webContentList', 'POST', params,
function (data) { function (data) {
$('#content-grid').html(''); $('#content-grid').html('');
//var htmlTemp = ""; //var htmlTemp = "";
for (var i = 0; i < data.contentList.length; i++) { for (var i = 0; i < data.contentList.length; i++) {
post = data.contentList[i]; post = data.contentList[i];
var outputDate = COMMON.formatDeliveryDate(post.contentDeliveryDate); var outputDate = COMMON.formatDeliveryDate(post.contentDeliveryDate);
//renderViewDate //renderViewDate
var viewdate = HISTORY.renderViewDate(post.contentId); var viewdate = HISTORY.renderViewDate(post.contentId);
/*
if (viewdate != null && viewdate != 'undefined' && viewdate != '') { if (viewdate != null && viewdate != 'undefined' && viewdate != '') {
var htmlTemp = '<section class="sectionhistory">' var htmlTemp = '<section class="sectionhistory">'
+ ' <div class="cnt_section_list">' + ' <div class="cnt_section_list">'
...@@ -163,7 +163,7 @@ HISTORY.renderContent = function(id, text, division, type, order, from, to, cate ...@@ -163,7 +163,7 @@ HISTORY.renderContent = function(id, text, division, type, order, from, to, cate
+ ' <div class="text">' + ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="name dialog" contentid="' + post.contentId + '">' + ' <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="' + HEADER.getIconTypeContent(post.contentType)+'" width="20" height="20">'
+ COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 20) + COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 20)
+ ' </a>' + ' </a>'
+ ' <div class="info">' + ' <div class="info">'
+ ' <ul class="date">' + ' <ul class="date">'
...@@ -186,9 +186,9 @@ HISTORY.renderContent = function(id, text, division, type, order, from, to, cate ...@@ -186,9 +186,9 @@ HISTORY.renderContent = function(id, text, division, type, order, from, to, cate
htmlTemp = htmlTemp.replace(/\{share\}/g, shareHtml); htmlTemp = htmlTemp.replace(/\{share\}/g, shareHtml);
//効率化 //効率化
//$('#content-grid').append(htmlTemp); //$('#content-grid').append(htmlTemp);
} }*/
} }
for (var i = 0; i < data.contentList.length; i++) { for (var i = 0; i < data.contentList.length; i++) {
post = data.contentList[i]; post = data.contentList[i];
...@@ -198,17 +198,17 @@ HISTORY.renderContent = function(id, text, division, type, order, from, to, cate ...@@ -198,17 +198,17 @@ HISTORY.renderContent = function(id, text, division, type, order, from, to, cate
LIMIT_ACCESS_CONTENT.messageLevel[post.contentId] = { alertMessageLevel:post.alertMessageLevel, alertMessage:post.alertMessage}; LIMIT_ACCESS_CONTENT.messageLevel[post.contentId] = { alertMessageLevel:post.alertMessageLevel, alertMessage:post.alertMessage};
if (viewdate != null && viewdate != 'undefined' && viewdate != '') { if (viewdate != null && viewdate != 'undefined' && viewdate != '') {
//assign thumbnail to array //assign thumbnail to array
var formatThumbnail = post.contentThumbnail; var formatThumbnail = post.contentThumbnail;
if((formatThumbnail != null) && (formatThumbnail != 'undefined') && (formatThumbnail != '')){ if((formatThumbnail != null) && (formatThumbnail != 'undefined') && (formatThumbnail != '')){
formatThumbnail = COMMON.formatStringBase64(formatThumbnail); formatThumbnail = COMMON.formatStringBase64(formatThumbnail);
} }
HISTORY.thumbnailArr.push({ contentId: post.contentId, thumbnail: formatThumbnail}); HISTORY.thumbnailArr.push({ contentId: post.contentId, thumbnail: formatThumbnail});
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Assign content type to array to manage. //Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Assign content type to array to manage.
//assign content type to array //assign content type to array
HISTORY.contentTypeArr.push({ contentId: post.contentId, contentType: post.contentType }); HISTORY.contentTypeArr.push({ contentId: post.contentId, contentType: post.contentType });
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Assign content type to array to manage. //End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Assign content type to array to manage.
...@@ -259,31 +259,31 @@ HISTORY.handleLanguage = function(){ ...@@ -259,31 +259,31 @@ HISTORY.handleLanguage = function(){
$('#separate').css('display','none'); $('#separate').css('display','none');
$("#titlekana-sorttype").html(''); $("#titlekana-sorttype").html('');
} }
else { else {
if (ClientData.searchCond_sortOrder() != null && ClientData.searchCond_sortOrder() != 'undefined' || ClientData.searchCond_sortType() != '') { if (ClientData.searchCond_sortOrder() != null && ClientData.searchCond_sortOrder() != 'undefined' || ClientData.searchCond_sortType() != '') {
var typeSort = ClientData.searchCond_sortType(); var typeSort = ClientData.searchCond_sortType();
var orderSort = ClientData.searchCond_sortOrder(); var orderSort = ClientData.searchCond_sortOrder();
HEADER.setStatusSort('#'+$('#menu_sort li.current a').attr('id'),orderSort == COMMON.Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#'+$('#menu_sort li.current a').attr('id'),orderSort == COMMON.Consts.ConstOrderSetting_Asc);
} }
if(HISTORY.noRecordFlg){ if(HISTORY.noRecordFlg){
$('#label-sort-titlekana').css('display','block'); $('#label-sort-titlekana').css('display','block');
$('#separate').css('display','block'); $('#separate').css('display','block');
$('#control-sort-titlekana-off').css('display','block'); $('#control-sort-titlekana-off').css('display','block');
$('#content-grid').html("<div id='msgHistoryNotExist'>" + I18N.i18nText('msgHistoryNotExist') + "</div>"); $('#content-grid').html("<div id='msgHistoryNotExist'>" + I18N.i18nText('msgHistoryNotExist') + "</div>");
}else{ }else{
$('#control-sort-titlekana').css('display','block'); $('#control-sort-titlekana').css('display','block');
$('#separate').css('display','block'); $('#separate').css('display','block');
} }
} }
}; };
//Initial Screen //Initial Screen
HISTORY.renderGridView = function(){ HISTORY.renderGridView = function(){
var fromPage = ''; var fromPage = '';
var toPage = ''; var toPage = '';
var sortType = HISTORY.DEFAULT_SORT_TYPE; var sortType = HISTORY.DEFAULT_SORT_TYPE;
...@@ -293,11 +293,11 @@ HISTORY.renderGridView = function(){ ...@@ -293,11 +293,11 @@ HISTORY.renderGridView = function(){
var genreId = ''; var genreId = '';
var groupId = ''; var groupId = '';
var sid = ClientData.userInfo_sid(); var sid = ClientData.userInfo_sid();
ClientData.searchCond_recordFrom(fromPage); ClientData.searchCond_recordFrom(fromPage);
ClientData.searchCond_recordTo(toPage); ClientData.searchCond_recordTo(toPage);
ClientData.searchCond_sortType(sortType); ClientData.searchCond_sortType(sortType);
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
...@@ -306,13 +306,13 @@ HISTORY.renderGridView = function(){ ...@@ -306,13 +306,13 @@ HISTORY.renderGridView = function(){
//Handle display sort //Handle display sort
HISTORY.handleSortDisp(); HISTORY.handleSortDisp();
//Display user name //Display user name
$('#login-username').html(ClientData.userInfo_loginId_session()); $('#login-username').html(ClientData.userInfo_loginId_session());
//Refresh GridView //Refresh GridView
HISTORY.refreshGrid(); HISTORY.refreshGrid();
if(ClientData.ReadingContentIds() == null || ClientData.ReadingContentIds() == 'undefined' || ClientData.ReadingContentIds().length == 0){ if(ClientData.ReadingContentIds() == null || ClientData.ReadingContentIds() == 'undefined' || ClientData.ReadingContentIds().length == 0){
HISTORY.displayResultNoRecord(); HISTORY.displayResultNoRecord();
HISTORY.noRecordFlg = true; HISTORY.noRecordFlg = true;
...@@ -323,12 +323,12 @@ HISTORY.renderGridView = function(){ ...@@ -323,12 +323,12 @@ HISTORY.renderGridView = function(){
HISTORY.renderContent(sid, searchText, searchDivision, 3, sortOrder, fromPage, toPage, genreId, groupId); HISTORY.renderContent(sid, searchText, searchDivision, 3, sortOrder, fromPage, toPage, genreId, groupId);
HISTORY.sortByViewDateDesc(); HISTORY.sortByViewDateDesc();
} }
//Language Handle //Language Handle
HISTORY.handleLanguage(); HISTORY.handleLanguage();
}; };
//Canvas Click function //Canvas Click function
HISTORY.canvasClickFunction = function(e){ HISTORY.canvasClickFunction = function(e){
if (e) { if (e) {
e.preventDefault(); e.preventDefault();
...@@ -337,13 +337,13 @@ HISTORY.canvasClickFunction = function(e){ ...@@ -337,13 +337,13 @@ HISTORY.canvasClickFunction = function(e){
HISTORY.home_isMove = false; HISTORY.home_isMove = false;
return; return;
} }
var contentId = $(this).attr('id'); var contentId = $(this).attr('id');
var outputId = contentId.substring(17); var outputId = contentId.substring(17);
// Set content id for screen: content detail // Set content id for screen: content detail
ClientData.contentInfo_contentId(outputId); ClientData.contentInfo_contentId(outputId);
// Get image of selected image // Get image of selected image
var base64String = HISTORY.returnThumbnail(outputId); var base64String = HISTORY.returnThumbnail(outputId);
ClientData.contentInfo_contentThumbnail(base64String); ClientData.contentInfo_contentThumbnail(base64String);
...@@ -352,11 +352,11 @@ HISTORY.canvasClickFunction = function(e){ ...@@ -352,11 +352,11 @@ HISTORY.canvasClickFunction = function(e){
var contentType = HISTORY.returnContentType(outputId); var contentType = HISTORY.returnContentType(outputId);
ClientData.contentInfo_contentType(contentType); ClientData.contentInfo_contentType(contentType);
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType of content. //End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType of content.
//Store Content id that user has read //Store Content id that user has read
if(ClientData.ReadingContentIds().length > 0){ if(ClientData.ReadingContentIds().length > 0){
HISTORY.contentIdArray = ClientData.ReadingContentIds(); HISTORY.contentIdArray = ClientData.ReadingContentIds();
for(var nIndex = 0; nIndex < HISTORY.contentIdArray.length; nIndex++){ for(var nIndex = 0; nIndex < HISTORY.contentIdArray.length; nIndex++){
if(HISTORY.contentIdArray[nIndex].contentid == outputId){ if(HISTORY.contentIdArray[nIndex].contentid == outputId){
checkflag = true; checkflag = true;
...@@ -364,9 +364,9 @@ HISTORY.canvasClickFunction = function(e){ ...@@ -364,9 +364,9 @@ HISTORY.canvasClickFunction = function(e){
} }
else{ else{
checkflag = false; checkflag = false;
} }
} }
if(!checkflag){ if(!checkflag){
HISTORY.contentIdArray.push({contentid: outputId, viewdate: '', originviewdate: ''}); HISTORY.contentIdArray.push({contentid: outputId, viewdate: '', originviewdate: ''});
} }
...@@ -374,20 +374,20 @@ HISTORY.canvasClickFunction = function(e){ ...@@ -374,20 +374,20 @@ HISTORY.canvasClickFunction = function(e){
else{ else{
HISTORY.contentIdArray.push({contentid: outputId, viewdate: '', originviewdate: ''}); HISTORY.contentIdArray.push({contentid: outputId, viewdate: '', originviewdate: ''});
} }
//Renew ReadingContentID //Renew ReadingContentID
var newArray = []; var newArray = [];
ClientData.ReadingContentIds(newArray); ClientData.ReadingContentIds(newArray);
//Set data for readingcontentid //Set data for readingcontentid
ClientData.ReadingContentIds(HISTORY.contentIdArray); ClientData.ReadingContentIds(HISTORY.contentIdArray);
//Set ResouceVersion for content //Set ResouceVersion for content
COMMON.setResourceVersionData(outputId); COMMON.setResourceVersionData(outputId);
//Set MetaVersion for content //Set MetaVersion for content
COMMON.setMetaVersionData(outputId); COMMON.setMetaVersionData(outputId);
//Delete 'new' icon //Delete 'new' icon
HISTORY.drawEditImage(outputId); HISTORY.drawEditImage(outputId);
...@@ -414,33 +414,33 @@ HISTORY.reRenderPageNumber = function(dispRecord, dispTotal){ ...@@ -414,33 +414,33 @@ HISTORY.reRenderPageNumber = function(dispRecord, dispTotal){
//Sort By Title Function //Sort By Title Function
HISTORY.sortByTitleFunction = function(){ HISTORY.sortByTitleFunction = function(){
var sortOrder = ClientData.searchCond_sortOrder(); var sortOrder = ClientData.searchCond_sortOrder();
var sortType = ClientData.searchCond_sortType(); var sortType = ClientData.searchCond_sortType();
var sid = ClientData.userInfo_sid(); var sid = ClientData.userInfo_sid();
var recordFrom = null; var recordFrom = null;
var recordTo = null; var recordTo = null;
var genreId = ClientData.searchCond_genreId(); var genreId = ClientData.searchCond_genreId();
var groupId = ClientData.searchCond_groupId(); var groupId = ClientData.searchCond_groupId();
if(sortOrder == COMMON.Consts.ConstOrderSetting_Asc) if(sortOrder == COMMON.Consts.ConstOrderSetting_Asc)
{ {
if(sortType == '1'){ if(sortType == '1'){
sortOrder = COMMON.Consts.ConstOrderSetting_Desc; sortOrder = COMMON.Consts.ConstOrderSetting_Desc;
HISTORY.sortByTitleDesc(); HISTORY.sortByTitleDesc();
} }
else{ else{
sortOrder = COMMON.Consts.ConstOrderSetting_Asc; sortOrder = COMMON.Consts.ConstOrderSetting_Asc;
HISTORY.sortByTitleAsc(); HISTORY.sortByTitleAsc();
} }
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
} }
else else
{ {
sortOrder = COMMON.Consts.ConstOrderSetting_Asc; sortOrder = COMMON.Consts.ConstOrderSetting_Asc;
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
HISTORY.sortByTitleAsc(); HISTORY.sortByTitleAsc();
} }
HEADER.setStatusSort('#control-sort-title',sortOrder == COMMON.Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-title',sortOrder == COMMON.Consts.ConstOrderSetting_Asc);
...@@ -449,124 +449,124 @@ HISTORY.sortByTitleFunction = function(){ ...@@ -449,124 +449,124 @@ HISTORY.sortByTitleFunction = function(){
//refresh Gridview //refresh Gridview
//HISTORY.refreshGrid(); //HISTORY.refreshGrid();
//HISTORY.renderContent(sid, '', ClientData.searchCond_searchDivision(), sortType, sortOrder, recordFrom, recordTo, genreId, groupId); //HISTORY.renderContent(sid, '', ClientData.searchCond_searchDivision(), sortType, sortOrder, recordFrom, recordTo, genreId, groupId);
}; };
//Sort By Title Kana function //Sort By Title Kana function
HISTORY.sortByTitleKanaFunction = function(){ HISTORY.sortByTitleKanaFunction = function(){
var sortOrder = ClientData.searchCond_sortOrder(); var sortOrder = ClientData.searchCond_sortOrder();
var sortType = ClientData.searchCond_sortType(); var sortType = ClientData.searchCond_sortType();
var sid = ClientData.userInfo_sid(); var sid = ClientData.userInfo_sid();
var recordFrom = null; var recordFrom = null;
var recordTo = null; var recordTo = null;
var genreId = ClientData.searchCond_genreId(); var genreId = ClientData.searchCond_genreId();
var groupId = ClientData.searchCond_groupId(); var groupId = ClientData.searchCond_groupId();
if(sortOrder == COMMON.Consts.ConstOrderSetting_Asc) if(sortOrder == COMMON.Consts.ConstOrderSetting_Asc)
{ {
if(sortType == '2'){ if(sortType == '2'){
sortOrder = COMMON.Consts.ConstOrderSetting_Desc; sortOrder = COMMON.Consts.ConstOrderSetting_Desc;
HISTORY.sortByTitleKanaDesc(); HISTORY.sortByTitleKanaDesc();
} }
else{ else{
sortOrder = COMMON.Consts.ConstOrderSetting_Asc; sortOrder = COMMON.Consts.ConstOrderSetting_Asc;
HISTORY.sortByTitleKanaAsc(); HISTORY.sortByTitleKanaAsc();
} }
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
} }
else else
{ {
sortOrder = COMMON.Consts.ConstOrderSetting_Asc; sortOrder = COMMON.Consts.ConstOrderSetting_Asc;
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
HISTORY.sortByTitleKanaAsc(); HISTORY.sortByTitleKanaAsc();
} }
HEADER.setStatusSort('#control-sort-titlekana',sortOrder == COMMON.Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-titlekana',sortOrder == COMMON.Consts.ConstOrderSetting_Asc);
sortType = '2'; sortType = '2';
//refresh gridview //refresh gridview
//HISTORY.refreshGrid(); //HISTORY.refreshGrid();
ClientData.searchCond_sortType(sortType); ClientData.searchCond_sortType(sortType);
//HISTORY.renderContent(sid, '', ClientData.searchCond_searchDivision(), sortType, sortOrder, null, null, genreId, groupId); //HISTORY.renderContent(sid, '', ClientData.searchCond_searchDivision(), sortType, sortOrder, null, null, genreId, groupId);
}; };
//Sort By Release Date //Sort By Release Date
HISTORY.sortByReleaseDateFunction = function(){ HISTORY.sortByReleaseDateFunction = function(){
var sortOrder = ClientData.searchCond_sortOrder(); var sortOrder = ClientData.searchCond_sortOrder();
var sortType = ClientData.searchCond_sortType(); var sortType = ClientData.searchCond_sortType();
var sid = ClientData.userInfo_sid(); var sid = ClientData.userInfo_sid();
var recordFrom = null; var recordFrom = null;
var recordTo = null; var recordTo = null;
var genreId = ClientData.searchCond_genreId(); var genreId = ClientData.searchCond_genreId();
var groupId = ClientData.searchCond_groupId(); var groupId = ClientData.searchCond_groupId();
if(sortOrder == COMMON.Consts.ConstOrderSetting_Asc) if(sortOrder == COMMON.Consts.ConstOrderSetting_Asc)
{ {
if(sortType == '3'){ if(sortType == '3'){
sortOrder = COMMON.Consts.ConstOrderSetting_Desc; sortOrder = COMMON.Consts.ConstOrderSetting_Desc;
HISTORY.sortByPublishDateDesc(); HISTORY.sortByPublishDateDesc();
} }
else{ else{
sortOrder = COMMON.Consts.ConstOrderSetting_Asc; sortOrder = COMMON.Consts.ConstOrderSetting_Asc;
HISTORY.sortByPublishDateAsc(); HISTORY.sortByPublishDateAsc();
} }
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
} }
else else
{ {
sortOrder = COMMON.Consts.ConstOrderSetting_Asc; sortOrder = COMMON.Consts.ConstOrderSetting_Asc;
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
HISTORY.sortByPublishDateAsc(); HISTORY.sortByPublishDateAsc();
} }
HEADER.setStatusSort('#control-sort-releasedate',sortOrder == COMMON.Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-releasedate',sortOrder == COMMON.Consts.ConstOrderSetting_Asc);
sortType = '3'; sortType = '3';
ClientData.searchCond_sortType(sortType); ClientData.searchCond_sortType(sortType);
//HISTORY.renderContent(sid, '', ClientData.searchCond_searchDivision(), sortType, sortOrder, recordFrom, recordTo, genreId, groupId); //HISTORY.renderContent(sid, '', ClientData.searchCond_searchDivision(), sortType, sortOrder, recordFrom, recordTo, genreId, groupId);
}; };
//Sort By View Date //Sort By View Date
HISTORY.sortByViewDateFunction = function(){ HISTORY.sortByViewDateFunction = function(){
var sortOrder = ClientData.searchCond_sortOrder(); var sortOrder = ClientData.searchCond_sortOrder();
var sortType = ClientData.searchCond_sortType(); var sortType = ClientData.searchCond_sortType();
if(sortOrder == COMMON.Consts.ConstOrderSetting_Asc) if(sortOrder == COMMON.Consts.ConstOrderSetting_Asc)
{ {
if(sortType == '4'){ if(sortType == '4'){
sortOrder = COMMON.Consts.ConstOrderSetting_Desc; sortOrder = COMMON.Consts.ConstOrderSetting_Desc;
HISTORY.sortByViewDateDesc(); HISTORY.sortByViewDateDesc();
} }
else{ else{
sortOrder = COMMON.Consts.ConstOrderSetting_Asc; sortOrder = COMMON.Consts.ConstOrderSetting_Asc;
HISTORY.sortByViewDateAsc(); HISTORY.sortByViewDateAsc();
} }
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
} }
else else
{ {
sortOrder = COMMON.Consts.ConstOrderSetting_Asc; sortOrder = COMMON.Consts.ConstOrderSetting_Asc;
HISTORY.sortByViewDateAsc(); HISTORY.sortByViewDateAsc();
ClientData.searchCond_sortOrder(sortOrder); ClientData.searchCond_sortOrder(sortOrder);
} }
HEADER.setStatusSort('#control-sort-viewdate',sortOrder == COMMON.Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-viewdate',sortOrder == COMMON.Consts.ConstOrderSetting_Asc);
sortType = '4'; sortType = '4';
ClientData.searchCond_sortType(sortType); ClientData.searchCond_sortType(sortType);
}; };
//Get Thumnail base on contentid //Get Thumnail base on contentid
HISTORY.returnThumbnail = function(contentid){ HISTORY.returnThumbnail = function(contentid){
for(var i = 0; i < HISTORY.thumbnailArr.length; i++){ for(var i = 0; i < HISTORY.thumbnailArr.length; i++){
if(HISTORY.thumbnailArr[i].contentId == contentid){ if(HISTORY.thumbnailArr[i].contentId == contentid){
return HISTORY.thumbnailArr[i].thumbnail; return HISTORY.thumbnailArr[i].thumbnail;
...@@ -579,7 +579,7 @@ HISTORY.returnThumbnail = function(contentid){ ...@@ -579,7 +579,7 @@ HISTORY.returnThumbnail = function(contentid){
HISTORY.returnContentType = function(contentid){ HISTORY.returnContentType = function(contentid){
//Array Length //Array Length
var iArrCnt = HISTORY.contentTypeArr.length; var iArrCnt = HISTORY.contentTypeArr.length;
//Get contentType in array by contentId //Get contentType in array by contentId
for(var i = 0; i < iArrCnt; i++){ for(var i = 0; i < iArrCnt; i++){
if (HISTORY.contentTypeArr[i].contentId == contentid) { if (HISTORY.contentTypeArr[i].contentId == contentid) {
...@@ -597,13 +597,13 @@ HISTORY.readSubmenuFunction = function(e){ ...@@ -597,13 +597,13 @@ HISTORY.readSubmenuFunction = function(e){
HISTORY.home_isMove = false; HISTORY.home_isMove = false;
return; return;
} }
var contentId = $(this).attr('contentid'); var contentId = $(this).attr('contentid');
// check limit of content // check limit of content
LIMIT_ACCESS_CONTENT.checkLimitContent(contentId, LIMIT_ACCESS_CONTENT.checkLimitContent(contentId,
function() function()
{ {
HISTORY.readSubmenuFunction_callback(contentId); HISTORY.readSubmenuFunction_callback(contentId);
}, },
function(){ function(){
...@@ -618,22 +618,22 @@ HISTORY.readSubmenuFunction_callback = function(contentId){ ...@@ -618,22 +618,22 @@ HISTORY.readSubmenuFunction_callback = function(contentId){
var date = new Date(); var date = new Date();
var month = date.getMonth()+1; var month = date.getMonth()+1;
var day = date.getDate(); var day = date.getDate();
var outputDate = COMMON.formatNormalDate(day, month, date.getFullYear()); var outputDate = COMMON.formatNormalDate(day, month, date.getFullYear());
ClientData.contentInfo_contentId(contentId); ClientData.contentInfo_contentId(contentId);
ClientData.contentInfo_contentThumbnail(contentThumbnail); ClientData.contentInfo_contentThumbnail(contentThumbnail);
//Start Function : No.12 -- Editor : Le Long -- Date : 08/01/2013 -- Summary : Store contentType to storage. //Start Function : No.12 -- Editor : Le Long -- Date : 08/01/2013 -- Summary : Store contentType to storage.
var contentType = HISTORY.returnContentType(contentId); var contentType = HISTORY.returnContentType(contentId);
ClientData.contentInfo_contentType(contentType); ClientData.contentInfo_contentType(contentType);
//End Function : No.12 -- Editor : Le Long -- Date : 08/01/2013 -- Summary : Store contentType to storage. //End Function : No.12 -- Editor : Le Long -- Date : 08/01/2013 -- Summary : Store contentType to storage.
var checkflag = false; var checkflag = false;
//Store Content id that user has read //Store Content id that user has read
if(ClientData.ReadingContentIds().length > 0){ if(ClientData.ReadingContentIds().length > 0){
HISTORY.contentIdArray = ClientData.ReadingContentIds(); HISTORY.contentIdArray = ClientData.ReadingContentIds();
for(var nIndex = 0; nIndex < HISTORY.contentIdArray.length; nIndex++){ for(var nIndex = 0; nIndex < HISTORY.contentIdArray.length; nIndex++){
if(HISTORY.contentIdArray[nIndex].contentid == contentId){ if(HISTORY.contentIdArray[nIndex].contentid == contentId){
checkflag = true; checkflag = true;
...@@ -645,9 +645,9 @@ HISTORY.readSubmenuFunction_callback = function(contentId){ ...@@ -645,9 +645,9 @@ HISTORY.readSubmenuFunction_callback = function(contentId){
} }
else{ else{
checkflag = false; checkflag = false;
} }
} }
if(!checkflag){ if(!checkflag){
HISTORY.contentIdArray.push({contentid: contentId, viewdate: outputDate, originviewdate: date}); HISTORY.contentIdArray.push({contentid: contentId, viewdate: outputDate, originviewdate: date});
} }
...@@ -655,32 +655,32 @@ HISTORY.readSubmenuFunction_callback = function(contentId){ ...@@ -655,32 +655,32 @@ HISTORY.readSubmenuFunction_callback = function(contentId){
else{ else{
HISTORY.contentIdArray.push({contentid: contentId, viewdate: outputDate, originviewdate: date}); HISTORY.contentIdArray.push({contentid: contentId, viewdate: outputDate, originviewdate: date});
} }
//Renew ReadingContentID //Renew ReadingContentID
var newArray = []; var newArray = [];
ClientData.ReadingContentIds(newArray); ClientData.ReadingContentIds(newArray);
//Set ResouceVersion for content //Set ResouceVersion for content
COMMON.setResourceVersionData(contentId); COMMON.setResourceVersionData(contentId);
//Set MetaVersion for content //Set MetaVersion for content
COMMON.setMetaVersionData(contentId); COMMON.setMetaVersionData(contentId);
//Set data for readingcontentid //Set data for readingcontentid
ClientData.ReadingContentIds(HISTORY.contentIdArray); ClientData.ReadingContentIds(HISTORY.contentIdArray);
ClientData.IsRefresh(false); ClientData.IsRefresh(false);
//Start Function : No.12 -- Editor : Le Long -- Date : 08/02/2013 -- Summary : Check content type other for download. //Start Function : No.12 -- Editor : Le Long -- Date : 08/02/2013 -- Summary : Check content type other for download.
//For testing without other Type. //For testing without other Type.
//contentType = COMMON.ContentTypeKeys.Type_Others; //contentType = COMMON.ContentTypeKeys.Type_Others;
if(contentType == COMMON.ContentTypeKeys.Type_Others){ if(contentType == COMMON.ContentTypeKeys.Type_Others){
//Download content //Download content
HEADER.downloadResourceById(contentId); HEADER.downloadResourceById(contentId);
// redraw content remove new icon // redraw content remove new icon
HISTORY.drawEditImage(contentId); HISTORY.drawEditImage(contentId);
} }
else if( contentType == COMMON.ContentTypeKeys.Type_Link ){ else if( contentType == COMMON.ContentTypeKeys.Type_Link ){
//link content //link content
HEADER.viewLinkContentById(contentId); HEADER.viewLinkContentById(contentId);
...@@ -690,25 +690,25 @@ HISTORY.readSubmenuFunction_callback = function(contentId){ ...@@ -690,25 +690,25 @@ HISTORY.readSubmenuFunction_callback = function(contentId){
else{ else{
//Go to Conten view page //Go to Conten view page
//AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView); //AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
HISTORY.drawEditImage(contentId); HISTORY.drawEditImage(contentId);
HISTORY.showContentView(); HISTORY.showContentView();
} }
//End Function : No.12 -- Editor : Le Long -- Date : 08/02/2013 -- Summary : Check content type other for download. //End Function : No.12 -- Editor : Le Long -- Date : 08/02/2013 -- Summary : Check content type other for download.
}; };
//Check if Content Has marking or memo //Check if Content Has marking or memo
HISTORY.checkContentMarkingMemoOption = function(contentId){ HISTORY.checkContentMarkingMemoOption = function(contentId){
//Check if contentid has marking //Check if contentid has marking
if(ClientData.MarkingData().length == 0){ if(ClientData.MarkingData().length == 0){
$('#imgBookMark'+contentId).css('visibility','hidden'); $('#imgBookMark'+contentId).css('visibility','hidden');
} }
else{ else{
for (var nIndex1 = 0; nIndex1 < ClientData.MarkingData().length; nIndex1++) { for (var nIndex1 = 0; nIndex1 < ClientData.MarkingData().length; nIndex1++) {
if (ClientData.MarkingData()[nIndex1].contentid == contentId) { if (ClientData.MarkingData()[nIndex1].contentid == contentId) {
$('#imgBookMark'+contentId).css('visibility','visible'); $('#imgBookMark'+contentId).css('visibility','visible');
break; break;
} }
...@@ -717,13 +717,13 @@ HISTORY.checkContentMarkingMemoOption = function(contentId){ ...@@ -717,13 +717,13 @@ HISTORY.checkContentMarkingMemoOption = function(contentId){
} }
} }
} }
if(ClientData.MemoData().length == 0){ if(ClientData.MemoData().length == 0){
$('#imgMemo'+contentId).css('visibility','hidden'); $('#imgMemo'+contentId).css('visibility','hidden');
} }
else{ else{
// Check if contentid has memo // Check if contentid has memo
for (var nIndex1 = 0; nIndex1 < ClientData.MemoData().length; nIndex1++) { for (var nIndex1 = 0; nIndex1 < ClientData.MemoData().length; nIndex1++) {
if (ClientData.MemoData()[nIndex1].contentid == contentId) { if (ClientData.MemoData()[nIndex1].contentid == contentId) {
$('#imgMemo'+contentId).css('visibility','visible'); $('#imgMemo'+contentId).css('visibility','visible');
break; break;
...@@ -738,32 +738,32 @@ HISTORY.checkContentMarkingMemoOption = function(contentId){ ...@@ -738,32 +738,32 @@ HISTORY.checkContentMarkingMemoOption = function(contentId){
//Check if User has read content //Check if User has read content
HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
var imgThumb = new Image(); var imgThumb = new Image();
//imgThumb.src = HISTORY.returnThumbnail(contId); //imgThumb.src = HISTORY.returnThumbnail(contId);
var imgIconNew = new Image(); var imgIconNew = new Image();
//imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW; //imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
var imgIconEdit = new Image(); var imgIconEdit = new Image();
//imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT; //imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
var c = document.getElementById('content-thumbnail'+contId); var c = document.getElementById('content-thumbnail'+contId);
var ctx = c.getContext('2d'); var ctx = c.getContext('2d');
var readFlg = false; var readFlg = false;
var versionArr = ClientData.ResourceVersion(); var versionArr = ClientData.ResourceVersion();
var metaArr = ClientData.MetaVersion(); var metaArr = ClientData.MetaVersion();
var readArr = ClientData.ReadingContentIds(); var readArr = ClientData.ReadingContentIds();
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content. //Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
var contentThumbnail = HISTORY.returnThumbnail(contId); var contentThumbnail = HISTORY.returnThumbnail(contId);
var contentType = HISTORY.returnContentType(contId); var contentType = HISTORY.returnContentType(contId);
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content. //End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
if(readArr == null || readArr <= 0 || readArr == 'undefined'){ if(readArr == null || readArr <= 0 || readArr == 'undefined'){
imgThumb.onload = function(){ imgThumb.onload = function(){
var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height); var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, c.width/2 - resizeImg[0]/2, 0, resizeImg[0], resizeImg[1]); ctx.drawImage(imgThumb, c.width/2 - resizeImg[0]/2, 0, resizeImg[0], resizeImg[1]);
imgIconNew.onload = function(){ imgIconNew.onload = function(){
ctx.drawImage(imgIconNew, c.width/2 - resizeImg[0]/2, 0); ctx.drawImage(imgIconNew, c.width/2 - resizeImg[0]/2, 0);
...@@ -771,7 +771,7 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){ ...@@ -771,7 +771,7 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
}; };
imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW; imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
}; };
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail. //Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if(contentThumbnail == '' || contentThumbnail == null){ if(contentThumbnail == '' || contentThumbnail == null){
if(!COMMON.isPdfContent(contentType)){ if(!COMMON.isPdfContent(contentType)){
...@@ -783,16 +783,16 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){ ...@@ -783,16 +783,16 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
} }
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail. //End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
} }
else{ else{
//Check if user has read this content or not //Check if user has read this content or not
for (var nIndex1 = 0; nIndex1 < ClientData.ReadingContentIds().length; nIndex1++) { for (var nIndex1 = 0; nIndex1 < ClientData.ReadingContentIds().length; nIndex1++) {
if(ClientData.ReadingContentIds()[nIndex1].contentid == contId){ if(ClientData.ReadingContentIds()[nIndex1].contentid == contId){
imgThumb.onload = function(){ imgThumb.onload = function(){
var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height); var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, c.width/2 - resizeImg[0]/2, 0, resizeImg[0], resizeImg[1]); ctx.drawImage(imgThumb, c.width/2 - resizeImg[0]/2, 0, resizeImg[0], resizeImg[1]);
HISTORY.showContentThumbnail(contId); HISTORY.showContentThumbnail(contId);
}; };
...@@ -807,14 +807,14 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){ ...@@ -807,14 +807,14 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
} }
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail. //End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
readFlg = true; readFlg = true;
break; break;
} }
else{ else{
imgThumb.onload = function(){ imgThumb.onload = function(){
var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height); var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, c.width/2 - resizeImg[0]/2, 0, resizeImg[0], resizeImg[1]); ctx.drawImage(imgThumb, c.width/2 - resizeImg[0]/2, 0, resizeImg[0], resizeImg[1]);
HISTORY.showContentThumbnail(contId); HISTORY.showContentThumbnail(contId);
imgIconNew.onload = function(){ imgIconNew.onload = function(){
...@@ -833,12 +833,12 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){ ...@@ -833,12 +833,12 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
} }
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail. //End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
} }
} }
} }
//Check if resource version has change //Check if resource version has change
if(readFlg){ if(readFlg){
if(versionArr == null || versionArr <= 0 || versionArr == 'undefined'){ if(versionArr == null || versionArr <= 0 || versionArr == 'undefined'){
...@@ -847,8 +847,8 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){ ...@@ -847,8 +847,8 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
for(var nIndex2 = 0; nIndex2 < versionArr.length; nIndex2++){ for(var nIndex2 = 0; nIndex2 < versionArr.length; nIndex2++){
if(versionArr[nIndex2].contentid == contId){ if(versionArr[nIndex2].contentid == contId){
if(versionArr[nIndex2].resourceversion != resourceVer){ if(versionArr[nIndex2].resourceversion != resourceVer){
imgThumb.onload = function(){ imgThumb.onload = function(){
var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height); var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, c.width/2 - resizeImg[0]/2, 0, resizeImg[0], resizeImg[1]); ctx.drawImage(imgThumb, c.width/2 - resizeImg[0]/2, 0, resizeImg[0], resizeImg[1]);
HISTORY.showContentThumbnail(contId); HISTORY.showContentThumbnail(contId);
imgIconEdit.onload = function(){ imgIconEdit.onload = function(){
...@@ -867,22 +867,22 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){ ...@@ -867,22 +867,22 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
} }
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail. //End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
break; break;
} }
} }
} }
} }
if(metaArr == null || metaArr <= 0 || metaArr == 'undefined'){ if(metaArr == null || metaArr <= 0 || metaArr == 'undefined'){
} }
else{ else{
for(var nIndex2 = 0; nIndex2 < metaArr.length; nIndex2++){ for(var nIndex2 = 0; nIndex2 < metaArr.length; nIndex2++){
if(metaArr[nIndex2].contentid == contId){ if(metaArr[nIndex2].contentid == contId){
if(metaArr[nIndex2].metaversion != metaVer){ if(metaArr[nIndex2].metaversion != metaVer){
imgThumb.onload = function(){ imgThumb.onload = function(){
var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height); var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, c.width/2 - resizeImg[0]/2, 0, resizeImg[0], resizeImg[1]); ctx.drawImage(imgThumb, c.width/2 - resizeImg[0]/2, 0, resizeImg[0], resizeImg[1]);
HISTORY.showContentThumbnail(contId); HISTORY.showContentThumbnail(contId);
imgIconEdit.onload = function(){ imgIconEdit.onload = function(){
...@@ -901,11 +901,11 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){ ...@@ -901,11 +901,11 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
} }
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail. //End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
break; break;
} }
} }
} }
} }
readFlg = false; readFlg = false;
...@@ -916,22 +916,22 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){ ...@@ -916,22 +916,22 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
HISTORY.drawEditImage = function(id) { HISTORY.drawEditImage = function(id) {
var img = new Image(); var img = new Image();
var imgSrc = HISTORY.returnThumbnail(id); var imgSrc = HISTORY.returnThumbnail(id);
if(imgSrc != null){ if(imgSrc != null){
} }
else{ else{
var contentType = HISTORY.returnContentType(id); var contentType = HISTORY.returnContentType(id);
var src = HEADER.getThumbnailForOtherType(contentType); var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){ if( src != '' ){
imgSrc = src; imgSrc = src;
} }
} }
var c = document.getElementById('content-thumbnail' + id); var c = document.getElementById('content-thumbnail' + id);
//use getContext to use the canvas for drawing //use getContext to use the canvas for drawing
var ctx = c.getContext('2d'); var ctx = c.getContext('2d');
ctx.clearRect(0, 0, c.width, c.height); ctx.clearRect(0, 0, c.width, c.height);
...@@ -940,9 +940,9 @@ HISTORY.drawEditImage = function(id) { ...@@ -940,9 +940,9 @@ HISTORY.drawEditImage = function(id) {
ctx.drawImage(img, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]); ctx.drawImage(img, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
$("#loadingIcon" + id).fadeOut('slow', function () { $("#loadingIcon" + id).fadeOut('slow', function () {
$('#content-thumbnail' + id).fadeIn('slow'); $('#content-thumbnail' + id).fadeIn('slow');
}); });
}; };
img.src = imgSrc; img.src = imgSrc;
}; };
...@@ -966,15 +966,15 @@ HISTORY.returnOriginalViewDate = function(id){ ...@@ -966,15 +966,15 @@ HISTORY.returnOriginalViewDate = function(id){
//handle display sort direction //handle display sort direction
HISTORY.handleSortDisp = function(){ HISTORY.handleSortDisp = function(){
$('#control-sort-title').removeClass('active_tops'); $('#control-sort-title').removeClass('active_tops');
$('#control-sort-titlekana').removeClass('active_tops'); $('#control-sort-titlekana').removeClass('active_tops');
$('#control-sort-releasedate').removeClass('active_tops'); $('#control-sort-releasedate').removeClass('active_tops');
$('#control-sort-viewdate').removeClass('active_tops'); $('#control-sort-viewdate').removeClass('active_tops');
var typeSort; var typeSort;
var orderSort; var orderSort;
if(ClientData.searchCond_sortType() == null || ClientData.searchCond_sortType() == 'undefined' || ClientData.searchCond_sortType() == ''){ if(ClientData.searchCond_sortType() == null || ClientData.searchCond_sortType() == 'undefined' || ClientData.searchCond_sortType() == ''){
$('#title-sorttype').html(''); $('#title-sorttype').html('');
$('#title-sorttype').html(''); $('#title-sorttype').html('');
...@@ -986,7 +986,7 @@ HISTORY.handleSortDisp = function(){ ...@@ -986,7 +986,7 @@ HISTORY.handleSortDisp = function(){
if(ClientData.searchCond_sortOrder() != null && ClientData.searchCond_sortOrder() != 'undefined' && ClientData.searchCond_sortType() != ''){ if(ClientData.searchCond_sortOrder() != null && ClientData.searchCond_sortOrder() != 'undefined' && ClientData.searchCond_sortType() != ''){
typeSort = ClientData.searchCond_sortType(); typeSort = ClientData.searchCond_sortType();
orderSort = ClientData.searchCond_sortOrder(); orderSort = ClientData.searchCond_sortOrder();
if(typeSort == 1){ if(typeSort == 1){
HEADER.setStatusSort('#control-sort-title',orderSort == COMMON.Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-title',orderSort == COMMON.Consts.ConstOrderSetting_Asc);
} }
...@@ -999,7 +999,7 @@ HISTORY.handleSortDisp = function(){ ...@@ -999,7 +999,7 @@ HISTORY.handleSortDisp = function(){
else{ else{
HEADER.setStatusSort('#control-sort-viewdate',orderSort == COMMON.Consts.ConstOrderSetting_Asc); HEADER.setStatusSort('#control-sort-viewdate',orderSort == COMMON.Consts.ConstOrderSetting_Asc);
} }
} }
} }
}; };
...@@ -1012,13 +1012,13 @@ HISTORY.titleClickFunction = function(e){ ...@@ -1012,13 +1012,13 @@ HISTORY.titleClickFunction = function(e){
HISTORY.home_isMove = false; HISTORY.home_isMove = false;
return; return;
} }
var contentid = $(this).attr('contentid'); var contentid = $(this).attr('contentid');
// Get image of selected image // Get image of selected image
var base64String = HISTORY.returnThumbnail(contentid); var base64String = HISTORY.returnThumbnail(contentid);
ClientData.contentInfo_contentThumbnail(base64String); ClientData.contentInfo_contentThumbnail(base64String);
ClientData.contentInfo_contentId(contentid); ClientData.contentInfo_contentId(contentid);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType of content. //Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType of content.
var contentType = HISTORY.returnContentType(contentid); var contentType = HISTORY.returnContentType(contentid);
ClientData.contentInfo_contentType(contentType); ClientData.contentInfo_contentType(contentType);
...@@ -1027,7 +1027,7 @@ HISTORY.titleClickFunction = function(e){ ...@@ -1027,7 +1027,7 @@ HISTORY.titleClickFunction = function(e){
//Store Content id that user has read //Store Content id that user has read
if(ClientData.ReadingContentIds().length > 0){ if(ClientData.ReadingContentIds().length > 0){
HISTORY.contentIdArray = ClientData.ReadingContentIds(); HISTORY.contentIdArray = ClientData.ReadingContentIds();
for(var nIndex = 0; nIndex < HISTORY.contentIdArray.length; nIndex++){ for(var nIndex = 0; nIndex < HISTORY.contentIdArray.length; nIndex++){
if(HISTORY.contentIdArray[nIndex].contentid == contentid){ if(HISTORY.contentIdArray[nIndex].contentid == contentid){
checkflag = true; checkflag = true;
...@@ -1035,9 +1035,9 @@ HISTORY.titleClickFunction = function(e){ ...@@ -1035,9 +1035,9 @@ HISTORY.titleClickFunction = function(e){
} }
else{ else{
checkflag = false; checkflag = false;
} }
} }
if(!checkflag){ if(!checkflag){
HISTORY.contentIdArray.push({contentid: contentid, viewdate: '', originviewdate: ''}); HISTORY.contentIdArray.push({contentid: contentid, viewdate: '', originviewdate: ''});
} }
...@@ -1045,20 +1045,20 @@ HISTORY.titleClickFunction = function(e){ ...@@ -1045,20 +1045,20 @@ HISTORY.titleClickFunction = function(e){
else{ else{
HISTORY.contentIdArray.push({contentid: contentid, viewdate: '', originviewdate: ''}); HISTORY.contentIdArray.push({contentid: contentid, viewdate: '', originviewdate: ''});
} }
//Renew ReadingContentID //Renew ReadingContentID
var newArray = []; var newArray = [];
ClientData.ReadingContentIds(newArray); ClientData.ReadingContentIds(newArray);
//Set data for readingcontentid //Set data for readingcontentid
ClientData.ReadingContentIds(HISTORY.contentIdArray); ClientData.ReadingContentIds(HISTORY.contentIdArray);
//Set ResouceVersion for content //Set ResouceVersion for content
COMMON.setResourceVersionData(contentid); COMMON.setResourceVersionData(contentid);
//Set MetaVersion for content //Set MetaVersion for content
COMMON.setMetaVersionData(contentid); COMMON.setMetaVersionData(contentid);
//Delete 'new' icon //Delete 'new' icon
HISTORY.drawEditImage(contentid); HISTORY.drawEditImage(contentid);
...@@ -1094,7 +1094,7 @@ HISTORY.sortByViewDateAsc = function(){ ...@@ -1094,7 +1094,7 @@ HISTORY.sortByViewDateAsc = function(){
} }
} }
} }
var resultArr = sortArr; var resultArr = sortArr;
HISTORY.renderContentAfterSort(resultArr); HISTORY.renderContentAfterSort(resultArr);
}; };
...@@ -1108,14 +1108,14 @@ HISTORY.formatDate = function(originDate){ ...@@ -1108,14 +1108,14 @@ HISTORY.formatDate = function(originDate){
var minute = sourceDate.getMinutes(); var minute = sourceDate.getMinutes();
var second = sourceDate.getSeconds(); var second = sourceDate.getSeconds();
var milisecond = sourceDate.getMilliseconds(); var milisecond = sourceDate.getMilliseconds();
var newDate = new Date(year, month, day, hour, minute, second, milisecond); var newDate = new Date(year, month, day, hour, minute, second, milisecond);
return newDate; return newDate;
}; };
HISTORY.sortByViewDateDesc = function(){ HISTORY.sortByViewDateDesc = function(){
var sortArr = HISTORY.contentViewData; var sortArr = HISTORY.contentViewData;
var temp; var temp;
for(var i = 0; i < sortArr.length; i++){ for(var i = 0; i < sortArr.length; i++){
for(var j = sortArr.length - 1; j > i; j--){ for(var j = sortArr.length - 1; j > i; j--){
...@@ -1126,7 +1126,7 @@ HISTORY.sortByViewDateDesc = function(){ ...@@ -1126,7 +1126,7 @@ HISTORY.sortByViewDateDesc = function(){
} }
} }
} }
var resultArr = sortArr; var resultArr = sortArr;
HISTORY.renderContentAfterSort(resultArr); HISTORY.renderContentAfterSort(resultArr);
}; };
...@@ -1143,14 +1143,14 @@ HISTORY.addReadContentToArray = function(strContentId, strResourceVersion, strMe ...@@ -1143,14 +1143,14 @@ HISTORY.addReadContentToArray = function(strContentId, strResourceVersion, strMe
flag = false; flag = false;
} }
} }
if(!flag){ if(!flag){
HISTORY.contentViewData.push({contentid: strContentId, originviewdate: HISTORY.formatDate(HISTORY.returnOriginalViewDate(strContentId)), contenttitle: strTitle, contenttitlekana: strTitleKana, deliverydate: strDelivDate, resourceversion: strResourceVersion, metaversion: strMetaVersion, thumbnail: COMMON.formatStringBase64(strThumbnail),contenttype:contentType, readerShare:readerShare }); HISTORY.contentViewData.push({contentid: strContentId, originviewdate: HISTORY.formatDate(HISTORY.returnOriginalViewDate(strContentId)), contenttitle: strTitle, contenttitlekana: strTitleKana, deliverydate: strDelivDate, resourceversion: strResourceVersion, metaversion: strMetaVersion, thumbnail: COMMON.formatStringBase64(strThumbnail),contenttype:contentType, readerShare:readerShare });
} }
}else{ }else{
HISTORY.contentViewData.push({contentid: strContentId, originviewdate: HISTORY.formatDate(HISTORY.returnOriginalViewDate(strContentId)), contenttitle: strTitle, contenttitlekana: strTitleKana, deliverydate: strDelivDate, resourceversion: strResourceVersion, metaversion: strMetaVersion, thumbnail: COMMON.formatStringBase64(strThumbnail),contenttype:contentType, readerShare:readerShare }); HISTORY.contentViewData.push({contentid: strContentId, originviewdate: HISTORY.formatDate(HISTORY.returnOriginalViewDate(strContentId)), contenttitle: strTitle, contenttitlekana: strTitleKana, deliverydate: strDelivDate, resourceversion: strResourceVersion, metaversion: strMetaVersion, thumbnail: COMMON.formatStringBase64(strThumbnail),contenttype:contentType, readerShare:readerShare });
} }
}; };
HISTORY.showContentThumbnail = function(conid) { HISTORY.showContentThumbnail = function(conid) {
...@@ -1178,7 +1178,7 @@ HISTORY.syncReadingContent = function(){ ...@@ -1178,7 +1178,7 @@ HISTORY.syncReadingContent = function(){
return; return;
} }
} }
ClientData.ReadingContentIds(readArr); ClientData.ReadingContentIds(readArr);
ClientData.MetaVersion(metaArr); ClientData.MetaVersion(metaArr);
ClientData.ResourceVersion(resourceArr); ClientData.ResourceVersion(resourceArr);
...@@ -1202,11 +1202,11 @@ HISTORY.getContentNameKana = function(strContentId) { ...@@ -1202,11 +1202,11 @@ HISTORY.getContentNameKana = function(strContentId) {
Check content whether existed or not Check content whether existed or not
*/ */
HISTORY.IsExistContent = function(strContentId) { HISTORY.IsExistContent = function(strContentId) {
if( strContentId == null || strContentId == "" ){ if( strContentId == null || strContentId == "" ){
return false; return false;
} }
var isExisted = true; var isExisted = true;
var params = { var params = {
sid: ClientData.userInfo_sid(), sid: ClientData.userInfo_sid(),
...@@ -1238,7 +1238,7 @@ HISTORY.IsExistContent = function(strContentId) { ...@@ -1238,7 +1238,7 @@ HISTORY.IsExistContent = function(strContentId) {
HISTORY.displayResultNoRecord = function(){ HISTORY.displayResultNoRecord = function(){
I18N.i18nReplaceText(); I18N.i18nReplaceText();
$('#content-grid').html("<div id='msgHistoryNotExist'>" + I18N.i18nText('msgHistoryNotExist') + "</div>"); $('#content-grid').html("<div id='msgHistoryNotExist'>" + I18N.i18nText('msgHistoryNotExist') + "</div>");
$('#control-nextrecord').css('visibility','hidden'); $('#control-nextrecord').css('visibility','hidden');
$('.control_sort_on').hide(); $('.control_sort_on').hide();
$('.control_sort_off').show(); $('.control_sort_off').show();
...@@ -1252,7 +1252,7 @@ HISTORY.displayResultNoRecord = function(){ ...@@ -1252,7 +1252,7 @@ HISTORY.displayResultNoRecord = function(){
HISTORY.sortByTitleAsc = function(){ HISTORY.sortByTitleAsc = function(){
var sortArr = HISTORY.contentViewData; var sortArr = HISTORY.contentViewData;
var t; var t;
for(var i = 0; i < sortArr.length; i++){ for(var i = 0; i < sortArr.length; i++){
for(var j = 1; j < sortArr.length - i; j++){ for(var j = 1; j < sortArr.length - i; j++){
...@@ -1263,7 +1263,7 @@ HISTORY.sortByTitleAsc = function(){ ...@@ -1263,7 +1263,7 @@ HISTORY.sortByTitleAsc = function(){
} }
} }
} }
var resultArr = sortArr; var resultArr = sortArr;
HISTORY.renderContentAfterSort(resultArr); HISTORY.renderContentAfterSort(resultArr);
}; };
...@@ -1280,14 +1280,14 @@ HISTORY.sortByTitleDesc = function(){ ...@@ -1280,14 +1280,14 @@ HISTORY.sortByTitleDesc = function(){
} }
} }
} }
var resultArr = HISTORY.contentViewData; var resultArr = HISTORY.contentViewData;
HISTORY.renderContentAfterSort(resultArr); HISTORY.renderContentAfterSort(resultArr);
}; };
HISTORY.sortByPublishDateAsc = function(){ HISTORY.sortByPublishDateAsc = function(){
var sortArr = HISTORY.contentViewData; var sortArr = HISTORY.contentViewData;
var t; var t;
for(var i = 0; i < sortArr.length; i++){ for(var i = 0; i < sortArr.length; i++){
for(var j = 1; j < sortArr.length - i; j++){ for(var j = 1; j < sortArr.length - i; j++){
...@@ -1315,13 +1315,13 @@ HISTORY.sortByPublishDateDesc = function(){ ...@@ -1315,13 +1315,13 @@ HISTORY.sortByPublishDateDesc = function(){
} }
} }
} }
var resultArr = sortArr; var resultArr = sortArr;
HISTORY.renderContentAfterSort(resultArr); HISTORY.renderContentAfterSort(resultArr);
}; };
HISTORY.sortByTitleKanaAsc = function(){ HISTORY.sortByTitleKanaAsc = function(){
var sortArr = HISTORY.contentViewData; var sortArr = HISTORY.contentViewData;
var t; var t;
for(var i = 0; i < sortArr.length; i++){ for(var i = 0; i < sortArr.length; i++){
for(var j = 1; j < sortArr.length - i; j++){ for(var j = 1; j < sortArr.length - i; j++){
...@@ -1349,7 +1349,7 @@ HISTORY.sortByTitleKanaDesc = function(){ ...@@ -1349,7 +1349,7 @@ HISTORY.sortByTitleKanaDesc = function(){
} }
} }
} }
var resultArr = sortArr; var resultArr = sortArr;
HISTORY.renderContentAfterSort(resultArr); HISTORY.renderContentAfterSort(resultArr);
}; };
...@@ -1357,7 +1357,7 @@ HISTORY.sortByTitleKanaDesc = function(){ ...@@ -1357,7 +1357,7 @@ HISTORY.sortByTitleKanaDesc = function(){
HISTORY.renderContentAfterSort = function(contentSortArr){ HISTORY.renderContentAfterSort = function(contentSortArr){
HISTORY.refreshGrid(); HISTORY.refreshGrid();
//var htmlTemp = ""; //var htmlTemp = "";
for(var i = 0; i < contentSortArr.length; i++) { for(var i = 0; i < contentSortArr.length; i++) {
post = contentSortArr[i]; post = contentSortArr[i];
...@@ -1373,7 +1373,7 @@ HISTORY.renderContentAfterSort = function(contentSortArr){ ...@@ -1373,7 +1373,7 @@ HISTORY.renderContentAfterSort = function(contentSortArr){
+ ' <div class="text">' + ' <div class="text">'
+ ' <a id="title' + post.contentid + '" class="name dialog" contentid="' + post.contentid + '">' + ' <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="' + HEADER.getIconTypeContent(post.contenttype)+'" width="20" height="20">'
+ COMMON.truncate(COMMON.htmlEncode(post.contenttitle), 20) + COMMON.truncate(COMMON.htmlEncode(post.contenttitle), 20)
+ ' </a>' + ' </a>'
+ ' <div class="info">' + ' <div class="info">'
+ ' <ul class="date">' + ' <ul class="date">'
...@@ -1389,14 +1389,14 @@ HISTORY.renderContentAfterSort = function(contentSortArr){ ...@@ -1389,14 +1389,14 @@ HISTORY.renderContentAfterSort = function(contentSortArr){
+ ' </div>' + ' </div>'
+ ' </div>' + ' </div>'
+ '</section>'; + '</section>';
var shareHtml = ""; var shareHtml = "";
if( post.readerShare == '1' ){ if( post.readerShare == '1' ){
shareHtml ='<li><a class="read lang button-share" contentid="' + post.contentid + '" lang="txtShare">'+I18N.i18nText("txtShare")+'</a></li>'; shareHtml ='<li><a class="read lang button-share" contentid="' + post.contentid + '" lang="txtShare">'+I18N.i18nText("txtShare")+'</a></li>';
} }
htmlTemp = htmlTemp.replace(/\{share\}/g, shareHtml); htmlTemp = htmlTemp.replace(/\{share\}/g, shareHtml);
$('#content-grid').append(htmlTemp); $('#content-grid').append(htmlTemp);
} }
for (var i = 0; i < contentSortArr.length; i++) { for (var i = 0; i < contentSortArr.length; i++) {
...@@ -1426,7 +1426,7 @@ HISTORY.formatOriginalPublishDate = function(date){ ...@@ -1426,7 +1426,7 @@ HISTORY.formatOriginalPublishDate = function(date){
var hour = date.hours; var hour = date.hours;
var minute = date.minutes; var minute = date.minutes;
var second = date.seconds; var second = date.seconds;
var resultDate = new Date(year, month, day, hour, minute, second); var resultDate = new Date(year, month, day, hour, minute, second);
return resultDate; return resultDate;
}; };
...@@ -1446,12 +1446,12 @@ HISTORY.returnContentTitleKana = function(id) { ...@@ -1446,12 +1446,12 @@ HISTORY.returnContentTitleKana = function(id) {
sid: ClientData.userInfo_sid(), sid: ClientData.userInfo_sid(),
getType: 1 getType: 1
}; };
// Get all pages of content // Get all pages of content
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params, AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
function (data) { function (data) {
// Success // Success
titleKana = data.contentData.contentNameKana; titleKana = data.contentData.contentNameKana;
}, null); }, null);
...@@ -1473,18 +1473,18 @@ HISTORY.resizeResourceThumbnail = function(mg, width, height) { ...@@ -1473,18 +1473,18 @@ HISTORY.resizeResourceThumbnail = function(mg, width, height) {
}; };
HISTORY.removeHoverCss = function(){ HISTORY.removeHoverCss = function(){
if(COMMON.isTouchDevice()){ if(COMMON.isTouchDevice()){
$('#control-sort-title').removeClass('nottouchdevice'); $('#control-sort-title').removeClass('nottouchdevice');
$('#control-sort-titlekana').removeClass('nottouchdevice'); $('#control-sort-titlekana').removeClass('nottouchdevice');
$('#control-sort-releasedate').removeClass('nottouchdevice'); $('#control-sort-releasedate').removeClass('nottouchdevice');
$('#control-sort-viewdate').removeClass('nottouchdevice'); $('#control-sort-viewdate').removeClass('nottouchdevice');
} }
}; };
//Dialog Read Button CLick //Dialog Read Button CLick
HISTORY.showContentShareDlgFunction = function(e) { HISTORY.showContentShareDlgFunction = function(e) {
if (e) { if (e) {
e.preventDefault(); e.preventDefault();
} }
...@@ -1498,11 +1498,11 @@ HISTORY.showContentShareDlgFunction = function(e) { ...@@ -1498,11 +1498,11 @@ HISTORY.showContentShareDlgFunction = function(e) {
// check limit of content // check limit of content
LIMIT_ACCESS_CONTENT.checkLimitContent(contentId, LIMIT_ACCESS_CONTENT.checkLimitContent(contentId,
function() function()
{ {
SHARE.contentId = contentId; SHARE.contentId = contentId;
SHARE.contentTitle = ""; SHARE.contentTitle = "";
SHARE.openContentShare(); SHARE.openContentShare();
}, },
function(){ function(){
//console.log("checkLimitContent_bbb"); //console.log("checkLimitContent_bbb");
...@@ -1512,7 +1512,7 @@ HISTORY.showContentShareDlgFunction = function(e) { ...@@ -1512,7 +1512,7 @@ HISTORY.showContentShareDlgFunction = function(e) {
}; };
HISTORY.showContentView = function(){ HISTORY.showContentView = function(){
var y = 0; var y = 0;
if( document.documentElement.scrollTop ){ if( document.documentElement.scrollTop ){
y = document.documentElement.scrollTop; y = document.documentElement.scrollTop;
...@@ -1528,17 +1528,17 @@ HISTORY.showContentView = function(){ ...@@ -1528,17 +1528,17 @@ HISTORY.showContentView = function(){
//console.log("scrollTop:" + y); //console.log("scrollTop:" + y);
HISTORY.scrollTop = y; HISTORY.scrollTop = y;
window.scrollTo(0,0); window.scrollTo(0,0);
$("#header-ws").hide(); $("#header-ws").hide();
$("#ws-body").hide(); $("#ws-body").hide();
$("#topcontrol").hide(); $("#topcontrol").hide();
CONTENTVIEW_INITOBJECT.clearViewerComponent(); CONTENTVIEW_INITOBJECT.clearViewerComponent();
CONTENTVIEW.cssInit(); CONTENTVIEW.cssInit();
$("#viewer").show(); $("#viewer").show();
CONTENTVIEW.ready(); CONTENTVIEW.ready();
}; };
HISTORY.cssInit = function(){ HISTORY.cssInit = function(){
...@@ -1570,7 +1570,7 @@ HISTORY.downloadFunction = function(e) { ...@@ -1570,7 +1570,7 @@ HISTORY.downloadFunction = function(e) {
var contentId = $(this).attr('contentid'); var contentId = $(this).attr('contentid');
//Download content //Download content
HEADER.downloadResourceById(contentId); HEADER.downloadResourceById(contentId);
}; };
......
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