Commit 809f824e by Masaru Abe

home.jsのリファクタリング

parent cc95a08a
......@@ -8,6 +8,22 @@
//グローバルの名前空間用のオブジェクトを用意する
var COMMON = {};
COMMON.DEFAULT_IMG_OPTION_MEMO = 'img/list/icon_sticker.png';
COMMON.DEFAULT_IMG_OPTION_MARKING = 'img/list/icon_pen.png';
COMMON.DEFAULT_IMG_CONTENT_EDIT = 'img/common/band_updated.png';
COMMON.DEFAULT_IMG_CONTENT_NEW = 'img/common/band_new.png';
COMMON.ThumbnailForOtherType = {
Thumbnail_ImageType : 'img/image_type.png',
Thumbnail_VideoType : 'img/iPad_video.png',
Thumbnail_MusicType : 'img/thumb_default_sound.png',
Thumbnail_OthersType : 'img/thumb_default_other.png',
Thumbnail_NoFileType : 'img/thumb_default_none.png',
Thumbnail_HtmlType : 'img/thumb_default_html.png',
Thumbnail_LinkType : 'img/thumb_default_link.png',
};
// =============================================================================================
// Constants [start]
// =============================================================================================
......
......@@ -7,10 +7,10 @@ var DEFAULT_SORT_TYPE = '1';
var DEFAULT_SORT_ORDER = '1';
var DEFAULT_SEARCH_DIVISION = 0;
var DEFAULT_IMG_OPTION_MEMO = 'img/list/icon_sticker.png';
var DEFAULT_IMG_OPTION_MARKING = 'img/list/icon_pen.png';
var DEFAULT_IMG_CONTENT_EDIT = 'img/common/band_updated.png';
var DEFAULT_IMG_CONTENT_NEW = 'img/common/band_new.png';
//var DEFAULT_IMG_OPTION_MEMO = 'img/list/icon_sticker.png';
//var DEFAULT_IMG_OPTION_MARKING = 'img/list/icon_pen.png';
//var DEFAULT_IMG_CONTENT_EDIT = 'img/common/band_updated.png';
//var DEFAULT_IMG_CONTENT_NEW = 'img/common/band_new.png';
var iNumberOfNextRecord = 15;
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new Array for function No.12.
......@@ -19,15 +19,15 @@ var thumbnailArr = [];
//Content type array.
var contentTypeArr = [];
var ThumbnailForOtherType = {
Thumbnail_ImageType : 'img/image_type.png',
Thumbnail_VideoType : 'img/iPad_video.png',
Thumbnail_MusicType : 'img/thumb_default_sound.png',
Thumbnail_OthersType : 'img/thumb_default_other.png',
Thumbnail_NoFileType : 'img/thumb_default_none.png',
Thumbnail_HtmlType : 'img/thumb_default_html.png',
Thumbnail_LinkType : 'img/thumb_default_link.png',
};
//var ThumbnailForOtherType = {
// Thumbnail_ImageType : 'img/image_type.png',
// Thumbnail_VideoType : 'img/iPad_video.png',
// Thumbnail_MusicType : 'img/thumb_default_sound.png',
// Thumbnail_OthersType : 'img/thumb_default_other.png',
// Thumbnail_NoFileType : 'img/thumb_default_none.png',
// Thumbnail_HtmlType : 'img/thumb_default_html.png',
// Thumbnail_LinkType : 'img/thumb_default_link.png',
//};
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new Array for function No.12.
var contentIdArray = [];
var resourceVersionArr = [];
......@@ -227,8 +227,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+' <li><span class="lang" lang="txtViewDt"> </span>:<span id="lblVdate'+post.contentId+'"> </span></li>'
+' </ul>'
+' <ul class="pic">'
+' <li><img src="'+DEFAULT_IMG_OPTION_MEMO+'" id="imgMemo'+post.contentId+'" class="sticker" /></li>'
+' <li><img src="'+DEFAULT_IMG_OPTION_MARKING+'" id="imgBookMark'+post.contentId+'" class="pen" /></li>'
+' <li><img src="'+COMMON.DEFAULT_IMG_OPTION_MEMO+'" id="imgMemo'+post.contentId+'" class="sticker" /></li>'
+' <li><img src="'+COMMON.DEFAULT_IMG_OPTION_MARKING+'" id="imgBookMark'+post.contentId+'" class="pen" /></li>'
+' <li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">読む</a></li>'
+' </ul>'
+' </div>'
......@@ -257,8 +257,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' <li><span class="lang" lang="txtViewDt"> </span>:<span id="lblVdate' + post.contentId + '"> </span></li>'
+ ' </ul>'
+ ' <ul class="pic">'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentId + '" class="sticker" /></li>'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentId + '" class="pen" /></li>'
+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentId + '" class="sticker" /></li>'
+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentId + '" class="pen" /></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">'+I18N.i18nText("txtRead")+'</a></li>'
+ ' </ul>'
+ ' </div>'
......@@ -1020,10 +1020,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
//imgThumb.src = returnThumbnail(contId);
var imgIconNew = new Image();
//imgIconNew.src = DEFAULT_IMG_CONTENT_NEW;
//imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
var imgIconEdit = new Image();
//imgIconEdit.src = DEFAULT_IMG_CONTENT_EDIT;
//imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
var c = document.getElementById('content-thumbnail' + contId);
var ctx = c.getContext('2d');
......@@ -1049,39 +1049,16 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
$('#content-thumbnail' + contId).fadeIn('slow');
});
};
imgIconNew.src = 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.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
imgThumb.src = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
imgThumb.src = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
imgThumb.src = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
imgThumb.src = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}else{
imgThumb.src = contentThumbnail;
......@@ -1104,34 +1081,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
imgThumb.src = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
imgThumb.src = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
imgThumb.src = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
imgThumb.src = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}else{
imgThumb.src = contentThumbnail;
......@@ -1151,39 +1104,16 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
$('#content-thumbnail' + contId).fadeIn('slow');
});
};
imgIconNew.src = 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.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
imgThumb.src = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
imgThumb.src = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
imgThumb.src = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
imgThumb.src = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}else{
imgThumb.src = contentThumbnail;
......@@ -1212,39 +1142,16 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
$('#content-thumbnail' + contId).fadeIn('slow');
});
};
imgIconEdit.src = DEFAULT_IMG_CONTENT_EDIT;
imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
imgThumb.src = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
imgThumb.src = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
imgThumb.src = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
imgThumb.src = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}else{
imgThumb.src = contentThumbnail;
......@@ -1272,39 +1179,16 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
$('#content-thumbnail' + contId).fadeIn('slow');
});
};
imgIconEdit.src = DEFAULT_IMG_CONTENT_EDIT;
imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
imgThumb.src = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
imgThumb.src = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
imgThumb.src = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
imgThumb.src = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}else{
imgThumb.src = contentThumbnail;
......@@ -1331,33 +1215,10 @@ function drawEditImage(id) {
else{
var contentType = returnContentType(id);
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
imgSrc = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgSrc = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
imgSrc = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
imgSrc = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
imgSrc = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
imgSrc = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
imgSrc = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgSrc = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
var c = document.getElementById('content-thumbnail' + id);
......
......@@ -242,33 +242,10 @@ function ShowContentNotPDF(contentTitle, contentDetail, contentThumbnail, delive
if(contentThumbnail == '' || contentThumbnail == null || contentThumbnail == 'undefined'){
if(!isPdfContent(tempContentType)){
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
contentThumbnail = src;
}
/*
if(tempContentType == ContentTypeKeys.Type_Image){
contentThumbnail = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(tempContentType == ContentTypeKeys.Type_Music){
contentThumbnail = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(tempContentType == ContentTypeKeys.Type_Video){
contentThumbnail = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(tempContentType == ContentTypeKeys.Type_NoFile){
contentThumbnail = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(tempContentType == ContentTypeKeys.Type_Others){
contentThumbnail = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(tempContentType == ContentTypeKeys.Type_Html){
contentThumbnail = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(tempContentType == ContentTypeKeys.Type_Link){
contentThumbnail = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}else{
contentThumbnail = contentThumbnail;
......
......@@ -1137,25 +1137,25 @@ HEADER.getThumbnailForOtherType = function(contentType){
var src = '';
if(contentType == ContentTypeKeys.Type_Image){
src = ThumbnailForOtherType.Thumbnail_ImageType;
src = COMMON.ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
src = ThumbnailForOtherType.Thumbnail_MusicType;
src = COMMON.ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
src = ThumbnailForOtherType.Thumbnail_VideoType;
src = COMMON.ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
src = ThumbnailForOtherType.Thumbnail_NoFileType;
src = COMMON.ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
src = ThumbnailForOtherType.Thumbnail_OthersType;
src = COMMON.ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
src = ThumbnailForOtherType.Thumbnail_HtmlType;
src = COMMON.ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
src = ThumbnailForOtherType.Thumbnail_LinkType;
src = COMMON.ThumbnailForOtherType.Thumbnail_LinkType;
}
return src;
......
......@@ -7,10 +7,10 @@ var DEFAULT_SORT_TYPE = '4';
var DEFAULT_SORT_ORDER = '2';
var DEFAULT_SEARCH_DIVISION = 0;
var DEFAULT_IMG_OPTION_MEMO = 'img/list/icon_sticker.png';
var DEFAULT_IMG_OPTION_MARKING = 'img/list/icon_pen.png';
var DEFAULT_IMG_CONTENT_EDIT = 'img/common/band_updated.png';
var DEFAULT_IMG_CONTENT_NEW = 'img/common/band_new.png';
//var DEFAULT_IMG_OPTION_MEMO = 'img/list/icon_sticker.png';
//var DEFAULT_IMG_OPTION_MARKING = 'img/list/icon_pen.png';
//var DEFAULT_IMG_CONTENT_EDIT = 'img/common/band_updated.png';
//var DEFAULT_IMG_CONTENT_NEW = 'img/common/band_new.png';
......@@ -22,14 +22,14 @@ var thumbnailArr = [];
//Content type array.
var contentTypeArr = [];
var ThumbnailForOtherType = {
Thumbnail_ImageType : 'img/image_type.png',
Thumbnail_VideoType : 'img/iPad_video.png',
Thumbnail_MusicType : 'img/thumb_default_sound.png',
Thumbnail_OthersType : 'img/thumb_default_other.png',
Thumbnail_NoFileType : 'img/thumb_default_none.png',
Thumbnail_HtmlType : 'img/thumb_default_html.png'
};
//var ThumbnailForOtherType = {
// Thumbnail_ImageType : 'img/image_type.png',
// Thumbnail_VideoType : 'img/iPad_video.png',
// Thumbnail_MusicType : 'img/thumb_default_sound.png',
// Thumbnail_OthersType : 'img/thumb_default_other.png',
// Thumbnail_NoFileType : 'img/thumb_default_none.png',
// Thumbnail_HtmlType : 'img/thumb_default_html.png'
//};
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new Array for function No.12.
var contentIdArray = [];
var resourceVersionArr = [];
......@@ -166,8 +166,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' <li><span class="lang" lang="txtViewDt">' + I18N.i18nText("txtViewDt") + '</span>:<span id="lblVdate' + post.contentId + '"> </span></li>'
+ ' </ul>'
+ ' <ul class="pic">'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentId + '" class="sticker" /></li>'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentId + '" class="pen" /></li>'
+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentId + '" class="sticker" /></li>'
+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentId + '" class="pen" /></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">' + I18N.i18nText("txtRead") + '</a></li>'
+ ' </ul>'
+ ' </div>'
......@@ -194,8 +194,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' <li><span class="lang" lang="txtViewDt"> </span>:<span id="lblVdate' + post.contentId + '"> </span></li>'
+ ' </ul>'
+ ' <ul class="pic">'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentId + '" class="sticker" /></li>'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentId + '" class="pen" /></li>'
+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentId + '" class="sticker" /></li>'
+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentId + '" class="pen" /></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">'+I18N.i18nText("txtRead")+'</a></li>'
+ ' </ul>'
+ ' </div>'
......@@ -920,10 +920,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
//imgThumb.src = returnThumbnail(contId);
var imgIconNew = new Image();
//imgIconNew.src = DEFAULT_IMG_CONTENT_NEW;
//imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
var imgIconEdit = new Image();
//imgIconEdit.src = DEFAULT_IMG_CONTENT_EDIT;
//imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
var c = document.getElementById('content-thumbnail'+contId);
var ctx = c.getContext('2d');
......@@ -946,39 +946,16 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
ctx.drawImage(imgIconNew, c.width/2 - resizeImg[0]/2, 0);
showContentThumbnail(contId);
};
imgIconNew.src = 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.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
imgThumb.src = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
imgThumb.src = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
imgThumb.src = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
imgThumb.src = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}else{
imgThumb.src = contentThumbnail;
......@@ -999,33 +976,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
imgThumb.src = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
imgThumb.src = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
imgThumb.src = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
imgThumb.src = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}else{
imgThumb.src = contentThumbnail;
......@@ -1043,38 +997,15 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
imgIconNew.onload = function(){
ctx.drawImage(imgIconNew, c.width/2 - resizeImg[0]/2, 0);
};
imgIconNew.src = 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.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
imgThumb.src = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
imgThumb.src = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
imgThumb.src = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
imgThumb.src = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}else{
imgThumb.src = contentThumbnail;
......@@ -1100,38 +1031,15 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
imgIconEdit.onload = function(){
ctx.drawImage(imgIconEdit, c.width/2 - resizeImg[0]/2, 0);
};
imgIconEdit.src = DEFAULT_IMG_CONTENT_EDIT;
imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
imgThumb.src = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
imgThumb.src = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
imgThumb.src = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
imgThumb.src = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}else{
imgThumb.src = contentThumbnail;
......@@ -1157,38 +1065,15 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
imgIconEdit.onload = function(){
ctx.drawImage(imgIconEdit, c.width/2 - resizeImg[0]/2, 0);
};
imgIconEdit.src = DEFAULT_IMG_CONTENT_EDIT;
imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
imgThumb.src = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
imgThumb.src = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
imgThumb.src = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
imgThumb.src = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}else{
imgThumb.src = contentThumbnail;
......@@ -1215,34 +1100,11 @@ function drawEditImage(id) {
else{
var contentType = returnContentType(id);
var src = header.getThumbnailForOtherType(contentType);
var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){
imgSrc = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgSrc = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
imgSrc = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
imgSrc = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
imgSrc = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
imgSrc = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
imgSrc = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgSrc = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
var c = document.getElementById('content-thumbnail' + id);
......@@ -1798,8 +1660,8 @@ function renderContentAfterSort(contentSortArr){
+ ' <li><span class="lang" lang="txtViewDt">' + I18N.i18nText("txtViewDt") + '</span>:<span id="lblVdate' + post.contentid + '"> </span></li>'
+ ' </ul>'
+ ' <ul class="pic">'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentid + '" class="sticker" /></li>'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentid + '" class="pen" /></li>'
+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentid + '" class="sticker" /></li>'
+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentid + '" class="pen" /></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentid + '" lang="txtRead">' + I18N.i18nText("txtRead") + '</a></li>'
+ ' </ul>'
+ ' </div>'
......@@ -1825,8 +1687,8 @@ function renderContentAfterSort(contentSortArr){
+ ' <li><span class="lang" lang="txtViewDt">'+I18N.i18nText("txtViewDt")+'</span>:<span id="lblVdate' + post.contentid + '"> </span></li>'
+ ' </ul>'
+ ' <ul class="pic">'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentid + '" class="sticker" /></li>'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentid + '" class="pen" /></li>'
+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentid + '" class="sticker" /></li>'
+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentid + '" class="pen" /></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentid + '" lang="txtRead">'+I18N.i18nText("txtRead")+'</a></li>'
+ ' </ul>'
+ ' </div>'
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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