sync button added for desktop and also fixed a little bug..
This commit is contained in:
parent
2a83c6b51d
commit
b533b3f6ea
|
@ -289,13 +289,14 @@ var orbitDesktop = function(dom){
|
|||
return false;
|
||||
}
|
||||
var ca = $e.attr("content-holder");
|
||||
|
||||
var a = function(){
|
||||
$.ajax({
|
||||
type : t,
|
||||
dataType : responsetype,
|
||||
url : $e.attr("href"),
|
||||
success : function(data){
|
||||
if(typeof data == "string"){
|
||||
if(typeof data == "string" && t != "delete"){
|
||||
if(ca)
|
||||
$(ca).html(data);
|
||||
else{
|
||||
|
@ -308,10 +309,12 @@ var orbitDesktop = function(dom){
|
|||
window.o[o.data_method][exe](data,$e);
|
||||
if(t == "delete"){
|
||||
if($e.attr("delete-item")=="true"){
|
||||
var li_to_delete = $e.parentsUntil("li[item=true]").find("li[item=true]");
|
||||
var li_to_delete = $e.parentsUntil("li[item=true]");
|
||||
li_to_delete.slideUp();
|
||||
}
|
||||
}
|
||||
},
|
||||
error : function(x){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -250,6 +250,7 @@ class Admin::ImportDataController < OrbitBackendController
|
|||
|
||||
@journal_paper.create_user_id = hash.id
|
||||
@journal_paper.save!
|
||||
|
||||
end
|
||||
else
|
||||
puts "No journal paper by Teacher"
|
||||
|
|
|
@ -33,6 +33,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
|||
}
|
||||
this.initializeJournalPapers.paperDelete = function(data,dom){
|
||||
var parent = dom.parent().parent().parent();
|
||||
// console.log(parent);
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
|
|
|
@ -81,6 +81,7 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
|
|||
"ajax-remote" => "delete",
|
||||
"confirm-message" => t("sure?"),
|
||||
"callback-method" => "paperDelete",
|
||||
"response-type" => "json",
|
||||
"delete-item" => "true",
|
||||
:class => "journal_paper_delete admbg2 admtxt",
|
||||
:href => panel_personal_journal_desktop_journal_page_path(publication))
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
</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 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 Journal Papers</a></div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
|
|
Reference in New Issue