added sync for journal paper books and conference.. and also disabled the icons

Conflicts:
	app/assets/javascripts/desktop/orbitdesktop.js
	app/controllers/admin/import_data_controller.rb

Conflicts:
	vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/desktop/personal_books_controller.rb
	vendor/built_in_modules/personal_book/app/views/panel/personal_book/desktop/personal_books/index.html.erb
	vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/conference_pages.js
	vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb
	vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js
	vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb
	vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb
This commit is contained in:
Harry Bomrah 2013-09-26 22:26:19 +08:00 committed by Manson Wang
parent 671257992a
commit 774cc5d392
9 changed files with 36 additions and 21 deletions

View File

@ -322,8 +322,12 @@ def sync_conference_data
puts "No conference by Teacher" puts "No conference by Teacher"
end end
end end
respond_to do |format|
redirect_to request.referer format.html { redirect_to request.referer }
format.json { render json: {"success"=>true}.to_json}
end
end end
@ -509,6 +513,13 @@ end
else else
puts "No conference by Teacher" puts "No conference by Teacher"
end end
end
respond_to do |format|
format.html
format.json { render json: {"success"=>true}.to_json}
end end
end end
end end
@ -631,6 +642,12 @@ def sync_book_data_auto
end end
end end
end end
respond_to do |format|
format.html
format.json { render json: {"success"=>true}.to_json}
end
end end
end end

View File

@ -98,6 +98,11 @@ orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // t
o.sub_menu_item($("div[content-type=menu] a").eq(0)); o.sub_menu_item($("div[content-type=menu] a").eq(0));
} }
this.initializePersonalBook.syncComplete = function(){
o.notify("Sync Complete","success");
o.sub_menu_item($("div[content-type=menu] a").eq(0));
}
this.initializePersonalBook.coAuthorformCallback = function(data){ this.initializePersonalBook.coAuthorformCallback = function(data){
if(data.success){ if(data.success){
o.notify(data.msg,"success"); o.notify(data.msg,"success");

View File

@ -7,7 +7,6 @@ class Panel::PersonalBook::Desktop::PersonalBooksController < ApplicationControl
page ||= 1 page ||= 1
@per_column = 5 @per_column = 5
@userid = current_user.id @userid = current_user.id
case @view_by case @view_by
when "abstract" when "abstract"

View File

@ -57,11 +57,9 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="hh1 hp sdm"> <div class="hh1 hp sdm">
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_book_data_path(:user_id=>@userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Books</a></div> <div class="sdm_t hh1"><a href="<%= admin_import_data_sync_book_data_path(:user_id=>@userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Books</a></div>
</div> </div>
<div class="hh1 hp sdm"> <div class="hh1 hp sdm">
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div> <div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div> </div>

View File

@ -46,7 +46,6 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
o.notify("Sync Complete","success"); o.notify("Sync Complete","success");
o.sub_menu_item($("div[content-type=menu] a").eq(0)); o.sub_menu_item($("div[content-type=menu] a").eq(0));
} }
var uploadFiles = function(){ var uploadFiles = function(){
$('#add_plugin_file a.add').click(function(){ $('#add_plugin_file a.add').click(function(){
var new_id = $(this).prev().attr('value'); var new_id = $(this).prev().attr('value');

View File

@ -62,7 +62,6 @@
<div class="hh1 hp sdm"> <div class="hh1 hp sdm">
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_conference_data_path(:user_id => @userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Conference Papers</a></div> <div class="sdm_t hh1"><a href="<%= admin_import_data_sync_conference_data_path(:user_id => @userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Conference Papers</a></div>
</div> </div>
<div class="hh1 hp sdm"> <div class="hh1 hp sdm">
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div> <div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div> </div>

View File

@ -7,7 +7,6 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr
page ||= 1 page ||= 1
@per_column = 5 @per_column = 5
@userid = current_user.id @userid = current_user.id
case @view_by case @view_by
when "abstract" when "abstract"

View File

@ -61,7 +61,6 @@
<div class="hh1 hp sdm"> <div class="hh1 hp sdm">
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_journal_paper_data_path(:user_id => @userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Books</a></div> <div class="sdm_t hh1"><a href="<%= admin_import_data_sync_journal_paper_data_path(:user_id => @userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Books</a></div>
</div> </div>
<div class="hh1 hp sdm"> <div class="hh1 hp sdm">
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div> <div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div> </div>