ember-source 1.9.0.beta.3 → 1.9.0.beta.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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-runtime.js +39 -40
- data/dist/ember-testing.js +2 -2
- data/dist/ember-tests.js +44 -13
- data/dist/ember-tests.prod.js +44 -13
- data/dist/ember.js +79 -64
- data/dist/ember.min.js +5 -5
- data/dist/ember.prod.js +64 -60
- 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.9.0-beta.
|
8
|
+
* @version 1.9.0-beta.4
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -5254,10 +5254,12 @@ enifed("ember-handlebars/controls",
|
|
5254
5254
|
The action property defines the action which is sent when
|
5255
5255
|
the user presses the return key.
|
5256
5256
|
|
5257
|
+
|
5257
5258
|
```handlebars
|
5258
5259
|
{{input action="submit"}}
|
5259
5260
|
```
|
5260
5261
|
|
5262
|
+
|
5261
5263
|
The helper allows some user events to send actions.
|
5262
5264
|
|
5263
5265
|
* `enter`
|
@@ -5271,10 +5273,12 @@ enifed("ember-handlebars/controls",
|
|
5271
5273
|
For example, if you desire an action to be sent when the input is blurred,
|
5272
5274
|
you only need to setup the action name to the event name property.
|
5273
5275
|
|
5276
|
+
|
5274
5277
|
```handlebars
|
5275
5278
|
{{input focus-in="alertMessage"}}
|
5276
5279
|
```
|
5277
5280
|
|
5281
|
+
|
5278
5282
|
See more about [Text Support Actions](/api/classes/Ember.TextField.html)
|
5279
5283
|
|
5280
5284
|
## Extension
|
@@ -7727,8 +7731,8 @@ enifed("ember-handlebars/helpers/binding",
|
|
7727
7731
|
__exports__.bindHelper = bindHelper;
|
7728
7732
|
});
|
7729
7733
|
enifed("ember-handlebars/helpers/collection",
|
7730
|
-
["ember-metal/core","ember-handlebars-compiler","ember-metal/mixin","ember-runtime/system/string","ember-metal/property_get","ember-metal/streams/simple","ember-handlebars/ext","ember-handlebars/helpers/view","ember-
|
7731
|
-
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__,
|
7734
|
+
["ember-metal/core","ember-handlebars-compiler","ember-metal/mixin","ember-runtime/system/string","ember-metal/property_get","ember-metal/streams/simple","ember-handlebars/ext","ember-handlebars/helpers/view","ember-views/views/view","ember-views/views/collection_view","exports"],
|
7735
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __exports__) {
|
7732
7736
|
"use strict";
|
7733
7737
|
/**
|
7734
7738
|
@module ember
|
@@ -7749,9 +7753,8 @@ enifed("ember-handlebars/helpers/collection",
|
|
7749
7753
|
var SimpleStream = __dependency6__["default"];
|
7750
7754
|
var handlebarsGetView = __dependency7__.handlebarsGetView;
|
7751
7755
|
var ViewHelper = __dependency8__.ViewHelper;
|
7752
|
-
var
|
7753
|
-
var
|
7754
|
-
var CollectionView = __dependency11__["default"];
|
7756
|
+
var View = __dependency9__["default"];
|
7757
|
+
var CollectionView = __dependency10__["default"];
|
7755
7758
|
|
7756
7759
|
/**
|
7757
7760
|
`{{collection}}` is a `Ember.Handlebars` helper for adding instances of
|
@@ -7984,9 +7987,9 @@ enifed("ember-handlebars/helpers/collection",
|
|
7984
7987
|
if (emptyViewClass) { hash.emptyView = emptyViewClass; }
|
7985
7988
|
|
7986
7989
|
if (hash.keyword) {
|
7987
|
-
itemHash.
|
7990
|
+
itemHash._contextBinding = '_parentView.context';
|
7988
7991
|
} else {
|
7989
|
-
itemHash.
|
7992
|
+
itemHash._contextBinding = 'content';
|
7990
7993
|
}
|
7991
7994
|
|
7992
7995
|
var viewOptions = ViewHelper.propertiesFromHTMLOptions({ data: data, hash: itemHash }, this);
|
@@ -8007,7 +8010,8 @@ enifed("ember-handlebars/helpers/collection",
|
|
8007
8010
|
viewOptions.classNameBindings = itemClassBindings;
|
8008
8011
|
}
|
8009
8012
|
|
8010
|
-
hash.itemViewClass = itemViewClass
|
8013
|
+
hash.itemViewClass = itemViewClass;
|
8014
|
+
hash._itemViewProps = viewOptions;
|
8011
8015
|
|
8012
8016
|
options.helperName = options.helperName || 'collection';
|
8013
8017
|
|
@@ -13118,7 +13122,7 @@ enifed("ember-metal/core",
|
|
13118
13122
|
|
13119
13123
|
@class Ember
|
13120
13124
|
@static
|
13121
|
-
@version 1.9.0-beta.
|
13125
|
+
@version 1.9.0-beta.4
|
13122
13126
|
*/
|
13123
13127
|
|
13124
13128
|
if ('undefined' === typeof Ember) {
|
@@ -13145,10 +13149,10 @@ enifed("ember-metal/core",
|
|
13145
13149
|
/**
|
13146
13150
|
@property VERSION
|
13147
13151
|
@type String
|
13148
|
-
@default '1.9.0-beta.
|
13152
|
+
@default '1.9.0-beta.4'
|
13149
13153
|
@static
|
13150
13154
|
*/
|
13151
|
-
Ember.VERSION = '1.9.0-beta.
|
13155
|
+
Ember.VERSION = '1.9.0-beta.4';
|
13152
13156
|
|
13153
13157
|
/**
|
13154
13158
|
Standard environmental variables. You can define these in a global `EmberENV`
|
@@ -13872,7 +13876,7 @@ enifed("ember-metal/events",
|
|
13872
13876
|
@for Ember
|
13873
13877
|
@param obj
|
13874
13878
|
@param {String} eventName
|
13875
|
-
@param {Object|Function}
|
13879
|
+
@param {Object|Function} target A target object or a function
|
13876
13880
|
@param {Function|String} method A function or the name of a function to be called on `target`
|
13877
13881
|
@param {Boolean} once A flag whether a function should only be called once
|
13878
13882
|
*/
|
@@ -13908,7 +13912,7 @@ enifed("ember-metal/events",
|
|
13908
13912
|
@for Ember
|
13909
13913
|
@param obj
|
13910
13914
|
@param {String} eventName
|
13911
|
-
@param {Object|Function}
|
13915
|
+
@param {Object|Function} target A target object or a function
|
13912
13916
|
@param {Function|String} method A function or the name of a function to be called on `target`
|
13913
13917
|
*/
|
13914
13918
|
function removeListener(obj, eventName, target, method) {
|
@@ -13960,7 +13964,7 @@ enifed("ember-metal/events",
|
|
13960
13964
|
@private
|
13961
13965
|
@param obj
|
13962
13966
|
@param {String} eventName
|
13963
|
-
@param {Object|Function}
|
13967
|
+
@param {Object|Function} target A target object or a function
|
13964
13968
|
@param {Function|String} method A function or the name of a function to be called on `target`
|
13965
13969
|
@param {Function} callback
|
13966
13970
|
*/
|
@@ -13991,8 +13995,8 @@ enifed("ember-metal/events",
|
|
13991
13995
|
|
13992
13996
|
@private
|
13993
13997
|
@param obj
|
13994
|
-
@param {Array}
|
13995
|
-
@param {Object|Function}
|
13998
|
+
@param {Array} eventNames Array of event names
|
13999
|
+
@param {Object|Function} target A target object or a function
|
13996
14000
|
@param {Function|String} method A function or the name of a function to be called on `target`
|
13997
14001
|
@param {Function} callback
|
13998
14002
|
*/
|
@@ -14645,6 +14649,7 @@ enifed("ember-metal/is_empty",
|
|
14645
14649
|
Ember.isEmpty(undefined); // true
|
14646
14650
|
Ember.isEmpty(''); // true
|
14647
14651
|
Ember.isEmpty([]); // true
|
14652
|
+
Ember.isEmpty({}); // false
|
14648
14653
|
Ember.isEmpty('Adam Hawkins'); // false
|
14649
14654
|
Ember.isEmpty([0,1,2]); // false
|
14650
14655
|
```
|
@@ -15406,7 +15411,8 @@ enifed("ember-metal/map",
|
|
15406
15411
|
|
15407
15412
|
/**
|
15408
15413
|
Iterate over all the keys and values. Calls the function once
|
15409
|
-
for each key, passing in
|
15414
|
+
for each key, passing in value, key, and the map being iterated over,
|
15415
|
+
in that order.
|
15410
15416
|
|
15411
15417
|
The keys are guaranteed to be iterated over in insertion order.
|
15412
15418
|
|
@@ -15429,11 +15435,11 @@ enifed("ember-metal/map",
|
|
15429
15435
|
if (length === 2) {
|
15430
15436
|
thisArg = arguments[1];
|
15431
15437
|
cb = function(key) {
|
15432
|
-
callback.call(thisArg, map.get(key), key);
|
15438
|
+
callback.call(thisArg, map.get(key), key, map);
|
15433
15439
|
};
|
15434
15440
|
} else {
|
15435
15441
|
cb = function(key) {
|
15436
|
-
callback(map.get(key), key);
|
15442
|
+
callback(map.get(key), key, map);
|
15437
15443
|
};
|
15438
15444
|
}
|
15439
15445
|
|
@@ -16529,12 +16535,12 @@ enifed("ember-metal/observer",
|
|
16529
16535
|
@for Ember
|
16530
16536
|
@param obj
|
16531
16537
|
@param {String} path
|
16532
|
-
@param {Object|Function}
|
16538
|
+
@param {Object|Function} target
|
16533
16539
|
@param {Function|String} [method]
|
16534
16540
|
*/
|
16535
|
-
function removeObserver(obj,
|
16536
|
-
unwatch(obj,
|
16537
|
-
removeListener(obj, changeEvent(
|
16541
|
+
function removeObserver(obj, path, target, method) {
|
16542
|
+
unwatch(obj, path);
|
16543
|
+
removeListener(obj, changeEvent(path), target, method);
|
16538
16544
|
|
16539
16545
|
return this;
|
16540
16546
|
}
|
@@ -16544,12 +16550,12 @@ enifed("ember-metal/observer",
|
|
16544
16550
|
@for Ember
|
16545
16551
|
@param obj
|
16546
16552
|
@param {String} path
|
16547
|
-
@param {Object|Function}
|
16553
|
+
@param {Object|Function} target
|
16548
16554
|
@param {Function|String} [method]
|
16549
16555
|
*/
|
16550
|
-
function addBeforeObserver(obj,
|
16551
|
-
addListener(obj, beforeEvent(
|
16552
|
-
watch(obj,
|
16556
|
+
function addBeforeObserver(obj, path, target, method) {
|
16557
|
+
addListener(obj, beforeEvent(path), target, method);
|
16558
|
+
watch(obj, path);
|
16553
16559
|
|
16554
16560
|
return this;
|
16555
16561
|
}
|
@@ -16585,12 +16591,12 @@ enifed("ember-metal/observer",
|
|
16585
16591
|
@for Ember
|
16586
16592
|
@param obj
|
16587
16593
|
@param {String} path
|
16588
|
-
@param {Object|Function}
|
16594
|
+
@param {Object|Function} target
|
16589
16595
|
@param {Function|String} [method]
|
16590
16596
|
*/
|
16591
|
-
function removeBeforeObserver(obj,
|
16592
|
-
unwatch(obj,
|
16593
|
-
removeListener(obj, beforeEvent(
|
16597
|
+
function removeBeforeObserver(obj, path, target, method) {
|
16598
|
+
unwatch(obj, path);
|
16599
|
+
removeListener(obj, beforeEvent(path), target, method);
|
16594
16600
|
|
16595
16601
|
return this;
|
16596
16602
|
}
|
@@ -19017,22 +19023,17 @@ enifed("ember-metal/utils",
|
|
19017
19023
|
this.cache = {};
|
19018
19024
|
this.cacheMeta = {};
|
19019
19025
|
this.source = obj;
|
19026
|
+
this.deps = undefined;
|
19027
|
+
this.listeners = undefined;
|
19028
|
+
this.mixins = undefined;
|
19029
|
+
this.bindings = undefined;
|
19030
|
+
this.chains = undefined;
|
19031
|
+
this.values = undefined;
|
19032
|
+
this.proto = undefined;
|
19020
19033
|
}
|
19021
19034
|
|
19022
19035
|
Meta.prototype = {
|
19023
|
-
|
19024
|
-
deps: null,
|
19025
|
-
watching: null,
|
19026
|
-
listeners: null,
|
19027
|
-
cache: null,
|
19028
|
-
cacheMeta: null,
|
19029
|
-
source: null,
|
19030
|
-
mixins: null,
|
19031
|
-
bindings: null,
|
19032
|
-
chains: null,
|
19033
|
-
chainWatchers: null,
|
19034
|
-
values: null,
|
19035
|
-
proto: null
|
19036
|
+
chainWatchers: null
|
19036
19037
|
};
|
19037
19038
|
|
19038
19039
|
if (!canDefineNonEnumerableProperties) {
|
@@ -21407,6 +21408,12 @@ enifed("ember-routing-handlebars/helpers/outlet",
|
|
21407
21408
|
property = 'main';
|
21408
21409
|
}
|
21409
21410
|
|
21411
|
+
Ember.deprecate(
|
21412
|
+
"Using {{outlet}} with an unquoted name is not supported. " +
|
21413
|
+
"Please update to quoted usage '{{outlet \"" + property + "\"}}'.",
|
21414
|
+
arguments.length === 1 || options.types[0] === 'STRING'
|
21415
|
+
);
|
21416
|
+
|
21410
21417
|
var view = options.data.view;
|
21411
21418
|
var container = view.container;
|
21412
21419
|
|
@@ -21421,9 +21428,15 @@ enifed("ember-routing-handlebars/helpers/outlet",
|
|
21421
21428
|
|
21422
21429
|
if (viewName) {
|
21423
21430
|
viewFullName = 'view:' + viewName;
|
21424
|
-
Ember.assert(
|
21425
|
-
|
21426
|
-
|
21431
|
+
Ember.assert(
|
21432
|
+
"Using a quoteless view parameter with {{outlet}} is not supported." +
|
21433
|
+
" Please update to quoted usage '{{outlet ... view=\"" + viewName + "\"}}.",
|
21434
|
+
options.hashTypes.view !== 'ID'
|
21435
|
+
);
|
21436
|
+
Ember.assert(
|
21437
|
+
"The view name you supplied '" + viewName + "' did not resolve to a view.",
|
21438
|
+
container.has(viewFullName)
|
21439
|
+
);
|
21427
21440
|
}
|
21428
21441
|
|
21429
21442
|
viewClass = viewName ? container.lookupFactory(viewFullName) : options.hash.viewClass || OutletView;
|
@@ -22037,7 +22050,7 @@ enifed("ember-routing/ext/view",
|
|
22037
22050
|
@method init
|
22038
22051
|
*/
|
22039
22052
|
init: function() {
|
22040
|
-
|
22053
|
+
this._outlets = {};
|
22041
22054
|
this._super();
|
22042
22055
|
},
|
22043
22056
|
|
@@ -29083,8 +29096,9 @@ enifed("ember-runtime/copy",
|
|
29083
29096
|
any type of object and create a clone of it, including primitive values
|
29084
29097
|
(which are not actually cloned because they are immutable).
|
29085
29098
|
|
29086
|
-
If the passed object implements the `
|
29087
|
-
will simply call that method and return the result.
|
29099
|
+
If the passed object implements the `copy()` method, then this function
|
29100
|
+
will simply call that method and return the result. Please see
|
29101
|
+
`Ember.Copyable` for further details.
|
29088
29102
|
|
29089
29103
|
@method copy
|
29090
29104
|
@for Ember
|
@@ -32546,7 +32560,7 @@ enifed("ember-runtime/mixins/mutable_array",
|
|
32546
32560
|
//
|
32547
32561
|
|
32548
32562
|
/**
|
32549
|
-
Remove all
|
32563
|
+
Remove all occurrences of an object in the array.
|
32550
32564
|
|
32551
32565
|
```javascript
|
32552
32566
|
var cities = ["Chicago", "Berlin", "Lima", "Chicago"];
|
@@ -36131,6 +36145,7 @@ enifed("ember-runtime/system/set",
|
|
36131
36145
|
@uses Ember.Copyable
|
36132
36146
|
@uses Ember.Freezable
|
36133
36147
|
@since Ember 0.9
|
36148
|
+
@deprecated
|
36134
36149
|
*/
|
36135
36150
|
__exports__["default"] = CoreObject.extend(MutableEnumerable, Copyable, Freezable, {
|
36136
36151
|
|
@@ -37756,7 +37771,7 @@ enifed("ember-testing/helpers",
|
|
37756
37771
|
Ember.Test.registerAsyncHelper('loginUser', function(app, username, password) {
|
37757
37772
|
visit('secured/path/here')
|
37758
37773
|
.fillIn('#username', username)
|
37759
|
-
.fillIn('#password',
|
37774
|
+
.fillIn('#password', password)
|
37760
37775
|
.click('.submit')
|
37761
37776
|
|
37762
37777
|
return app.testHelpers.wait();
|
@@ -40418,21 +40433,23 @@ enifed("ember-views/views/collection_view",
|
|
40418
40433
|
*/
|
40419
40434
|
arrayDidChange: function(content, start, removed, added) {
|
40420
40435
|
var addedViews = [];
|
40421
|
-
var view, item, idx, len, itemViewClass, emptyView;
|
40436
|
+
var view, item, idx, len, itemViewClass, emptyView, itemViewProps;
|
40422
40437
|
|
40423
40438
|
len = content ? get(content, 'length') : 0;
|
40424
40439
|
|
40425
40440
|
if (len) {
|
40441
|
+
itemViewProps = this._itemViewProps || {};
|
40426
40442
|
itemViewClass = get(this, 'itemViewClass');
|
40443
|
+
|
40427
40444
|
itemViewClass = readViewFactory(itemViewClass, this.container);
|
40428
40445
|
|
40429
40446
|
for (idx = start; idx < start+added; idx++) {
|
40430
40447
|
item = content.objectAt(idx);
|
40431
40448
|
|
40432
|
-
|
40433
|
-
|
40434
|
-
|
40435
|
-
|
40449
|
+
itemViewProps.content = item;
|
40450
|
+
itemViewProps.contentIndex = idx;
|
40451
|
+
|
40452
|
+
view = this.createChildView(itemViewClass, itemViewProps);
|
40436
40453
|
|
40437
40454
|
addedViews.push(view);
|
40438
40455
|
}
|
@@ -40446,6 +40463,7 @@ enifed("ember-views/views/collection_view",
|
|
40446
40463
|
}
|
40447
40464
|
|
40448
40465
|
emptyView = this.createChildView(emptyView);
|
40466
|
+
|
40449
40467
|
addedViews.push(emptyView);
|
40450
40468
|
set(this, 'emptyView', emptyView);
|
40451
40469
|
|
@@ -41115,12 +41133,9 @@ enifed("ember-views/views/container_view",
|
|
41115
41133
|
var dom = buffer.dom;
|
41116
41134
|
|
41117
41135
|
if (this.tagName === '') {
|
41118
|
-
|
41119
|
-
|
41120
|
-
|
41121
|
-
element = dom.createDocumentFragment();
|
41122
|
-
this._childViewsMorph = dom.appendMorph(element);
|
41123
|
-
}
|
41136
|
+
element = dom.createDocumentFragment();
|
41137
|
+
buffer._element = element;
|
41138
|
+
this._childViewsMorph = dom.appendMorph(element, this._morph.contextualElement);
|
41124
41139
|
} else {
|
41125
41140
|
this._childViewsMorph = dom.createMorph(element, element.lastChild, null);
|
41126
41141
|
}
|