Commit Graph

3342 Commits

Author SHA1 Message Date
John Boehr
e4939e4b5d Merge branch 'master' into private-listening-public-on 2017-04-04 14:28:17 -07:00
Olan Byrne
bd50e2e4a4 Clarifies that changes cause update event (#4123)
This fixes #4109 by indicating that any set on a model, which causes a
change event will results in the change event being bubbled up to the
collection.
2017-02-13 16:43:01 -05:00
Jeremy Ashkenas
4a02b5fc3d Merge pull request #4112 from amZotti/patch-1
Update LICENSE
2017-01-03 12:02:22 -05:00
Jeremy Ashkenas
7e4092d798 Merge pull request #4114 from marmeladze/patch-1
update (c)opywrite years
2017-01-03 12:01:44 -05:00
marmeladze
3141352b83 update years 2017-01-03 17:10:48 +04:00
Anthony Zotti
58e80f54e1 Update LICENSE 2017-01-01 04:56:53 -08:00
Charles Chan
6ee2547a4c Issue #4099 - Fix broken links for Jasmine and jQuery templates (#4110) 2016-12-30 12:52:32 -05:00
Jeremy Ashkenas
5162e49c37 Merge pull request #4111 from charleswhchan/fix-index.html
Fix description for Model
2016-12-28 17:13:14 -05:00
Charles Chan
c1fc9166e5 Fix description for Model
- Loads and saves [data] from the server.
2016-12-27 16:05:27 -08:00
ksladkov
7da4ed73e7 #4103 check if obj is Model in Collection.get (#4104) 2016-12-01 16:01:59 -05:00
Adam Krebs
df3366d492 Stop testing IE8 in sauce (#4008) 2016-11-29 12:55:40 -05:00
Jeremy Ashkenas
c3a829a91a Merge pull request #4091 from philfreo/patch-3
Docs capitalization consistency
2016-10-27 10:34:55 -04:00
Phil Freo
637a24e3df Docs capitalization consistency 2016-10-26 20:53:31 -04:00
Jeremy Ashkenas
09c8d72716 Merge pull request #4075 from msrose/docs-search
Add filtering to documentation
2016-09-16 11:17:47 -04:00
Michael Rose
ea34297329 Add filtering to documentation 2016-09-11 20:08:59 -07:00
Justin Ridgewell
96e94b3b6c Merge pull request #4061 from leebyron/iterable
Implements the JavaScript Iterable protocol.
2016-07-21 17:22:34 -04:00
Lee Byron
a2fc65b979 Implements the JavaScript Iterable protocol.
This introduces new methods related to Iterators on Backbone.Collection to mirror those found on Array: `values`, `keys`, `entries`, and `@@iterator`. Each of these methods will return a JavaScript Iterator, which has a `next` method, yielding the models or ids of models contained in the Collection.

The CollectionIterator is careful to use the `at()` and `modelId()` methods on the host collection rather than direct access to the `models` property, which should ensure it is resilient to creative subclassing of Backbone.Collection and future feature addition.

The [`@@iterator`](http://www.ecma-international.org/ecma-262/6.0/#sec-well-known-symbols) method is defined using `Symbol.iterator` if it exists in the JavaScript runtime (modern browsers/node.js) and falls back to the string `"@@iterator"` which was popularized by older versions of Firefox and has become the standard fallback behavior for other third-party libraries. This ensures that Backbone can still be used across all browsers, even with use of these new methods.

Supporting Iterable allows better integration between Backbone and the most recent additions to the JavaScript language, including `for of` loops and data-collection constructor functions, as well as better integration with other third-party libraries that accept Iterables instead of only Arrays.

Fixes #3954
2016-07-21 13:33:30 -07:00
Graeme Yeates
760ad49d1c Merge pull request #4055 from akre54/qunit2
Update to Qunit2
2016-07-05 12:38:46 -04:00
Adam Krebs
02891a2924 cleanup some automatic test failures, fix lint issues 2016-06-20 16:17:15 -04:00
Adam Krebs
55bab76349 Upgrade Qunit to 2.0, auto-convert tests using apsdehal/qunit-migrate 2016-06-20 16:04:30 -04:00
Adam Krebs
85b9774e90 Revert "Adding .gitattributes to force Unix line feeds" (#4045) 2016-06-13 14:22:51 -04:00
Kevin Partington
1bb06dba06 Adding .gitattributes to force Unix line feeds (#4036) 2016-06-09 15:28:35 -04:00
Justin Ridgewell
db9654ff5b Merge pull request #4037 from platinumazure/eslint-upgrade
Upgrade ESLint to latest and replace removed rules
2016-05-31 12:57:47 -04:00
Kevin Partington
09dfe9dbfd Upgrade ESLint to latest and replace removed rules 2016-05-27 20:42:11 -05:00
Graeme Yeates
45c69e2751 Merge pull request #4031 from leods92/patch-1
Fix changelog referring to wrong code change
2016-05-17 14:39:17 -04:00
Leonardo Schlossmacher
124097a141 Fix changelog referring to wrong code change 2016-05-17 19:52:05 +02:00
Graeme Yeates
6d7baae89b Merge pull request #4006 from jammon/docs_use_of_id
Clarification on the use of model.id
2016-05-06 13:55:15 -04:00
Graeme Yeates
e4c85afa6b Merge pull request #3827 from benmccormick/master
Add a preinitialize method to allow for true instance properties and ES6 classes
2016-05-06 13:10:30 -04:00
Justin Ridgewell
a530dbe3b9 Merge pull request #4026 from Flamefork/4025-encoded-fragment
Fixed updating URL with uri-decoded value
2016-05-06 13:03:00 -04:00
Ilia Ablamonov
57e89d86fa Fixed updating URL with uri-decoded value
Fixes #4025
2016-04-30 21:57:39 +04:00
Ben McCormick
f6d8c3e51d Add a preinitialize function to allow modifying Backbone objects before
instantiation logic is run.

This allows greater flexibility for several use cases including
- #3620
- #3685
- Easing use of ES6 classes with Backbone
2016-04-24 22:26:51 -04:00
Aleksandr
dbf8d978b0 Explicitly specified return value for findWhere if no model matches. (#4020) 2016-04-22 10:27:47 -04:00
Justin Ridgewell
b1ac2e4515 Merge pull request #4018 from emileber/mdn-link-fix
Fixed broken link to MDN array sort
2016-04-19 20:22:20 -07:00
ebergeron
8ad42e529e Fixed broken link to MDN array sort related to issue #3990 2016-04-19 22:15:31 -04:00
Rak
fe908db174 Update backbone.js
* Update backbone.js

 1 ) improve the patch method
 2 ) _.size is not nessesary, bool will be better
2016-04-07 08:59:56 -04:00
Adam Krebs
f5b8589eda update 1.3.3 release date and add note about upgrading from 1.3.x 2016-04-05 14:55:55 -04:00
Justin Ridgewell
8ec8860473 Merge pull request #3998 from jashkenas/1.3.3
Create 1.3.3 Release
1.3.3
2016-04-05 13:45:00 -04:00
Robillard, Steven
b8c054aec7 Re-minified and updated versions. 2016-04-05 13:39:15 -04:00
Graeme Yeates
85f86d7d61 Release v1.3.3 2016-04-05 13:39:15 -04:00
Graeme Yeates
c8757f471c Merge pull request #4000 from akre54/fix-globals
Fix failing global tests
2016-04-05 13:38:41 -04:00
Johannes Ammon
cecf1347fb Pointer to using model.set 2016-04-04 21:42:00 +02:00
Johannes Ammon
282ba68857 Clarification on the use of model.id 2016-04-04 21:18:44 +02:00
Adam Krebs
788dc91070 Remove test elements after insterting to fix failing global tests 2016-03-29 14:55:41 -04:00
Adam Krebs
a640b3bdd4 use _.indexOf instead of Array.prototype.indexOf in test. Fixes failing IE8 case 2016-03-29 14:50:06 -04:00
Adam Krebs
6b919eb061 Revert "Update index.html". "a SQL" -> "an SQL"
This reverts commit 96d81142f8.
2016-03-28 15:50:48 -04:00
Adam Krebs
5bc65ff3fc Merge pull request #3997 from zotherstupidguy/master
fix a typo
2016-03-28 12:01:46 -04:00
echo 'alias h4x="emacs -nw **/*"' ~/.zshrc; echo 'alias vim="h4x"' ~/.zshrc;echo 'alias emacs="h4x"' ~/.zshrc
96d81142f8 Update index.html 2016-03-28 17:36:24 +02:00
Adam Krebs
c4056792ed fix links to MDN docs. Addresses #3990 2016-03-16 16:45:55 -04:00
Justin Ridgewell
6595240268 Merge pull request #3978 from jridgewell/1.3.2-rc
Backbone 1.3.2
1.3.2
2016-03-12 12:09:37 -05:00
Justin Ridgewell
835b17ba46 Backbone 1.3.2 2016-03-12 12:08:51 -05:00