change journal list json link
This commit is contained in:
parent
8abb20b4c8
commit
db3797694b
|
@ -969,7 +969,7 @@ var orbitDesktop = function(dom){
|
|||
bindSecondaryHandlers();
|
||||
}
|
||||
|
||||
$.getJSON("/desktop_publications/getjournals",function(journals){
|
||||
$.getJSON("/desktop/journal_pages/get_journals_json",function(journals){
|
||||
journalData = eval(journals);
|
||||
journalview();
|
||||
bindHandlers();
|
||||
|
|
|
@ -3,23 +3,4 @@ class Desktopapp::DesktopAppPublications < Sinatra::Base
|
|||
get "/desktop/journal_p" do
|
||||
erb :journal_p
|
||||
end
|
||||
|
||||
get "/desktop/journal_p_list" do
|
||||
erb :'journal_pages/list'
|
||||
end
|
||||
|
||||
get '/desktop/journal_p_add' do
|
||||
erb :'journal_pages/add'
|
||||
end
|
||||
|
||||
get '/desktop_publications/getjournals' do
|
||||
@journals = Journal.all
|
||||
data = Array.new
|
||||
@journals.each do |journal|
|
||||
@papers = journal.papers.all
|
||||
data << {"title" => journal.title, "papers" => @papers}
|
||||
end
|
||||
data.to_json
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue