From 12c19e2bfe2554ce5a749a969ebe7fef37992824 Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 25 Apr 2014 15:41:12 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"jquery=20=E7=82=B9=E5=87=BB=E7=9C=81?= =?UTF-8?q?=E4=BB=BD=E5=87=BA=E5=AD=A6=E6=A0=A1"=20revert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 891fa65c160652b6b47064fc738fe2e13a571cca. --- app/views/my/account.html.erb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 6efd76e15..9bc4cb2b5 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -5,8 +5,6 @@ function(){ $("#province_lean").attr("href", "#WOpenWindow") $("#province_lean").leanModal({top: 100, closeButton: ".modal_close"}); - $("#province option").attr("disabled", true); - $("#province option").click(function(){get_options(this.value);}); } ); @@ -21,11 +19,11 @@ url :'/school/get_options/'+encodeURIComponent(value), data :'text', success: function(data){ + + $("#schoollist").html(data); - }, - complete: function() { - $("#province option").attr("disabled", true); - } + + } } @@ -119,7 +117,7 @@ <% else %> - <%= l(:field_occupation) %> *<%= select_tag "province", options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province), onclick: '$("#province option").attr("disabled", false)' %> + <%= l(:field_occupation) %> *<%= select_tag "province", options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province), :onchange => "get_options(this.value)" %>