ember-source 1.7.0.beta.2 → 1.7.0.beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-runtime.js +104 -46
- data/dist/ember-tests.js +501 -188
- data/dist/ember.js +234 -95
- data/dist/ember.min.js +19 -19
- data/dist/ember.prod.js +231 -94
- metadata +2 -2
data/dist/ember.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
6
6
|
* @license Licensed under MIT license
|
7
7
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
8
|
-
* @version 1.7.0-beta.
|
8
|
+
* @version 1.7.0-beta.3
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -2229,6 +2229,7 @@ define("ember-application/system/application",
|
|
2229
2229
|
*/
|
2230
2230
|
|
2231
2231
|
var Application = Namespace.extend(DeferredMixin, {
|
2232
|
+
_suppressDeferredDeprecation: true,
|
2232
2233
|
|
2233
2234
|
/**
|
2234
2235
|
The root DOM element of the Application. This can be specified as an
|
@@ -2808,6 +2809,17 @@ define("ember-application/system/application",
|
|
2808
2809
|
|
2809
2810
|
initializer: function(options) {
|
2810
2811
|
this.constructor.initializer(options);
|
2812
|
+
},
|
2813
|
+
|
2814
|
+
/**
|
2815
|
+
@method then
|
2816
|
+
@private
|
2817
|
+
@deprecated
|
2818
|
+
*/
|
2819
|
+
then: function() {
|
2820
|
+
Ember.deprecate('Do not use `.then` on an instance of Ember.Application. Please use the `.ready` hook instead.');
|
2821
|
+
|
2822
|
+
this._super.apply(this, arguments);
|
2811
2823
|
}
|
2812
2824
|
});
|
2813
2825
|
|
@@ -5007,6 +5019,35 @@ define("ember-handlebars/controls",
|
|
5007
5019
|
<input type="text" value="Stanley" disabled="disabled" size="50"/>
|
5008
5020
|
```
|
5009
5021
|
|
5022
|
+
## Actions
|
5023
|
+
|
5024
|
+
The helper can send multiple actions based on user events.
|
5025
|
+
|
5026
|
+
The action property defines the action which is send when
|
5027
|
+
the user presses the return key.
|
5028
|
+
|
5029
|
+
```handlebars
|
5030
|
+
{{input action="submit"}}
|
5031
|
+
```
|
5032
|
+
|
5033
|
+
The helper allows some user events to send actions.
|
5034
|
+
|
5035
|
+
* `enter`
|
5036
|
+
* `insert-newline`
|
5037
|
+
* `escape-press`
|
5038
|
+
* `focus-in`
|
5039
|
+
* `focus-out`
|
5040
|
+
* `key-press`
|
5041
|
+
|
5042
|
+
For example, if you desire an action to be sent when the input is blurred,
|
5043
|
+
you only need to setup the action name to the event name property.
|
5044
|
+
|
5045
|
+
```handlebars
|
5046
|
+
{{input focus-in="alertMessage"}}
|
5047
|
+
```
|
5048
|
+
|
5049
|
+
See more about [Text Support Actions](api/classes/Ember.TextField.html)
|
5050
|
+
|
5010
5051
|
## Extension
|
5011
5052
|
|
5012
5053
|
Internally, `{{input type="text"}}` creates an instance of `Ember.TextField`, passing
|
@@ -5244,6 +5285,35 @@ define("ember-handlebars/controls",
|
|
5244
5285
|
</textarea>
|
5245
5286
|
```
|
5246
5287
|
|
5288
|
+
## Actions
|
5289
|
+
|
5290
|
+
The helper can send multiple actions based on user events.
|
5291
|
+
|
5292
|
+
The action property defines the action which is send when
|
5293
|
+
the user presses the return key.
|
5294
|
+
|
5295
|
+
```handlebars
|
5296
|
+
{{input action="submit"}}
|
5297
|
+
```
|
5298
|
+
|
5299
|
+
The helper allows some user events to send actions.
|
5300
|
+
|
5301
|
+
* `enter`
|
5302
|
+
* `insert-newline`
|
5303
|
+
* `escape-press`
|
5304
|
+
* `focus-in`
|
5305
|
+
* `focus-out`
|
5306
|
+
* `key-press`
|
5307
|
+
|
5308
|
+
For example, if you desire an action to be sent when the input is blurred,
|
5309
|
+
you only need to setup the action name to the event name property.
|
5310
|
+
|
5311
|
+
```handlebars
|
5312
|
+
{{textarea focus-in="alertMessage"}}
|
5313
|
+
```
|
5314
|
+
|
5315
|
+
See more about [Text Support Actions](api/classes/Ember.TextArea.html)
|
5316
|
+
|
5247
5317
|
## Extension
|
5248
5318
|
|
5249
5319
|
Internally, `{{textarea}}` creates an instance of `Ember.TextArea`, passing
|
@@ -6308,10 +6378,10 @@ define("ember-handlebars/controls/text_support",
|
|
6308
6378
|
},
|
6309
6379
|
|
6310
6380
|
/**
|
6311
|
-
|
6381
|
+
Called when the user inserts a new line.
|
6312
6382
|
|
6313
6383
|
Called by the `Ember.TextSupport` mixin on keyUp if keycode matches 13.
|
6314
|
-
Uses sendAction to send the `enter` action
|
6384
|
+
Uses sendAction to send the `enter` action.
|
6315
6385
|
|
6316
6386
|
@method insertNewline
|
6317
6387
|
@param {Event} event
|
@@ -6325,7 +6395,7 @@ define("ember-handlebars/controls/text_support",
|
|
6325
6395
|
Called when the user hits escape.
|
6326
6396
|
|
6327
6397
|
Called by the `Ember.TextSupport` mixin on keyUp if keycode matches 27.
|
6328
|
-
Uses sendAction to send the `escape-press` action
|
6398
|
+
Uses sendAction to send the `escape-press` action.
|
6329
6399
|
|
6330
6400
|
@method cancel
|
6331
6401
|
@param {Event} event
|
@@ -6337,6 +6407,8 @@ define("ember-handlebars/controls/text_support",
|
|
6337
6407
|
/**
|
6338
6408
|
Called when the text area is focused.
|
6339
6409
|
|
6410
|
+
Uses sendAction to send the `focus-in` action.
|
6411
|
+
|
6340
6412
|
@method focusIn
|
6341
6413
|
@param {Event} event
|
6342
6414
|
*/
|
@@ -6345,7 +6417,9 @@ define("ember-handlebars/controls/text_support",
|
|
6345
6417
|
},
|
6346
6418
|
|
6347
6419
|
/**
|
6348
|
-
Called when the text area is blurred.
|
6420
|
+
Called when the text area is blurred.
|
6421
|
+
|
6422
|
+
Uses sendAction to send the `focus-out` action.
|
6349
6423
|
|
6350
6424
|
@method focusOut
|
6351
6425
|
@param {Event} event
|
@@ -6355,10 +6429,10 @@ define("ember-handlebars/controls/text_support",
|
|
6355
6429
|
},
|
6356
6430
|
|
6357
6431
|
/**
|
6358
|
-
|
6432
|
+
Called when the user presses a key. Enabled by setting
|
6359
6433
|
the `onEvent` property to `keyPress`.
|
6360
6434
|
|
6361
|
-
Uses sendAction to send the `
|
6435
|
+
Uses sendAction to send the `key-press` action.
|
6362
6436
|
|
6363
6437
|
@method keyPress
|
6364
6438
|
@param {Event} event
|
@@ -9756,6 +9830,7 @@ define("ember-handlebars/views/handlebars_bound_view",
|
|
9756
9830
|
this.isEscaped = isEscaped;
|
9757
9831
|
this.templateData = templateData;
|
9758
9832
|
|
9833
|
+
this._lastNormalizedValue = undefined;
|
9759
9834
|
this.morph = Metamorph();
|
9760
9835
|
this.state = 'preRender';
|
9761
9836
|
this.updateId = null;
|
@@ -9784,9 +9859,9 @@ define("ember-handlebars/views/handlebars_bound_view",
|
|
9784
9859
|
propertyDidChange: K,
|
9785
9860
|
|
9786
9861
|
normalizedValue: function() {
|
9787
|
-
var path = this.path
|
9788
|
-
|
9789
|
-
|
9862
|
+
var path = this.path;
|
9863
|
+
var pathRoot = this.pathRoot;
|
9864
|
+
var result, templateData;
|
9790
9865
|
|
9791
9866
|
// Use the pathRoot as the result if no path is provided. This
|
9792
9867
|
// happens if the path is `this`, which gets normalized into
|
@@ -9812,12 +9887,12 @@ define("ember-handlebars/views/handlebars_bound_view",
|
|
9812
9887
|
buffer.push(string);
|
9813
9888
|
},
|
9814
9889
|
|
9815
|
-
render: function() {
|
9890
|
+
render: function(value) {
|
9816
9891
|
// If not invoked via a triple-mustache ({{{foo}}}), escape
|
9817
9892
|
// the content of the template.
|
9818
9893
|
var escape = this.isEscaped;
|
9819
|
-
var result = this.normalizedValue();
|
9820
|
-
|
9894
|
+
var result = value || this.normalizedValue();
|
9895
|
+
this._lastNormalizedValue = result;
|
9821
9896
|
if (result === null || result === undefined) {
|
9822
9897
|
result = "";
|
9823
9898
|
} else if (!(result instanceof SafeString)) {
|
@@ -9846,7 +9921,10 @@ define("ember-handlebars/views/handlebars_bound_view",
|
|
9846
9921
|
|
9847
9922
|
update: function () {
|
9848
9923
|
this.updateId = null;
|
9849
|
-
this.
|
9924
|
+
var value = this.normalizedValue();
|
9925
|
+
if (value !== this._lastNormalizedValue) {
|
9926
|
+
this.morph.html(this.render(value));
|
9927
|
+
}
|
9850
9928
|
},
|
9851
9929
|
|
9852
9930
|
_transitionTo: function(state) {
|
@@ -10535,19 +10613,20 @@ define("ember-metal",
|
|
10535
10613
|
__exports__["default"] = Ember;
|
10536
10614
|
});
|
10537
10615
|
define("ember-metal/alias",
|
10538
|
-
["ember-metal/property_get","ember-metal/property_set","ember-metal/error","ember-metal/properties","ember-metal/platform","ember-metal/utils","ember-metal/dependent_keys","exports"],
|
10539
|
-
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __exports__) {
|
10616
|
+
["ember-metal/property_get","ember-metal/property_set","ember-metal/error","ember-metal/properties","ember-metal/computed","ember-metal/platform","ember-metal/utils","ember-metal/dependent_keys","exports"],
|
10617
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __exports__) {
|
10540
10618
|
"use strict";
|
10541
10619
|
var get = __dependency1__.get;
|
10542
10620
|
var set = __dependency2__.set;
|
10543
10621
|
var EmberError = __dependency3__["default"];
|
10544
10622
|
var Descriptor = __dependency4__.Descriptor;
|
10545
10623
|
var defineProperty = __dependency4__.defineProperty;
|
10546
|
-
var
|
10547
|
-
var
|
10548
|
-
var
|
10549
|
-
var
|
10550
|
-
var
|
10624
|
+
var ComputedProperty = __dependency5__.ComputedProperty;
|
10625
|
+
var create = __dependency6__.create;
|
10626
|
+
var meta = __dependency7__.meta;
|
10627
|
+
var inspect = __dependency7__.inspect;
|
10628
|
+
var addDependentKeys = __dependency8__.addDependentKeys;
|
10629
|
+
var removeDependentKeys = __dependency8__.removeDependentKeys;
|
10551
10630
|
|
10552
10631
|
function alias(altKey) {
|
10553
10632
|
return new AliasedProperty(altKey);
|
@@ -10608,6 +10687,10 @@ define("ember-metal/alias",
|
|
10608
10687
|
defineProperty(obj, keyName, null);
|
10609
10688
|
return set(obj, keyName, value);
|
10610
10689
|
}
|
10690
|
+
|
10691
|
+
// Backwards compatibility with Ember Data
|
10692
|
+
AliasedProperty.prototype._meta = undefined;
|
10693
|
+
AliasedProperty.prototype.meta = ComputedProperty.prototype.meta;
|
10611
10694
|
});
|
10612
10695
|
define("ember-metal/array",
|
10613
10696
|
["exports"],
|
@@ -10790,12 +10873,14 @@ define("ember-metal/binding",
|
|
10790
10873
|
// BINDING
|
10791
10874
|
//
|
10792
10875
|
|
10793
|
-
|
10876
|
+
function Binding(toPath, fromPath) {
|
10794
10877
|
this._direction = 'fwd';
|
10795
10878
|
this._from = fromPath;
|
10796
10879
|
this._to = toPath;
|
10797
10880
|
this._directionMap = Map.create();
|
10798
|
-
|
10881
|
+
this._readyToSync = undefined;
|
10882
|
+
this._oneWay = undefined;
|
10883
|
+
}
|
10799
10884
|
|
10800
10885
|
/**
|
10801
10886
|
@class Binding
|
@@ -11059,7 +11144,6 @@ define("ember-metal/binding",
|
|
11059
11144
|
}
|
11060
11145
|
|
11061
11146
|
});
|
11062
|
-
|
11063
11147
|
/**
|
11064
11148
|
An `Ember.Binding` connects the properties of two objects so that whenever
|
11065
11149
|
the value of one property changes, the other property will be changed also.
|
@@ -11938,7 +12022,10 @@ define("ember-metal/computed",
|
|
11938
12022
|
try {
|
11939
12023
|
|
11940
12024
|
if (cacheable && cache[keyName] !== undefined) {
|
11941
|
-
|
12025
|
+
if(cache[keyName] !== UNDEFINED) {
|
12026
|
+
cachedValue = cache[keyName];
|
12027
|
+
}
|
12028
|
+
|
11942
12029
|
hadCachedValue = true;
|
11943
12030
|
}
|
11944
12031
|
|
@@ -12816,7 +12903,7 @@ define("ember-metal/core",
|
|
12816
12903
|
|
12817
12904
|
@class Ember
|
12818
12905
|
@static
|
12819
|
-
@version 1.7.0-beta.
|
12906
|
+
@version 1.7.0-beta.3
|
12820
12907
|
*/
|
12821
12908
|
|
12822
12909
|
if ('undefined' === typeof Ember) {
|
@@ -12843,10 +12930,10 @@ define("ember-metal/core",
|
|
12843
12930
|
/**
|
12844
12931
|
@property VERSION
|
12845
12932
|
@type String
|
12846
|
-
@default '1.7.0-beta.
|
12933
|
+
@default '1.7.0-beta.3'
|
12847
12934
|
@static
|
12848
12935
|
*/
|
12849
|
-
Ember.VERSION = '1.7.0-beta.
|
12936
|
+
Ember.VERSION = '1.7.0-beta.3';
|
12850
12937
|
|
12851
12938
|
/**
|
12852
12939
|
Standard environmental variables. You can define these in a global `EmberENV`
|
@@ -16891,7 +16978,7 @@ define("ember-metal/run_loop",
|
|
16891
16978
|
```
|
16892
16979
|
|
16893
16980
|
@method bind
|
16894
|
-
@namespace
|
16981
|
+
@namespace Ember
|
16895
16982
|
@param {Object} [target] target of method to call
|
16896
16983
|
@param {Function|String} method Method to invoke.
|
16897
16984
|
May be a function or a string. If you pass a string
|
@@ -17758,10 +17845,10 @@ define("ember-metal/utils",
|
|
17758
17845
|
*/
|
17759
17846
|
function wrap(func, superFunc) {
|
17760
17847
|
function superWrapper() {
|
17761
|
-
var ret, sup = this.__nextSuper;
|
17762
|
-
this.__nextSuper = superFunc;
|
17848
|
+
var ret, sup = this && this.__nextSuper;
|
17849
|
+
if(this) { this.__nextSuper = superFunc; }
|
17763
17850
|
ret = apply(this, func, arguments);
|
17764
|
-
this.__nextSuper = sup;
|
17851
|
+
if(this) { this.__nextSuper = sup; }
|
17765
17852
|
return ret;
|
17766
17853
|
}
|
17767
17854
|
|
@@ -21866,9 +21953,7 @@ define("ember-routing/system/dsl",
|
|
21866
21953
|
__exports__["default"] = DSL;
|
21867
21954
|
|
21868
21955
|
DSL.prototype = {
|
21869
|
-
|
21870
|
-
Ember.assert("'basic' cannot be used as a resource name.", name !== 'basic');
|
21871
|
-
|
21956
|
+
route: function(name, options, callback) {
|
21872
21957
|
if (arguments.length === 2 && typeof options === 'function') {
|
21873
21958
|
callback = options;
|
21874
21959
|
options = {};
|
@@ -21878,15 +21963,19 @@ define("ember-routing/system/dsl",
|
|
21878
21963
|
options = {};
|
21879
21964
|
}
|
21880
21965
|
|
21966
|
+
var type = options.resetNamespace === true ? 'resource' : 'route';
|
21967
|
+
Ember.assert("'basic' cannot be used as a " + type + " name.", name !== 'basic');
|
21968
|
+
|
21969
|
+
|
21881
21970
|
if (typeof options.path !== 'string') {
|
21882
21971
|
options.path = "/" + name;
|
21883
21972
|
}
|
21884
21973
|
|
21885
|
-
|
21886
|
-
|
21887
|
-
|
21888
|
-
|
21889
|
-
if (
|
21974
|
+
if (canNest(this) && options.resetNamespace !== true) {
|
21975
|
+
name = this.parent + "." + name;
|
21976
|
+
}
|
21977
|
+
|
21978
|
+
if (callback) {
|
21890
21979
|
var dsl = new DSL(name);
|
21891
21980
|
route(dsl, 'loading');
|
21892
21981
|
route(dsl, 'error', { path: "/_unused_dummy_error_path_route_" + name + "/:error" });
|
@@ -21898,7 +21987,6 @@ define("ember-routing/system/dsl",
|
|
21898
21987
|
this.push(options.path, name, null);
|
21899
21988
|
}
|
21900
21989
|
|
21901
|
-
|
21902
21990
|
},
|
21903
21991
|
|
21904
21992
|
push: function(url, name, callback) {
|
@@ -21908,17 +21996,25 @@ define("ember-routing/system/dsl",
|
|
21908
21996
|
this.matches.push([url, name, callback]);
|
21909
21997
|
},
|
21910
21998
|
|
21911
|
-
|
21912
|
-
|
21999
|
+
resource: function(name, options, callback) {
|
22000
|
+
if (arguments.length === 2 && typeof options === 'function') {
|
22001
|
+
callback = options;
|
22002
|
+
options = {};
|
22003
|
+
}
|
21913
22004
|
|
21914
|
-
|
21915
|
-
|
22005
|
+
if (arguments.length === 1) {
|
22006
|
+
options = {};
|
22007
|
+
}
|
22008
|
+
|
22009
|
+
options.resetNamespace = true;
|
22010
|
+
this.route(name, options, callback);
|
22011
|
+
},
|
21916
22012
|
|
21917
22013
|
generate: function() {
|
21918
22014
|
var dslMatches = this.matches;
|
21919
22015
|
|
21920
22016
|
if (!this.explicitIndex) {
|
21921
|
-
|
22017
|
+
route(this, "index", { path: "/" });
|
21922
22018
|
}
|
21923
22019
|
|
21924
22020
|
return function(match) {
|
@@ -21930,6 +22026,10 @@ define("ember-routing/system/dsl",
|
|
21930
22026
|
}
|
21931
22027
|
};
|
21932
22028
|
|
22029
|
+
function canNest(dsl) {
|
22030
|
+
return dsl.parent && dsl.parent !== 'application';
|
22031
|
+
}
|
22032
|
+
|
21933
22033
|
function route(dsl, name, options) {
|
21934
22034
|
Ember.assert("You must use `this.resource` to nest", typeof options !== 'function');
|
21935
22035
|
|
@@ -21939,7 +22039,7 @@ define("ember-routing/system/dsl",
|
|
21939
22039
|
options.path = "/" + name;
|
21940
22040
|
}
|
21941
22041
|
|
21942
|
-
if (dsl
|
22042
|
+
if (canNest(dsl) && options.resetNamespace !== true) {
|
21943
22043
|
name = dsl.parent + "." + name;
|
21944
22044
|
}
|
21945
22045
|
|
@@ -23836,7 +23936,6 @@ define("ember-routing/system/route",
|
|
23836
23936
|
|
23837
23937
|
@method resetController
|
23838
23938
|
@param {Controller} controller instance
|
23839
|
-
@param {Object} model
|
23840
23939
|
@param {Boolean} isExiting
|
23841
23940
|
@param {Object} transition
|
23842
23941
|
*/
|
@@ -28198,7 +28297,7 @@ define("ember-runtime/mixins/array",
|
|
28198
28297
|
|
28199
28298
|
/**
|
28200
28299
|
This is the handler for the special array content property. If you get
|
28201
|
-
this property, it will return this. If you set this property
|
28300
|
+
this property, it will return this. If you set this property to a new
|
28202
28301
|
array, it will replace the current content.
|
28203
28302
|
|
28204
28303
|
This property overrides the default property defined in `Ember.Enumerable`.
|
@@ -28858,6 +28957,8 @@ define("ember-runtime/mixins/deferred",
|
|
28858
28957
|
},
|
28859
28958
|
|
28860
28959
|
_deferred: computed(function() {
|
28960
|
+
Ember.deprecate('Usage of Ember.DeferredMixin or Ember.Deferred is deprecated.', this._suppressDeferredDeprecation);
|
28961
|
+
|
28861
28962
|
return RSVP.defer('Ember: DeferredMixin - ' + this);
|
28862
28963
|
})
|
28863
28964
|
});
|
@@ -29840,7 +29941,7 @@ define("ember-runtime/mixins/enumerable",
|
|
29840
29941
|
|
29841
29942
|
/**
|
29842
29943
|
Invoke this method when the contents of your enumerable has changed.
|
29843
|
-
This will notify any observers watching for content changes. If
|
29944
|
+
This will notify any observers watching for content changes. If you are
|
29844
29945
|
implementing an ordered enumerable (such as an array), also pass the
|
29845
29946
|
start and end values where the content changed so that it can be used to
|
29846
29947
|
notify range observers.
|
@@ -30778,13 +30879,15 @@ define("ember-runtime/mixins/observable",
|
|
30778
30879
|
with a list of strings or an array:
|
30779
30880
|
|
30780
30881
|
```javascript
|
30781
|
-
record.getProperties('firstName', 'lastName', 'zipCode');
|
30882
|
+
record.getProperties('firstName', 'lastName', 'zipCode');
|
30883
|
+
// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }
|
30782
30884
|
```
|
30783
30885
|
|
30784
30886
|
is equivalent to:
|
30785
30887
|
|
30786
30888
|
```javascript
|
30787
|
-
record.getProperties(['firstName', 'lastName', 'zipCode']);
|
30889
|
+
record.getProperties(['firstName', 'lastName', 'zipCode']);
|
30890
|
+
// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }
|
30788
30891
|
```
|
30789
30892
|
|
30790
30893
|
@method getProperties
|
@@ -32227,6 +32330,7 @@ define("ember-runtime/system/core_object",
|
|
32227
32330
|
var finishPartial = Mixin.finishPartial;
|
32228
32331
|
var reopen = Mixin.prototype.reopen;
|
32229
32332
|
var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
|
32333
|
+
var hasCachedComputedProperties = false;
|
32230
32334
|
|
32231
32335
|
var undefinedDescriptor = {
|
32232
32336
|
configurable: true,
|
@@ -32922,6 +33026,26 @@ define("ember-runtime/system/core_object",
|
|
32922
33026
|
return desc._meta || {};
|
32923
33027
|
},
|
32924
33028
|
|
33029
|
+
_computedProperties: Ember.computed(function() {
|
33030
|
+
hasCachedComputedProperties = true;
|
33031
|
+
var proto = this.proto();
|
33032
|
+
var descs = meta(proto).descs;
|
33033
|
+
var property;
|
33034
|
+
var properties = [];
|
33035
|
+
|
33036
|
+
for (var name in descs) {
|
33037
|
+
property = descs[name];
|
33038
|
+
|
33039
|
+
if (property instanceof ComputedProperty) {
|
33040
|
+
properties.push({
|
33041
|
+
name: name,
|
33042
|
+
meta: property._meta
|
33043
|
+
});
|
33044
|
+
}
|
33045
|
+
}
|
33046
|
+
return properties;
|
33047
|
+
}).readOnly(),
|
33048
|
+
|
32925
33049
|
/**
|
32926
33050
|
Iterate over each computed property for the class, passing its name
|
32927
33051
|
and any associated metadata (see `metaForProperty`) to the callback.
|
@@ -32931,17 +33055,15 @@ define("ember-runtime/system/core_object",
|
|
32931
33055
|
@param {Object} binding
|
32932
33056
|
*/
|
32933
33057
|
eachComputedProperty: function(callback, binding) {
|
32934
|
-
var
|
32935
|
-
|
32936
|
-
empty = {},
|
32937
|
-
property;
|
33058
|
+
var property, name;
|
33059
|
+
var empty = {};
|
32938
33060
|
|
32939
|
-
|
32940
|
-
property = descs[name];
|
33061
|
+
var properties = get(this, '_computedProperties');
|
32941
33062
|
|
32942
|
-
|
32943
|
-
|
32944
|
-
|
33063
|
+
for (var i = 0, length = properties.length; i < length; i++) {
|
33064
|
+
property = properties[i];
|
33065
|
+
name = property.name;
|
33066
|
+
callback.call(binding || this, property.name, property.meta || empty);
|
32945
33067
|
}
|
32946
33068
|
}
|
32947
33069
|
});
|
@@ -32953,19 +33075,42 @@ define("ember-runtime/system/core_object",
|
|
32953
33075
|
}
|
32954
33076
|
|
32955
33077
|
CoreObject.ClassMixin = ClassMixin;
|
33078
|
+
|
32956
33079
|
ClassMixin.apply(CoreObject);
|
32957
33080
|
|
33081
|
+
CoreObject.reopen({
|
33082
|
+
didDefineProperty: function(proto, key, value) {
|
33083
|
+
if (hasCachedComputedProperties === false) { return; }
|
33084
|
+
if (value instanceof Ember.ComputedProperty) {
|
33085
|
+
var cache = Ember.meta(this.constructor).cache;
|
33086
|
+
|
33087
|
+
if (cache._computedProperties !== undefined) {
|
33088
|
+
cache._computedProperties = undefined;
|
33089
|
+
}
|
33090
|
+
}
|
33091
|
+
|
33092
|
+
this._super();
|
33093
|
+
}
|
33094
|
+
});
|
33095
|
+
|
33096
|
+
|
32958
33097
|
__exports__["default"] = CoreObject;
|
32959
33098
|
});
|
32960
33099
|
define("ember-runtime/system/deferred",
|
32961
|
-
["ember-runtime/mixins/deferred","ember-metal/property_get","ember-runtime/system/object","exports"],
|
32962
|
-
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
33100
|
+
["ember-metal/core","ember-runtime/mixins/deferred","ember-metal/property_get","ember-runtime/system/object","exports"],
|
33101
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
|
32963
33102
|
"use strict";
|
32964
|
-
var
|
32965
|
-
var
|
32966
|
-
var
|
33103
|
+
var Ember = __dependency1__["default"];
|
33104
|
+
var DeferredMixin = __dependency2__["default"];
|
33105
|
+
var get = __dependency3__.get;
|
33106
|
+
var EmberObject = __dependency4__["default"];
|
32967
33107
|
|
32968
|
-
var Deferred = EmberObject.extend(DeferredMixin
|
33108
|
+
var Deferred = EmberObject.extend(DeferredMixin, {
|
33109
|
+
init: function() {
|
33110
|
+
Ember.deprecate('Usage of Ember.Deferred is deprecated.');
|
33111
|
+
this._super();
|
33112
|
+
}
|
33113
|
+
});
|
32969
33114
|
|
32970
33115
|
Deferred.reopenClass({
|
32971
33116
|
promise: function(callback, binding) {
|
@@ -33406,6 +33551,15 @@ define("ember-runtime/system/namespace",
|
|
33406
33551
|
|
33407
33552
|
var STARTS_WITH_UPPERCASE = /^[A-Z]/;
|
33408
33553
|
|
33554
|
+
function tryIsNamespace(lookup, prop) {
|
33555
|
+
try {
|
33556
|
+
var obj = lookup[prop];
|
33557
|
+
return obj && obj.isNamespace && obj;
|
33558
|
+
} catch (e) {
|
33559
|
+
// continue
|
33560
|
+
}
|
33561
|
+
}
|
33562
|
+
|
33409
33563
|
function findNamespaces() {
|
33410
33564
|
var lookup = Ember.lookup, obj, isNamespace;
|
33411
33565
|
|
@@ -33420,14 +33574,8 @@ define("ember-runtime/system/namespace",
|
|
33420
33574
|
|
33421
33575
|
// At times we are not allowed to access certain properties for security reasons.
|
33422
33576
|
// There are also times where even if we can access them, we are not allowed to access their properties.
|
33423
|
-
|
33424
|
-
|
33425
|
-
isNamespace = obj && obj.isNamespace;
|
33426
|
-
} catch (e) {
|
33427
|
-
continue;
|
33428
|
-
}
|
33429
|
-
|
33430
|
-
if (isNamespace) {
|
33577
|
+
obj = tryIsNamespace(lookup, prop);
|
33578
|
+
if (obj) {
|
33431
33579
|
obj[NAME_KEY] = prop;
|
33432
33580
|
}
|
33433
33581
|
}
|
@@ -36039,7 +36187,7 @@ define("ember-testing/test",
|
|
36039
36187
|
/**
|
36040
36188
|
Replacement for `Ember.RSVP.resolve`
|
36041
36189
|
The only difference is this uses
|
36042
|
-
|
36190
|
+
an instance of `Ember.Test.Promise`
|
36043
36191
|
|
36044
36192
|
@public
|
36045
36193
|
@method resolve
|
@@ -36646,13 +36794,13 @@ define("ember-views/system/event_dispatcher",
|
|
36646
36794
|
rootElement: 'body',
|
36647
36795
|
|
36648
36796
|
/**
|
36649
|
-
It enables events to be dispatched to the view `eventManager
|
36650
|
-
|
36651
|
-
on the view.
|
36797
|
+
It enables events to be dispatched to the view's `eventManager.` When present,
|
36798
|
+
this object takes precedence over handling of events on the view itself.
|
36652
36799
|
|
36653
|
-
|
36654
|
-
|
36655
|
-
|
36800
|
+
Note that most Ember applications do not use this feature. If your app also
|
36801
|
+
does not use it, consider setting this property to false to gain some performance
|
36802
|
+
improvement by allowing the EventDispatcher to skip the search for the
|
36803
|
+
`eventManager` on the view tree.
|
36656
36804
|
|
36657
36805
|
```javascript
|
36658
36806
|
var EventDispatcher = Em.EventDispatcher.extend({
|
@@ -36662,7 +36810,7 @@ define("ember-views/system/event_dispatcher",
|
|
36662
36810
|
focusout : 'focusOut',
|
36663
36811
|
change : 'change'
|
36664
36812
|
},
|
36665
|
-
canDispatchToEventManager: false
|
36813
|
+
canDispatchToEventManager: false
|
36666
36814
|
});
|
36667
36815
|
container.register('event_dispatcher:main', EventDispatcher);
|
36668
36816
|
```
|
@@ -36690,7 +36838,6 @@ define("ember-views/system/event_dispatcher",
|
|
36690
36838
|
|
36691
36839
|
jQuery.extend(events, addedEvents || {});
|
36692
36840
|
|
36693
|
-
|
36694
36841
|
if (!isNone(rootElement)) {
|
36695
36842
|
set(this, 'rootElement', rootElement);
|
36696
36843
|
}
|
@@ -36713,20 +36860,13 @@ define("ember-views/system/event_dispatcher",
|
|
36713
36860
|
},
|
36714
36861
|
|
36715
36862
|
/**
|
36716
|
-
Registers an event listener on the
|
36863
|
+
Registers an event listener on the rootElement. If the given event is
|
36717
36864
|
triggered, the provided event handler will be triggered on the target view.
|
36718
36865
|
|
36719
36866
|
If the target view does not implement the event handler, or if the handler
|
36720
36867
|
returns `false`, the parent view will be called. The event will continue to
|
36721
36868
|
bubble to each successive parent view until it reaches the top.
|
36722
36869
|
|
36723
|
-
For example, to have the `mouseDown` method called on the target view when
|
36724
|
-
a `mousedown` event is received from the browser, do the following:
|
36725
|
-
|
36726
|
-
```javascript
|
36727
|
-
setupHandler('mousedown', 'mouseDown');
|
36728
|
-
```
|
36729
|
-
|
36730
36870
|
@private
|
36731
36871
|
@method setupHandler
|
36732
36872
|
@param {Element} rootElement
|
@@ -36739,15 +36879,13 @@ define("ember-views/system/event_dispatcher",
|
|
36739
36879
|
rootElement.on(event + '.ember', '.ember-view', function(evt, triggeringManager) {
|
36740
36880
|
var view = View.views[this.id],
|
36741
36881
|
result = true;
|
36742
|
-
|
36882
|
+
|
36743
36883
|
var manager = self.canDispatchToEventManager ? self._findNearestEventManager(view, eventName) : null;
|
36744
36884
|
|
36745
36885
|
if (manager && manager !== triggeringManager) {
|
36746
36886
|
result = self._dispatchEvent(manager, evt, eventName, view);
|
36747
36887
|
} else if (view) {
|
36748
36888
|
result = self._bubbleEvent(view, evt, eventName);
|
36749
|
-
} else {
|
36750
|
-
evt.stopPropagation();
|
36751
36889
|
}
|
36752
36890
|
|
36753
36891
|
return result;
|
@@ -36807,6 +36945,7 @@ define("ember-views/system/event_dispatcher",
|
|
36807
36945
|
jQuery(rootElement).off('.ember', '**').removeClass('ember-application');
|
36808
36946
|
return this._super();
|
36809
36947
|
},
|
36948
|
+
|
36810
36949
|
toString: function() {
|
36811
36950
|
return '(EventDisptacher)';
|
36812
36951
|
}
|