ember-source 1.7.0.beta.4 → 1.7.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-runtime.js +15 -4
- data/dist/ember-tests.js +165 -22
- data/dist/ember.js +203 -96
- data/dist/ember.min.js +18 -18
- data/dist/ember.prod.js +200 -97
- 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: 06a4d91eb9e239671ab30de164893a1127886cb7
|
4
|
+
data.tar.gz: 48a889ea5bdbf9cbddf202beb73a3c3d3f41f815
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d3962a46bdfe154268da29d12fdf5ef4fad0efda25a0585f0503fb35a79e75ac2c0b3057c86d186cc350c4267a24ae409556e7c77fe38fb80c5e770f776b549
|
7
|
+
data.tar.gz: 18f0587d6406112a9556d6eb850fd5673992ce88b792c0d95e19d5849dfb4656b5c5fa3c5b220159525218be5a3db0da8c68465e5ad7009f27b449f192654947
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.0-beta.
|
1
|
+
1.7.0-beta.5
|
data/dist/ember-runtime.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.5
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -1876,6 +1876,7 @@ define("ember-metal",
|
|
1876
1876
|
var wrap = __dependency4__.wrap;
|
1877
1877
|
var apply = __dependency4__.apply;
|
1878
1878
|
var applyStr = __dependency4__.applyStr;
|
1879
|
+
var uuid = __dependency4__.uuid;
|
1879
1880
|
var EmberError = __dependency5__["default"];
|
1880
1881
|
var EnumerableUtils = __dependency6__["default"];
|
1881
1882
|
|
@@ -2016,6 +2017,7 @@ define("ember-metal",
|
|
2016
2017
|
Ember.wrap = wrap;
|
2017
2018
|
Ember.apply = apply;
|
2018
2019
|
Ember.applyStr = applyStr;
|
2020
|
+
Ember.uuid = uuid;
|
2019
2021
|
|
2020
2022
|
Ember.Logger = Logger;
|
2021
2023
|
|
@@ -4445,7 +4447,7 @@ define("ember-metal/core",
|
|
4445
4447
|
|
4446
4448
|
@class Ember
|
4447
4449
|
@static
|
4448
|
-
@version 1.7.0-beta.
|
4450
|
+
@version 1.7.0-beta.5
|
4449
4451
|
*/
|
4450
4452
|
|
4451
4453
|
if ('undefined' === typeof Ember) {
|
@@ -4472,10 +4474,10 @@ define("ember-metal/core",
|
|
4472
4474
|
/**
|
4473
4475
|
@property VERSION
|
4474
4476
|
@type String
|
4475
|
-
@default '1.7.0-beta.
|
4477
|
+
@default '1.7.0-beta.5'
|
4476
4478
|
@static
|
4477
4479
|
*/
|
4478
|
-
Ember.VERSION = '1.7.0-beta.
|
4480
|
+
Ember.VERSION = '1.7.0-beta.5';
|
4479
4481
|
|
4480
4482
|
/**
|
4481
4483
|
Standard environmental variables. You can define these in a global `EmberENV`
|
@@ -9060,6 +9062,15 @@ define("ember-metal/utils",
|
|
9060
9062
|
*/
|
9061
9063
|
var _uuid = 0;
|
9062
9064
|
|
9065
|
+
/**
|
9066
|
+
Generates a universally unique identifier. This method
|
9067
|
+
is used internally by Ember for assisting with
|
9068
|
+
the generation of GUID's and other unique identifiers
|
9069
|
+
such as `bind-attr` data attributes.
|
9070
|
+
|
9071
|
+
@public
|
9072
|
+
@return {Number} [description]
|
9073
|
+
*/
|
9063
9074
|
function uuid() {
|
9064
9075
|
return ++_uuid;
|
9065
9076
|
}
|
data/dist/ember-tests.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.5
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -3560,6 +3560,36 @@ define("ember-handlebars/tests/controls/checkbox_test",
|
|
3560
3560
|
}, /you must use `checked=/);
|
3561
3561
|
});
|
3562
3562
|
|
3563
|
+
QUnit.module("{{input type=boundType}}", {
|
3564
|
+
setup: function() {
|
3565
|
+
controller = {
|
3566
|
+
inputType: "checkbox",
|
3567
|
+
isChecked: true,
|
3568
|
+
};
|
3569
|
+
|
3570
|
+
checkboxView = EmberView.extend({
|
3571
|
+
controller: controller,
|
3572
|
+
template: compile('{{input type=inputType checked=isChecked}}')
|
3573
|
+
}).create();
|
3574
|
+
|
3575
|
+
append();
|
3576
|
+
},
|
3577
|
+
|
3578
|
+
teardown: function() {
|
3579
|
+
destroy(checkboxView);
|
3580
|
+
}
|
3581
|
+
});
|
3582
|
+
|
3583
|
+
test("should append a checkbox", function() {
|
3584
|
+
equal(checkboxView.$('input[type=checkbox]').length, 1, "A single checkbox is added");
|
3585
|
+
});
|
3586
|
+
|
3587
|
+
// Checking for the checked property is a good way to verify that the correct
|
3588
|
+
// view was used.
|
3589
|
+
test("checkbox checked property is updated", function() {
|
3590
|
+
equal(checkboxView.$('input').prop('checked'), true, "the checkbox is checked");
|
3591
|
+
});
|
3592
|
+
|
3563
3593
|
QUnit.module("{{input type='checkbox'}} - static values", {
|
3564
3594
|
setup: function() {
|
3565
3595
|
controller = {
|
@@ -8204,6 +8234,33 @@ define("ember-handlebars/tests/helpers/bound_helper_test",
|
|
8204
8234
|
equal(view.$().text(), 'YESYES', "helper correctly re-rendered after both bound option and property changed");
|
8205
8235
|
});
|
8206
8236
|
|
8237
|
+
test("bound helpers should support unquoted values as bound options", function() {
|
8238
|
+
|
8239
|
+
registerRepeatHelper();
|
8240
|
+
|
8241
|
+
view = EmberView.create({
|
8242
|
+
controller: EmberObject.create({text: 'ab', numRepeats: 3}),
|
8243
|
+
template: EmberHandlebars.compile('{{repeat text count=numRepeats}}')
|
8244
|
+
});
|
8245
|
+
|
8246
|
+
appendView();
|
8247
|
+
|
8248
|
+
equal(view.$().text(), 'ababab', "helper output is correct");
|
8249
|
+
|
8250
|
+
run(function() {
|
8251
|
+
view.set('controller.numRepeats', 4);
|
8252
|
+
});
|
8253
|
+
|
8254
|
+
equal(view.$().text(), 'abababab', "helper correctly re-rendered after bound option was changed");
|
8255
|
+
|
8256
|
+
run(function() {
|
8257
|
+
view.set('controller.numRepeats', 2);
|
8258
|
+
view.set('controller.text', "YES");
|
8259
|
+
});
|
8260
|
+
|
8261
|
+
equal(view.$().text(), 'YESYES', "helper correctly re-rendered after both bound option and property changed");
|
8262
|
+
});
|
8263
|
+
|
8207
8264
|
|
8208
8265
|
test("bound helpers should support multiple bound properties", function() {
|
8209
8266
|
|
@@ -45479,20 +45536,23 @@ define("ember-views/tests/views/container_view_test",
|
|
45479
45536
|
}
|
45480
45537
|
}));
|
45481
45538
|
},
|
45482
|
-
|
45539
|
+
// functions here avoid attaching an observer, which is
|
45540
|
+
// not supported.
|
45541
|
+
lengthSquared: function () {
|
45483
45542
|
return this.get('length') * this.get('length');
|
45484
|
-
}
|
45485
|
-
|
45486
|
-
|
45487
|
-
|
45488
|
-
|
45543
|
+
},
|
45544
|
+
mapViewNames: function(){
|
45545
|
+
return this.map(function(_view){
|
45546
|
+
return _view.get('name');
|
45547
|
+
});
|
45548
|
+
}
|
45489
45549
|
});
|
45490
45550
|
|
45491
45551
|
container = Container.create();
|
45492
45552
|
|
45493
|
-
equal(container.
|
45553
|
+
equal(container.lengthSquared(), 4);
|
45494
45554
|
|
45495
|
-
deepEqual(container.
|
45555
|
+
deepEqual(container.mapViewNames(), ['A','B']);
|
45496
45556
|
|
45497
45557
|
run(container, 'appendTo', '#qunit-fixture');
|
45498
45558
|
|
@@ -45507,9 +45567,9 @@ define("ember-views/tests/views/container_view_test",
|
|
45507
45567
|
}));
|
45508
45568
|
});
|
45509
45569
|
|
45510
|
-
equal(container.
|
45570
|
+
equal(container.lengthSquared(), 9);
|
45511
45571
|
|
45512
|
-
deepEqual(container.
|
45572
|
+
deepEqual(container.mapViewNames(), ['A','B','C']);
|
45513
45573
|
|
45514
45574
|
equal(container.$().text(), 'ABC');
|
45515
45575
|
|
@@ -45841,7 +45901,7 @@ define("ember-views/tests/views/container_view_test",
|
|
45841
45901
|
});
|
45842
45902
|
|
45843
45903
|
test("should be able to modify childViews then destroy the ContainerView in same run loop", function () {
|
45844
|
-
|
45904
|
+
container = ContainerView.create();
|
45845
45905
|
|
45846
45906
|
run(function() {
|
45847
45907
|
container.appendTo('#qunit-fixture');
|
@@ -45862,7 +45922,7 @@ define("ember-views/tests/views/container_view_test",
|
|
45862
45922
|
|
45863
45923
|
|
45864
45924
|
test("should be able to modify childViews then rerender the ContainerView in same run loop", function () {
|
45865
|
-
|
45925
|
+
container = ContainerView.create();
|
45866
45926
|
|
45867
45927
|
run(function() {
|
45868
45928
|
container.appendTo('#qunit-fixture');
|
@@ -46041,6 +46101,22 @@ define("ember-views/tests/views/container_view_test",
|
|
46041
46101
|
});
|
46042
46102
|
|
46043
46103
|
});
|
46104
|
+
|
46105
|
+
|
46106
|
+
test("ContainerView is observable [DEPRECATED]", function(){
|
46107
|
+
container = ContainerView.create();
|
46108
|
+
var observerFired = false;
|
46109
|
+
expectDeprecation(function(){
|
46110
|
+
container.addObserver('this.[]', function(){
|
46111
|
+
observerFired = true;
|
46112
|
+
});
|
46113
|
+
}, /ContainerViews should not be observed as arrays. This behavior will change in future implementations of ContainerView./);
|
46114
|
+
|
46115
|
+
ok(!observerFired, 'Nothing changed, no observer fired');
|
46116
|
+
|
46117
|
+
container.pushObject(View.create());
|
46118
|
+
ok(observerFired, 'View pushed, observer fired');
|
46119
|
+
});
|
46044
46120
|
});
|
46045
46121
|
define("ember-views/tests/views/container_view_test.jshint",
|
46046
46122
|
[],
|
@@ -52010,7 +52086,7 @@ define("ember/tests/helpers/link_to_test",
|
|
52010
52086
|
// we should also be able to gracefully handle these cases.
|
52011
52087
|
router.handleURL("/search/results?search=same&sort=title&showDetails=true");
|
52012
52088
|
});
|
52013
|
-
shouldBeActive('#same-sort-child-only');
|
52089
|
+
//shouldBeActive('#same-sort-child-only');
|
52014
52090
|
shouldBeActive('#same-search-parent-only');
|
52015
52091
|
shouldNotBeActive('#change-search-parent-only');
|
52016
52092
|
shouldBeActive('#same-search-same-sort-child-and-parent');
|
@@ -55624,7 +55700,7 @@ define("ember/tests/routing/basic_test",
|
|
55624
55700
|
|
55625
55701
|
|
55626
55702
|
test("Errors in transitionTo within redirect hook are logged", function() {
|
55627
|
-
expect(
|
55703
|
+
expect(3);
|
55628
55704
|
var actual = [];
|
55629
55705
|
|
55630
55706
|
Router.map(function() {
|
@@ -55638,14 +55714,16 @@ define("ember/tests/routing/basic_test",
|
|
55638
55714
|
}
|
55639
55715
|
});
|
55640
55716
|
|
55641
|
-
Ember.Logger.error = function(
|
55642
|
-
|
55717
|
+
Ember.Logger.error = function() {
|
55718
|
+
// push the arguments onto an array so we can detect if the error gets logged twice
|
55719
|
+
actual.push(arguments);
|
55643
55720
|
};
|
55644
55721
|
|
55645
55722
|
bootApplication();
|
55646
55723
|
|
55647
|
-
equal(actual
|
55648
|
-
|
55724
|
+
equal(actual.length, 1, 'the error is only logged once');
|
55725
|
+
equal(actual[0][0], 'Error while processing route: yondo', 'source route is printed');
|
55726
|
+
ok(actual[0][1].match(/More context objects were passed than there are dynamic segments for the route: stink-bomb/), 'the error is printed');
|
55649
55727
|
});
|
55650
55728
|
|
55651
55729
|
test("Errors in transition show error template if available", function() {
|
@@ -55722,12 +55800,13 @@ define("ember/tests/routing/basic_test.jshint",
|
|
55722
55800
|
});
|
55723
55801
|
});
|
55724
55802
|
define("ember/tests/routing/query_params_test",
|
55725
|
-
["ember","ember-metal/enumerable_utils","ember-metal/platform"],
|
55726
|
-
function(__dependency1__, __dependency2__, __dependency3__) {
|
55803
|
+
["ember","ember-metal/enumerable_utils","ember-metal/computed","ember-metal/platform"],
|
55804
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__) {
|
55727
55805
|
"use strict";
|
55728
55806
|
var forEach = __dependency2__.forEach;
|
55729
55807
|
var map = __dependency2__.map;
|
55730
|
-
var
|
55808
|
+
var computed = __dependency3__.computed;
|
55809
|
+
var platform = __dependency4__.platform;
|
55731
55810
|
|
55732
55811
|
var Router, App, AppView, templates, router, container;
|
55733
55812
|
var get = Ember.get;
|
@@ -55945,6 +56024,27 @@ define("ember/tests/routing/query_params_test",
|
|
55945
56024
|
bootApplication();
|
55946
56025
|
});
|
55947
56026
|
|
56027
|
+
test("Can override inherited QP behavior by specifying queryParams as a computed property", function() {
|
56028
|
+
expect(0);
|
56029
|
+
var SharedMixin = Ember.Mixin.create({
|
56030
|
+
queryParams: ['a'],
|
56031
|
+
a: 0
|
56032
|
+
});
|
56033
|
+
|
56034
|
+
App.IndexController = Ember.Controller.extend(SharedMixin, {
|
56035
|
+
queryParams: computed(function() {
|
56036
|
+
return ['c'];
|
56037
|
+
}),
|
56038
|
+
c: true
|
56039
|
+
});
|
56040
|
+
|
56041
|
+
bootApplication();
|
56042
|
+
var indexController = container.lookup('controller:index');
|
56043
|
+
|
56044
|
+
expectedReplaceURL = "not gonna happen";
|
56045
|
+
Ember.run(indexController, 'set', 'a', 1);
|
56046
|
+
});
|
56047
|
+
|
55948
56048
|
test("model hooks receives query params", function() {
|
55949
56049
|
App.IndexController = Ember.Controller.extend({
|
55950
56050
|
queryParams: ['omg'],
|
@@ -56094,6 +56194,24 @@ define("ember/tests/routing/query_params_test",
|
|
56094
56194
|
bootApplication();
|
56095
56195
|
});
|
56096
56196
|
|
56197
|
+
test("Route#paramsFor fetches falsy query params", function() {
|
56198
|
+
expect(1);
|
56199
|
+
|
56200
|
+
App.IndexController = Ember.Controller.extend({
|
56201
|
+
queryParams: ['foo'],
|
56202
|
+
foo: true
|
56203
|
+
});
|
56204
|
+
|
56205
|
+
App.IndexRoute = Ember.Route.extend({
|
56206
|
+
model: function(params, transition) {
|
56207
|
+
equal(params.foo, false);
|
56208
|
+
}
|
56209
|
+
});
|
56210
|
+
|
56211
|
+
startingURL = "/?foo=false";
|
56212
|
+
bootApplication();
|
56213
|
+
});
|
56214
|
+
|
56097
56215
|
test("model hook can query prefix-less application params", function() {
|
56098
56216
|
App.ApplicationController = Ember.Controller.extend({
|
56099
56217
|
queryParams: ['appomg'],
|
@@ -56855,6 +56973,24 @@ define("ember/tests/routing/query_params_test",
|
|
56855
56973
|
equal(get(controller, 'foo'), undefined);
|
56856
56974
|
});
|
56857
56975
|
|
56976
|
+
test("query params have been set by the time setupController is called", function() {
|
56977
|
+
expect(1);
|
56978
|
+
|
56979
|
+
App.ApplicationController = Ember.Controller.extend({
|
56980
|
+
queryParams: ['foo'],
|
56981
|
+
foo: "wat"
|
56982
|
+
});
|
56983
|
+
|
56984
|
+
App.ApplicationRoute = Ember.Route.extend({
|
56985
|
+
setupController: function(controller) {
|
56986
|
+
equal(controller.get('foo'), 'YEAH', "controller's foo QP property set before setupController called");
|
56987
|
+
}
|
56988
|
+
});
|
56989
|
+
|
56990
|
+
startingURL = '/?foo=YEAH';
|
56991
|
+
bootApplication();
|
56992
|
+
});
|
56993
|
+
|
56858
56994
|
QUnit.module("Model Dep Query Params", {
|
56859
56995
|
setup: function() {
|
56860
56996
|
sharedSetup();
|
@@ -57133,6 +57269,13 @@ define("ember/tests/routing/query_params_test",
|
|
57133
57269
|
equal(Ember.$('#two').attr('href'), "/a/a-2/comments");
|
57134
57270
|
});
|
57135
57271
|
|
57272
|
+
test("can unit test without bucket cache", function() {
|
57273
|
+
var controller = container.lookup('controller:article');
|
57274
|
+
controller._bucketCache = null;
|
57275
|
+
|
57276
|
+
controller.set('q', "i used to break");
|
57277
|
+
equal(controller.get('q'), "i used to break");
|
57278
|
+
});
|
57136
57279
|
|
57137
57280
|
QUnit.module("Query Params - overlapping query param property names", {
|
57138
57281
|
setup: function() {
|
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.5
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -4913,8 +4913,8 @@ define("ember-handlebars/component_lookup",
|
|
4913
4913
|
__exports__["default"] = ComponentLookup;
|
4914
4914
|
});
|
4915
4915
|
define("ember-handlebars/controls",
|
4916
|
-
["ember-handlebars/controls/checkbox","ember-handlebars/controls/text_field","ember-handlebars/controls/text_area","ember-metal/core","ember-handlebars-compiler","exports"],
|
4917
|
-
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __exports__) {
|
4916
|
+
["ember-handlebars/controls/checkbox","ember-handlebars/controls/text_field","ember-handlebars/controls/text_area","ember-metal/core","ember-handlebars-compiler","ember-handlebars/ext","exports"],
|
4917
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __exports__) {
|
4918
4918
|
"use strict";
|
4919
4919
|
var Checkbox = __dependency1__["default"];
|
4920
4920
|
var TextField = __dependency2__["default"];
|
@@ -4925,12 +4925,21 @@ define("ember-handlebars/controls",
|
|
4925
4925
|
// var emberAssert = Ember.assert;
|
4926
4926
|
|
4927
4927
|
var EmberHandlebars = __dependency5__["default"];
|
4928
|
+
var handlebarsGet = __dependency6__.handlebarsGet;
|
4928
4929
|
var helpers = EmberHandlebars.helpers;
|
4929
4930
|
/**
|
4930
4931
|
@module ember
|
4931
4932
|
@submodule ember-handlebars-compiler
|
4932
4933
|
*/
|
4933
4934
|
|
4935
|
+
function _resolveOption(context, options, key) {
|
4936
|
+
if (options.hashTypes[key] === "ID") {
|
4937
|
+
return handlebarsGet(context, options.hash[key], options);
|
4938
|
+
} else {
|
4939
|
+
return options.hash[key];
|
4940
|
+
}
|
4941
|
+
}
|
4942
|
+
|
4934
4943
|
/**
|
4935
4944
|
|
4936
4945
|
The `{{input}}` helper inserts an HTML `<input>` tag into the template,
|
@@ -5111,7 +5120,7 @@ define("ember-handlebars/controls",
|
|
5111
5120
|
|
5112
5121
|
var hash = options.hash,
|
5113
5122
|
types = options.hashTypes,
|
5114
|
-
inputType =
|
5123
|
+
inputType = _resolveOption(this, options, 'type'),
|
5115
5124
|
onEvent = hash.on;
|
5116
5125
|
|
5117
5126
|
delete hash.type;
|
@@ -6834,6 +6843,7 @@ define("ember-handlebars/ext",
|
|
6834
6843
|
loc, len, hashOption,
|
6835
6844
|
boundOption, property,
|
6836
6845
|
normalizedValue = SimpleHandlebarsView.prototype.normalizedValue;
|
6846
|
+
var hashTypes = options.hashTypes;
|
6837
6847
|
|
6838
6848
|
Ember.assert("registerBoundHelper-generated helpers do not support use with Handlebars blocks.", !options.fn);
|
6839
6849
|
|
@@ -6843,6 +6853,8 @@ define("ember-handlebars/ext",
|
|
6843
6853
|
if (IS_BINDING.test(hashOption)) {
|
6844
6854
|
// Lop off 'Binding' suffix.
|
6845
6855
|
boundOptions[hashOption.slice(0, -7)] = hash[hashOption];
|
6856
|
+
} else if (hashTypes[hashOption] === 'ID') {
|
6857
|
+
boundOptions[hashOption] = hash[hashOption];
|
6846
6858
|
}
|
6847
6859
|
}
|
6848
6860
|
|
@@ -10305,6 +10317,7 @@ define("ember-metal",
|
|
10305
10317
|
var wrap = __dependency4__.wrap;
|
10306
10318
|
var apply = __dependency4__.apply;
|
10307
10319
|
var applyStr = __dependency4__.applyStr;
|
10320
|
+
var uuid = __dependency4__.uuid;
|
10308
10321
|
var EmberError = __dependency5__["default"];
|
10309
10322
|
var EnumerableUtils = __dependency6__["default"];
|
10310
10323
|
|
@@ -10445,6 +10458,7 @@ define("ember-metal",
|
|
10445
10458
|
Ember.wrap = wrap;
|
10446
10459
|
Ember.apply = apply;
|
10447
10460
|
Ember.applyStr = applyStr;
|
10461
|
+
Ember.uuid = uuid;
|
10448
10462
|
|
10449
10463
|
Ember.Logger = Logger;
|
10450
10464
|
|
@@ -12874,7 +12888,7 @@ define("ember-metal/core",
|
|
12874
12888
|
|
12875
12889
|
@class Ember
|
12876
12890
|
@static
|
12877
|
-
@version 1.7.0-beta.
|
12891
|
+
@version 1.7.0-beta.5
|
12878
12892
|
*/
|
12879
12893
|
|
12880
12894
|
if ('undefined' === typeof Ember) {
|
@@ -12901,10 +12915,10 @@ define("ember-metal/core",
|
|
12901
12915
|
/**
|
12902
12916
|
@property VERSION
|
12903
12917
|
@type String
|
12904
|
-
@default '1.7.0-beta.
|
12918
|
+
@default '1.7.0-beta.5'
|
12905
12919
|
@static
|
12906
12920
|
*/
|
12907
|
-
Ember.VERSION = '1.7.0-beta.
|
12921
|
+
Ember.VERSION = '1.7.0-beta.5';
|
12908
12922
|
|
12909
12923
|
/**
|
12910
12924
|
Standard environmental variables. You can define these in a global `EmberENV`
|
@@ -17489,6 +17503,15 @@ define("ember-metal/utils",
|
|
17489
17503
|
*/
|
17490
17504
|
var _uuid = 0;
|
17491
17505
|
|
17506
|
+
/**
|
17507
|
+
Generates a universally unique identifier. This method
|
17508
|
+
is used internally by Ember for assisting with
|
17509
|
+
the generation of GUID's and other unique identifiers
|
17510
|
+
such as `bind-attr` data attributes.
|
17511
|
+
|
17512
|
+
@public
|
17513
|
+
@return {Number} [description]
|
17514
|
+
*/
|
17492
17515
|
function uuid() {
|
17493
17516
|
return ++_uuid;
|
17494
17517
|
}
|
@@ -20498,7 +20521,7 @@ define("ember-routing/ext/controller",
|
|
20498
20521
|
return get(m.proto, '_normalizedQueryParams');
|
20499
20522
|
}
|
20500
20523
|
|
20501
|
-
var queryParams = this
|
20524
|
+
var queryParams = get(this, 'queryParams');
|
20502
20525
|
if (queryParams._qpMap) {
|
20503
20526
|
return queryParams._qpMap;
|
20504
20527
|
}
|
@@ -20552,9 +20575,11 @@ define("ember-routing/ext/controller",
|
|
20552
20575
|
|
20553
20576
|
var cacheKey = this._calculateCacheKey(propMeta.prefix, propMeta.parts, propMeta.values);
|
20554
20577
|
var cache = this._bucketCache;
|
20555
|
-
var value = cache.lookup(cacheKey, prop, propMeta.def);
|
20556
20578
|
|
20557
|
-
|
20579
|
+
if (cache) {
|
20580
|
+
var value = cache.lookup(cacheKey, prop, propMeta.def);
|
20581
|
+
set(this, prop, value);
|
20582
|
+
}
|
20558
20583
|
}
|
20559
20584
|
},
|
20560
20585
|
|
@@ -20566,7 +20591,10 @@ define("ember-routing/ext/controller",
|
|
20566
20591
|
var value = get(controller, prop);
|
20567
20592
|
|
20568
20593
|
// 1. Update model-dep cache
|
20569
|
-
|
20594
|
+
var cache = this._bucketCache;
|
20595
|
+
if (cache) {
|
20596
|
+
controller._bucketCache.stash(cacheKey, prop, value);
|
20597
|
+
}
|
20570
20598
|
|
20571
20599
|
// 2. Notify a delegate (e.g. to fire a qp transition)
|
20572
20600
|
var delegate = controller._qpDelegate;
|
@@ -22168,7 +22196,7 @@ define("ember-routing/system/route",
|
|
22168
22196
|
|
22169
22197
|
@method reset
|
22170
22198
|
*/
|
22171
|
-
|
22199
|
+
_reset: function(isExiting, transition) {
|
22172
22200
|
|
22173
22201
|
var controller = this.controller;
|
22174
22202
|
controller._qpDelegate = get(this, '_qp.states.inactive');
|
@@ -22467,7 +22495,7 @@ define("ember-routing/system/route",
|
|
22467
22495
|
// this controller.
|
22468
22496
|
var value, svalue;
|
22469
22497
|
if (changes && qp.urlKey in changes) {
|
22470
|
-
//
|
22498
|
+
// Value updated in/before setupController
|
22471
22499
|
value = get(controller, qp.prop);
|
22472
22500
|
svalue = route.serializeQueryParam(value, qp.urlKey, qp.type);
|
22473
22501
|
} else {
|
@@ -22477,10 +22505,7 @@ define("ember-routing/system/route",
|
|
22477
22505
|
} else {
|
22478
22506
|
// No QP provided; use default value.
|
22479
22507
|
svalue = qp.sdef;
|
22480
|
-
value = qp.def;
|
22481
|
-
if (isArray(value)) {
|
22482
|
-
value = Ember.A(value.slice());
|
22483
|
-
}
|
22508
|
+
value = copyDefaultValue(qp.def);
|
22484
22509
|
}
|
22485
22510
|
}
|
22486
22511
|
|
@@ -22829,6 +22854,10 @@ define("ember-routing/system/route",
|
|
22829
22854
|
}
|
22830
22855
|
controller._qpDelegate = states.allowOverrides;
|
22831
22856
|
|
22857
|
+
if (transition) {
|
22858
|
+
controller.setProperties(getQueryParamsFor(this, transition.state));
|
22859
|
+
}
|
22860
|
+
|
22832
22861
|
this.setupController(controller, context, transition);
|
22833
22862
|
}
|
22834
22863
|
|
@@ -22973,6 +23002,7 @@ define("ember-routing/system/route",
|
|
22973
23002
|
|
22974
23003
|
@method redirect
|
22975
23004
|
@param {Object} model the model for this route
|
23005
|
+
@param {Transition} transition the transition object associated with the current transition
|
22976
23006
|
*/
|
22977
23007
|
redirect: Ember.K,
|
22978
23008
|
|
@@ -23512,14 +23542,14 @@ define("ember-routing/system/route",
|
|
23512
23542
|
|
23513
23543
|
@method render
|
23514
23544
|
@param {String} name the name of the template to render
|
23515
|
-
@param {Object} options the options
|
23516
|
-
@param {String} options.into the template to render into,
|
23545
|
+
@param {Object} [options] the options
|
23546
|
+
@param {String} [options.into] the template to render into,
|
23517
23547
|
referenced by name. Defaults to the parent template
|
23518
|
-
@param {String} options.outlet the outlet inside `options.template` to render into.
|
23548
|
+
@param {String} [options.outlet] the outlet inside `options.template` to render into.
|
23519
23549
|
Defaults to 'main'
|
23520
|
-
@param {String} options.controller the controller to use for this template,
|
23550
|
+
@param {String} [options.controller] the controller to use for this template,
|
23521
23551
|
referenced by name. Defaults to the Route's paired controller
|
23522
|
-
@param {String} options.model the model object to set on `options.controller`
|
23552
|
+
@param {String} [options.model] the model object to set on `options.controller`
|
23523
23553
|
Defaults to the return value of the Route's model hook
|
23524
23554
|
*/
|
23525
23555
|
render: function(name, options) {
|
@@ -23802,9 +23832,6 @@ define("ember-routing/system/route",
|
|
23802
23832
|
run.once(this, this._fireQueryParamTransition);
|
23803
23833
|
},
|
23804
23834
|
|
23805
|
-
//_inactiveQPChanged: function(controller, qp) {
|
23806
|
-
//},
|
23807
|
-
|
23808
23835
|
_updatingQPChanged: function(controller, qp) {
|
23809
23836
|
var router = this.router;
|
23810
23837
|
if (!router._qpUpdates) {
|
@@ -23824,35 +23851,10 @@ define("ember-routing/system/route",
|
|
23824
23851
|
|
23825
23852
|
var transition = this.router.router.activeTransition;
|
23826
23853
|
var state = transition ? transition.state : this.router.router.state;
|
23827
|
-
var params = {};
|
23828
23854
|
|
23855
|
+
var params = {};
|
23829
23856
|
merge(params, state.params[name]);
|
23830
|
-
|
23831
|
-
if (!state.fullQueryParams) {
|
23832
|
-
state.fullQueryParams = {};
|
23833
|
-
merge(state.fullQueryParams, state.queryParams);
|
23834
|
-
|
23835
|
-
var targetRouteName = state.handlerInfos[state.handlerInfos.length-1].name;
|
23836
|
-
this.router._deserializeQueryParams(targetRouteName, state.fullQueryParams);
|
23837
|
-
}
|
23838
|
-
|
23839
|
-
var qpMeta = get(route, '_qp');
|
23840
|
-
|
23841
|
-
if (!qpMeta) {
|
23842
|
-
// No query params specified on the controller.
|
23843
|
-
return params;
|
23844
|
-
}
|
23845
|
-
|
23846
|
-
// Copy over all the query params for this route/controller into params hash.
|
23847
|
-
// TODO: is this correct? I think this won't do model dep state.
|
23848
|
-
var qps = qpMeta.qps;
|
23849
|
-
for (var i = 0, len = qps.length; i < len; ++i) {
|
23850
|
-
// Put deserialized qp on params hash.
|
23851
|
-
var qp = qps[i];
|
23852
|
-
if (!(qp.prop in params)) {
|
23853
|
-
params[qp.prop] = state.fullQueryParams[qp.prop] || qp.def;
|
23854
|
-
}
|
23855
|
-
}
|
23857
|
+
merge(params, getQueryParamsFor(route, state));
|
23856
23858
|
|
23857
23859
|
return params;
|
23858
23860
|
},
|
@@ -24037,6 +24039,50 @@ define("ember-routing/system/route",
|
|
24037
24039
|
return function() { parentView.disconnectOutlet(outlet); };
|
24038
24040
|
}
|
24039
24041
|
|
24042
|
+
function getFullQueryParams(router, state) {
|
24043
|
+
if (state.fullQueryParams) { return state.fullQueryParams; }
|
24044
|
+
|
24045
|
+
state.fullQueryParams = {};
|
24046
|
+
merge(state.fullQueryParams, state.queryParams);
|
24047
|
+
|
24048
|
+
var targetRouteName = state.handlerInfos[state.handlerInfos.length-1].name;
|
24049
|
+
router._deserializeQueryParams(targetRouteName, state.fullQueryParams);
|
24050
|
+
return state.fullQueryParams;
|
24051
|
+
}
|
24052
|
+
|
24053
|
+
function getQueryParamsFor(route, state) {
|
24054
|
+
state.queryParamsFor = state.queryParamsFor || {};
|
24055
|
+
var name = route.routeName;
|
24056
|
+
|
24057
|
+
if (state.queryParamsFor[name]) { return state.queryParamsFor[name]; }
|
24058
|
+
|
24059
|
+
var fullQueryParams = getFullQueryParams(route.router, state);
|
24060
|
+
|
24061
|
+
var params = state.queryParamsFor[name] = {};
|
24062
|
+
|
24063
|
+
// Copy over all the query params for this route/controller into params hash.
|
24064
|
+
var qpMeta = get(route, '_qp');
|
24065
|
+
var qps = qpMeta.qps;
|
24066
|
+
for (var i = 0, len = qps.length; i < len; ++i) {
|
24067
|
+
// Put deserialized qp on params hash.
|
24068
|
+
var qp = qps[i];
|
24069
|
+
|
24070
|
+
var qpValueWasPassedIn = (qp.prop in fullQueryParams);
|
24071
|
+
params[qp.prop] = qpValueWasPassedIn ?
|
24072
|
+
fullQueryParams[qp.prop] :
|
24073
|
+
copyDefaultValue(qp.def);
|
24074
|
+
}
|
24075
|
+
|
24076
|
+
return params;
|
24077
|
+
}
|
24078
|
+
|
24079
|
+
function copyDefaultValue(value) {
|
24080
|
+
if (isArray(value)) {
|
24081
|
+
return Ember.A(value.slice());
|
24082
|
+
}
|
24083
|
+
return value;
|
24084
|
+
}
|
24085
|
+
|
24040
24086
|
__exports__["default"] = Route;
|
24041
24087
|
});
|
24042
24088
|
define("ember-routing/system/router",
|
@@ -24651,9 +24697,6 @@ define("ember-routing/system/router",
|
|
24651
24697
|
router.intermediateTransitionTo('application_error', error);
|
24652
24698
|
return;
|
24653
24699
|
}
|
24654
|
-
} else {
|
24655
|
-
// Don't fire an assertion if we found an error substate.
|
24656
|
-
return;
|
24657
24700
|
}
|
24658
24701
|
|
24659
24702
|
logError(error, 'Error while processing route: ' + transition.targetName);
|
@@ -24871,12 +24914,7 @@ define("ember-routing/system/router",
|
|
24871
24914
|
|
24872
24915
|
if (error.name === "UnrecognizedURLError") {
|
24873
24916
|
Ember.assert("The URL '" + error.message + "' did not match any routes in your application");
|
24874
|
-
} else if (error.name === 'TransitionAborted') {
|
24875
|
-
// just ignore TransitionAborted here
|
24876
|
-
} else {
|
24877
|
-
logError(error);
|
24878
24917
|
}
|
24879
|
-
|
24880
24918
|
return error;
|
24881
24919
|
}, 'Ember: Process errors from Router');
|
24882
24920
|
}
|
@@ -38675,6 +38713,13 @@ define("ember-views/views/container_view",
|
|
38675
38713
|
var ContainerView = View.extend(MutableArray, {
|
38676
38714
|
_states: states,
|
38677
38715
|
|
38716
|
+
willWatchProperty: function(prop){
|
38717
|
+
Ember.deprecate(
|
38718
|
+
"ContainerViews should not be observed as arrays. This behavior will change in future implementations of ContainerView.",
|
38719
|
+
!prop.match(/\[]/) && prop.indexOf('@') !== 0
|
38720
|
+
);
|
38721
|
+
},
|
38722
|
+
|
38678
38723
|
init: function() {
|
38679
38724
|
this._super();
|
38680
38725
|
|
@@ -43219,6 +43264,7 @@ define("router/handler-info",
|
|
43219
43264
|
var merge = __dependency1__.merge;
|
43220
43265
|
var serialize = __dependency1__.serialize;
|
43221
43266
|
var promiseLabel = __dependency1__.promiseLabel;
|
43267
|
+
var applyHook = __dependency1__.applyHook;
|
43222
43268
|
var Promise = __dependency2__["default"];
|
43223
43269
|
|
43224
43270
|
function HandlerInfo(_props) {
|
@@ -43305,14 +43351,13 @@ define("router/handler-info",
|
|
43305
43351
|
}
|
43306
43352
|
args.push(payload);
|
43307
43353
|
|
43308
|
-
var
|
43309
|
-
var result = handler[hookName] && handler[hookName].apply(handler, args);
|
43354
|
+
var result = applyHook(this.handler, hookName, args);
|
43310
43355
|
|
43311
43356
|
if (result && result.isTransition) {
|
43312
43357
|
result = null;
|
43313
43358
|
}
|
43314
43359
|
|
43315
|
-
return Promise.resolve(result,
|
43360
|
+
return Promise.resolve(result, this.promiseLabel("Resolve value returned from one of the model hooks"));
|
43316
43361
|
},
|
43317
43362
|
|
43318
43363
|
// overridden by subclasses
|
@@ -43509,6 +43554,7 @@ define("router/handler-info/unresolved-handler-info-by-param",
|
|
43509
43554
|
function(__dependency1__, __dependency2__, __exports__) {
|
43510
43555
|
"use strict";
|
43511
43556
|
var HandlerInfo = __dependency1__["default"];
|
43557
|
+
var resolveHook = __dependency2__.resolveHook;
|
43512
43558
|
var merge = __dependency2__.merge;
|
43513
43559
|
var subclass = __dependency2__.subclass;
|
43514
43560
|
var promiseLabel = __dependency2__.promiseLabel;
|
@@ -43527,8 +43573,9 @@ define("router/handler-info/unresolved-handler-info-by-param",
|
|
43527
43573
|
fullParams.queryParams = payload.queryParams;
|
43528
43574
|
}
|
43529
43575
|
|
43530
|
-
var
|
43531
|
-
|
43576
|
+
var handler = this.handler;
|
43577
|
+
var hookName = resolveHook(handler, 'deserialize') ||
|
43578
|
+
resolveHook(handler, 'model');
|
43532
43579
|
|
43533
43580
|
return this.runSharedModelHook(payload, hookName, [fullParams]);
|
43534
43581
|
}
|
@@ -43551,6 +43598,7 @@ define("router/router",
|
|
43551
43598
|
var extractQueryParams = __dependency3__.extractQueryParams;
|
43552
43599
|
var getChangelist = __dependency3__.getChangelist;
|
43553
43600
|
var promiseLabel = __dependency3__.promiseLabel;
|
43601
|
+
var callHook = __dependency3__.callHook;
|
43554
43602
|
var TransitionState = __dependency4__["default"];
|
43555
43603
|
var logAbort = __dependency5__.logAbort;
|
43556
43604
|
var Transition = __dependency5__.Transition;
|
@@ -43694,11 +43742,9 @@ define("router/router",
|
|
43694
43742
|
*/
|
43695
43743
|
reset: function() {
|
43696
43744
|
if (this.state) {
|
43697
|
-
forEach(this.state.handlerInfos, function(handlerInfo) {
|
43745
|
+
forEach(this.state.handlerInfos.slice().reverse(), function(handlerInfo) {
|
43698
43746
|
var handler = handlerInfo.handler;
|
43699
|
-
|
43700
|
-
handler.exit();
|
43701
|
-
}
|
43747
|
+
callHook(handler, 'exit');
|
43702
43748
|
});
|
43703
43749
|
}
|
43704
43750
|
|
@@ -43762,7 +43808,7 @@ define("router/router",
|
|
43762
43808
|
},
|
43763
43809
|
|
43764
43810
|
intermediateTransitionTo: function(name) {
|
43765
|
-
doTransition(this, arguments, true);
|
43811
|
+
return doTransition(this, arguments, true);
|
43766
43812
|
},
|
43767
43813
|
|
43768
43814
|
refresh: function(pivotHandler) {
|
@@ -43982,8 +44028,9 @@ define("router/router",
|
|
43982
44028
|
forEach(partition.exited, function(handlerInfo) {
|
43983
44029
|
var handler = handlerInfo.handler;
|
43984
44030
|
delete handler.context;
|
43985
|
-
|
43986
|
-
|
44031
|
+
|
44032
|
+
callHook(handler, 'reset', true, transition);
|
44033
|
+
callHook(handler, 'exit', transition);
|
43987
44034
|
});
|
43988
44035
|
|
43989
44036
|
var oldState = router.oldState = router.state;
|
@@ -43993,7 +44040,7 @@ define("router/router",
|
|
43993
44040
|
try {
|
43994
44041
|
forEach(partition.reset, function(handlerInfo) {
|
43995
44042
|
var handler = handlerInfo.handler;
|
43996
|
-
|
44043
|
+
callHook(handler, 'reset', false, transition);
|
43997
44044
|
});
|
43998
44045
|
|
43999
44046
|
forEach(partition.updatedContext, function(handlerInfo) {
|
@@ -44024,15 +44071,15 @@ define("router/router",
|
|
44024
44071
|
var handler = handlerInfo.handler,
|
44025
44072
|
context = handlerInfo.context;
|
44026
44073
|
|
44027
|
-
|
44074
|
+
callHook(handler, 'enter', transition);
|
44028
44075
|
if (transition && transition.isAborted) {
|
44029
44076
|
throw new TransitionAborted();
|
44030
44077
|
}
|
44031
44078
|
|
44032
44079
|
handler.context = context;
|
44033
|
-
|
44080
|
+
callHook(handler, 'contextDidChange');
|
44034
44081
|
|
44035
|
-
|
44082
|
+
callHook(handler, 'setup', context, transition);
|
44036
44083
|
if (transition && transition.isAborted) {
|
44037
44084
|
throw new TransitionAborted();
|
44038
44085
|
}
|
@@ -44095,7 +44142,7 @@ define("router/router",
|
|
44095
44142
|
unchanged: []
|
44096
44143
|
};
|
44097
44144
|
|
44098
|
-
var handlerChanged, contextChanged, i, l;
|
44145
|
+
var handlerChanged, contextChanged = false, i, l;
|
44099
44146
|
|
44100
44147
|
for (i=0, l=newHandlers.length; i<l; i++) {
|
44101
44148
|
var oldHandler = oldHandlers[i], newHandler = newHandlers[i];
|
@@ -44313,9 +44360,10 @@ define("router/router",
|
|
44313
44360
|
var oldHandlers = router.state.handlerInfos,
|
44314
44361
|
changing = [],
|
44315
44362
|
leavingIndex = null,
|
44316
|
-
leaving, leavingChecker, i, oldHandler, newHandler;
|
44363
|
+
leaving, leavingChecker, i, oldHandlerLen, oldHandler, newHandler;
|
44317
44364
|
|
44318
|
-
|
44365
|
+
oldHandlerLen = oldHandlers.length;
|
44366
|
+
for (i = 0; i < oldHandlerLen; i++) {
|
44319
44367
|
oldHandler = oldHandlers[i];
|
44320
44368
|
newHandler = newState.handlerInfos[i];
|
44321
44369
|
|
@@ -44330,9 +44378,9 @@ define("router/router",
|
|
44330
44378
|
}
|
44331
44379
|
|
44332
44380
|
if (leavingIndex !== null) {
|
44333
|
-
leaving = oldHandlers.slice(leavingIndex,
|
44381
|
+
leaving = oldHandlers.slice(leavingIndex, oldHandlerLen);
|
44334
44382
|
leavingChecker = function(name) {
|
44335
|
-
for (var h = 0
|
44383
|
+
for (var h = 0, len = leaving.length; h < len; h++) {
|
44336
44384
|
if (leaving[h].name === name) {
|
44337
44385
|
return true;
|
44338
44386
|
}
|
@@ -44411,7 +44459,7 @@ define("router/transition-intent/named-transition-intent",
|
|
44411
44459
|
|
44412
44460
|
applyToHandlers: function(oldState, handlers, getHandler, targetRouteName, isIntermediate, checkingIfActive) {
|
44413
44461
|
|
44414
|
-
var i;
|
44462
|
+
var i, len;
|
44415
44463
|
var newState = new TransitionState();
|
44416
44464
|
var objects = this.contexts.slice(0);
|
44417
44465
|
|
@@ -44419,7 +44467,7 @@ define("router/transition-intent/named-transition-intent",
|
|
44419
44467
|
|
44420
44468
|
// Pivot handlers are provided for refresh transitions
|
44421
44469
|
if (this.pivotHandler) {
|
44422
|
-
for (i = 0
|
44470
|
+
for (i = 0, len = handlers.length; i < len; ++i) {
|
44423
44471
|
if (getHandler(handlers[i].handler) === this.pivotHandler) {
|
44424
44472
|
invalidateIndex = i;
|
44425
44473
|
break;
|
@@ -44650,6 +44698,7 @@ define("router/transition-state",
|
|
44650
44698
|
var ResolvedHandlerInfo = __dependency1__.ResolvedHandlerInfo;
|
44651
44699
|
var forEach = __dependency2__.forEach;
|
44652
44700
|
var promiseLabel = __dependency2__.promiseLabel;
|
44701
|
+
var callHook = __dependency2__.callHook;
|
44653
44702
|
var Promise = __dependency3__["default"];
|
44654
44703
|
|
44655
44704
|
function TransitionState(other) {
|
@@ -44694,13 +44743,13 @@ define("router/transition-state",
|
|
44694
44743
|
.then(resolveOneHandlerInfo, null, this.promiseLabel('Resolve handler'))['catch'](handleError, this.promiseLabel('Handle error'));
|
44695
44744
|
|
44696
44745
|
function innerShouldContinue() {
|
44697
|
-
return Promise.resolve(shouldContinue(), promiseLabel("Check if should continue"))['catch'](function(reason) {
|
44746
|
+
return Promise.resolve(shouldContinue(), currentState.promiseLabel("Check if should continue"))['catch'](function(reason) {
|
44698
44747
|
// We distinguish between errors that occurred
|
44699
44748
|
// during resolution (e.g. beforeModel/model/afterModel),
|
44700
44749
|
// and aborts due to a rejecting promise from shouldContinue().
|
44701
44750
|
wasAborted = true;
|
44702
44751
|
return Promise.reject(reason);
|
44703
|
-
}, promiseLabel("Handle abort"));
|
44752
|
+
}, currentState.promiseLabel("Handle abort"));
|
44704
44753
|
}
|
44705
44754
|
|
44706
44755
|
function handleError(error) {
|
@@ -44730,14 +44779,12 @@ define("router/transition-state",
|
|
44730
44779
|
// routes don't re-run the model hooks for this
|
44731
44780
|
// already-resolved route.
|
44732
44781
|
var handler = resolvedHandlerInfo.handler;
|
44733
|
-
|
44734
|
-
handler.redirect(resolvedHandlerInfo.context, payload);
|
44735
|
-
}
|
44782
|
+
callHook(handler, 'redirect', resolvedHandlerInfo.context, payload);
|
44736
44783
|
}
|
44737
44784
|
|
44738
44785
|
// Proceed after ensuring that the redirect hook
|
44739
44786
|
// didn't abort this transition by transitioning elsewhere.
|
44740
|
-
return innerShouldContinue().then(resolveOneHandlerInfo, null, promiseLabel('Resolve handler'));
|
44787
|
+
return innerShouldContinue().then(resolveOneHandlerInfo, null, currentState.promiseLabel('Resolve handler'));
|
44741
44788
|
}
|
44742
44789
|
|
44743
44790
|
function resolveOneHandlerInfo() {
|
@@ -44753,7 +44800,7 @@ define("router/transition-state",
|
|
44753
44800
|
var handlerInfo = currentState.handlerInfos[payload.resolveIndex];
|
44754
44801
|
|
44755
44802
|
return handlerInfo.resolve(innerShouldContinue, payload)
|
44756
|
-
.then(proceed, null, promiseLabel('Proceed'));
|
44803
|
+
.then(proceed, null, currentState.promiseLabel('Proceed'));
|
44757
44804
|
}
|
44758
44805
|
}
|
44759
44806
|
};
|
@@ -44801,7 +44848,7 @@ define("router/transition",
|
|
44801
44848
|
|
44802
44849
|
var len = state.handlerInfos.length;
|
44803
44850
|
if (len) {
|
44804
|
-
this.targetName = state.handlerInfos[
|
44851
|
+
this.targetName = state.handlerInfos[len-1].name;
|
44805
44852
|
}
|
44806
44853
|
|
44807
44854
|
for (var i = 0; i < len; ++i) {
|
@@ -44895,11 +44942,48 @@ define("router/transition",
|
|
44895
44942
|
use in situations where you want to pass around a thennable,
|
44896
44943
|
but not the Transition itself.
|
44897
44944
|
|
44898
|
-
@param {Function}
|
44899
|
-
@param {Function}
|
44945
|
+
@param {Function} onFulfilled
|
44946
|
+
@param {Function} onRejected
|
44947
|
+
@param {String} label optional string for labeling the promise.
|
44948
|
+
Useful for tooling.
|
44949
|
+
@return {Promise}
|
44900
44950
|
*/
|
44901
|
-
then: function(
|
44902
|
-
return this.promise.then(
|
44951
|
+
then: function(onFulfilled, onRejected, label) {
|
44952
|
+
return this.promise.then(onFulfilled, onRejected, label);
|
44953
|
+
},
|
44954
|
+
|
44955
|
+
/**
|
44956
|
+
@public
|
44957
|
+
|
44958
|
+
Forwards to the internal `promise` property which you can
|
44959
|
+
use in situations where you want to pass around a thennable,
|
44960
|
+
but not the Transition itself.
|
44961
|
+
|
44962
|
+
@method catch
|
44963
|
+
@param {Function} onRejection
|
44964
|
+
@param {String} label optional string for labeling the promise.
|
44965
|
+
Useful for tooling.
|
44966
|
+
@return {Promise}
|
44967
|
+
*/
|
44968
|
+
"catch": function(onRejection, label) {
|
44969
|
+
return this.promise["catch"](onRejection, label);
|
44970
|
+
},
|
44971
|
+
|
44972
|
+
/**
|
44973
|
+
@public
|
44974
|
+
|
44975
|
+
Forwards to the internal `promise` property which you can
|
44976
|
+
use in situations where you want to pass around a thennable,
|
44977
|
+
but not the Transition itself.
|
44978
|
+
|
44979
|
+
@method finally
|
44980
|
+
@param {Function} callback
|
44981
|
+
@param {String} label optional string for labeling the promise.
|
44982
|
+
Useful for tooling.
|
44983
|
+
@return {Promise}
|
44984
|
+
*/
|
44985
|
+
"finally": function(callback, label) {
|
44986
|
+
return this.promise["finally"](callback, label);
|
44903
44987
|
},
|
44904
44988
|
|
44905
44989
|
/**
|
@@ -45226,10 +45310,32 @@ define("router/utils",
|
|
45226
45310
|
return C;
|
45227
45311
|
}
|
45228
45312
|
|
45229
|
-
__exports__.subclass = subclass;
|
45313
|
+
__exports__.subclass = subclass;function resolveHook(obj, hookName) {
|
45314
|
+
if (!obj) { return; }
|
45315
|
+
var underscored = "_" + hookName;
|
45316
|
+
return obj[underscored] && underscored ||
|
45317
|
+
obj[hookName] && hookName;
|
45318
|
+
}
|
45319
|
+
|
45320
|
+
function callHook(obj, hookName) {
|
45321
|
+
var args = slice.call(arguments, 2);
|
45322
|
+
return applyHook(obj, hookName, args);
|
45323
|
+
}
|
45324
|
+
|
45325
|
+
function applyHook(obj, _hookName, args) {
|
45326
|
+
var hookName = resolveHook(obj, _hookName);
|
45327
|
+
if (hookName) {
|
45328
|
+
return obj[hookName].apply(obj, args);
|
45329
|
+
}
|
45330
|
+
}
|
45331
|
+
|
45332
|
+
__exports__.merge = merge;
|
45230
45333
|
__exports__.slice = slice;
|
45231
45334
|
__exports__.isParam = isParam;
|
45232
45335
|
__exports__.coerceQueryParamsToString = coerceQueryParamsToString;
|
45336
|
+
__exports__.callHook = callHook;
|
45337
|
+
__exports__.resolveHook = resolveHook;
|
45338
|
+
__exports__.applyHook = applyHook;
|
45233
45339
|
});
|
45234
45340
|
define("router",
|
45235
45341
|
["./router/router","exports"],
|
@@ -45239,6 +45345,7 @@ define("router",
|
|
45239
45345
|
|
45240
45346
|
__exports__["default"] = Router;
|
45241
45347
|
});
|
45348
|
+
|
45242
45349
|
/**
|
45243
45350
|
@class RSVP
|
45244
45351
|
@module RSVP
|