ember-source 1.0.0.rc3.3 → 1.0.0.rc3.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ember-source might be problematic. Click here for more details.

@@ -1,7 +1,7 @@
1
1
  (function() {
2
2
  var Ember = { assert: function() {} };
3
- // Version: v1.0.0-rc.3-130-g99bc3b5
4
- // Last commit: 99bc3b5 (2013-04-29 12:12:25 -0700)
3
+ // Version: v1.0.0-rc.3-251-gcd5dfe3
4
+ // Last commit: cd5dfe3 (2013-05-18 11:06:43 -0700)
5
5
 
6
6
 
7
7
  (function() {
@@ -1,5 +1,5 @@
1
- // Version: v1.0.0-rc.3-130-g99bc3b5
2
- // Last commit: 99bc3b5 (2013-04-29 12:12:25 -0700)
1
+ // Version: v1.0.0-rc.3-251-gcd5dfe3
2
+ // Last commit: cd5dfe3 (2013-05-18 11:06:43 -0700)
3
3
 
4
4
 
5
5
  (function() {
@@ -151,8 +151,8 @@ Ember.deprecateFunc = function(message, func) {
151
151
 
152
152
  })();
153
153
 
154
- // Version: v1.0.0-rc.3-156-g9d1d3cd
155
- // Last commit: 9d1d3cd (2013-05-01 22:51:16 -0700)
154
+ // Version: v1.0.0-rc.3-251-gcd5dfe3
155
+ // Last commit: cd5dfe3 (2013-05-18 11:06:43 -0700)
156
156
 
157
157
 
158
158
  (function() {
@@ -827,7 +827,7 @@ Ember.guidFor = function guidFor(obj) {
827
827
  if (obj === undefined) return "(undefined)";
828
828
  if (obj === null) return "(null)";
829
829
 
830
- var cache, ret;
830
+ var ret;
831
831
  var type = typeof obj;
832
832
 
833
833
  // Don't allow prototype changes to String etc. to change the guidFor
@@ -1228,7 +1228,7 @@ if (needsFinallyFix) {
1228
1228
  */
1229
1229
  if (needsFinallyFix) {
1230
1230
  Ember.tryCatchFinally = function(tryable, catchable, finalizer, binding) {
1231
- var result, finalResult, finalError, finalReturn;
1231
+ var result, finalResult, finalError;
1232
1232
 
1233
1233
  binding = binding || this;
1234
1234
 
@@ -2124,7 +2124,7 @@ var o_create = Ember.create,
2124
2124
  metaFor = Ember.meta,
2125
2125
  META_KEY = Ember.META_KEY,
2126
2126
  /* listener flags */
2127
- ONCE = 1, SUSPENDED = 2, IMMEDIATE = 4;
2127
+ ONCE = 1, SUSPENDED = 2;
2128
2128
 
2129
2129
  /*
2130
2130
  The event system uses a series of nested hashes to store listeners on an
@@ -2741,11 +2741,11 @@ var endPropertyChanges = Ember.endPropertyChanges = function() {
2741
2741
  });
2742
2742
  ```
2743
2743
 
2744
- @method changePropertiess
2744
+ @method changeProperties
2745
2745
  @param {Function} callback
2746
2746
  @param [binding]
2747
2747
  */
2748
- var changeProperties = Ember.changeProperties = function(cb, binding){
2748
+ Ember.changeProperties = function(cb, binding){
2749
2749
  beginPropertyChanges();
2750
2750
  tryFinally(cb, endPropertyChanges, binding);
2751
2751
  };
@@ -2950,7 +2950,7 @@ var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
2950
2950
  @private
2951
2951
  @constructor
2952
2952
  */
2953
- var Descriptor = Ember.Descriptor = function() {};
2953
+ Ember.Descriptor = function() {};
2954
2954
 
2955
2955
  // ..........................................................
2956
2956
  // DEFINING PROPERTIES API
@@ -3511,7 +3511,7 @@ Ember.watchPath = function(obj, keyPath) {
3511
3511
  };
3512
3512
 
3513
3513
  Ember.unwatchPath = function(obj, keyPath) {
3514
- var m = metaFor(obj), watching = m.watching, desc;
3514
+ var m = metaFor(obj), watching = m.watching;
3515
3515
 
3516
3516
  if (watching[keyPath] === 1) {
3517
3517
  watching[keyPath] = 0;
@@ -4057,7 +4057,6 @@ ComputedPropertyPrototype.teardown = function(obj, keyName) {
4057
4057
  The function should accept two parameters, key and value. If value is not
4058
4058
  undefined you should set the value first. In either case return the
4059
4059
  current value of the property.
4060
-
4061
4060
  @method computed
4062
4061
  @for Ember
4063
4062
  @param {Function} func The computed property function.
@@ -4299,7 +4298,7 @@ registerComputedWithProperties('or', function(properties) {
4299
4298
  @for Ember
4300
4299
  @param {String} dependentKey, [dependentKey...]
4301
4300
  @return {Ember.ComputedProperty} computed property which returns
4302
- the first trouthy value of given list of properties.
4301
+ the first truthy value of given list of properties.
4303
4302
  */
4304
4303
  registerComputedWithProperties('any', function(properties) {
4305
4304
  for (var key in properties) {
@@ -4349,6 +4348,48 @@ Ember.computed.alias = function(dependentKey) {
4349
4348
  });
4350
4349
  };
4351
4350
 
4351
+ /**
4352
+ @method computed.oneWay
4353
+ @for Ember
4354
+ @param {String} dependentKey
4355
+ @return {Ember.ComputedProperty} computed property which creates an
4356
+ one way computed property to the original value for property.
4357
+
4358
+ Where `computed.alias` aliases `get` and `set`, and allows for bidirectional
4359
+ data flow, `computed.oneWay` only provides an aliased `get`. The `set` will
4360
+ not mutate the upstream property, rather causes the current property to
4361
+ become the value set. This causes the downstream property to permentantly
4362
+ diverge from the upstream property.
4363
+
4364
+ ```javascript
4365
+ User = Ember.Object.extend({
4366
+ firstName: null,
4367
+ lastName: null,
4368
+ nickName: Ember.computed.oneWay('firstName')
4369
+ });
4370
+
4371
+ user = User.create({
4372
+ firstName: 'Teddy',
4373
+ lastName: 'Zeenny'
4374
+ });
4375
+
4376
+ user.get('nickName');
4377
+ # 'Teddy'
4378
+
4379
+ user.set('nickName', 'TeddyBear');
4380
+ # 'TeddyBear'
4381
+
4382
+ user.get('firstName');
4383
+ # 'Teddy'
4384
+ ```
4385
+ */
4386
+ Ember.computed.oneWay = function(dependentKey) {
4387
+ return Ember.computed(dependentKey, function() {
4388
+ return get(this, dependentKey);
4389
+ });
4390
+ };
4391
+
4392
+
4352
4393
  /**
4353
4394
  @method computed.defaultTo
4354
4395
  @for Ember
@@ -4378,8 +4419,6 @@ Ember.computed.defaultTo = function(defaultPath) {
4378
4419
  var AFTER_OBSERVERS = ':change';
4379
4420
  var BEFORE_OBSERVERS = ':before';
4380
4421
 
4381
- var guidFor = Ember.guidFor;
4382
-
4383
4422
  function changeEvent(keyName) {
4384
4423
  return keyName+AFTER_OBSERVERS;
4385
4424
  }
@@ -5538,7 +5577,7 @@ mixinProperties(Binding, {
5538
5577
 
5539
5578
  You should consider using one way bindings anytime you have an object that
5540
5579
  may be created frequently and you do not intend to change a property; only
5541
- to monitor it for changes. (such as in the example above).
5580
+ to monitor it for changes (such as in the example above).
5542
5581
 
5543
5582
  ## Adding Bindings Manually
5544
5583
 
@@ -5839,14 +5878,6 @@ function mergeMixins(mixins, m, descs, values, base, keys) {
5839
5878
  }
5840
5879
  }
5841
5880
 
5842
- function writableReq(obj) {
5843
- var m = Ember.meta(obj), req = m.required;
5844
- if (!req || !m.hasOwnProperty('required')) {
5845
- req = m.required = req ? o_create(req) : {};
5846
- }
5847
- return req;
5848
- }
5849
-
5850
5881
  var IS_BINDING = Ember.IS_BINDING = /^.+Binding$/;
5851
5882
 
5852
5883
  function detectBinding(obj, key, value, m) {
@@ -7505,7 +7536,7 @@ var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'n
7505
7536
  @constructor
7506
7537
  */
7507
7538
  Ember.Error = function() {
7508
- var tmp = Error.prototype.constructor.apply(this, arguments);
7539
+ var tmp = Error.apply(this, arguments);
7509
7540
 
7510
7541
  // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
7511
7542
  for (var idx = 0; idx < errorProps.length; idx++) {
@@ -7767,10 +7798,12 @@ Ember.String = {
7767
7798
  /**
7768
7799
  Returns the Capitalized form of a string
7769
7800
 
7770
- 'innerHTML'.capitalize() // 'InnerHTML'
7771
- 'action_name'.capitalize() // 'Action_name'
7772
- 'css-class-name'.capitalize() // 'Css-class-name'
7773
- 'my favorite items'.capitalize() // 'My favorite items'
7801
+ ```javascript
7802
+ 'innerHTML'.capitalize() // 'InnerHTML'
7803
+ 'action_name'.capitalize() // 'Action_name'
7804
+ 'css-class-name'.capitalize() // 'Css-class-name'
7805
+ 'my favorite items'.capitalize() // 'My favorite items'
7806
+ ```
7774
7807
 
7775
7808
  @method capitalize
7776
7809
  @param {String} str
@@ -8938,7 +8971,7 @@ var get = Ember.get, set = Ember.set, isNone = Ember.isNone, map = Ember.Enumera
8938
8971
 
8939
8972
  You can use the methods defined in this module to access and modify array
8940
8973
  contents in a KVO-friendly way. You can also be notified whenever the
8941
- membership if an array changes by changing the syntax of the property to
8974
+ membership of an array changes by changing the syntax of the property to
8942
8975
  `.observes('*myProperty.[]')`.
8943
8976
 
8944
8977
  To support `Ember.Array` in your own class, you must override two
@@ -8955,9 +8988,6 @@ var get = Ember.get, set = Ember.set, isNone = Ember.isNone, map = Ember.Enumera
8955
8988
  */
8956
8989
  Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.prototype */ {
8957
8990
 
8958
- // compatibility
8959
- isSCArray: true,
8960
-
8961
8991
  /**
8962
8992
  Your array must support the `length` property. Your replace methods should
8963
8993
  set this property whenever it changes.
@@ -9414,8 +9444,7 @@ var get = Ember.get, set = Ember.set;
9414
9444
  @extends Ember.Mixin
9415
9445
  @since Ember 0.9
9416
9446
  */
9417
- Ember.Copyable = Ember.Mixin.create(
9418
- /** @scope Ember.Copyable.prototype */ {
9447
+ Ember.Copyable = Ember.Mixin.create(/** @scope Ember.Copyable.prototype */ {
9419
9448
 
9420
9449
  /**
9421
9450
  Override to return a copy of the receiver. Default implementation raises
@@ -9520,8 +9549,7 @@ var get = Ember.get, set = Ember.set;
9520
9549
  @extends Ember.Mixin
9521
9550
  @since Ember 0.9
9522
9551
  */
9523
- Ember.Freezable = Ember.Mixin.create(
9524
- /** @scope Ember.Freezable.prototype */ {
9552
+ Ember.Freezable = Ember.Mixin.create(/** @scope Ember.Freezable.prototype */ {
9525
9553
 
9526
9554
  /**
9527
9555
  Set to `true` when the object is frozen. Use this property to detect
@@ -9702,8 +9730,7 @@ var get = Ember.get, set = Ember.set;
9702
9730
  @uses Ember.Array
9703
9731
  @uses Ember.MutableEnumerable
9704
9732
  */
9705
- Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,
9706
- /** @scope Ember.MutableArray.prototype */ {
9733
+ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,/** @scope Ember.MutableArray.prototype */ {
9707
9734
 
9708
9735
  /**
9709
9736
  __Required.__ You must implement this method to apply this mixin.
@@ -9974,7 +10001,6 @@ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,
9974
10001
 
9975
10002
  });
9976
10003
 
9977
-
9978
10004
  })();
9979
10005
 
9980
10006
 
@@ -10022,7 +10048,7 @@ var get = Ember.get, set = Ember.set;
10022
10048
  For example:
10023
10049
 
10024
10050
  ```javascript
10025
- Ember.Object.create({
10051
+ Ember.Object.extend({
10026
10052
  valueObserver: function() {
10027
10053
  // Executes whenever the "value" property changes
10028
10054
  }.observes('value')
@@ -10041,8 +10067,8 @@ var get = Ember.get, set = Ember.set;
10041
10067
  object.addObserver('propertyKey', targetObject, targetAction)
10042
10068
  ```
10043
10069
 
10044
- This will call the `targetAction` method on the `targetObject` to be called
10045
- whenever the value of the `propertyKey` changes.
10070
+ This will call the `targetAction` method on the `targetObject` whenever
10071
+ the value of the `propertyKey` changes.
10046
10072
 
10047
10073
  Note that if `propertyKey` is a computed property, the observer will be
10048
10074
  called when any of the property dependencies are changed, even if the
@@ -10302,8 +10328,8 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
10302
10328
 
10303
10329
  This is the core method used to register an observer for a property.
10304
10330
 
10305
- Once you call this method, anytime the key's value is set, your observer
10306
- will be notified. Note that the observers are triggered anytime the
10331
+ Once you call this method, any time the key's value is set, your observer
10332
+ will be notified. Note that the observers are triggered any time the
10307
10333
  value is set, regardless of whether it has actually changed. Your
10308
10334
  observer should be prepared to handle that.
10309
10335
 
@@ -10428,8 +10454,8 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
10428
10454
 
10429
10455
  @method incrementProperty
10430
10456
  @param {String} keyName The name of the property to increment
10431
- @param {Object} increment The amount to increment by. Defaults to 1
10432
- @return {Object} The new property value
10457
+ @param {Number} increment The amount to increment by. Defaults to 1
10458
+ @return {Number} The new property value
10433
10459
  */
10434
10460
  incrementProperty: function(keyName, increment) {
10435
10461
  if (Ember.isNone(increment)) { increment = 1; }
@@ -10447,12 +10473,12 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
10447
10473
 
10448
10474
  @method decrementProperty
10449
10475
  @param {String} keyName The name of the property to decrement
10450
- @param {Object} increment The amount to decrement by. Defaults to 1
10451
- @return {Object} The new property value
10476
+ @param {Number} decrement The amount to decrement by. Defaults to 1
10477
+ @return {Number} The new property value
10452
10478
  */
10453
- decrementProperty: function(keyName, increment) {
10454
- if (Ember.isNone(increment)) { increment = 1; }
10455
- set(this, keyName, (get(this, keyName) || 0)-increment);
10479
+ decrementProperty: function(keyName, decrement) {
10480
+ if (Ember.isNone(decrement)) { decrement = 1; }
10481
+ set(this, keyName, (get(this, keyName) || 0)-decrement);
10456
10482
  return get(this, keyName);
10457
10483
  },
10458
10484
 
@@ -10461,7 +10487,7 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
10461
10487
  current value.
10462
10488
 
10463
10489
  ```javascript
10464
- starship.toggleProperty('warpDriveEnaged');
10490
+ starship.toggleProperty('warpDriveEngaged');
10465
10491
  ```
10466
10492
 
10467
10493
  @method toggleProperty
@@ -10493,7 +10519,6 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
10493
10519
  }
10494
10520
  });
10495
10521
 
10496
-
10497
10522
  })();
10498
10523
 
10499
10524
 
@@ -10819,15 +10844,15 @@ Ember.DeferredMixin = Ember.Mixin.create({
10819
10844
  deferred = get(this, '_deferred');
10820
10845
  promise = deferred.promise;
10821
10846
 
10822
- return promise.then(function(fulfillment) {
10847
+ function fulfillmentHandler(fulfillment) {
10823
10848
  if (fulfillment === promise) {
10824
10849
  return resolve(entity);
10825
10850
  } else {
10826
10851
  return resolve(fulfillment);
10827
10852
  }
10828
- }, function(reason) {
10829
- return reject(reason);
10830
- });
10853
+ }
10854
+
10855
+ return promise.then(resolve && fulfillmentHandler, reject);
10831
10856
  },
10832
10857
 
10833
10858
  /**
@@ -11691,8 +11716,7 @@ var get = Ember.get, set = Ember.set;
11691
11716
  @extends Ember.Object
11692
11717
  @uses Ember.MutableArray
11693
11718
  */
11694
- Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray,
11695
- /** @scope Ember.ArrayProxy.prototype */ {
11719
+ Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray,/** @scope Ember.ArrayProxy.prototype */ {
11696
11720
 
11697
11721
  /**
11698
11722
  The content array. Must be an object that implements `Ember.Array` and/or
@@ -11968,7 +11992,6 @@ Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray,
11968
11992
  }
11969
11993
  });
11970
11994
 
11971
-
11972
11995
  })();
11973
11996
 
11974
11997
 
@@ -12068,8 +12091,7 @@ function contentPropertyDidChange(content, contentKey) {
12068
12091
  @namespace Ember
12069
12092
  @extends Ember.Object
12070
12093
  */
12071
- Ember.ObjectProxy = Ember.Object.extend(
12072
- /** @scope Ember.ObjectProxy.prototype */ {
12094
+ Ember.ObjectProxy = Ember.Object.extend(/** @scope Ember.ObjectProxy.prototype */ {
12073
12095
  /**
12074
12096
  The object whose properties will be forwarded.
12075
12097
 
@@ -13090,20 +13112,19 @@ Ember.ControllerMixin = Ember.Mixin.create({
13090
13112
 
13091
13113
  container: null,
13092
13114
 
13115
+ parentController: null,
13116
+
13093
13117
  store: null,
13094
13118
 
13095
13119
  model: Ember.computed.alias('content'),
13096
13120
 
13097
13121
  send: function(actionName) {
13098
- var args = [].slice.call(arguments, 1), target,
13099
- bubble = true;
13122
+ var args = [].slice.call(arguments, 1), target;
13100
13123
 
13101
13124
  if (this[actionName]) {
13102
13125
  Ember.assert("The controller " + this + " does not have the action " + actionName, typeof this[actionName] === 'function');
13103
- bubble = this[actionName].apply(this, args) === true;
13104
- }
13105
-
13106
- if (bubble && (target = get(this, 'target'))) {
13126
+ this[actionName].apply(this, args);
13127
+ } else if(target = get(this, 'target')) {
13107
13128
  Ember.assert("The target for controller " + this + " (" + target + ") did not define a `send` method", typeof target.send === 'function');
13108
13129
  target.send.apply(target, arguments);
13109
13130
  }
@@ -13435,6 +13456,10 @@ var get = Ember.get, set = Ember.set, forEach = Ember.EnumerableUtils.forEach,
13435
13456
  });
13436
13457
  ```
13437
13458
 
13459
+ The itemController instances will have a `parentController` property set to
13460
+ either the the `parentController` property of the `ArrayController`
13461
+ or to the `ArrayController` instance itself.
13462
+
13438
13463
  @class ArrayController
13439
13464
  @namespace Ember
13440
13465
  @extends Ember.ArrayProxy
@@ -13545,6 +13570,7 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
13545
13570
  }
13546
13571
 
13547
13572
  subController.set('target', this);
13573
+ subController.set('parentController', get(this, 'parentController') || this);
13548
13574
  subController.set('content', object);
13549
13575
 
13550
13576
  return subController;
@@ -13658,7 +13684,7 @@ if (Ember.$) {
13658
13684
  @submodule ember-views
13659
13685
  */
13660
13686
 
13661
- /*** BEGIN METAMORPH HELPERS ***/
13687
+ /* BEGIN METAMORPH HELPERS */
13662
13688
 
13663
13689
  // Internet Explorer prior to 9 does not allow setting innerHTML if the first element
13664
13690
  // is a "zero-scope" element. This problem can be worked around by making
@@ -13731,7 +13757,7 @@ var setInnerHTMLWithoutFix = function(element, html) {
13731
13757
  }
13732
13758
  };
13733
13759
 
13734
- /*** END METAMORPH HELPERS */
13760
+ /* END METAMORPH HELPERS */
13735
13761
 
13736
13762
 
13737
13763
  var innerHTMLTags = {};
@@ -14314,8 +14340,7 @@ var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
14314
14340
  @private
14315
14341
  @extends Ember.Object
14316
14342
  */
14317
- Ember.EventDispatcher = Ember.Object.extend(
14318
- /** @scope Ember.EventDispatcher.prototype */{
14343
+ Ember.EventDispatcher = Ember.Object.extend(/** @scope Ember.EventDispatcher.prototype */{
14319
14344
 
14320
14345
  /**
14321
14346
  @private
@@ -17615,6 +17640,8 @@ Ember.ContainerView = Ember.View.extend(Ember.MutableArray, {
17615
17640
 
17616
17641
  replace: function(idx, removedCount, addedViews) {
17617
17642
  var addedCount = addedViews ? get(addedViews, 'length') : 0;
17643
+ var self = this;
17644
+ Ember.assert("You can't add a child to a container that is already a child of another view", Ember.A(addedViews).every(function(item) { return !get(item, '_parentView') || get(item, '_parentView') === self; }));
17618
17645
 
17619
17646
  this.arrayContentWillChange(idx, removedCount, addedCount);
17620
17647
  this.childViewsWillChange(this._childViews, idx, removedCount);
@@ -17735,6 +17762,7 @@ Ember.ContainerView = Ember.View.extend(Ember.MutableArray, {
17735
17762
  _currentViewDidChange: Ember.observer(function() {
17736
17763
  var currentView = get(this, 'currentView');
17737
17764
  if (currentView) {
17765
+ Ember.assert("You tried to set a current view that already has a parent. Make sure you don't have multiple outlets in the same view.", !get(currentView, '_parentView'));
17738
17766
  this.pushObject(currentView);
17739
17767
  }
17740
17768
  }, 'currentView'),
@@ -17975,8 +18003,7 @@ var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
17975
18003
  @extends Ember.ContainerView
17976
18004
  @since Ember 0.9
17977
18005
  */
17978
- Ember.CollectionView = Ember.ContainerView.extend(
17979
- /** @scope Ember.CollectionView.prototype */ {
18006
+ Ember.CollectionView = Ember.ContainerView.extend(/** @scope Ember.CollectionView.prototype */ {
17980
18007
 
17981
18008
  /**
17982
18009
  A list of items to be displayed by the `Ember.CollectionView`.
@@ -20006,8 +20033,8 @@ if(!Handlebars && typeof require === 'function') {
20006
20033
  Handlebars = require('handlebars');
20007
20034
  }
20008
20035
 
20009
- Ember.assert("Ember Handlebars requires Handlebars version 1.0.0-rc.3. Include a SCRIPT tag in the HTML HEAD linking to the Handlebars file before you link to Ember.", Handlebars)
20010
- Ember.assert("Ember Handlebars requires Handlebars version 1.0.0-rc.3, COMPILER_REVISION 2. Builds of master may have other COMPILER_REVISION values.", Handlebars.COMPILER_REVISION === 2);
20036
+ Ember.assert("Ember Handlebars requires Handlebars version 1.0.0-rc.4. Include a SCRIPT tag in the HTML HEAD linking to the Handlebars file before you link to Ember.", Handlebars)
20037
+ Ember.assert("Ember Handlebars requires Handlebars version 1.0.0-rc.4, COMPILER_REVISION expected: 3, got: " + Handlebars.COMPILER_REVISION + " – Please note: Builds of master may have other COMPILER_REVISION values.", Handlebars.COMPILER_REVISION === 3);
20011
20038
 
20012
20039
  /**
20013
20040
  Prepares the Handlebars templating library for use inside Ember's view
@@ -20419,15 +20446,15 @@ Ember.Handlebars.registerHelper('helperMissing', function(path, options) {
20419
20446
  });
20420
20447
  ```
20421
20448
 
20422
- Which allows for template syntax such as {{concatenate prop1 prop2}} or
20423
- {{concatenate prop1 prop2 prop3}}. If any of the properties change,
20449
+ Which allows for template syntax such as `{{concatenate prop1 prop2}}` or
20450
+ `{{concatenate prop1 prop2 prop3}}`. If any of the properties change,
20424
20451
  the helpr will re-render. Note that dependency keys cannot be
20425
20452
  using in conjunction with multi-property helpers, since it is ambiguous
20426
20453
  which property the dependent keys would belong to.
20427
20454
 
20428
20455
  ## Use with unbound helper
20429
20456
 
20430
- The {{unbound}} helper can be used with bound helper invocations
20457
+ The `{{unbound}}` helper can be used with bound helper invocations
20431
20458
  to render them in their unbound form, e.g.
20432
20459
 
20433
20460
  ```handlebars
@@ -20437,6 +20464,10 @@ Ember.Handlebars.registerHelper('helperMissing', function(path, options) {
20437
20464
  In this example, if the name property changes, the helper
20438
20465
  will not re-render.
20439
20466
 
20467
+ ## Use with blocks not supported
20468
+
20469
+ Bound helpers do not support use with Handlebars blocks or
20470
+ the addition of child views of any kind.
20440
20471
 
20441
20472
  @method registerBoundHelper
20442
20473
  @for Ember.Handlebars
@@ -20460,6 +20491,8 @@ Ember.Handlebars.registerBoundHelper = function(name, fn) {
20460
20491
  pathRoot, path,
20461
20492
  loc, hashOption;
20462
20493
 
20494
+ Ember.assert("registerBoundHelper-generated helpers do not support use with Handlebars blocks.", !options.fn);
20495
+
20463
20496
  // Detect bound options (e.g. countBinding="otherCount")
20464
20497
  hash.boundOptions = {};
20465
20498
  for (hashOption in hash) {
@@ -20620,7 +20653,6 @@ Ember.Handlebars.template = function(spec){
20620
20653
  return t;
20621
20654
  };
20622
20655
 
20623
-
20624
20656
  })();
20625
20657
 
20626
20658
 
@@ -22434,6 +22466,7 @@ Ember.Handlebars.EachView = Ember.CollectionView.extend(Ember._Metamorph, {
22434
22466
  set(controller, 'container', get(this, 'controller.container'));
22435
22467
  set(controller, '_eachView', this);
22436
22468
  set(controller, 'target', get(this, 'controller'));
22469
+ set(controller, 'parentController', get(this, 'controller'));
22437
22470
 
22438
22471
  this.disableContentObservers(function() {
22439
22472
  set(this, 'content', controller);
@@ -22707,6 +22740,9 @@ GroupedEach.prototype = {
22707
22740
  {{/each}}
22708
22741
  ```
22709
22742
 
22743
+ Each itemController will receive a reference to the current controller as
22744
+ a `parentController` property.
22745
+
22710
22746
  @method each
22711
22747
  @for Ember.Handlebars.helpers
22712
22748
  @param [name] {String} name for item (used with `in`)
@@ -22846,7 +22882,7 @@ Ember.Handlebars.registerHelper('partial', function(name, options) {
22846
22882
  var view = options.data.view,
22847
22883
  underscoredName = nameParts.join("/"),
22848
22884
  template = view.templateForName(underscoredName),
22849
- deprecatedTemplate = view.templateForName(name);
22885
+ deprecatedTemplate = !template && view.templateForName(name);
22850
22886
 
22851
22887
  Ember.deprecate("You tried to render the partial " + name + ", which should be at '" + underscoredName + "', but Ember found '" + name + "'. Please use a leading underscore in your partials", template);
22852
22888
  Ember.assert("Unable to find partial with name '"+name+"'.", template || deprecatedTemplate);
@@ -22972,7 +23008,7 @@ var set = Ember.set, get = Ember.get;
22972
23008
  You can add a `label` tag yourself in the template where the `Ember.Checkbox`
22973
23009
  is being used.
22974
23010
 
22975
- ```html
23011
+ ```handlebars
22976
23012
  <label>
22977
23013
  {{view Ember.Checkbox classNames="applicaton-specific-checkbox"}}
22978
23014
  Some Title
@@ -23192,7 +23228,7 @@ Ember.TextField = Ember.View.extend(Ember.TextSupport,
23192
23228
  * `enter`: the user pressed enter
23193
23229
  * `keypress`: the user pressed a key
23194
23230
 
23195
- @property on
23231
+ @property onEvent
23196
23232
  @type String
23197
23233
  @default enter
23198
23234
  */
@@ -23759,34 +23795,38 @@ Ember.Select = Ember.View.extend(
23759
23795
  tagName: 'select',
23760
23796
  classNames: ['ember-select'],
23761
23797
  defaultTemplate: Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
23762
- this.compilerInfo = [2,'>= 1.0.0-rc.3'];
23798
+ this.compilerInfo = [3,'>= 1.0.0-rc.4'];
23763
23799
  helpers = helpers || Ember.Handlebars.helpers; data = data || {};
23764
- var buffer = '', stack1, hashTypes, escapeExpression=this.escapeExpression, self=this;
23800
+ var buffer = '', stack1, hashTypes, hashContexts, escapeExpression=this.escapeExpression, self=this;
23765
23801
 
23766
23802
  function program1(depth0,data) {
23767
23803
 
23768
- var buffer = '', hashTypes;
23804
+ var buffer = '', hashTypes, hashContexts;
23769
23805
  data.buffer.push("<option value=\"\">");
23770
23806
  hashTypes = {};
23771
- data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "view.prompt", {hash:{},contexts:[depth0],types:["ID"],hashTypes:hashTypes,data:data})));
23807
+ hashContexts = {};
23808
+ data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "view.prompt", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
23772
23809
  data.buffer.push("</option>");
23773
23810
  return buffer;
23774
23811
  }
23775
23812
 
23776
23813
  function program3(depth0,data) {
23777
23814
 
23778
- var hashTypes;
23815
+ var hashContexts, hashTypes;
23816
+ hashContexts = {'contentBinding': depth0};
23779
23817
  hashTypes = {'contentBinding': "STRING"};
23780
23818
  data.buffer.push(escapeExpression(helpers.view.call(depth0, "view.optionView", {hash:{
23781
23819
  'contentBinding': ("this")
23782
- },contexts:[depth0],types:["ID"],hashTypes:hashTypes,data:data})));
23820
+ },contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
23783
23821
  }
23784
23822
 
23785
23823
  hashTypes = {};
23786
- stack1 = helpers['if'].call(depth0, "view.prompt", {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],hashTypes:hashTypes,data:data});
23824
+ hashContexts = {};
23825
+ stack1 = helpers['if'].call(depth0, "view.prompt", {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
23787
23826
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
23788
23827
  hashTypes = {};
23789
- stack1 = helpers.each.call(depth0, "view.content", {hash:{},inverse:self.noop,fn:self.program(3, program3, data),contexts:[depth0],types:["ID"],hashTypes:hashTypes,data:data});
23828
+ hashContexts = {};
23829
+ stack1 = helpers.each.call(depth0, "view.content", {hash:{},inverse:self.noop,fn:self.program(3, program3, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
23790
23830
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
23791
23831
  return buffer;
23792
23832
 
@@ -24525,8 +24565,7 @@ var get = Ember.get, set = Ember.set;
24525
24565
  @namespace Ember
24526
24566
  @extends Ember.Namespace
24527
24567
  */
24528
- Ember.Application = Ember.Namespace.extend(
24529
- /** @scope Ember.Application.prototype */{
24568
+ Ember.Application = Ember.Namespace.extend(/** @scope Ember.Application.prototype */{
24530
24569
 
24531
24570
  /**
24532
24571
  The root DOM element of the Application. This can be specified as an
@@ -24875,7 +24914,6 @@ Ember.Application.registerInjection({
24875
24914
 
24876
24915
  Ember.runLoadHooks('Ember.Application', Ember.Application);
24877
24916
 
24878
-
24879
24917
  })();
24880
24918
 
24881
24919
 
@@ -26441,8 +26479,7 @@ var get = Ember.get, set = Ember.set;
26441
26479
  @namespace Ember
26442
26480
  @extends Ember.StateManager
26443
26481
  */
26444
- Ember.Router = Ember.StateManager.extend(
26445
- /** @scope Ember.Router.prototype */ {
26482
+ Ember.Router = Ember.StateManager.extend(/** @scope Ember.Router.prototype */ {
26446
26483
 
26447
26484
  /**
26448
26485
  @property initialState