解决:发送功能在中文输入的情况下,会出现输入框内容增多的问题

This commit is contained in:
ouyangxuhua 2016-03-28 19:20:09 +08:00
parent 67ff9fb6e2
commit 1a1d5b4c49
22 changed files with 326 additions and 293 deletions

View File

@ -0,0 +1,26 @@
<%= form_tag add_exist_file_to_course_user_path(user),:remote=>true,:id=>'course_list_form' do %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !courses.empty? %>
<% courses.each do |course| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= truncate(course.name,:lendght=>25) + '['+course.time.to_s+course.term + ']'%></li>
</ul>
<% end %>
<% end %>
</div>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText mt10" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>
<% end %>

View File

@ -0,0 +1,26 @@
<%= form_tag share_message_to_course_user_path(user), :remote => true, :id => 'course_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !courses.empty? %>
<% courses.each do |course| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= truncate(course.name, :lendght => 25) + '['+course.time.to_s+course.term + ']' %></li>
</ul>
<% end %>
<% end %>
</div>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();' %>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" class="sendSourceText mt10" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>

View File

@ -0,0 +1,26 @@
<%= form_tag share_news_to_course_user_path(user), :remote => true, :id => 'course_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !courses.empty? %>
<% courses.each do |course| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= truncate(course.name, :lendght => 25) + '['+course.time.to_s+course.term + ']' %></li>
</ul>
<% end %>
<% end %>
</div>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText mt10" onclick="hideModal();">取消</a>
</div>
</div>
<div class="cl"></div>

View File

@ -0,0 +1,32 @@
<%= form_tag add_exist_file_to_org_user_path(user),:remote=>true,:id=>'orgs_list_form' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="sectionWrap fl mr15">
<ul class="fontGrey3 sectionContent">
<% unless orgs.empty? %>
<% orgs.each do |org|%>
<li>
<label>
<input type="radio" name="org_id" value="<%= org.id%>" onchange="change_org_subfield('<%= org_resources_subfield_organization_path(:id=>org.id)%>')" class="mt3 fl mr5" />
<span><%= org.name%></span></label>
</li>
<%end%>
<%end%>
</ul>
</div>
<div class="columnWrap">
<ul class="columnContent">
<%= render :partial => 'users/org_resources_subfield',:locals => {:subfield=>nil}%>
</ul>
</div>
<div class="cl"></div>
<div class="orgDirection mb10 break_word" style="white-space: nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;overflow: hidden">目标地址:</div>
<div class="courseSendSubmit mr15">
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();',:onclick=>"check_des(event);" %>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a>
</div>
<div class="cl"></div>
<%end %>

View File

@ -0,0 +1,31 @@
<%= form_tag share_message_to_org_user_path(user), :remote => true, :id => 'orgs_list_form' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="sectionWrap fl mr15">
<ul class="fontGrey3 sectionContent">
<% unless orgs.empty? %>
<% orgs.each do |org| %>
<li>
<label>
<input type="radio" name="org_id" value="<%= org.id %>" onchange="change_org_subfield('<%= org_resources_subfield_organization_path(:id=>org.id,:send_type => params[:send_type])%>')" class="mt3 fl mr5"/>
<span><%= org.name %></span></label>
</li>
<% end %>
<% end %>
</ul>
</div>
<div class="columnWrap">
<ul class="columnContent">
<%= render :partial => 'users/org_resources_subfield', :locals => {:subfield => nil} %>
</ul>
</div>
<div class="cl"></div>
<div class="orgDirection mb10 break_word" style="white-space: nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;overflow: hidden">目标地址:</div>
<div class="courseSendSubmit mr15">
<%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();', :onclick => "check_des(event);" %>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a>
</div>
<div class="cl"></div>
<% end %>

View File

@ -0,0 +1,32 @@
<%= form_tag share_news_to_org_user_path(user), :remote => true, :id => 'orgs_list_form' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="sectionWrap fl mr15">
<ul class="fontGrey3 sectionContent">
<% unless orgs.empty? %>
<% orgs.each do |org| %>
<li>
<label>
<input type="radio" name="org_id" value="<%= org.id %>" onchange="change_org_subfield('<%= org_resources_subfield_organization_path(:id=>org.id,:send_type => params[:send_type])%>')" class="mt3 fl mr5"/>
<span><%= org.name %></span></label>
</li>
<% end %>
<% end %>
</ul>
</div>
<div class="columnWrap">
<ul class="columnContent">
<%= render :partial => 'users/org_resources_subfield', :locals => {:subfield => nil} %>
</ul>
</div>
<div class="cl"></div>
<div class="orgDirection mb10 break_word" style="white-space: nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;overflow: hidden">目标地址:</div>
<div class="courseSendSubmit mr15">
<%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();', :onclick => "check_des(event);" %>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a>
</div>
<div class="cl"></div>
<% end %>

View File

@ -0,0 +1,25 @@
<%= form_tag add_exist_file_to_project_user_path(user), :remote => true, :id => 'projects_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !projects.empty? %>
<% projects.each do |project| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="projects_ids[]" type="checkbox" value="<%= project.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= project.name %></li>
</ul>
<% end %>
<% end %>
</div>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>

View File

@ -0,0 +1,25 @@
<%= form_tag share_message_to_project_user_path(user), :remote => true, :id=>'projects_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !projects.empty? %>
<% projects.each do |project| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="project_ids[]" type="checkbox" value="<%= project.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= project.name%></li>
</ul>
<% end %>
</div>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>
<% end %>

View File

@ -0,0 +1,25 @@
<%= form_tag share_news_to_project_user_path(user), :remote => true, :id => 'projects_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !projects.empty? %>
<% projects.each do |project| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="project_ids[]" type="checkbox" value="<%= project.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= project.name %></li>
</ul>
<% end %>
<% end %>
</div>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>

View File

@ -18,42 +18,6 @@
<% end %>
<div class="cl"></div>
</div>
<%= form_tag add_exist_file_to_org_user_path(user),:remote=>true,:id=>'orgs_list_form' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="sectionWrap fl mr15">
<ul class="fontGrey3 sectionContent">
<% unless @orgs.empty? %>
<% @orgs.each do |org|%>
<li>
<label>
<input type="radio" name="org_id" value="<%= org.id%>" onchange="change_org_subfield('<%= org_resources_subfield_organization_path(:id=>org.id)%>')" class="mt3 fl mr5" />
<span><%= org.name%></span></label>
</li>
<%end%>
<%end%>
</ul>
</div>
<div class="columnWrap">
<ul class="columnContent">
<!--<span class="fontBlue pl10">请在左侧选择要转发的位置</span>-->
<!--<li style="background-color:#f1f1f1; color:#555555; padding-top:2px; padding-bottom:2px;">请选择栏目:</li>-->
<%= render :partial => 'users/org_resources_subfield',:locals => {:subfield=>nil}%>
<!--<li>-->
<!--<label>-->
<!--<input type="radio" name="sendColumn" class="mt3 fl mr5" />-->
<!--<span>动态</span></label>-->
<!--</li>-->
</ul>
</div>
<div class="cl"></div>
<div class="orgDirection mb10 break_word" style="white-space: nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;overflow: hidden">目标地址:</div>
<div class="courseSendSubmit mr15">
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();',:onclick=>"check_des(event);" %>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a>
</div>
<div class="cl"></div>
<%end %>
<div id="org_file_form">
<%= render :partial => 'users/org_file_form', :locals => {:user => user, :orgs => @orgs, :send_id => send_id, :send_ids => send_ids} %>
</div>

View File

@ -24,31 +24,8 @@
<%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %>
<% end %>
</div>
<%= form_tag add_exist_file_to_project_user_path(user), :remote => true, :id=>'projects_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !projects.empty? %>
<% projects.each do |project| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="projects_ids[]" type="checkbox" value="<%= project.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= project.name%></li>
</ul>
<% end %>
</div>
<div id="project_file_form">
<%= render :partial => 'users/project_file_form', :locals => {:user => user, :projects => projects, :send_id => send_id, :send_ids => send_ids} %>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>
<% end %>
</div>

View File

@ -26,31 +26,8 @@
<%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %>
<% end %>
</div>
<%= form_tag add_exist_file_to_course_user_path(user),:remote=>true,:id=>'course_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !courses.empty? %>
<% courses.each do |course| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= truncate(course.name,:lendght=>25) + '['+course.time.to_s+course.term + ']'%></li>
</ul>
<% end %>
</div>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText mt10" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>
<% end %>
<div id="course_file_form">
<%= render :partial => "users/course_file_form", :locals => {:user => user, :send_id => send_id, :send_ids => send_ids, :courses => courses} %>
</div>
</div>

View File

@ -26,31 +26,8 @@
<%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %>
<% end %>
</div>
<%= form_tag share_message_to_course_user_path(user),:remote=>true,:id=>'course_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !courses.empty? %>
<% courses.each do |course| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= truncate(course.name,:lendght=>25) + '['+course.time.to_s+course.term + ']'%></li>
</ul>
<% end %>
</div>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText mt10" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>
<% end %>
</div>
<div id="course_message_form">
<%= render :partial => 'users/course_message_form', :locals => {:user => user, :courses => courses, :send_id => send_id, :send_ids => send_ids} %>
</div>
</div>

View File

@ -18,42 +18,6 @@
<% end %>
<div class="cl"></div>
</div>
<%= form_tag share_message_to_org_user_path(user),:remote=>true,:id=>'orgs_list_form' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="sectionWrap fl mr15">
<ul class="fontGrey3 sectionContent">
<% unless @orgs.empty? %>
<% @orgs.each do |org|%>
<li>
<label>
<input type="radio" name="org_id" value="<%= org.id%>" onchange="change_org_subfield('<%= org_resources_subfield_organization_path(:id=>org.id,:send_type => params[:send_type])%>')" class="mt3 fl mr5" />
<span><%= org.name%></span></label>
</li>
<%end%>
<%end%>
</ul>
</div>
<div class="columnWrap">
<ul class="columnContent">
<!--<span class="fontBlue pl10">请在左侧选择要转发的位置</span>-->
<!--<li style="background-color:#f1f1f1; color:#555555; padding-top:2px; padding-bottom:2px;">请选择栏目:</li>-->
<%= render :partial => 'users/org_resources_subfield',:locals => {:subfield=>nil}%>
<!--<li>-->
<!--<label>-->
<!--<input type="radio" name="sendColumn" class="mt3 fl mr5" />-->
<!--<span>动态</span></label>-->
<!--</li>-->
</ul>
</div>
<div class="cl"></div>
<div class="orgDirection mb10 break_word" style="white-space: nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;overflow: hidden">目标地址:</div>
<div class="courseSendSubmit mr15">
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();',:onclick=>"check_des(event);" %>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a>
</div>
<div class="cl"></div>
<%end %>
<div id="org_message_form">
<%= render :partial => 'users/org_message_form',:locals => {:user => user, :orgs => @orgs, :send_id => send_id, :send_ids => send_ids} %>
</div>

View File

@ -24,30 +24,8 @@
<%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %>
<% end %>
</div>
<%= form_tag share_message_to_project_user_path(user), :remote => true, :id=>'projects_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !projects.empty? %>
<% projects.each do |project| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="project_ids[]" type="checkbox" value="<%= project.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= project.name%></li>
</ul>
<% end %>
</div>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>
<% end %>
</div>
<div id="project_message_form">
<%= render :partial => 'users/project_message_form', :locals => {:projects => projects, :user => user, :send_id => send_id, :send_ids => send_ids} %>
</div>
</div>

View File

@ -26,31 +26,8 @@
<%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %>
<% end %>
</div>
<%= form_tag share_news_to_course_user_path(user),:remote=>true,:id=>'course_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !courses.empty? %>
<% courses.each do |course| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= truncate(course.name,:lendght=>25) + '['+course.time.to_s+course.term + ']'%></li>
</ul>
<% end %>
</div>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText mt10" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>
<% end %>
</div>
<div id="course_news_form">
<%= render :partial => 'users/course_news_form',:locals => {:user => user, :courses => courses, :send_id => send_id, :send_ids => send_ids} %>
</div>
</div>

View File

@ -18,42 +18,6 @@
<% end %>
<div class="cl"></div>
</div>
<%= form_tag share_news_to_org_user_path(user),:remote=>true,:id=>'orgs_list_form' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="sectionWrap fl mr15">
<ul class="fontGrey3 sectionContent">
<% unless @orgs.empty? %>
<% @orgs.each do |org|%>
<li>
<label>
<input type="radio" name="org_id" value="<%= org.id%>" onchange="change_org_subfield('<%= org_resources_subfield_organization_path(:id=>org.id,:send_type => params[:send_type])%>')" class="mt3 fl mr5" />
<span><%= org.name%></span></label>
</li>
<%end%>
<%end%>
</ul>
</div>
<div class="columnWrap">
<ul class="columnContent">
<!--<span class="fontBlue pl10">请在左侧选择要转发的位置</span>-->
<!--<li style="background-color:#f1f1f1; color:#555555; padding-top:2px; padding-bottom:2px;">请选择栏目:</li>-->
<%= render :partial => 'users/org_resources_subfield',:locals => {:subfield=>nil}%>
<!--<li>-->
<!--<label>-->
<!--<input type="radio" name="sendColumn" class="mt3 fl mr5" />-->
<!--<span>动态</span></label>-->
<!--</li>-->
</ul>
</div>
<div class="cl"></div>
<div class="orgDirection mb10 break_word" style="white-space: nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;overflow: hidden">目标地址:</div>
<div class="courseSendSubmit mr15">
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();',:onclick=>"check_des(event);" %>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a>
</div>
<div class="cl"></div>
<%end %>
<div id="org_news_form">
<%= render :partial => 'users/org_news_form', :locals => {:orgs => @orgs, :user => user,:send_id => send_id, :send_ids => send_ids} %>
</div>

View File

@ -24,31 +24,8 @@
<%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %>
<% end %>
</div>
<%= form_tag share_news_to_project_user_path(user), :remote => true, :id=>'projects_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !projects.empty? %>
<% projects.each do |project| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="project_ids[]" type="checkbox" value="<%= project.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= project.name%></li>
</ul>
<% end %>
</div>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>
<% end %>
</div>
<div id="project_news_form">
<%= render :partial => 'users/project_news_form', :locals => {:user => user, :projects => projects, :send_id => send_id, :send_ids => send_ids} %>
</div>
</div>

View File

@ -9,18 +9,28 @@
//$("#upload_box").css('left','').css('top','');
//$("#upload_box").html('<%#= escape_javascript( render :partial => "resource_share_popup" ,:locals => {:courses=>@course,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
//$("#upload_box").css('display','block');
<% if params[:send_type].present? && params[:send_type] == 'news' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_course' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% elsif params[:send_type] == 'file' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_popup' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% elsif params[:send_type] == 'message' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% if params[:is_observe].nil? %>
<% if params[:send_type].present? && params[:send_type] == 'news' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_course' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% elsif params[:send_type] == 'file' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_popup' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% elsif params[:send_type] == 'message' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% end %>
showModal('ajax-modal', '452px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 435px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","50%").css("left","50%");
$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
var val = $("#search_course_input").val();
$("#search_course_input").val("").focus().val(val);
<% else %>
<% if params[:send_type] == 'news' %>
$("#course_news_form").html("<%= escape_javascript(render :partial => 'users/course_news_form', :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>")
<% elsif params[:send_type] == 'file' %>
$("#course_file_form").html("<%= escape_javascript(render :partial => 'users/course_file_form', :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>");
<% elsif params[:send_type] == 'message' %>
$("#course_message_form").html("<%= escape_javascript(render :partial => 'users/course_message_form', :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>");
<% end %>
<% end %>
showModal('ajax-modal', '452px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 435px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","50%").css("left","50%");
$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
var val = $("#search_course_input").val();
$("#search_course_input").val("").focus().val(val);

View File

@ -1,3 +1,4 @@
<% if params[:is_observe].nil? %>
<% if params[:send_type].present? && params[:send_type] == 'news' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_org' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
<% elsif params[:send_type] == 'file' %>
@ -12,4 +13,13 @@ $('#ajax-modal').parent().css("top","50%").css("left","50%");
$('#ajax-modal').parent().addClass("popbox").addClass("shareDP");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
var val = $("#search_org_input").val();
$("#search_org_input").val("").focus().val(val);
$("#search_org_input").val("").focus().val(val);
<% else %>
<% if params[:send_type] == 'news' %>
$("#org_news_form").html("<%= escape_javascript(render :partial => 'users/org_news_form', :locals => {:orgs => @orgs,:user=> @user,:send_id => @send_id, :send_ids => @send_ids}) %>");
<% elsif params[:send_type] == 'file' %>
$("#org_file_form").html("<%= escape_javascript(render :partial => 'users/org_file_form', :locals => {:orgs => @orgs,:user=> @user,:send_id => @send_id, :send_ids => @send_ids}) %>");
<% elsif params[:send_type] == 'message' %>
$("#org_message_form").html("<%= escape_javascript(render :partial => 'users/org_message_form', :locals => {:orgs => @orgs,:user=> @user,:send_id => @send_id, :send_ids => @send_ids}) %>");
<% end %>
<% end %>

View File

@ -1,3 +1,4 @@
<% if params[:is_observe].nil? %>
<% if params[:send_type].present? && params[:send_type] == 'news' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_project', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% elsif params[:send_type] == 'file' %>
@ -14,3 +15,12 @@ $('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
//$("#search_project_input").focus();
var val = $("#search_project_input").val();
$("#search_project_input").val("").focus().val(val);
<% else %>
<% if params[:send_type] == 'news' %>
$("#project_news_form").html("<%= escape_javascript(render :partial => 'users/project_news_form', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>");
<% elsif params[:send_type] == 'file' %>
$("#project_file_form").html("<%= escape_javascript(render :partial => 'users/project_file_form', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>");
<% elsif params[:send_type] == 'message' %>
$("#project_message_form").html("<%= escape_javascript(render :partial => 'users/project_message_form', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>");
<% end %>
<% end %>

View File

@ -1055,7 +1055,7 @@ function observeSearchfieldOnInput(fieldId, url,send_id,send_ids, send_type) {
$.ajax({
url: url,
type: 'get',
data: {search: $this.val(),send_id:send_id,send_ids:send_ids, send_type:send_type},
data: {search: $this.val(),send_id:send_id,send_ids:send_ids, send_type:send_type, is_observe:true},
success: function(data){ },
beforeSend: function(){ $this.addClass('ajax-loading'); },
complete: function(){ $this.removeClass('ajax-loading'); }
@ -1065,10 +1065,10 @@ function observeSearchfieldOnInput(fieldId, url,send_id,send_ids, send_type) {
var reset = function() {
if (timer) {
clearInterval(timer);
timer = setInterval(check, 300);
timer = setInterval(check, 500);
}
};
var timer = setInterval(check, 300);
var timer = setInterval(check, 500);
$this.bind('keyup click mousemove', reset);
});
}