# HG changeset patch # User luisf # Date 1380127396 -3600 # Node ID 641ec1b288a6c6dcb403f1452348d63096a9428e # Parent cfa9122bb5845b8733654a5d98dea9d6a16d568c Added two new js scripts to initialize views (simulate clicks and adding events to buttons). diff -r cfa9122bb584 -r 641ec1b288a6 plugins/redmine_bibliography/assets/javascripts/edit_publication.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/redmine_bibliography/assets/javascripts/edit_publication.js Wed Sep 25 17:43:16 2013 +0100 @@ -0,0 +1,13 @@ +// edit_publication.js + +$(document).ready(function(){ + // shows the correct bibtex fields + $('#publication_bibtex_entry_attributes_entry_type').trigger('change'); + + // adds the events to the edit/save authorship button + $('.author_save_btn').live('click', disable_fields); + $('.author_edit_btn').live('click', enable_fields); + + // clicks all authorships + $('.author_save_btn').trigger('click'); +}); \ No newline at end of file diff -r cfa9122bb584 -r 641ec1b288a6 plugins/redmine_bibliography/assets/javascripts/new_publication.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/redmine_bibliography/assets/javascripts/new_publication.js Wed Sep 25 17:43:16 2013 +0100 @@ -0,0 +1,7 @@ +// edit_publication.js + +$(document).ready(function(){ + // adds the events to the edit/save authorship button + $('.author_save_btn').live('click', disable_fields); + $('.author_edit_btn').live('click', enable_fields); +}); \ No newline at end of file