From 8190d0ceccddfd5d8d32bec9194257fd402a2ad6 Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 24 Mar 2015 19:51:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=95=99=E8=A8=80=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_courses_jours.html.erb | 22 ++++--------- app/views/courses/_history.html.erb | 32 ++++++++----------- app/views/courses/feedback.html.erb | 7 ++-- app/views/words/_journal_reply.html.erb | 2 +- app/views/words/_journal_reply_items.html.erb | 4 +-- app/views/words/_new_respond.html.erb | 6 ++-- public/javascripts/course.js | 1 - public/stylesheets/courses.css | 12 +++++++ 8 files changed, 42 insertions(+), 44 deletions(-) diff --git a/app/views/courses/_courses_jours.html.erb b/app/views/courses/_courses_jours.html.erb index 23c74ed4b..680bafb46 100644 --- a/app/views/courses/_courses_jours.html.erb +++ b/app/views/courses/_courses_jours.html.erb @@ -1,10 +1,7 @@ -
+
<%# reply_allow = JournalsForMessage.create_by_user? User.current %> - -

- <%= l(:label_user_response) %> -

+

<%= l(:label_leave_message) %>

<% if !User.current.logged?%>
@@ -13,20 +10,14 @@
<% else %> -
<%= form_for('new_form', :method => :post, :url => {:controller => 'words', :action => 'leave_course_message'}) do |f|%> <%= f.text_area 'course_message',:id => "leave_meassge", :rows => 3, :cols => 65, - :placeholder => "#{l(:label_welcome_my_respond)}", - :style => "resize: none; width: 98%", - :class => 'noline',:maxlength => 250%> - - <%= l(:button_leave_meassge)%> - + :placeholder => "#{l(:label_welcome_my_respond)}",:maxlength => 250%> + 取  消 + <%= l(:button_leave_meassge)%> <% end %> -
<% end %> -
@@ -34,5 +25,4 @@
-
\ No newline at end of file + \ No newline at end of file diff --git a/app/views/courses/_history.html.erb b/app/views/courses/_history.html.erb index 555e94f6d..304fecd91 100644 --- a/app/views/courses/_history.html.erb +++ b/app/views/courses/_history.html.erb @@ -1,16 +1,13 @@ <% reply_allow = JournalsForMessage.create_by_user? User.current %> - -
-
<% if journals.size > 0 %> <% for journal in journals %>
-
+
@@ -26,7 +23,7 @@
<% ids = 'project_respond_form_'+ journal.id.to_s%> - + <% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %> <%= link_to(l(:label_bid_respond_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, @@ -38,31 +35,28 @@ {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %> <% end %> - - - <%= l(:label_bids_published) %>  - <%= time_tag(journal.created_on).html_safe %>  - <%= l(:label_bids_published_ago) %> -
-
+
+ <% ids = 'project_respond_form_'+ journal.id.to_s%> <% if reply_allow %>
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal,:show_name => true} %>
<% end %> -
-
- <%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true, :allow_delete => @course && User.current.allowed_to?(:as_teacher,@course)} %> -
+
+ + <%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true, :allow_delete => @course && User.current.allowed_to?(:as_teacher,@course)} %> +
<% end %> <% end %> -
-
diff --git a/app/views/courses/feedback.html.erb b/app/views/courses/feedback.html.erb index ccd171679..b7713c4a9 100644 --- a/app/views/courses/feedback.html.erb +++ b/app/views/courses/feedback.html.erb @@ -1,5 +1,8 @@ <% reply_allow = JournalsForMessage.create_by_user? User.current %> -<%= stylesheet_link_tag 'css', :media => 'all' %> + +
+

用户留言

+
<%= render :partial => 'courses_jours', :locals => { :contest => @contest, :journals => @jour, :state => false} @@ -21,7 +24,7 @@ function setMaxLength() { } function setMaxLengthItem(textarea){ if (textarea.getAttribute('maxlength')) { - var counter = document.createElement('div'); + var counter = document.createElement('span'); counter.className = 'counter'; var counterClone = counter.cloneNode(true); counterClone.innerHTML = '0/'+textarea.getAttribute('maxlength'); diff --git a/app/views/words/_journal_reply.html.erb b/app/views/words/_journal_reply.html.erb index 5a6511999..86dbb97b7 100644 --- a/app/views/words/_journal_reply.html.erb +++ b/app/views/words/_journal_reply.html.erb @@ -1,7 +1,7 @@ <% id = "journal_reply_ul_" + journal.id.to_s%> <% allow_delete ||= false%> -
+
<% fetch_user_leaveWord_reply(journal).each do |reply|%> <%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply,:show_name=> show_name, :allow_delete => allow_delete} %> <% end %> diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb index bd76bc52d..3de6ae281 100644 --- a/app/views/words/_journal_reply_items.html.erb +++ b/app/views/words/_journal_reply_items.html.erb @@ -6,9 +6,9 @@
<% if show_name %> - <%= image_tag url_to_avatar(reply.user) %> + <%= image_tag url_to_avatar(reply.user),:width => '30',:height => '30' %> <% else %> - <%= image_tag url_to_avatar(nil) %> + <%= image_tag url_to_avatar(nil),:width => '30',:height => '30' %> <% end %>
diff --git a/app/views/words/_new_respond.html.erb b/app/views/words/_new_respond.html.erb index 34e7c1ccf..5395237d9 100644 --- a/app/views/words/_new_respond.html.erb +++ b/app/views/words/_new_respond.html.erb @@ -1,15 +1,15 @@ <%= form_tag(words_create_reply_path, :remote => true) do %> - <%= text_area_tag 'user_notes', "", :class => 'noline', + <%= text_area_tag 'user_notes', "", :class => 're_respond-form', :style => "resize: none;", :rows => 4, :placeholder => l(:label_feedback_respond_content), + :width => '100%', :maxlength => 250 %> - <%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %> <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %> <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %> <%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %> <%= submit_tag l(:button_feedback_respond), :name => nil , - :class => "enterprise", + :class => "sub_btn", :style => "float: right; margin-top: 1px; margin-right: 4px;"%> <% end %> \ No newline at end of file diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 60c0ae06c..69432c8b3 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -145,7 +145,6 @@ function close_window(id1,id2){ $('#' + id1).css('display','none'); $('#' + id2).css('display','none'); } -} //隐藏提示狂 function hidden_atert_form(cur_page,cur_type) diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 2b14daa60..ad49b7f85 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -329,6 +329,18 @@ a:hover.st_add{ color:#ff8e15;} .w_p{ float:left; color:#15bccf; font-size:16px; font-weight:bold; margin-top:70px; } /* 新建项目弹框*/ .table_left{ width:90px; text-align:right; color:#4c4c4c; font-weight:bold;} +/*留言回复框样式*/ +.respond-form{ + display: none; + width: 87%; + margin: auto; + clear: both; +} +.re_respond-form +{ + width: -moz-available; +} +