Permalink
Browse files

step-0 Blank project

  • Loading branch information...
1 parent 56886fe commit 654f7d7da74667340e014d30cbb91c10d29cde46 @mhevery committed Sep 7, 2012
Showing with 47,671 additions and 0 deletions.
  1. +8 −0 .gitignore
  2. +7 −0 .idea/runConfigurations/Testacular.xml
  3. +7 −0 .idea/runConfigurations/Testacular___run.xml
  4. +13 −0 README.md
  5. 0 app/css/.gitignore
  6. 0 app/css/app.css
  7. +9 −0 app/css/bootstrap.min.css
  8. 0 app/img/.gitignore
  9. +19 −0 app/index.html
  10. +3 −0 app/js/app.js
  11. +4 −0 app/js/controllers.js
  12. +2 −0 app/js/directives.js
  13. +2 −0 app/js/filters.js
  14. +2 −0 app/js/services.js
  15. +171 −0 app/lib/angular/angular-cookies.js
  16. +7 −0 app/lib/angular/angular-cookies.min.js
  17. +276 −0 app/lib/angular/angular-loader.js
  18. +7 −0 app/lib/angular/angular-loader.min.js
  19. +428 −0 app/lib/angular/angular-resource.js
  20. +10 −0 app/lib/angular/angular-resource.min.js
  21. +532 −0 app/lib/angular/angular-sanitize.js
  22. +13 −0 app/lib/angular/angular-sanitize.min.js
  23. +14,346 −0 app/lib/angular/angular.js
  24. +156 −0 app/lib/angular/angular.min.js
  25. +1 −0 app/lib/angular/version.txt
  26. +256 −0 app/lib/md5.js
  27. +10 −0 config/jsTestDriver-scenario.conf
  28. +14 −0 config/jsTestDriver.conf
  29. +6 −0 config/jstd-scenario-adapter-config.js
  30. +2 −0 logs/.gitignore
  31. +18 −0 scripts/e2e-test-server.bat
  32. +14 −0 scripts/e2e-test-server.sh
  33. +13 −0 scripts/e2e-test.bat
  34. +8 −0 scripts/e2e-test.sh
  35. +9 −0 scripts/retag.sh
  36. +19 −0 scripts/test-server.bat
  37. +14 −0 scripts/test-server.sh
  38. +14 −0 scripts/test.bat
  39. +8 −0 scripts/test.sh
  40. +19 −0 scripts/watchr.rb
  41. +243 −0 scripts/web-server.js
  42. +10 −0 test/e2e/runner.html
  43. +12 −0 test/e2e/scenarios.js
  44. +1,725 −0 test/lib/angular/angular-mocks.js
  45. +25,950 −0 test/lib/angular/angular-scenario.js
  46. +185 −0 test/lib/angular/jstd-scenario-adapter.js
  47. +1 −0 test/lib/angular/version.txt
  48. +20 −0 test/lib/jasmine/MIT.LICENSE
  49. +180 −0 test/lib/jasmine/index.js
  50. +190 −0 test/lib/jasmine/jasmine-html.js
  51. +166 −0 test/lib/jasmine/jasmine.css
  52. +2,476 −0 test/lib/jasmine/jasmine.js
  53. BIN test/lib/jasmine/jasmine_favicon.png
  54. +1 −0 test/lib/jasmine/version.txt
  55. +1 −0 test/unit/controllersSpec.js
  56. +2 −0 test/unit/directivesSpec.js
  57. +1 −0 test/unit/filtersSpec.js
  58. +2 −0 test/unit/servicesSpec.js
  59. +59 −0 testacular.conf.js
View
@@ -0,0 +1,8 @@
+**/.DS_Store
+nbproject
+manifest.mf
+build.xml
+
+.project
+.settings
+.idea/*
@@ -0,0 +1,7 @@
+<component name="ProjectRunConfigurationManager">
+ <configuration default="false" name="Testacular" type="NodeJSConfigurationType" factoryName="Node JS" path-to-node="/usr/local/bin/node" path-to-js-file="../../../../../usr/local/bin/testacular" application-parameters="testacular.conf.js --no-auto-watch --no-colors --browsers ChromeCanary --reporter dots" working-dir="$PROJECT_DIR$" coffeescript-run="false">
+ <RunnerSettings RunnerId="NodeJS.run" />
+ <ConfigurationWrapper RunnerId="NodeJS.run" />
+ <method />
+ </configuration>
+</component>
@@ -0,0 +1,7 @@
+<component name="ProjectRunConfigurationManager">
+ <configuration default="false" name="Testacular - run" type="NodeJSConfigurationType" factoryName="Node JS" path-to-node="/usr/local/bin/node" path-to-js-file="../../../../../usr/local/bin/testacular-run" working-dir="$PROJECT_DIR$" coffeescript-run="false">
+ <RunnerSettings RunnerId="NodeJS.run" />
+ <ConfigurationWrapper RunnerId="NodeJS.run" />
+ <method />
+ </configuration>
+</component>
View
@@ -0,0 +1,13 @@
+# Demo of directives
+
+Commits
+
+0) Blank project
+1) Slant prep work
+2) Slant implementation
+3) Model change prep work
+4) Model change implementation
+5) Components bootstrap panes prep work
+6) Extract <pane>
+7) Extract <tabs>
+8) Add ngModel
View
No changes.
View
No changes.

Large diffs are not rendered by default.

Oops, something went wrong.
View
No changes.
View
@@ -0,0 +1,19 @@
+<!doctype html>
+<html lang="en" ng-app="myApp">
+<head>
+ <meta charset="utf-8">
+ <title>Directive Demo</title>
+ <link rel="stylesheet" href="css/bootstrap.min.css"/>
+ <link rel="stylesheet" href="css/app.css"/>
+ <script src="lib/md5.js"></script>
+ <script src="lib/angular/angular.js"></script>
+ <script src="js/app.js"></script>
+ <script src="js/services.js"></script>
+ <script src="js/controllers.js"></script>
+ <script src="js/filters.js"></script>
+ <script src="js/directives.js"></script>
+</head>
+<body ng-controller="Demo">
+
+</body>
+</html>
View
@@ -0,0 +1,3 @@
+'use strict';
+
+var myApp = angular.module('myApp', []);
View
@@ -0,0 +1,4 @@
+'use strict';
+
+myApp.controller('Demo', function($scope) {
+});
View
@@ -0,0 +1,2 @@
+'use strict';
+
View
@@ -0,0 +1,2 @@
+'use strict';
+
View
@@ -0,0 +1,2 @@
+'use strict';
+
@@ -0,0 +1,171 @@
+/**
+ * @license AngularJS v1.0.0rc11
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {
+'use strict';
+
+/**
+ * @ngdoc overview
+ * @name angular.module.ngCookies
+ */
+
+
+angular.module('ngCookies', ['ng']).
+ /**
+ * @ngdoc object
+ * @name angular.module.ngCookies.$cookies
+ * @requires $browser
+ *
+ * @description
+ * Provides read/write access to browser's cookies.
+ *
+ * Only a simple Object is exposed and by adding or removing properties to/from
+ * this object, new cookies are created/deleted at the end of current $eval.
+ *
+ * @example
+ */
+ factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
+ var cookies = {},
+ lastCookies = {},
+ lastBrowserCookies,
+ runEval = false,
+ copy = angular.copy,
+ isUndefined = angular.isUndefined;
+
+ //creates a poller fn that copies all cookies from the $browser to service & inits the service
+ $browser.addPollFn(function() {
+ var currentCookies = $browser.cookies();
+ if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
+ lastBrowserCookies = currentCookies;
+ copy(currentCookies, lastCookies);
+ copy(currentCookies, cookies);
+ if (runEval) $rootScope.$apply();
+ }
+ })();
+
+ runEval = true;
+
+ //at the end of each eval, push cookies
+ //TODO: this should happen before the "delayed" watches fire, because if some cookies are not
+ // strings or browser refuses to store some cookies, we update the model in the push fn.
+ $rootScope.$watch(push);
+
+ return cookies;
+
+
+ /**
+ * Pushes all the cookies from the service to the browser and verifies if all cookies were stored.
+ */
+ function push() {
+ var name,
+ value,
+ browserCookies,
+ updated;
+
+ //delete any cookies deleted in $cookies
+ for (name in lastCookies) {
+ if (isUndefined(cookies[name])) {
+ $browser.cookies(name, undefined);
+ }
+ }
+
+ //update all cookies updated in $cookies
+ for(name in cookies) {
+ value = cookies[name];
+ if (!angular.isString(value)) {
+ if (angular.isDefined(lastCookies[name])) {
+ cookies[name] = lastCookies[name];
+ } else {
+ delete cookies[name];
+ }
+ } else if (value !== lastCookies[name]) {
+ $browser.cookies(name, value);
+ updated = true;
+ }
+ }
+
+ //verify what was actually stored
+ if (updated){
+ updated = false;
+ browserCookies = $browser.cookies();
+
+ for (name in cookies) {
+ if (cookies[name] !== browserCookies[name]) {
+ //delete or reset all cookies that the browser dropped from $cookies
+ if (isUndefined(browserCookies[name])) {
+ delete cookies[name];
+ } else {
+ cookies[name] = browserCookies[name];
+ }
+ updated = true;
+ }
+ }
+ }
+ }
+ }]).
+
+
+ /**
+ * @ngdoc object
+ * @name angular.module.ngCookies.$cookieStore
+ * @requires $cookies
+ *
+ * @description
+ * Provides a key-value (string-object) storage, that is backed by session cookies.
+ * Objects put or retrieved from this storage are automatically serialized or
+ * deserialized by angular's toJson/fromJson.
+ * @example
+ */
+ factory('$cookieStore', ['$cookies', function($cookies) {
+
+ return {
+ /**
+ * @ngdoc method
+ * @name angular.module.ngCookies.$cookieStore#get
+ * @methodOf angular.module.ngCookies.$cookieStore
+ *
+ * @description
+ * Returns the value of given cookie key
+ *
+ * @param {string} key Id to use for lookup.
+ * @returns {Object} Deserialized cookie value.
+ */
+ get: function(key) {
+ return angular.fromJson($cookies[key]);
+ },
+
+ /**
+ * @ngdoc method
+ * @name angular.module.ngCookies.$cookieStore#put
+ * @methodOf angular.module.ngCookies.$cookieStore
+ *
+ * @description
+ * Sets a value for given cookie key
+ *
+ * @param {string} key Id for the `value`.
+ * @param {Object} value Value to be stored.
+ */
+ put: function(key, value) {
+ $cookies[key] = angular.toJson(value);
+ },
+
+ /**
+ * @ngdoc method
+ * @name angular.module.ngCookies.$cookieStore#remove
+ * @methodOf angular.module.ngCookies.$cookieStore
+ *
+ * @description
+ * Remove given cookie
+ *
+ * @param {string} key Id of the key-value pair to delete.
+ */
+ remove: function(key) {
+ delete $cookies[key];
+ }
+ };
+
+ }]);
+
+})(window, window.angular);
@@ -0,0 +1,7 @@
+/*
+ AngularJS v1.0.0rc11
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(m,f,l){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(d,c){var b={},g={},h,i=!1,j=f.copy,k=f.isUndefined;c.addPollFn(function(){var a=c.cookies();h!=a&&(h=a,j(a,g),j(a,b),i&&d.$apply())})();i=!0;d.$watch(function(){var a,e,d;for(a in g)k(b[a])&&c.cookies(a,l);for(a in b)e=b[a],f.isString(e)?e!==g[a]&&(c.cookies(a,e),d=!0):f.isDefined(g[a])?b[a]=g[a]:delete b[a];if(d)for(a in e=c.cookies(),b)b[a]!==e[a]&&(k(e[a])?delete b[a]:b[a]=e[a])});return b}]).factory("$cookieStore",
+["$cookies",function(d){return{get:function(c){return f.fromJson(d[c])},put:function(c,b){d[c]=f.toJson(b)},remove:function(c){delete d[c]}}}])})(window,window.angular);
Oops, something went wrong.

0 comments on commit 654f7d7

Please sign in to comment.