修改KE贴吧等地图片显示不出来的问题
This commit is contained in:
parent
006731ea61
commit
465a236049
|
@ -61,7 +61,7 @@
|
|||
<%= link_to @memo.author.name, user_path(@memo.author), :class => "linkBlue2", :target=> "_blank"%></div>
|
||||
<div class="postDetailDate mb5"><%= format_date( @memo.created_at)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepagePostIntro memo-content" id="message_description_<%= @memo.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<div class="homepagePostIntro memo-content" id="activity_description_<%= @memo.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @memo.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -126,7 +126,7 @@
|
|||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#message_description_<%= @memo.id %> p,#message_description_<%= @memo.id %> span,#message_description_<%= @memo.id %> em").each(function(){
|
||||
$("#activity_description_<%= @memo.id %> p,#activity_description__<%= @memo.id %> span,#activity_description_<%= @memo.id %> em").each(function(){
|
||||
var postContent = $(this).html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
postContent= postContent.replace(/ {2}/g," ");
|
||||
|
@ -134,5 +134,6 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
description_show_hide(<%= @memo.id %>);
|
||||
});
|
||||
</script>
|
|
@ -1011,8 +1011,11 @@ function showNormalImage(id) {
|
|||
if (description_images.length>0) {
|
||||
for (var i=0; i<description_images.length; i++){
|
||||
var image=$(description_images[i]);
|
||||
var _path = getRootPath();
|
||||
//如果图片是视频图片,不处理。
|
||||
if($(image).hasClass("mediaIco")){
|
||||
var _src = _path+"/"+$(image).attr('src');
|
||||
$(image).attr('src',_src);
|
||||
return;
|
||||
}
|
||||
var element=$("<a></a>").attr("href",image.attr('src'));
|
||||
|
@ -1024,6 +1027,7 @@ function showNormalImage(id) {
|
|||
|
||||
}
|
||||
|
||||
|
||||
//文件、帖子、通知分享
|
||||
function org_id_click(){
|
||||
var sendText = $("input[name='org_id']:checked").next().text();
|
||||
|
@ -1156,3 +1160,17 @@ function disable_down(source, des, hint){
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
function getRootPath(){
|
||||
//获取当前网址,如: http://localhost:8083/uimcardprj/share/meun.jsp
|
||||
var curWwwPath=window.document.location.href;
|
||||
//获取主机地址之后的目录,如: uimcardprj/share/meun.jsp
|
||||
var pathName=window.document.location.pathname;
|
||||
var pos=curWwwPath.indexOf(pathName);
|
||||
//获取主机地址,如: http://localhost:8083
|
||||
var localhostPaht=curWwwPath.substring(0,pos);
|
||||
//获取带"/"的项目名,如:/uimcardprj
|
||||
var projectName=pathName.substring(0,pathName.substr(1).indexOf('/')+1);
|
||||
return(localhostPaht+projectName);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue