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 668c1e7d75
commit 5de7fcfaf6
9 changed files with 36 additions and 21 deletions

View File

@ -322,8 +322,12 @@ def sync_conference_data
puts "No conference by Teacher"
end
end
respond_to do |format|
format.html { redirect_to request.referer }
format.json { render json: {"success"=>true}.to_json}
redirect_to request.referer
end
end
@ -509,6 +513,13 @@ end
else
puts "No conference by Teacher"
end
end
respond_to do |format|
format.html
format.json { render json: {"success"=>true}.to_json}
end
end
end
@ -631,6 +642,12 @@ def sync_book_data_auto
end
end
end
respond_to do |format|
format.html
format.json { render json: {"success"=>true}.to_json}
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));
}
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){
if(data.success){
o.notify(data.msg,"success");

View File

@ -7,7 +7,6 @@ class Panel::PersonalBook::Desktop::PersonalBooksController < ApplicationControl
page ||= 1
@per_column = 5
@userid = current_user.id
case @view_by
when "abstract"
@ -71,4 +70,4 @@ class Panel::PersonalBook::Desktop::PersonalBooksController < ApplicationControl
def books_window
render :layout => false
end
end
end

View File

@ -57,11 +57,9 @@
</ul>
</div>
</div>
<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>
<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>
<div class="hh1 hp sdm">
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div>
@ -72,4 +70,4 @@
<%= publication_record w, @view_by%>
<% end %>
</ul>
</div>
</div>

View File

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

View File

@ -60,10 +60,9 @@
</div>
<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>
<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>
<div class="hh1 hp sdm">
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div>
</div>

View File

@ -42,10 +42,10 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
this.initializeJournalPapers.cancelpaper = function(){
o.highlight_sub_menu_item(0);
}
this.initializeJournalPapers.syncComplete = function(){
this.initializeJournalPapers.syncComplete = function(){
o.notify("Sync Complete","success");
o.sub_menu_item($("div[content-type=menu] a").eq(0));
}
}
var uploadFiles = function(){
$('#add_plugin_file a.add').click(function(){

View File

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

View File

@ -59,9 +59,8 @@
</div>
</div>
<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>
<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 class="hh1 hp sdm">
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div>
@ -72,4 +71,4 @@
<%= publication_record w, @view_by%>
<% end %>
</ul>
</div>
</div>