From 9189ebffeed73a552325434fdaddfa4c3e8c0f9a Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Thu, 22 Nov 2012 18:15:07 +0800 Subject: [PATCH] correct 'edit' button of journal list --- .../javascripts/desktop/journal_pages.js.erb | 2 +- db/seeds.rb | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/app/assets/javascripts/desktop/journal_pages.js.erb b/app/assets/javascripts/desktop/journal_pages.js.erb index 2c6821da..cd04499e 100644 --- a/app/assets/javascripts/desktop/journal_pages.js.erb +++ b/app/assets/javascripts/desktop/journal_pages.js.erb @@ -50,7 +50,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // return false; }) - $("div[container=true]").on("click",".journal_paper_edit",function(){ + $("div[container=true]").unbind("click").on("click",".journal_paper_edit",function(){ $.ajax({ url : $(this).attr("href"), type : "get", diff --git a/db/seeds.rb b/db/seeds.rb index 1a909bed..b53fb7b7 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -32,22 +32,3 @@ end FactoryGirl.create(:custom_record, journal_title_translations: {zh_tw: "tw_test A", en: "en_test A"}) FactoryGirl.create(:custom_record, journal_title_translations: {zh_tw: "tw_test B", en: "en_test B"}) -abstract_file = "./icml2011_abstract" -abstracts = File.open(file).readlines - -bibtex_file = "./icml2011.bibtex" -bibtex = File.open(file).readlines - - -FactoryGirl.define do - factory :paper_record, class: "WritingJournal" do |f| - f.sequence(:paper_title_translations) {|n|{zh_tw: "[tw]_test #{n}", en: "en_test #{n}" }} - f.sequence(:journal_title_translations) {|n| {zh_tw: "tw_test #{n}", en: "en_test #{n}"}} - f.sequence(:keywords) {|n| "keywords #{n}"} - f.sequence(:abstract) {|n| "abstract #{n}"} - f.sequence(:isbn) {|n| "0714312#{n}#{n}#{n}"} - f.sequence(:year) {|n| "201#{n}"} - f.create_user_id BSON::ObjectId('4f45f3b9e9d02c5db9000067') #user_id, this is Chris' account - f.update_user_id BSON::ObjectId('4f45f3b9e9d02c5db9000067') #user_id, this is Chris' account - end -end