Commit b91d34db authored by xnx3's avatar xnx3
Browse files

优化模版列表,若模版无预览的网站时,弹出友好提示

No related merge requests found
Showing with 10 additions and 1 deletion
+10 -1
......@@ -121,7 +121,7 @@ function typeClick(type){
var xiabiao = i%4; //取余,得数组下表
var to = obj.list[i];
var temp = '<div>'+
'<img src="'+((to.previewPic != null && to.previewPic.length > 8)? to.previewPic:'${AttachmentFileUrl}websiteTemplate/'+to.name+'/preview.jpg') +'" class="previewImg" onclick="window.open(\''+to.previewUrl+'\');" />'+
'<img src="'+((to.previewPic != null && to.previewPic.length > 8)? to.previewPic:'${AttachmentFileUrl}websiteTemplate/'+to.name+'/preview.jpg') +'" class="previewImg" onclick="previewUrl(\''+to.previewUrl+'\');" />'+
((to.previewUrl != null && to.previewUrl.length > 8)? '<div class="previewButton"><a href="javascript:window.open(\''+to.previewUrl+'\');" target="_black">点此预览</a></div>':'')+
'<div class="templateName" onclick="useCloudTemplate(\''+to.name+'\');">模版编码:'+to.name+'</div>'+
'<div class="terminal">访问支持:'+
......@@ -156,6 +156,15 @@ function typeClick(type){
initType();
typeClick(-1); //默认加载中所有模版
//预览网站示例。 url 要预览的网站
function previewUrl(url){
if(url != null && url.length > 8){
window.open(url);
}else{
iw.msgFailure('抱歉,该模版暂无预览体验的网站示例');
}
}
</script>
</body>
......
Supports Markdown
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