Commit graph

40 commits

Author SHA1 Message Date
Igor Minar
84873e7f4e fix(angular-bootstrap): fix boostrap scripts that broke w\ 5a2dcb9a
Commit 5a2dcb9a doesn't properly modify angular-boostrap.js.

This fix resolves issues and makes both the regular and scenario
version of angular-boostrap.js functional.
2011-10-31 11:34:25 -07:00
Igor Minar
d7ba5bc83b feat(bootstrap): drop angular.js file name restrictions for autobind
The last script element in the dom is always us if the script that
contains angular is loaded synchronously.

For async loading manual bootstrap needs to be performed.

Close #621
2011-10-26 12:57:15 -07:00
Misko Hevery
4f78fd692c feat(forms): new and improved forms 2011-10-11 11:01:45 -07:00
Di Peng
e14ac2c3b0 style(bootstrap): fix some missing spaces 2011-09-13 01:02:23 +02:00
Di Peng
a13653c814 refactor(angular): externalize script load order into JSON
- move all script load order into angularFiles.js
- rakefile and angular-bootstrap.js use angularFiles.js to get script orders
- gen_jstd_configs.js uses angularFiles.js to generate various jstd config files
- run gen_jstd_configs.js whenever we run server.sh

Closes #470
2011-09-13 01:02:22 +02:00
Vojta Jina
d0f459c56f feat($sniffer): basic implementation of browser feature testing
This only extracts our 'hashchange' event and html5 history api detection from
$browser.

Closes #400
2011-09-08 20:37:28 +02:00
Misko Hevery
ad3cc16eef feat($route): add events before/after route change
BREAKING CHANGE
* removing `onChange`

FEATURE
* adding three events: $beforeRouteChange, $afterRouteChange, $routeReload
2011-08-31 14:31:23 -07:00
Di Peng
6802a76007 feat($locale): add default locale service for en-US 2011-08-14 23:44:20 -07:00
Misko Hevery
42062dab34 refactor(scope): remove $flush/$observe ng:eval/ng:eval-order 2011-08-12 15:47:47 -07:00
Misko Hevery
8bc7beacd8 fix(bootstrap): missing var failed strict mode boot 2011-08-12 10:19:28 -07:00
Igor Minar
fdd5d9471f chore(license): update license headers + add version num
- fixed copyright overnship
- updated copyright years
- added @license tag so that closure compiler preserves the header
- added version number into headers (finally!)
2011-07-22 15:49:10 -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
Vojta Jina
330d1a870d fix(bootstrap): Fix bootstrap on IE<8
No reason for including ie-compat in bootstrap, it's included during angularInit.

Fix including ie-compat even for production.
2011-07-13 16:21:07 -07:00
Misko Hevery
f243c6aeda removed jqLite warning 2011-06-08 13:49:11 -07:00
Igor Minar
9d5c533791 ng:autobind now optionally takes element id
so it is possible to easily compile just a part of a document.

e.g.:

<html>
  <head>
    <title>partially compiled doc</title>
    <script src="angular.js" ng:autobind="compileThis"></script>
  </head>
  <body>
    this part won't be compiled: {{1+2}}
    <div id="compileThis" ng:init="i=0" ng:click="i = i+1">
      Click count: {{i}}
    </div>
  </body>
</html>
2011-03-11 08:45:43 -08:00
Misko Hevery
037f30a0c9 added missing semicolons 2011-02-16 00:48:21 -05:00
Igor Minar
1777110958 split up services into individual files
- split up services into files under src/service
- split up specs into files under test/service
- rewrite all specs so that they don't depend on one global forEach
- get rid of obsolete code and tests in ng:switch
- rename mock $log spec from "$log" to "$log mock"
2011-02-15 11:01:53 -05:00
Igor Minar
c8bb044be1 fix clobber test in angular-bootstrap.js for FF 2011-01-24 14:03:17 -08:00
Igor Minar
bdc251c5a5 add global namespace clobbering check to angular-bootstrap 2011-01-07 12:02:45 -08:00
Misko Hevery
4fdab37659 create HTML sanitizer to allow inclusion of untrusted HTML in safe manner.
Sanitization works in two phases:
 1) We parse the HTML into sax-like events (start, end, chars).
    HTML parsing is very complex, and so it may very well be that what
    most browser consider valid HTML may not pares properly here,
    but we do best effort. We treat this parser as untrusted.
 2) We have safe sanitizeWriter which treats its input (start, end, chars)
    as untrusted content and escapes everything. It only allows elements
    in the whitelist and only allows attributes which are whitelisted.
    Any attribute value must not start with 'javascript:'. This check
    is performed after escaping for entity (&xAB; etc..) and ignoring
    any whitespace.

 - Correct linky filter to use safeHtmlWriter
 - Correct html filter to use safeHtmlWriter

Close #33; Close #34
2010-10-26 13:41:07 -07:00
Igor Minar
7059579c74 inline all images into css
* embedded images as data URIs
* rake task to generate multipart js file with embeded images for IE
* move images into a separate directory outside of src or css and
  keep them there for reference
* clean up Rakefile and ruby code
* .gitignore update
* don't penalize IE 8+ with an extra request to the ie-compat.js file
2010-10-18 16:24:43 -07:00
Misko Hevery
9e9bdbdc40 JSON parser is now strict (ie, expressions are not allowed for security)
Close #57
2010-10-18 08:50:36 -07:00
Misko Hevery
d9abfe8a7e Introduced injector and $new to scope, and injection into link methods and controllers
- added angular.injector(scope, services, instanceCache) which returns inject
    - inject method can return, instance, or call function which have $inject
      property
    - initialize services with $creation=[eager|eager-publish] this means that
      only some of the services are now globally accessible
  - upgraded $become on scope to use injector hence respect the $inject property
    for injection
    - $become should not be run multiple times and will most likely be removed
      in future version
  - added $new on scope to create a child scope
     - $inject is respected on constructor function
  - simplified scopes so that they no longer have separate __proto__ for
    parent, api, behavior and instance this should speed up execution since
    scope will now create one __proto__ chain per scope (not three).

BACKWARD COMPATIBILITY WARNING:
  - services now need to have $inject instead of inject property for proper
    injection this breaks backward compatibility
  - not all services are now published into root scope
    (only: $location, $cookie, $window)
  - if you have widget/directive which uses services on scope
    (such as this.$xhr), you will now have to inject that service in
    (as it is not published on the root scope anymore)
2010-10-12 16:33:06 -07:00
Misko Hevery
03aac8b0ab fix broken build, fix #autobind and css loading 2010-07-29 15:26:10 -07:00
Misko Hevery
1b768b8443 refactored $location service so that it correctly updates under all conditions 2010-07-29 12:54:13 -07:00
Misko Hevery
fa0702bad1 change order of initialization 2010-05-28 10:32:03 -07:00
Misko Hevery
843bd355d2 various bug fixes 2010-04-09 16:20:15 -07:00
Misko Hevery
2107eafcde added hover service 2010-04-05 20:53:33 -07:00
Misko Hevery
7a4b480206 added ng:switch widget 2010-04-05 11:46:53 -07:00
Misko Hevery
5dcf9bb4fe browser is now injectable into the system 2010-04-03 20:23:16 -07:00
Misko Hevery
a80a61839a injection is now working 2010-04-03 17:04:36 -07:00
Misko Hevery
85f13d602e work on $location and autobind 2010-04-01 14:10:28 -07:00
Misko Hevery
258ca5f165 moved all uneeded files out, widgets.html works, tests horribly broken 2010-03-26 16:27:18 -07:00
Adam Abrons
2df072e3f8 twitter using resources 2010-03-16 14:38:56 -07:00
Misko Hevery
2880411713 added bootstrap, fixed formatter 2010-01-29 10:15:15 -08:00
Misko Hevery
595b4ea097 checkpoint for integration with angular 2010-01-18 10:47:03 -08:00
Misko Hevery
6d5471c9be all files converted to prototype= {} 2010-01-11 17:32:33 -08:00
Misko Hevery
9b9a0dadcc removed nglr namespace 2010-01-09 15:02:43 -08:00
Misko Hevery
214c142d9d created a way to init the code without autobootstrap 2010-01-08 16:04:35 -08:00
Adam Abrons
c9c176a53b angular.js 2010-01-05 16:36:58 -08:00