fixed desktop several bug

This commit is contained in:
Rueshyna committed 2013-03-05 17:31:57 +08:00
1 parent f6272728d5
commit 806ffe0a1e
14 files changed
+55 -44

No files matched your search

@@ -36,6 +36,11 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
o.notify(data.msg,"success");
}
}
this.initializeJournalPapers.editpaper = function(){
o.highlight_sub_menu_item(1)
}
this.initializeJournalPapers.addpaper = function(){ // to open add pages in journal papers page
var bindHandlers = function(){ // to bind handlers for add page
o.simple_drop_down();
@@ -52,10 +57,10 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
return false;
});
$('.action a.remove_existing_record').click(function(){
$(this).next('.should_destroy').attr('value', 1);
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
});
$('.action a.remove_existing_record').click(function(){
$(this).next('.should_destroy').attr('value', 1);
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
});
}
bindHandlers();
}
@@ -63,7 +68,6 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
this.initializeJournalPapers.journal = function(){ // to open add pages in journal papers page
var bindHandlers = function(){ // to bind handlers for add page
o.simple_drop_down();
}
bindHandlers();
}
@@ -71,7 +75,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
this.initializeJournalPapers.coAuthorformCallback = function(data){
if(data.success){
o.notify(data.msg,"success");
o.sub_menu_item($("div[content-type=menu] a").eq(0));
o.sub_menu_item($("div[content-type=menu] a").eq(3));
}else{
o.notify(data.msg,"alert");
}
@@ -50,6 +50,7 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
content_tag(:a, t("edit"),
:class => "journal_paper_edit admbg2 admtxt",
:href => edit_panel_personal_journal_desktop_journal_page_path(publication),
"callback-method" => "editpaper",
"ajax-remote" => "get") + \
content_tag(:a, t("delete"),
"ajax-remote" => "delete",
@@ -1,3 +1,3 @@
<%= form_for @journal_co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: panel_personal_journal_desktop_journal_co_author_path(@journal_co_author) do |f| %>
<%= render partial: 'panel/personal_journal/desktop/journal_co_authors/form', locals: {:f => f} %>
<%= render partial: 'form', locals: {:f => f} %>
<% end %>
@@ -1,3 +1,3 @@
<%= form_for @journal_co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"journalCoAuthorformCallback"} , url: panel_personal_journal_desktop_journal_co_authors_path do |f| %>
<%= render partial: 'panel/personal_journal/desktop/journal_co_authors/form', locals: {:f => f} %>
<%= form_for @journal_co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: panel_personal_journal_desktop_journal_co_authors_path do |f| %>
<%= render partial: 'form', locals: {:f => f} %>
<% end %>
@@ -227,6 +227,19 @@
</div>
</div>
<script>
$(document).ready(function(){
$("#writing_conference_author_tokens").tokenInput("/panel/personal_conference/desktop/conference_pages/new.json", {
crossDomain: false,
prePopulate: $("#writing_conference_author_tokens").data("pre"),
theme: "facebook",
hintText: "<%=t("hintText")%>",
noResultsText: "<%=t("noResultsText")%>",
searchingText: "<%=t("searchingText")%>"
});
});
</script>
<script type="text/javascript">
orbitDesktop.prototype.initializeJournalPapers.journal_title_autocomplete_list = <%= @journal_candidate.to_json.html_safe %>;
// orbitDesktop.prototype.initializeJournalPapers.coauthor_autocomplete_list = <%= @co_author_candidate.to_json.html_safe %>;
@@ -1,3 +1,3 @@
<%= form_for @writing_journal, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_journal_desktop_journal_page_path(@writing_journal) do |f| %>
<%= render partial: 'panel/personal_journal/desktop/journal_pages/form', locals: {:f => f} %>
<%= form_for @writing_journal, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"addpaper"}, url: panel_personal_journal_desktop_journal_page_path(@writing_journal) do |f| %>
<%= render partial: 'form', locals: {:f => f} %>
<%end%>