From ef48fec26b68149aea37eb106e71d4a44d8925d2 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 17 Oct 2014 17:00:20 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=BC=B9=E5=87=BA=E6=A1=86=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/_join_private_course.html.erb | 125 ++++++++++-------- app/views/courses/join_private_courses.js.erb | 5 +- public/stylesheets/welcome.css | 6 + 3 files changed, 79 insertions(+), 57 deletions(-) diff --git a/app/views/courses/_join_private_course.html.erb b/app/views/courses/_join_private_course.html.erb index 60223922f..2d36e2ece 100644 --- a/app/views/courses/_join_private_course.html.erb +++ b/app/views/courses/_join_private_course.html.erb @@ -1,60 +1,75 @@ - - + + + + + 快速进入课程通道 + + + + + +
+
+
+

快速进入课程通道

+

只要持有课程ID和密码,就课快速加入所在课程。课程页面搜索不到的私有课程只能从此通道进入哦!

-
- 密码   : - <%= text_field_tag 'course_password', nil, :style=>'width:80%'%> +
+ <%= form_tag({:controller => 'courses', + :action => 'join'}, + :remote => true, + :method => :post, + :id => 'new-watcher-form') do %> + + <% end%>
+
+
+ + -

- <%= submit_tag l(:label_new_join), :name => nil, :class => "bid_btn", :onclick => "hideModal(this);" %> - <%= submit_tag l(:button_cancel), :name => nil, :class => "bid_btn", :onclick => "hideModal(this);", :type => 'button' %> -

-<% end %> diff --git a/app/views/courses/join_private_courses.js.erb b/app/views/courses/join_private_courses.js.erb index 71c7e62b7..14a161907 100644 --- a/app/views/courses/join_private_courses.js.erb +++ b/app/views/courses/join_private_courses.js.erb @@ -1,3 +1,4 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'join_private_course') %>'); -showModal('ajax-modal', '400px'); -$('#ajax-modal').addClass('new-watcher'); \ No newline at end of file +showModal('ajax-modal', '510px'); +$('#ajax-modal').addClass('new-watcher'); +$('#ajax-modal').css('height','330px'); \ No newline at end of file diff --git a/public/stylesheets/welcome.css b/public/stylesheets/welcome.css index 3e333d231..227cc6870 100644 --- a/public/stylesheets/welcome.css +++ b/public/stylesheets/welcome.css @@ -467,6 +467,12 @@ a.attachments_list_color { font-size: 10pt; } +.new-watcher{ + -webkit-border-radius: 5px; + border-radius: 5px; + box-shadow: 0px 0px 8px #194a81; +} + /************************** 贴吧动态 结束 ****************************/ /************************** 学校课程 开始 ****************************/ .course{ From 59333c29f3b06017af2a56d24fbadf68c599f90e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 20 Oct 2014 10:06:27 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=81=AB=E7=8B=90?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=AD403=20404=E5=90=8E=E9=80=80?= =?UTF-8?q?=E4=B8=80=E6=AD=A5=E8=BF=94=E5=9B=9E=E7=A9=BA=E7=99=BD=E9=A1=B5?= =?UTF-8?q?=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/common/403.html | 4 ++-- app/views/common/404.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/common/403.html b/app/views/common/403.html index 39df9d70e..826d43067 100644 --- a/app/views/common/403.html +++ b/app/views/common/403.html @@ -31,8 +31,8 @@ a:hover{ } 没有访问权限!建议您

diff --git a/app/views/common/404.html b/app/views/common/404.html index f4ec0e8f0..ce92d7e4c 100644 --- a/app/views/common/404.html +++ b/app/views/common/404.html @@ -31,8 +31,8 @@ a:hover{ } 页面不见了!建议您

From f5a7aec3c014175da69fdd68ddbb6b4857fb7342 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 20 Oct 2014 11:57:16 +0800 Subject: [PATCH 03/10] =?UTF-8?q?#1342=E9=A1=B9=E7=9B=AE--=E9=85=8D?= =?UTF-8?q?=E7=BD=AE--=E7=89=88=E6=9C=AC=E5=BA=93--=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E5=88=B0=E5=B7=B2=E6=9C=89=E7=9A=84SVN=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=BA=93=EF=BC=9A=E8=BF=94=E5=9B=9E500=E9=94=99=E8=AF=AF=20?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=96=B9=E6=A1=88=EF=BC=9A=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E9=94=99=E8=AF=AF=EF=BC=8C=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BC=A0=E9=80=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index c9550add3..0c1f65317 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -113,7 +113,7 @@ class RepositoriesController < ApplicationController @root_path=RepositoriesHelper::ROOT_PATH @repository_name=User.current.login.to_s+"/"+params[:repository][:identifier]+".git" @project_path=@root_path+"htdocs/"+@repository_name - @repository_tag=params[:repository][:upassword] + @repository_tag=params[:repository][:upassword] || params[:repository][:password] @repo_name=User.current.login.to_s+"_"+params[:repository][:identifier] logger.info "htpasswd -mb "+@root_path+"user.passwd "+@repo_name+": "+@repository_tag logger.info "the value of create repository"+@root_path+": "+@repository_name+": "+@project_path+": "+@repo_name From 65b80959a6c275c004cb7b39b9016d72b9adfea7 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 20 Oct 2014 14:23:10 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/_form.html.erb | 7 +++++-- app/views/repositories/_form.html.erb | 29 ++++++++++++++++++--------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/app/views/forums/_form.html.erb b/app/views/forums/_form.html.erb index 4679420f4..0db5a0f70 100644 --- a/app/views/forums/_form.html.erb +++ b/app/views/forums/_form.html.erb @@ -19,8 +19,11 @@
- <%= f.text_area :description, :required => true, :id => 'editor01' %> - +

+ <%= f.text_area :description, :required => true, :id => 'editor01' %> +

+ +

(<%= l(:label_forums_max_length) %>)

diff --git a/app/views/repositories/_form.html.erb b/app/views/repositories/_form.html.erb index 1fabf47c8..cc200ac5c 100644 --- a/app/views/repositories/_form.html.erb +++ b/app/views/repositories/_form.html.erb @@ -11,20 +11,31 @@

<%= f.check_box :is_default, :label => :field_repository_is_default %>

-

<%= f.text_field :identifier, :required => true, :disabled => @repository.identifier_frozen?, - value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}"%> +

+ <%= f.text_field :identifier, :required => true, :disabled => @repository.identifier_frozen?, + value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}"%> <% unless @repository.identifier_frozen? %> - <%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_repository_identifier_info).html_safe %> + + <%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> + <%= l(:text_repository_identifier_info).html_safe %> <% end %>

-

<%= f.text_field :url, :size => 60, :required => true, :disabled => !@repository.safe_attribute?('url'), :id => "url_text_field" %> - <%= "#{l(:label_exist_repository_path)}" %> +

+ <%= f.text_field :url, :size => 60, :required => true, :disabled => !@repository.safe_attribute?('url'), :id => "url_text_field" %> + + <%= "#{l(:label_exist_repository_path)}" %> + +

+

+ <%= f.text_field :login, :size => 30 %> +

+

+ <%= f.password_field :password, :size => 30, :name => 'ignore', + :value => ((@repository.new_record? || @repository.password.blank?) ? '' : ('x'*15)), + :onfocus => "this.value=''; this.name='repository[password]';", + :onchange => "this.name='repository[password]';" %>

-

<%= f.text_field :login, :size => 30 %>

-

<%= f.password_field :password, :size => 30, :name => 'ignore', :value => ((@repository.new_record? || @repository.password.blank?) ? '' : ('x'*15)), - :onfocus => "this.value=''; this.name='repository[password]';", - :onchange => "this.name='repository[password]';" %>

From 4ceb0e8789edeb4db7d0565f2573e4239307bacc Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 20 Oct 2014 14:39:39 +0800 Subject: [PATCH 05/10] =?UTF-8?q?#1289=E4=BF=AE=E5=A4=8D=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=86=85=E5=AE=B9=E5=B9=B6=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E2=80=9C=E5=A2=9E=E5=8A=A0=E2=80=9D=E5=90=8E=EF=BC=8C=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E7=9A=84=E5=86=85=E5=AE=B9=E8=BF=98=E5=9C=A8=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E6=A1=86=E4=B8=AD=E7=9A=84BUG=20=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E6=96=B9=E6=A1=88=EF=BC=9A=E6=96=B0=E5=A2=9E=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E5=90=8E=E5=A2=9E=E5=8A=A0js=E4=BB=A3=E7=A0=81=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E8=BE=93=E5=85=A5=E6=A1=86=E5=86=85=E5=80=BC=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/_tag.html.erb | 35 ++++++++++++++++++++++----------- app/views/users/tag_save.js.erb | 16 +++++++-------- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/app/views/tags/_tag.html.erb b/app/views/tags/_tag.html.erb index b20b383ef..405f8f2e3 100644 --- a/app/views/tags/_tag.html.erb +++ b/app/views/tags/_tag.html.erb @@ -12,10 +12,16 @@ #end%> <% if object_flag == '3' %> - <%= image_tag("/images/sidebar/tags.png") %> - <%= l(:label_tag) %>: + + <%= image_tag("/images/sidebar/tags.png") %> + + + <%= l(:label_tag) %>: + <% if User.current.logged? %> - <%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form-issue', {:focus => 'name-issue'} %> + + <%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form-issue', {:focus => 'name-issue'} %> + <% end %>

@@ -36,7 +42,9 @@ <% elsif object_flag == '6' %> <%#= image_tag("/images/sidebar/tags.png") %> - <%= link_to (image_tag "/images/sidebar/add.png"), 'javascript:void(0);', :class => "tags_icona", :onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this);" if User.current.logged? %> + <%= link_to (image_tag "/images/sidebar/add.png"), 'javascript:void(0);', + :class => "tags_icona", + :onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this);" if User.current.logged? %> <%#= toggle_link (image_tag "/images/sidebar/add.png"), "put-tag-form-#{obj.class}-#{obj.id}", {:focus => "put-tag-form-#{obj.class}-#{obj.id} #name"} if User.current.logged? %>    @@ -47,21 +55,24 @@ <%= render :partial => "courses/course_resources_html", :locals => {:obj => obj ,:object_flag => object_flag } %>
<% else %> - - <%= image_tag("/images/sidebar/tags.png") %> - <%= l(:label_tag) %>: - + + <%= image_tag("/images/sidebar/tags.png") %> + + + <%= l(:label_tag) %>: + <% if User.current.logged? %> - <%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form', {:focus => 'tags_name'} %> + + <%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form', {:focus => 'tags_name'} %> + <% end %> -
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>