diff --git a/app/views/courses/_set_join.js.erb b/app/views/courses/_set_join.js.erb index 81c7b42e5..0ccefdba1 100644 --- a/app/views/courses/_set_join.js.erb +++ b/app/views/courses/_set_join.js.erb @@ -4,6 +4,7 @@ <% if @state %> <% if @state == 0 %> alert("加入成功"); + hideModal("#popbox02"); <% elsif @state == 1 %> alert("密码错误"); <% elsif @state == 2 %> diff --git a/app/views/courses/new_join.js.erb b/app/views/courses/new_join.js.erb index c0a6f4a50..00245f8cb 100644 --- a/app/views/courses/new_join.js.erb +++ b/app/views/courses/new_join.js.erb @@ -1,3 +1,8 @@ -$('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/new_join', :locals => {:course => @course}) %>'); -showModal('ajax-modal', '400px'); -$('#ajax-modal').addClass('new-watcher'); +$('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/new_join', locals: { :course => @course}) %>'); +showModal('ajax-modal', '500px'); +$('#ajax-modal').css('height','100px'); +$('#ajax-modal').siblings().remove(); +$('#ajax-modal').before("" + +""); +$('#ajax-modal').parent().css("top","").css("left",""); +$('#ajax-modal').parent().addClass("anonymos"); diff --git a/app/views/projects/_new_join.html.erb b/app/views/projects/_new_join.html.erb index b1704ec32..c823f5ed0 100644 --- a/app/views/projects/_new_join.html.erb +++ b/app/views/projects/_new_join.html.erb @@ -1,62 +1,49 @@ - + + + + -

请输入课程密码

+ + -<%= form_tag({:controller => 'courses', - :action => 'join', - :object_id => course.id}, - :remote => true, - :method => :post, - :id => 'new-watcher-form') do %> - - - - -
- <%= text_field_tag 'course_password', nil, :style=>'width:100%'%> + +
+
+ <%= form_tag({:controller => 'courses', + :action => 'join', + :object_id => course.id}, + :remote => true, + :method => :post, + :id => 'new_join_course') do %> + + <%= text_field_tag 'course_password', nil, :style=>'width:300px;'%> + + <% 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 %>