leanmodal
This commit is contained in:
parent
bac261047f
commit
edce128e6b
|
@ -3,8 +3,8 @@
|
|||
<script type="text/javascript">
|
||||
$(document).ready(
|
||||
function(){
|
||||
$("#province").attr("href", "#WOpenWindow")
|
||||
$("#province").leanModal({top: 100, closeButton: ".modal_close"});
|
||||
$("#province_lean").attr("href", "#WOpenWindow")
|
||||
$("#province_lean").leanModal({top: 100, closeButton: ".modal_close"});
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
@ -13,6 +13,7 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
function get_options(value){
|
||||
$("#province_lean").click();
|
||||
$.ajax({
|
||||
type :"POST",
|
||||
url :'/school/get_options/'+encodeURIComponent(value),
|
||||
|
@ -109,23 +110,18 @@
|
|||
|
||||
|
||||
<p style="width:357px;padding-left: 26px;">
|
||||
<div class="hidden" id='province_lean' ></div>
|
||||
<% unless User.current.user_extensions.school.nil? %>
|
||||
<%= l(:field_occupation) %> <span class="required">*</span><%= select_tag "province", options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province, User.current.user_extensions.school.province), :onchange => "get_options(this.value)" %>
|
||||
<input id="occupation" name="occupation" type="hidden" value="<%=User.current.user_extensions.school.id%>" />
|
||||
<input id="occupation_name" type="text" value="<%=User.current.user_extensions.school.name%>" readonly />
|
||||
|
||||
|
||||
|
||||
|
||||
<!--<%= select_tag "occupation",
|
||||
options_for_select([[User.current.user_extensions.school.name, User.current.user_extensions.school.id]]) %>-->
|
||||
<% else %>
|
||||
<%= l(:field_occupation) %> <span class="required">*</span><%= select_tag "province", options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province), :onchange => "get_options(this.value)" %>
|
||||
|
||||
<input id="occupation" name="occupation" type="hidden" />
|
||||
<input id="occupation_name" type="text" readonly />
|
||||
<% end %>
|
||||
<!-- <input id="occupation" readonly />-->
|
||||
</p>
|
||||
|
||||
<div id="WOpenWindow">
|
||||
|
|
Loading…
Reference in New Issue