Revision 1282:8d30e7644b75 plugins
| plugins/redmine_bibliography/assets/javascripts/authors.js | ||
|---|---|---|
| 15 | 15 |
} |
| 16 | 16 |
|
| 17 | 17 |
$(".author_search").live('keyup.autocomplete', function(){
|
| 18 |
$this = $(this); |
|
| 19 |
|
|
| 20 |
$.ajax({
|
|
| 21 |
type: "POST", |
|
| 22 |
url: "/publications/autocomplete_for_author", |
|
| 23 |
dataType: "json", |
|
| 24 |
data: {
|
|
| 25 |
q: $this.val() |
|
| 26 |
}, |
|
| 27 |
|
|
| 28 |
success: function(data, type) {
|
|
| 29 |
console.log("OK: " + data);
|
|
| 30 |
items = data; |
|
| 31 |
response(items); |
|
| 32 |
}, |
|
| 33 |
|
|
| 34 |
error: function(data, type){
|
|
| 35 |
console.log("ERROR: " + type);
|
|
| 36 |
} |
|
| 18 |
$(this).autocomplete({
|
|
| 19 |
source: '/publications/autocomplete_for_author', |
|
| 20 |
minLength: 2 |
|
| 37 | 21 |
}); |
| 38 | 22 |
}); |
| 39 | 23 |
|
| 40 |
|
|
| 41 | 24 |
function identify_author_status(status, object_id) {
|
| 42 | 25 |
$('publication_authorships_attributes_' + object_id + '_edit_author_info').select('input').each(function(s) {
|
| 43 | 26 |
if(status == "no"){
|
| plugins/redmine_bibliography/assets/javascripts/bibliography.js | ||
|---|---|---|
| 3 | 3 |
$this = $(this); |
| 4 | 4 |
|
| 5 | 5 |
$.ajax({
|
| 6 |
type: "POST",
|
|
| 6 |
type: "get",
|
|
| 7 | 7 |
url: "/publications/show_bibtex_fields", |
| 8 | 8 |
data: {
|
| 9 | 9 |
value: $this.val() |
| plugins/redmine_bibliography/config/routes.rb | ||
|---|---|---|
| 1 | 1 |
RedmineApp::Application.routes.draw do |
| 2 |
resources :publications
|
|
| 2 |
match "publications/show_bibtex_fields", :to => 'publications#show_bibtex_fields', :via => "get"
|
|
| 3 | 3 |
|
| 4 |
match "publications/show_bibtex_fields", :to => 'publications#show_bibtex_fields' |
|
| 5 |
match "publications/autocomplete_for_author", :to => 'publications#autocomplete_for_author' |
|
| 4 |
match "publications/autocomplete_for_author", :to => 'publications#autocomplete_for_author', :via => "get" |
|
| 6 | 5 |
|
| 6 |
resources :publications |
|
| 7 | 7 |
end |
Also available in: Unified diff