mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +09:00
#19606797 우편번호 UI 개선
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8179 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
efa7a257d1
commit
fdd9e04929
7 changed files with 101 additions and 61 deletions
|
|
@ -81,4 +81,57 @@ jQuery(function($){
|
|||
}
|
||||
})
|
||||
.blur();
|
||||
});
|
||||
});
|
||||
|
||||
(function($){
|
||||
|
||||
$.krzip = function(column_name) {
|
||||
var $search_zone, $select_zone;
|
||||
|
||||
// search zone
|
||||
($search_zone = $('#zone_address_search_'+column_name))
|
||||
.find(':text')
|
||||
.keypress(function(event){
|
||||
if(event.keyCode!=13) return;
|
||||
$search_zone.find('button').click();
|
||||
return false;
|
||||
})
|
||||
.end()
|
||||
.find('button')
|
||||
.click(function(){
|
||||
var val = $.trim($search_zone.find(':text').val());
|
||||
var params = {
|
||||
addr : val,
|
||||
column_name : column_name
|
||||
};
|
||||
var response_tags = ['error','message','address_list'];
|
||||
|
||||
if (!val) return false;
|
||||
|
||||
function callback(ret_obj) {
|
||||
var addr_list = ret_obj['address_list'] || '';
|
||||
|
||||
if(!addr_list) return alert(alert_msg['address']) || false;
|
||||
|
||||
$search_zone.hide();
|
||||
$select_zone.show();
|
||||
|
||||
addr_list = $.map( addr_list.split('\n'), function(addr){return '<option value="'+addr+'">'+addr+'</option>'} );
|
||||
$('#address_list_'+column_name).html(addr_list.join('\n')).focus().get(0).selectedIndex = 0;
|
||||
}
|
||||
|
||||
exec_xml('krzip', 'getKrzipCodeList', params, callback, response_tags, params);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// select zone
|
||||
($select_zone = $('#zone_address_list_'+column_name))
|
||||
.find('button')
|
||||
.click(function(){
|
||||
$search_zone.show().find(':text').val('').focus();
|
||||
$select_zone.hide();
|
||||
});
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue