ember-source 1.6.0.beta.4 → 1.6.0.beta.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-data-deps.js +174 -130
- data/dist/ember-data-deps.min.js +6 -6
- data/dist/ember-data-deps.prod.js +174 -130
- data/dist/ember-runtime.js +174 -130
- data/dist/ember-runtime.min.js +6 -6
- data/dist/ember-runtime.prod.js +174 -130
- data/dist/ember-spade.js +2 -2
- data/dist/ember-template-compiler.js +1 -1
- data/dist/ember-template-compiler.min.js +1 -1
- data/dist/ember-template-compiler.prod.js +1 -1
- data/dist/ember-tests.js +2 -2
- data/dist/ember.js +501 -340
- data/dist/ember.min.js +12 -12
- data/dist/ember.prod.js +502 -341
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc25ccb888bf671697975c7fc440e3c473204493
|
4
|
+
data.tar.gz: 40f151ad28c789001b907fbd183742339ef81ec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dd6c4a7d33bb9f2381a9ca3be370f252f6b3c809d8396fc93fe48e86d0c1bf579f87782522762298c3f39ed849038a8780220062388502c9e13ff577f6ad368
|
7
|
+
data.tar.gz: 43fc0f5e4b01d8c07bf5586e03d1984f9123a456cd6f744b54482e1790ef465cdb5e86aea85f0b9af88a0d2ed669f0683330aa25c079cdf4e451379a3b71dc38
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.0-beta.
|
1
|
+
1.6.0-beta.5
|
data/dist/ember-data-deps.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.6.0-beta.
|
8
|
+
* @version 1.6.0-beta.5
|
9
9
|
*/
|
10
10
|
|
11
11
|
|
@@ -1681,6 +1681,7 @@ define("ember-metal/computed",
|
|
1681
1681
|
todoList.get('done'); // true
|
1682
1682
|
```
|
1683
1683
|
|
1684
|
+
@since 1.6.0
|
1684
1685
|
@method computed.empty
|
1685
1686
|
@for Ember
|
1686
1687
|
@param {String} dependentKey
|
@@ -2172,7 +2173,7 @@ define("ember-metal/computed",
|
|
2172
2173
|
return computed(dependentKey, function(key, value) {
|
2173
2174
|
if (arguments.length > 1) {
|
2174
2175
|
set(this, dependentKey, value);
|
2175
|
-
return
|
2176
|
+
return get(this, dependentKey);
|
2176
2177
|
} else {
|
2177
2178
|
return get(this, dependentKey);
|
2178
2179
|
}
|
@@ -2325,7 +2326,7 @@ define("ember-metal/core",
|
|
2325
2326
|
|
2326
2327
|
@class Ember
|
2327
2328
|
@static
|
2328
|
-
@version 1.6.0-beta.
|
2329
|
+
@version 1.6.0-beta.5
|
2329
2330
|
*/
|
2330
2331
|
|
2331
2332
|
if ('undefined' === typeof Ember) {
|
@@ -2352,10 +2353,10 @@ define("ember-metal/core",
|
|
2352
2353
|
/**
|
2353
2354
|
@property VERSION
|
2354
2355
|
@type String
|
2355
|
-
@default '1.6.0-beta.
|
2356
|
+
@default '1.6.0-beta.5'
|
2356
2357
|
@static
|
2357
2358
|
*/
|
2358
|
-
Ember.VERSION = '1.6.0-beta.
|
2359
|
+
Ember.VERSION = '1.6.0-beta.5';
|
2359
2360
|
|
2360
2361
|
/**
|
2361
2362
|
Standard environmental variables. You can define these in a global `EmberENV`
|
@@ -2440,7 +2441,7 @@ define("ember-metal/core",
|
|
2440
2441
|
//
|
2441
2442
|
|
2442
2443
|
/**
|
2443
|
-
Determines whether Ember should
|
2444
|
+
Determines whether Ember should enhance some built-in object prototypes to
|
2444
2445
|
provide a more friendly API. If enabled, a few methods will be added to
|
2445
2446
|
`Function`, `String`, and `Array`. `Object.prototype` will not be enhanced,
|
2446
2447
|
which is the one that causes most trouble for people.
|
@@ -3216,24 +3217,25 @@ define("ember-metal/events",
|
|
3216
3217
|
__exports__.listenersUnion = listenersUnion;
|
3217
3218
|
});
|
3218
3219
|
define("ember-metal/expand_properties",
|
3219
|
-
["ember-metal/enumerable_utils","exports"],
|
3220
|
-
function(__dependency1__, __exports__) {
|
3220
|
+
["ember-metal/error","ember-metal/enumerable_utils","exports"],
|
3221
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
3221
3222
|
"use strict";
|
3222
|
-
var
|
3223
|
+
var EmberError = __dependency1__["default"];
|
3224
|
+
var EnumerableUtils = __dependency2__["default"];
|
3223
3225
|
|
3224
3226
|
/**
|
3225
3227
|
@module ember-metal
|
3226
3228
|
*/
|
3227
3229
|
|
3228
3230
|
var forEach = EnumerableUtils.forEach,
|
3229
|
-
|
3231
|
+
BRACE_EXPANSION = /^((?:[^\.]*\.)*)\{(.*)\}$/;
|
3230
3232
|
|
3231
3233
|
/**
|
3232
3234
|
Expands `pattern`, invoking `callback` for each expansion.
|
3233
3235
|
|
3234
3236
|
The only pattern supported is brace-expansion, anything else will be passed
|
3235
3237
|
once to `callback` directly. Brace expansion can only appear at the end of a
|
3236
|
-
pattern, for example
|
3238
|
+
pattern, for an example see the last call below.
|
3237
3239
|
|
3238
3240
|
Example
|
3239
3241
|
```js
|
@@ -3254,12 +3256,17 @@ define("ember-metal/expand_properties",
|
|
3254
3256
|
function expandProperties(pattern, callback) {
|
3255
3257
|
var match, prefix, list;
|
3256
3258
|
|
3259
|
+
if (pattern.indexOf(' ') > -1) {
|
3260
|
+
throw new EmberError('Brace expanded properties cannot contain spaces, ' +
|
3261
|
+
'e.g. `user.{firstName, lastName}` should be `user.{firstName,lastName}`');
|
3262
|
+
}
|
3263
|
+
|
3257
3264
|
if (match = BRACE_EXPANSION.exec(pattern)) {
|
3258
3265
|
prefix = match[1];
|
3259
3266
|
list = match[2];
|
3260
3267
|
|
3261
3268
|
forEach(list.split(','), function (suffix) {
|
3262
|
-
|
3269
|
+
callback(prefix + suffix);
|
3263
3270
|
});
|
3264
3271
|
} else {
|
3265
3272
|
callback(pattern);
|
@@ -6922,7 +6929,7 @@ define("ember-metal/run_loop",
|
|
6922
6929
|
|
6923
6930
|
/**
|
6924
6931
|
Ensure that the target method is never called more frequently than
|
6925
|
-
the specified spacing period.
|
6932
|
+
the specified spacing period. The target method is called immediately.
|
6926
6933
|
|
6927
6934
|
```javascript
|
6928
6935
|
var myFunc = function() { console.log(this.name + ' ran.'); };
|
@@ -6930,6 +6937,7 @@ define("ember-metal/run_loop",
|
|
6930
6937
|
|
6931
6938
|
run.throttle(myContext, myFunc, 150);
|
6932
6939
|
// myFunc is invoked with context myContext
|
6940
|
+
// console logs 'throttle ran.'
|
6933
6941
|
|
6934
6942
|
// 50ms passes
|
6935
6943
|
run.throttle(myContext, myFunc, 150);
|
@@ -6940,7 +6948,7 @@ define("ember-metal/run_loop",
|
|
6940
6948
|
// 150ms passes
|
6941
6949
|
run.throttle(myContext, myFunc, 150);
|
6942
6950
|
// myFunc is invoked with context myContext
|
6943
|
-
// console logs 'throttle ran.'
|
6951
|
+
// console logs 'throttle ran.'
|
6944
6952
|
```
|
6945
6953
|
|
6946
6954
|
@method throttle
|
@@ -6950,6 +6958,8 @@ define("ember-metal/run_loop",
|
|
6950
6958
|
then it will be looked up on the passed target.
|
6951
6959
|
@param {Object} [args*] Optional arguments to pass to the timeout.
|
6952
6960
|
@param {Number} spacing Number of milliseconds to space out requests.
|
6961
|
+
@param {Boolean} immediate Trigger the function on the leading instead
|
6962
|
+
of the trailing edge of the wait interval. Defaults to true.
|
6953
6963
|
@return {Array} Timer information for use in cancelling, see `run.cancel`.
|
6954
6964
|
*/
|
6955
6965
|
run.throttle = function() {
|
@@ -7400,7 +7410,7 @@ define("ember-metal/utils",
|
|
7400
7410
|
*/
|
7401
7411
|
// ES6TODO: Move up to runtime? This is only use in ember-metal by concatenatedProperties
|
7402
7412
|
function isArray(obj) {
|
7403
|
-
var modulePath;
|
7413
|
+
var modulePath, type;
|
7404
7414
|
|
7405
7415
|
if (typeof EmberArray === "undefined") {
|
7406
7416
|
modulePath = 'ember-runtime/mixins/array';
|
@@ -7412,7 +7422,10 @@ define("ember-metal/utils",
|
|
7412
7422
|
if (!obj || obj.setInterval) { return false; }
|
7413
7423
|
if (Array.isArray && Array.isArray(obj)) { return true; }
|
7414
7424
|
if (EmberArray && EmberArray.detect(obj)) { return true; }
|
7415
|
-
|
7425
|
+
|
7426
|
+
type = typeOf(obj);
|
7427
|
+
if ('array' === type) { return true; }
|
7428
|
+
if ((obj.length !== undefined) && 'object' === type) { return true; }
|
7416
7429
|
return false;
|
7417
7430
|
};
|
7418
7431
|
|
@@ -7817,18 +7830,20 @@ define("ember-metal/utils",
|
|
7817
7830
|
__exports__.applyStr = applyStr;
|
7818
7831
|
__exports__.apply = apply;
|
7819
7832
|
});
|
7820
|
-
define("backburner",
|
7821
|
-
["backburner/deferred_action_queues","exports"],
|
7822
|
-
function(__dependency1__, __exports__) {
|
7833
|
+
define("backburner",
|
7834
|
+
["backburner/utils","backburner/deferred_action_queues","exports"],
|
7835
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
7823
7836
|
"use strict";
|
7824
|
-
var
|
7837
|
+
var Utils = __dependency1__["default"];
|
7838
|
+
var DeferredActionQueues = __dependency2__.DeferredActionQueues;
|
7825
7839
|
|
7826
7840
|
var slice = [].slice,
|
7827
7841
|
pop = [].pop,
|
7828
|
-
|
7829
|
-
|
7842
|
+
each = Utils.each,
|
7843
|
+
isString = Utils.isString,
|
7844
|
+
isFunction = Utils.isFunction,
|
7845
|
+
isNumber = Utils.isNumber,
|
7830
7846
|
timers = [],
|
7831
|
-
autorun, laterTimer, laterTimerExpiresAt,
|
7832
7847
|
global = this,
|
7833
7848
|
NUMBER = /\d+/;
|
7834
7849
|
|
@@ -7842,7 +7857,7 @@ define("backburner",
|
|
7842
7857
|
})();
|
7843
7858
|
|
7844
7859
|
function isCoercableNumber(number) {
|
7845
|
-
return
|
7860
|
+
return isNumber(number) || NUMBER.test(number);
|
7846
7861
|
}
|
7847
7862
|
|
7848
7863
|
function Backburner(queueNames, options) {
|
@@ -7852,6 +7867,8 @@ define("backburner",
|
|
7852
7867
|
this.options.defaultQueue = queueNames[0];
|
7853
7868
|
}
|
7854
7869
|
this.instanceStack = [];
|
7870
|
+
this._debouncees = [];
|
7871
|
+
this._throttlers = [];
|
7855
7872
|
}
|
7856
7873
|
|
7857
7874
|
Backburner.prototype = {
|
@@ -7905,8 +7922,7 @@ define("backburner",
|
|
7905
7922
|
},
|
7906
7923
|
|
7907
7924
|
run: function(target, method /*, args */) {
|
7908
|
-
var
|
7909
|
-
ret, length = arguments.length;
|
7925
|
+
var onError = getOnError(this.options);
|
7910
7926
|
|
7911
7927
|
this.begin();
|
7912
7928
|
|
@@ -7915,11 +7931,10 @@ define("backburner",
|
|
7915
7931
|
target = null;
|
7916
7932
|
}
|
7917
7933
|
|
7918
|
-
if (
|
7934
|
+
if (isString(method)) {
|
7919
7935
|
method = target[method];
|
7920
7936
|
}
|
7921
7937
|
|
7922
|
-
var onError = options.onError || (options.onErrorTarget && options.onErrorTarget[options.onErrorMethod]);
|
7923
7938
|
var args = slice.call(arguments, 2);
|
7924
7939
|
|
7925
7940
|
// guard against Safari 6's double-finally bug
|
@@ -7954,7 +7969,7 @@ define("backburner",
|
|
7954
7969
|
target = null;
|
7955
7970
|
}
|
7956
7971
|
|
7957
|
-
if (
|
7972
|
+
if (isString(method)) {
|
7958
7973
|
method = target[method];
|
7959
7974
|
}
|
7960
7975
|
|
@@ -7970,7 +7985,7 @@ define("backburner",
|
|
7970
7985
|
target = null;
|
7971
7986
|
}
|
7972
7987
|
|
7973
|
-
if (
|
7988
|
+
if (isString(method)) {
|
7974
7989
|
method = target[method];
|
7975
7990
|
}
|
7976
7991
|
|
@@ -7981,12 +7996,10 @@ define("backburner",
|
|
7981
7996
|
},
|
7982
7997
|
|
7983
7998
|
setTimeout: function() {
|
7984
|
-
var args = slice.call(arguments)
|
7985
|
-
|
7986
|
-
|
7987
|
-
|
7988
|
-
var methodOrTarget, methodOrWait, methodOrArgs;
|
7989
|
-
var options = this.options;
|
7999
|
+
var args = slice.call(arguments),
|
8000
|
+
length = args.length,
|
8001
|
+
method, wait, target,
|
8002
|
+
methodOrTarget, methodOrWait, methodOrArgs;
|
7990
8003
|
|
7991
8004
|
if (length === 0) {
|
7992
8005
|
return;
|
@@ -7997,7 +8010,7 @@ define("backburner",
|
|
7997
8010
|
methodOrTarget = args[0];
|
7998
8011
|
methodOrWait = args[1];
|
7999
8012
|
|
8000
|
-
if (
|
8013
|
+
if (isFunction(methodOrWait) || isFunction(methodOrTarget[methodOrWait])) {
|
8001
8014
|
target = args.shift();
|
8002
8015
|
method = args.shift();
|
8003
8016
|
wait = 0;
|
@@ -8020,9 +8033,9 @@ define("backburner",
|
|
8020
8033
|
methodOrTarget = args[0];
|
8021
8034
|
methodOrArgs = args[1];
|
8022
8035
|
|
8023
|
-
if (
|
8024
|
-
|
8025
|
-
|
8036
|
+
if (isFunction(methodOrArgs) || (isString(methodOrArgs) &&
|
8037
|
+
methodOrTarget !== null &&
|
8038
|
+
methodOrArgs in methodOrTarget)) {
|
8026
8039
|
target = args.shift();
|
8027
8040
|
method = args.shift();
|
8028
8041
|
} else {
|
@@ -8032,11 +8045,11 @@ define("backburner",
|
|
8032
8045
|
|
8033
8046
|
var executeAt = (+new Date()) + parseInt(wait, 10);
|
8034
8047
|
|
8035
|
-
if (
|
8048
|
+
if (isString(method)) {
|
8036
8049
|
method = target[method];
|
8037
8050
|
}
|
8038
8051
|
|
8039
|
-
var onError =
|
8052
|
+
var onError = getOnError(this.options);
|
8040
8053
|
|
8041
8054
|
function fn() {
|
8042
8055
|
if (onError) {
|
@@ -8055,7 +8068,7 @@ define("backburner",
|
|
8055
8068
|
|
8056
8069
|
timers.splice(i, 0, executeAt, fn);
|
8057
8070
|
|
8058
|
-
updateLaterTimer(
|
8071
|
+
updateLaterTimer(this, executeAt, wait);
|
8059
8072
|
|
8060
8073
|
return fn;
|
8061
8074
|
},
|
@@ -8069,7 +8082,7 @@ define("backburner",
|
|
8069
8082
|
index,
|
8070
8083
|
timer;
|
8071
8084
|
|
8072
|
-
if (
|
8085
|
+
if (isNumber(immediate) || isString(immediate)) {
|
8073
8086
|
wait = immediate;
|
8074
8087
|
immediate = true;
|
8075
8088
|
} else {
|
@@ -8078,15 +8091,17 @@ define("backburner",
|
|
8078
8091
|
|
8079
8092
|
wait = parseInt(wait, 10);
|
8080
8093
|
|
8081
|
-
index = findThrottler(target, method);
|
8082
|
-
if (index > -1) { return
|
8094
|
+
index = findThrottler(target, method, this._throttlers);
|
8095
|
+
if (index > -1) { return this._throttlers[index]; } // throttled
|
8083
8096
|
|
8084
8097
|
timer = global.setTimeout(function() {
|
8085
8098
|
if (!immediate) {
|
8086
8099
|
self.run.apply(self, args);
|
8087
8100
|
}
|
8088
|
-
var index = findThrottler(target, method);
|
8089
|
-
if (index > -1) {
|
8101
|
+
var index = findThrottler(target, method, self._throttlers);
|
8102
|
+
if (index > -1) {
|
8103
|
+
self._throttlers.splice(index, 1);
|
8104
|
+
}
|
8090
8105
|
}, wait);
|
8091
8106
|
|
8092
8107
|
if (immediate) {
|
@@ -8095,7 +8110,7 @@ define("backburner",
|
|
8095
8110
|
|
8096
8111
|
throttler = [target, method, timer];
|
8097
8112
|
|
8098
|
-
|
8113
|
+
this._throttlers.push(throttler);
|
8099
8114
|
|
8100
8115
|
return throttler;
|
8101
8116
|
},
|
@@ -8109,7 +8124,7 @@ define("backburner",
|
|
8109
8124
|
debouncee,
|
8110
8125
|
timer;
|
8111
8126
|
|
8112
|
-
if (
|
8127
|
+
if (isNumber(immediate) || isString(immediate)) {
|
8113
8128
|
wait = immediate;
|
8114
8129
|
immediate = false;
|
8115
8130
|
} else {
|
@@ -8118,11 +8133,11 @@ define("backburner",
|
|
8118
8133
|
|
8119
8134
|
wait = parseInt(wait, 10);
|
8120
8135
|
// Remove debouncee
|
8121
|
-
index = findDebouncee(target, method);
|
8136
|
+
index = findDebouncee(target, method, this._debouncees);
|
8122
8137
|
|
8123
8138
|
if (index > -1) {
|
8124
|
-
debouncee =
|
8125
|
-
|
8139
|
+
debouncee = this._debouncees[index];
|
8140
|
+
this._debouncees.splice(index, 1);
|
8126
8141
|
clearTimeout(debouncee[2]);
|
8127
8142
|
}
|
8128
8143
|
|
@@ -8130,9 +8145,9 @@ define("backburner",
|
|
8130
8145
|
if (!immediate) {
|
8131
8146
|
self.run.apply(self, args);
|
8132
8147
|
}
|
8133
|
-
var index = findDebouncee(target, method);
|
8148
|
+
var index = findDebouncee(target, method, self._debouncees);
|
8134
8149
|
if (index > -1) {
|
8135
|
-
|
8150
|
+
self._debouncees.splice(index, 1);
|
8136
8151
|
}
|
8137
8152
|
}, wait);
|
8138
8153
|
|
@@ -8142,38 +8157,36 @@ define("backburner",
|
|
8142
8157
|
|
8143
8158
|
debouncee = [target, method, timer];
|
8144
8159
|
|
8145
|
-
|
8160
|
+
self._debouncees.push(debouncee);
|
8146
8161
|
|
8147
8162
|
return debouncee;
|
8148
8163
|
},
|
8149
8164
|
|
8150
8165
|
cancelTimers: function() {
|
8151
|
-
var
|
8166
|
+
var clearItems = function(item) {
|
8167
|
+
clearTimeout(item[2]);
|
8168
|
+
};
|
8152
8169
|
|
8153
|
-
|
8154
|
-
|
8155
|
-
}
|
8156
|
-
throttlers = [];
|
8170
|
+
each(this._throttlers, clearItems);
|
8171
|
+
this._throttlers = [];
|
8157
8172
|
|
8158
|
-
|
8159
|
-
|
8160
|
-
}
|
8161
|
-
debouncees = [];
|
8173
|
+
each(this._debouncees, clearItems);
|
8174
|
+
this._debouncees = [];
|
8162
8175
|
|
8163
|
-
if (
|
8164
|
-
clearTimeout(
|
8165
|
-
|
8176
|
+
if (this._laterTimer) {
|
8177
|
+
clearTimeout(this._laterTimer);
|
8178
|
+
this._laterTimer = null;
|
8166
8179
|
}
|
8167
8180
|
timers = [];
|
8168
8181
|
|
8169
|
-
if (
|
8170
|
-
clearTimeout(
|
8171
|
-
|
8182
|
+
if (this._autorun) {
|
8183
|
+
clearTimeout(this._autorun);
|
8184
|
+
this._autorun = null;
|
8172
8185
|
}
|
8173
8186
|
},
|
8174
8187
|
|
8175
8188
|
hasTimers: function() {
|
8176
|
-
return !!timers.length || !!
|
8189
|
+
return !!timers.length || !!this._debouncees.length || !!this._throttlers.length || this._autorun;
|
8177
8190
|
},
|
8178
8191
|
|
8179
8192
|
cancel: function(timer) {
|
@@ -8189,8 +8202,8 @@ define("backburner",
|
|
8189
8202
|
}
|
8190
8203
|
}
|
8191
8204
|
} else if (Object.prototype.toString.call(timer) === "[object Array]"){ // we're cancelling a throttle or debounce
|
8192
|
-
return this._cancelItem(findThrottler,
|
8193
|
-
this._cancelItem(findDebouncee,
|
8205
|
+
return this._cancelItem(findThrottler, this._throttlers, timer) ||
|
8206
|
+
this._cancelItem(findDebouncee, this._debouncees, timer);
|
8194
8207
|
} else {
|
8195
8208
|
return; // timer was null or not a timer
|
8196
8209
|
}
|
@@ -8202,7 +8215,7 @@ define("backburner",
|
|
8202
8215
|
|
8203
8216
|
if (timer.length < 3) { return false; }
|
8204
8217
|
|
8205
|
-
index = findMethod(timer[0], timer[1]);
|
8218
|
+
index = findMethod(timer[0], timer[1], array);
|
8206
8219
|
|
8207
8220
|
if(index > -1) {
|
8208
8221
|
|
@@ -8225,44 +8238,43 @@ define("backburner",
|
|
8225
8238
|
|
8226
8239
|
if (needsIETryCatchFix) {
|
8227
8240
|
var originalRun = Backburner.prototype.run;
|
8228
|
-
Backburner.prototype.run =
|
8229
|
-
try {
|
8230
|
-
originalRun.apply(this, arguments);
|
8231
|
-
} catch (e) {
|
8232
|
-
throw e;
|
8233
|
-
}
|
8234
|
-
};
|
8241
|
+
Backburner.prototype.run = wrapInTryCatch(originalRun);
|
8235
8242
|
|
8236
8243
|
var originalEnd = Backburner.prototype.end;
|
8237
|
-
Backburner.prototype.end =
|
8244
|
+
Backburner.prototype.end = wrapInTryCatch(originalEnd);
|
8245
|
+
}
|
8246
|
+
|
8247
|
+
function wrapInTryCatch(func) {
|
8248
|
+
return function () {
|
8238
8249
|
try {
|
8239
|
-
|
8250
|
+
return func.apply(this, arguments);
|
8240
8251
|
} catch (e) {
|
8241
8252
|
throw e;
|
8242
8253
|
}
|
8243
8254
|
};
|
8244
8255
|
}
|
8245
8256
|
|
8257
|
+
function getOnError(options) {
|
8258
|
+
return options.onError || (options.onErrorTarget && options.onErrorTarget[options.onErrorMethod]);
|
8259
|
+
}
|
8260
|
+
|
8246
8261
|
|
8247
8262
|
function createAutorun(backburner) {
|
8248
8263
|
backburner.begin();
|
8249
|
-
|
8250
|
-
|
8264
|
+
backburner._autorun = global.setTimeout(function() {
|
8265
|
+
backburner._autorun = null;
|
8251
8266
|
backburner.end();
|
8252
8267
|
});
|
8253
8268
|
}
|
8254
8269
|
|
8255
8270
|
function updateLaterTimer(self, executeAt, wait) {
|
8256
|
-
if (!
|
8257
|
-
|
8258
|
-
|
8259
|
-
|
8260
|
-
laterTimer = global.setTimeout(function() {
|
8261
|
-
laterTimer = null;
|
8262
|
-
laterTimerExpiresAt = null;
|
8271
|
+
if (!self._laterTimer || executeAt < self._laterTimerExpiresAt) {
|
8272
|
+
self._laterTimer = global.setTimeout(function() {
|
8273
|
+
self._laterTimer = null;
|
8274
|
+
self._laterTimerExpiresAt = null;
|
8263
8275
|
executeTimers(self);
|
8264
8276
|
}, wait);
|
8265
|
-
|
8277
|
+
self._laterTimerExpiresAt = executeAt;
|
8266
8278
|
}
|
8267
8279
|
}
|
8268
8280
|
|
@@ -8285,28 +8297,21 @@ define("backburner",
|
|
8285
8297
|
}
|
8286
8298
|
}
|
8287
8299
|
|
8288
|
-
function findDebouncee(target, method) {
|
8289
|
-
|
8290
|
-
|
8291
|
-
|
8292
|
-
for (var i = 0, l = debouncees.length; i < l; i++) {
|
8293
|
-
debouncee = debouncees[i];
|
8294
|
-
if (debouncee[0] === target && debouncee[1] === method) {
|
8295
|
-
index = i;
|
8296
|
-
break;
|
8297
|
-
}
|
8298
|
-
}
|
8300
|
+
function findDebouncee(target, method, debouncees) {
|
8301
|
+
return findItem(target, method, debouncees);
|
8302
|
+
}
|
8299
8303
|
|
8300
|
-
|
8304
|
+
function findThrottler(target, method, throttlers) {
|
8305
|
+
return findItem(target, method, throttlers);
|
8301
8306
|
}
|
8302
8307
|
|
8303
|
-
function
|
8304
|
-
var
|
8308
|
+
function findItem(target, method, collection) {
|
8309
|
+
var item,
|
8305
8310
|
index = -1;
|
8306
8311
|
|
8307
|
-
for (var i = 0, l =
|
8308
|
-
|
8309
|
-
if (
|
8312
|
+
for (var i = 0, l = collection.length; i < l; i++) {
|
8313
|
+
item = collection[i];
|
8314
|
+
if (item[0] === target && item[1] === method) {
|
8310
8315
|
index = i;
|
8311
8316
|
break;
|
8312
8317
|
}
|
@@ -8341,11 +8346,15 @@ define("backburner",
|
|
8341
8346
|
|
8342
8347
|
__exports__.Backburner = Backburner;
|
8343
8348
|
});
|
8344
|
-
define("backburner/deferred_action_queues",
|
8345
|
-
["backburner/queue","exports"],
|
8346
|
-
function(__dependency1__, __exports__) {
|
8349
|
+
define("backburner/deferred_action_queues",
|
8350
|
+
["backburner/utils","backburner/queue","exports"],
|
8351
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
8347
8352
|
"use strict";
|
8348
|
-
var
|
8353
|
+
var Utils = __dependency1__["default"];
|
8354
|
+
var Queue = __dependency2__.Queue;
|
8355
|
+
|
8356
|
+
var each = Utils.each,
|
8357
|
+
isString = Utils.isString;
|
8349
8358
|
|
8350
8359
|
function DeferredActionQueues(queueNames, options) {
|
8351
8360
|
var queues = this.queues = {};
|
@@ -8353,11 +8362,9 @@ define("backburner/deferred_action_queues",
|
|
8353
8362
|
|
8354
8363
|
this.options = options;
|
8355
8364
|
|
8356
|
-
|
8357
|
-
|
8358
|
-
|
8359
|
-
queues[queueName] = new Queue(this, queueName, this.options);
|
8360
|
-
}
|
8365
|
+
each(queueNames, function(queueName) {
|
8366
|
+
queues[queueName] = new Queue(this, queueName, options);
|
8367
|
+
});
|
8361
8368
|
}
|
8362
8369
|
|
8363
8370
|
DeferredActionQueues.prototype = {
|
@@ -8428,7 +8435,7 @@ define("backburner/deferred_action_queues",
|
|
8428
8435
|
args = queueItems[queueIndex+2];
|
8429
8436
|
stack = queueItems[queueIndex+3]; // Debugging assistance
|
8430
8437
|
|
8431
|
-
if (
|
8438
|
+
if (isString(method)) { method = target[method]; }
|
8432
8439
|
|
8433
8440
|
// method could have been nullified / canceled during flush
|
8434
8441
|
if (method) {
|
@@ -8465,7 +8472,7 @@ define("backburner/deferred_action_queues",
|
|
8465
8472
|
|
8466
8473
|
__exports__.DeferredActionQueues = DeferredActionQueues;
|
8467
8474
|
});
|
8468
|
-
define("backburner/queue",
|
8475
|
+
define("backburner/queue",
|
8469
8476
|
["exports"],
|
8470
8477
|
function(__exports__) {
|
8471
8478
|
"use strict";
|
@@ -8504,7 +8511,7 @@ define("backburner/queue",
|
|
8504
8511
|
}
|
8505
8512
|
}
|
8506
8513
|
|
8507
|
-
|
8514
|
+
queue.push(target, method, args, stack);
|
8508
8515
|
return {queue: this, target: target, method: method};
|
8509
8516
|
},
|
8510
8517
|
|
@@ -8594,6 +8601,31 @@ define("backburner/queue",
|
|
8594
8601
|
|
8595
8602
|
__exports__.Queue = Queue;
|
8596
8603
|
});
|
8604
|
+
define("backburner/utils",
|
8605
|
+
["exports"],
|
8606
|
+
function(__exports__) {
|
8607
|
+
"use strict";
|
8608
|
+
__exports__["default"] = {
|
8609
|
+
each: function(collection, callback) {
|
8610
|
+
for (var i = 0; i < collection.length; i++) {
|
8611
|
+
callback(collection[i]);
|
8612
|
+
}
|
8613
|
+
},
|
8614
|
+
|
8615
|
+
isString: function(suspect) {
|
8616
|
+
return typeof suspect === 'string';
|
8617
|
+
},
|
8618
|
+
|
8619
|
+
isFunction: function(suspect) {
|
8620
|
+
return typeof suspect === 'function';
|
8621
|
+
},
|
8622
|
+
|
8623
|
+
isNumber: function(suspect) {
|
8624
|
+
return typeof suspect === 'number';
|
8625
|
+
}
|
8626
|
+
};
|
8627
|
+
});
|
8628
|
+
|
8597
8629
|
define("ember-metal/watch_key",
|
8598
8630
|
["ember-metal/core","ember-metal/utils","ember-metal/platform","exports"],
|
8599
8631
|
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
@@ -14133,7 +14165,7 @@ define("ember-runtime/controllers/array_controller",
|
|
14133
14165
|
init: function() {
|
14134
14166
|
this._super();
|
14135
14167
|
|
14136
|
-
this.set('_subControllers',
|
14168
|
+
this.set('_subControllers', [ ]);
|
14137
14169
|
},
|
14138
14170
|
|
14139
14171
|
content: computed(function () {
|
@@ -14183,13 +14215,23 @@ define("ember-runtime/controllers/array_controller",
|
|
14183
14215
|
|
14184
14216
|
_resetSubControllers: function() {
|
14185
14217
|
var subControllers = get(this, '_subControllers');
|
14186
|
-
|
14187
|
-
|
14188
|
-
|
14189
|
-
|
14218
|
+
var controller;
|
14219
|
+
|
14220
|
+
if (subControllers.length) {
|
14221
|
+
for (var i = 0, length = subControllers.length; length > i; i++) {
|
14222
|
+
controller = subControllers[i];
|
14223
|
+
if (controller) {
|
14224
|
+
controller.destroy();
|
14225
|
+
}
|
14226
|
+
}
|
14227
|
+
|
14228
|
+
subControllers.length = 0;
|
14190
14229
|
}
|
14230
|
+
},
|
14191
14231
|
|
14192
|
-
|
14232
|
+
willDestroy: function() {
|
14233
|
+
this._resetSubControllers();
|
14234
|
+
this._super();
|
14193
14235
|
}
|
14194
14236
|
});
|
14195
14237
|
|
@@ -17649,7 +17691,9 @@ define("ember-runtime/mixins/mutable_enumerable",
|
|
17649
17691
|
*/
|
17650
17692
|
removeObjects: function(objects) {
|
17651
17693
|
beginPropertyChanges(this);
|
17652
|
-
|
17694
|
+
for (var i = objects.length - 1; i >= 0; i--) {
|
17695
|
+
this.removeObject(objects[i]);
|
17696
|
+
}
|
17653
17697
|
endPropertyChanges(this);
|
17654
17698
|
return this;
|
17655
17699
|
}
|