Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

added $index value in the binding context of foreach templates. #182

Merged
merged 14 commits into from Mar 23, 2012
Commits on Oct 22, 2011
  1. comments.

    barkmadley committed Oct 22, 2011
Commits on Oct 24, 2011
  1. we need to create the new indices by tracking added and retained node…

    barkmadley committed Oct 24, 2011
    …s, using i is insufficient.
  2. finally cracked it. the problem was duplicate context creation.

    barkmadley committed Oct 24, 2011
    it is also necessary to perform double buffering of the stored contexts such
    that we do not overwrite new nodes or move new nodes by mistake.
Commits on Oct 27, 2011
  1. Merge branch 'master' into foreach-context-index

    barkmadley committed Oct 27, 2011
    * master:
      More indentation tweaks for tidiness
      Update the build
      Minor indentation tweaks
      Stylistic tweaks to previous commit
      Eliminate redundant IE6/7 workarounds for radio/checkbox issues. These problems no longer apply now that bindings are always applied to elements after they've been put into the DOM. Fixes issue #169
      Refactor bad code
      minor fix
      Fix render array with \"undefined\" and \"null\" items in \"foreach\"  template
      Updated remove and removeAll to modify their underlying arrays rather than creating new arrays. This makes them consistent with the rest of the array write functions. Added tests to verify original array is modified. Also added test to verify there is no notification when nothing is removed.
      changing IE detection to not rely on user agents
      Fixed a variable which should not have been global.
Commits on Dec 22, 2011
  1. Merge branch 'master' into foreach-context-index

    Mark Bradley committed Dec 22, 2011
    Conflicts:
    	spec/templatingBehaviors.js
    	src/binding/editDetection/arrayToDomNodeChildren.js
    	src/templating/templating.js
  2. Merge branch 'master' into foreach-context-index

    Mark Bradley committed Dec 22, 2011
Commits on Feb 23, 2012
  1. Merge barkmadley:foreach-context-index into 182-foreach-index

    mbest committed Feb 23, 2012
    Conflicts:
    	spec/templatingBehaviors.js
    	src/templating/templating.js
  2. Continuation of #182 - Simplify by having setDomNodeChildrenFromArray…

    mbest committed Feb 23, 2012
    …Mapping manage the observable index.
Commits on Feb 25, 2012
  1. foreach $index: fix spec that failed in IE; help performance a bit

    mbest committed Feb 25, 2012
    renderTemplateForEach now assumes that setDomNodeChildrenFromArrayMapping will call the mapping callback and then the afterAdding callback once for each new or changed item. Modify specs to verify this behavior.
  2. Extend the specs for setDomNodeChildrenFromArrayMapping to include re…

    mbest committed Feb 25, 2012
    …placing a value through an observable item.