Commit 0953a78e by Masaru Abe

リンクコンテンツ対応

parent b446ac6a
......@@ -56,7 +56,8 @@ var ContentTypeKeys = {
Type_Others : 'other',
Type_NoFile : 'none',
Type_Html: 'html',
Type_Enquete : 'enquete'
Type_Enquete : 'enquete',
Type_Link : 'url'
};
/*
......
......@@ -42,7 +42,8 @@ var ThumbnailForOtherType = {
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_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 = [];
......@@ -282,81 +283,6 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' </div>'
+ '</section>'
);
//Start : Apply New Css - Editor : Long - Date : 09/03/2013 - Summary : Edit for applying new css
/*if(post.contentType == ContentTypeKeys.Type_PDF){
var tempImg = new Image();
tempImg.onload = function(){
$('a#title'+post.contentId + ' img').attr('src', "img/bookshelf/icon_01.jpg");
};
tempImg.src = "img/bookshelf/icon_01.jpg";
}
else if(post.contentType == ContentTypeKeys.Type_Enquete){
var tempImg = new Image();
tempImg.onload = function(){
$('a#title'+post.contentId + ' img').attr('src', "img/bookshelf/icon_01.jpg");
};
tempImg.src = "img/bookshelf/icon_01.jpg";
}
else if(post.contentType == ContentTypeKeys.Type_Html){
var tempImg = new Image();
tempImg.onload = function(){
$('a#title'+post.contentId + ' img').attr('src', "img/bookshelf/icon_05.jpg");
};
tempImg.src = "img/bookshelf/icon_05.jpg";
}
else if(post.contentType == ContentTypeKeys.Type_Image){
var tempImg = new Image();
tempImg.onload = function(){
$('a#title'+post.contentId + ' img').attr('src', "img/bookshelf/icon_02.jpg");
};
tempImg.src = "img/bookshelf/icon_02.jpg";
}
else if(post.contentType == ContentTypeKeys.Type_Music){
var tempImg = new Image();
tempImg.onload = function(){
$('a#title'+post.contentId + ' img').attr('src', "img/bookshelf/icon_06.jpg");
};
tempImg.src = "img/bookshelf/icon_06.jpg";
}
else if(post.contentType == ContentTypeKeys.Type_NoFile){
var tempImg = new Image();
tempImg.onload = function(){
$('a#title'+post.contentId + ' img').attr('src', "img/bookshelf/icon_01.jpg");
};
tempImg.src = "img/bookshelf/icon_01.jpg";
}
else if(post.contentType == ContentTypeKeys.Type_Others){
var tempImg = new Image();
tempImg.onload = function(){
$('a#title'+post.contentId + ' img').attr('src', "img/bookshelf/icon_01.jpg");
};
tempImg.src = "img/bookshelf/icon_01.jpg";
}
else if(post.contentType == ContentTypeKeys.Type_Video){
var tempImg = new Image();
tempImg.onload = function(){
$('a#title'+post.contentId + ' img').attr('src', "img/bookshelf/icon_04.jpg");
};
tempImg.src = "img/bookshelf/icon_04.jpg";
}*/
//End : Apply New Css - Editor : Long - Date : 09/03/2013 - Summary : Edit for applying new css
getNextRecordNumForList();
//assign thumbnail to array
......@@ -1048,12 +974,15 @@ function readSubmenuFunction_callback(contentId)
//Start Function : No.12 -- Editor : Le Long -- Date : 08/02/2013 -- Summary : Check content type other for download.
//For testing without other Type.
//contentType = ContentTypeKeys.Type_Others;
if(contentType == ContentTypeKeys.Type_Others){
//Download content
downloadResourceById(contentId);
// redraw content remove new icon
drawEditImage(contentId);
}
else if( contentType == ContentTypeKeys.Type_Link ){
//link content
viewLinkContentById(contentId);
// redraw content remove new icon
drawEditImage(contentId);
}
......@@ -1061,12 +990,9 @@ function readSubmenuFunction_callback(contentId)
//Go to Conten view page
avwScreenMove(ScreenIds.ContentView);
}
//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
function checkContentMarkingMemoOption(contentId){
......@@ -1146,6 +1072,11 @@ 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);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -1164,6 +1095,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
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;
......@@ -1186,6 +1121,12 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -1204,6 +1145,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
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;
......@@ -1229,6 +1174,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -1247,6 +1197,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
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;
......@@ -1281,6 +1235,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -1299,6 +1258,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
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;
......@@ -1332,6 +1295,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -1350,6 +1318,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
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;
......@@ -1376,6 +1348,11 @@ function drawEditImage(id) {
else{
var contentType = returnContentType(id);
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgSrc = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgSrc = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -1394,6 +1371,10 @@ function drawEditImage(id) {
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);
......
......@@ -219,26 +219,13 @@ function contentdetail_dspRead_Click_callback(outputId) {
//$('body,html').animate({ scrollTop: 0 }, 0);
ClientData.IsRefresh(false);
//var contentType = "1";
if (ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Others) {
// 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());
}
else if(ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Link){
// Get content detail
viewLinkContentById(ClientData.contentInfo_contentId());
}
else {
avwScreenMove(ScreenIds.ContentView);
......@@ -275,6 +262,11 @@ function ShowContentNotPDF(contentTitle, contentDetail, contentThumbnail, delive
if(contentThumbnail == '' || contentThumbnail == null || contentThumbnail == 'undefined'){
if(!isPdfContent(tempContentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
contentThumbnail = src;
}
/*
if(tempContentType == ContentTypeKeys.Type_Image){
contentThumbnail = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -293,6 +285,10 @@ function ShowContentNotPDF(contentTitle, contentDetail, contentThumbnail, delive
else if(tempContentType == ContentTypeKeys.Type_Html){
contentThumbnail = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(tempContentType == ContentTypeKeys.Type_Link){
contentThumbnail = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}else{
contentThumbnail = contentThumbnail;
......
......@@ -10,6 +10,9 @@ var timeWaitCloseNewInfoPushMessage = 5000; // time wait close info new push mes
var currentPagePushMessage = 1;
var isHoverOn = false;
//名前空間用のオブジェクトを用意する
var header = {};
$(document).ready(function () {
if (!avwCheckLogin(ScreenIds.Login)) return;
......@@ -1052,6 +1055,11 @@ function getIconTypeContent(contentType) {
src = 'img/bookshelf/icon_04.jpg';
break;
}
case ContentTypeKeys.Type_Link:
{
src = 'img/bookshelf/icon_08.png';
break;
}
default: break
}
return src;
......@@ -1096,4 +1104,73 @@ function isSafariNotOnIpad() {
}
}
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)
if(contentType == ContentTypeKeys.Type_Others){
//Download content
downloadResourceById(contentId);
// redraw content remove new icon
drawEditImage(contentId);
}
else if( contentType == ContentTypeKeys.Type_Link ){
//link content
viewLinkContentById(contentId);
// redraw content remove new icon
drawEditImage(contentId);
}
......@@ -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.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -982,6 +992,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
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;
......@@ -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.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -1020,6 +1039,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
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;
......@@ -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.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -1060,6 +1088,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
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;
......@@ -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.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -1108,6 +1145,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
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;
......@@ -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.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -1156,6 +1202,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
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;
......@@ -1182,6 +1232,12 @@ function drawEditImage(id) {
else{
var contentType = returnContentType(id);
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgSrc = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgSrc = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -1200,6 +1256,10 @@ function drawEditImage(id) {
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);
......
......@@ -589,14 +589,19 @@ function canvasClickFunction_callback(outputId)
ClientData.IsRefresh(false);
//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){
//Download content
downloadResourceById(outputId);
// redraw content remove new icon
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
avwScreenMove(ScreenIds.ContentView);
}
......@@ -696,15 +701,17 @@ function canvasClickFunction_callback(outputId)
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
//For testing without other Type.
//contentType = ContentTypeKeys.Type_Others;
if(contentType == ContentTypeKeys.Type_Others){
//Download content
downloadResourceById(outputId);
// redraw content remove new icon
drawEditImage(outputId);
}
else if( contentType == ContentTypeKeys.Type_Link ){
//link content
viewLinkContentById(outputId);
// redraw content remove new icon
drawEditImage(outputId);
}
else{
//Go to Conten view page
......@@ -1501,15 +1508,17 @@ function readSubmenuFunction_callback(contentId)
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
//For testing without other Type.
//contentType = ContentTypeKeys.Type_Others;
if(contentType == ContentTypeKeys.Type_Others){
//Download content
downloadResourceById(contentId);
// redraw content remove new icon
drawEditImage(contentId);
}
else if( contentType == ContentTypeKeys.Type_Link ){
//link content
viewLinkContentById(contentId);
// redraw content remove new icon
drawEditImage(contentId);
}
else{
//Go to Conten view page
......@@ -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.
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -2293,6 +2307,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
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;
......@@ -2315,6 +2333,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -2333,6 +2356,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
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;
......@@ -2358,6 +2385,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -2376,6 +2408,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
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;
......@@ -2410,6 +2446,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -2428,6 +2469,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
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;
......@@ -2461,6 +2506,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if(contentThumbnail == '' || contentThumbnail == null){
if(!isPdfContent(contentType)){
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgThumb.src = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -2479,6 +2529,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
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;
......@@ -2505,6 +2559,11 @@ function drawEditImage(id) {
else{
var contentType = returnContentType(id);
var src = header.getThumbnailForOtherType(contentType);
if( src != '' ){
imgSrc = src;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgSrc = ThumbnailForOtherType.Thumbnail_ImageType;
}
......@@ -2522,7 +2581,11 @@ function drawEditImage(id) {
}
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);
......
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