fixed desktop several bug
This commit is contained in:
parent
f6272728d5
commit
806ffe0a1e
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
<li class="dock_item"><a callback-method='initializeJournalPapers' href="<%= panel_personal_journal_desktop_journal_window_path %>" class="widget_fn wh3 hh3" id='d_journal_p' custom-load="journal" onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a callback-method='initializeJournalPapers' href="<%= panel_personal_journal_desktop_journal_window_path %>" class="widget_fn wh3 hh3" id='d_journal_p' custom-load="journal" onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li>
|
||||||
|
|
||||||
<li class="dock_item"><a callback-method='initializeConference' href="<%= panel_personal_conference_desktop_conference_window_path %>" class="widget_fn wh3 hh3" id='d_conference_p' custom-load="conference" onclick="return false;"><span class="widget_icon"><img src="" alt="Conference Papers" id="conference_p_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a callback-method='initializeConferencePapers' href="<%= panel_personal_conference_desktop_conference_window_path %>" class="widget_fn wh3 hh3" id='d_conference_p' custom-load="conference" onclick="return false;"><span class="widget_icon"><img src="" alt="Conference Papers" id="conference_p_icon" width="30" height="30"/></span></a></li>
|
||||||
|
|
||||||
<li class="dock_item"><a callback-method='initializeBooks' href="<%= desktop_publications_books_path %>" class="widget_fn wh3 hh3" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a callback-method='initializeBooks' href="<%= desktop_publications_books_path %>" class="widget_fn wh3 hh3" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,11 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
|
||||||
o.notify(data.msg,"success");
|
o.notify(data.msg,"success");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.initializeConferencePapers.editpaper = function(){
|
||||||
|
o.highlight_sub_menu_item(1)
|
||||||
|
}
|
||||||
|
|
||||||
this.initializeConferencePapers.addpaper = function(){ // to open add pages in conference papers page
|
this.initializeConferencePapers.addpaper = function(){ // to open add pages in conference papers page
|
||||||
var bindHandlers = function(){ // to bind handlers for add page
|
var bindHandlers = function(){ // to bind handlers for add page
|
||||||
o.simple_drop_down();
|
o.simple_drop_down();
|
||||||
|
@ -63,7 +68,6 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
|
||||||
this.initializeConferencePapers.conference = function(){ // to open add pages in conference papers page
|
this.initializeConferencePapers.conference = function(){ // to open add pages in conference papers page
|
||||||
var bindHandlers = function(){ // to bind handlers for add page
|
var bindHandlers = function(){ // to bind handlers for add page
|
||||||
o.simple_drop_down();
|
o.simple_drop_down();
|
||||||
|
|
||||||
}
|
}
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
}
|
}
|
||||||
|
@ -71,7 +75,7 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
|
||||||
this.initializeConferencePapers.coAuthorformCallback = function(data){
|
this.initializeConferencePapers.coAuthorformCallback = function(data){
|
||||||
if(data.success){
|
if(data.success){
|
||||||
o.notify(data.msg,"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{
|
}else{
|
||||||
o.notify(data.msg,"alert");
|
o.notify(data.msg,"alert");
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@ module Panel::PersonalConference::Desktop::ConferencePagesHelper
|
||||||
content_tag(:a, t("edit"),
|
content_tag(:a, t("edit"),
|
||||||
:class => "journal_paper_edit admbg2 admtxt",
|
:class => "journal_paper_edit admbg2 admtxt",
|
||||||
:href => edit_panel_personal_conference_desktop_conference_page_path(publication),
|
:href => edit_panel_personal_conference_desktop_conference_page_path(publication),
|
||||||
|
"callback-method" => "editpaper",
|
||||||
"ajax-remote" => "get") + \
|
"ajax-remote" => "get") + \
|
||||||
content_tag(:a, t("delete"),
|
content_tag(:a, t("delete"),
|
||||||
"ajax-remote" => "delete",
|
"ajax-remote" => "delete",
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
value: (@conference_co_author_relation.relation_translations[locale] rescue nil) %>
|
value: (@conference_co_author_relation.relation_translations[locale] rescue nil) %>
|
||||||
<#% end %>
|
<#% end %>
|
||||||
-->
|
-->
|
||||||
<%= f.submit "Save", class: "ini_input hp hh2 thmtxt thmc2", style: "margin-left: 10px;" %>
|
<%= f.submit t("save"), class: "ini_input hp hh2 thmtxt thmc2", style: "margin-left: 10px;" %>
|
||||||
<% if not @conference_co_author_relation.new_record? %>
|
<% if not @conference_co_author_relation.new_record? %>
|
||||||
<%= submit_tag "Cancel", :type => "button", class: "bt-cancel-type ini_input hp hh2 thmtxt" %>
|
<%= submit_tag t("cancel"), "ajax-remote" => "get", :herf => panel_personal_conference_desktop_conference_co_author_relations_path ,:type => "button", class: "bt-cancel-type ini_input hp hh2 thmtxt" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<%= form_for @conference_co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"conferenceCoAuthorformCallback"} , url: panel_personal_conference_desktop_conference_co_authors_path do |f| %>
|
<%= form_for @conference_co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: panel_personal_conference_desktop_conference_co_authors_path do |f| %>
|
||||||
<%= render partial: 'form', locals: {:f => f} %>
|
<%= render partial: 'form', locals: {:f => f} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -213,6 +213,7 @@
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
$(function() {
|
$(function() {
|
||||||
$("#writing_conference_author_tokens").tokenInput("/panel/personal_conference/desktop/conference_pages/new.json", {
|
$("#writing_conference_author_tokens").tokenInput("/panel/personal_conference/desktop/conference_pages/new.json", {
|
||||||
crossDomain: false,
|
crossDomain: false,
|
||||||
|
@ -223,6 +224,7 @@
|
||||||
searchingText: "<%=t("searchingText")%>"
|
searchingText: "<%=t("searchingText")%>"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -231,21 +233,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('#add_plugin_file a.add').click(function(){
|
var get_html = function(old_id,new_id){
|
||||||
var new_id = $(this).prev().attr('value');
|
return ("<%= escape_javascript(add_attribute 'form_file', f, :writing_conference_files) %>").replace(old_id, new_id);
|
||||||
var old_id = new RegExp("new_writing_conference_files", "g");
|
}
|
||||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
|
||||||
var newfield = $(("<%= escape_javascript(add_attribute 'form_file', f, :writing_conference_files) %>").replace(old_id, new_id));
|
|
||||||
$(this).parents('table').append(newfield);
|
|
||||||
newfield.find('.action a.delete').click(function(){
|
|
||||||
newfield.remove();
|
|
||||||
});
|
|
||||||
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();
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<%= form_for @writing_conference, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_conference_desktop_conference_page_path(@writing_conference) do |f| %>
|
<%= form_for @writing_conference, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"}, url: panel_personal_conference_desktop_conference_page_path(@writing_conference) do |f| %>
|
||||||
<%= render partial: 'form', locals: {:f => f} %>
|
<%= render partial: 'form', locals: {:f => f} %>
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<%= form_for @writing_conference, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_conference_desktop_conference_pages_path do |f| %>
|
<%= form_for @writing_conference, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"}, url: panel_personal_conference_desktop_conference_pages_path do |f| %>
|
||||||
<%= render partial: 'form', locals: {:f => f} %>
|
<%= render partial: 'form', locals: {:f => f} %>
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,11 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||||
o.notify(data.msg,"success");
|
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
|
this.initializeJournalPapers.addpaper = function(){ // to open add pages in journal papers page
|
||||||
var bindHandlers = function(){ // to bind handlers for add page
|
var bindHandlers = function(){ // to bind handlers for add page
|
||||||
o.simple_drop_down();
|
o.simple_drop_down();
|
||||||
|
@ -63,7 +68,6 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||||
this.initializeJournalPapers.journal = function(){ // to open add pages in journal papers page
|
this.initializeJournalPapers.journal = function(){ // to open add pages in journal papers page
|
||||||
var bindHandlers = function(){ // to bind handlers for add page
|
var bindHandlers = function(){ // to bind handlers for add page
|
||||||
o.simple_drop_down();
|
o.simple_drop_down();
|
||||||
|
|
||||||
}
|
}
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
}
|
}
|
||||||
|
@ -71,7 +75,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||||
this.initializeJournalPapers.coAuthorformCallback = function(data){
|
this.initializeJournalPapers.coAuthorformCallback = function(data){
|
||||||
if(data.success){
|
if(data.success){
|
||||||
o.notify(data.msg,"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{
|
}else{
|
||||||
o.notify(data.msg,"alert");
|
o.notify(data.msg,"alert");
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
|
||||||
content_tag(:a, t("edit"),
|
content_tag(:a, t("edit"),
|
||||||
:class => "journal_paper_edit admbg2 admtxt",
|
:class => "journal_paper_edit admbg2 admtxt",
|
||||||
:href => edit_panel_personal_journal_desktop_journal_page_path(publication),
|
:href => edit_panel_personal_journal_desktop_journal_page_path(publication),
|
||||||
|
"callback-method" => "editpaper",
|
||||||
"ajax-remote" => "get") + \
|
"ajax-remote" => "get") + \
|
||||||
content_tag(:a, t("delete"),
|
content_tag(:a, t("delete"),
|
||||||
"ajax-remote" => "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| %>
|
<%= 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 %>
|
<% 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| %>
|
<%= 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: 'panel/personal_journal/desktop/journal_co_authors/form', locals: {:f => f} %>
|
<%= render partial: 'form', locals: {:f => f} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -227,6 +227,19 @@
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<script type="text/javascript">
|
||||||
orbitDesktop.prototype.initializeJournalPapers.journal_title_autocomplete_list = <%= @journal_candidate.to_json.html_safe %>;
|
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 %>;
|
// 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| %>
|
<%= 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: 'panel/personal_journal/desktop/journal_pages/form', locals: {:f => f} %>
|
<%= render partial: 'form', locals: {:f => f} %>
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
Loading…
Reference in New Issue