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
parent 95a3831dce
commit ccfecb8243
6 changed files with 17 additions and 11 deletions

View File

@ -988,6 +988,18 @@ var orbitDesktop = function(dom){
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){

View File

@ -35,11 +35,6 @@ class Desktop::JournalPagesController < ApplicationController
def create
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
@writing_journal = WritingJournal.new(params[:writing_journal])

View File

@ -15,8 +15,8 @@
<ul id='setting_left_nav'>
<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 %>" 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;'>Co-Authors</a></li>
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Journals</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;'>Analysis</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="fn_g hp">
<%= button_tag "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"} , 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} %>
<%end%>

View File

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