添加或者取消提交时候弹框自动消失

This commit is contained in:
huang 2016-05-04 15:19:26 +08:00
parent 65a907bc99
commit a691fb7eb7
2 changed files with 9 additions and 8 deletions

View File

@ -3,9 +3,9 @@
<%= link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => org_subfield_id), :class => "coursesLineGrey hidden", :title => subdomain.name %>
</li>
<% end %>
<% if subdomains.size == 5 %>
<li class="homepageLeftMenuMore" id="show_more_org_project">
<input type="hidden" value="<%= page %>" id="org_project_page_num">
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_org_project('<%= more_org_projects_organization_path(org_id) %>');"></a>
</li>
<% end%>
<%# if subdomains.size == 5 %>
<!--<li class="homepageLeftMenuMore" id="show_more_org_project">-->
<!--<input type="hidden" value="<%#= page %>" id="org_project_page_num">-->
<!--<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_org_project('<%#= more_org_projects_organization_path(org_id) %>');"></a>-->
<!--</li>-->
<%# end%>

View File

@ -15,15 +15,16 @@
</li>
<li class="cl"></li>
</ul>
<div class="courseSendSubmit mr15"><a href="javascript:void(0);" class="sendSourceText" onclick="add_org_subfield_subdomain();">确定</a></div>
<div class="courseSendSubmit mr15"><a href="javascript:void(0);" class="sendSourceText" onclick="add_org_subfield_subdomain();hideModal()">确定</a></div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText" onclick="hideModal()">取消</a></div>
<% end %>
<div class="cl"></div>
</div>
<script type="javascript">
function add_org_subfield_subdomain(){
if ($("#subfield_name_subdomain").val().trim() != "")
alert("Test");
$("#add_subfield_form_subdomain").submit();
}
</script>