From 430981a534f9a7491729ae947eaa200172ee1f97 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Tue, 5 Mar 2013 12:14:10 +0800 Subject: [PATCH] checked back and cancel button of personal plugin and fixed journal co author save and update bug --- .../desktop/conference_pages.js | 124 ++++++++++++------ ...nference_co_author_relations_controller.rb | 6 +- .../conference_co_authors_controller.rb | 8 +- .../index.html.erb | 4 +- .../conference_co_authors/_form.html.erb | 4 +- .../conference_co_authors/index.html.erb | 2 +- .../desktop/conference_pages/_form.html.erb | 18 ++- .../desktop/conference_pages/index.html.erb | 2 +- .../desktop/conference_pages/new.html.erb | 2 +- .../desktop/conference_window.html.erb | 4 +- .../personal_journal/desktop/journal_pages.js | 12 -- .../journal_co_author_relations_controller.rb | 6 +- .../desktop/journal_co_authors_controller.rb | 10 +- .../_form.html.erb | 4 +- .../index.html.erb | 4 +- .../desktop/journal_co_authors/_form.html.erb | 6 +- .../desktop/journal_pages/_form.html.erb | 81 ++++++------ .../desktop/journal_pages/new.html.erb | 2 +- .../desktop/journal_window.html.erb | 2 +- 19 files changed, 173 insertions(+), 128 deletions(-) diff --git a/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/conference_pages.js b/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/conference_pages.js index fdf3c389..913011d8 100644 --- a/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/conference_pages.js +++ b/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/conference_pages.js @@ -1,58 +1,102 @@ -orbitDesktop.prototype.initializeConference = function(target,url,cache){ - - this.initializeConference.list = function(){ - var bindHandlers = function(){ - o.tinyscrollbar_ext({ - main : ".tinycanvas", - fill : ".list_t" - }) +orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){ // this init conference papers + this.initializeConferencePapers.formCallback = function(data){ + if(data.success){ + o.notify(data.msg,"success"); + o.sub_menu_item($("div[content-type=menu] a").eq(0)); + }else{ + o.notify(data.msg,"alert"); } - - - bindHandlers(); - } - this.initializeConference.addconference = function(){ - var bindHandlers = function(){ + this.initializeConferencePapers.list = function(){ // to open list part in conference papers page + var conferenceData; + var bindHandlers = function(){ // to bind handlers for list page o.simple_drop_down(); - - o.tinyscrollbar_ext({ - main: '.tinycanvas', - fill: '.s_grid_con' - }) } - bindHandlers(); - + var bindSecondaryHandlers = function(){ + $("#conference_p div#paper_list a.icon-check-empty").click(function(){ + if($(this).hasClass("icon-check-empty")){ + $(this).switchClass("icon-check-empty","icon-check",0); + } else if($(this) .hasClass("icon-check")) { + $(this).switchClass("icon-check","icon-check-empty",0); + } else if($(this).hasClass("icon-star")){ + $(this).removeClass("icon-star").addClass("icon-star-empty"); + } else if($(this).hasClass("icon-star-empty")){ + $(this).removeClass("icon-star-empty").addClass("icon-star"); + } + return false; + }) + } } - this.initializeConference.conference = function(){ - var bindHandlers = function(){ + this.initializeConferencePapers.paperDelete = function(data,dom){ + var parent = dom.parent().parent(); + if(data.success){ + parent.hide("slide",function(){parent.remove();}); + o.notify(data.msg,"success"); + } + } + this.initializeConferencePapers.addpaper = function(){ // to open add pages in conference papers page + var bindHandlers = function(){ // to bind handlers for add page o.simple_drop_down(); + $('#add_plugin_file a.add').click(function(){ + var new_id = $(this).prev().attr('value'); + var old_id = new RegExp("new_writing_conference_files", "g"); + $(this).prev().attr('value', parseInt(new_id) + 1); + var x = get_html(old_id,new_id); + var newfield = $(x); + $(this).parents('table').append(newfield); + newfield.find('.action a.delete').click(function(){ + newfield.remove(); + }); + return false; + }); - o.tinyscrollbar_ext({ - main: '.tinycanvas', - fill: '.s_grid_con' - }) + $('.action a.remove_existing_record').click(function(){ + $(this).next('.should_destroy').attr('value', 1); + $("tr#add_plugin_file_" + $(this).prev().attr('value')).hide(); + }); } - bindHandlers(); - } - this.initializeConference.coauthor = function(){ - var bindHandlers = function(){ + + this.initializeConferencePapers.conference = function(){ // to open add pages in conference papers page + var bindHandlers = function(){ // to bind handlers for add page o.simple_drop_down(); - - o.tinyscrollbar_ext({ - main: '.tinycanvas', - fill: '.s_grid_con' - }) + } - bindHandlers(); - } - - this.initializeConference.list(); + this.initializeConferencePapers.coAuthorformCallback = function(data){ + if(data.success){ + o.notify(data.msg,"success"); + o.sub_menu_item($("div[content-type=menu] a").eq(0)); + }else{ + o.notify(data.msg,"alert"); + } + } + this.initializeConferencePapers.coauthor = function(){ // to open add pages in coauthor page + var bindHandlers = function(){ // to bind handlers for add page + o.simple_drop_down(); + } + bindHandlers(); } + this.initializeConferencePapers.coauthorRelationForm = function(data){ + if(data.success){ + o.notify(data.msg,"success"); + $("#co_author_relation_table").html(data.newvalue); + }else{ + o.notify(data.msg,"alert"); + } + } + this.initializeConferencePapers.coauthorRelationEditForm = function(data){ + if(data.success){ + o.notify(data.msg,"success"); + $("#co_author_relation_table").html(data.newvalue); + }else{ + o.notify(data.msg,"alert"); + } + } +}; + diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb index bfc09055..c55186cb 100644 --- a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb @@ -25,7 +25,7 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController if @conference_co_author_relation.save newv = render_to_string partial: "show_form", object: @conference_co_author_relations - render json: {success: true, msg: "New Relation successfully saved!", newvalue: newv}.to_json + render json: {success: true, msg: t("create_success") , newvalue: newv}.to_json else error_msg = @conference_co_author_relation.errors.full_messages.join("
") render json: {success: false, msg: error_msg}.to_json @@ -37,7 +37,7 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController if @conference_co_author_relation.update_attributes(params[:conference_co_author_relation]) @conference_co_author_relations = ConferenceCoAuthorRelation.all newv = render_to_string partial: "show_form", object: @conference_co_author_relations - render json: {success: true, msg: "New Relation successfully updated!", newvalue: newv}.to_json + render json: {success: true, msg: t("update_success"), newvalue: newv}.to_json else error_msg = @conference_co_author.errors.full_messages.join("
") render json: {success: false, msg: error_msg}.to_json @@ -49,7 +49,7 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController @conference_co_author_relation.destroy reset_co_author_relation - render :json => {success: true, msg: "deleted successfully!"} + render :json => {success: true, msg: t("delete_success")} end private diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb index f371b7e7..ed8a3dc9 100644 --- a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb @@ -32,7 +32,7 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorsController < Applic @conference_co_author.name_id= current_user.id if @conference_co_author.save - render json: {success:true, msg: t('create.sucess.co_author')}.to_json + render json: {success:true, msg: t('create_success')}.to_json else error_msg = @conference_co_author.errors.full_messages.join("
") render json: {success: false, msg: error_msg}.to_json @@ -42,8 +42,8 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorsController < Applic def update @conference_co_author = ConferenceCoAuthor.find(params[:id]) - if @conference_co_author.update_attributes(params[:co_author]) - render json: {success:true, msg: t('update.sucess.co_author')}.to_json + if @conference_co_author.update_attributes(params[:conference_co_author]) + render json: {success:true, msg: t('update_success')}.to_json else error_msg = @conference_co_author.errors.full_messages.join("
") render json: {success: false, msg: error_msg}.to_json @@ -54,6 +54,6 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorsController < Applic @conference_co_author = ConferenceCoAuthor.find(params[:id]) @conference_co_author.destroy - render :json => {success: true, msg: "Co-author deleted successfully!"} + render :json => {success: true, msg: "delete_success"} end end diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb index 5cb7cf0d..53fc717f 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb @@ -1,14 +1,14 @@
-
Create
+
<%=t("add") %>
  • <%= render 'new' %>
- <%= submit_tag "Back", :type => "button", "ajax-remote" => "get", :href => panel_personal_conference_desktop_conference_co_authors_path, class: "bt-cancel fn_btn ini_input hp hh2 thmtxt" %> + <%= submit_tag t("back"), :type => "button", "ajax-remote" => "get", :href => panel_personal_conference_desktop_conference_co_authors_path, class: "bt-cancel fn_btn ini_input hp hh2 thmtxt" %>
diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/_form.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/_form.html.erb index 22efcbf5..7c694f2d 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/_form.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/_form.html.erb @@ -1,7 +1,7 @@
- <%= f.submit "Save", name: "commit", value: "Save", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %> - <%= submit_tag "Cancel", :type => "button", "ajax-remote" => "get", :href => panel_personal_conference_desktop_conference_co_authors_path, class: "bt-cancel fn_btn ini_input hp hh2 thmtxt" %> + <%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %> + <%= submit_tag t("back"), :type => "button", "ajax-remote" => "get", :href => panel_personal_conference_desktop_conference_co_authors_path, class: "fn_btn ini_input hp hh2 thmtxt" %>
diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/index.html.erb index ac2493b9..3ed92194 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/index.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/index.html.erb @@ -7,7 +7,7 @@
-
+
<% @conference_co_authors.each_with_index do |co_author,i| %>
    diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form.html.erb index 390762bd..163c2d3c 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form.html.erb @@ -1,6 +1,6 @@
    - <%= f.submit t("save"), name: "commit", value: "Save", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %> + <%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %> <% if not @writing_conference.new_record? %> <%= submit_tag t("cancel"), :type => "button", "ajax-remote" => "get", :href => panel_personal_conference_desktop_conference_pages_path, class: "ini_input hp hh2 thmadm thmtxt" %> <% end %> @@ -22,7 +22,14 @@
    -
    +
    +
    +
    +
    +
    +
    +
    +
    @@ -93,7 +100,7 @@ <%= label_tag("", t("personal_conference.url"), class: "s_grid_2 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_4 s_grid"%> -
    +
@@ -186,7 +193,7 @@ -
+
@@ -198,7 +205,8 @@
-
+
+
<%= stylesheet_link_tag "token-input-facebook" %> <%= javascript_include_tag :defaults, "jquery.tokeninput" %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb index efc225db..8d45a113 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb @@ -2,7 +2,7 @@
-
    + diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/new.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/new.html.erb index eb8f8751..4577fec0 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/new.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/new.html.erb @@ -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| %> - <%= render partial: 'panel/personal_conference/desktop/conference_pages/form', locals: {:f => f} %> + <%= render partial: 'form', locals: {:f => f} %> <%end%> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb index 303aa092..c8162953 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb @@ -13,8 +13,8 @@
      -
    • List
    • -
    • Add/Edit
    • +
    • List
    • +
    • Add/Edit
    • Conference
    • Co-Authors
    • Tags & Keywords
    • diff --git a/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js index d22c7c7b..c76885f5 100644 --- a/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js +++ b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js @@ -12,18 +12,6 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // var journalData; var bindHandlers = function(){ // to bind handlers for list page o.simple_drop_down(); - - // $("#journal_selection_options a").click(function(){ - // switch($(this).attr("href")){ - // case "all": - // $(".list_item_action > .icon-check-empty").switchClass("icon-check-empty","icon-check",0); - // break; - // case "none": - // $(".list_item_action > .icon-check").switchClass("icon-check","icon-check-empty",0); - // break; - // } - // return false; - // }) } var bindSecondaryHandlers = function(){ diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb index 22e42f22..d6b19b92 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb @@ -25,7 +25,7 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorRelationsController < Appl if @journal_co_author_relation.save newv = render_to_string partial: "show_form", object: @journal_co_author_relations - render json: {success: true, msg: "New Relation successfully saved!", newvalue: newv}.to_json + render json: {success: true, msg: "create_success", newvalue: newv}.to_json else error_msg = @journal_co_author_relation.errors.full_messages.join("
      ") render json: {success: false, msg: error_msg}.to_json @@ -37,7 +37,7 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorRelationsController < Appl if @journal_co_author_relation.update_attributes(params[:journal_co_author_relation]) @journal_co_author_relations = JournalCoAuthorRelation.all newv = render_to_string partial: "show_form", object: @journal_co_author_relations - render json: {success: true, msg: "New Relation successfully updated!", newvalue: newv}.to_json + render json: {success: true, msg: "update_success", newvalue: newv}.to_json else error_msg = @journal_co_author.errors.full_messages.join("
      ") render json: {success: false, msg: error_msg}.to_json @@ -49,7 +49,7 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorRelationsController < Appl @journal_co_author_relation.destroy reset_co_author_relation - render :json => {success: true, msg: "deleted successfully!"} + render :json => {success: true, msg: "delete_success"} end private diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_authors_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_authors_controller.rb index 6ddd86bd..e7f55774 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_authors_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_authors_controller.rb @@ -28,11 +28,11 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorsController < ApplicationC end def create - @journal_co_author = JournalCoAuthor.new(params[:co_author]) + @journal_co_author = JournalCoAuthor.new(params[:journal_co_author]) @journal_co_author.name_id= current_user.id if @journal_co_author.save - render json: {success:true, msg: t('create.sucess.co_author')}.to_json + render json: {success:true, msg: t('create_success')}.to_json else error_msg = @journal_co_author.errors.full_messages.join("
      ") render json: {success: false, msg: error_msg}.to_json @@ -42,8 +42,8 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorsController < ApplicationC def update @journal_co_author = JournalCoAuthor.find(params[:id]) - if @journal_co_author.update_attributes(params[:co_author]) - render json: {success:true, msg: t('update.sucess.co_author')}.to_json + if @journal_co_author.update_attributes(params[:journal_co_author]) + render json: {success:true, msg: t('update_success')}.to_json else error_msg = @journal_co_author.errors.full_messages.join("
      ") render json: {success: false, msg: error_msg}.to_json @@ -54,6 +54,6 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorsController < ApplicationC @journal_co_author = JournalCoAuthor.find(params[:id]) @journal_co_author.destroy - render :json => {success: true, msg: "Co-author deleted successfully!"} + render :json => {success: true, msg: "delete_success"} end end diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_form.html.erb index bffde52f..83808f89 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_form.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_form.html.erb @@ -5,7 +5,7 @@ value: (@journal_co_author_relation.co_author_relation_translations[locale] rescue nil) %> <#% 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 @journal_co_author_relation.new_record? %> - <%= submit_tag "Cancel", :type => "button", class: "bt-cancel-type ini_input hp hh2 thmtxt" %> + <%= submit_tag t("back"), :type => "button", class: "bt-cancel-type ini_input hp hh2 thmtxt" %> <% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb index ec6bf16a..51a4923c 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb @@ -1,14 +1,14 @@
      -
      Create
      +
      <%= t("add") %>
      • <%= render 'new' %>
      - <%= submit_tag "Back", :type => "button", "ajax-remote" => "get", :href => panel_personal_journal_desktop_journal_co_authors_path, class: "fn_btn ini_input hp hh2 thmtxt" %> + <%= submit_tag t("back"), :type => "button", "ajax-remote" => "get", :href => panel_personal_journal_desktop_journal_co_authors_path, class: "fn_btn ini_input hp hh2 thmtxt" %>
      diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/_form.html.erb index 494b3df4..59ea94dc 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/_form.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/_form.html.erb @@ -1,7 +1,7 @@
      - <%= f.submit "Save", name: "commit", value: "Save", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %> - <%= submit_tag "Cancel", :type => "button", "ajax-remote" => "get", :href => panel_personal_journal_desktop_journal_co_authors_path, class: "fn_btn ini_input hp hh2 thmtxt" %> + <%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %> + <%= submit_tag t("back"), :type => "button", "ajax-remote" => "get", :href => panel_personal_journal_desktop_journal_co_authors_path, class: "fn_btn ini_input hp hh2 thmtxt" %>
      @@ -23,7 +23,7 @@
    • <%= f.label :type, class: "s_grid s_grid_2"%> - <%= options_for_select( @journal_co_author_relations.map do |relation| [relation.relation, relation.id] diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb index 6a30de41..ce8040cf 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb @@ -1,6 +1,6 @@
      - <%= f.submit t("save"), name: "commit", value: "Save", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %> + <%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %> <% if not @writing_journal.new_record? %> <%= submit_tag t("cancel"), :type => "button", "ajax-remote" => "get", :href => panel_personal_journal_desktop_journal_pages_path, class: "ini_input hp hh2 thmadm thmtxt" %> <% end %> @@ -22,7 +22,13 @@
      -
      +
      +
      +
      +
      +
      +
      +
      @@ -91,19 +97,19 @@
      • - <%= f.label :author_tokens, t("personal_journal.authors") %>
        - <%= f.text_area :author_tokens, - class: "s_grid_6 s_grid", - size: "20x2", - placeholder: t("personal_journal.authors"), - "data-pre" => generate_authors_name(@writing_journal.journal_co_author_ids) %> + <%= f.label :author_tokens, t("personal_journal.authors") %>
        + <%= f.text_area :author_tokens, + class: "s_grid_6 s_grid", + size: "20x2", + placeholder: t("personal_journal.authors"), + "data-pre" => generate_authors_name(@writing_journal.journal_co_author_ids) %> <%#= f.fields_for :authors_translations do |f| %> <%#= f.text_area locale, - class: "s_grid_6 s_grid", - size: "20x2", - placeholder: t("personal_journal.authors"), - "autocomplete-list" => "coauthor_autocomplete_list", - value: (@writing_journal.authors_translations[locale.to_s] rescue nil) %> + class: "s_grid_6 s_grid", + size: "20x2", + placeholder: t("personal_journal.authors"), + "autocomplete-list" => "coauthor_autocomplete_list", + value: (@writing_journal.authors_translations[locale.to_s] rescue nil) %> <%# end %>
      • @@ -115,20 +121,18 @@ @author_types.map do |author_type| [author_type.title, author_type.id] end - ) - %> - + )%> + - - + +
      • <%= label_tag("", t("personal_journal.publication_date"), class: "s_grid_3 s_grid") %> <%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_1 s_grid'} %> @@ -147,12 +151,11 @@ <%= f.select :language, WritingJournal::LANGUAGE_TYPES, class: "s_grid s_grid_4" %> - -
      • + -
      • -
      • >
      • - +
      • + > +