修改js验证事件,由失去焦点事件改为文本改变事件
This commit is contained in:
parent
c4b5ce5004
commit
4e2fe44d10
|
@ -22,7 +22,7 @@
|
|||
|
||||
<%= error_messages_for 'bid' %>
|
||||
<p>
|
||||
<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :onblur => "regexName();" %>
|
||||
<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :onkeyup => "regexName();" %>
|
||||
</p>
|
||||
<p>
|
||||
<span id="bid_name_span"></span>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<span id='open_anonymous_evaluation_span' style="display: none">未开启匿评作业将直接进入众评点赞阶段</span>
|
||||
</p>
|
||||
<p id="evaluation_num_p">
|
||||
<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%>
|
||||
<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onkeyup => "regexEvaluationNum();" , :maxlength => 4%>
|
||||
<span id="bid_evaluation_num_span">即每份作业被允许匿评的人数</span>
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
:size => 60,
|
||||
:maxlength => 60,
|
||||
:style => "width:488px;",
|
||||
:onblur => "regexTitle();"
|
||||
:onkeyup => "regexTitle();"
|
||||
%>
|
||||
</p>
|
||||
<span id="title_span" style="padding-left: 100px;"></span>
|
||||
|
@ -71,7 +71,7 @@
|
|||
:rows => 11,
|
||||
:class => 'wiki-edit',
|
||||
:style => "width:490px;",
|
||||
:onblur => "regexDescription();"
|
||||
:onkeyup => "regexDescription();"
|
||||
%>
|
||||
</p>
|
||||
<span id="description_span" style="padding-left: 100px;"></span>
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
:required => true,
|
||||
:size => 60,
|
||||
:style => "width:320px;",
|
||||
:onblur => "regexName();"
|
||||
:onkeyup => "regexName();"
|
||||
%>
|
||||
|
||||
<span style="font-size: 10px;" id="spane_name_notice">(<%= l(:label_workname_lengthlimit) %>)</span>
|
||||
|
@ -143,7 +143,7 @@
|
|||
:required => true,
|
||||
:size => 60,
|
||||
:rows => 3,
|
||||
:onblur => 'regexDescription();',
|
||||
:onkeyup => 'regexDescription();',
|
||||
:style => "width:320px; "
|
||||
%>
|
||||
<span style="font-size: 10px;" id="span_sofapplication_description">(<%= l(:label_work_description_lengthlimit) %>)</span>
|
||||
|
@ -162,7 +162,7 @@
|
|||
:required => true,
|
||||
:size => 60,
|
||||
:style => "width:320px;",
|
||||
:onblur => 'regexDevelopers();'
|
||||
:onkeyup => 'regexDevelopers();'
|
||||
%>
|
||||
|
||||
<span style="font-size: 10px; " id="span_softapplication_application_developers">
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
if(regexName()){$("#contests_serch").submit();}
|
||||
}
|
||||
</script>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30, :onblur => 'regexName();' %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30, :onkeyup => 'regexName();' %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => "contests_search" %>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10">
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<p>
|
||||
<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;",
|
||||
:maxlength => Bid::NAME_LENGTH_LIMIT,
|
||||
:onblur => "regexName();" %>
|
||||
:onkeyup => "regexName();" %>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
|
@ -53,7 +53,7 @@
|
|||
<span id='open_anonymous_evaluation_span' style="display: none">未开启匿评作业将直接进入众评点赞阶段</span>
|
||||
</p>
|
||||
<p id="evaluation_num_p">
|
||||
<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%>
|
||||
<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onkeyup => "regexEvaluationNum();" , :maxlength => 4%>
|
||||
<span id="bid_evaluation_num_span">即每份作业被允许匿评的人数</span>
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
<%= f.text_area 'user_message', :rows => 3, :cols => 65,
|
||||
:value => "#{comprehensive_evaluation.nil? ? l(:label_leave_a_message) : comprehensive_evaluation}",
|
||||
:onfocus => "clearInfo('new_form_user_message','#{l(:label_leave_a_message)}')",
|
||||
:onblur => "showInfo('new_form_user_message','#{l(:label_leave_a_message)}')",
|
||||
:onkeyup => "showInfo('new_form_user_message','#{l(:label_leave_a_message)}')",
|
||||
:style => "resize: none;", :class => 'noline'%>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<span class="c_red">*</span>
|
||||
作品名称 :
|
||||
</label>
|
||||
<%= f.text_field :name, :required => true, :name => "homework_name", :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onblur => "regexName();"%>
|
||||
<%= f.text_field :name, :required => true, :name => "homework_name", :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onkeyup => "regexName();"%>
|
||||
<span id="homework_attach_name_span"></span>
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
</span>
|
||||
作品名称 :
|
||||
</label>
|
||||
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onblur => "regexName();" %>
|
||||
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onkeyup => "regexName();" %>
|
||||
<span id="homework_attach_name_span"></span>
|
||||
</p>
|
||||
<p>
|
||||
|
@ -78,7 +78,7 @@
|
|||
</span>
|
||||
作品描述 :
|
||||
</label>
|
||||
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :placeholder => "最多3000个汉字", :onblur => "regexDescription();"%>
|
||||
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :placeholder => "最多3000个汉字", :onkeyup => "regexDescription();"%>
|
||||
<span id="homework_attach_description_span" style="padding-left: 100px;"></span>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<% if replying %>
|
||||
<%= f.text_field :subject, { size: 60, style: "width: 99%;", id: "message_subject" }.merge(extra_option) %>
|
||||
<% else %>
|
||||
<%= f.text_field :subject, { size: 60, style: "width: 99%;", id: "message_subject", onblur: "regexSubject();" }.merge(extra_option) %>
|
||||
<%= f.text_field :subject, { size: 60, style: "width: 99%;", id: "message_subject", onkeyup: "regexSubject();" }.merge(extra_option) %>
|
||||
<% end %>
|
||||
<span id="subject_span"></span>
|
||||
</p>
|
||||
|
@ -75,7 +75,7 @@
|
|||
</p>
|
||||
<p>
|
||||
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
|
||||
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content', :onblur => "regexContent();", :maxlength => 5000 %>
|
||||
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content', :onkeyup => "regexContent();", :maxlength => 5000 %>
|
||||
<span id="message_content_span"></span>
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<%= is_new ? l(:bale_news_notice):l(:bale_edit_notice)%>
|
||||
</div>
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :title, :required => true, :size => 60, :style => "width:468px;", :onblur => "regexTitle();" %></p>
|
||||
<p><%= f.text_field :title, :required => true, :size => 60, :style => "width:468px;", :onkeyup => "regexTitle();" %></p>
|
||||
<P><span id="title_notice_span">(60个字符以内)</span></P>
|
||||
<!-- <p style="margin-left:-10px;"><%#= f.text_area :summary, :cols => 60, :rows => 2, :style => "width:490px;margin-left:10px;" %></p> -->
|
||||
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:470px;", :onblur => "regexDescription();" %></p>
|
||||
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:470px;", :onkeyup => "regexDescription();" %></p>
|
||||
<P><span id="description_notice_span"></span></P>
|
||||
<p id="attachments_form" style="margin-left:-10px;"><label style="padding-right: 15px;"><%= l(:label_attachment_plural) %></label><%= render :partial => 'attachments/form', :locals => {:container => @news} %></p>
|
||||
</div>
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<%= @project ? l(:label_news_new) : l(:bale_news_notice) %>
|
||||
</div>
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;", :onblur => "regexTitle();" %></p>
|
||||
<p><%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;", :onkeyup => "regexTitle();" %></p>
|
||||
<P><span id="title_notice_span">(60个字符以内)</span></P>
|
||||
<!-- <p style="margin-left:-10px;"><%#= f.text_area :summary, :cols => 60, :rows => 2, :style => "width:490px;margin-left:10px;" %></p> -->
|
||||
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;", :onblur => "regexDescription();" %></p>
|
||||
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;", :onkeyup => "regexDescription();" %></p>
|
||||
<P><span id="description_notice_span"></span></P>
|
||||
<p id="attachments_form" style="margin-left:-10px;"><label style="padding-right: 15px;"><%= l(:label_attachment_plural) %></label><%= render :partial => 'attachments/form', :locals => {:container => @news} %></p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue