diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 642d71649..fcd10a011 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -140,3 +140,10 @@
<% end %> + + + \ No newline at end of file diff --git a/app/views/messages/show.html.erb b/app/views/messages/show.html.erb index 116c25931..4f22fd140 100644 --- a/app/views/messages/show.html.erb +++ b/app/views/messages/show.html.erb @@ -185,3 +185,9 @@ <% end %> <% html_title @topic.subject %> + + \ No newline at end of file diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 0dc89b96c..e757356b0 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -120,21 +120,7 @@ <%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_contest) %> , <%= l(:label_welcome_trustie_contest_description) %> - - +
<%= form_tag({controller: 'contests', action: 'index'}, method: :get) do %> @@ -160,7 +146,7 @@ <% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
  • -
    +
    <%= image_tag('/images/contest1.png')%>
    @@ -192,7 +178,7 @@
    -

    +

    问题和反馈动态 <%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> <%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> @@ -207,11 +193,11 @@ <%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
    - <%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前 + <%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前 由 <%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);" %> 发表 - 回复(<%= link_to (topic.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url %>) + 回复(<%= link_to (topic.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url %>)

  • <% end %> @@ -228,7 +214,7 @@ <% find_all_hot_softapplication.map do |softapplication| break if(softapplication == find_all_hot_softapplication[5]) %>
  • -
    +
    <%= image_tag('/images/app1.png')%>
    @@ -237,7 +223,7 @@
    - ><%=softapplication.description.truncate(50, omission: '...')%> + ><%=softapplication.description.to_s.truncate(50, omission: '...')%>

    diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 8e4db7fe6..81160fa93 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -609,6 +609,14 @@ function toggleAndSettingWordsVal(parent_widget, text_widget, value){ text_widget.val(value) parent_widget.slideToggle(400) } +function transpotUrl (scope) { + $(scope).each(function(){ + var tmpContent = $(this).html(); + tmpContent = tmpContent.replace(/(^|[^\"\'])(http|ftp|mms|rstp|news|https)(\:\/\/[^<\s\+,,]+)/gi,"$1$2$3<\/a>"); + // tmpContent = tmpContent.replace(/(^|[^\/])(www\.[^<\s\+,,]+)/gi,"$1$2"); + $(this).html(tmpContent); + }); +} $(document).ready(setupAjaxIndicator); $(document).ready(hideOnLoad);