From 5d7660015450acda64b504e7f32a8a980209f5eb Mon Sep 17 00:00:00 2001 From: devin Date: Thu, 6 Dec 2012 06:12:25 +0800 Subject: [PATCH] view update --- .../javascripts/desktop/journal_pages.js.erb | 14 ++++--- app/assets/stylesheets/desktopmain.css | 37 ++++++++++++++++++- .../co_author_relations/_form.html.erb | 8 ++-- .../co_author_relations/_show_form.html.erb | 24 ++++++++---- .../co_author_relations/index.html.erb | 35 ++++++++++-------- 5 files changed, 84 insertions(+), 34 deletions(-) diff --git a/app/assets/javascripts/desktop/journal_pages.js.erb b/app/assets/javascripts/desktop/journal_pages.js.erb index 82911584..a3880acc 100644 --- a/app/assets/javascripts/desktop/journal_pages.js.erb +++ b/app/assets/javascripts/desktop/journal_pages.js.erb @@ -282,15 +282,17 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // }) $("div[container=true]").unbind(".editype").on("click.edittype", "a.bt-edit-type", function(){ var parent = $(this).parent().parent(); + parent.find('.list_item_function').hide(); $.ajax({ url : $(this).attr("href"), type : "get", success : function(data){ - var prev_data = parent.find("td.form_space").html(); - parent.find("td.form_space").html(data); + var prev_data = parent.find(".form_space").html(); + parent.find(".form_space").html(data); $(".bt-cancel-type").click(function(){ - parent.find("td.form_space").html(prev_data); - }) + parent.find(".form_space").html(prev_data); + parent.find('.list_item_function').show(); + }); } }) return false; @@ -361,7 +363,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // this.initializeJournalPapers.coauthorRelationForm = function(data){ if(data.success){ o.notify(data.msg,"success"); - $("#co_author_relation_table tbody").html(data.newvalue); + $("#co_author_relation_table").html(data.newvalue); }else{ o.notify(data.msg,"alert"); } @@ -369,7 +371,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // this.initializeJournalPapers.coauthorRelationEditForm = function(data){ if(data.success){ o.notify(data.msg,"success"); - $("#co_author_relation_table tbody").html(data.newvalue); + $("#co_author_relation_table").html(data.newvalue); }else{ o.notify(data.msg,"alert"); } diff --git a/app/assets/stylesheets/desktopmain.css b/app/assets/stylesheets/desktopmain.css index 46543013..48fd709c 100644 --- a/app/assets/stylesheets/desktopmain.css +++ b/app/assets/stylesheets/desktopmain.css @@ -126,7 +126,7 @@ a:focus { outline: none; } .ini_input { margin: 0; padding: 0; - border: none; + border: 0; } .ini_input:focus { outline: none; } #search_app { @@ -293,7 +293,7 @@ a:focus { outline: none; } position: relative; z-index: 9; } -.toolbar .sdm, .toolbar .fn_g { display: inline-block; } +.toolbar .sdm, .toolbar .fn_g { display: inline-block; vertical-align: top; } .toolbar .sdm_o { top: 36px; background-color: #f0f0f0; } .toolbar button { border: none; @@ -306,6 +306,7 @@ a:focus { outline: none; } } .toolbar .fn_btn { display: inline-block; + vertical-align: top; } /* Setting Page */ @@ -815,6 +816,38 @@ a:focus { outline: none; } line-height: 24px; color: #333; } +/* Journal Co-Author Relationship*/ +#co_author_relation_table .s_grid_con { + float: left; + width: 346px; + height: 456px; + margin-left: 12px; + padding-left: 12px; + border-left: solid 1px #EEE; +} +#co_author_relation_table .s_grid_con:first-child { + margin-left: 0; + padding-left: 0; + border: 0; +} +#co_author_relation_table .s_grid_row { + width: auto; + height: 64px; +} +#co_author_relation_table .edit_co_author_relation { + margin-left: -10px; +} +#co_author_relation_table .list_item_function a { + display: inline-block; + padding: 4px; + font-family: Arial, sans-serif; + font-size: 11px; +} +#co_author_relation_table .form_space { + margin-bottom: 10px; + font-size: 15px; + font-family: Arial, sans-serif; +} /* App */ .app_frame { diff --git a/app/views/desktop/co_author_relations/_form.html.erb b/app/views/desktop/co_author_relations/_form.html.erb index 11a2944f..83be814e 100644 --- a/app/views/desktop/co_author_relations/_form.html.erb +++ b/app/views/desktop/co_author_relations/_form.html.erb @@ -1,5 +1,5 @@ -<%= f.text_field :relation %> -<%= f.submit "Save" %> +<%= f.text_field :relation, class: "ini_input" %> +<%= f.submit "Save", class: "ini_input hp hh2 thmtxt thmc2", style: "margin-left: 10px;" %> <% if not @co_author_relation.new_record? %> - <%= submit_tag "Cancel", :type => "button", class: "bt-cancel-type" %> -<% end %> \ No newline at end of file + <%= submit_tag "Cancel", :type => "button", class: "bt-cancel-type ini_input hp hh2 thmtxt" %> +<% end %> diff --git a/app/views/desktop/co_author_relations/_show_form.html.erb b/app/views/desktop/co_author_relations/_show_form.html.erb index 9b478f90..a5d931a0 100644 --- a/app/views/desktop/co_author_relations/_show_form.html.erb +++ b/app/views/desktop/co_author_relations/_show_form.html.erb @@ -1,7 +1,17 @@ - <% @co_author_relations.each do |co_author_relation| %> - - <%= co_author_relation.relation %> - <%= link_to 'Edit', edit_desktop_co_author_relation_path(co_author_relation), :class => "bt-edit-type" %> - <%= link_to 'Destroy', desktop_co_author_relation_path(co_author_relation), confirm: 'Are you sure?', method: :delete, :class=>"bt-delete" %> - - <% end %> + <% @co_author_relations.each_with_index do |co_author_relation,i| %> + <% if ( i % 6 ) == 0 %> +
+ +
+ <% end %> + <% end %> \ No newline at end of file diff --git a/app/views/desktop/co_author_relations/index.html.erb b/app/views/desktop/co_author_relations/index.html.erb index cc37e6a5..d457cbee 100644 --- a/app/views/desktop/co_author_relations/index.html.erb +++ b/app/views/desktop/co_author_relations/index.html.erb @@ -1,17 +1,22 @@ -

Listing co_author_relations

+
+
+
+
Create
+
+
    +
  • <%= render 'new' %>
  • +
+
+
+ <%= submit_tag "Back", :type => "button", class: "bt-cancel fn_btn ini_input hp hh2 thmtxt" %> +
+
-<%= submit_tag "Back", :type => "button", class: "bt-cancel fn_btn hh2 thmc2 thmtxt" %> -<%= render 'new' %> - - - - - - - - - - +
+
+
+
<%= render :partial => 'show_form'%> -
-
Relation
+ + +