1. 21 Mar, 2018 22 commits
    • Ryan Herbert's avatar
      file form modal popup jstree · add3e7f4
      Ryan Herbert authored
      instead of having an instance of jstree for each file form, we can share
      the instance in a popup window.
      This is a step towards #2208
      See #3044
    • Ryan Herbert's avatar
      views/file/form.html remove form header · 5947155d
      Ryan Herbert authored
      we don't really need it anymore since we only have the one form for add
      and edit.
    • Ryan Herbert's avatar
      inline form labels · 0d7b009c
      Ryan Herbert authored
    • Ryan Herbert's avatar
      form_builder decrement index on delete · e96f0534
      Ryan Herbert authored
    • Ryan Herbert's avatar
      file/form.html add clear div before submit button · 493bfcc5
      Ryan Herbert authored
      forces a new line.
    • Ryan Herbert's avatar
      save space in forms · d9050574
      Ryan Herbert authored
      replaces fieldsets with divs and removes many legends in order to save
      space by eliminating the border of the fieldset.
      also removes some labels and displays form elements inline.
    • Ryan Herbert's avatar
      global and specific file set selection · 48fff7cd
      Ryan Herbert authored
      Reintroduces the file-specific set selection for file uploads. As
      expected the global selector will be applied to all files in the form.
      The two methods complement each other rather than override.
    • Ryan Herbert's avatar
      tokeniser.js file/form.html fix token deletion · ecfffead
      Ryan Herbert authored
      token deletion would remove the span and no longer display the token,
      but the hidden input which contains the values to be sent to the
      controller was not updated correctly and would require a new set to be
      added before containing the new value.
    • Ryan Herbert's avatar
      file form refactor set selection · 2046cc47
      Ryan Herbert authored
      One group of sets for all files in the form.
    • Ryan Herbert's avatar
      refactor file form add button · 365d954f
      Ryan Herbert authored
      There was too much happening in the onclick to keep it in the HTML. On
      top of needing to apply a selector with characters that re forbidden in
      HTML attributes.
      This refactor was necessary in order to check the value of the radio
      buttons that determine the file source. This way we can display the
      correct fields when adding a file form not matter which file source is
      currently selected.
    • Ryan Herbert's avatar
      jstree onload · ce0a52d1
      Ryan Herbert authored
      For clarity purposes we don't want the users to have to trigger the
      mouseover event in order to display the jstree file selector. So using
      the onload event is much better in that respect. Howver given the way
      these DOM elements are loaded, that event is not triggered by the
      browser. Therefore we need to trigger it ourselves.
      For this we need to target the specific DOM node we want the event to be
      triggered on since the 'load' event does not bubble, so triggering it on
      for instance the div with id "db_content" does not work for us.
    • Ryan Herbert's avatar
      refactor file source selection · 2d16e570
      Ryan Herbert authored
      same as for pre_process, we want to select it once and apply that rule
      to all samples in the form.
    • Ryan Herbert's avatar
      refactor pre_process to form-global selection · ea10cc44
      Ryan Herbert authored
      no longer using a pre_process selection for each sample. One selection
      affects each sample within the given form.
    • Ryan Herbert's avatar
      Refactor file controller and view · 98cc2238
      Ryan Herbert authored
      split the actual form part into a partial as with sample_sets, this
      allows us to have shorter files with less levels of indentation, making
      a little easier to read.
      also applies the multi-form naming convention so we can apply
      serializeObject to the form.
      refactors a couple elements from the controller into functions (such as
      validation and pre_process listing) to shorten the controller itself.
    • Ryan Herbert's avatar
      file/form.html fix autocomplete · 48aff172
      Ryan Herbert authored
      The data attribute 'group-ids' had not been altered to the generic
      attribute 'keys'  from the refactor to use with autocompletion on
    • Ryan Herbert's avatar
      vidjil.less, file/form.html sizing/token wrapping · a62ab504
      Ryan Herbert authored
      prevents the token div from expanding too much and allows the token
      spans to wrap within the parent div.
    • Ryan Herbert's avatar
      vidjil.less, file/form.html hide set input · baaf83e8
      Ryan Herbert authored
      Makes it look as though the tokens are inside some kind of textarea
      rather than a separate div from the input.
    • Ryan Herbert's avatar
      add delete button to set tokens · 02ec44e8
      Ryan Herbert authored
      so we can remove tokens if a mistake is made.
    • Ryan Herbert's avatar
      add 'tokens' for adding samples to sets · 951ebbc7
      Ryan Herbert authored
      rather than having a long string of id strings when adding a sample to
      multiple sets, we now have spans that represent the set id strings and
      the input is emptied after adding each set.
    • Ryan Herbert's avatar
      file/form.html fix autocomplete goup_ids · 50ed4eec
      Ryan Herbert authored
      missing = sign meant no groups were entered for the autocompleted field.
    • Ryan Herbert's avatar
      file/form.html fix file.id comparison on add · 15a6fa95
      Ryan Herbert authored
      when adding there is obviously no file object to check.
    • Ryan Herbert's avatar
      form.html add missing file form · a3acb705
      Ryan Herbert authored
      forgot to add the file after creating it for the previous commit