add autocomplete js
This commit is contained in:
		
							parent
							
								
									f2d1b0eaf7
								
							
						
					
					
						commit
						065d38c797
					
				|  | @ -18,6 +18,11 @@ class Desktop::JournalPagesController < ApplicationController | |||
|     @level_types = JournalLevelType.all | ||||
|     @author_types = JournalAuthorType.all | ||||
|     @paper_types= JournalPaperType.all | ||||
|     @co_author_candidate = | ||||
|       CoAuthor.where(name_id: current_user.id).map{|c|c.co_author} | ||||
|     @journal_candidate = | ||||
|       WritingJournal.where(create_user_id: current_user.id).map{|j|j.journal_title}.uniq | ||||
| 
 | ||||
| 
 | ||||
|     respond_to do |format| | ||||
|       format.html { render :layout => false} | ||||
|  | @ -26,7 +31,7 @@ class Desktop::JournalPagesController < ApplicationController | |||
|   end | ||||
| 
 | ||||
|   def edit | ||||
|     @writing_journal= WritingJournal.find(params[:id]) | ||||
|     @writing_journal = WritingJournal.find(params[:id]) | ||||
|     @level_types = JournalLevelType.all | ||||
|     @author_types = JournalAuthorType.all | ||||
|     @paper_types= JournalPaperType.all | ||||
|  |  | |||
|  | @ -207,3 +207,6 @@ | |||
|     </div> | ||||
|   </div> | ||||
| </div> | ||||
| <script> | ||||
|   orbitDesktop.initializeJournals.prototype.autocomplete = { "journal_title" : <%= @journal_candidate  %>, "co_authors_candidate" : <%= @co_author_candidate %> } | ||||
| </script> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue