From c655b884e268c8c9b6853d440143953f51b7e7de Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Mon, 29 Mar 2010 10:40:57 -0700 Subject: tests broken, but bootstrap works --- Rakefile | 24 ++++++++++------------ lib/jstestdriver/JsTestDriver.jar | Bin 3092033 -> 3094180 bytes src/angular.prefix | 10 ++++----- src/angular.suffix | 2 +- src/directivesAngularCom.js | 29 --------------------------- src/moveToAngularCom/directivesAngularCom.js | 29 +++++++++++++++++++++++++++ 6 files changed, 46 insertions(+), 48 deletions(-) delete mode 100644 src/directivesAngularCom.js create mode 100644 src/moveToAngularCom/directivesAngularCom.js diff --git a/Rakefile b/Rakefile index c213874d..99f379ab 100644 --- a/Rakefile +++ b/Rakefile @@ -35,23 +35,21 @@ task :compile do concat = %x(cat \ src/angular.prefix \ - lib/webtoolkit/webtoolkit.base64.js \ src/Angular.js \ - src/API.js \ - src/Binder.js \ - src/ControlBar.js \ - src/DataStore.js \ - src/Filters.js \ - src/Formatters.js \ src/JSON.js \ - src/Model.js \ + src/Compiler.js \ + src/Scope.js \ + src/jqlite.js \ src/Parser.js \ src/Resource.js \ - src/Scope.js \ - src/Server.js \ - src/Users.js \ - src/Validators.js \ - src/Widgets.js \ + src/URLWatcher.js \ + src/apis.js \ + src/filters.js \ + src/formatters.js \ + src/validators.js \ + src/directives.js \ + src/markups.js \ + src/widgets.js \ src/angular.suffix \ ) f = File.new("angular.js", 'w') diff --git a/lib/jstestdriver/JsTestDriver.jar b/lib/jstestdriver/JsTestDriver.jar index 2c7a5154..abd3c5f3 100644 Binary files a/lib/jstestdriver/JsTestDriver.jar and b/lib/jstestdriver/JsTestDriver.jar differ diff --git a/src/angular.prefix b/src/angular.prefix index 26a8429f..0552b2ed 100644 --- a/src/angular.prefix +++ b/src/angular.prefix @@ -1,18 +1,18 @@ /** * The MIT License - * + * * Copyright (c) 2010 Adam Abrons and Misko Hevery http://getangular.com - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,4 +21,4 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -(function(window, document){ +(function(window, document, onLoadDelegate){ diff --git a/src/angular.suffix b/src/angular.suffix index 4b3cc37b..c5754df2 100644 --- a/src/angular.suffix +++ b/src/angular.suffix @@ -1 +1 @@ -})(window, document); \ No newline at end of file +})(window, document, window.onload); diff --git a/src/directivesAngularCom.js b/src/directivesAngularCom.js deleted file mode 100644 index 84032bdd..00000000 --- a/src/directivesAngularCom.js +++ /dev/null @@ -1,29 +0,0 @@ - -angular.directive("auth", function(expression, element){ - return function(){ - if(expression == "eager") { - this.$users.fetchCurrent(); - } - }; -}); - - -//expression = "book=Book:{year=2000}" -angular.directive("entity", function(expression, element){ - //parse expression, ignore element - var entityName; // "Book"; - var instanceName; // "book"; - var defaults; // {year: 2000}; - - parse(expression); - - return function(){ - this[entityName] = this.$datastore.entity(entityName, defaults); - this[instanceName] = this[entityName](); - this.$watch("$anchor."+instanceName, function(newAnchor){ - this[instanceName] = this[entityName].get(this.$anchor[instanceName]); - }); - }; -}); - - diff --git a/src/moveToAngularCom/directivesAngularCom.js b/src/moveToAngularCom/directivesAngularCom.js new file mode 100644 index 00000000..84032bdd --- /dev/null +++ b/src/moveToAngularCom/directivesAngularCom.js @@ -0,0 +1,29 @@ + +angular.directive("auth", function(expression, element){ + return function(){ + if(expression == "eager") { + this.$users.fetchCurrent(); + } + }; +}); + + +//expression = "book=Book:{year=2000}" +angular.directive("entity", function(expression, element){ + //parse expression, ignore element + var entityName; // "Book"; + var instanceName; // "book"; + var defaults; // {year: 2000}; + + parse(expression); + + return function(){ + this[entityName] = this.$datastore.entity(entityName, defaults); + this[instanceName] = this[entityName](); + this.$watch("$anchor."+instanceName, function(newAnchor){ + this[instanceName] = this[entityName].get(this.$anchor[instanceName]); + }); + }; +}); + + -- cgit v1.2.3