Commit Graph

2698 Commits

Author SHA1 Message Date
Adam Krebs
185c8df88f Fix unescaped script tag in backbone.localstorage. Closes #3379 2015-01-22 17:38:11 -05:00
robrobbins
a35d88ee81 listen for invalid, not error 2015-01-22 17:38:11 -05:00
Roma Matusevich
ece73c0148 Make backbone-min.js available for bower 2015-01-22 17:38:11 -05:00
Graeme Yeates
0ca71a150d Return the result of listenTo in listenToOnce 2015-01-22 17:38:11 -05:00
Justin Ridgewell
33f814a3f9 Off wrapping callback, not the original 2015-01-22 17:38:11 -05:00
Justin Ridgewell
9c297ed609 Test that listenToOnce is only called once 2015-01-22 17:38:11 -05:00
Justin Ridgewell
5ae9863e81 Remove duplicated tests 2015-01-22 17:38:11 -05:00
Adam Krebs
2b6cf704e4 remove double event binding. Simply stashing the original callback works as intended 2015-01-22 17:38:11 -05:00
Adam Krebs
19a37e8ee5 check for cleaned up references in listenToOnce with stopListening 2015-01-22 17:38:11 -05:00
Adam Krebs
9c8fd8c417 move listenTo and listenToOnce in with the rest of the Backbone Events code 2015-01-22 17:38:11 -05:00
Justin Ridgewell
55749e82d9 Invert the for loop 2015-01-22 17:38:10 -05:00
Justin Ridgewell
07913be4d5 Clean up references on both listener and listened objects 2015-01-22 17:38:10 -05:00
Justin Ridgewell
b19f087e25 Test both _listeningTo and _events are empty 2015-01-22 17:38:10 -05:00
Justin Ridgewell
ad0006f449 Remove duplicated context
We’re binding, no need to add a context to it.
2015-01-22 17:38:10 -05:00
Justin Ridgewell
e00dd73ff8 Register stopListening once instead of wrapping 2015-01-22 17:38:10 -05:00
Justin Ridgewell
00542f9d56 Return this from #listenTo 2015-01-22 17:38:10 -05:00
Adam Krebs
cb8cbf8949 de-duplicate some of the listenToOnce wrapCallback logic 2015-01-22 17:38:10 -05:00
Adam Krebs
1000f7c997 use clearer event names 2015-01-22 17:38:10 -05:00
Adam Krebs
d61ab4d2e9 implement listenToOnce via listenTo 2015-01-22 17:38:10 -05:00
Adam Krebs
a7587d7260 use on in all cases of listenTo 2015-01-22 17:38:10 -05:00
Adam Krebs
c942ce3705 fix listenToOnce with event maps 2015-01-22 17:38:09 -05:00
Adam Krebs
570a881d20 test for correct context in event maps 2015-01-22 17:38:09 -05:00
Jmeas
a7016ec1d7 Fixes listenToOnce memory leak. 2015-01-22 17:38:09 -05:00
Jmeas
ae3bf02e2f Failing spec for listenToOnce 2015-01-22 17:38:09 -05:00
Brad Dunbar
7ab8fead0e Don't check hash from iframe. 2015-01-22 17:38:09 -05:00
Morgan 'ARR\!' Allen
52416c15a2 fixed camel case filename for doc run script 2015-01-22 17:38:09 -05:00
Brad Dunbar
54108048a8 Transition with search params. 2015-01-22 17:38:09 -05:00
Brad Dunbar
ded60e4e8c Update trailing slash for search params. 2015-01-22 17:38:09 -05:00
Janas Page
a5d7b6300d Un-split infinitive [v 2]. 2015-01-22 17:38:08 -05:00
Janas Page
b7eeb0c851 Un-split an infinitive verb tense.
Just grammar.
2015-01-22 17:38:08 -05:00
Janas Page
a8f8e82a1d Hyphenate compound modifier.
It's a single adjective: the compound word "two-way" (as opposed to two adjectives: "two" and "way").
2015-01-22 17:38:08 -05:00
admangum
2878091da6 clone options passed to reset 2015-01-22 17:38:08 -05:00
Adam Krebs
342b24b9b3 don't just test for the presence of options, test that it points to the same object as passed in. 2015-01-22 17:38:08 -05:00
Hadrien Milano
b4f65f7aa1 fix wrong test: collection.model must be a function 2015-01-22 17:38:08 -05:00
Graeme Yeates
b93030b0d8 Use matches in .where 2015-01-22 17:38:08 -05:00
Hadrien Milano
5025d3ce71 fix flawed test 2015-01-22 17:38:08 -05:00
Brian Iversen
cd15abfd43 Update backbone.js comment for clarity
Fixed comment in backbone.js
2015-01-22 17:38:08 -05:00
Nick Stefan
d54a8a4901 removed the strong tags, but kept the "with" on 14 2015-01-22 17:38:07 -05:00
Nick Stefan
028fc59eb8 Update README to better match backbonejs.org
line 14 readme missing the word "with":
Backbone supplies structure to JavaScript-heavy applications by providing models key-value binding and custom events, collections...
--> on backbonejs.org reads as -->
Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections...

Also bolded models, views and collections just as they are on backbonejs.org
2015-01-22 17:38:07 -05:00
JD Isaacks
7e4f140072 Set correct number of assertions 2015-01-22 17:38:07 -05:00
JD Isaacks
63790cd1d6 Add test for negative indexes in at method 2015-01-22 17:38:07 -05:00
JD Isaacks
325a50f2bb Allow Collection.at to accept negative indexes
This allows you to do things like

```javascript
mycollection.at(-2) // get second to last, etc.
```
2015-01-22 17:38:07 -05:00
Adam Krebs
7554b2f01b draft changelog for backbone 1.2.0 2014-09-25 15:46:39 -04:00
Jeremy Ashkenas
c349965312 Merge pull request #3301 from AndrewEastwood/patch-1
Enhancing Model with isEmpty function
2014-09-23 15:37:45 -04:00
Adam Krebs
b966584356 Merge pull request #3039 from fastest963/master
Send correct 'at' when firing 'add' event
2014-09-11 13:45:42 -04:00
James Hartig
34e1a1e40c Send correct 'at' when firing 'add' event 2014-09-11 13:04:36 -04:00
Adam Krebs
fa69c207cd Merge pull request #3265 from tomascasas/bb-col-doc-update
Collection docs: models is not optional if options is passed in
2014-09-11 11:29:38 -04:00
Andrew Ivaskevych
a1b7ac32eb Adding the isEmpty function into the modelMethods 2014-09-09 18:03:55 +03:00
Andrew Ivaskevych
e6fa0e2aaa Enhancing Model with isEmpty function 2014-09-09 16:47:52 +03:00
Brad Dunbar
1dbe3ddf2f Merge pull request #3152 from braddunbar/ie6
Handle incorrect hash/search values in IE6.
2014-08-18 16:53:23 -04:00