From e6aa9d35922c2a1b684162cec65c272b80d4bd4a Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 12 Nov 2014 15:09:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7=E3=80=81?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E3=80=81=E9=A1=B9=E7=9B=AE=E3=80=81=E7=AB=9E?= =?UTF-8?q?=E8=B5=9B=E3=80=81=E7=95=99=E8=A8=80=E6=A8=A1=E5=9D=97=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E5=8E=BB=E9=99=A4=E5=9B=9E=E5=A4=8D=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E5=9B=9E=E5=A4=8D=E6=9F=90=E6=9F=90=E5=AD=97=E6=A0=B7?= =?UTF-8?q?=EF=BC=8C=E5=8F=8A=E5=AD=97=E6=95=B0=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile.lock | 1 - app/views/contests/_history.html.erb | 2 +- app/views/contests/_new.html.erb | 67 ++++----------------- app/views/contests/show_contest.html.erb | 36 +++++++++++ app/views/courses/_courses_jours.html.erb | 5 +- app/views/courses/_history.html.erb | 2 +- app/views/projects/_history.html.erb | 2 +- app/views/projects/_project_jours.html.erb | 4 +- app/views/projects/feedback.html.erb | 2 +- app/views/users/_history.html.erb | 2 +- app/views/users/_user_jours.html.erb | 37 ++++++++++++ app/views/words/_new.html.erb | 69 ++++++++-------------- 12 files changed, 120 insertions(+), 109 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6916219a9..4ba8ecf6c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -125,7 +125,6 @@ GEM mocha (1.1.0) metaclass (~> 0.0.1) multi_json (1.10.1) - mysql2 (0.3.11) mysql2 (0.3.11-x86-mingw32) net-ldap (0.3.1) nokogiri (1.6.3) diff --git a/app/views/contests/_history.html.erb b/app/views/contests/_history.html.erb index 75fffe734..1115b81b0 100644 --- a/app/views/contests/_history.html.erb +++ b/app/views/contests/_history.html.erb @@ -24,7 +24,7 @@ <% end %> <% if reply_allow %> <%= link_to l(:label_bid_respond_quote),'', - {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"} %> + {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %> <%= link_to(l(:button_quote), contests_path(:id => contest, :journal_id => journal), :remote => true, diff --git a/app/views/contests/_new.html.erb b/app/views/contests/_new.html.erb index a72ff6f36..2a88a7f46 100644 --- a/app/views/contests/_new.html.erb +++ b/app/views/contests/_new.html.erb @@ -1,23 +1,8 @@ - - -<%= form_for('contest_message', - :remote => true, :method => :post, - :url => {:controller => 'contests', +
+ <%= form_for('contest_message', + :remote => true, :method => :post, + :url => {:controller => 'contests', :action => 'create', :id => contest, :sta => sta} @@ -28,52 +13,24 @@
<% if User.current.logged? %> - - - - - - -
<%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_respond), - :style => "resize: none;", - :class => 'noline' + :style => "resize: none; width: 98%", + :class => 'noline', + :maxlength => 250 %> -
- <%= f.text_field :reference_user_id, :style=>"display:none"%> - - - - - - - - -
- <%= submit_tag l(:button_leave_meassge), - :name => nil , - :class => "contest_btn", - :onmouseout => "this.style.backgroundPosition = 'left top'", - :onmouseover => "this.style.backgroundPosition = 'left -31px'" - %> - <%= submit_tag l(:button_clear_meassge), - :name => nil, - :onclick => "clearMessage('contest_message_message');", - :type => 'button', :class => "bid_btn", - :onmouseout => "this.style.backgroundPosition = 'left top'", - :onmouseover => "this.style.backgroundPosition = 'left -31px'" - %> -
- + <%= f.text_field :reference_user_id, :style=>"display:none"%> + <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%> <% else %>
<%= l(:label_user_login_tips) %> <%= link_to l(:label_user_login_new), signin_path %>
<% end %> -<% end %> + <% end %> +
+ \ No newline at end of file diff --git a/app/views/contests/show_contest.html.erb b/app/views/contests/show_contest.html.erb index 7e107cb73..bbda34b88 100644 --- a/app/views/contests/show_contest.html.erb +++ b/app/views/contests/show_contest.html.erb @@ -4,5 +4,41 @@ <%= render :partial => 'contest_jours', :locals => { :contest => @contest, :journals => @jour, :state => false} %> + <% html_title(l(:label_user_response)) -%> diff --git a/app/views/courses/_courses_jours.html.erb b/app/views/courses/_courses_jours.html.erb index 57bde9e68..e1efe4f58 100644 --- a/app/views/courses/_courses_jours.html.erb +++ b/app/views/courses/_courses_jours.html.erb @@ -17,13 +17,14 @@ <%= f.text_area 'course_message', :rows => 3, :cols => 65, :placeholder => "#{l(:label_welcome_my_respond)}", :style => "resize: none; width: 98%", - :class => 'noline'%> + :class => 'noline',:maxlength => 250%> <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%> <% end %> <% end %> - +
+
<%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
diff --git a/app/views/courses/_history.html.erb b/app/views/courses/_history.html.erb index beb31f830..19b5cef0d 100644 --- a/app/views/courses/_history.html.erb +++ b/app/views/courses/_history.html.erb @@ -24,7 +24,7 @@ <% end %> <% if reply_allow %> <%= link_to l(:label_bid_respond_quote),'', - {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"} %> + {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %> <% end %> diff --git a/app/views/projects/_history.html.erb b/app/views/projects/_history.html.erb index 38ee59e38..d02b561b0 100644 --- a/app/views/projects/_history.html.erb +++ b/app/views/projects/_history.html.erb @@ -24,7 +24,7 @@ <% end %> <% if reply_allow %> <%= link_to l(:label_bid_respond_quote),'', - {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"} %> + {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %> <% end %> diff --git a/app/views/projects/_project_jours.html.erb b/app/views/projects/_project_jours.html.erb index be1550000..b05ffe2cc 100644 --- a/app/views/projects/_project_jours.html.erb +++ b/app/views/projects/_project_jours.html.erb @@ -17,12 +17,12 @@ <%= f.text_area 'project_message', :rows => 3, :cols => 65, :placeholder => "#{l(:label_welcome_my_respond)}", :style => "resize: none; width: 98%", - :class => 'noline'%> + :class => 'noline',:maxlength => 250%> <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%> <% end %> <% end %> - +
<%= render :partial => 'history',:locals => { :journals => @jour, :state => false} %> diff --git a/app/views/projects/feedback.html.erb b/app/views/projects/feedback.html.erb index 18bfff85e..3c26d74dc 100644 --- a/app/views/projects/feedback.html.erb +++ b/app/views/projects/feedback.html.erb @@ -38,7 +38,7 @@ function checkMaxLength() { if (currentLength > maxLength) this.relatedElement.className = 'toomuch'; else - this.relatedElement.className = ''; + this.relatedElement.className = ''; this.relatedElement.firstChild.nodeValue = currentLength; } diff --git a/app/views/users/_history.html.erb b/app/views/users/_history.html.erb index 60289c420..9b5744251 100644 --- a/app/views/users/_history.html.erb +++ b/app/views/users/_history.html.erb @@ -24,7 +24,7 @@ <% end %> <% if reply_allow %> <%= link_to l(:label_bid_respond_quote),'', - {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"} %> + {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %> <% end %> diff --git a/app/views/users/_user_jours.html.erb b/app/views/users/_user_jours.html.erb index e62505722..b5badf60c 100644 --- a/app/views/users/_user_jours.html.erb +++ b/app/views/users/_user_jours.html.erb @@ -12,3 +12,40 @@
+ diff --git a/app/views/words/_new.html.erb b/app/views/words/_new.html.erb index bc4d19225..70a1a5f27 100644 --- a/app/views/words/_new.html.erb +++ b/app/views/words/_new.html.erb @@ -35,50 +35,31 @@ border: #d5dee9 1px solid; } +
+ <%= form_for('new_form', :remote => true, :method => :post, + :url => {:controller => 'words', + :action => 'create', + :user_id => user.id, + :sta => sta}) do |f|%> - - -<%= form_for('new_form', :remote => true, :method => :post, -:url => {:controller => 'words', -:action => 'create', -:user_id => user.id, -:sta => sta}) do |f|%> +
+ <%= render :partial => 'words/pre_show', :locals => {:content => @content} %> +
-
- <%= render :partial => 'words/pre_show', :locals => {:content => @content} %> -
+ <% if User.current.logged? %> + <%= f.text_area 'user_message', :rows => 3, :cols => 65, + :placeholder => "#{l(:label_leave_a_message)}", + :style => "resize: none; width: 98%", + :class => 'noline',:maxlength => 250%> -<% if User.current.logged? %> - - - - -
<%= f.text_area 'user_message', :rows => 3, :cols => 65, :value => "#{l(:label_leave_a_message)}", :onfocus => "clearInfo('new_form_user_message','#{l(:label_leave_a_message)}')", :onblur => "showInfo('new_form_user_message','#{l(:label_leave_a_message)}')", :style => "resize: none;", :class => 'noline'%>
-<%= f.text_field :reference_user_id, :style=>"display:none"%> - - - - -
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%> - <%= submit_tag l(:button_cancel), :name => nil, :class => "enterprise", :onclick => "clearMessage('new_form_user_message');", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %>
-<% else %> -
- <%= l(:label_user_login_tips) %> - <%= link_to l(:label_user_login_new), signin_path %> -
-<% end %> -<% end %> + <%= f.text_field :reference_user_id, :style=>"display:none"%> + <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%> + <% else %> +
+ <%= l(:label_user_login_tips) %> + <%= link_to l(:label_user_login_new), signin_path %> +
+ <% end %> +
+ <% end %> +
\ No newline at end of file