Commit 809f824e by Masaru Abe

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

parent cc95a08a
...@@ -8,6 +8,22 @@ ...@@ -8,6 +8,22 @@
//グローバルの名前空間用のオブジェクトを用意する //グローバルの名前空間用のオブジェクトを用意する
var COMMON = {}; 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] // Constants [start]
// ============================================================================================= // =============================================================================================
......
...@@ -242,33 +242,10 @@ function ShowContentNotPDF(contentTitle, contentDetail, contentThumbnail, delive ...@@ -242,33 +242,10 @@ function ShowContentNotPDF(contentTitle, contentDetail, contentThumbnail, delive
if(contentThumbnail == '' || contentThumbnail == null || contentThumbnail == 'undefined'){ if(contentThumbnail == '' || contentThumbnail == null || contentThumbnail == 'undefined'){
if(!isPdfContent(tempContentType)){ if(!isPdfContent(tempContentType)){
var src = header.getThumbnailForOtherType(contentType); var src = HEADER.getThumbnailForOtherType(contentType);
if( src != '' ){ if( src != '' ){
contentThumbnail = 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{ }else{
contentThumbnail = contentThumbnail; contentThumbnail = contentThumbnail;
......
...@@ -1137,25 +1137,25 @@ HEADER.getThumbnailForOtherType = function(contentType){ ...@@ -1137,25 +1137,25 @@ HEADER.getThumbnailForOtherType = function(contentType){
var src = ''; var src = '';
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
src = ThumbnailForOtherType.Thumbnail_ImageType; src = COMMON.ThumbnailForOtherType.Thumbnail_ImageType;
} }
else if(contentType == ContentTypeKeys.Type_Music){ else if(contentType == ContentTypeKeys.Type_Music){
src = ThumbnailForOtherType.Thumbnail_MusicType; src = COMMON.ThumbnailForOtherType.Thumbnail_MusicType;
} }
else if(contentType == ContentTypeKeys.Type_Video){ else if(contentType == ContentTypeKeys.Type_Video){
src = ThumbnailForOtherType.Thumbnail_VideoType; src = COMMON.ThumbnailForOtherType.Thumbnail_VideoType;
} }
else if(contentType == ContentTypeKeys.Type_NoFile){ else if(contentType == ContentTypeKeys.Type_NoFile){
src = ThumbnailForOtherType.Thumbnail_NoFileType; src = COMMON.ThumbnailForOtherType.Thumbnail_NoFileType;
} }
else if(contentType == ContentTypeKeys.Type_Others){ else if(contentType == ContentTypeKeys.Type_Others){
src = ThumbnailForOtherType.Thumbnail_OthersType; src = COMMON.ThumbnailForOtherType.Thumbnail_OthersType;
} }
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
src = ThumbnailForOtherType.Thumbnail_HtmlType; src = COMMON.ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){ else if(contentType == ContentTypeKeys.Type_Link){
src = ThumbnailForOtherType.Thumbnail_LinkType; src = COMMON.ThumbnailForOtherType.Thumbnail_LinkType;
} }
return src; return src;
......
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