Commit graph

622 commits

Author SHA1 Message Date
Igor Minar
bacc31bea9 fix(defer.cancel): should return false instead of undefined 2011-10-22 21:32:48 -07:00
Igor Minar
ad90c3574f feat($defer): add $defer.cancel
This functionality was previously available only as obscure $browser.defer.cancel.

I also added docs and tests and fixed an issue in .defer.cancel mock.
2011-10-22 21:32:48 -07:00
Vojta Jina
9b85757102 fix($location): rewrite links with nested elements
For example:
<a href="some/link">inner <span>text</span></a>

If you click on "text", then the span element is event.target, so we need to traverse the DOM.
2011-10-22 15:35:18 -07:00
Igor Minar
c6c3949b14 feat(filter.date): use mediumDate as default
Breaking change!

Previously the default was fullDate.
2011-10-20 16:51:28 -07:00
Igor Minar
e175db37c6 fix(date filter): default to fullDate format
The browser's behave inconsistently, so we should just stick to one format
when the format is not specified by the developer

Closes #605
2011-10-20 16:51:28 -07:00
Igor Minar
f38010d3a2 fix(compiler): revert 8611ebe6 - calling \$digest after linking
Change introduced by me in 8611ebe6 results in considerable inefficiencies when the compiler
and linker is used from within a widget, in which case, we call $digest unnecessary since it
will be called by the $apply which called the directive/widget in the first place.

There are only two places when the extra $digest call can be useful - when manually bootstrapping
the app or in tests. However even in tests this behavior can result in unwanted results (especially
when ng:controller is involved). So it is better to leave it for the developer to call $digest
when it is really needed.
2011-10-20 15:51:14 -07:00
Misko Hevery
7fc18b263d fix(radio): allows data-binding on value property. Closes#316 2011-10-20 11:30:40 -07:00
TEHEK Firefox
3692885810 fix(ng:options): compile null/blank option tag
Fixes #562
2011-10-19 22:52:14 -07:00
Igor Minar
5d43439dbe fix(ng:pattern): correctly parse out inlined regexp 2011-10-19 21:52:20 -07:00
Konstantin Stepanov
78f394fd17 feat(input): add ng:minlength and ng:maxlength validation
notes(igor): I also e2e tests and refactorred the e2e test example to be
more clear about what is a variable and what is an html/framework api.
2011-10-19 16:49:20 -07:00
Konstantin Stepanov
e82e64d57b fix(input): recognize 'password' as an html input type 2011-10-19 10:36:36 -07:00
Igor Minar
833eb3c844 fix(ng:repeat): repeater should ignore $ and $$ properties 2011-10-18 17:27:43 -07:00
TEHEK Firefox
ee6af9a978 fix(ng:options): select correct element when '?'-option was previously selected
Closes #599
2011-10-18 14:02:54 -07:00
Igor Minar
d83a92c121 fix(checkbox): prefix true-value & false-value with ng: 2011-10-13 17:35:00 -07:00
Vojta Jina
afc81b554e fix($location): do not rewrite link when meta key pressed 2011-10-13 11:10:19 -07:00
Misko Hevery
4af4378b11 fix(forms): broken tests on jQuery and ie8&9 2011-10-12 23:04:48 -07:00
Igor Minar
8611ebe6a0 fix(compiler): linking function should call $digest
The linked scope should be $digest-ed but only if a $digest isn't
already running on it.
2011-10-12 23:04:48 -07:00
Igor Minar
8f46a3c9ac fix(jqLite): attr for boolean attribute should lowercase value 2011-10-12 23:04:47 -07:00
Igor Minar
de4e06ed73 test(checkbox): add test for ng:change 2011-10-12 11:11:10 -07:00
Misko Hevery
fd822bdaf9 chore(formating): clean code to be function() { 2011-10-11 11:01:46 -07:00
Misko Hevery
4f78fd692c feat(forms): new and improved forms 2011-10-11 11:01:45 -07:00
Misko Hevery
e86c435349 refactor(bindings): remove the decoration of the DOM with errors.
Only $exceptionHandler gets notified now.
2011-10-11 10:53:07 -07:00
Misko Hevery
1942861472 refactor(hover): delete hover service 2011-10-11 10:53:06 -07:00
Misko Hevery
b96e978178 fix(jqlite): removeClass would clobber class names 2011-10-11 10:53:06 -07:00
Misko Hevery
bda2bba2be feat(jqlite): added .inheritedData method and $destroy event.
- refactored .scope() to use .inheritedData() instead.
- .bind('$destroy', callback) will call when the DOM element is removed
2011-10-11 10:53:05 -07:00
Misko Hevery
25a62b58db refactor(injection) infer injection args in ng:controller only
Because only controllers don't have currying, we can infer its arguments, all other APIs needing currying, automatic inference complicates the matters unecessary.
2011-10-11 10:53:04 -07:00
Misko Hevery
75f11f1fc4 feat(ng:repeat) collection items and DOM elements affinity / stability 2011-10-11 10:53:04 -07:00
Misko Hevery
e134a8335f fix(filter): make json filter ignore private properties 2011-10-11 10:53:03 -07:00
Dhruv Manek
e1ecc34edd fix(parser): Fix short circuit of logical AND and OR operators
Closes #433
2011-10-07 16:01:09 -07:00
TEHEK Firefox
c115fa9924 fix($limitTo): properly handle excessive limits
`angular.Array.limitTo`'s  result should not exceed original input array size

Closes #571
2011-10-05 11:01:32 -07:00
Igor Minar
ca1e45beaf fix(jqLite): css should convert dash-separated properties to camelCase
this fix is needed for Firefox or other browsers that strictly follow
dom/css spec which states that element.style should make properties
available in camelCased form.

Closes #569
2011-09-28 23:57:00 +02:00
Igor Minar
084b83ffa9 test(matchers): add toBeOneOf matcher 2011-09-27 21:48:47 +02:00
Marcello Nuccio
bf5e5f7bc9 fix($resource): action defaults should override resource defaults
defaults definned per action should take precedence over defaults
defined for the whole resource.

This is potentialy a BREAKING CHANGE in case someone relied on the buggy
behavior.
2011-09-27 00:44:10 +02:00
Igor Minar
2bc39bb0b4 fix($route): fix regex escaping in route matcher 2011-09-21 13:47:17 +02:00
Igor Minar
6883e8c7a0 feat(scenarioRunner): adding support for element().prop()
since jQuery 1.6.4 attr() focuses only on work with element attributes and doesn't deal well with element properties, so adding prop() support is required for getting many e2e tests to pass after upgrading the runner to jQuery 1.6.4.
2011-09-16 02:44:34 +02:00
Igor Minar
7ae536d053 fix(specs): various fixes to get IE8+jquery unit tests green 2011-09-16 02:44:33 +02:00
Igor Minar
2170c06924 fix(specs): fix jQuery to jqLite binding on IE8
It appears that this whole time all IE8 unit tests ran only with jqLite. Due to a weird bug in IE[1], we never overwrote jqLite implementation with jQuery, so the tests ran with our jqLite instead.

This affected only IE8 (and likely older) and only in unit testing mode. angular.js - the built artifact binds to jQuery just find.

[1] https://plus.google.com/104744871076396904202/posts/Kqjuj6RSbbT
2011-09-16 02:44:33 +02:00
Igor Minar
0e5a24c584 fix(specs): jQuery now returns attr name instead of true/false for special attrs
for special attrs like 'checked' or 'multiple', jquery now returns the name or undedefined.

e.g. foo.attr('checked') => 'checked' || undefined

The solution is a combination of updating our tests as well as switching
over to prop() instead which properly returns true/false
2011-09-16 02:44:32 +02:00
Igor Minar
4e8f0d6e9f fix($location) $location specs must unbind document listener
link rewriting used in html5 mode on legacy browsers binds to document.onClick - we need to destroy this listener after each test to prevent test collisions (global state is evil).
2011-09-16 02:44:31 +02:00
Igor Minar
3800d17703 feat(jqLite): add prop() support
since jQuery 1.6.4 prop() became very important because attr() does't have access to certain properties any more (e.g. className), so I'm adding it to jqLite as well so that jqLite preserves the feature-set it had before the jQuery upgrade.
2011-09-16 02:44:30 +02:00
Igor Minar
6b7ddf414d feat(jqLite): add support for unbind()
supports these invocation types:

- foo.unbind();
- foo.unbind('eventType');
- foo.unbind('eventType', fn);

more info: http://api.jquery.com/unbind/
2011-09-16 02:44:29 +02:00
Igor Minar
ab407de54d fix(jqLiteSpec): jQuery's css() getter works only for valid rules
foo.css('bogus', 'value')
foo.css('bogus') => null

so I had to change all tests to use valid css rules
2011-09-16 02:44:28 +02:00
Igor Minar
0d7fe97aff fix(jqLite): attr() should not special-case 'class' attribute
since jQuery 1.6 'class' is not treated specially, so we have to revert this fix and use className in tests instead
2011-09-16 02:44:28 +02:00
Igor Minar
a2a830e227 feat (jquery): upgrade everything to jQuery 1.6.4
Closes #556
2011-09-16 02:44:27 +02:00
Vojta Jina
4b4292edb8 style: fix some missing semi-colons and spaces, typos 2011-09-08 23:00:59 +02:00
Vojta Jina
66dec77555 fix(scenario): do not navigate if click event was cancelled
This is jQuery incompatible hack.
But we were doing monkey patching there anyway...

`$(...).trigger('click')` returns an array of return values, so that scenario
runner knows, whether the event default action was cancelled.

Without this fix, scenario runner was doing navigation even if JS code called
`event.preventDefault()`.

Note, this does not work in FF6
2011-09-08 23:00:59 +02:00
Vojta Jina
22cb600280 fix($route): update $route to reflect $location changes
* update $route to reflect new $location
* add some more unit tests to $route
* fix some other failing unit tests
* redirect overrides the url now

Breaks $route custom redirect fn has only 3 params now
2011-09-08 23:00:59 +02:00
Vojta Jina
5ba227c7cd feat($location): $location service with html5 history api support
See documentation of $location for more info

Breaks $location has no properties, only get/set methods

Closes #168
Closes #146
Closes #281
Closes #234
2011-09-08 23:00:49 +02:00
Vojta Jina
f37f0ea16e feat(jqLite): add event.isDefaultPrevented() as jQuery
Chrome's Event has defaultPrevented property, but other browsers haven't.
This is workaround for other browsers - same as jQuery.
2011-09-08 20:37:28 +02:00
Vojta Jina
91ccb4ba6e feat($browser): add $browser.baseHref()
This method abstracts <base href="" /> in document.head - returns the value.
If absolute href set, it converts the href to relative.
2011-09-08 20:37:28 +02:00