Commit 0953a78e by Masaru Abe

リンクコンテンツ対応

parent b446ac6a
...@@ -56,7 +56,8 @@ var ContentTypeKeys = { ...@@ -56,7 +56,8 @@ var ContentTypeKeys = {
Type_Others : 'other', Type_Others : 'other',
Type_NoFile : 'none', Type_NoFile : 'none',
Type_Html: 'html', Type_Html: 'html',
Type_Enquete : 'enquete' Type_Enquete : 'enquete',
Type_Link : 'url'
}; };
/* /*
......
...@@ -219,26 +219,13 @@ function contentdetail_dspRead_Click_callback(outputId) { ...@@ -219,26 +219,13 @@ function contentdetail_dspRead_Click_callback(outputId) {
//$('body,html').animate({ scrollTop: 0 }, 0); //$('body,html').animate({ scrollTop: 0 }, 0);
ClientData.IsRefresh(false); ClientData.IsRefresh(false);
//var contentType = "1";
if (ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Others) { if (ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Others) {
// Get content detail // Get content detail
// avwCmsApi(ClientData.userInfo_accountPath(), "webGetContent", "GET", { contentId: ClientData.contentInfo_contentId(), sid: ClientData.userInfo_sid(), getType: 2 },
// function (data) {
// $.each(data.contentData, function (i, n) {
// if (typeof n == "object") {
// resourceIdDetail = n.resourceId;
// var resourceUrl = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceIdDetail + "&isDownload=true";
// window.open(resourceUrl, "_blank");
// }
// });
// },
// null
// );
downloadResourceById(ClientData.contentInfo_contentId()); downloadResourceById(ClientData.contentInfo_contentId());
}
else if(ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Link){
// Get content detail
viewLinkContentById(ClientData.contentInfo_contentId());
} }
else { else {
avwScreenMove(ScreenIds.ContentView); avwScreenMove(ScreenIds.ContentView);
...@@ -275,6 +262,11 @@ function ShowContentNotPDF(contentTitle, contentDetail, contentThumbnail, delive ...@@ -275,6 +262,11 @@ 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);
if( src != '' ){
contentThumbnail = src;
}
/*
if(tempContentType == ContentTypeKeys.Type_Image){ if(tempContentType == ContentTypeKeys.Type_Image){
contentThumbnail = ThumbnailForOtherType.Thumbnail_ImageType; contentThumbnail = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -293,6 +285,10 @@ function ShowContentNotPDF(contentTitle, contentDetail, contentThumbnail, delive ...@@ -293,6 +285,10 @@ function ShowContentNotPDF(contentTitle, contentDetail, contentThumbnail, delive
else if(tempContentType == ContentTypeKeys.Type_Html){ else if(tempContentType == ContentTypeKeys.Type_Html){
contentThumbnail = ThumbnailForOtherType.Thumbnail_HtmlType; contentThumbnail = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(tempContentType == ContentTypeKeys.Type_Link){
contentThumbnail = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
}else{ }else{
contentThumbnail = contentThumbnail; contentThumbnail = contentThumbnail;
......
...@@ -10,6 +10,9 @@ var timeWaitCloseNewInfoPushMessage = 5000; // time wait close info new push mes ...@@ -10,6 +10,9 @@ var timeWaitCloseNewInfoPushMessage = 5000; // time wait close info new push mes
var currentPagePushMessage = 1; var currentPagePushMessage = 1;
var isHoverOn = false; var isHoverOn = false;
//名前空間用のオブジェクトを用意する
var header = {};
$(document).ready(function () { $(document).ready(function () {
if (!avwCheckLogin(ScreenIds.Login)) return; if (!avwCheckLogin(ScreenIds.Login)) return;
...@@ -1052,6 +1055,11 @@ function getIconTypeContent(contentType) { ...@@ -1052,6 +1055,11 @@ function getIconTypeContent(contentType) {
src = 'img/bookshelf/icon_04.jpg'; src = 'img/bookshelf/icon_04.jpg';
break; break;
} }
case ContentTypeKeys.Type_Link:
{
src = 'img/bookshelf/icon_08.png';
break;
}
default: break default: break
} }
return src; return src;
...@@ -1096,4 +1104,73 @@ function isSafariNotOnIpad() { ...@@ -1096,4 +1104,73 @@ function isSafariNotOnIpad() {
} }
} }
return false; return false;
}; };
\ No newline at end of file
//link content
function viewLinkContentById(contentId){
var params = {
sid: ClientData.userInfo_sid(),
contentId: contentId,
getType: '2'
};
avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", "get", params,
function (data) {
//Get linkUrl
var linkUrl = data.contentData.content.url;
if( !linkUrl ){
return;
}
//httpで始まる場合は別ウィンドウで開く
if (linkUrl.toLowerCase().indexOf('http') === 0) {
window.open(linkUrl, "_blank", "new window, scrollbars=yes");
}
else if( linkUrl.toLowerCase().indexOf('mailto') === 0 ){
//window.open(linkUrl, "_self");
location.href=linkUrl;
}
else {
// open url to download file
if (isSafariNotOnIpad()) {
window.onbeforeunload = null;
window.open(linkUrl, "_self"); // open url to download file on safari not for ipad
var toogleTime = setTimeout(function () { ToogleLogoutNortice() }, 200);
}
else {
window.open(linkUrl); //open url to download file on orther browser
}
}
},
function (xhr, b, c) { });
};
// get ThumbnailForOtherType
header.getThumbnailForOtherType = function(contentType){
var src = '';
if(contentType == ContentTypeKeys.Type_Image){
src = ThumbnailForOtherType.Thumbnail_ImageType;
}
else if(contentType == ContentTypeKeys.Type_Music){
src = ThumbnailForOtherType.Thumbnail_MusicType;
}
else if(contentType == ContentTypeKeys.Type_Video){
src = ThumbnailForOtherType.Thumbnail_VideoType;
}
else if(contentType == ContentTypeKeys.Type_NoFile){
src = ThumbnailForOtherType.Thumbnail_NoFileType;
}
else if(contentType == ContentTypeKeys.Type_Others){
src = ThumbnailForOtherType.Thumbnail_OthersType;
}
else if(contentType == ContentTypeKeys.Type_Html){
src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
src = ThumbnailForOtherType.Thumbnail_LinkType;
}
return src;
};
...@@ -876,7 +876,12 @@ function readSubmenuFunction_callback(contentId) ...@@ -876,7 +876,12 @@ function readSubmenuFunction_callback(contentId)
if(contentType == ContentTypeKeys.Type_Others){ if(contentType == ContentTypeKeys.Type_Others){
//Download content //Download content
downloadResourceById(contentId); downloadResourceById(contentId);
// redraw content remove new icon
drawEditImage(contentId);
}
else if( contentType == ContentTypeKeys.Type_Link ){
//link content
viewLinkContentById(contentId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(contentId); drawEditImage(contentId);
} }
...@@ -964,6 +969,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){ ...@@ -964,6 +969,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
//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(!isPdfContent(contentType)){ if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType; imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -982,6 +992,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){ ...@@ -982,6 +992,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType; imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
...@@ -1002,6 +1016,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){ ...@@ -1002,6 +1016,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
//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(!isPdfContent(contentType)){ if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType; imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -1020,6 +1039,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){ ...@@ -1020,6 +1039,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType; imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
...@@ -1042,6 +1065,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){ ...@@ -1042,6 +1065,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
//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(!isPdfContent(contentType)){ if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType; imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -1060,6 +1088,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){ ...@@ -1060,6 +1088,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType; imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
...@@ -1090,6 +1122,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){ ...@@ -1090,6 +1122,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
//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(!isPdfContent(contentType)){ if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType; imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -1108,6 +1145,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){ ...@@ -1108,6 +1145,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType; imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
...@@ -1138,6 +1179,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){ ...@@ -1138,6 +1179,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
//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(!isPdfContent(contentType)){ if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType; imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -1156,6 +1202,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){ ...@@ -1156,6 +1202,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType; imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
...@@ -1182,6 +1232,12 @@ function drawEditImage(id) { ...@@ -1182,6 +1232,12 @@ function drawEditImage(id) {
else{ else{
var contentType = returnContentType(id); var contentType = returnContentType(id);
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgSrc = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
imgSrc = ThumbnailForOtherType.Thumbnail_ImageType; imgSrc = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -1200,6 +1256,10 @@ function drawEditImage(id) { ...@@ -1200,6 +1256,10 @@ function drawEditImage(id) {
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
imgSrc = ThumbnailForOtherType.Thumbnail_HtmlType; imgSrc = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){
imgSrc = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
var c = document.getElementById('content-thumbnail' + id); var c = document.getElementById('content-thumbnail' + id);
......
...@@ -589,14 +589,19 @@ function canvasClickFunction_callback(outputId) ...@@ -589,14 +589,19 @@ function canvasClickFunction_callback(outputId)
ClientData.IsRefresh(false); ClientData.IsRefresh(false);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : check for download content type other. //Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : check for download content type other.
//contentType = ContentTypeKeys.Type_Others;
if(contentType == ContentTypeKeys.Type_Others){ if(contentType == ContentTypeKeys.Type_Others){
//Download content //Download content
downloadResourceById(outputId); downloadResourceById(outputId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(outputId); drawEditImage(outputId);
} }
else{ else if( contentType == ContentTypeKeys.Type_Link ){
//link content
viewLinkContentById(outputId);
// redraw content remove new icon
drawEditImage(outputId);
}
else{
//Go to Conten view page //Go to Conten view page
avwScreenMove(ScreenIds.ContentView); avwScreenMove(ScreenIds.ContentView);
} }
...@@ -696,15 +701,17 @@ function canvasClickFunction_callback(outputId) ...@@ -696,15 +701,17 @@ function canvasClickFunction_callback(outputId)
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage. //Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
//For testing without other Type. //For testing without other Type.
//contentType = ContentTypeKeys.Type_Others;
if(contentType == ContentTypeKeys.Type_Others){ if(contentType == ContentTypeKeys.Type_Others){
//Download content //Download content
downloadResourceById(outputId); downloadResourceById(outputId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(outputId); drawEditImage(outputId);
}
else if( contentType == ContentTypeKeys.Type_Link ){
//link content
viewLinkContentById(outputId);
// redraw content remove new icon
drawEditImage(outputId);
} }
else{ else{
//Go to Conten view page //Go to Conten view page
...@@ -1501,15 +1508,17 @@ function readSubmenuFunction_callback(contentId) ...@@ -1501,15 +1508,17 @@ function readSubmenuFunction_callback(contentId)
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage. //Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
//For testing without other Type. //For testing without other Type.
//contentType = ContentTypeKeys.Type_Others;
if(contentType == ContentTypeKeys.Type_Others){ if(contentType == ContentTypeKeys.Type_Others){
//Download content //Download content
downloadResourceById(contentId); downloadResourceById(contentId);
// redraw content remove new icon // redraw content remove new icon
drawEditImage(contentId); drawEditImage(contentId);
}
else if( contentType == ContentTypeKeys.Type_Link ){
//link content
viewLinkContentById(contentId);
// redraw content remove new icon
drawEditImage(contentId);
} }
else{ else{
//Go to Conten view page //Go to Conten view page
...@@ -2275,6 +2284,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) { ...@@ -2275,6 +2284,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
//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(!isPdfContent(contentType)){ if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType; imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -2293,6 +2307,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) { ...@@ -2293,6 +2307,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType; imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
...@@ -2315,6 +2333,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) { ...@@ -2315,6 +2333,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){ if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){ if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType; imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -2333,6 +2356,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) { ...@@ -2333,6 +2356,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType; imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
...@@ -2358,6 +2385,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) { ...@@ -2358,6 +2385,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){ if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){ if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType; imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -2376,6 +2408,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) { ...@@ -2376,6 +2408,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType; imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
...@@ -2410,6 +2446,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) { ...@@ -2410,6 +2446,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){ if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){ if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType; imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -2428,6 +2469,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) { ...@@ -2428,6 +2469,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType; imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
...@@ -2461,6 +2506,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) { ...@@ -2461,6 +2506,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){ if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){ if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType; imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -2479,6 +2529,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) { ...@@ -2479,6 +2529,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType; imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
}else{ }else{
imgThumb.src = contentThumbnail; imgThumb.src = contentThumbnail;
...@@ -2505,6 +2559,11 @@ function drawEditImage(id) { ...@@ -2505,6 +2559,11 @@ function drawEditImage(id) {
else{ else{
var contentType = returnContentType(id); var contentType = returnContentType(id);
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgSrc = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
imgSrc = ThumbnailForOtherType.Thumbnail_ImageType; imgSrc = ThumbnailForOtherType.Thumbnail_ImageType;
} }
...@@ -2522,7 +2581,11 @@ function drawEditImage(id) { ...@@ -2522,7 +2581,11 @@ function drawEditImage(id) {
} }
else if(contentType == ContentTypeKeys.Type_Html){ else if(contentType == ContentTypeKeys.Type_Html){
imgSrc = ThumbnailForOtherType.Thumbnail_HtmlType; imgSrc = ThumbnailForOtherType.Thumbnail_HtmlType;
} }
else if(contentType == ContentTypeKeys.Type_Link){
imgSrc = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
} }
var c = document.getElementById('content-thumbnail' + id); var c = document.getElementById('content-thumbnail' + id);
......
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