1. 21 Mar, 2018 8 commits
    • Ryan Herbert's avatar
      more consistent hidden fields · c0ef9cbe
      Ryan Herbert authored
      ensures that we always use the hidden attribute rather than "display:
      none" or a mix of both. The reason being is that setting an element to
      "display: none" will not allow it to be displayed by removing the hidden
      attribute.
      
      we have a css rule that applies "display: none" to elements that have
      the 'hidden' attribute.
      
      JQuery methods hide() and show() add and remove 'display: none'
      respectively so we need to steer clear of these methods since they will
      interfere with the behaviour of the 'hidden' attribute and the
      associated CSS.
      c0ef9cbe
    • 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.
      ce0a52d1
    • Ryan Herbert's avatar
      fix upload_field onchange · 7e871dda
      Ryan Herbert authored
      During refactoring this feature was broken, rendering uploads
      impossible, this reimplements the feature correctly and separates it
      into it's own function
      7e871dda
    • 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.
      2d16e570
    • 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.
      ea10cc44
    • Ryan Herbert's avatar
      file/form.html hidden fields div · 1fc95e27
      Ryan Herbert authored
      adapting to match what was done in the FormBuilder. This is was easier
      given the way the FormBuilder was implemented.
      1fc95e27
    • Ryan Herbert's avatar
      file form: file field onchange · cc889688
      Ryan Herbert authored
      the onchange callback used to set the value of the hidden field
      "filename" needed altering to fit the multi upload paradigm.
      cc889688
    • 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.
      98cc2238