留言框样式调整

This commit is contained in:
z9hang 2015-03-27 16:02:06 +08:00
parent 5ec28d8fc3
commit 1c53731966
4 changed files with 24 additions and 4 deletions

View File

@ -45,6 +45,26 @@ module WatchersHelper
link_to text, url, :remote => true, :method => method, :class => css
end
def watcher_link_with_id(objects, user, options=[])
return '' unless user && user.logged?
objects = Array.wrap(objects)
watched = objects.any? {|object| object.watched_by?(user)}
@watch_flag = (objects.first.instance_of?(User) or objects.first.instance_of?(Project) or objects.first.instance_of?(Contest) or (objects.first.instance_of?(Bid)))
css = options[:class]
text = @watch_flag ?
(watched ? l(:button_unfollow) : l(:button_follow)) : (watched ? l(:button_unwatch) : l(:button_watch))
url = watch_path(
:object_type => objects.first.class.to_s.underscore,
:object_id => (objects.size == 1 ? objects.first.id : objects.map(&:id).sort)
)
method = watched ? 'delete' : 'post'
link_to text, url, :remote => true, :method => method, :class => css,:id=>options[:id]
end
############## added by linchun
def new_watcher_link(objects, user, options=[])

View File

@ -12,7 +12,7 @@
<% else %>
<%= form_for('new_form', :method => :post,
:url => {:controller => 'words', :action => 'leave_course_message'}) do |f|%>
<%= f.text_area 'course_message',:id => "leave_meassge",
<%= f.text_area 'course_message',:id => "leave_meassge",:style => "resize: none;",
:placeholder => "#{l(:label_welcome_my_respond)}",:maxlength => 250%>
<a href="#" class="grey_btn fr ml10">取&nbsp;&nbsp;消</a>
<a href="#" onclick='$("#leave_meassge").parent().submit();' class="blue_btn fr"> <%= l(:button_leave_meassge)%></a>

View File

@ -1,6 +1,6 @@
<%= form_tag(words_create_reply_path, :remote => true) do %>
<%= text_area_tag 'user_notes', "", :class => 'w520 h50 mb5',
:style => "resize: none;overflow: hidden;",:rows => 4,
:placeholder => l(:label_feedback_respond_content),
:maxlength => 250 %>

View File

@ -200,7 +200,7 @@ a:hover.ping_sub{ background:#14a8b9;}
.recall_head{ float:left;}
.recall_head a{ display:block; width:30px; height:30px; border:1px solid #CCC; padding:1px;}
.recall_head a:hover{border:1px solid #15bccf;}
.recall_con{ float:left;color:#777777; width:520px; margin-left:10px; }
.recall_con{ float:left;color:#777777; width:520px; margin-left:10px;word-break: break-all;word-wrap: break-word; }
.recall_con a{ color:#15bccf; }
.ping_list{ margin-top:15px;}
.ping_ttl{height:18px;}
@ -217,7 +217,7 @@ a:hover.ping_sub{ background:#14a8b9;}
.ping_dispic a:hover{border:1px solid #15bccf;}
.ping_discon{ float:left; width:610px; margin-left:10px; }
/*.ping_distop span{ float:left;}*/
.ping_distop p{ color:#5f5f5f;}
.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_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/