544 Commits

Author SHA1 Message Date
Igor Minar
f7a5f1788a fix($route): fix regex escaping in route matcher 2011-09-27 01:45:54 +02:00
Marcello Nuccio
b3ed7a8a7a 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:52:12 +02:00
Igor Minar
ea8952177e fix(test): improve $cookie service test to work with Safari 5.1
the max size for safari cookies has changed sligtly so I had to adjust
the test to make cookie creation fail on this browser
2011-09-02 10:05:06 -07:00
Igor Minar
e004378d10 feat($route): add reloadOnSearch route param to avoid reloads
In order to avoid unnecesary route reloads when just hashSearch part
of the url changes, it is now possible to disable this behavior by
setting reloadOnSearch param of the route declaration to false.

Closes #354
2011-08-19 12:05:52 -07:00
Karl Seamon
4ec1d8ee86 feat($xhr,$resource): expose response headers in callbacks
all $xhr*, $resource and related mocks now have access to headers from
their callbacks
2011-08-19 01:20:45 -07:00
Karl Seamon
c37bfde9eb fix($resource): properly call error callback when resource is called with two arguments 2011-08-19 01:17:20 -07:00
Vojta Jina
f6bcbb53f0 feat(test): toHaveBeenCalledOnce jasmine matcher 2011-08-19 01:17:09 -07:00
Igor Minar
4c8eaa1eb0 refactor(jqLite): remove jqLite show/hide support
it turns out that even with our tricks, jqLite#show is not usable in
practice and definitely not on par with jQuery. so rather than
introducing half-baked apis which introduce issues, I'm removing them.

I also removed show/hide uses from docs, since they are not needed.

Breaks jqLite.hide/jqLite.show which are no longer available.
2011-08-19 00:59:44 -07:00
Di Peng
6fb4bf4c54 fix(directives): make ng:class-even/odd work with ng:class
Closes #508
2011-08-19 00:14:05 -07:00
Di Peng
714759100c refactor(widgets): remove input[button, submit, reset, image] and button windgets
These widgets are useless and only trigger extra $updateViews.

The only reason we had them was to support ng:change on these widgets,
but since there are no bindings present in these cases it doesn't make
sense to support ng:change here. It's likely just a leftover from
getangular.com

Breaking change: ng:change for input[button], input[submit], input[reset], input[image]
and button widgets is not supported any more
2011-08-18 23:44:15 -07:00
Di Peng
05e2c3196c feat($browser): JSONP error handling
since we don't know if the error was due to a client error (4xx) or
server error (5xx), we leave the status code as undefined.
2011-08-18 23:33:32 -07:00
dandoyon
a01cf6d39e doc(typos): fix couple of typos in the docs
Minor documentation fixes. Should not be any code changes.
One test changed due to dependency on text in documentation.
2011-08-18 23:24:08 -07:00
Karl Seamon
b5594a773a feat($xhr): add custom error callback to $xhr, $xhr.cache, $xhr.bulk, $resource
Closes #408
2011-07-27 15:21:31 -07:00
Vojta Jina
f39420e7d7 style(): fix couple of missing semi-colons 2011-07-27 22:24:07 +02:00
Di Peng
f3e04fbd6a fix(ng:show/ng:hide): use jqLite.show/jqLite.hide
The previous implementation didn't handle situation when in css
something was hidden with a cascaded display:none rule and then we
wanted to show it.

Unfortunatelly our test doesn't test this scenario because it's too
complicated. :-/
2011-07-26 14:21:13 -07:00
Di Peng
31b59efa96 feat(number/currency filter): format numbers and currency using pattern
both numbers and currency need to be formatted using a generic pattern
which can be replaced for a different pattern when angular is working in
a non en-US locale

for now only en-US locale is supported, but that will change in the
future
2011-07-26 14:16:57 -07:00
Igor Minar
17251372b1 style(ng:options): fix style and some docs 2011-07-26 10:11:40 -07:00
Misko Hevery
f768954f38 fix(ng:options): add support for option groups
Closes# 450
2011-07-26 10:11:06 -07:00
Misko Hevery
3237f8b995 fix(directive): ng:options to support ng:change
Closes #463
2011-07-26 09:41:44 -07:00
Misko Hevery
7802c90e13 fix(directive): ng:options to support iterating over objects
Closes #448
2011-07-26 09:41:43 -07:00
Misko Hevery
c348f2cad6 fix(directive): ng:options incorrectly re-grew options on datasource change
Closes #464
2011-07-26 09:41:42 -07:00
Misko Hevery
f3456dc282 fix(directive): ng:options now support binding to expression
Closes #449
2011-07-26 09:41:41 -07:00
Misko Hevery
ee04141a5a style(warnings): prevent the browser from making bogus GET requests during tests 2011-07-26 09:40:29 -07:00
Misko Hevery
66fec10dc3 style(warnings): added missing semi colons 2011-07-26 09:40:29 -07:00
Di Peng
0782422d1f feat(angular.version): add angular.version
- placeholders are replaced with actual angular versions when doing
rake compile
2011-07-22 15:34:55 -07:00
Di Peng
3af1e7ca2e feat(filter.date): add support for default datetime formats in en
- add support for full,long, medium, short datetime formats in en

Breaks MMMMM. now we don't support MMMMM anymore as old implementation differs
from Unicode Locale Data format we are following.

- removed support for fullDateTime and fullTime as it means too much
trouble with full timeZone names
- added docs for the new features
2011-07-20 17:06:56 -07:00
Di Peng
0fbaa2f12a feat(TzDate): add mock "toString" method to TzDate.
- If the third param of TzDate constructor is defined, toStirng will
just return this third parameter. Otherwise, toString will still
be treated as unimplemented method
2011-07-20 16:50:44 -07:00
Igor Minar
3ea2416f80 Revert "fix(ng:class): preserve classes added post compilation"
This reverts commit 2428907259.

We decided to revert this because it is not bullet proof. The issue is
that we can't reliably have both angular and non-angular code in charge
of the DOM. We could work around some issues here and there, but we
can't do it reliably, so it's better not to support DOM manipulation
that happens outside of angular. There is a good chance that once we
integrate with MDVs our possition will change, but until then our
position is that only angular or angular widgets/directives can change
change DOM that was compiled.
2011-07-19 16:07:25 -07:00
Igor Minar
2b2df4754d feat($browser.$defer.cancel): support canceling defered tasks 2011-07-18 14:14:19 -07:00
Igor Minar
fe5240732d feat(strict mode): adding strict mode flag to all js files
the flag must be in all src and test files so that we get the benefit of
running in the strict mode even in jstd

the following script was used to modify all files:

for file in `find src test -name "*.js"`; do
  echo -e "'use strict';\n" > temp.txt
  cat $file >> temp.txt
  mv temp.txt $file
done
2011-07-18 12:12:55 -07:00
Igor Minar
4c6d26a38f fix(strict mode): fix all issues discovered by strict mode and unit/e2e tests 2011-07-18 12:12:54 -07:00
DiPeng
7974e7eb5f refactor($browser): hide startPoll and poll methods
Breaks $browser.poll() method is moved inline to $browser.startpoll()
Breaks $browser.startpoll() method is made private
Refactor tests to reflect updated browser API

Closes #387
2011-07-18 00:04:14 -07:00
Di Peng
83ac1193f2 style(jqLiteSpec): add space 2011-07-17 22:19:08 -07:00
Di Peng
7a3fdda965 feat(jqlite): added show(),hide() and eq() methods to jqlite
- add those three methods to jqlite
2011-07-17 22:19:08 -07:00
Di Peng
2428907259 fix(ng:class): preserve classes added post compilation
- make sure ng:class preserve classes added after compilation

Closes #355
2011-07-13 16:42:38 -07:00
Igor Minar
8a8a2cf462 refactor($browser.xhr): use $browser.addJs for JSONP
There is no reason why we shouldn't reuse $browser.addJs for JSONP
requests.
2011-07-13 16:21:08 -07:00
Igor Minar
47efe44a1d fix($browser.addJs): make addJs jQuery compatible
Change addJs implementation to avoid use of jQuery because of issues
that affect angular-ie-compat.js. See inlined comment for more info.
2011-07-13 16:21:08 -07:00
Igor Minar
c52e749a6e fix($browser.xhr): properly delete jsonp callbacks 2011-07-13 16:21:08 -07:00
Vojta Jina
ce80576e0b fix:jqLite: Set event.target on IE<8
IE<8's Event has not target property - it has srcElement property.
Fix that to be consistent as jQuery.
2011-07-12 23:04:46 -07:00
Vojta Jina
10da625ed9 fix:jqLite: Normalize non-existing attributes to undefined as jQuery
jqLite was returning null, but jQuery returns undefined
2011-07-12 23:04:46 -07:00
Vojta Jina
9ee9ca13da fix:jqLite: Fix binding to more events separated by space
The var eventHandler was defined outside forEach loop, so registering more
events caused calling listeners registered by the last one.

Regression:
elm.bind('click keyup', callback1);
elm.bind('click', callback2);
elm.bind('keyup', callback3);

Firing click event would have executed callback1, callback3 !
2011-07-12 23:04:46 -07:00
Igor Minar
bb39d34279 test(ng:repeat): add tests for $position for small arrays/objects 2011-07-12 22:49:12 -07:00
Igor Minar
30bd04feaa fix:exceptionHandler mock: should not specify dependencies
also added a test for this mock service
2011-07-01 18:17:54 -07:00
Igor Minar
75721223b5 fix:$browser mock: defer.flush() should flush all fns 2011-07-01 17:03:50 -07:00
Igor Minar
c5f3a413bc feat:$xhr: provide access to $xhr header defaults
$xhr header defaults are now exposed as $xhr.defaults.headers.common and
$xhr.default.headers.<httpmethod>. This allows applications to configure
their defaults as needed.

This commit doesn't allow headers to be set per request, only per
application. Per request change would require api change, which I tried
to avoid *for now*.
2011-06-30 00:34:50 -07:00
Igor Minar
d3fb5b411e fix:tests: replace angular.annotate with annotate
forgot to fix tests in 6aee2938a7
2011-06-27 22:41:49 -07:00
Di Peng
75bc59ee4b test:ng#class: added a better unit test for ng:class 2011-06-27 22:31:29 -07:00
Igor Minar
6aee2938a7 fix:testabilityPatch: remove annotate since it's not public 2011-06-27 16:46:29 -07:00
Di Peng
b5a510a343 feat:filter.date: add day/month string format support
Support new date format, specifically day of week/Month of year in string
e.g. {{ someDate | data:"EEE, MMM d, yyyy" }} -> "Wed, Jul 10, 2011"

Closes #396
2011-06-23 12:06:46 -07:00
Misko Hevery
9ec45ad5c4 fix🆖repeater - fix $position when collection size changes 2011-06-23 08:12:01 -07:00