# HG changeset patch
# User Chris Cannam
# Date 1314197095 -3600
# Node ID a434a588f16c15470314bcec7068fc0f4dee3703
# Parent e9cdf1e676a84096683488dfb41a8dce71fe84ea
More layout fixes
diff -r e9cdf1e676a8 -r a434a588f16c vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml
--- a/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml Wed Aug 24 15:19:33 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml Wed Aug 24 15:44:55 2011 +0100
@@ -18,23 +18,23 @@
-
-
+
+
-
+
-
+
-
+
<%= button_to_function l(:label_save_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
<%= link_to_remove_fields l("remove_author"), f %>
+
diff -r e9cdf1e676a8 -r a434a588f16c vendor/plugins/redmine_bibliography/app/views/publications/_list_projects.html.erb
--- a/vendor/plugins/redmine_bibliography/app/views/publications/_list_projects.html.erb Wed Aug 24 15:19:33 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/_list_projects.html.erb Wed Aug 24 15:44:55 2011 +0100
@@ -1,1 +1,1 @@
-<%= render_projects_list(@publication) %>
\ No newline at end of file
+<%= render_projects_list(@publication) %>
diff -r e9cdf1e676a8 -r a434a588f16c vendor/plugins/redmine_bibliography/assets/javascripts/authors.js
--- a/vendor/plugins/redmine_bibliography/assets/javascripts/authors.js Wed Aug 24 15:19:33 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/assets/javascripts/authors.js Wed Aug 24 15:44:55 2011 +0100
@@ -1,58 +1,60 @@
function remove_fields(link) {
- $(link).previous("input[type=hidden]").value = "1";
- $(link).up(".fields").hide();
+ $(link).previous("input[type=hidden]").value = "1";
+ $(link).up(".fields").hide();
}
function add_fields(link, association, content) {
- var new_id = new Date().getTime();
- var regexp = new RegExp("new_" + association, "g")
- $(link).insert({
- before: content.replace(regexp, new_id)
- });
+ var new_id = new Date().getTime();
+ var regexp = new RegExp("new_" + association, "g")
+ $(link).insert({
+ before: content.replace(regexp, new_id)
+ });
}
function identify_author_status(status, object_id) {
- $('publication_authorships_attributes_' + object_id + '_edit_author_info').select('input').each(function(s) {
- if(status == "no"){
- s.value = "";
- s.readOnly = false;
- };
-
- if(status == "correct"){s.readOnly = false;};
- if(status == "yes"){s.readOnly = true;};
- });
+ $('publication_authorships_attributes_' + object_id + '_edit_author_info').select('input').each(function(s) {
+ if(status == "no"){
+ s.value = "";
+ s.readOnly = false;
+ };
+
+ if(status == "correct"){s.readOnly = false;};
+ if(status == "yes"){s.readOnly = true;};
+ });
}
function toggle_div(div_id){
- Effect.toggle(div_id, "appear", {duration:0.3});
+ Effect.toggle(div_id, "appear", {duration:0.3});
}
function toggle_input_field(field){
- if(field.classNames().inspect().include("readonly") == false){
- field.readOnly = true;
- field.addClassName('readonly').next('em').hide();
- } else {
- field.readOnly = false;
- field.removeClassName('readonly').next('em').show();
- };
+ if (field.classNames().inspect().include("readonly") == false){
+ field.readOnly = true;
+ field.addClassName('readonly');
+ } else {
+ field.readOnly = false;
+ field.removeClassName('readonly');
+ };
}
function toggle_edit_save_button(object_id){
- $button = $('publication_authorships_attributes_' + object_id + '_edit_save_button');
- if($button.value == "Save Author"){
- $button.value = "Edit Author";
- } else {
- $button.value = "Save Author";
- };
+ $button = $('publication_authorships_attributes_' + object_id + '_edit_save_button');
+ if ($button.value == "Edit author"){
+ $button.value = "Save author";
+ } else {
+ $button.value = "Edit author";
+ };
}
function toggle_save_author(form_object_id, $this){
- $('publication_authorships_attributes_' + form_object_id + '_edit_author_info').select('input').each(function(s) {
- toggle_input_field(s, $this);
- });
-
- toggle_edit_save_button(form_object_id);
- toggle_div("publication_authorships_attributes_" + form_object_id +"_search_author");
+ $('publication_authorships_attributes_' + form_object_id + '_edit_author_info').select('input').each(function(s) {
+ toggle_input_field(s, $this);
+ });
+ $$('p.description').each(function(s) {
+ s.toggle();
+ });
+ toggle_edit_save_button(form_object_id);
+ toggle_div("publication_authorships_attributes_" + form_object_id +"_search_author");
}
function edit_author(form_object_id){
diff -r e9cdf1e676a8 -r a434a588f16c vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css
--- a/vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css Wed Aug 24 15:19:33 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css Wed Aug 24 15:44:55 2011 +0100
@@ -6,13 +6,21 @@
input.readonly {
border: none;
+ padding: 0;
+ margin: 0;
background-color: transparent;
}
-.tabular .identify_author label {
+.tabular .author_identify label {
font-weight: normal;
- float: inherit;
- text-align: inherit;
- margin-left: 0;
- width: computed;
}
+
+.tabular .author_edit p {
+ padding-bottom: 0;
+}
+
+.tabular .author_edit .description {
+ padding-top: 0;
+ font-style: italic;
+}
+
diff -r e9cdf1e676a8 -r a434a588f16c vendor/plugins/redmine_bibliography/config/locales/en.yml
--- a/vendor/plugins/redmine_bibliography/config/locales/en.yml Wed Aug 24 15:19:33 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml Wed Aug 24 15:44:55 2011 +0100
@@ -10,8 +10,8 @@
identify_author_question: Is the right person selected above?
identify_author_yes: "Yes"
- identify_author_correct: "Yes, but I need to correct some details"
- identify_author_no: "No"
+ identify_author_correct: "Yes, but I need to correct some details below"
+ identify_author_no: "No, the author was not found in the search"
label_all_publications: All Publications
label_all_publications_for_project: Publications associated with %{project}
@@ -41,7 +41,7 @@
label_add_another_author: "Add another author"
field_search_name: "Search by name"
field_search_results: ""
- label_save_author: "Save Author"
+ label_save_author: "Save author"
label_author_information: "Author Information"
remove_author: "Remove this author"