Merge branch 'develop' into szzh

This commit is contained in:
sw 2015-03-13 17:48:12 +08:00
commit e4895731ae
4 changed files with 27 additions and 9 deletions

View File

@ -99,7 +99,7 @@ class MembersController < ApplicationController
@project.members << members
# added by nie
@project.project_infos << project_info
@project.user_grades << user_grades
@project.user_grades << user_grades unless user_grades.first.user_id.nil?
# end
end
if members.present? && members.all? { |m| m.valid? }
@ -108,7 +108,11 @@ class MembersController < ApplicationController
end
end
if params[:flag]
unless members.present? && members.all? {|m| m.valid? }
flash[:error] = members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ')
else
flash[:notice] = l(:label_invite_success)
end
respond_to do |format|
format.html { redirect_to invite_members_project_url(@project) }
end

View File

@ -7,10 +7,10 @@
#scrollsidebar a{ text-decoration:none;}
html{ overflow-x:hidden;}
.scrollsidebar{ position:absolute;top:1px; right:1px; background:none; }
.scrollsidebar{ position:fixed;bottom:1px; right:1px; background:none; }
.side_content{width:154px; height:auto; overflow:hidden; float:left; }
.side_content .side_list {width:154px;overflow:hidden;}
.show_btn{ width:0; height:112px; overflow:hidden; float:left; cursor:pointer;}
.show_btn{ width:0; height:112px; overflow:hidden; float:left;margin-top: 200px; cursor:pointer;}
.show_btn span { display:none;}
.close_btn{width:24px;height:24px;cursor:pointer;}
.side_title,.side_bottom,.close_btn,.show_btn {background:url(/images/sidebar_bg.png) no-repeat; }

View File

@ -1,14 +1,28 @@
<script>
function verifyAddress() {
var email = $('#mail').val();
var email = $.trim($('#mail').val());
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (email == "" || filter.test(email)) {
if(email == "")
{
$("#valid_email").html("电子邮件不能为空");
}
else if (filter.test(email)) {
$("#valid_email").html("");
return true;
}
else
{
$("#valid_email").html("您所填写的电子邮件格式不正确");
}
return false;
}
function senderEmail(obj)
{
if(verifyAddress())
{
obj.parent().submit();
}
}
@ -40,10 +54,10 @@
</div>
<%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get') do %>
<span id="valid_email" style="color: #FF0000;"></span>
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onblur => "verifyAddress();" %>
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "verifyAddress();" %>
<div class="cl"></div>
<div class="cl"></div>
<a href="#" class="btn_free" onclick="$(this).parent().submit();">
<a href="#" class="btn_free" onclick="senderEmail($(this));">
<%= l(:label_send_email)%>
</a>
<%#= submit_tag '免费发送', :style => "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %>

View File

@ -43,7 +43,7 @@
<tr>
<td class="font_lighter" >
<%= l :label_create_time %>:
<%= format_time(e.created_at) %>
<%= format_time(e.project.created_on) %>
</table>
</td>
</tr>