1.项目用户反馈、课程留言区增加自动识别URL功能

2.所有自动识别URL区域的链接颜色都改为#15bccf
This commit is contained in:
yuanke 2016-05-24 09:11:50 +08:00
parent 5eff3db9e8
commit e7d20c2b98
9 changed files with 52 additions and 13 deletions

View File

@ -215,6 +215,9 @@
$(function(){ $(function(){
var postContent = $("#message_description_<%= @article.id %>").html(); var postContent = $("#message_description_<%= @article.id %>").html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$("#message_description_<%= @article.id %>").html(postContent); $("#message_description_<%= @article.id %>").html(postContent);
autoUrl('message_description_<%= @article.id %>'); autoUrl('message_description_<%= @article.id %>');
}); });

View File

@ -15,9 +15,11 @@
<%= format_time(journal.created_on) %> <%= format_time(journal.created_on) %>
</span> </span>
<div class="cl"></div> <div class="cl"></div>
<p> <div class = "ping_journal" id="journal_<%= journal.id %>">
<%= journal.notes.html_safe %> <p>
</p> <%= journal.notes.html_safe %>
</p>
</div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="ping_disfoot f14"> <div class="ping_disfoot f14">
@ -49,6 +51,12 @@
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<script type="text/javascript">
$(function(){
showNormalImage('journal_<%= journal.id %>');
autoUrl('journal_<%= journal.id %>');
});
</script>
<% end %> <% end %>
<% end %> <% end %>

View File

@ -10,7 +10,9 @@
</span><span class="c_grey fr f14"><%= format_time(journal.created_on) %></span> </span><span class="c_grey fr f14"><%= format_time(journal.created_on) %></span>
<div class="cl"></div> <div class="cl"></div>
<!--<p><%#= textilizable journal.notes%></p>--> <!--<p><%#= textilizable journal.notes%></p>-->
<p><%=journal.notes.html_safe%> <div class = "ping_journal" id="journal_<%= journal.id %>">
<p><%=journal.notes.html_safe%></p>
</div>
</div> </div>
<div class="ping_disfoot f14"> <div class="ping_disfoot f14">
<% ids = 'project_respond_form_'+ journal.id.to_s%> <% ids = 'project_respond_form_'+ journal.id.to_s%>
@ -42,6 +44,12 @@
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<script type="text/javascript">
$(function(){
showNormalImage('journal_<%= journal.id %>');
autoUrl('journal_<%= journal.id %>');
});
</script>
<% end %> <% end %>
<% end %> <% end %>

View File

@ -20,10 +20,11 @@
<% else %> <% else %>
<%= l(:label_anonymous) %> <%= l(:label_anonymous) %>
<% end %> <% end %>
<div id="reply_<%= reply.id %>">
<p> <p>
<%= reply.notes.html_safe %> <%= reply.notes.html_safe %>
</p> </p>
</div>
<div class="cl"></div> <div class="cl"></div>
<span class="c_grey fl"> <span class="c_grey fl">
<%= format_time reply.created_on %> <%= format_time reply.created_on %>
@ -52,4 +53,10 @@
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% end %> <% end %>
<script type="text/javascript">
$(function(){
showNormalImage('reply__<%= reply.id %>');
autoUrl('reply_<%= reply.id %>');
});
</script>

View File

@ -139,6 +139,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;} .homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;} .homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
.homepagePostTitle td,.homepagePostTitle tr {border: 1px solid; border-color: inherit;} .homepagePostTitle td,.homepagePostTitle tr {border: 1px solid; border-color: inherit;}
.homepagePostTitle a{color: #15bccf;}
.homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;} .homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;}
.homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;} .homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;}
.homepagePostSubmit:hover {background-color:#d8d8d8;} .homepagePostSubmit:hover {background-color:#d8d8d8;}
@ -146,7 +147,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;} .homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;} .homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;} .homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #15bccf;}
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;} .homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;} .homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;} .homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
@ -188,6 +189,7 @@ a.postOptionLink2:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 20px;} .homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 20px;}
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 20px;} .homepagePostReplyContent ul li{list-style-type: disc;margin-left: 20px;}
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;} .homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
.homepagePostReplyContent a{color: #15bccf;}
.table_maxWidth table {max-width: 642px;} .table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} .homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;} .homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
@ -435,6 +437,7 @@ a:hover.ping_sub{ background:#14a8b9;}
.ping_dispic a{ display:block; height:46px; width:46px; border:1px solid #CCC; padding:1px; float:left;} .ping_dispic a{ display:block; height:46px; width:46px; border:1px solid #CCC; padding:1px; float:left;}
.ping_dispic a:hover{border:1px solid #15bccf;} .ping_dispic a:hover{border:1px solid #15bccf;}
.ping_discon{ float:left; width:610px; margin-left:10px; } .ping_discon{ float:left; width:610px; margin-left:10px; }
.ping_journal a{color: #15bccf;}
/*.ping_distop span{ float:left;}*/ /*.ping_distop span{ float:left;}*/
.ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;} .ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;}
.ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;} .ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;}
@ -1131,7 +1134,8 @@ a.link_file_a2{ background:url(../images/pic_file.png) 0 -15px no-repeat; paddin
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;} .postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;} .postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;} .postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
.postDetailDes td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;} .postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
.postDetailDes a{color: #15bccf;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; } .homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; }
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;} .postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;} .postDetailDate {color:#888888; font-size:12px; float:left;}

View File

@ -123,7 +123,7 @@ a:hover.ping_sub{ background:#14a8b9;}
.list_style ol li{list-style-type: decimal;margin-left: 40px;} .list_style ol li{list-style-type: decimal;margin-left: 40px;}
.list_style ul li{list-style-type: disc;margin-left: 40px;} .list_style ul li{list-style-type: disc;margin-left: 40px;}
.ping_distop span a{ float:right; /*width:20px;*/ height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;} .ping_distop span a{ float:right; /*width:20px;*/ height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}
.ping_journal a{color: #15bccf;}
/* 创建作业 */ /* 创建作业 */
.Newwork{ width:940px; border:1px solid #c3c3c3;} .Newwork{ width:940px; border:1px solid #c3c3c3;}

View File

@ -673,6 +673,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;} .homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;} .homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
.homepagePostTitle td,.homepagePostTitle tr {border: 1px solid; border-color: inherit;} .homepagePostTitle td,.homepagePostTitle tr {border: 1px solid; border-color: inherit;}
.homepagePostTitle a{color: #15bccf;}
.homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;} .homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;}
.homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;} .homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;}
.homepagePostSubmit:hover {background-color:#d8d8d8;} .homepagePostSubmit:hover {background-color:#d8d8d8;}
@ -683,6 +684,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;} .homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;} .homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;} .homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #15bccf;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;} .homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
.borderBottomNone {border-bottom:none !important;} .borderBottomNone {border-bottom:none !important;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;} .homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
@ -722,6 +724,7 @@ a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;} .homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;} .homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;} .homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
.homepagePostReplyContent a{color: #15bccf;}
.table_maxWidth table {max-width: 642px;} .table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} .homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;} .homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
@ -866,6 +869,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;} .postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;} .postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
.postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;} .postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
.postDetailDes a{color: #15bccf;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; } /*line-height: 18px !important;*/ .homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; } /*line-height: 18px !important;*/
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;} .postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;} .postDetailDate {color:#888888; font-size:12px; float:left;}

View File

@ -332,6 +332,7 @@ a:hover.ping_sub{ background:#14a8b9;}
/*.ping_distop span{ float:left;}*/ /*.ping_distop span{ float:left;}*/
.ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;} .ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;}
.ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;} .ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;}
.ping_journal a{color: #15bccf;}
/*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/ /*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/
.list_style ol li{list-style-type: decimal;margin-left: 40px;} .list_style ol li{list-style-type: decimal;margin-left: 40px;}
.list_style ul li{list-style-type: disc;margin-left: 40px;} .list_style ul li{list-style-type: disc;margin-left: 40px;}
@ -974,6 +975,7 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;} .homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;} .homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;} .homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #15bccf;}
.topBorder { .topBorder {
border-top: 1px solid #E4E4E4; border-top: 1px solid #E4E4E4;
} }
@ -1114,7 +1116,8 @@ a:hover.BlueCirBtnMini{ background:#269ac9; color:#fff;}
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;} .postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;} .postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;} .postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
.postDetailDes td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;} .postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
.postDetailDes a{color: #15bccf;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important;} .homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important;}
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;} .postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;} .postDetailDate {color:#888888; font-size:12px; float:left;}

View File

@ -611,6 +611,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;} .homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;} .homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;} .homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #15bccf;}
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;} .homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;} .homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;} .homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
@ -647,6 +648,7 @@ a.postReplyCancel:hover {color:#ffffff;}
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;} .homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;} .homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;} .homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
.homepagePostReplyContent a{color: #15bccf;}
.table_maxWidth table {max-width: 642px;} .table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} .homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf;} .homepagePostAssignTo {float:left; font-size:14px; color:#15bccf;}