Mercurial > hg > soundsoftware-site
comparison vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb @ 600:c3c1091639ad feature_36
Some JS changes to the behaviour of user/author selection interface.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Tue, 16 Aug 2011 17:38:30 +0100 |
parents | c6cfe1f2eac1 |
children | 1608b3cb50cd |
comparison
equal
deleted
inserted
replaced
598:c6cfe1f2eac1 | 600:c3c1091639ad |
---|---|
247 | 247 |
248 item = classname.find(value.split('_')[1]) | 248 item = classname.find(value.split('_')[1]) |
249 | 249 |
250 name_field = "publication_authorships_attributes_#{object_id}_name_on_paper".to_sym | 250 name_field = "publication_authorships_attributes_#{object_id}_name_on_paper".to_sym |
251 email_field = "publication_authorships_attributes_#{object_id}_email".to_sym | 251 email_field = "publication_authorships_attributes_#{object_id}_email".to_sym |
252 institution_field = "publication_authorships_attributes_#{object_id}_institution".to_sym | |
253 | |
254 yes_radio = "publication_authorships_attributes_#{object_id}_identify_author_yes".to_sym | |
252 | 255 |
253 respond_to do |format| | 256 respond_to do |format| |
254 format.js {logger.error { "JS" } | 257 format.js {logger.error { "JS" } |
255 render(:update) {|page| | 258 render(:update) {|page| |
256 page[name_field].value = item.name | 259 page[name_field].value = item.name |
257 page[email_field].value = item.mail | 260 page[email_field].value = item.mail |
261 page[institution_field].value = item.institution | |
262 | |
263 page[yes_radio].checked = true | |
264 page[name_field].disabled = true | |
265 page[email_field].disabled = true | |
266 page[institution_field].disabled = true | |
258 } | 267 } |
259 } | 268 } |
260 end | 269 end |
261 end | 270 end |
262 | 271 |