inveniosoftware/invenio — pull request #1893 by kneczaj (2014-07-03 14:31:15+00:00)
Title: WIP fieldlist separation

During development of import functionality for deposit in inspire, I found out that it would be easier to have a more direct access to former fieldlist jQuery plugin. The plugin takes care of dynamic field lists like the list of authors in the deposit form.

After the RFC made here: https://github.com/inveniosoftware/invenio/issues/1775 I decided to separate the plugin to an external file. Its name was changed to "DynamicFieldList", what is a proposition, and may better describe the functionality.

The first commit https://github.com/kneczaj/invenio/commit/5579d8d7ad1461f6bbb7cf6f486e4ed6530db91a was tested sligthly - without copy-paste functionality, and it works.

As there is little documentation, I had some problems with using original `append_element()` function of the plugin with value initialization, also described in the RFC above. I decided to make a function `set_fields_values()` which seems to be more simple and straightforward. I would like to substitute `update_element_values()` with it after tests. I am also not sure if there's a need of having append_element() function with initialization inside. In the second commit, I removed this functionality.

Can you tell me what do you think about the changes? If they are ok, I will move `set_fields_values()` code to `update_element_values()` and adapt the rest of code to it.

@jirikuncar @lnielsen-cern