From 126c7f558d9717647ed6bffe7b3bad4a07aed089 Mon Sep 17 00:00:00 2001 From: zhuhao Date: Tue, 18 Nov 2014 17:03:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=A4=84=E6=8E=A7=E4=BB=B6=E5=AF=B9=E9=BD=90?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=BB=BA=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8F=96=E6=B6=88=E6=8C=89=E9=92=AE=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/news/_course_news.html.erb | 4 ++-- public/stylesheets/application.css | 2 +- public/stylesheets/nyan.css | 24 ++++++++++++++++++++---- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/app/views/news/_course_news.html.erb b/app/views/news/_course_news.html.erb index f66def486..346fff8b4 100644 --- a/app/views/news/_course_news.html.erb +++ b/app/views/news/_course_news.html.erb @@ -74,10 +74,10 @@ <%= labelled_form_for @news, :url => course_news_index_path(@course), :html => {:id => 'news-form', :multipart => true} do |f| %> <%= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %> - <%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'whiteButton m3p10' %> + <%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'ButtonColor m3p10' %> <%#= preview_link preview_news_path, 'news-form', target='preview', {:class => 'whiteButton m3p10'} %> - <%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'whiteButton m3p10' %> + <%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'ButtonColor m3p10' %> <% end if @course %>
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index d0d71c50d..710a404dc 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1898,7 +1898,7 @@ input#time_entry_comments { width: 90%;} fieldset.settings label { display: block; } fieldset#notified_events .parent { padding-left: 20px; } -span.required {color: #bb0000;} +span.required {color: #bb0000;margin-right: 4px;} .summary {font-style: italic;} #attachments_fields input.description {margin-left:4px; width:100px; } diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css index def79d53b..27e8a367e 100644 --- a/public/stylesheets/nyan.css +++ b/public/stylesheets/nyan.css @@ -15,7 +15,7 @@ span[id^=valid_user] { } .red { - color: red; + color: red;margin-left: 10px;margin-right: 10px;text-align: right; } .green { @@ -474,6 +474,19 @@ body { position: relative; top: 1px; } +input[class~='ButtonClolr'],.ButtonColor{ + color: #fffbff !important; + padding-bottom: 5px; + width: 40px; + height: 20px; + font-family: '微软雅黑',Arial,Helvetica,sans-serif; + font-size: 15px; + + padding: 0px; + background: #15bccf; + border: 1px solid #15bccf; + +} input[class~='whiteButton'], .whiteButton { -moz-box-shadow: inset 0px 1px 0px 0px #ffffff; @@ -493,9 +506,9 @@ input[class~='whiteButton'], .whiteButton { border: 1px solid #dcdcdc; display: inline-block; color: #666666; - color: #116699; + color: #fffbff; font-family: arial; - font-size: 15px; + font-size: 20px; font-weight: bold; padding: 6px 24px; /*padding:3px 10px;*/ @@ -513,13 +526,14 @@ input[class~='whiteButton']:hover, .whiteButton:hover { background: linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#f6f6f6', endColorstr = '#ffffff', GradientType = 0); text-decoration: none; - background-color: #f6f6f6; + background-color: #09bbff; } input[class~='whiteButton']:active, .whiteButton:active { position: relative; top: 1px; text-decoration: none; + color: #ffffff; } input[class~='m3p10'], .m3p10 { @@ -527,6 +541,8 @@ input[class~='m3p10'], .m3p10 { padding: 3px 10px; height: 20px; display: inline-block; + text-align: center; + color: #ffffff; } input[class~='h30'], .h30 { From b2ce8c78bded95c1fde65034fc6bff9eaf58dba3 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Wed, 19 Nov 2014 17:25:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?<=E4=BF=AE=E6=94=B9=E8=B5=84=E6=96=99>?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2<=E8=AF=BE=E7=A8=8B=E6=88=90=E5=91=98>=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E6=B3=A8=E5=86=8C=E5=90=8E=E9=A1=B5=E9=9D=A2=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E8=B7=AF=E7=94=B1=E4=BF=AE=E6=94=B9=20Signed-off-by:?= =?UTF-8?q?=20alan=20<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/account_controller.rb | 2 +- app/views/account/register.html.erb | 9 +- app/views/courses/settings/_members.html.erb | 4 +- app/views/my/account.html.erb | 113 ++++++++++++++----- app/views/settings/_general.html.erb | 28 ++--- app/views/settings/_notifications.html.erb | 2 +- app/views/stores/search.html.erb | 2 +- app/views/versions/_form.html.erb | 4 +- config/locales/zh.yml | 14 ++- public/stylesheets/application.css | 9 +- 10 files changed, 128 insertions(+), 59 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 4b5a8c064..2c4929019 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -136,7 +136,7 @@ class AccountController < ApplicationController session[:auth_source_registration] = nil self.logged_user = @user flash[:notice] = l(:notice_account_activated) - render :action => 'email_valid' + redirect_to my_account_path end else @user.login = params[:user][:login] diff --git a/app/views/account/register.html.erb b/app/views/account/register.html.erb index a18c15068..32940d111 100644 --- a/app/views/account/register.html.erb +++ b/app/views/account/register.html.erb @@ -17,10 +17,10 @@ <% if @user.auth_source_id.nil? %>

<%= f.text_field :login, :size => 25, :required => true %> - <%= l(:label_max_number) %> + <%= l(:label_max_number) %>

<%= f.password_field :password, :size => 25, :required => true %> - <%= l(:text_caracters_minimum, :count => Setting.password_min_length) %> + <%= l(:text_caracters_minimum, :count => Setting.password_min_length) %>

<%= f.password_field :password_confirmation, :size => 25, :required => true %>

<% end %> @@ -30,7 +30,10 @@

- <%= "#{l(:label_mail_attention)} " %> + +

<%= "#{l(:label_mail_attention)} " %>

+

<%= "#{l(:label_mail_attention1)} " %>

+

diff --git a/app/views/courses/settings/_members.html.erb b/app/views/courses/settings/_members.html.erb index ab0f20257..e73e9cf7b 100644 --- a/app/views/courses/settings/_members.html.erb +++ b/app/views/courses/settings/_members.html.erb @@ -20,8 +20,8 @@ <% members.each do |member| %> <% next if member.new_record? %> - <%= link_to_user member.principal %> - + <%= link_to_user member.principal %> + <%= h member.roles.sort.collect(&:to_s).join(', ') %> diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 4ffcc63fc..04793a02e 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -9,6 +9,47 @@ function () { $("#province").attr("href", "#WOpenWindow") $("#province").leanModal({top: 100, closeButton: ".modal_close"}); + var $lastname = $('#user_lastname') + var $firstname = $('#user_firstname') + var $enterprise = $('#enterprise_name') + $lastname.blur(function () { + var pas1 = document.getElementById("user_lastname").value; + + if (pas1 == "") { + $('#valid_lastname').html('' + "<%= l(:lastname_empty) %>"+ ""); + $('#lastname_limit').hide(); + } + else { + $('#valid_lastname').html('' + ""); + $('#lastname_limit').show(); + } + + }); + $firstname.blur(function () { + var pas1 = document.getElementById("user_firstname").value; + + if (pas1 == "") { + $('#valid_firstname').html('' + "<%= l(:firstname_empty) %>"+ ""); + $('#firstname_limit').hide(); + } + else { + $('#valid_firstname').html('' + ""); + $('#firstname_limit').show(); + } + }); + $enterprise.blur(function () { + var pas1 = document.getElementById("enterprise_name").value; + + if (pas1 == "") { + $('#valid_companyname').html('' + "<%= l(:enterprise_empty) %>"+ ""); + + } + else { + $('#valid_lastname').html('' + ""); + + } + + }); } ); @@ -61,16 +102,19 @@ <%= l(:label_information_plural) %> + +

- <%= f.text_field :login, :required => true, :size => 25, :name => "login"%> + <%= f.text_field :login, :required => true, :size => 25, :name => "login", :readonly => true %> <%= l(:label_max_number) %>

-

- <%= l(:label_identity) %> * - @@ -93,34 +137,38 @@ <% end %> +

-
@@ -152,11 +200,16 @@ -
@@ -213,7 +266,7 @@ -

+

<%= f.text_field :mail, :required => true %>

@@ -222,14 +275,22 @@

- - <% province = User.current.user_extensions.location %> - <% city = User.current.user_extensions.location_city %> - <% identity = User.current.user_extensions.identity %> - <% occupation1 = User.current.user_extensions.occupation %> - <% occupation = User.current.user_extensions.occupation %> - <% title = User.current.user_extensions.technical_title %> - <% language = User.current.language %> + <% if !User.current.user_extensions.nil? %> + <% province = User.current.user_extensions.location %> + <% city = User.current.user_extensions.location_city %> + <% identity = User.current.user_extensions.identity %> + <% occupation1 = User.current.user_extensions.occupation %> + <% occupation = User.current.user_extensions.occupation %> + <% title = User.current.user_extensions.technical_title %> + <% language = User.current.language %> + <% else %> + <% province = "湖南省" %> + <% city = "长沙"%> + <% identity = ""%> + <% occupation1 = ""%> + <% title = "" %> + <% language = ""%> + <% end %> -

<%= l(:label_location) %> +