From 465a23604951e8dc316044541b5ddef8659154c7 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Mon, 14 Mar 2016 17:16:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9KE=E8=B4=B4=E5=90=A7=E7=AD=89?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=89=87=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=87=BA?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/show.html.erb | 5 +++-- public/javascripts/application.js | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 4feb998cf..634903558 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -61,7 +61,7 @@ <%= link_to @memo.author.name, user_path(@memo.author), :class => "linkBlue2", :target=> "_blank"%>
<%= format_date( @memo.created_at)%>
-
+
<%= @memo.content.html_safe%>
@@ -126,7 +126,7 @@
\ No newline at end of file diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 709bd5a36..a8504ee1e 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1011,8 +1011,11 @@ function showNormalImage(id) { if (description_images.length>0) { for (var i=0; i").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); +} +