2015-11-14 10:45:49 +08:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>֯<EFBFBD><D6AF>Ա<EFBFBD><D4B1><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>
|
2015-11-05 17:57:07 +08:00
|
|
|
|
function submit_add_org_members(){
|
|
|
|
|
$("#org_member_add_form").submit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function observeSearchfield(fieldId, targetId, url) {
|
|
|
|
|
$('#'+fieldId).each(function() {
|
|
|
|
|
var $this = $(this);
|
|
|
|
|
$this.addClass('autocomplete');
|
|
|
|
|
$this.attr('data-value-was', $this.val());
|
|
|
|
|
var check = function() {
|
|
|
|
|
var val = $this.val();
|
|
|
|
|
if ($this.attr('data-value-was') != val){
|
|
|
|
|
$this.attr('data-value-was', val);
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: url,
|
|
|
|
|
type: 'get',
|
|
|
|
|
data: {q: $this.val()},
|
|
|
|
|
success: function(data){ if(targetId) $('#'+targetId).html(data); },
|
|
|
|
|
beforeSend: function(){ $this.addClass('ajax-loading'); },
|
|
|
|
|
complete: function(){ $this.removeClass('ajax-loading'); }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var reset = function() {
|
|
|
|
|
if (timer) {
|
|
|
|
|
clearInterval(timer);
|
|
|
|
|
timer = setInterval(check, 300);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var timer = setInterval(check, 300);
|
|
|
|
|
$this.bind('keyup click mousemove', reset);
|
|
|
|
|
});
|
2015-11-14 10:45:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//显示更多的项目
|
|
|
|
|
function show_more_org_project(url){
|
|
|
|
|
$.get(
|
|
|
|
|
url,
|
|
|
|
|
{ page: $("#org_project_page_num").val() },
|
|
|
|
|
function (data) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
);
|
2015-11-05 17:57:07 +08:00
|
|
|
|
}
|