Brad Dunbar
56e3221325
Tweak fixture attachment.
2013-11-19 17:37:09 -05:00
kupriyanenko
ba9eeb52ba
Add support for runnig tests with jQuery-compatible libraries
2013-11-18 00:32:20 +02:00
Adam Krebs
866b84d9a9
remove jQuery-specific selector
2013-09-16 11:01:58 -04:00
Adam Krebs
2bd5df99c5
remove $(document).ready(...) from tests
2013-09-16 10:51:32 -04:00
Brad Dunbar
51eed189bf
Dispense with View#options merging.
2013-04-09 09:38:23 -04:00
Brad Dunbar
a22cbc7f36
Fix #2458 - Options are not attached to views.
2013-04-08 13:58:15 -04:00
Jean Boussier
108e114bd1
Improve consistency: get rid of a zealous early error breaking apps in inconvenient ways
...
Since jQuery.on() and Backbone.Events.on are silently ignoring invalid callbacks,
Backbone.View.delegateEvents should too.
See #2184 for previous discussion about how Backbone is supposed to behave on obvious developer errors
2013-01-25 11:24:57 -05:00
Tim Griesser
c1e62cda99
removing view.make
2012-12-28 16:34:15 -05:00
Jeremy Ashkenas
1191640d84
Fixes #1363 , fixes #1461 , removes View#dispose, adds Events#listenTo and Events#stopListening, and implements View#remove in terms of those.
2012-12-11 13:41:39 -05:00
Adam Krebs
bc87c3fa46
add options function test
2012-11-27 11:22:19 -05:00
Tim Griesser
a96fe08f92
allowing events to be passed in view's options
2012-11-16 14:21:59 -05:00
Genadi Samokovarov
85a1e3ea5c
Use _.pick to simplify View#_configure
2012-10-22 12:51:43 +03:00
Brad Dunbar
7278dfbe7e
Use ok(false) instead of non-existent fail.
2012-10-08 09:33:45 -04:00
Radoslav Stankov
4a20d66f66
Check if model/collection support .off when disposing of the view
2012-10-05 22:04:12 +03:00
Brad Dunbar
e2d5483616
Allow view.el to be provided as a function.
2012-10-01 15:39:02 -04:00
Brad Dunbar
3b08fb8c89
Remove dependencies on qunit html.
2012-09-07 08:00:04 -04:00
Genadi Samokovarov
e413f63a4b
Refactor test/view.js
2012-09-06 15:06:17 +03:00
Brad Dunbar
33cdab412e
Drop doubled test prefixes.
2012-09-05 08:52:27 -04:00
Brad Dunbar
971a5fb383
Add View#dispose.
2012-08-15 16:31:43 -04:00
Brad Dunbar
281014319d
Tweak id/className test.
2012-08-08 11:40:54 -04:00
Genadi Samokovarov
51387ebc36
getValue for View::className and View::id
2012-08-02 01:18:46 +03:00
Brad Dunbar
10b3b38654
Remove accidental inclusion.
2012-06-21 14:21:59 -04:00
Brad Dunbar
5d3e441b82
Document test source.
2012-06-21 14:20:37 -04:00
Sam Breed
f4ebee0406
adding the expected argument to all tests
2012-06-02 18:07:11 -06:00
Brad Dunbar
70005fdd04
Update QUnit.
...
* Use `deepEqual` in place of `same`.
* Expect 0 tests where appropriate.
* Update view test to use #qunit-fixture.
* Remove `QUnit.config.reorder = false;`.
2012-05-02 20:54:27 -04:00
Brad Dunbar
5fc8005c83
Fix #1228 - tagName can be provided as a function.
2012-04-17 10:17:37 -04:00
Nicklas Ansman Giertz
d852c729df
Add a test case for cloning the attribute object
...
The problem is that the attribute object isn't cloned so when an ID is
set through the constructor attributes[id] will get set on all
subsequent objects as well.
2012-04-02 12:37:25 +02:00
Ben Orenstein
c7034b9735
Let make take other falsy values for content.
2012-03-21 17:21:16 -04:00
Ben Orenstein
69d2c50640
Allow make to take an argument of 0.
2012-03-21 17:07:32 -04:00
Aidan Feldman
f49969014c
clean up tests to use fresh object instances for each run, and don't set
...
globals within test files
2012-03-12 04:27:22 -04:00
Brad Dunbar
6c392fa69a
Fix #986 - Undelegate events before changing el.
2012-02-27 15:01:05 -05:00
Brad Dunbar
f8b37a84b5
Add test for #1048 .
2012-02-27 14:23:49 -05:00
Brad Dunbar
397d11e340
equals is deprecated; use equal instead
...
http://docs.jquery.com/QUnit/equal#actualexpectedmessage
2012-01-17 23:52:12 -05:00
Jeremy Ashkenas
1c053d9f71
Fixes #567 ... Adds a view. for the jQuery cached reference to a view's element ... and this.setElement() as a way to easily change it, redelegating events.
2012-01-17 13:54:42 -05:00
Jeremy Ashkenas
93cb997fc3
removing overzealous events setting API.
2012-01-12 16:37:18 -05:00
Jeremy Ashkenas
feefb1c352
Merge pull request #815 from zowens/master
...
View Event Callbacks as Functions
2012-01-12 13:34:55 -08:00
Jeremy Ashkenas
cb7090db77
fixes #838 -- allow View#attributes to be defined as a function, as well as a value.
2012-01-11 16:47:50 -05:00
Zack Owens
b081fe87a5
view events can now be a function that returns an events object
2012-01-07 10:17:57 -05:00
Zack Owens
1c158747a0
allowing view events to be functions instead of simply names of properties on a view
2011-12-25 00:03:56 -05:00
Jeremy Ashkenas
9fc7443d34
merging in #758 -- although the API leaves something to be desired.
2011-11-23 17:32:04 -05:00
Les Hill
ef40512d84
Rename to undelegateEvents
...
As suggested by @jashkenas https://github.com/documentcloud/backbone/pull/620#issuecomment-2132400
2011-09-19 10:30:45 -07:00
Les Hill
1aaffa1302
Clear event callbacks with clearEvents
2011-09-18 23:29:51 -07:00
Jeremy Ashkenas
6bb43c1b81
fixes #244 -- allow View#events to be defined as a function, making it easier to call super.
2011-08-03 16:41:49 -04:00
Jeremy Ashkenas
e8476afef0
Issue #366 , support for namespaced events.
2011-05-24 13:07:11 -04:00
Jeremy Ashkenas
a5d01f91fe
fixing tests for IE / Webkit ... regex, not string match.
2011-05-23 09:50:26 -04:00
Jeremy Ashkenas
a5079aba1c
merging #179 + refactor, view 'attributes' for this.el
2011-02-07 16:10:08 -05:00
Jeremy Ashkenas
1c308280c8
Updating to latest QUnit, fixing Issue #153 ... overly aggressive urlError.
2010-12-30 12:15:02 -05:00
Jeremy Ashkenas
12f7ae9137
Merging Issue #149 . View#el can be a string.
2010-12-17 13:56:19 -05:00
Sam Stephenson
71c98381f0
If Backbone.View#el is a string, pass it through $(...).get(0) in _ensureElement
2010-12-17 12:33:12 -06:00
Sam Stephenson
34d1d0ac93
Multiple views may listen for events on the same element
2010-12-11 23:16:53 -06:00