add co-author page and new it, but can't destory it...

This commit is contained in:
Rueshyna 2012-11-21 01:54:06 +08:00 committed by chris
parent 5006cd2f61
commit 6a9426c9c8
6 changed files with 21 additions and 13 deletions

View File

@ -1034,6 +1034,20 @@ var orbitDesktop = function(dom){
} }
bindHandlers(); bindHandlers();
} }
this.initializeJournalPapers.coauthor = function(){ // to open add pages in journal papers page
var bindHandlers = function(){ // to bind handlers for add page
o.simple_drop_down();
o.tinyscrollbar_ext({
main: '.tinycanvas',
fill: '.s_grid_con'
})
}
bindHandlers();
}
}; };
this.initializeAppstore = function(target,url,cache){ this.initializeAppstore = function(target,url,cache){

View File

@ -36,11 +36,6 @@ class Desktop::JournalPagesController < ApplicationController
def create def create
if params[:commit].eql?"Save" if params[:commit].eql?"Save"
#if not params[:writing_journal][:publication_date].nil?
# params[:writing_journal][:publication_date] = \
# Date.new *(params[:writing_journal][:publication_date].split("/").map{|s| s.to_i})
#end
params[:writing_journal][:create_user_id] = current_user.id params[:writing_journal][:create_user_id] = current_user.id
@writing_journal = WritingJournal.new(params[:writing_journal]) @writing_journal = WritingJournal.new(params[:writing_journal])

View File

@ -13,10 +13,10 @@
<div id="panel_l" class="ph"> <div id="panel_l" class="ph">
<div class="s_menu sm_v" content-type="menu"> <div class="s_menu sm_v" content-type="menu">
<ul id='setting_left_nav'> <ul id='setting_left_nav'>
<li><a href="<%= desktop_journal_pages_path %>" callback-method="list" load="true" class="hh2 w2 hp thmc1 thmtxt xx" onclick='return false;'>List</a></li> <li><a href="<%= desktop_journal_pages_path %>" data-method="list" class="hh2 w2 hp active thmc1 thmtxt xx" onclick='return false;'>List</a></li>
<li><a href="<%= new_desktop_journal_page_path %>" callback-method="addpaper" class="admtxt hh2 w2 hp xx" onclick='return false;'>Add/Edit</a></li> <li><a href="<%= new_desktop_journal_page_path %>" data-method="addpaper" class="admtxt hh2 w2 hp xx" onclick='return false;'>Add/Edit</a></li>
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Journals</a></li> <li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Journals</a></li>
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li> <li><a href="<%= new_desktop_co_author_path %>" data-method="coauthor" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags &amp; Keywords</a></li> <li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags &amp; Keywords</a></li>
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Analysis</a></li> <li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Analysis</a></li>
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Import</a></li> <li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Import</a></li>

View File

@ -1,4 +1,3 @@
<div class="toolbar hh2"> <div class="toolbar hh2">
<div class="fn_g hp"> <div class="fn_g hp">
<%= f.submit "Save", name: "commit", value: "Save", class: "fn_btn hh2 thmc2 thmtxt" %> <%= f.submit "Save", name: "commit", value: "Save", class: "fn_btn hh2 thmc2 thmtxt" %>

View File

@ -1,3 +1,3 @@
<%= form_for @writing_journal, html: { multipart: true ,:type=>"ajax_form", "callback-method"=>"formCallback"} , url: desktop_journal_pages_path do |f| %> <%= form_for @writing_journal , url: desktop_journal_pages_path do |f| %>
<%= render partial: 'desktop/journal_pages/form', locals: {:f => f} %> <%= render partial: 'desktop/journal_pages/form', locals: {:f => f} %>
<%end%> <%end%>

View File

@ -149,9 +149,8 @@ Orbit::Application.routes.draw do
end end
namespace :desktop do namespace :desktop do
match '/journal_pages/get_journals_json' => 'journal_pages#get_journals_json' , via: :get
match "/" => "desktop#index" match "/" => "desktop#index"
match '/journal_pages/get_journals_json' => 'journal_pages#get_journals_json'
match '/desktop'=>'desktop#desktop' match '/desktop'=>'desktop#desktop'
match '/app_manager'=>'desktop#app_manager' match '/app_manager'=>'desktop#app_manager'
match '/sections'=>'desktop#sections' match '/sections'=>'desktop#sections'
@ -169,6 +168,7 @@ Orbit::Application.routes.draw do
match '/temp_func/'=>'desktop#temp_func' match '/temp_func/'=>'desktop#temp_func'
resources :journal_pages resources :journal_pages
resources :co_authors
end end
# namespace :desktop_publications do # namespace :desktop_publications do