From 703324063e90abc3cafe58eaa26e08ab4a6dfefe Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Mon, 19 Nov 2012 12:13:05 +0800 Subject: [PATCH] change journal list json link --- app/assets/javascripts/orbitdesktop.js | 2 +- lib/desktopapp/desktop_app_publications.rb | 21 +-------------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 2de7da1b..2aca179b 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -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(); diff --git a/lib/desktopapp/desktop_app_publications.rb b/lib/desktopapp/desktop_app_publications.rb index e88d78fa..06f2fef1 100644 --- a/lib/desktopapp/desktop_app_publications.rb +++ b/lib/desktopapp/desktop_app_publications.rb @@ -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 \ No newline at end of file +end