WebSubmit: Autocompeltion for authors

* Provides an author autocompletion facility for WebSubmit. (closes #2276)

* The author autocompletion interface can easily be configured for each
  submission.

* Author sources can be defined as plugins that return results in JSON.

* Author submission and modification are fully compatible with existing
  BibConvert templates.

* Uses typeahead.js <http://twitter.github.io/typeahead.js/>
  for autocompletion.

Co-authored-by: Harris Tzovanakis <charalampos.tzovanakis@cern.ch>
Co-authored-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
BibEdit: holding pen fix

* When merging a record with a template, if the record is a hp record
  make all its subfields volatile.

Reviewed-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: debugging all user actions

* On the client side, keeps all actions in a list.

* On the server side, when an exception occurs, the action list is
  displayed on top of the exception.

Co-authored-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: check for record in BibSched queue fix

* Considers all OAIID_TAG, not just the first one.

* Fixes problem when metadata contains regular expression special
  characters.

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: modal submission preview window

* Makes the submission preview window modal.

* Avoid double submission by disabling submit button on click.

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: InvalidCache exception on clone

* Catches InvalidCache exception on clone.

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: int object is not iterable fix

* Fixes "int object is not iterable" exception.

Signed-off-by: Alessio Deiana <alessio.deiana@cern.ch>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
WebStyle: req object with no headers

* When scripting, improve handling of mocked req objects
  by supporting cases when no headers are provided.

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibCatalog: requestor on ticket submit

* Passes requestor on ticket submit.

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibCatalog: better error reporting

* Reportis the error output from the RT CLI output when it fails.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: new RT ticket through UI dialog

* Creates a UI dialog on new ticket click. It contains a minimal form
  for quick submission of a new RT ticket.

* For chosen queues can produce template subject and content for the
  ticket, through the use of ticket templates plugin.

* Retrieves all needed information through an Ajax request.

Reviewed-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: duplicate code removal

* Removes duplicate code left-overs.

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: author names into history revisions

* Retrieves the author name for every revision of the record and
  displays it inside the history revision entry.

Reviewed-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: autocompletion of fields from KBs

* In CFG_BIBEDIT_AUTOCOMPLETE we declare for which fields data will be
  loaded from which Knowledge Base, in order to help user by
  autocompleting the value. Also we choose if the data will be loaded
  when page is loaded or when typing and how will be displayed.
  (closes #1258) (closes #73)

* addHandler_autocompleteAffiliations is replaced from a generic
  function that handles the behavior for any given tag.

* Handles both static and dynamic KBs

Reviewed-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: wrongly displayed HP changeset bug

* Fixes bug triggered When switching from table to marc view
  where cache was created again without adding  information
  about the disabled_hp_entries. As a result when record was
  retrieved again all HP changesets were displayed as non applied.

* Saves gDisabledHpEntries to the cache, when changing from
  marc to table view.

* Displays a message when user has applied a HP
  changeset, has not taken action for all changes
  and tries to switch to marc view.

Reviewed-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: user name in BibSched column

* Amends code to properly pass BibEdit user name information to
  BibSched.

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEditMulti: add email notification on submit

* Adds e-mail notification to users after submitting an update
  using the bibtask "email-logs-to" parameter.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: add email notification on submit

* Adds e-mail notification to users after submitting an update
  using the bibtask "email-logs-to" parameter.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: kwalitee improvements

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibEdit: only notifications on error

* Uses the new parameter available in BibTask to *only* send e-mail
  alerts if the upload task fails.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>