|
|
@ -327,16 +327,17 @@
|
|
|
|
alert('暂时不支持多页选择,您当前页没有选择任何资源');
|
|
|
|
alert('暂时不支持多页选择,您当前页没有选择任何资源');
|
|
|
|
return ;
|
|
|
|
return ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (lastSendType === '1'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。
|
|
|
|
if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
type: 'get',
|
|
|
|
type: 'get',
|
|
|
|
url: '<%= search_user_course_user_path(@user)%>' + '?'+ $("#resources_list_form").serialize()
|
|
|
|
url: '<%= search_user_project_user_path(@user)%>' + '?' + $("#resources_list_form").serialize()
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
type: 'get',
|
|
|
|
type: 'get',
|
|
|
|
url: '<%= search_user_project_user_path(@user)%>' + '?' + $("#resources_list_form").serialize()
|
|
|
|
url: '<%= search_user_course_user_path(@user)%>' + '?'+ $("#resources_list_form").serialize()
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -480,5 +481,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
lastSendType = sendType;
|
|
|
|
lastSendType = sendType;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function observeSearchfieldOnInput(fieldId, url,send_id,send_ids) {
|
|
|
|
|
|
|
|
$('#'+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: {search: $this.val(),send_id:send_id,send_ids:send_ids},
|
|
|
|
|
|
|
|
success: function(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);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|