1. 11 Oct, 2015 2 commits
    • Pascal Hartig's avatar
      Merge pull request #1466 from davidrunger/remove-unneeded-logic · 828b6d1c
      Pascal Hartig authored
      Backbone: remove unneeded logic in todo View
      828b6d1c
    • David Runger's avatar
      Backbone: remove unneeded logic in todo View · 9e16caf8
      David Runger authored
      The removed check is unncecessary and also incorrectly implemented,
      resulting in a test failure (the "Editing should trim entered text"
      example) and flawed user interaction. This change results in 100%
      passing tests and the desired user interaction.
      
      Unneeded: the associated comment states that "Model values changes
      consisting of whitespaces only are not causing change to be triggered",
      and so the code manually triggers a change event when the only change to
      the todo is whitespace being added at the beginning and/or end of the
      todo. However, there is no need for the change event when this is the
      only change. So the situation described in the comment is not a problem.
      The change event triggers a re-rendering of the view, but if the only
      change is whitespace at the beginning or end, which is trimmed off,
      anyway, then re-rendering is pointless.
      
      Incorrectly implemented: The code in question is
      `this.model.trigger('change');`. This ultimately raises an error,
      because (perhaps surprisingly) when the 'change' event is manually
      triggered on a model, the model is not automatically bound as the so-to-
      speak "context" of that change. This can be corrected manually like so:
      `this.model.trigger('change', this.model);`. This eliminates the error
      and failing test case. However, as this code is not needed, anyway, of
      course it's better to simply remove it. :)
      9e16caf8
  2. 10 Oct, 2015 6 commits
  3. 09 Oct, 2015 3 commits
  4. 08 Oct, 2015 2 commits
  5. 07 Oct, 2015 2 commits
  6. 06 Oct, 2015 2 commits
  7. 05 Oct, 2015 1 commit
  8. 04 Oct, 2015 2 commits
  9. 03 Oct, 2015 2 commits
  10. 02 Oct, 2015 4 commits
  11. 29 Sep, 2015 3 commits
  12. 28 Sep, 2015 5 commits
  13. 27 Sep, 2015 2 commits
  14. 23 Sep, 2015 2 commits
  15. 21 Sep, 2015 2 commits