ember-source 1.13.10 → 1.13.11

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.

@@ -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.13.10
8
+ * @version 1.13.11
9
9
  */
10
10
 
11
11
  (function() {
@@ -128,9 +128,23 @@ enifed('backburner', ['exports', './backburner/utils', './backburner/platform',
128
128
  this.instanceStack = [];
129
129
  this._debouncees = [];
130
130
  this._throttlers = [];
131
+ this._eventCallbacks = {
132
+ end: [],
133
+ begin: []
134
+ };
135
+
136
+ this._timerTimeoutId = undefined;
131
137
  this._timers = [];
138
+
139
+ var _this = this;
140
+ this._boundRunExpiredTimers = function () {
141
+ _this._runExpiredTimers();
142
+ };
132
143
  }
133
144
 
145
+ // ms of delay before we conclude a timeout was lost
146
+ var TIMEOUT_STALLED_THRESHOLD = 1000;
147
+
134
148
  Backburner.prototype = {
135
149
  begin: function () {
136
150
  var options = this.options;
@@ -142,6 +156,7 @@ enifed('backburner', ['exports', './backburner/utils', './backburner/platform',
142
156
  }
143
157
 
144
158
  this.currentInstance = new _backburnerDeferredActionQueues["default"](this.queueNames, options);
159
+ this._trigger('begin', this.currentInstance, previousInstance);
145
160
  if (onBegin) {
146
161
  onBegin(this.currentInstance, previousInstance);
147
162
  }
@@ -168,7 +183,7 @@ enifed('backburner', ['exports', './backburner/utils', './backburner/platform',
168
183
  nextInstance = this.instanceStack.pop();
169
184
  this.currentInstance = nextInstance;
170
185
  }
171
-
186
+ this._trigger('end', currentInstance, nextInstance);
172
187
  if (onEnd) {
173
188
  onEnd(currentInstance, nextInstance);
174
189
  }
@@ -176,6 +191,60 @@ enifed('backburner', ['exports', './backburner/utils', './backburner/platform',
176
191
  }
177
192
  },
178
193
 
194
+ /**
195
+ Trigger an event. Supports up to two arguments. Designed around
196
+ triggering transition events from one run loop instance to the
197
+ next, which requires an argument for the first instance and then
198
+ an argument for the next instance.
199
+ @private
200
+ @method _trigger
201
+ @param {String} eventName
202
+ @param {any} arg1
203
+ @param {any} arg2
204
+ */
205
+ _trigger: function (eventName, arg1, arg2) {
206
+ var callbacks = this._eventCallbacks[eventName];
207
+ if (callbacks) {
208
+ for (var i = 0; i < callbacks.length; i++) {
209
+ callbacks[i](arg1, arg2);
210
+ }
211
+ }
212
+ },
213
+
214
+ on: function (eventName, callback) {
215
+ if (typeof callback !== 'function') {
216
+ throw new TypeError('Callback must be a function');
217
+ }
218
+ var callbacks = this._eventCallbacks[eventName];
219
+ if (callbacks) {
220
+ callbacks.push(callback);
221
+ } else {
222
+ throw new TypeError('Cannot on() event "' + eventName + '" because it does not exist');
223
+ }
224
+ },
225
+
226
+ off: function (eventName, callback) {
227
+ if (eventName) {
228
+ var callbacks = this._eventCallbacks[eventName];
229
+ var callbackFound = false;
230
+ if (!callbacks) return;
231
+ if (callback) {
232
+ for (var i = 0; i < callbacks.length; i++) {
233
+ if (callbacks[i] === callback) {
234
+ callbackFound = true;
235
+ callbacks.splice(i, 1);
236
+ i--;
237
+ }
238
+ }
239
+ }
240
+ if (!callbackFound) {
241
+ throw new TypeError('Cannot off() callback that does not exist');
242
+ }
243
+ } else {
244
+ throw new TypeError('Cannot off() event "' + eventName + '" because it does not exist');
245
+ }
246
+ },
247
+
179
248
  run: function () /* target, method, args */{
180
249
  var length = arguments.length;
181
250
  var method, target, args;
@@ -231,39 +300,60 @@ enifed('backburner', ['exports', './backburner/utils', './backburner/platform',
231
300
  }
232
301
  },
233
302
 
303
+ /*
304
+ Join the passed method with an existing queue and execute immediately,
305
+ if there isn't one use `Backburner#run`.
306
+ The join method is like the run method except that it will schedule into
307
+ an existing queue if one already exists. In either case, the join method will
308
+ immediately execute the passed in function and return its result.
309
+ @method join
310
+ @param {Object} target
311
+ @param {Function} method The method to be executed
312
+ @param {any} args The method arguments
313
+ @return method result
314
+ */
234
315
  join: function () /* target, method, args */{
235
- if (this.currentInstance) {
236
- var length = arguments.length;
237
- var method, target;
316
+ if (!this.currentInstance) {
317
+ return this.run.apply(this, arguments);
318
+ }
238
319
 
239
- if (length === 1) {
240
- method = arguments[0];
241
- target = null;
242
- } else {
243
- target = arguments[0];
244
- method = arguments[1];
245
- }
320
+ var length = arguments.length;
321
+ var method, target;
246
322
 
247
- if (_backburnerUtils.isString(method)) {
248
- method = target[method];
249
- }
323
+ if (length === 1) {
324
+ method = arguments[0];
325
+ target = null;
326
+ } else {
327
+ target = arguments[0];
328
+ method = arguments[1];
329
+ }
250
330
 
251
- if (length === 1) {
252
- return method();
253
- } else if (length === 2) {
254
- return method.call(target);
255
- } else {
256
- var args = new Array(length - 2);
257
- for (var i = 0, l = length - 2; i < l; i++) {
258
- args[i] = arguments[i + 2];
259
- }
260
- return method.apply(target, args);
261
- }
331
+ if (_backburnerUtils.isString(method)) {
332
+ method = target[method];
333
+ }
334
+
335
+ if (length === 1) {
336
+ return method();
337
+ } else if (length === 2) {
338
+ return method.call(target);
262
339
  } else {
263
- return this.run.apply(this, arguments);
340
+ var args = new Array(length - 2);
341
+ for (var i = 0, l = length - 2; i < l; i++) {
342
+ args[i] = arguments[i + 2];
343
+ }
344
+ return method.apply(target, args);
264
345
  }
265
346
  },
266
347
 
348
+ /*
349
+ Defer the passed function to run inside the specified queue.
350
+ @method defer
351
+ @param {String} queueName
352
+ @param {Object} target
353
+ @param {Function|String} method The method or method name to be executed
354
+ @param {any} args The method arguments
355
+ @return method result
356
+ */
267
357
  defer: function (queueName /* , target, method, args */) {
268
358
  var length = arguments.length;
269
359
  var method, target, args;
@@ -406,12 +496,27 @@ enifed('backburner', ['exports', './backburner/utils', './backburner/platform',
406
496
  }
407
497
  }
408
498
 
499
+ return this._setTimeout(fn, executeAt);
500
+ },
501
+
502
+ _setTimeout: function (fn, executeAt) {
503
+ if (this._timers.length === 0) {
504
+ this._timers.push(executeAt, fn);
505
+ this._installTimerTimeout();
506
+ return fn;
507
+ }
508
+
509
+ this._reinstallStalledTimerTimeout();
510
+
409
511
  // find position to insert
410
512
  var i = _backburnerBinarySearch["default"](executeAt, this._timers);
411
513
 
412
514
  this._timers.splice(i, 0, executeAt, fn);
413
515
 
414
- updateLaterTimer(this, executeAt, wait);
516
+ // we should be the new earliest timer if i == 0
517
+ if (i === 0) {
518
+ this._reinstallTimerTimeout();
519
+ }
415
520
 
416
521
  return fn;
417
522
  },
@@ -509,20 +614,13 @@ enifed('backburner', ['exports', './backburner/utils', './backburner/platform',
509
614
  },
510
615
 
511
616
  cancelTimers: function () {
512
- var clearItems = function (item) {
513
- clearTimeout(item[2]);
514
- };
515
-
516
617
  _backburnerUtils.each(this._throttlers, clearItems);
517
618
  this._throttlers = [];
518
619
 
519
620
  _backburnerUtils.each(this._debouncees, clearItems);
520
621
  this._debouncees = [];
521
622
 
522
- if (this._laterTimer) {
523
- clearTimeout(this._laterTimer);
524
- this._laterTimer = null;
525
- }
623
+ this._clearTimerTimeout();
526
624
  this._timers = [];
527
625
 
528
626
  if (this._autorun) {
@@ -547,15 +645,7 @@ enifed('backburner', ['exports', './backburner/utils', './backburner/platform',
547
645
  if (this._timers[i + 1] === timer) {
548
646
  this._timers.splice(i, 2); // remove the two elements
549
647
  if (i === 0) {
550
- if (this._laterTimer) {
551
- // Active timer? Then clear timer and reset for future timer
552
- clearTimeout(this._laterTimer);
553
- this._laterTimer = null;
554
- }
555
- if (this._timers.length > 0) {
556
- // Update to next available timer when available
557
- updateLaterTimer(this, this._timers[0], this._timers[0] - _backburnerUtils.now());
558
- }
648
+ this._reinstallTimerTimeout();
559
649
  }
560
650
  return true;
561
651
  }
@@ -589,6 +679,67 @@ enifed('backburner', ['exports', './backburner/utils', './backburner/platform',
589
679
  }
590
680
 
591
681
  return false;
682
+ },
683
+
684
+ _runExpiredTimers: function () {
685
+ this._timerTimeoutId = undefined;
686
+ this.run(this, this._scheduleExpiredTimers);
687
+ },
688
+
689
+ _scheduleExpiredTimers: function () {
690
+ var n = _backburnerUtils.now();
691
+ var timers = this._timers;
692
+ var i = 0;
693
+ var l = timers.length;
694
+ for (; i < l; i += 2) {
695
+ var executeAt = timers[i];
696
+ var fn = timers[i + 1];
697
+ if (executeAt <= n) {
698
+ this.schedule(this.options.defaultQueue, null, fn);
699
+ } else {
700
+ break;
701
+ }
702
+ }
703
+ timers.splice(0, i);
704
+ this._installTimerTimeout();
705
+ },
706
+
707
+ _reinstallStalledTimerTimeout: function () {
708
+ if (!this._timerTimeoutId) {
709
+ return;
710
+ }
711
+ // if we have a timer we should always have a this._timerTimeoutId
712
+ var minExpiresAt = this._timers[0];
713
+ var delay = _backburnerUtils.now() - minExpiresAt;
714
+ // threshold of a second before we assume that the currently
715
+ // installed timeout will not run, so we don't constantly reinstall
716
+ // timeouts that are delayed but good still
717
+ if (delay < TIMEOUT_STALLED_THRESHOLD) {
718
+ return;
719
+ }
720
+ },
721
+
722
+ _reinstallTimerTimeout: function () {
723
+ this._clearTimerTimeout();
724
+ this._installTimerTimeout();
725
+ },
726
+
727
+ _clearTimerTimeout: function () {
728
+ if (!this._timerTimeoutId) {
729
+ return;
730
+ }
731
+ clearTimeout(this._timerTimeoutId);
732
+ this._timerTimeoutId = undefined;
733
+ },
734
+
735
+ _installTimerTimeout: function () {
736
+ if (!this._timers.length) {
737
+ return;
738
+ }
739
+ var minExpiresAt = this._timers[0];
740
+ var n = _backburnerUtils.now();
741
+ var wait = Math.max(0, minExpiresAt - n);
742
+ this._timerTimeoutId = setTimeout(this._boundRunExpiredTimers, wait);
592
743
  }
593
744
  };
594
745
 
@@ -616,52 +767,6 @@ enifed('backburner', ['exports', './backburner/utils', './backburner/platform',
616
767
  });
617
768
  }
618
769
 
619
- function updateLaterTimer(backburner, executeAt, wait) {
620
- var n = _backburnerUtils.now();
621
- if (!backburner._laterTimer || executeAt < backburner._laterTimerExpiresAt || backburner._laterTimerExpiresAt < n) {
622
-
623
- if (backburner._laterTimer) {
624
- // Clear when:
625
- // - Already expired
626
- // - New timer is earlier
627
- clearTimeout(backburner._laterTimer);
628
-
629
- if (backburner._laterTimerExpiresAt < n) {
630
- // If timer was never triggered
631
- // Calculate the left-over wait-time
632
- wait = Math.max(0, executeAt - n);
633
- }
634
- }
635
-
636
- backburner._laterTimer = _backburnerPlatform["default"].setTimeout(function () {
637
- backburner._laterTimer = null;
638
- backburner._laterTimerExpiresAt = null;
639
- executeTimers(backburner);
640
- }, wait);
641
-
642
- backburner._laterTimerExpiresAt = n + wait;
643
- }
644
- }
645
-
646
- function executeTimers(backburner) {
647
- var n = _backburnerUtils.now();
648
- var fns, i, l;
649
-
650
- backburner.run(function () {
651
- i = _backburnerBinarySearch["default"](n, backburner._timers);
652
-
653
- fns = backburner._timers.splice(0, i);
654
-
655
- for (i = 1, l = fns.length; i < l; i += 2) {
656
- backburner.schedule(backburner.options.defaultQueue, null, fns[i]);
657
- }
658
- });
659
-
660
- if (backburner._timers.length) {
661
- updateLaterTimer(backburner, backburner._timers[0], backburner._timers[0] - n);
662
- }
663
- }
664
-
665
770
  function findDebouncee(target, method, debouncees) {
666
771
  return findItem(target, method, debouncees);
667
772
  }
@@ -684,6 +789,10 @@ enifed('backburner', ['exports', './backburner/utils', './backburner/platform',
684
789
 
685
790
  return index;
686
791
  }
792
+
793
+ function clearItems(item) {
794
+ clearTimeout(item[2]);
795
+ }
687
796
  });
688
797
  enifed("backburner/binary-search", ["exports"], function (exports) {
689
798
  "use strict";
@@ -734,6 +843,10 @@ enifed('backburner/deferred-action-queues', ['exports', './utils', './queue'], f
734
843
  throw new Error('You attempted to schedule an action in a queue (' + name + ') that doesn\'t exist');
735
844
  }
736
845
 
846
+ function noSuchMethod(name) {
847
+ throw new Error('You attempted to schedule an action in a queue (' + name + ') for a method that doesn\'t exist');
848
+ }
849
+
737
850
  DeferredActionQueues.prototype = {
738
851
  schedule: function (name, target, method, args, onceFlag, stack) {
739
852
  var queues = this.queues;
@@ -743,6 +856,10 @@ enifed('backburner/deferred-action-queues', ['exports', './utils', './queue'], f
743
856
  noSuchQueue(name);
744
857
  }
745
858
 
859
+ if (!method) {
860
+ noSuchMethod(name);
861
+ }
862
+
746
863
  if (onceFlag) {
747
864
  return queue.pushUnique(target, method, args, stack);
748
865
  } else {
@@ -753,10 +870,9 @@ enifed('backburner/deferred-action-queues', ['exports', './utils', './queue'], f
753
870
  flush: function () {
754
871
  var queues = this.queues;
755
872
  var queueNames = this.queueNames;
756
- var queueName, queue, queueItems, priorQueueNameIndex;
873
+ var queueName, queue;
757
874
  var queueNameIndex = 0;
758
875
  var numberOfQueues = queueNames.length;
759
- var options = this.options;
760
876
 
761
877
  while (queueNameIndex < numberOfQueues) {
762
878
  queueName = queueNames[queueNameIndex];
@@ -880,11 +996,6 @@ enifed('backburner/queue', ['exports', './utils'], function (exports, _utils) {
880
996
  },
881
997
 
882
998
  pushUnique: function (target, method, args, stack) {
883
- var queue = this._queue,
884
- currentTarget,
885
- currentMethod,
886
- i,
887
- l;
888
999
  var KEY = this.globalOptions.GUID_KEY;
889
1000
 
890
1001
  if (target && KEY) {
@@ -1673,7 +1784,7 @@ enifed('container/registry', ['exports', 'ember-metal/core', 'ember-metal/dictio
1673
1784
  _emberMetalCore["default"].assert('Create a container on the registry (with `registry.container()`) before calling `lookup`.', this._defaultContainer);
1674
1785
 
1675
1786
  if (instanceInitializersFeatureEnabled) {
1676
- _emberMetalCore["default"].deprecate('`lookup` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.', false, { url: "http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers" });
1787
+ _emberMetalCore["default"].deprecate('`lookup` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.', false, { id: 'container.calling-lookup-from-registry', until: '2.0.0', url: "http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers" });
1677
1788
  }
1678
1789
 
1679
1790
  return this._defaultContainer.lookup(fullName, options);
@@ -1683,7 +1794,7 @@ enifed('container/registry', ['exports', 'ember-metal/core', 'ember-metal/dictio
1683
1794
  _emberMetalCore["default"].assert('Create a container on the registry (with `registry.container()`) before calling `lookupFactory`.', this._defaultContainer);
1684
1795
 
1685
1796
  if (instanceInitializersFeatureEnabled) {
1686
- _emberMetalCore["default"].deprecate('`lookupFactory` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.', false, { url: "http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers" });
1797
+ _emberMetalCore["default"].deprecate('`lookupFactory` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.', false, { id: 'container.calling-lookupfactory-from-registry', until: '2.0.0', url: "http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers" });
1687
1798
  }
1688
1799
 
1689
1800
  return this._defaultContainer.lookupFactory(fullName);
@@ -5343,7 +5454,7 @@ enifed('ember-application/utils/validate-type', ['exports'], function (exports)
5343
5454
  var expectedType = validationAttributes[2];
5344
5455
 
5345
5456
  if (action === 'deprecate') {
5346
- Ember.deprecate('In Ember 2.0 ' + parsedName.type + ' factories must have an `' + factoryFlag + '` ' + ('property set to true. You registered ' + resolvedType + ' as a ' + parsedName.type + ' ') + ('factory. Either add the `' + factoryFlag + '` property to this factory or ') + ('extend from ' + expectedType + '.'), resolvedType[factoryFlag]);
5457
+ Ember.deprecate('In Ember 2.0 ' + parsedName.type + ' factories must have an `' + factoryFlag + '` ' + ('property set to true. You registered ' + resolvedType + ' as a ' + parsedName.type + ' ') + ('factory. Either add the `' + factoryFlag + '` property to this factory or ') + ('extend from ' + expectedType + '.'), resolvedType[factoryFlag], { id: 'ember-application.validate-type', until: '3.0.0' });
5347
5458
  } else {
5348
5459
  Ember.assert('Expected ' + parsedName.fullName + ' to resolve to an ' + expectedType + ' but ' + ('instead it was ' + resolvedType + '.'), function () {
5349
5460
  return resolvedType[factoryFlag];
@@ -9591,7 +9702,7 @@ enifed("ember-htmlbars/keywords/real_outlet", ["exports", "ember-metal/property_
9591
9702
 
9592
9703
  "use strict";
9593
9704
 
9594
- _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = 'Ember@1.13.10';
9705
+ _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = 'Ember@1.13.11';
9595
9706
 
9596
9707
  exports["default"] = {
9597
9708
  willRender: function (renderNode, env) {
@@ -11528,7 +11639,7 @@ enifed("ember-htmlbars/system/lookup-helper", ["exports", "ember-metal/core", "e
11528
11639
  }
11529
11640
 
11530
11641
  function isLegacyBareHelper(helper) {
11531
- return helper && (!helper.isHelperFactory && !helper.isHelperInstance && !helper.isHTMLBars);
11642
+ return helper && !helper.isHelperFactory && !helper.isHelperInstance && !helper.isHTMLBars;
11532
11643
  }
11533
11644
 
11534
11645
  /**
@@ -13498,7 +13609,7 @@ enifed("ember-metal/array", ["exports"], function (exports) {
13498
13609
  var length = this.length;
13499
13610
 
13500
13611
  for (i = 0; i < length; i++) {
13501
- if (this.hasOwnProperty(i)) {
13612
+ if (Object.prototype.hasOwnProperty.call(this, i)) {
13502
13613
  value = this[i];
13503
13614
  if (fn.call(context, value, i, this)) {
13504
13615
  result.push(value);
@@ -15922,7 +16033,7 @@ enifed('ember-metal/core', ['exports'], function (exports) {
15922
16033
 
15923
16034
  @class Ember
15924
16035
  @static
15925
- @version 1.13.10
16036
+ @version 1.13.11
15926
16037
  @public
15927
16038
  */
15928
16039
 
@@ -15956,11 +16067,11 @@ enifed('ember-metal/core', ['exports'], function (exports) {
15956
16067
 
15957
16068
  @property VERSION
15958
16069
  @type String
15959
- @default '1.13.10'
16070
+ @default '1.13.11'
15960
16071
  @static
15961
16072
  @public
15962
16073
  */
15963
- Ember.VERSION = '1.13.10';
16074
+ Ember.VERSION = '1.13.11';
15964
16075
 
15965
16076
  /**
15966
16077
  The hash of environment variables used to control various configuration
@@ -24995,7 +25106,7 @@ enifed("ember-routing-views", ["exports", "ember-metal/core", "ember-routing-vie
24995
25106
 
24996
25107
  exports["default"] = _emberMetalCore["default"];
24997
25108
  });
24998
- enifed("ember-routing-views/views/link", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/computed", "ember-views/system/utils", "ember-views/views/component", "ember-runtime/inject", "ember-runtime/mixins/controller", "ember-htmlbars/templates/link-to"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalComputed, _emberViewsSystemUtils, _emberViewsViewsComponent, _emberRuntimeInject, _emberRuntimeMixinsController, _emberHtmlbarsTemplatesLinkTo) {
25109
+ enifed("ember-routing-views/views/link", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/computed", "ember-views/system/utils", "ember-views/views/component", "ember-runtime/inject", "ember-runtime/mixins/controller", "ember-htmlbars/hooks/get-value", "ember-htmlbars/templates/link-to"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalComputed, _emberViewsSystemUtils, _emberViewsViewsComponent, _emberRuntimeInject, _emberRuntimeMixinsController, _emberHtmlbarsHooksGetValue, _emberHtmlbarsTemplatesLinkTo) {
24999
25110
  /**
25000
25111
  @module ember
25001
25112
  @submodule ember-routing-views
@@ -25003,7 +25114,7 @@ enifed("ember-routing-views/views/link", ["exports", "ember-metal/core", "ember-
25003
25114
 
25004
25115
  "use strict";
25005
25116
 
25006
- _emberHtmlbarsTemplatesLinkTo["default"].meta.revision = 'Ember@1.13.10';
25117
+ _emberHtmlbarsTemplatesLinkTo["default"].meta.revision = 'Ember@1.13.11';
25007
25118
 
25008
25119
  var linkComponentClassNameBindings = ['active', 'loading', 'disabled'];
25009
25120
 
@@ -25391,19 +25502,11 @@ enifed("ember-routing-views/views/link", ["exports", "ember-metal/core", "ember-
25391
25502
  queryParams = {};
25392
25503
  }
25393
25504
 
25394
- if (attrs.disabledClass) {
25395
- this.set('disabledClass', attrs.disabledClass);
25396
- }
25397
-
25398
- if (attrs.activeClass) {
25399
- this.set('activeClass', attrs.activeClass);
25400
- }
25401
-
25402
25505
  if (attrs.disabledWhen) {
25403
- this.set('disabled', attrs.disabledWhen);
25506
+ this.set('disabled', _emberHtmlbarsHooksGetValue["default"](attrs.disabledWhen));
25404
25507
  }
25405
25508
 
25406
- var currentWhen = attrs['current-when'];
25509
+ var currentWhen = _emberHtmlbarsHooksGetValue["default"](attrs['current-when']);
25407
25510
 
25408
25511
  if (attrs.currentWhen) {
25409
25512
  _emberMetalCore["default"].deprecate('Using currentWhen with {{link-to}} is deprecated in favor of `current-when`.', !attrs.currentWhen);
@@ -25419,10 +25522,6 @@ enifed("ember-routing-views/views/link", ["exports", "ember-metal/core", "ember-
25419
25522
  this.set('linkTitle', params.shift());
25420
25523
  }
25421
25524
 
25422
- if (attrs.loadingClass) {
25423
- _emberMetalProperty_set.set(this, 'loadingClass', attrs.loadingClass);
25424
- }
25425
-
25426
25525
  for (var i = 0; i < params.length; i++) {
25427
25526
  var value = params[i];
25428
25527
 
@@ -25542,7 +25641,7 @@ enifed("ember-routing-views/views/outlet", ["exports", "ember-views/views/view",
25542
25641
 
25543
25642
  "use strict";
25544
25643
 
25545
- _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = 'Ember@1.13.10';
25644
+ _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = 'Ember@1.13.11';
25546
25645
 
25547
25646
  var CoreOutletView = _emberViewsViewsView["default"].extend({
25548
25647
  defaultTemplate: _emberHtmlbarsTemplatesTopLevelView["default"],
@@ -32861,7 +32960,7 @@ enifed('ember-runtime/controllers/array_controller', ['exports', 'ember-metal/co
32861
32960
  },
32862
32961
 
32863
32962
  init: function () {
32864
- _emberMetalCore["default"].deprecate(arrayControllerDeprecation, this.isGenerated, { url: 'http://emberjs.com/guides/deprecations#toc_arraycontroller' });
32963
+ _emberMetalCore["default"].deprecate(arrayControllerDeprecation, this.isGenerated, { id: 'ember-runtime.array-controller', until: '2.0.0', url: 'http://emberjs.com/guides/deprecations#toc_arraycontroller' });
32865
32964
 
32866
32965
  this._super.apply(this, arguments);
32867
32966
  this._subControllers = [];
@@ -33034,7 +33133,7 @@ enifed('ember-runtime/controllers/object_controller', ['exports', 'ember-metal/c
33034
33133
  exports["default"] = _emberRuntimeSystemObject_proxy["default"].extend(_emberRuntimeMixinsController["default"], {
33035
33134
  init: function () {
33036
33135
  this._super();
33037
- _emberMetalCore["default"].deprecate(objectControllerDeprecation, this.isGenerated);
33136
+ _emberMetalCore["default"].deprecate(objectControllerDeprecation, this.isGenerated, { id: 'ember-runtime.object-controller', until: '2.0.0' });
33038
33137
  }
33039
33138
  });
33040
33139
  });
@@ -37258,6 +37357,11 @@ enifed("ember-runtime/mixins/sortable", ["exports", "ember-metal/core", "ember-m
37258
37357
  */
37259
37358
  sortFunction: _emberRuntimeCompare["default"],
37260
37359
 
37360
+ init: function () {
37361
+ this._super.apply(this, arguments);
37362
+ _emberMetalCore["default"].deprecate("Ember.SortableMixin is deprecated and was used in " + this + ". Please use Ember.computed.sort instead.", this.isGenerated);
37363
+ },
37364
+
37261
37365
  orderBy: function (item1, item2) {
37262
37366
  var result = 0;
37263
37367
  var sortProperties = _emberMetalProperty_get.get(this, 'sortProperties');
@@ -42540,7 +42644,7 @@ enifed("ember-template-compiler/system/compile_options", ["exports", "ember-meta
42540
42644
 
42541
42645
  options.buildMeta = function buildMeta(program) {
42542
42646
  return {
42543
- revision: 'Ember@1.13.10',
42647
+ revision: 'Ember@1.13.11',
42544
42648
  loc: program.loc,
42545
42649
  moduleName: options.moduleName
42546
42650
  };
@@ -46209,6 +46313,8 @@ enifed("ember-views/system/build-component-template", ["exports", "htmlbars-runt
46209
46313
  "use strict";
46210
46314
 
46211
46315
  exports["default"] = buildComponentTemplate;
46316
+ exports.disableInputTypeChanging = disableInputTypeChanging;
46317
+ exports.resetInputTypeChanging = resetInputTypeChanging;
46212
46318
 
46213
46319
  function buildComponentTemplate(_ref, attrs, content) {
46214
46320
  var component = _ref.component;
@@ -46237,7 +46343,7 @@ enifed("ember-views/system/build-component-template", ["exports", "htmlbars-runt
46237
46343
  // element. We use `manualElement` to create a template that represents
46238
46344
  // the wrapping element and yields to the previous block.
46239
46345
  if (tagName !== '') {
46240
- var attributes = normalizeComponentAttributes(component, isAngleBracket, attrs);
46346
+ var attributes = normalizeComponentAttributes(component, isAngleBracket, attrs, tagName);
46241
46347
  var elementTemplate = _htmlbarsRuntime.internal.manualElement(tagName, attributes);
46242
46348
  elementTemplate.meta = meta;
46243
46349
 
@@ -46254,6 +46360,32 @@ enifed("ember-views/system/build-component-template", ["exports", "htmlbars-runt
46254
46360
  return { createdElement: !!tagName, block: blockToRender };
46255
46361
  }
46256
46362
 
46363
+ // Static flag used to see if we can mutate the type attribute on input elements. IE8
46364
+ // does not support changing the type attribute after an element is inserted in
46365
+ // a tree.
46366
+ var isInputTypeAttributeMutable = (function () {
46367
+ var docFragment = document.createDocumentFragment();
46368
+ var mutableInputTypeTextElement = document.createElement('input');
46369
+ mutableInputTypeTextElement.type = 'text';
46370
+ try {
46371
+ docFragment.appendChild(mutableInputTypeTextElement);
46372
+ mutableInputTypeTextElement.setAttribute('type', 'password');
46373
+ } catch (e) {
46374
+ return false;
46375
+ }
46376
+ return true;
46377
+ })();
46378
+
46379
+ var canChangeInputType = isInputTypeAttributeMutable;
46380
+
46381
+ function disableInputTypeChanging() {
46382
+ canChangeInputType = false;
46383
+ }
46384
+
46385
+ function resetInputTypeChanging() {
46386
+ canChangeInputType = isInputTypeAttributeMutable;
46387
+ }
46388
+
46257
46389
  function blockFor(template, options) {
46258
46390
  Ember.assert("BUG: Must pass a template to blockFor", !!template);
46259
46391
  return _htmlbarsRuntime.internal.blockFor(_htmlbarsRuntime.render, template, options);
@@ -46324,7 +46456,8 @@ enifed("ember-views/system/build-component-template", ["exports", "htmlbars-runt
46324
46456
 
46325
46457
  // Takes a component and builds a normalized set of attribute
46326
46458
  // bindings consumable by HTMLBars' `attribute` hook.
46327
- function normalizeComponentAttributes(component, isAngleBracket, attrs) {
46459
+ function normalizeComponentAttributes(component, isAngleBracket, attrs, tagName) {
46460
+ var hardCodeType = tagName === 'input' && !canChangeInputType;
46328
46461
  var normalized = {};
46329
46462
  var attributeBindings = component.attributeBindings;
46330
46463
  var i, l;
@@ -46346,17 +46479,32 @@ enifed("ember-views/system/build-component-template", ["exports", "htmlbars-runt
46346
46479
  if (colonIndex !== -1) {
46347
46480
  var attrProperty = attr.substring(0, colonIndex);
46348
46481
  attrName = attr.substring(colonIndex + 1);
46349
- expression = ['get', 'view.' + attrProperty];
46482
+
46483
+ if (attrName === 'type' && hardCodeType) {
46484
+ expression = component.get(attrProperty) + '';
46485
+ } else {
46486
+ expression = ['get', 'view.' + attrProperty];
46487
+ }
46350
46488
  } else if (attrs[attr]) {
46351
46489
  // TODO: For compatibility with 1.x, we probably need to `set`
46352
46490
  // the component's attribute here if it is a CP, but we also
46353
46491
  // probably want to suspend observers and allow the
46354
46492
  // willUpdateAttrs logic to trigger observers at the correct time.
46355
46493
  attrName = attr;
46356
- expression = ['value', attrs[attr]];
46494
+
46495
+ if (attrName === 'type' && hardCodeType) {
46496
+ expression = _emberHtmlbarsHooksGetValue["default"](attrs[attr]) + '';
46497
+ } else {
46498
+ expression = ['value', attrs[attr]];
46499
+ }
46357
46500
  } else {
46358
46501
  attrName = attr;
46359
- expression = ['get', 'view.' + attr];
46502
+
46503
+ if (attrName === 'type' && hardCodeType) {
46504
+ expression = component.get(attr) + '';
46505
+ } else {
46506
+ expression = ['get', 'view.' + attr];
46507
+ }
46360
46508
  }
46361
46509
 
46362
46510
  Ember.assert('You cannot use class as an attributeBinding, use classNameBindings instead.', attrName !== 'class');
@@ -47542,7 +47690,7 @@ enifed("ember-views/views/component", ["exports", "ember-metal/core", "ember-vie
47542
47690
  */
47543
47691
  template: _emberMetalComputed.computed({
47544
47692
  get: function () {
47545
- _emberMetalCore["default"].deprecate("Accessing 'template' in " + this + " is deprecated. To determine if a block was specified to " + this + " please use '{{#if hasBlock}}' in the components layout.");
47693
+ _emberMetalCore["default"].deprecate("Accessing 'template' in " + this + " is deprecated. To determine if a block was specified to " + this + " please use '{{#if hasBlock}}' in the components layout.", false, { id: 'ember-views.accessing-template', until: '2.0.0' });
47546
47694
 
47547
47695
  return _emberMetalProperty_get.get(this, '_template');
47548
47696
  },
@@ -47792,7 +47940,7 @@ enifed("ember-views/views/component", ["exports", "ember-metal/core", "ember-vie
47792
47940
  enifed("ember-views/views/container_view", ["exports", "ember-metal/core", "ember-runtime/mixins/mutable_array", "ember-views/views/view", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/enumerable_utils", "ember-metal/mixin", "ember-metal/events", "ember-htmlbars/templates/container-view"], function (exports, _emberMetalCore, _emberRuntimeMixinsMutable_array, _emberViewsViewsView, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalEnumerable_utils, _emberMetalMixin, _emberMetalEvents, _emberHtmlbarsTemplatesContainerView) {
47793
47941
  "use strict";
47794
47942
 
47795
- _emberHtmlbarsTemplatesContainerView["default"].meta.revision = 'Ember@1.13.10';
47943
+ _emberHtmlbarsTemplatesContainerView["default"].meta.revision = 'Ember@1.13.11';
47796
47944
 
47797
47945
  /**
47798
47946
  @module ember
@@ -49346,7 +49494,9 @@ enifed("ember-views/views/text_field", ["exports", "ember-metal/computed", "embe
49346
49494
  value: "",
49347
49495
 
49348
49496
  /**
49349
- The `type` attribute of the input element.
49497
+ The `type` attribute of the input element. To remain compatible with IE8, this
49498
+ cannot change after the element has been rendered. It is suggested to avoid using
49499
+ a dynamic type attribute if you are supporting IE8 since it will be set once and never change.
49350
49500
  @property type
49351
49501
  @type String
49352
49502
  @default "text"
@@ -50661,15 +50811,15 @@ enifed("ember-views/views/view", ["exports", "ember-metal/core", "ember-runtime/
50661
50811
  scheduleRevalidate: function (node, label, manualRerender) {
50662
50812
  if (node && !this._dispatching && node.guid in this.env.renderedNodes) {
50663
50813
  if (manualRerender) {
50664
- _emberMetalCore["default"].deprecate("You manually rerendered " + label + " (a parent component) from a child component during the rendering process. This rarely worked in Ember 1.x and will be removed in Ember 2.0");
50814
+ _emberMetalCore["default"].deprecate("You manually rerendered " + label + " (a parent component) from a child component during the rendering process. This rarely worked in Ember 1.x and will be removed in Ember 3.0", false, { id: 'ember-views.manual-parent-rerender', until: '3.0.0' });
50665
50815
  } else {
50666
- _emberMetalCore["default"].deprecate("You modified " + label + " twice in a single render. This was unreliable in Ember 1.x and will be removed in Ember 2.0");
50816
+ _emberMetalCore["default"].deprecate("You modified " + label + " twice in a single render. This was unreliable in Ember 1.x and will be removed in Ember 3.0", false, { id: 'ember-views.render-double-modify', until: '3.0.0' });
50667
50817
  }
50668
50818
  _emberMetalRun_loop["default"].scheduleOnce('render', this, this.revalidate);
50669
50819
  return;
50670
50820
  }
50671
50821
 
50672
- _emberMetalCore["default"].deprecate("A property of " + this + " was modified inside the " + this._dispatching + " hook. You should never change properties on components, services or models during " + this._dispatching + " because it causes significant performance degradation.", !this._dispatching);
50822
+ _emberMetalCore["default"].deprecate("A property of " + this + " was modified inside the " + this._dispatching + " hook. You should never change properties on components, services or models during " + this._dispatching + " because it causes significant performance degradation.", !this._dispatching, { id: 'ember-views.dispatching-modify-property', until: '3.0.0' });
50673
50823
 
50674
50824
  if (!this.scheduledRevalidation || this._dispatching) {
50675
50825
  this.scheduledRevalidation = true;