ember-source 1.11.0.beta.1 → 1.11.0.beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ember-source might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-runtime.js +17 -47
- data/dist/ember-template-compiler.js +317 -137
- data/dist/ember-testing.js +2 -42
- data/dist/ember-tests.js +729 -1135
- data/dist/ember-tests.prod.js +1044 -1442
- data/dist/ember.debug.cjs.js +1842 -1838
- data/dist/ember.debug.js +1842 -1838
- data/dist/ember.js +1842 -1838
- data/dist/ember.min.js +13 -13
- data/dist/ember.prod.js +1818 -1779
- metadata +2 -2
data/dist/ember.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
6
6
|
* @license Licensed under MIT license
|
7
7
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
8
|
-
* @version 1.11.0-beta.
|
8
|
+
* @version 1.11.0-beta.2
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -1489,6 +1489,8 @@ enifed('container/registry', ['exports', 'ember-metal/core', 'ember-metal/dictio
|
|
1489
1489
|
|
1490
1490
|
var VALID_FULL_NAME_REGEXP = /^[^:]+.+:[^:]+$/;
|
1491
1491
|
|
1492
|
+
var instanceInitializersFeatureEnabled;
|
1493
|
+
|
1492
1494
|
/**
|
1493
1495
|
A lightweight registry used to store factory and option information keyed
|
1494
1496
|
by type.
|
@@ -1656,7 +1658,7 @@ enifed('container/registry', ['exports', 'ember-metal/core', 'ember-metal/dictio
|
|
1656
1658
|
lookup: function(fullName, options) {
|
1657
1659
|
Ember['default'].assert('Create a container on the registry (with `registry.container()`) before calling `lookup`.', this._defaultContainer);
|
1658
1660
|
|
1659
|
-
if (
|
1661
|
+
if (instanceInitializersFeatureEnabled) {
|
1660
1662
|
Ember['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.', { url: "http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers" });
|
1661
1663
|
}
|
1662
1664
|
|
@@ -1666,7 +1668,7 @@ enifed('container/registry', ['exports', 'ember-metal/core', 'ember-metal/dictio
|
|
1666
1668
|
lookupFactory: function(fullName) {
|
1667
1669
|
Ember['default'].assert('Create a container on the registry (with `registry.container()`) before calling `lookupFactory`.', this._defaultContainer);
|
1668
1670
|
|
1669
|
-
if (
|
1671
|
+
if (instanceInitializersFeatureEnabled) {
|
1670
1672
|
Ember['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.', { url: "http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers" });
|
1671
1673
|
}
|
1672
1674
|
|
@@ -2789,51 +2791,65 @@ enifed("dom-helper",
|
|
2789
2791
|
};
|
2790
2792
|
|
2791
2793
|
prototype.createMorph = function(parent, start, end, contextualElement){
|
2794
|
+
if (contextualElement && contextualElement.nodeType === 11) {
|
2795
|
+
throw new Error("Cannot pass a fragment as the contextual element to createMorph");
|
2796
|
+
}
|
2797
|
+
|
2792
2798
|
if (!contextualElement && parent.nodeType === 1) {
|
2793
2799
|
contextualElement = parent;
|
2794
2800
|
}
|
2795
|
-
|
2801
|
+
var morph = new Morph(this, contextualElement);
|
2802
|
+
morph.firstNode = start;
|
2803
|
+
morph.lastNode = end;
|
2804
|
+
morph.state = {};
|
2805
|
+
morph.isDirty = true;
|
2806
|
+
return morph;
|
2796
2807
|
};
|
2797
2808
|
|
2798
2809
|
prototype.createUnsafeMorph = function(parent, start, end, contextualElement){
|
2799
2810
|
var morph = this.createMorph(parent, start, end, contextualElement);
|
2800
|
-
morph.
|
2811
|
+
morph.parseTextAsHTML = true;
|
2801
2812
|
return morph;
|
2802
2813
|
};
|
2803
2814
|
|
2804
2815
|
// This helper is just to keep the templates good looking,
|
2805
2816
|
// passing integers instead of element references.
|
2806
2817
|
prototype.createMorphAt = function(parent, startIndex, endIndex, contextualElement){
|
2807
|
-
var
|
2808
|
-
|
2818
|
+
var single = startIndex === endIndex;
|
2819
|
+
var start = this.childAtIndex(parent, startIndex);
|
2820
|
+
var end = single ? start : this.childAtIndex(parent, endIndex);
|
2809
2821
|
return this.createMorph(parent, start, end, contextualElement);
|
2810
2822
|
};
|
2811
2823
|
|
2812
2824
|
prototype.createUnsafeMorphAt = function(parent, startIndex, endIndex, contextualElement) {
|
2813
2825
|
var morph = this.createMorphAt(parent, startIndex, endIndex, contextualElement);
|
2814
|
-
morph.
|
2826
|
+
morph.parseTextAsHTML = true;
|
2815
2827
|
return morph;
|
2816
2828
|
};
|
2817
2829
|
|
2818
2830
|
prototype.insertMorphBefore = function(element, referenceChild, contextualElement) {
|
2819
|
-
var
|
2820
|
-
|
2821
|
-
|
2822
|
-
element.insertBefore(end, referenceChild);
|
2823
|
-
return this.createMorph(element, start, end, contextualElement);
|
2831
|
+
var insertion = this.document.createComment('');
|
2832
|
+
element.insertBefore(insertion, referenceChild);
|
2833
|
+
return this.createMorph(element, insertion, insertion, contextualElement);
|
2824
2834
|
};
|
2825
2835
|
|
2826
2836
|
prototype.appendMorph = function(element, contextualElement) {
|
2827
|
-
var
|
2828
|
-
|
2829
|
-
|
2830
|
-
|
2831
|
-
|
2837
|
+
var insertion = this.document.createComment('');
|
2838
|
+
element.appendChild(insertion);
|
2839
|
+
return this.createMorph(element, insertion, insertion, contextualElement);
|
2840
|
+
};
|
2841
|
+
|
2842
|
+
prototype.insertBoundary = function(fragment, index) {
|
2843
|
+
// this will always be null or firstChild
|
2844
|
+
var child = index === null ? null : this.childAtIndex(fragment, index);
|
2845
|
+
this.insertBefore(fragment, this.createTextNode(''), child);
|
2832
2846
|
};
|
2833
2847
|
|
2834
2848
|
prototype.parseHTML = function(html, contextualElement) {
|
2849
|
+
var childNodes;
|
2850
|
+
|
2835
2851
|
if (interiorNamespace(contextualElement) === svgNamespace) {
|
2836
|
-
|
2852
|
+
childNodes = buildSVGDOM(html, this);
|
2837
2853
|
} else {
|
2838
2854
|
var nodes = buildHTMLDOM(html, contextualElement, this);
|
2839
2855
|
if (detectOmittedStartTag(html, contextualElement)) {
|
@@ -2841,11 +2857,33 @@ enifed("dom-helper",
|
|
2841
2857
|
while (node && node.nodeType !== 1) {
|
2842
2858
|
node = node.nextSibling;
|
2843
2859
|
}
|
2844
|
-
|
2860
|
+
childNodes = node.childNodes;
|
2845
2861
|
} else {
|
2846
|
-
|
2862
|
+
childNodes = nodes;
|
2863
|
+
}
|
2864
|
+
}
|
2865
|
+
|
2866
|
+
// Copy node list to a fragment.
|
2867
|
+
var fragment = this.document.createDocumentFragment();
|
2868
|
+
|
2869
|
+
if (childNodes && childNodes.length > 0) {
|
2870
|
+
var currentNode = childNodes[0];
|
2871
|
+
|
2872
|
+
// We prepend an <option> to <select> boxes to absorb any browser bugs
|
2873
|
+
// related to auto-select behavior. Skip past it.
|
2874
|
+
if (contextualElement.tagName === 'SELECT') {
|
2875
|
+
currentNode = currentNode.nextSibling;
|
2876
|
+
}
|
2877
|
+
|
2878
|
+
while (currentNode) {
|
2879
|
+
var tempNode = currentNode;
|
2880
|
+
currentNode = currentNode.nextSibling;
|
2881
|
+
|
2882
|
+
fragment.appendChild(tempNode);
|
2847
2883
|
}
|
2848
2884
|
}
|
2885
|
+
|
2886
|
+
return fragment;
|
2849
2887
|
};
|
2850
2888
|
|
2851
2889
|
var parsingNode;
|
@@ -2904,33 +2942,6 @@ enifed("dom-helper/build-html-dom",
|
|
2904
2942
|
testEl.childNodes[2].nodeValue === ' Value';
|
2905
2943
|
})(doc);
|
2906
2944
|
|
2907
|
-
// IE8 create a selected attribute where they should only
|
2908
|
-
// create a property
|
2909
|
-
var createsSelectedAttribute = doc && (function(document) {
|
2910
|
-
var testEl = document.createElement('div');
|
2911
|
-
testEl.innerHTML = "<select><option></option></select>";
|
2912
|
-
return testEl.childNodes[0].childNodes[0].getAttribute('selected') === 'selected';
|
2913
|
-
})(doc);
|
2914
|
-
|
2915
|
-
var detectAutoSelectedOption;
|
2916
|
-
if (createsSelectedAttribute) {
|
2917
|
-
detectAutoSelectedOption = (function(){
|
2918
|
-
var detectAutoSelectedOptionRegex = /<option[^>]*selected/;
|
2919
|
-
return function detectAutoSelectedOption(select, option, html) { //jshint ignore:line
|
2920
|
-
return select.selectedIndex === 0 &&
|
2921
|
-
!detectAutoSelectedOptionRegex.test(html);
|
2922
|
-
};
|
2923
|
-
})();
|
2924
|
-
} else {
|
2925
|
-
detectAutoSelectedOption = function detectAutoSelectedOption(select, option, html) { //jshint ignore:line
|
2926
|
-
var selectedAttribute = option.getAttribute('selected');
|
2927
|
-
return select.selectedIndex === 0 && (
|
2928
|
-
selectedAttribute === null ||
|
2929
|
-
( selectedAttribute !== '' && selectedAttribute.toLowerCase() !== 'selected' )
|
2930
|
-
);
|
2931
|
-
};
|
2932
|
-
}
|
2933
|
-
|
2934
2945
|
var tagNamesRequiringInnerHTMLFix = doc && (function(document) {
|
2935
2946
|
var tagNamesRequiringInnerHTMLFix;
|
2936
2947
|
// IE 9 and earlier don't allow us to set innerHTML on col, colgroup, frameset,
|
@@ -3005,7 +3016,10 @@ enifed("dom-helper/build-html-dom",
|
|
3005
3016
|
throw "Can't set innerHTML on "+tagName+" in this browser";
|
3006
3017
|
}
|
3007
3018
|
|
3019
|
+
html = fixSelect(html, contextualElement);
|
3020
|
+
|
3008
3021
|
var wrappingTags = tagNamesRequiringInnerHTMLFix[tagName.toLowerCase()];
|
3022
|
+
|
3009
3023
|
var startTag = outerHTML.match(new RegExp("<"+tagName+"([^>]*)>", 'i'))[0];
|
3010
3024
|
var endTag = '</'+tagName+'>';
|
3011
3025
|
|
@@ -3036,18 +3050,30 @@ enifed("dom-helper/build-html-dom",
|
|
3036
3050
|
var buildDOM;
|
3037
3051
|
if (needsShy) {
|
3038
3052
|
buildDOM = function buildDOM(html, contextualElement, dom){
|
3053
|
+
html = fixSelect(html, contextualElement);
|
3054
|
+
|
3039
3055
|
contextualElement = dom.cloneNode(contextualElement, false);
|
3040
3056
|
scriptSafeInnerHTML(contextualElement, html);
|
3041
3057
|
return contextualElement.childNodes;
|
3042
3058
|
};
|
3043
3059
|
} else {
|
3044
3060
|
buildDOM = function buildDOM(html, contextualElement, dom){
|
3061
|
+
html = fixSelect(html, contextualElement);
|
3062
|
+
|
3045
3063
|
contextualElement = dom.cloneNode(contextualElement, false);
|
3046
3064
|
contextualElement.innerHTML = html;
|
3047
3065
|
return contextualElement.childNodes;
|
3048
3066
|
};
|
3049
3067
|
}
|
3050
3068
|
|
3069
|
+
function fixSelect(html, contextualElement) {
|
3070
|
+
if (contextualElement.tagName === 'SELECT') {
|
3071
|
+
html = "<option></option>" + html;
|
3072
|
+
}
|
3073
|
+
|
3074
|
+
return html;
|
3075
|
+
}
|
3076
|
+
|
3051
3077
|
var buildIESafeDOM;
|
3052
3078
|
if (tagNamesRequiringInnerHTMLFix || movesWhitespace) {
|
3053
3079
|
buildIESafeDOM = function buildIESafeDOM(html, contextualElement, dom) {
|
@@ -3118,45 +3144,17 @@ enifed("dom-helper/build-html-dom",
|
|
3118
3144
|
buildIESafeDOM = buildDOM;
|
3119
3145
|
}
|
3120
3146
|
|
3121
|
-
// When parsing innerHTML, the browser may set up DOM with some things
|
3122
|
-
// not desired. For example, with a select element context and option
|
3123
|
-
// innerHTML the first option will be marked selected.
|
3124
|
-
//
|
3125
|
-
// This method cleans up some of that, resetting those values back to
|
3126
|
-
// their defaults.
|
3127
|
-
//
|
3128
|
-
function buildSafeDOM(html, contextualElement, dom) {
|
3129
|
-
var childNodes = buildIESafeDOM(html, contextualElement, dom);
|
3130
|
-
|
3131
|
-
if (contextualElement.tagName === 'SELECT') {
|
3132
|
-
// Walk child nodes
|
3133
|
-
for (var i = 0; childNodes[i]; i++) {
|
3134
|
-
// Find and process the first option child node
|
3135
|
-
if (childNodes[i].tagName === 'OPTION') {
|
3136
|
-
if (detectAutoSelectedOption(childNodes[i].parentNode, childNodes[i], html)) {
|
3137
|
-
// If the first node is selected but does not have an attribute,
|
3138
|
-
// presume it is not really selected.
|
3139
|
-
childNodes[i].parentNode.selectedIndex = -1;
|
3140
|
-
}
|
3141
|
-
break;
|
3142
|
-
}
|
3143
|
-
}
|
3144
|
-
}
|
3145
|
-
|
3146
|
-
return childNodes;
|
3147
|
-
}
|
3148
|
-
|
3149
3147
|
var buildHTMLDOM;
|
3150
3148
|
if (needsIntegrationPointFix) {
|
3151
3149
|
buildHTMLDOM = function buildHTMLDOM(html, contextualElement, dom){
|
3152
3150
|
if (svgHTMLIntegrationPoints[contextualElement.tagName]) {
|
3153
|
-
return
|
3151
|
+
return buildIESafeDOM(html, document.createElement('div'), dom);
|
3154
3152
|
} else {
|
3155
|
-
return
|
3153
|
+
return buildIESafeDOM(html, contextualElement, dom);
|
3156
3154
|
}
|
3157
3155
|
};
|
3158
3156
|
} else {
|
3159
|
-
buildHTMLDOM =
|
3157
|
+
buildHTMLDOM = buildIESafeDOM;
|
3160
3158
|
}
|
3161
3159
|
|
3162
3160
|
__exports__.buildHTMLDOM = buildHTMLDOM;
|
@@ -3668,7 +3666,7 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-metal
|
|
3668
3666
|
});
|
3669
3667
|
|
3670
3668
|
});
|
3671
|
-
enifed('ember-application/system/application', ['exports', 'dag-map', 'container/registry', 'ember-metal', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-runtime/system/lazy_load', 'ember-runtime/system/namespace', 'ember-runtime/mixins/deferred', 'ember-application/system/resolver', 'ember-metal/platform/create', 'ember-metal/run_loop', 'ember-metal/utils', 'ember-runtime/controllers/controller', 'ember-metal/enumerable_utils', 'ember-runtime/controllers/object_controller', 'ember-runtime/controllers/array_controller', 'ember-views/system/renderer', 'dom-helper', 'ember-views/views/select', 'ember-views/views/view', 'ember-views/views/metamorph_view', 'ember-views/system/event_dispatcher', 'ember-views/system/jquery', 'ember-routing/system/route', 'ember-routing/system/router', 'ember-routing/location/hash_location', 'ember-routing/location/history_location', 'ember-routing/location/auto_location', 'ember-routing/location/none_location', 'ember-routing/system/cache', 'ember-application/system/application-instance', 'ember-extension-support/container_debug_adapter', 'ember-metal/environment'], function (exports, DAG, Registry, Ember, property_get, property_set, lazy_load, Namespace, DeferredMixin, DefaultResolver, create, run, utils, Controller, EnumerableUtils, ObjectController, ArrayController, Renderer, DOMHelper, SelectView, EmberView, _MetamorphView, EventDispatcher, jQuery, Route, Router, HashLocation, HistoryLocation, AutoLocation, NoneLocation, BucketCache, ApplicationInstance, ContainerDebugAdapter, environment) {
|
3669
|
+
enifed('ember-application/system/application', ['exports', 'dag-map', 'container/registry', 'ember-metal', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-runtime/system/lazy_load', 'ember-runtime/system/namespace', 'ember-runtime/mixins/deferred', 'ember-application/system/resolver', 'ember-metal/platform/create', 'ember-metal/run_loop', 'ember-metal/utils', 'ember-runtime/controllers/controller', 'ember-metal/enumerable_utils', 'ember-runtime/controllers/object_controller', 'ember-runtime/controllers/array_controller', 'ember-views/system/renderer', 'dom-helper', 'ember-views/views/select', 'ember-routing-views/views/outlet', 'ember-views/views/view', 'ember-views/views/metamorph_view', 'ember-views/system/event_dispatcher', 'ember-views/system/jquery', 'ember-routing/system/route', 'ember-routing/system/router', 'ember-routing/location/hash_location', 'ember-routing/location/history_location', 'ember-routing/location/auto_location', 'ember-routing/location/none_location', 'ember-routing/system/cache', 'ember-application/system/application-instance', 'ember-extension-support/container_debug_adapter', 'ember-metal/environment'], function (exports, DAG, Registry, Ember, property_get, property_set, lazy_load, Namespace, DeferredMixin, DefaultResolver, create, run, utils, Controller, EnumerableUtils, ObjectController, ArrayController, Renderer, DOMHelper, SelectView, outlet, EmberView, _MetamorphView, EventDispatcher, jQuery, Route, Router, HashLocation, HistoryLocation, AutoLocation, NoneLocation, BucketCache, ApplicationInstance, ContainerDebugAdapter, environment) {
|
3672
3670
|
|
3673
3671
|
'use strict';
|
3674
3672
|
|
@@ -3921,19 +3919,10 @@ enifed('ember-application/system/application', ['exports', 'dag-map', 'container
|
|
3921
3919
|
// decremented by the Application's own `initialize` method.
|
3922
3920
|
this._readinessDeferrals = 1;
|
3923
3921
|
|
3924
|
-
|
3925
|
-
if (this.autoboot) {
|
3926
|
-
// Create subclass of Ember.Router for this Application instance.
|
3927
|
-
// This is to ensure that someone reopening `App.Router` does not
|
3928
|
-
// tamper with the default `Ember.Router`.
|
3929
|
-
// 2.0TODO: Can we move this into a globals-mode-only library?
|
3930
|
-
this.Router = Router['default'].extend();
|
3931
|
-
this.waitForDOMReady(this.buildDefaultInstance());
|
3932
|
-
}
|
3933
|
-
} else {
|
3922
|
+
|
3934
3923
|
this.Router = Router['default'].extend();
|
3935
3924
|
this.waitForDOMReady(this.buildDefaultInstance());
|
3936
|
-
|
3925
|
+
|
3937
3926
|
},
|
3938
3927
|
|
3939
3928
|
/**
|
@@ -4308,12 +4297,10 @@ enifed('ember-application/system/application', ['exports', 'dag-map', 'container
|
|
4308
4297
|
this._runInitializer('initializers', function(name, initializer) {
|
4309
4298
|
Ember['default'].assert("No application initializer named '" + name + "'", !!initializer);
|
4310
4299
|
|
4311
|
-
|
4312
|
-
initializer.initialize(registry, App);
|
4313
|
-
} else {
|
4300
|
+
|
4314
4301
|
var ref = initializer.initialize;
|
4315
4302
|
ref(registry, App);
|
4316
|
-
|
4303
|
+
|
4317
4304
|
});
|
4318
4305
|
},
|
4319
4306
|
|
@@ -4413,55 +4400,8 @@ enifed('ember-application/system/application', ['exports', 'dag-map', 'container
|
|
4413
4400
|
}
|
4414
4401
|
});
|
4415
4402
|
|
4416
|
-
|
4417
|
-
|
4418
|
-
instanceInitializer: function(options) {
|
4419
|
-
this.constructor.instanceInitializer(options);
|
4420
|
-
}
|
4421
|
-
});
|
4422
|
-
|
4423
|
-
Application.reopenClass({
|
4424
|
-
instanceInitializer: buildInitializerMethod('instanceInitializers', 'instance initializer')
|
4425
|
-
});
|
4426
|
-
}
|
4427
|
-
|
4428
|
-
if (Ember['default'].FEATURES.isEnabled('ember-application-visit')) {
|
4429
|
-
Application.reopen({
|
4430
|
-
/**
|
4431
|
-
Creates a new instance of the application and instructs it to route to the
|
4432
|
-
specified initial URL. This method returns a promise that will be resolved
|
4433
|
-
once rendering is complete. That promise is resolved with the instance.
|
4434
|
-
|
4435
|
-
```js
|
4436
|
-
App.visit('/users').then(function(instance) {
|
4437
|
-
var view = instance.view;
|
4438
|
-
view.appendTo('#qunit-test-fixtures');
|
4439
|
-
});
|
4440
|
-
```
|
4441
|
-
|
4442
|
-
@method visit
|
4443
|
-
@private
|
4444
|
-
*/
|
4445
|
-
visit: function(url) {
|
4446
|
-
var instance = this.buildInstance();
|
4447
|
-
this.runInstanceInitializers(instance);
|
4448
|
-
|
4449
|
-
var renderPromise = new Ember['default'].RSVP.Promise(function(res, rej) {
|
4450
|
-
instance.didCreateRootView = function(view) {
|
4451
|
-
instance.view = view;
|
4452
|
-
res(instance);
|
4453
|
-
};
|
4454
|
-
});
|
4455
|
-
|
4456
|
-
instance.setupRouter({ location: 'none' });
|
4457
|
-
|
4458
|
-
return instance.handleURL(url).then(function() {
|
4459
|
-
return renderPromise;
|
4460
|
-
});
|
4461
|
-
}
|
4462
|
-
});
|
4463
|
-
}
|
4464
|
-
|
4403
|
+
|
4404
|
+
|
4465
4405
|
Application.reopenClass({
|
4466
4406
|
initializers: create['default'](null),
|
4467
4407
|
instanceInitializers: create['default'](null),
|
@@ -4640,6 +4580,7 @@ enifed('ember-application/system/application', ['exports', 'dag-map', 'container
|
|
4640
4580
|
|
4641
4581
|
registry.injection('view', 'renderer', 'renderer:-dom');
|
4642
4582
|
registry.register('view:select', SelectView['default']);
|
4583
|
+
registry.register('view:-outlet', outlet.OutletView);
|
4643
4584
|
|
4644
4585
|
registry.register('view:default', _MetamorphView['default']);
|
4645
4586
|
registry.register('view:toplevel', EmberView['default'].extend());
|
@@ -4648,6 +4589,7 @@ enifed('ember-application/system/application', ['exports', 'dag-map', 'container
|
|
4648
4589
|
registry.register('event_dispatcher:main', EventDispatcher['default']);
|
4649
4590
|
|
4650
4591
|
registry.injection('router:main', 'namespace', 'application:main');
|
4592
|
+
registry.injection('view:-outlet', 'namespace', 'application:main');
|
4651
4593
|
|
4652
4594
|
registry.register('location:auto', AutoLocation['default']);
|
4653
4595
|
registry.register('location:hash', HashLocation['default']);
|
@@ -5372,10 +5314,7 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/error', 'embe
|
|
5372
5314
|
Ember['default'].FEATURES['features-stripped-test'] = true;
|
5373
5315
|
var featuresWereStripped = true;
|
5374
5316
|
|
5375
|
-
|
5376
|
-
featuresWereStripped = false;
|
5377
|
-
}
|
5378
|
-
|
5317
|
+
|
5379
5318
|
delete Ember['default'].FEATURES['features-stripped-test'];
|
5380
5319
|
_warnIfUsingStrippedFeatureFlags(Ember['default'].ENV.FEATURES, featuresWereStripped);
|
5381
5320
|
|
@@ -5974,40 +5913,34 @@ enifed('ember-htmlbars', ['ember-metal/core', 'ember-template-compiler', 'ember-
|
|
5974
5913
|
helpers.registerHelper('each', each.eachHelper);
|
5975
5914
|
helpers.registerHelper('unbound', unbound.unboundHelper);
|
5976
5915
|
|
5977
|
-
|
5978
|
-
|
5979
|
-
|
5980
|
-
|
5981
|
-
|
5982
|
-
|
5983
|
-
|
5984
|
-
|
5985
|
-
|
5986
|
-
};
|
5987
|
-
|
5988
|
-
|
5916
|
+
Ember['default'].HTMLBars = {
|
5917
|
+
_registerHelper: helpers.registerHelper,
|
5918
|
+
template: ember_template_compiler.template,
|
5919
|
+
compile: ember_template_compiler.compile,
|
5920
|
+
precompile: ember_template_compiler.precompile,
|
5921
|
+
makeViewHelper: makeViewHelper['default'],
|
5922
|
+
makeBoundHelper: makeBoundHelper['default'],
|
5923
|
+
registerPlugin: ember_template_compiler.registerPlugin
|
5924
|
+
};
|
5989
5925
|
|
5990
5926
|
});
|
5991
5927
|
enifed('ember-htmlbars/compat', ['exports', 'ember-metal/core', 'ember-htmlbars/helpers', 'ember-htmlbars/compat/helper', 'ember-htmlbars/compat/handlebars-get', 'ember-htmlbars/compat/make-bound-helper', 'ember-htmlbars/compat/register-bound-helper', 'ember-htmlbars/system/make-view-helper', 'ember-htmlbars/utils/string'], function (exports, Ember, helpers, helper, compatHandlebarsGet, compatMakeBoundHelper, compatRegisterBoundHelper, makeViewHelper, string) {
|
5992
5928
|
|
5993
5929
|
'use strict';
|
5994
5930
|
|
5995
|
-
var EmberHandlebars;
|
5996
|
-
|
5997
|
-
|
5998
|
-
|
5999
|
-
|
6000
|
-
|
6001
|
-
|
6002
|
-
|
6003
|
-
|
6004
|
-
|
6005
|
-
|
6006
|
-
|
6007
|
-
|
6008
|
-
escapeExpression: string.escapeExpression
|
6009
|
-
};
|
6010
|
-
|
5931
|
+
var EmberHandlebars = Ember['default'].Handlebars = Ember['default'].Handlebars || {};
|
5932
|
+
EmberHandlebars.helpers = helpers['default'];
|
5933
|
+
EmberHandlebars.helper = helper.handlebarsHelper;
|
5934
|
+
EmberHandlebars.registerHelper = helper.registerHandlebarsCompatibleHelper;
|
5935
|
+
EmberHandlebars.registerBoundHelper = compatRegisterBoundHelper['default'];
|
5936
|
+
EmberHandlebars.makeBoundHelper = compatMakeBoundHelper['default'];
|
5937
|
+
EmberHandlebars.get = compatHandlebarsGet['default'];
|
5938
|
+
EmberHandlebars.makeViewHelper = makeViewHelper['default'];
|
5939
|
+
|
5940
|
+
EmberHandlebars.SafeString = string.SafeString;
|
5941
|
+
EmberHandlebars.Utils = {
|
5942
|
+
escapeExpression: string.escapeExpression
|
5943
|
+
};
|
6011
5944
|
|
6012
5945
|
exports['default'] = EmberHandlebars;
|
6013
5946
|
|
@@ -6539,9 +6472,8 @@ enifed('ember-htmlbars/helpers/bind-attr', ['exports', 'ember-metal/core', 'embe
|
|
6539
6472
|
function bindAttrHelperDeprecated() {
|
6540
6473
|
Ember['default'].deprecate("The 'bindAttr' view helper is deprecated in favor of 'bind-attr'");
|
6541
6474
|
|
6542
|
-
|
6543
|
-
|
6544
|
-
}
|
6475
|
+
return helpers['default']['bind-attr'].helperFunction.apply(this, arguments);
|
6476
|
+
}
|
6545
6477
|
|
6546
6478
|
exports['default'] = bindAttrHelper;
|
6547
6479
|
|
@@ -7389,7 +7321,7 @@ enifed('ember-htmlbars/hooks/inline', ['exports', 'ember-views/views/simple_boun
|
|
7389
7321
|
exports['default'] = inline;
|
7390
7322
|
|
7391
7323
|
});
|
7392
|
-
enifed('ember-htmlbars/hooks/set', ['exports'
|
7324
|
+
enifed('ember-htmlbars/hooks/set', ['exports'], function (exports) {
|
7393
7325
|
|
7394
7326
|
'use strict';
|
7395
7327
|
|
@@ -7399,9 +7331,8 @@ enifed('ember-htmlbars/hooks/set', ['exports', 'ember-metal/core', 'ember-metal/
|
|
7399
7331
|
*/
|
7400
7332
|
|
7401
7333
|
function set(env, view, name, value) {
|
7402
|
-
|
7403
|
-
|
7404
|
-
}
|
7334
|
+
view._keywords[name] = value;
|
7335
|
+
}
|
7405
7336
|
exports['default'] = set;
|
7406
7337
|
|
7407
7338
|
});
|
@@ -7529,9 +7460,6 @@ enifed('ember-htmlbars/system/bootstrap', ['exports', 'ember-metal/core', 'ember
|
|
7529
7460
|
*/
|
7530
7461
|
|
7531
7462
|
lazy_load.onLoad('Ember.Application', function(Application) {
|
7532
|
-
|
7533
|
-
// jscs:disable validateIndentation
|
7534
|
-
|
7535
7463
|
Application.initializer({
|
7536
7464
|
name: 'domTemplates',
|
7537
7465
|
initialize: environment['default'].hasDOM ? _bootstrap : function() { }
|
@@ -7542,9 +7470,6 @@ enifed('ember-htmlbars/system/bootstrap', ['exports', 'ember-metal/core', 'ember
|
|
7542
7470
|
after: 'domTemplates',
|
7543
7471
|
initialize: registerComponentLookup
|
7544
7472
|
});
|
7545
|
-
|
7546
|
-
// jscs:enable validateIndentation
|
7547
|
-
|
7548
7473
|
});
|
7549
7474
|
|
7550
7475
|
exports['default'] = bootstrap;
|
@@ -7835,6 +7760,12 @@ enifed('ember-htmlbars/system/render-view', ['exports', 'ember-metal/core', 'emb
|
|
7835
7760
|
exports['default'] = renderView;
|
7836
7761
|
|
7837
7762
|
function renderHTMLBarsTemplate(view, buffer, template) {
|
7763
|
+
Ember['default'].assert(
|
7764
|
+
'The template being rendered by `' + view + '` was compiled with `' + template.revision +
|
7765
|
+
'` which does not match `Ember@1.11.0-beta.2` (this revision).',
|
7766
|
+
template.revision === 'Ember@1.11.0-beta.2'
|
7767
|
+
);
|
7768
|
+
|
7838
7769
|
var contextualElement = buffer.innerContextualElement();
|
7839
7770
|
var args = view._blockArguments;
|
7840
7771
|
var env = {
|
@@ -7869,17 +7800,16 @@ enifed('ember-htmlbars/templates/component', ['exports', 'ember-template-compile
|
|
7869
7800
|
|
7870
7801
|
'use strict';
|
7871
7802
|
|
7872
|
-
|
7803
|
+
exports['default'] = template['default']((function() {
|
7873
7804
|
return {
|
7874
7805
|
isHTMLBars: true,
|
7806
|
+
revision: "Ember@v1.11.0-beta.2",
|
7875
7807
|
blockParams: 0,
|
7876
7808
|
cachedFragment: null,
|
7877
7809
|
hasRendered: false,
|
7878
7810
|
build: function build(dom) {
|
7879
7811
|
var el0 = dom.createDocumentFragment();
|
7880
|
-
var el1 = dom.
|
7881
|
-
dom.appendChild(el0, el1);
|
7882
|
-
var el1 = dom.createTextNode("");
|
7812
|
+
var el1 = dom.createComment("");
|
7883
7813
|
dom.appendChild(el0, el1);
|
7884
7814
|
return el0;
|
7885
7815
|
},
|
@@ -7903,23 +7833,24 @@ enifed('ember-htmlbars/templates/component', ['exports', 'ember-template-compile
|
|
7903
7833
|
} else {
|
7904
7834
|
fragment = this.build(dom);
|
7905
7835
|
}
|
7906
|
-
|
7907
|
-
|
7836
|
+
var morph0 = dom.createMorphAt(fragment,0,0,contextualElement);
|
7837
|
+
dom.insertBoundary(fragment, null);
|
7838
|
+
dom.insertBoundary(fragment, 0);
|
7908
7839
|
content(env, morph0, context, "yield");
|
7909
7840
|
return fragment;
|
7910
7841
|
}
|
7911
7842
|
};
|
7912
|
-
}());
|
7913
|
-
exports['default'] = template['default'](t);
|
7843
|
+
}()));
|
7914
7844
|
|
7915
7845
|
});
|
7916
7846
|
enifed('ember-htmlbars/templates/empty', ['exports', 'ember-template-compiler/system/template'], function (exports, template) {
|
7917
7847
|
|
7918
7848
|
'use strict';
|
7919
7849
|
|
7920
|
-
|
7850
|
+
exports['default'] = template['default']((function() {
|
7921
7851
|
return {
|
7922
7852
|
isHTMLBars: true,
|
7853
|
+
revision: "Ember@v1.11.0-beta.2",
|
7923
7854
|
blockParams: 0,
|
7924
7855
|
cachedFragment: null,
|
7925
7856
|
hasRendered: false,
|
@@ -7949,24 +7880,28 @@ enifed('ember-htmlbars/templates/empty', ['exports', 'ember-template-compiler/sy
|
|
7949
7880
|
return fragment;
|
7950
7881
|
}
|
7951
7882
|
};
|
7952
|
-
}());
|
7953
|
-
exports['default'] = template['default'](t);
|
7883
|
+
}()));
|
7954
7884
|
|
7955
7885
|
});
|
7956
7886
|
enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/system/template'], function (exports, template) {
|
7957
7887
|
|
7958
7888
|
'use strict';
|
7959
7889
|
|
7960
|
-
|
7890
|
+
exports['default'] = template['default']((function() {
|
7961
7891
|
var child0 = (function() {
|
7962
7892
|
return {
|
7963
7893
|
isHTMLBars: true,
|
7894
|
+
revision: "Ember@v1.11.0-beta.2",
|
7964
7895
|
blockParams: 0,
|
7965
7896
|
cachedFragment: null,
|
7966
7897
|
hasRendered: false,
|
7967
7898
|
build: function build(dom) {
|
7968
|
-
var el0 = dom.
|
7969
|
-
dom.
|
7899
|
+
var el0 = dom.createDocumentFragment();
|
7900
|
+
var el1 = dom.createElement("option");
|
7901
|
+
dom.setAttribute(el1,"value","");
|
7902
|
+
var el2 = dom.createComment("");
|
7903
|
+
dom.appendChild(el1, el2);
|
7904
|
+
dom.appendChild(el0, el1);
|
7970
7905
|
return el0;
|
7971
7906
|
},
|
7972
7907
|
render: function render(context, env, contextualElement) {
|
@@ -7989,7 +7924,7 @@ enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/s
|
|
7989
7924
|
} else {
|
7990
7925
|
fragment = this.build(dom);
|
7991
7926
|
}
|
7992
|
-
var morph0 = dom.createMorphAt(fragment
|
7927
|
+
var morph0 = dom.createMorphAt(dom.childAt(fragment, [0]),0,0);
|
7993
7928
|
content(env, morph0, context, "view.prompt");
|
7994
7929
|
return fragment;
|
7995
7930
|
}
|
@@ -7999,14 +7934,13 @@ enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/s
|
|
7999
7934
|
var child0 = (function() {
|
8000
7935
|
return {
|
8001
7936
|
isHTMLBars: true,
|
7937
|
+
revision: "Ember@v1.11.0-beta.2",
|
8002
7938
|
blockParams: 0,
|
8003
7939
|
cachedFragment: null,
|
8004
7940
|
hasRendered: false,
|
8005
7941
|
build: function build(dom) {
|
8006
7942
|
var el0 = dom.createDocumentFragment();
|
8007
|
-
var el1 = dom.
|
8008
|
-
dom.appendChild(el0, el1);
|
8009
|
-
var el1 = dom.createTextNode("");
|
7943
|
+
var el1 = dom.createComment("");
|
8010
7944
|
dom.appendChild(el0, el1);
|
8011
7945
|
return el0;
|
8012
7946
|
},
|
@@ -8030,8 +7964,9 @@ enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/s
|
|
8030
7964
|
} else {
|
8031
7965
|
fragment = this.build(dom);
|
8032
7966
|
}
|
8033
|
-
|
8034
|
-
|
7967
|
+
var morph0 = dom.createMorphAt(fragment,0,0,contextualElement);
|
7968
|
+
dom.insertBoundary(fragment, null);
|
7969
|
+
dom.insertBoundary(fragment, 0);
|
8035
7970
|
inline(env, morph0, context, "view", [get(env, context, "view.groupView")], {"content": get(env, context, "group.content"), "label": get(env, context, "group.label")});
|
8036
7971
|
return fragment;
|
8037
7972
|
}
|
@@ -8039,14 +7974,13 @@ enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/s
|
|
8039
7974
|
}());
|
8040
7975
|
return {
|
8041
7976
|
isHTMLBars: true,
|
7977
|
+
revision: "Ember@v1.11.0-beta.2",
|
8042
7978
|
blockParams: 0,
|
8043
7979
|
cachedFragment: null,
|
8044
7980
|
hasRendered: false,
|
8045
7981
|
build: function build(dom) {
|
8046
7982
|
var el0 = dom.createDocumentFragment();
|
8047
|
-
var el1 = dom.
|
8048
|
-
dom.appendChild(el0, el1);
|
8049
|
-
var el1 = dom.createTextNode("");
|
7983
|
+
var el1 = dom.createComment("");
|
8050
7984
|
dom.appendChild(el0, el1);
|
8051
7985
|
return el0;
|
8052
7986
|
},
|
@@ -8070,8 +8004,9 @@ enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/s
|
|
8070
8004
|
} else {
|
8071
8005
|
fragment = this.build(dom);
|
8072
8006
|
}
|
8073
|
-
|
8074
|
-
|
8007
|
+
var morph0 = dom.createMorphAt(fragment,0,0,contextualElement);
|
8008
|
+
dom.insertBoundary(fragment, null);
|
8009
|
+
dom.insertBoundary(fragment, 0);
|
8075
8010
|
block(env, morph0, context, "each", [get(env, context, "view.groupedContent")], {"keyword": "group"}, child0, null);
|
8076
8011
|
return fragment;
|
8077
8012
|
}
|
@@ -8081,14 +8016,13 @@ enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/s
|
|
8081
8016
|
var child0 = (function() {
|
8082
8017
|
return {
|
8083
8018
|
isHTMLBars: true,
|
8019
|
+
revision: "Ember@v1.11.0-beta.2",
|
8084
8020
|
blockParams: 0,
|
8085
8021
|
cachedFragment: null,
|
8086
8022
|
hasRendered: false,
|
8087
8023
|
build: function build(dom) {
|
8088
8024
|
var el0 = dom.createDocumentFragment();
|
8089
|
-
var el1 = dom.
|
8090
|
-
dom.appendChild(el0, el1);
|
8091
|
-
var el1 = dom.createTextNode("");
|
8025
|
+
var el1 = dom.createComment("");
|
8092
8026
|
dom.appendChild(el0, el1);
|
8093
8027
|
return el0;
|
8094
8028
|
},
|
@@ -8112,8 +8046,9 @@ enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/s
|
|
8112
8046
|
} else {
|
8113
8047
|
fragment = this.build(dom);
|
8114
8048
|
}
|
8115
|
-
|
8116
|
-
|
8049
|
+
var morph0 = dom.createMorphAt(fragment,0,0,contextualElement);
|
8050
|
+
dom.insertBoundary(fragment, null);
|
8051
|
+
dom.insertBoundary(fragment, 0);
|
8117
8052
|
inline(env, morph0, context, "view", [get(env, context, "view.optionView")], {"content": get(env, context, "item")});
|
8118
8053
|
return fragment;
|
8119
8054
|
}
|
@@ -8121,14 +8056,13 @@ enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/s
|
|
8121
8056
|
}());
|
8122
8057
|
return {
|
8123
8058
|
isHTMLBars: true,
|
8059
|
+
revision: "Ember@v1.11.0-beta.2",
|
8124
8060
|
blockParams: 0,
|
8125
8061
|
cachedFragment: null,
|
8126
8062
|
hasRendered: false,
|
8127
8063
|
build: function build(dom) {
|
8128
8064
|
var el0 = dom.createDocumentFragment();
|
8129
|
-
var el1 = dom.
|
8130
|
-
dom.appendChild(el0, el1);
|
8131
|
-
var el1 = dom.createTextNode("");
|
8065
|
+
var el1 = dom.createComment("");
|
8132
8066
|
dom.appendChild(el0, el1);
|
8133
8067
|
return el0;
|
8134
8068
|
},
|
@@ -8152,8 +8086,9 @@ enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/s
|
|
8152
8086
|
} else {
|
8153
8087
|
fragment = this.build(dom);
|
8154
8088
|
}
|
8155
|
-
|
8156
|
-
|
8089
|
+
var morph0 = dom.createMorphAt(fragment,0,0,contextualElement);
|
8090
|
+
dom.insertBoundary(fragment, null);
|
8091
|
+
dom.insertBoundary(fragment, 0);
|
8157
8092
|
block(env, morph0, context, "each", [get(env, context, "view.content")], {"keyword": "item"}, child0, null);
|
8158
8093
|
return fragment;
|
8159
8094
|
}
|
@@ -8161,14 +8096,15 @@ enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/s
|
|
8161
8096
|
}());
|
8162
8097
|
return {
|
8163
8098
|
isHTMLBars: true,
|
8099
|
+
revision: "Ember@v1.11.0-beta.2",
|
8164
8100
|
blockParams: 0,
|
8165
8101
|
cachedFragment: null,
|
8166
8102
|
hasRendered: false,
|
8167
8103
|
build: function build(dom) {
|
8168
8104
|
var el0 = dom.createDocumentFragment();
|
8169
|
-
var el1 = dom.
|
8105
|
+
var el1 = dom.createComment("");
|
8170
8106
|
dom.appendChild(el0, el1);
|
8171
|
-
var el1 = dom.
|
8107
|
+
var el1 = dom.createComment("");
|
8172
8108
|
dom.appendChild(el0, el1);
|
8173
8109
|
var el1 = dom.createTextNode("\n");
|
8174
8110
|
dom.appendChild(el0, el1);
|
@@ -8194,16 +8130,15 @@ enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/s
|
|
8194
8130
|
} else {
|
8195
8131
|
fragment = this.build(dom);
|
8196
8132
|
}
|
8197
|
-
|
8198
|
-
var
|
8199
|
-
|
8133
|
+
var morph0 = dom.createMorphAt(fragment,0,0,contextualElement);
|
8134
|
+
var morph1 = dom.createMorphAt(fragment,1,1,contextualElement);
|
8135
|
+
dom.insertBoundary(fragment, 0);
|
8200
8136
|
block(env, morph0, context, "if", [get(env, context, "view.prompt")], {}, child0, null);
|
8201
8137
|
block(env, morph1, context, "if", [get(env, context, "view.optionGroupPath")], {}, child1, child2);
|
8202
8138
|
return fragment;
|
8203
8139
|
}
|
8204
8140
|
};
|
8205
|
-
}());
|
8206
|
-
exports['default'] = template['default'](t);
|
8141
|
+
}()));
|
8207
8142
|
|
8208
8143
|
});
|
8209
8144
|
enifed('ember-htmlbars/utils/string', ['exports', 'htmlbars-util', 'ember-runtime/system/string'], function (exports, htmlbars_util, EmberStringUtils) {
|
@@ -8283,10 +8218,9 @@ enifed('ember-metal-views/renderer', ['exports', 'dom-helper', 'ember-metal/envi
|
|
8283
8218
|
this._destinedForDOM = _destinedForDOM === undefined ? true : _destinedForDOM;
|
8284
8219
|
}
|
8285
8220
|
|
8286
|
-
function Renderer_renderTree(_view, _parentView,
|
8221
|
+
function Renderer_renderTree(_view, _parentView, _refMorph) {
|
8287
8222
|
var views = this._views;
|
8288
8223
|
views[0] = _view;
|
8289
|
-
var insertAt = _insertAt === undefined ? -1 : _insertAt;
|
8290
8224
|
var index = 0;
|
8291
8225
|
var total = 1;
|
8292
8226
|
var levelBase = _parentView ? _parentView._level+1 : 0;
|
@@ -8380,7 +8314,7 @@ enifed('ember-metal-views/renderer', ['exports', 'dom-helper', 'ember-metal/envi
|
|
8380
8314
|
|
8381
8315
|
parentIndex = parents[level];
|
8382
8316
|
parent = parentIndex === -1 ? _parentView : views[parentIndex];
|
8383
|
-
this.insertElement(view, parent, element,
|
8317
|
+
this.insertElement(view, parent, element, null);
|
8384
8318
|
index = queue[--length];
|
8385
8319
|
view = views[index];
|
8386
8320
|
element = elements[level];
|
@@ -8388,7 +8322,7 @@ enifed('ember-metal-views/renderer', ['exports', 'dom-helper', 'ember-metal/envi
|
|
8388
8322
|
}
|
8389
8323
|
}
|
8390
8324
|
|
8391
|
-
this.insertElement(view, _parentView, element,
|
8325
|
+
this.insertElement(view, _parentView, element, _refMorph);
|
8392
8326
|
|
8393
8327
|
for (i=total-1; i>=0; i--) {
|
8394
8328
|
if (willInsert) {
|
@@ -8437,7 +8371,12 @@ enifed('ember-metal-views/renderer', ['exports', 'dom-helper', 'ember-metal/envi
|
|
8437
8371
|
|
8438
8372
|
Renderer.prototype.replaceIn =
|
8439
8373
|
function Renderer_replaceIn(view, target) {
|
8440
|
-
var morph
|
8374
|
+
var morph;
|
8375
|
+
if (target.firstNode) {
|
8376
|
+
morph = this._dom.createMorph(target, target.firstNode, target.lastNode);
|
8377
|
+
} else {
|
8378
|
+
morph = this._dom.appendMorph(target);
|
8379
|
+
}
|
8441
8380
|
this.scheduleInsert(view, morph);
|
8442
8381
|
};
|
8443
8382
|
|
@@ -8510,7 +8449,7 @@ enifed('ember-metal-views/renderer', ['exports', 'dom-helper', 'ember-metal/envi
|
|
8510
8449
|
}
|
8511
8450
|
}
|
8512
8451
|
|
8513
|
-
function Renderer_insertElement(view, parentView, element,
|
8452
|
+
function Renderer_insertElement(view, parentView, element, refMorph) {
|
8514
8453
|
if (element === null || element === undefined) {
|
8515
8454
|
return;
|
8516
8455
|
}
|
@@ -8518,11 +8457,7 @@ enifed('ember-metal-views/renderer', ['exports', 'dom-helper', 'ember-metal/envi
|
|
8518
8457
|
if (view._morph) {
|
8519
8458
|
view._morph.setContent(element);
|
8520
8459
|
} else if (parentView) {
|
8521
|
-
|
8522
|
-
view._morph = parentView._childViewsMorph.append(element);
|
8523
|
-
} else {
|
8524
|
-
view._morph = parentView._childViewsMorph.insert(index, element);
|
8525
|
-
}
|
8460
|
+
view._morph = parentView._childViewsMorph.insertContentBeforeMorph(element, refMorph);
|
8526
8461
|
}
|
8527
8462
|
}
|
8528
8463
|
|
@@ -8611,12 +8546,12 @@ enifed('ember-metal', ['exports', 'ember-metal/core', 'ember-metal/merge', 'embe
|
|
8611
8546
|
|
8612
8547
|
var EmberInstrumentation = Ember['default'].Instrumentation = {};
|
8613
8548
|
EmberInstrumentation.instrument = instrumentation.instrument;
|
8614
|
-
EmberInstrumentation.subscribe =
|
8615
|
-
EmberInstrumentation.unsubscribe =
|
8549
|
+
EmberInstrumentation.subscribe = instrumentation.subscribe;
|
8550
|
+
EmberInstrumentation.unsubscribe = instrumentation.unsubscribe;
|
8616
8551
|
EmberInstrumentation.reset = instrumentation.reset;
|
8617
8552
|
|
8618
8553
|
Ember['default'].instrument = instrumentation.instrument;
|
8619
|
-
Ember['default'].subscribe =
|
8554
|
+
Ember['default'].subscribe = instrumentation.subscribe;
|
8620
8555
|
|
8621
8556
|
Ember['default']._Cache = Cache['default'];
|
8622
8557
|
|
@@ -8766,23 +8701,7 @@ enifed('ember-metal', ['exports', 'ember-metal/core', 'ember-metal/merge', 'embe
|
|
8766
8701
|
|
8767
8702
|
Ember['default'].merge = merge['default'];
|
8768
8703
|
|
8769
|
-
|
8770
|
-
Ember['default'].stream = {
|
8771
|
-
Stream: Stream['default'],
|
8772
|
-
|
8773
|
-
isStream: streams__utils.isStream,
|
8774
|
-
subscribe: streams__utils.subscribe,
|
8775
|
-
unsubscribe: streams__utils.unsubscribe,
|
8776
|
-
read: streams__utils.read,
|
8777
|
-
readHash: streams__utils.readHash,
|
8778
|
-
readArray: streams__utils.readArray,
|
8779
|
-
scanArray: streams__utils.scanArray,
|
8780
|
-
scanHash: streams__utils.scanHash,
|
8781
|
-
concat: streams__utils.concat,
|
8782
|
-
chain: streams__utils.chain
|
8783
|
-
};
|
8784
|
-
}
|
8785
|
-
|
8704
|
+
|
8786
8705
|
/**
|
8787
8706
|
A function may be assigned to `Ember.onerror` to be called when Ember
|
8788
8707
|
internals encounter an error. This is useful for specialized error handling
|
@@ -10051,27 +9970,13 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/property_set', 'ember-me
|
|
10051
9970
|
*/
|
10052
9971
|
function ComputedProperty(config, opts) {
|
10053
9972
|
this.isDescriptor = true;
|
10054
|
-
|
10055
|
-
if (typeof config === "function") {
|
10056
|
-
config.__ember_arity = config.length;
|
10057
|
-
this._getter = config;
|
10058
|
-
if (config.__ember_arity > 1) {
|
10059
|
-
this._setter = config;
|
10060
|
-
}
|
10061
|
-
} else {
|
10062
|
-
this._getter = config.get;
|
10063
|
-
this._setter = config.set;
|
10064
|
-
if (this._setter && this._setter.__ember_arity === undefined) {
|
10065
|
-
this._setter.__ember_arity = this._setter.length;
|
10066
|
-
}
|
10067
|
-
}
|
10068
|
-
} else {
|
9973
|
+
|
10069
9974
|
config.__ember_arity = config.length;
|
10070
9975
|
this._getter = config;
|
10071
9976
|
if (config.__ember_arity > 1) {
|
10072
9977
|
this._setter = config;
|
10073
9978
|
}
|
10074
|
-
|
9979
|
+
|
10075
9980
|
|
10076
9981
|
this._dependentKeys = undefined;
|
10077
9982
|
this._suspended = undefined;
|
@@ -10517,14 +10422,12 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/property_set', 'ember-me
|
|
10517
10422
|
|
10518
10423
|
var cp = new ComputedProperty(func);
|
10519
10424
|
// jscs:disable
|
10520
|
-
|
10521
|
-
// Empty block on purpose
|
10522
|
-
} else {
|
10425
|
+
|
10523
10426
|
// jscs:enable
|
10524
10427
|
if (typeof func !== "function") {
|
10525
10428
|
throw new EmberError['default']("Computed Property declared without a property function");
|
10526
10429
|
}
|
10527
|
-
|
10430
|
+
|
10528
10431
|
|
10529
10432
|
if (args) {
|
10530
10433
|
cp.property.apply(cp, args);
|
@@ -11338,7 +11241,7 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
11338
11241
|
|
11339
11242
|
@class Ember
|
11340
11243
|
@static
|
11341
|
-
@version 1.11.0-beta.
|
11244
|
+
@version 1.11.0-beta.2
|
11342
11245
|
*/
|
11343
11246
|
|
11344
11247
|
if ('undefined' === typeof Ember) {
|
@@ -11366,10 +11269,10 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
11366
11269
|
/**
|
11367
11270
|
@property VERSION
|
11368
11271
|
@type String
|
11369
|
-
@default '1.11.0-beta.
|
11272
|
+
@default '1.11.0-beta.2'
|
11370
11273
|
@static
|
11371
11274
|
*/
|
11372
|
-
Ember.VERSION = '1.11.0-beta.
|
11275
|
+
Ember.VERSION = '1.11.0-beta.2';
|
11373
11276
|
|
11374
11277
|
/**
|
11375
11278
|
Standard environmental variables. You can define these in a global `EmberENV`
|
@@ -11414,7 +11317,7 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
11414
11317
|
Ember.FEATURES = Ember.ENV.FEATURES;
|
11415
11318
|
|
11416
11319
|
if (!Ember.FEATURES) {
|
11417
|
-
Ember.FEATURES = {"features-stripped-test":
|
11320
|
+
Ember.FEATURES = {"features-stripped-test":false,"ember-routing-named-substates":true,"mandatory-setter":true,"ember-htmlbars-component-generation":false,"ember-htmlbars-component-helper":true,"ember-htmlbars-inline-if-helper":true,"ember-htmlbars-attribute-syntax":true,"ember-routing-transitioning-classes":true,"new-computed-syntax":false,"ember-testing-checkbox-helpers":false,"ember-metal-stream":false,"ember-htmlbars-each-with-index":true,"ember-application-instance-initializers":false,"ember-application-initializer-context":false,"ember-router-willtransition":true,"ember-application-visit":false}; //jshint ignore:line
|
11418
11321
|
}
|
11419
11322
|
|
11420
11323
|
/**
|
@@ -18610,7 +18513,7 @@ enifed('ember-routing-htmlbars/helpers/link-to', ['exports', 'ember-metal/core',
|
|
18610
18513
|
|
18611
18514
|
if (!options.template) {
|
18612
18515
|
var linkTitle = params.shift();
|
18613
|
-
var
|
18516
|
+
var parseTextAsHTML = options.morph.parseTextAsHTML;
|
18614
18517
|
|
18615
18518
|
if (utils.isStream(linkTitle)) {
|
18616
18519
|
hash.linkTitle = { stream: linkTitle };
|
@@ -18618,12 +18521,13 @@ enifed('ember-routing-htmlbars/helpers/link-to', ['exports', 'ember-metal/core',
|
|
18618
18521
|
|
18619
18522
|
options.template = {
|
18620
18523
|
isHTMLBars: true,
|
18524
|
+
revision: 'Ember@1.11.0-beta.2',
|
18621
18525
|
render: function(view, env) {
|
18622
18526
|
var value = utils.read(linkTitle) || "";
|
18623
|
-
if (
|
18624
|
-
return env.dom.createTextNode(value);
|
18625
|
-
} else {
|
18527
|
+
if (parseTextAsHTML) {
|
18626
18528
|
return value;
|
18529
|
+
} else {
|
18530
|
+
return env.dom.createTextNode(value);
|
18627
18531
|
}
|
18628
18532
|
}
|
18629
18533
|
};
|
@@ -18667,7 +18571,7 @@ enifed('ember-routing-htmlbars/helpers/link-to', ['exports', 'ember-metal/core',
|
|
18667
18571
|
}
|
18668
18572
|
|
18669
18573
|
});
|
18670
|
-
enifed('ember-routing-htmlbars/helpers/outlet', ['exports', 'ember-metal/core'
|
18574
|
+
enifed('ember-routing-htmlbars/helpers/outlet', ['exports', 'ember-metal/core'], function (exports, Ember) {
|
18671
18575
|
|
18672
18576
|
'use strict';
|
18673
18577
|
|
@@ -18679,7 +18583,6 @@ enifed('ember-routing-htmlbars/helpers/outlet', ['exports', 'ember-metal/core',
|
|
18679
18583
|
*/
|
18680
18584
|
|
18681
18585
|
function outletHelper(params, hash, options, env) {
|
18682
|
-
var outletSource;
|
18683
18586
|
var viewName;
|
18684
18587
|
var viewClass;
|
18685
18588
|
var viewFullName;
|
@@ -18691,11 +18594,6 @@ enifed('ember-routing-htmlbars/helpers/outlet', ['exports', 'ember-metal/core',
|
|
18691
18594
|
|
18692
18595
|
var property = params[0] || 'main';
|
18693
18596
|
|
18694
|
-
outletSource = this;
|
18695
|
-
while (!outletSource.get('template.isTop')) {
|
18696
|
-
outletSource = outletSource._parentView;
|
18697
|
-
}
|
18698
|
-
property_set.set(this, 'outletSource', outletSource);
|
18699
18597
|
|
18700
18598
|
// provide controller override
|
18701
18599
|
viewName = hash.view;
|
@@ -18713,12 +18611,9 @@ enifed('ember-routing-htmlbars/helpers/outlet', ['exports', 'ember-metal/core',
|
|
18713
18611
|
);
|
18714
18612
|
}
|
18715
18613
|
|
18716
|
-
viewClass = viewName ? this.container.lookupFactory(viewFullName) : hash.viewClass || outlet
|
18717
|
-
|
18718
|
-
hash.currentViewBinding = '_view.outletSource._outlets.' + property;
|
18719
|
-
|
18614
|
+
viewClass = viewName ? this.container.lookupFactory(viewFullName) : hash.viewClass || this.container.lookupFactory('view:-outlet');
|
18615
|
+
hash._outletName = property;
|
18720
18616
|
options.helperName = options.helperName || 'outlet';
|
18721
|
-
|
18722
18617
|
return env.helpers.view.helperFunction.call(this, [viewClass], hash, options, env);
|
18723
18618
|
}
|
18724
18619
|
|
@@ -18923,7 +18818,7 @@ enifed('ember-routing-views/views/link', ['exports', 'ember-metal/core', 'ember-
|
|
18923
18818
|
@extends Ember.View
|
18924
18819
|
@see {Handlebars.helpers.link-to}
|
18925
18820
|
**/
|
18926
|
-
var LinkView =
|
18821
|
+
var LinkView = EmberComponent['default'].extend({
|
18927
18822
|
tagName: 'a',
|
18928
18823
|
|
18929
18824
|
/**
|
@@ -19499,21 +19394,143 @@ enifed('ember-routing-views/views/link', ['exports', 'ember-metal/core', 'ember-
|
|
19499
19394
|
exports.LinkView = LinkView;
|
19500
19395
|
|
19501
19396
|
});
|
19502
|
-
enifed('ember-routing-views/views/outlet', ['exports', 'ember-views/views/container_view', 'ember-views/views/metamorph_view'], function (exports, ContainerView, metamorph_view) {
|
19397
|
+
enifed('ember-routing-views/views/outlet', ['exports', 'ember-views/views/container_view', 'ember-views/views/metamorph_view', 'ember-metal/property_get'], function (exports, ContainerView, metamorph_view, property_get) {
|
19503
19398
|
|
19504
|
-
|
19399
|
+
'use strict';
|
19505
19400
|
|
19506
|
-
|
19507
|
-
|
19508
|
-
|
19509
|
-
|
19401
|
+
/**
|
19402
|
+
@module ember
|
19403
|
+
@submodule ember-routing-views
|
19404
|
+
*/
|
19405
|
+
|
19406
|
+
var CoreOutletView = ContainerView['default'].extend({
|
19407
|
+
init: function() {
|
19408
|
+
this._super();
|
19409
|
+
this._childOutlets = [];
|
19410
|
+
this._outletState = null;
|
19411
|
+
},
|
19412
|
+
|
19413
|
+
_isOutlet: true,
|
19414
|
+
|
19415
|
+
_parentOutlet: function() {
|
19416
|
+
var parent = this._parentView;
|
19417
|
+
while (parent && !parent._isOutlet) {
|
19418
|
+
parent = parent._parentView;
|
19419
|
+
}
|
19420
|
+
return parent;
|
19421
|
+
},
|
19422
|
+
|
19423
|
+
_linkParent: Ember.on('init', 'parentViewDidChange', function() {
|
19424
|
+
var parent = this._parentOutlet();
|
19425
|
+
if (parent) {
|
19426
|
+
parent._childOutlets.push(this);
|
19427
|
+
if (parent._outletState) {
|
19428
|
+
this.setOutletState(parent._outletState.outlets[this._outletName]);
|
19429
|
+
}
|
19430
|
+
}
|
19431
|
+
}),
|
19432
|
+
|
19433
|
+
willDestroy: function() {
|
19434
|
+
var parent = this._parentOutlet();
|
19435
|
+
if (parent) {
|
19436
|
+
parent._childOutlets.removeObject(this);
|
19437
|
+
}
|
19438
|
+
this._super();
|
19439
|
+
},
|
19440
|
+
|
19441
|
+
|
19442
|
+
_diffState: function(state) {
|
19443
|
+
while (state && emptyRouteState(state)) {
|
19444
|
+
state = state.outlets.main;
|
19445
|
+
}
|
19446
|
+
var different = !sameRouteState(this._outletState, state);
|
19447
|
+
this._outletState = state;
|
19448
|
+
return different;
|
19449
|
+
},
|
19510
19450
|
|
19511
|
-
|
19451
|
+
setOutletState: function(state) {
|
19452
|
+
if (!this._diffState(state)) {
|
19453
|
+
var children = this._childOutlets;
|
19454
|
+
for (var i = 0 ; i < children.length; i++) {
|
19455
|
+
var child = children[i];
|
19456
|
+
child.setOutletState(this._outletState && this._outletState.outlets[child._outletName]);
|
19457
|
+
}
|
19458
|
+
} else {
|
19459
|
+
var view = this._buildView(this._outletState);
|
19460
|
+
var length = property_get.get(this, 'length');
|
19461
|
+
if (view) {
|
19462
|
+
this.replace(0, length, [view]);
|
19463
|
+
} else {
|
19464
|
+
this.replace(0, length , []);
|
19465
|
+
}
|
19466
|
+
}
|
19467
|
+
},
|
19468
|
+
|
19469
|
+
_buildView: function(state) {
|
19470
|
+
if (!state) { return; }
|
19471
|
+
|
19472
|
+
var LOG_VIEW_LOOKUPS = property_get.get(this, 'namespace.LOG_VIEW_LOOKUPS');
|
19473
|
+
var view;
|
19474
|
+
var render = state.render;
|
19475
|
+
var ViewClass = render.ViewClass;
|
19476
|
+
var isDefaultView = false;
|
19477
|
+
|
19478
|
+
if (!ViewClass) {
|
19479
|
+
isDefaultView = true;
|
19480
|
+
ViewClass = this.container.lookupFactory(this._isTopLevel ? 'view:toplevel' : 'view:default');
|
19481
|
+
}
|
19482
|
+
|
19483
|
+
view = ViewClass.create({
|
19484
|
+
_debugTemplateName: render.name,
|
19485
|
+
renderedName: render.name,
|
19486
|
+
controller: render.controller
|
19487
|
+
});
|
19488
|
+
|
19489
|
+
if (!property_get.get(view, 'template')) {
|
19490
|
+
view.set('template', render.template);
|
19491
|
+
}
|
19492
|
+
|
19493
|
+
if (LOG_VIEW_LOOKUPS) {
|
19494
|
+
Ember.Logger.info("Rendering " + render.name + " with " + (render.isDefaultView ? "default view " : "") + view, { fullName: 'view:' + render.name });
|
19495
|
+
}
|
19496
|
+
|
19497
|
+
return view;
|
19498
|
+
}
|
19499
|
+
});
|
19500
|
+
|
19501
|
+
function emptyRouteState(state) {
|
19502
|
+
return !state.render.ViewClass && !state.render.template;
|
19503
|
+
}
|
19504
|
+
|
19505
|
+
function sameRouteState(a, b) {
|
19506
|
+
if (!a && !b) {
|
19507
|
+
return true;
|
19508
|
+
}
|
19509
|
+
if (!a || !b) {
|
19510
|
+
return false;
|
19511
|
+
}
|
19512
|
+
a = a.render;
|
19513
|
+
b = b.render;
|
19514
|
+
for (var key in a) {
|
19515
|
+
if (a.hasOwnProperty(key)) {
|
19516
|
+
// name is only here for logging & debugging. If two different
|
19517
|
+
// names result in otherwise identical states, they're still
|
19518
|
+
// identical.
|
19519
|
+
if (a[key] !== b[key] && key !== 'name') {
|
19520
|
+
return false;
|
19521
|
+
}
|
19522
|
+
}
|
19523
|
+
}
|
19524
|
+
return true;
|
19525
|
+
}
|
19512
19526
|
|
19513
|
-
|
19527
|
+
var OutletView = CoreOutletView.extend(metamorph_view._Metamorph);
|
19528
|
+
|
19529
|
+
exports.CoreOutletView = CoreOutletView;
|
19530
|
+
exports.OutletView = OutletView;
|
19514
19531
|
|
19515
19532
|
});
|
19516
|
-
enifed('ember-routing', ['exports', 'ember-metal/core', 'ember-routing/ext/run_loop', 'ember-routing/ext/controller', 'ember-routing/
|
19533
|
+
enifed('ember-routing', ['exports', 'ember-metal/core', 'ember-routing/ext/run_loop', 'ember-routing/ext/controller', 'ember-routing/location/api', 'ember-routing/location/none_location', 'ember-routing/location/hash_location', 'ember-routing/location/history_location', 'ember-routing/location/auto_location', 'ember-routing/system/generate_controller', 'ember-routing/system/controller_for', 'ember-routing/system/dsl', 'ember-routing/system/router', 'ember-routing/system/route'], function (exports, Ember, __dep1__, __dep2__, EmberLocation, NoneLocation, HashLocation, HistoryLocation, AutoLocation, generate_controller, controllerFor, RouterDSL, Router, Route) {
|
19517
19534
|
|
19518
19535
|
'use strict';
|
19519
19536
|
|
@@ -19894,157 +19911,6 @@ enifed('ember-routing/ext/run_loop', ['ember-metal/run_loop'], function (run) {
|
|
19894
19911
|
|
19895
19912
|
run['default']._addQueue('routerTransitions', 'actions');
|
19896
19913
|
|
19897
|
-
});
|
19898
|
-
enifed('ember-routing/ext/view', ['exports', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/run_loop', 'ember-views/views/view'], function (exports, property_get, property_set, run, EmberView) {
|
19899
|
-
|
19900
|
-
'use strict';
|
19901
|
-
|
19902
|
-
EmberView['default'].reopen({
|
19903
|
-
|
19904
|
-
/**
|
19905
|
-
Sets the private `_outlets` object on the view.
|
19906
|
-
|
19907
|
-
@method init
|
19908
|
-
*/
|
19909
|
-
init: function() {
|
19910
|
-
this._outlets = {};
|
19911
|
-
this._super.apply(this, arguments);
|
19912
|
-
},
|
19913
|
-
|
19914
|
-
/**
|
19915
|
-
Manually fill any of a view's `{{outlet}}` areas with the
|
19916
|
-
supplied view.
|
19917
|
-
|
19918
|
-
Example
|
19919
|
-
|
19920
|
-
```javascript
|
19921
|
-
var MyView = Ember.View.extend({
|
19922
|
-
template: Ember.Handlebars.compile('Child view: {{outlet "main"}} ')
|
19923
|
-
});
|
19924
|
-
var myView = MyView.create();
|
19925
|
-
myView.appendTo('body');
|
19926
|
-
// The html for myView now looks like:
|
19927
|
-
// <div id="ember228" class="ember-view">Child view: </div>
|
19928
|
-
|
19929
|
-
var FooView = Ember.View.extend({
|
19930
|
-
template: Ember.Handlebars.compile('<h1>Foo</h1> ')
|
19931
|
-
});
|
19932
|
-
var fooView = FooView.create();
|
19933
|
-
myView.connectOutlet('main', fooView);
|
19934
|
-
// The html for myView now looks like:
|
19935
|
-
// <div id="ember228" class="ember-view">Child view:
|
19936
|
-
// <div id="ember234" class="ember-view"><h1>Foo</h1> </div>
|
19937
|
-
// </div>
|
19938
|
-
```
|
19939
|
-
@method connectOutlet
|
19940
|
-
@param {String} outletName A unique name for the outlet
|
19941
|
-
@param {Object} view An Ember.View
|
19942
|
-
*/
|
19943
|
-
connectOutlet: function(outletName, view) {
|
19944
|
-
if (this._pendingDisconnections) {
|
19945
|
-
delete this._pendingDisconnections[outletName];
|
19946
|
-
}
|
19947
|
-
|
19948
|
-
if (this._hasEquivalentView(outletName, view)) {
|
19949
|
-
view.destroy();
|
19950
|
-
return;
|
19951
|
-
}
|
19952
|
-
|
19953
|
-
var outlets = property_get.get(this, '_outlets');
|
19954
|
-
var container = property_get.get(this, 'container');
|
19955
|
-
var router = container && container.lookup('router:main');
|
19956
|
-
var renderedName = property_get.get(view, 'renderedName');
|
19957
|
-
|
19958
|
-
property_set.set(outlets, outletName, view);
|
19959
|
-
|
19960
|
-
if (router && renderedName) {
|
19961
|
-
router._connectActiveView(renderedName, view);
|
19962
|
-
}
|
19963
|
-
},
|
19964
|
-
|
19965
|
-
/**
|
19966
|
-
Determines if the view has already been created by checking if
|
19967
|
-
the view has the same constructor, template, and context as the
|
19968
|
-
view in the `_outlets` object.
|
19969
|
-
|
19970
|
-
@private
|
19971
|
-
@method _hasEquivalentView
|
19972
|
-
@param {String} outletName The name of the outlet we are checking
|
19973
|
-
@param {Object} view An Ember.View
|
19974
|
-
@return {Boolean}
|
19975
|
-
*/
|
19976
|
-
_hasEquivalentView: function(outletName, view) {
|
19977
|
-
var existingView = property_get.get(this, '_outlets.'+outletName);
|
19978
|
-
return existingView &&
|
19979
|
-
existingView.constructor === view.constructor &&
|
19980
|
-
existingView.get('template') === view.get('template') &&
|
19981
|
-
existingView.get('context') === view.get('context');
|
19982
|
-
},
|
19983
|
-
|
19984
|
-
/**
|
19985
|
-
Removes an outlet from the view.
|
19986
|
-
|
19987
|
-
Example
|
19988
|
-
|
19989
|
-
```javascript
|
19990
|
-
var MyView = Ember.View.extend({
|
19991
|
-
template: Ember.Handlebars.compile('Child view: {{outlet "main"}} ')
|
19992
|
-
});
|
19993
|
-
var myView = MyView.create();
|
19994
|
-
myView.appendTo('body');
|
19995
|
-
// myView's html:
|
19996
|
-
// <div id="ember228" class="ember-view">Child view: </div>
|
19997
|
-
|
19998
|
-
var FooView = Ember.View.extend({
|
19999
|
-
template: Ember.Handlebars.compile('<h1>Foo</h1> ')
|
20000
|
-
});
|
20001
|
-
var fooView = FooView.create();
|
20002
|
-
myView.connectOutlet('main', fooView);
|
20003
|
-
// myView's html:
|
20004
|
-
// <div id="ember228" class="ember-view">Child view:
|
20005
|
-
// <div id="ember234" class="ember-view"><h1>Foo</h1> </div>
|
20006
|
-
// </div>
|
20007
|
-
|
20008
|
-
myView.disconnectOutlet('main');
|
20009
|
-
// myView's html:
|
20010
|
-
// <div id="ember228" class="ember-view">Child view: </div>
|
20011
|
-
```
|
20012
|
-
|
20013
|
-
@method disconnectOutlet
|
20014
|
-
@param {String} outletName The name of the outlet to be removed
|
20015
|
-
*/
|
20016
|
-
disconnectOutlet: function(outletName) {
|
20017
|
-
if (!this._pendingDisconnections) {
|
20018
|
-
this._pendingDisconnections = {};
|
20019
|
-
}
|
20020
|
-
this._pendingDisconnections[outletName] = true;
|
20021
|
-
run['default'].once(this, '_finishDisconnections');
|
20022
|
-
},
|
20023
|
-
|
20024
|
-
/**
|
20025
|
-
Gets an outlet that is pending disconnection and then
|
20026
|
-
nullifies the object on the `_outlet` object.
|
20027
|
-
|
20028
|
-
@private
|
20029
|
-
@method _finishDisconnections
|
20030
|
-
*/
|
20031
|
-
_finishDisconnections: function() {
|
20032
|
-
if (this.isDestroyed) {
|
20033
|
-
return; // _outlets will be gone anyway
|
20034
|
-
}
|
20035
|
-
|
20036
|
-
var outlets = property_get.get(this, '_outlets');
|
20037
|
-
var pendingDisconnections = this._pendingDisconnections;
|
20038
|
-
this._pendingDisconnections = null;
|
20039
|
-
|
20040
|
-
for (var outletName in pendingDisconnections) {
|
20041
|
-
property_set.set(outlets, outletName, null);
|
20042
|
-
}
|
20043
|
-
}
|
20044
|
-
});
|
20045
|
-
|
20046
|
-
exports['default'] = EmberView['default'];
|
20047
|
-
|
20048
19914
|
});
|
20049
19915
|
enifed('ember-routing/location/api', ['exports', 'ember-metal/core', 'ember-metal/environment'], function (exports, Ember, environment) {
|
20050
19916
|
|
@@ -21532,6 +21398,7 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
21532
21398
|
@method enter
|
21533
21399
|
*/
|
21534
21400
|
enter: function() {
|
21401
|
+
this.connections = [];
|
21535
21402
|
this.activate();
|
21536
21403
|
this.trigger('activate');
|
21537
21404
|
},
|
@@ -22937,6 +22804,7 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
22937
22804
|
Ember['default'].assert("The name in the given arguments is undefined", arguments.length > 0 ? !isNone['default'](arguments[0]) : true);
|
22938
22805
|
|
22939
22806
|
var namePassed = typeof _name === 'string' && !!_name;
|
22807
|
+
var isDefaultRender = arguments.length === 0 || Ember['default'].isEmpty(arguments[0]);
|
22940
22808
|
var name;
|
22941
22809
|
|
22942
22810
|
if (typeof _name === 'object' && !options) {
|
@@ -22946,53 +22814,9 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
22946
22814
|
name = _name;
|
22947
22815
|
}
|
22948
22816
|
|
22949
|
-
var
|
22950
|
-
|
22951
|
-
|
22952
|
-
name = name.replace(/\//g, '.');
|
22953
|
-
templateName = name;
|
22954
|
-
} else {
|
22955
|
-
name = this.routeName;
|
22956
|
-
templateName = this.templateName || name;
|
22957
|
-
}
|
22958
|
-
|
22959
|
-
var renderOptions = buildRenderOptions(this, namePassed, name, options);
|
22960
|
-
|
22961
|
-
var LOG_VIEW_LOOKUPS = property_get.get(this.router, 'namespace.LOG_VIEW_LOOKUPS');
|
22962
|
-
var viewName = options && options.view || namePassed && name || this.viewName || name;
|
22963
|
-
var view, template;
|
22964
|
-
|
22965
|
-
var ViewClass = this.container.lookupFactory('view:' + viewName);
|
22966
|
-
if (ViewClass) {
|
22967
|
-
view = setupView(ViewClass, renderOptions);
|
22968
|
-
if (!property_get.get(view, 'template')) {
|
22969
|
-
view.set('template', this.container.lookup('template:' + templateName));
|
22970
|
-
}
|
22971
|
-
if (LOG_VIEW_LOOKUPS) {
|
22972
|
-
Ember['default'].Logger.info("Rendering " + renderOptions.name + " with " + view, { fullName: 'view:' + renderOptions.name });
|
22973
|
-
}
|
22974
|
-
} else {
|
22975
|
-
template = this.container.lookup('template:' + templateName);
|
22976
|
-
if (!template) {
|
22977
|
-
Ember['default'].assert("Could not find \"" + name + "\" template or view.", arguments.length === 0 || Ember['default'].isEmpty(arguments[0]));
|
22978
|
-
if (LOG_VIEW_LOOKUPS) {
|
22979
|
-
Ember['default'].Logger.info("Could not find \"" + name + "\" template or view. Nothing will be rendered", { fullName: 'template:' + name });
|
22980
|
-
}
|
22981
|
-
return;
|
22982
|
-
}
|
22983
|
-
var defaultView = renderOptions.into ? 'view:default' : 'view:toplevel';
|
22984
|
-
ViewClass = this.container.lookupFactory(defaultView);
|
22985
|
-
view = setupView(ViewClass, renderOptions);
|
22986
|
-
if (!property_get.get(view, 'template')) {
|
22987
|
-
view.set('template', template);
|
22988
|
-
}
|
22989
|
-
if (LOG_VIEW_LOOKUPS) {
|
22990
|
-
Ember['default'].Logger.info("Rendering " + renderOptions.name + " with default view " + view, { fullName: 'view:' + renderOptions.name });
|
22991
|
-
}
|
22992
|
-
}
|
22993
|
-
|
22994
|
-
if (renderOptions.outlet === 'main') { this.lastRenderedTemplate = name; }
|
22995
|
-
appendView(this, view, renderOptions);
|
22817
|
+
var renderOptions = buildRenderOptions(this, namePassed, isDefaultRender, name, options);
|
22818
|
+
this.connections.push(renderOptions);
|
22819
|
+
run['default'].once(this.router, '_setOutlets');
|
22996
22820
|
},
|
22997
22821
|
|
22998
22822
|
/**
|
@@ -23039,16 +22863,31 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
23039
22863
|
@param {Object|String} options the options hash or outlet name
|
23040
22864
|
*/
|
23041
22865
|
disconnectOutlet: function(options) {
|
22866
|
+
var outletName;
|
22867
|
+
var parentView;
|
22868
|
+
var parent;
|
23042
22869
|
if (!options || typeof options === "string") {
|
23043
|
-
|
23044
|
-
|
23045
|
-
options.outlet
|
22870
|
+
outletName = options;
|
22871
|
+
} else {
|
22872
|
+
outletName = options.outlet;
|
22873
|
+
parentView = options.parentView;
|
22874
|
+
}
|
22875
|
+
|
22876
|
+
parentView = parentView && parentView.replace(/\//g, '.');
|
22877
|
+
parent = parentRoute(this);
|
22878
|
+
if (parent && parentView === parent.routeName) {
|
22879
|
+
parentView = undefined;
|
23046
22880
|
}
|
23047
|
-
|
23048
|
-
options.outlet = options.outlet || 'main';
|
22881
|
+
outletName = outletName || 'main';
|
23049
22882
|
|
23050
|
-
var
|
23051
|
-
|
22883
|
+
for (var i = 0; i < this.connections.length; i++) {
|
22884
|
+
var connection = this.connections[i];
|
22885
|
+
if (connection.outlet === outletName && connection.into === parentView) {
|
22886
|
+
this.connections.splice(i, 1);
|
22887
|
+
run['default'].once(this.router, '_setOutlets');
|
22888
|
+
return;
|
22889
|
+
}
|
22890
|
+
}
|
23052
22891
|
},
|
23053
22892
|
|
23054
22893
|
willDestroy: function() {
|
@@ -23061,18 +22900,10 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
23061
22900
|
@method teardownViews
|
23062
22901
|
*/
|
23063
22902
|
teardownViews: function() {
|
23064
|
-
|
23065
|
-
|
23066
|
-
|
23067
|
-
|
23068
|
-
var teardownOutletViews = this.teardownOutletViews || [];
|
23069
|
-
enumerable_utils.forEach(teardownOutletViews, function(teardownOutletView) {
|
23070
|
-
teardownOutletView();
|
23071
|
-
});
|
23072
|
-
|
23073
|
-
delete this.teardownTopLevelView;
|
23074
|
-
delete this.teardownOutletViews;
|
23075
|
-
delete this.lastRenderedTemplate;
|
22903
|
+
if (this.connections && this.connections.length > 0) {
|
22904
|
+
this.connections = [];
|
22905
|
+
run['default'].once(this.router, '_setOutlets');
|
22906
|
+
}
|
23076
22907
|
}
|
23077
22908
|
});
|
23078
22909
|
|
@@ -23098,21 +22929,23 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
23098
22929
|
}
|
23099
22930
|
}
|
23100
22931
|
|
23101
|
-
function
|
23102
|
-
var
|
22932
|
+
function buildRenderOptions(route, namePassed, isDefaultRender, name, options) {
|
22933
|
+
var controller = options && options.controller;
|
22934
|
+
var templateName;
|
22935
|
+
var viewName;
|
22936
|
+
var ViewClass;
|
23103
22937
|
var template;
|
22938
|
+
var LOG_VIEW_LOOKUPS = property_get.get(route.router, 'namespace.LOG_VIEW_LOOKUPS');
|
22939
|
+
var into = options && options.into && options.into.replace(/\//g, '.');
|
22940
|
+
var outlet = (options && options.outlet) || 'main';
|
23104
22941
|
|
23105
|
-
if (
|
23106
|
-
|
23107
|
-
|
23108
|
-
return template;
|
22942
|
+
if (name) {
|
22943
|
+
name = name.replace(/\//g, '.');
|
22944
|
+
templateName = name;
|
23109
22945
|
} else {
|
23110
|
-
|
22946
|
+
name = route.routeName;
|
22947
|
+
templateName = route.templateName || name;
|
23111
22948
|
}
|
23112
|
-
}
|
23113
|
-
|
23114
|
-
function buildRenderOptions(route, namePassed, name, options) {
|
23115
|
-
var controller = options && options.controller;
|
23116
22949
|
|
23117
22950
|
if (!controller) {
|
23118
22951
|
if (namePassed) {
|
@@ -23134,55 +22967,33 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
23134
22967
|
controller.set('model', options.model);
|
23135
22968
|
}
|
23136
22969
|
|
23137
|
-
|
23138
|
-
|
23139
|
-
|
23140
|
-
|
23141
|
-
|
23142
|
-
|
23143
|
-
|
23144
|
-
Ember['default'].assert("An outlet ("+renderOptions.outlet+") was specified but was not found.", renderOptions.outlet === 'main' || renderOptions.into);
|
23145
|
-
|
23146
|
-
return renderOptions;
|
23147
|
-
}
|
23148
|
-
|
23149
|
-
function setupView(ViewClass, options) {
|
23150
|
-
return ViewClass.create({
|
23151
|
-
_debugTemplateName: options.name,
|
23152
|
-
renderedName: options.name,
|
23153
|
-
controller: options.controller
|
23154
|
-
});
|
23155
|
-
}
|
23156
|
-
|
23157
|
-
function appendView(route, view, options) {
|
23158
|
-
if (options.into) {
|
23159
|
-
var parentView = route.router._lookupActiveView(options.into);
|
23160
|
-
var teardownOutletView = generateOutletTeardown(parentView, options.outlet);
|
23161
|
-
if (!route.teardownOutletViews) { route.teardownOutletViews = []; }
|
23162
|
-
enumerable_utils.replace(route.teardownOutletViews, 0, 0, [teardownOutletView]);
|
23163
|
-
parentView.connectOutlet(options.outlet, view);
|
23164
|
-
} else {
|
23165
|
-
// tear down view if one is already rendered
|
23166
|
-
if (route.teardownTopLevelView) {
|
23167
|
-
route.teardownTopLevelView();
|
22970
|
+
viewName = options && options.view || namePassed && name || route.viewName || name;
|
22971
|
+
ViewClass = route.container.lookupFactory('view:' + viewName);
|
22972
|
+
template = route.container.lookup('template:' + templateName);
|
22973
|
+
if (!ViewClass && !template) {
|
22974
|
+
Ember['default'].assert("Could not find \"" + name + "\" template or view.", isDefaultRender);
|
22975
|
+
if (LOG_VIEW_LOOKUPS) {
|
22976
|
+
Ember['default'].Logger.info("Could not find \"" + name + "\" template or view. Nothing will be rendered", { fullName: 'template:' + name });
|
23168
22977
|
}
|
22978
|
+
}
|
23169
22979
|
|
23170
|
-
|
23171
|
-
route.teardownTopLevelView = function() { view.destroy(); };
|
22980
|
+
Ember['default'].assert("An outlet ("+outlet+") was specified but was not found.", outlet === 'main' || into);
|
23172
22981
|
|
23173
|
-
|
23174
|
-
|
23175
|
-
|
23176
|
-
// `rootElement`.
|
23177
|
-
var instance = route.container.lookup('-application-instance:main');
|
23178
|
-
instance.didCreateRootView(view);
|
22982
|
+
var parent;
|
22983
|
+
if (into && (parent = parentRoute(route)) && into === parentRoute(route).routeName) {
|
22984
|
+
into = undefined;
|
23179
22985
|
}
|
23180
|
-
}
|
23181
22986
|
|
23182
|
-
|
23183
|
-
|
23184
|
-
|
22987
|
+
var renderOptions = {
|
22988
|
+
into: into,
|
22989
|
+
outlet: outlet,
|
22990
|
+
name: name,
|
22991
|
+
controller: controller,
|
22992
|
+
ViewClass: ViewClass,
|
22993
|
+
template: template
|
23185
22994
|
};
|
22995
|
+
|
22996
|
+
return renderOptions;
|
23186
22997
|
}
|
23187
22998
|
|
23188
22999
|
function getFullQueryParams(router, state) {
|
@@ -23395,6 +23206,38 @@ enifed('ember-routing/system/router', ['exports', 'ember-metal/core', 'ember-met
|
|
23395
23206
|
}
|
23396
23207
|
},
|
23397
23208
|
|
23209
|
+
_setOutlets: function() {
|
23210
|
+
var handlerInfos = this.router.currentHandlerInfos;
|
23211
|
+
var route;
|
23212
|
+
var defaultParentState;
|
23213
|
+
var liveRoutes = null;
|
23214
|
+
|
23215
|
+
if (!handlerInfos) {
|
23216
|
+
return;
|
23217
|
+
}
|
23218
|
+
|
23219
|
+
for (var i = 0; i < handlerInfos.length; i++) {
|
23220
|
+
route = handlerInfos[i].handler;
|
23221
|
+
var connections = normalizedConnections(route);
|
23222
|
+
var ownState;
|
23223
|
+
for (var j = 0; j < connections.length; j++) {
|
23224
|
+
var appended = appendLiveRoute(liveRoutes, defaultParentState, connections[j]);
|
23225
|
+
liveRoutes = appended.liveRoutes;
|
23226
|
+
if (appended.ownState.render.name === route.routeName) {
|
23227
|
+
ownState = appended.ownState;
|
23228
|
+
}
|
23229
|
+
}
|
23230
|
+
defaultParentState = ownState;
|
23231
|
+
}
|
23232
|
+
if (!this._toplevelView) {
|
23233
|
+
var OutletView = this.container.lookupFactory('view:-outlet');
|
23234
|
+
this._toplevelView = OutletView.create({ _isTopLevel: true });
|
23235
|
+
var instance = this.container.lookup('-application-instance:main');
|
23236
|
+
instance.didCreateRootView(this._toplevelView);
|
23237
|
+
}
|
23238
|
+
this._toplevelView.setOutletState(liveRoutes);
|
23239
|
+
},
|
23240
|
+
|
23398
23241
|
/**
|
23399
23242
|
Handles notifying any listeners of an impending URL
|
23400
23243
|
change.
|
@@ -23523,6 +23366,10 @@ enifed('ember-routing/system/router', ['exports', 'ember-metal/core', 'ember-met
|
|
23523
23366
|
},
|
23524
23367
|
|
23525
23368
|
willDestroy: function() {
|
23369
|
+
if (this._toplevelView) {
|
23370
|
+
this._toplevelView.destroy();
|
23371
|
+
this._toplevelView = null;
|
23372
|
+
}
|
23526
23373
|
this._super.apply(this, arguments);
|
23527
23374
|
this.reset();
|
23528
23375
|
},
|
@@ -24156,6 +24003,74 @@ enifed('ember-routing/system/router', ['exports', 'ember-metal/core', 'ember-met
|
|
24156
24003
|
}
|
24157
24004
|
}
|
24158
24005
|
|
24006
|
+
function findLiveRoute(liveRoutes, name) {
|
24007
|
+
if (!liveRoutes) { return; }
|
24008
|
+
var stack = [liveRoutes];
|
24009
|
+
while (stack.length > 0) {
|
24010
|
+
var test = stack.shift();
|
24011
|
+
if (test.render.name === name) {
|
24012
|
+
return test;
|
24013
|
+
}
|
24014
|
+
var outlets = test.outlets;
|
24015
|
+
for (var outletName in outlets) {
|
24016
|
+
stack.push(outlets[outletName]);
|
24017
|
+
}
|
24018
|
+
}
|
24019
|
+
}
|
24020
|
+
|
24021
|
+
function appendLiveRoute(liveRoutes, defaultParentState, renderOptions) {
|
24022
|
+
var target;
|
24023
|
+
var myState = {
|
24024
|
+
render: renderOptions,
|
24025
|
+
outlets: create['default'](null)
|
24026
|
+
};
|
24027
|
+
if (renderOptions.into) {
|
24028
|
+
target = findLiveRoute(liveRoutes, renderOptions.into);
|
24029
|
+
} else {
|
24030
|
+
target = defaultParentState;
|
24031
|
+
}
|
24032
|
+
if (target) {
|
24033
|
+
property_set.set(target.outlets, renderOptions.outlet, myState);
|
24034
|
+
} else {
|
24035
|
+
Ember['default'].assert("You attempted to render into '" + renderOptions.into + "' but it was not found", !renderOptions.into);
|
24036
|
+
liveRoutes = myState;
|
24037
|
+
}
|
24038
|
+
return {
|
24039
|
+
liveRoutes: liveRoutes,
|
24040
|
+
ownState: myState
|
24041
|
+
};
|
24042
|
+
}
|
24043
|
+
|
24044
|
+
function normalizedConnections(route) {
|
24045
|
+
var connections = route.connections;
|
24046
|
+
var mainConnections = [];
|
24047
|
+
var otherConnections = [];
|
24048
|
+
|
24049
|
+
for (var i = 0; i < connections.length; i++) {
|
24050
|
+
var connection = connections[i];
|
24051
|
+
if (connection.outlet === 'main') {
|
24052
|
+
mainConnections.push(connection);
|
24053
|
+
} else {
|
24054
|
+
otherConnections.push(connection);
|
24055
|
+
}
|
24056
|
+
}
|
24057
|
+
|
24058
|
+
if (mainConnections.length === 0) {
|
24059
|
+
// There's always an entry to represent the route, even if it
|
24060
|
+
// doesn't actually render anything into its own
|
24061
|
+
// template. This gives other routes a place to target.
|
24062
|
+
mainConnections.push({
|
24063
|
+
name: route.routeName,
|
24064
|
+
outlet: 'main'
|
24065
|
+
});
|
24066
|
+
}
|
24067
|
+
|
24068
|
+
// We process main connections first, because a main connection may
|
24069
|
+
// be targeted by other connections.
|
24070
|
+
return mainConnections.concat(otherConnections);
|
24071
|
+
}
|
24072
|
+
|
24073
|
+
|
24159
24074
|
exports['default'] = EmberRouter;
|
24160
24075
|
|
24161
24076
|
});
|
@@ -28632,7 +28547,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
28632
28547
|
|
28633
28548
|
/**
|
28634
28549
|
Returns an array with all of the items in the enumeration where the passed
|
28635
|
-
function returns
|
28550
|
+
function returns true. This method is the inverse of filter().
|
28636
28551
|
|
28637
28552
|
The callback method you provide should have the following signature (all
|
28638
28553
|
parameters are optional):
|
@@ -34237,7 +34152,7 @@ enifed('ember-template-compiler/compat', ['ember-metal/core', 'ember-template-co
|
|
34237
34152
|
EmberHandlebars.template = template['default'];
|
34238
34153
|
|
34239
34154
|
});
|
34240
|
-
enifed('ember-template-compiler/compat/precompile', ['exports'], function (exports) {
|
34155
|
+
enifed('ember-template-compiler/compat/precompile', ['exports', 'ember-template-compiler/system/compile_options'], function (exports, compileOptions) {
|
34241
34156
|
|
34242
34157
|
'use strict';
|
34243
34158
|
|
@@ -34245,7 +34160,6 @@ enifed('ember-template-compiler/compat/precompile', ['exports'], function (expor
|
|
34245
34160
|
@module ember
|
34246
34161
|
@submodule ember-template-compiler
|
34247
34162
|
*/
|
34248
|
-
|
34249
34163
|
var compile, compileSpec;
|
34250
34164
|
|
34251
34165
|
exports['default'] = function(string) {
|
@@ -34263,7 +34177,7 @@ enifed('ember-template-compiler/compat/precompile', ['exports'], function (expor
|
|
34263
34177
|
var asObject = arguments[1] === undefined ? true : arguments[1];
|
34264
34178
|
var compileFunc = asObject ? compile : compileSpec;
|
34265
34179
|
|
34266
|
-
return compileFunc(string);
|
34180
|
+
return compileFunc(string, compileOptions['default']());
|
34267
34181
|
}
|
34268
34182
|
|
34269
34183
|
});
|
@@ -34486,11 +34400,10 @@ enifed('ember-template-compiler/system/compile_options', ['exports', 'ember-meta
|
|
34486
34400
|
|
34487
34401
|
exports['default'] = function() {
|
34488
34402
|
var disableComponentGeneration = true;
|
34489
|
-
|
34490
|
-
disableComponentGeneration = false;
|
34491
|
-
}
|
34492
|
-
|
34403
|
+
|
34493
34404
|
return {
|
34405
|
+
revision: 'Ember@1.11.0-beta.2',
|
34406
|
+
|
34494
34407
|
disableComponentGeneration: disableComponentGeneration,
|
34495
34408
|
|
34496
34409
|
plugins: plugins['default']
|
@@ -34920,44 +34833,7 @@ enifed('ember-testing/helpers', ['ember-metal/core', 'ember-metal/property_get',
|
|
34920
34833
|
*/
|
34921
34834
|
asyncHelper('click', click);
|
34922
34835
|
|
34923
|
-
|
34924
|
-
/**
|
34925
|
-
* Checks a checkbox. Ensures the presence of the `checked` attribute
|
34926
|
-
*
|
34927
|
-
* Example:
|
34928
|
-
*
|
34929
|
-
* ```javascript
|
34930
|
-
* check('#remember-me').then(function() {
|
34931
|
-
* // assert something
|
34932
|
-
* });
|
34933
|
-
* ```
|
34934
|
-
*
|
34935
|
-
* @method check
|
34936
|
-
* @param {String} selector jQuery selector finding an `input[type="checkbox"]`
|
34937
|
-
* element on the DOM to check
|
34938
|
-
* @return {RSVP.Promise}
|
34939
|
-
*/
|
34940
|
-
asyncHelper('check', check);
|
34941
|
-
|
34942
|
-
/**
|
34943
|
-
* Unchecks a checkbox. Ensures the absence of the `checked` attribute
|
34944
|
-
*
|
34945
|
-
* Example:
|
34946
|
-
*
|
34947
|
-
* ```javascript
|
34948
|
-
* uncheck('#remember-me').then(function() {
|
34949
|
-
* // assert something
|
34950
|
-
* });
|
34951
|
-
* ```
|
34952
|
-
*
|
34953
|
-
* @method check
|
34954
|
-
* @param {String} selector jQuery selector finding an `input[type="checkbox"]`
|
34955
|
-
* element on the DOM to uncheck
|
34956
|
-
* @return {RSVP.Promise}
|
34957
|
-
*/
|
34958
|
-
asyncHelper('uncheck', uncheck);
|
34959
|
-
}
|
34960
|
-
/**
|
34836
|
+
/**
|
34961
34837
|
* Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode
|
34962
34838
|
*
|
34963
34839
|
* Example:
|
@@ -35960,7 +35836,11 @@ enifed('ember-views/attr_nodes/legacy_bind', ['exports', './attr_node', 'ember-r
|
|
35960
35836
|
}
|
35961
35837
|
var value = streams__utils.read(this.attrValue);
|
35962
35838
|
|
35963
|
-
if (
|
35839
|
+
if (value === undefined) {
|
35840
|
+
value = null;
|
35841
|
+
}
|
35842
|
+
|
35843
|
+
if (this.attrName === 'value' && value === null) {
|
35964
35844
|
value = '';
|
35965
35845
|
}
|
35966
35846
|
|
@@ -36007,6 +35887,285 @@ enifed('ember-views/component_lookup', ['exports', 'ember-runtime/system/object'
|
|
36007
35887
|
}
|
36008
35888
|
});
|
36009
35889
|
|
35890
|
+
});
|
35891
|
+
enifed('ember-views/mixins/attribute_bindings_support', ['exports', 'ember-metal/mixin', 'ember-views/attr_nodes/attr_node', 'ember-metal/properties', 'ember-views/system/platform', 'ember-metal/streams/utils', 'ember-metal/property_set'], function (exports, mixin, AttrNode, properties, platform, utils, property_set) {
|
35892
|
+
|
35893
|
+
'use strict';
|
35894
|
+
|
35895
|
+
var EMPTY_ARRAY = [];
|
35896
|
+
|
35897
|
+
var AttributeBindingsSupport = mixin.Mixin.create({
|
35898
|
+
concatenatedProperties: ['attributeBindings'],
|
35899
|
+
|
35900
|
+
/**
|
35901
|
+
A list of properties of the view to apply as attributes. If the property is
|
35902
|
+
a string value, the value of that string will be applied as the attribute.
|
35903
|
+
|
35904
|
+
```javascript
|
35905
|
+
// Applies the type attribute to the element
|
35906
|
+
// with the value "button", like <div type="button">
|
35907
|
+
Ember.View.extend({
|
35908
|
+
attributeBindings: ['type'],
|
35909
|
+
type: 'button'
|
35910
|
+
});
|
35911
|
+
```
|
35912
|
+
|
35913
|
+
If the value of the property is a Boolean, the name of that property is
|
35914
|
+
added as an attribute.
|
35915
|
+
|
35916
|
+
```javascript
|
35917
|
+
// Renders something like <div enabled="enabled">
|
35918
|
+
Ember.View.extend({
|
35919
|
+
attributeBindings: ['enabled'],
|
35920
|
+
enabled: true
|
35921
|
+
});
|
35922
|
+
```
|
35923
|
+
|
35924
|
+
@property attributeBindings
|
35925
|
+
*/
|
35926
|
+
attributeBindings: EMPTY_ARRAY,
|
35927
|
+
|
35928
|
+
_unspecifiedAttributeBindings: null,
|
35929
|
+
|
35930
|
+
/**
|
35931
|
+
Iterates through the view's attribute bindings, sets up observers for each,
|
35932
|
+
then applies the current value of the attributes to the passed render buffer.
|
35933
|
+
|
35934
|
+
@method _applyAttributeBindings
|
35935
|
+
@param {Ember.RenderBuffer} buffer
|
35936
|
+
@param {Array} attributeBindings
|
35937
|
+
@private
|
35938
|
+
*/
|
35939
|
+
_applyAttributeBindings: function(buffer) {
|
35940
|
+
var attributeBindings = this.attributeBindings;
|
35941
|
+
|
35942
|
+
if (!attributeBindings || !attributeBindings.length) { return; }
|
35943
|
+
|
35944
|
+
var unspecifiedAttributeBindings = this._unspecifiedAttributeBindings = this._unspecifiedAttributeBindings || {};
|
35945
|
+
|
35946
|
+
var binding, colonIndex, property, attrName, attrNode, attrValue;
|
35947
|
+
var i, l;
|
35948
|
+
for (i=0, l=attributeBindings.length; i<l; i++) {
|
35949
|
+
binding = attributeBindings[i];
|
35950
|
+
colonIndex = binding.indexOf(':');
|
35951
|
+
if (colonIndex === -1) {
|
35952
|
+
property = binding;
|
35953
|
+
attrName = binding;
|
35954
|
+
} else {
|
35955
|
+
property = binding.substring(0, colonIndex);
|
35956
|
+
attrName = binding.substring(colonIndex + 1);
|
35957
|
+
}
|
35958
|
+
|
35959
|
+
Ember.assert('You cannot use class as an attributeBinding, use classNameBindings instead.', attrName !== 'class');
|
35960
|
+
|
35961
|
+
if (property in this) {
|
35962
|
+
attrValue = this.getStream('view.'+property);
|
35963
|
+
attrNode = new AttrNode['default'](attrName, attrValue);
|
35964
|
+
this.appendAttr(attrNode);
|
35965
|
+
if (!platform.canSetNameOnInputs && attrName === 'name') {
|
35966
|
+
buffer.attr('name', utils.read(attrValue));
|
35967
|
+
}
|
35968
|
+
} else {
|
35969
|
+
unspecifiedAttributeBindings[property] = attrName;
|
35970
|
+
}
|
35971
|
+
}
|
35972
|
+
|
35973
|
+
// Lazily setup setUnknownProperty after attributeBindings are initially applied
|
35974
|
+
this.setUnknownProperty = this._setUnknownProperty;
|
35975
|
+
},
|
35976
|
+
|
35977
|
+
/**
|
35978
|
+
We're using setUnknownProperty as a hook to setup attributeBinding observers for
|
35979
|
+
properties that aren't defined on a view at initialization time.
|
35980
|
+
|
35981
|
+
Note: setUnknownProperty will only be called once for each property.
|
35982
|
+
|
35983
|
+
@method setUnknownProperty
|
35984
|
+
@param key
|
35985
|
+
@param value
|
35986
|
+
@private
|
35987
|
+
*/
|
35988
|
+
setUnknownProperty: null, // Gets defined after initialization by _applyAttributeBindings
|
35989
|
+
|
35990
|
+
_setUnknownProperty: function(key, value) {
|
35991
|
+
var attrName = this._unspecifiedAttributeBindings && this._unspecifiedAttributeBindings[key];
|
35992
|
+
|
35993
|
+
properties.defineProperty(this, key);
|
35994
|
+
|
35995
|
+
if (attrName) {
|
35996
|
+
var attrValue = this.getStream('view.'+key);
|
35997
|
+
var attrNode = new AttrNode['default'](attrName, attrValue);
|
35998
|
+
this.appendAttr(attrNode);
|
35999
|
+
}
|
36000
|
+
return property_set.set(this, key, value);
|
36001
|
+
}
|
36002
|
+
});
|
36003
|
+
|
36004
|
+
exports['default'] = AttributeBindingsSupport;
|
36005
|
+
|
36006
|
+
});
|
36007
|
+
enifed('ember-views/mixins/class_names_support', ['exports', 'ember-metal/core', 'ember-metal/mixin', 'ember-runtime/system/native_array', 'ember-metal/enumerable_utils', 'ember-metal/streams/utils', 'ember-views/streams/class_name_binding', 'ember-metal/utils'], function (exports, Ember, mixin, native_array, enumerable_utils, utils, class_name_binding, ember_metal__utils) {
|
36008
|
+
|
36009
|
+
'use strict';
|
36010
|
+
|
36011
|
+
var EMPTY_ARRAY = [];
|
36012
|
+
|
36013
|
+
var ClassNamesSupport = mixin.Mixin.create({
|
36014
|
+
concatenatedProperties: ['classNames', 'classNameBindings'],
|
36015
|
+
|
36016
|
+
init: function() {
|
36017
|
+
this._super.apply(this, arguments);
|
36018
|
+
|
36019
|
+
Ember['default'].assert("Only arrays are allowed for 'classNameBindings'", ember_metal__utils.typeOf(this.classNameBindings) === 'array');
|
36020
|
+
this.classNameBindings = native_array.A(this.classNameBindings.slice());
|
36021
|
+
|
36022
|
+
Ember['default'].assert("Only arrays of static class strings are allowed for 'classNames'. For dynamic classes, use 'classNameBindings'.", ember_metal__utils.typeOf(this.classNames) === 'array');
|
36023
|
+
this.classNames = native_array.A(this.classNames.slice());
|
36024
|
+
},
|
36025
|
+
|
36026
|
+
/**
|
36027
|
+
Standard CSS class names to apply to the view's outer element. This
|
36028
|
+
property automatically inherits any class names defined by the view's
|
36029
|
+
superclasses as well.
|
36030
|
+
|
36031
|
+
@property classNames
|
36032
|
+
@type Array
|
36033
|
+
@default ['ember-view']
|
36034
|
+
*/
|
36035
|
+
classNames: ['ember-view'],
|
36036
|
+
|
36037
|
+
/**
|
36038
|
+
A list of properties of the view to apply as class names. If the property
|
36039
|
+
is a string value, the value of that string will be applied as a class
|
36040
|
+
name.
|
36041
|
+
|
36042
|
+
```javascript
|
36043
|
+
// Applies the 'high' class to the view element
|
36044
|
+
Ember.View.extend({
|
36045
|
+
classNameBindings: ['priority']
|
36046
|
+
priority: 'high'
|
36047
|
+
});
|
36048
|
+
```
|
36049
|
+
|
36050
|
+
If the value of the property is a Boolean, the name of that property is
|
36051
|
+
added as a dasherized class name.
|
36052
|
+
|
36053
|
+
```javascript
|
36054
|
+
// Applies the 'is-urgent' class to the view element
|
36055
|
+
Ember.View.extend({
|
36056
|
+
classNameBindings: ['isUrgent']
|
36057
|
+
isUrgent: true
|
36058
|
+
});
|
36059
|
+
```
|
36060
|
+
|
36061
|
+
If you would prefer to use a custom value instead of the dasherized
|
36062
|
+
property name, you can pass a binding like this:
|
36063
|
+
|
36064
|
+
```javascript
|
36065
|
+
// Applies the 'urgent' class to the view element
|
36066
|
+
Ember.View.extend({
|
36067
|
+
classNameBindings: ['isUrgent:urgent']
|
36068
|
+
isUrgent: true
|
36069
|
+
});
|
36070
|
+
```
|
36071
|
+
|
36072
|
+
This list of properties is inherited from the view's superclasses as well.
|
36073
|
+
|
36074
|
+
@property classNameBindings
|
36075
|
+
@type Array
|
36076
|
+
@default []
|
36077
|
+
*/
|
36078
|
+
classNameBindings: EMPTY_ARRAY,
|
36079
|
+
|
36080
|
+
/**
|
36081
|
+
Iterates over the view's `classNameBindings` array, inserts the value
|
36082
|
+
of the specified property into the `classNames` array, then creates an
|
36083
|
+
observer to update the view's element if the bound property ever changes
|
36084
|
+
in the future.
|
36085
|
+
|
36086
|
+
@method _applyClassNameBindings
|
36087
|
+
@private
|
36088
|
+
*/
|
36089
|
+
_applyClassNameBindings: function() {
|
36090
|
+
var classBindings = this.classNameBindings;
|
36091
|
+
|
36092
|
+
if (!classBindings || !classBindings.length) { return; }
|
36093
|
+
|
36094
|
+
var classNames = this.classNames;
|
36095
|
+
var elem, newClass, dasherizedClass;
|
36096
|
+
|
36097
|
+
// Loop through all of the configured bindings. These will be either
|
36098
|
+
// property names ('isUrgent') or property paths relative to the view
|
36099
|
+
// ('content.isUrgent')
|
36100
|
+
enumerable_utils.forEach(classBindings, function(binding) {
|
36101
|
+
|
36102
|
+
var boundBinding;
|
36103
|
+
if (utils.isStream(binding)) {
|
36104
|
+
boundBinding = binding;
|
36105
|
+
} else {
|
36106
|
+
boundBinding = class_name_binding.streamifyClassNameBinding(this, binding, '_view.');
|
36107
|
+
}
|
36108
|
+
|
36109
|
+
// Variable in which the old class value is saved. The observer function
|
36110
|
+
// closes over this variable, so it knows which string to remove when
|
36111
|
+
// the property changes.
|
36112
|
+
var oldClass;
|
36113
|
+
|
36114
|
+
// Set up an observer on the context. If the property changes, toggle the
|
36115
|
+
// class name.
|
36116
|
+
var observer = this._wrapAsScheduled(function() {
|
36117
|
+
// Get the current value of the property
|
36118
|
+
elem = this.$();
|
36119
|
+
newClass = utils.read(boundBinding);
|
36120
|
+
|
36121
|
+
// If we had previously added a class to the element, remove it.
|
36122
|
+
if (oldClass) {
|
36123
|
+
elem.removeClass(oldClass);
|
36124
|
+
// Also remove from classNames so that if the view gets rerendered,
|
36125
|
+
// the class doesn't get added back to the DOM.
|
36126
|
+
classNames.removeObject(oldClass);
|
36127
|
+
}
|
36128
|
+
|
36129
|
+
// If necessary, add a new class. Make sure we keep track of it so
|
36130
|
+
// it can be removed in the future.
|
36131
|
+
if (newClass) {
|
36132
|
+
elem.addClass(newClass);
|
36133
|
+
oldClass = newClass;
|
36134
|
+
} else {
|
36135
|
+
oldClass = null;
|
36136
|
+
}
|
36137
|
+
});
|
36138
|
+
|
36139
|
+
// Get the class name for the property at its current value
|
36140
|
+
dasherizedClass = utils.read(boundBinding);
|
36141
|
+
|
36142
|
+
if (dasherizedClass) {
|
36143
|
+
// Ensure that it gets into the classNames array
|
36144
|
+
// so it is displayed when we render.
|
36145
|
+
enumerable_utils.addObject(classNames, dasherizedClass);
|
36146
|
+
|
36147
|
+
// Save a reference to the class name so we can remove it
|
36148
|
+
// if the observer fires. Remember that this variable has
|
36149
|
+
// been closed over by the observer.
|
36150
|
+
oldClass = dasherizedClass;
|
36151
|
+
}
|
36152
|
+
|
36153
|
+
utils.subscribe(boundBinding, observer, this);
|
36154
|
+
// Remove className so when the view is rerendered,
|
36155
|
+
// the className is added based on binding reevaluation
|
36156
|
+
this.one('willClearRender', function() {
|
36157
|
+
if (oldClass) {
|
36158
|
+
classNames.removeObject(oldClass);
|
36159
|
+
oldClass = null;
|
36160
|
+
}
|
36161
|
+
});
|
36162
|
+
|
36163
|
+
}, this);
|
36164
|
+
}
|
36165
|
+
});
|
36166
|
+
|
36167
|
+
exports['default'] = ClassNamesSupport;
|
36168
|
+
|
36010
36169
|
});
|
36011
36170
|
enifed('ember-views/mixins/component_template_deprecation', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/mixin'], function (exports, Ember, property_get, mixin) {
|
36012
36171
|
|
@@ -36057,6 +36216,117 @@ enifed('ember-views/mixins/component_template_deprecation', ['exports', 'ember-m
|
|
36057
36216
|
}
|
36058
36217
|
});
|
36059
36218
|
|
36219
|
+
});
|
36220
|
+
enifed('ember-views/mixins/instrumentation_support', ['exports', 'ember-metal/mixin', 'ember-metal/computed', 'ember-metal/property_get'], function (exports, mixin, computed, property_get) {
|
36221
|
+
|
36222
|
+
'use strict';
|
36223
|
+
|
36224
|
+
var InstrumentationSupport = mixin.Mixin.create({
|
36225
|
+
/**
|
36226
|
+
Used to identify this view during debugging
|
36227
|
+
|
36228
|
+
@property instrumentDisplay
|
36229
|
+
@type String
|
36230
|
+
*/
|
36231
|
+
instrumentDisplay: computed.computed(function() {
|
36232
|
+
if (this.helperName) {
|
36233
|
+
return '{{' + this.helperName + '}}';
|
36234
|
+
}
|
36235
|
+
}),
|
36236
|
+
|
36237
|
+
instrumentName: 'view',
|
36238
|
+
|
36239
|
+
instrumentDetails: function(hash) {
|
36240
|
+
hash.template = property_get.get(this, 'templateName');
|
36241
|
+
this._super(hash);
|
36242
|
+
}
|
36243
|
+
});
|
36244
|
+
|
36245
|
+
exports['default'] = InstrumentationSupport;
|
36246
|
+
|
36247
|
+
});
|
36248
|
+
enifed('ember-views/mixins/legacy_view_support', ['exports', 'ember-metal/core', 'ember-metal/mixin', 'ember-metal/property_get'], function (exports, Ember, mixin, property_get) {
|
36249
|
+
|
36250
|
+
'use strict';
|
36251
|
+
|
36252
|
+
var LegacyViewSupport = mixin.Mixin.create({
|
36253
|
+
beforeRender: function(buffer) {},
|
36254
|
+
|
36255
|
+
afterRender: function(buffer) {},
|
36256
|
+
|
36257
|
+
mutateChildViews: function(callback) {
|
36258
|
+
var childViews = this._childViews;
|
36259
|
+
var idx = childViews.length;
|
36260
|
+
var view;
|
36261
|
+
|
36262
|
+
while (--idx >= 0) {
|
36263
|
+
view = childViews[idx];
|
36264
|
+
callback(this, view, idx);
|
36265
|
+
}
|
36266
|
+
|
36267
|
+
return this;
|
36268
|
+
},
|
36269
|
+
|
36270
|
+
/**
|
36271
|
+
Removes all children from the `parentView`.
|
36272
|
+
|
36273
|
+
@method removeAllChildren
|
36274
|
+
@return {Ember.View} receiver
|
36275
|
+
*/
|
36276
|
+
removeAllChildren: function() {
|
36277
|
+
return this.mutateChildViews(function(parentView, view) {
|
36278
|
+
parentView.removeChild(view);
|
36279
|
+
});
|
36280
|
+
},
|
36281
|
+
|
36282
|
+
destroyAllChildren: function() {
|
36283
|
+
return this.mutateChildViews(function(parentView, view) {
|
36284
|
+
view.destroy();
|
36285
|
+
});
|
36286
|
+
},
|
36287
|
+
|
36288
|
+
/**
|
36289
|
+
Return the nearest ancestor whose parent is an instance of
|
36290
|
+
`klass`.
|
36291
|
+
|
36292
|
+
@method nearestChildOf
|
36293
|
+
@param {Class} klass Subclass of Ember.View (or Ember.View itself)
|
36294
|
+
@return Ember.View
|
36295
|
+
@deprecated
|
36296
|
+
*/
|
36297
|
+
nearestChildOf: function(klass) {
|
36298
|
+
Ember['default'].deprecate("nearestChildOf has been deprecated.");
|
36299
|
+
|
36300
|
+
var view = property_get.get(this, 'parentView');
|
36301
|
+
|
36302
|
+
while (view) {
|
36303
|
+
if (property_get.get(view, 'parentView') instanceof klass) { return view; }
|
36304
|
+
view = property_get.get(view, 'parentView');
|
36305
|
+
}
|
36306
|
+
},
|
36307
|
+
|
36308
|
+
/**
|
36309
|
+
Return the nearest ancestor that is an instance of the provided
|
36310
|
+
class.
|
36311
|
+
|
36312
|
+
@method nearestInstanceOf
|
36313
|
+
@param {Class} klass Subclass of Ember.View (or Ember.View itself)
|
36314
|
+
@return Ember.View
|
36315
|
+
@deprecated
|
36316
|
+
*/
|
36317
|
+
nearestInstanceOf: function(klass) {
|
36318
|
+
Ember['default'].deprecate("nearestInstanceOf is deprecated and will be removed from future releases. Use nearestOfType.");
|
36319
|
+
var view = property_get.get(this, 'parentView');
|
36320
|
+
|
36321
|
+
while (view) {
|
36322
|
+
if (view instanceof klass) { return view; }
|
36323
|
+
view = property_get.get(view, 'parentView');
|
36324
|
+
}
|
36325
|
+
}
|
36326
|
+
});
|
36327
|
+
|
36328
|
+
exports['default'] = LegacyViewSupport;
|
36329
|
+
|
36060
36330
|
});
|
36061
36331
|
enifed('ember-views/mixins/normalized_rerender_if_needed', ['exports', 'ember-metal/property_get', 'ember-metal/mixin', 'ember-metal/merge', 'ember-views/views/states'], function (exports, property_get, mixin, merge, views__states) {
|
36062
36332
|
|
@@ -36095,6 +36365,43 @@ enifed('ember-views/mixins/normalized_rerender_if_needed', ['exports', 'ember-me
|
|
36095
36365
|
}
|
36096
36366
|
});
|
36097
36367
|
|
36368
|
+
});
|
36369
|
+
enifed('ember-views/mixins/template_rendering_support', ['exports', 'ember-metal/mixin', 'ember-metal/property_get'], function (exports, mixin, property_get) {
|
36370
|
+
|
36371
|
+
'use strict';
|
36372
|
+
|
36373
|
+
var _renderView;
|
36374
|
+
function renderView(view, buffer, template) {
|
36375
|
+
if (_renderView === undefined) {
|
36376
|
+
_renderView = eriuqer('ember-htmlbars/system/render-view')['default'];
|
36377
|
+
}
|
36378
|
+
_renderView(view, buffer, template);
|
36379
|
+
}
|
36380
|
+
|
36381
|
+
var TemplateRenderingSupport = mixin.Mixin.create({
|
36382
|
+
/**
|
36383
|
+
Called on your view when it should push strings of HTML into a
|
36384
|
+
`Ember.RenderBuffer`. Most users will want to override the `template`
|
36385
|
+
or `templateName` properties instead of this method.
|
36386
|
+
|
36387
|
+
By default, `Ember.View` will look for a function in the `template`
|
36388
|
+
property and invoke it with the value of `context`. The value of
|
36389
|
+
`context` will be the view's controller unless you override it.
|
36390
|
+
|
36391
|
+
@method render
|
36392
|
+
@param {Ember.RenderBuffer} buffer The render buffer
|
36393
|
+
*/
|
36394
|
+
render: function(buffer) {
|
36395
|
+
// If this view has a layout, it is the responsibility of the
|
36396
|
+
// the layout to render the view's template. Otherwise, render the template
|
36397
|
+
// directly.
|
36398
|
+
var template = property_get.get(this, 'layout') || property_get.get(this, 'template');
|
36399
|
+
renderView(this, buffer, template);
|
36400
|
+
}
|
36401
|
+
});
|
36402
|
+
|
36403
|
+
exports['default'] = TemplateRenderingSupport;
|
36404
|
+
|
36098
36405
|
});
|
36099
36406
|
enifed('ember-views/mixins/text_support', ['exports', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/mixin', 'ember-runtime/mixins/target_action_support'], function (exports, property_get, property_set, mixin, TargetActionSupport) {
|
36100
36407
|
|
@@ -36343,6 +36650,394 @@ enifed('ember-views/mixins/text_support', ['exports', 'ember-metal/property_get'
|
|
36343
36650
|
|
36344
36651
|
exports['default'] = TextSupport;
|
36345
36652
|
|
36653
|
+
});
|
36654
|
+
enifed('ember-views/mixins/view_child_views_support', ['exports', 'ember-metal/core', 'ember-metal/mixin', 'ember-metal/computed', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/set_properties', 'ember-metal/error', 'ember-metal/enumerable_utils', 'ember-runtime/system/native_array'], function (exports, Ember, mixin, computed, property_get, property_set, setProperties, EmberError, enumerable_utils, native_array) {
|
36655
|
+
|
36656
|
+
'use strict';
|
36657
|
+
|
36658
|
+
var childViewsProperty = computed.computed(function() {
|
36659
|
+
var childViews = this._childViews;
|
36660
|
+
var ret = native_array.A();
|
36661
|
+
|
36662
|
+
enumerable_utils.forEach(childViews, function(view) {
|
36663
|
+
var currentChildViews;
|
36664
|
+
if (view.isVirtual) {
|
36665
|
+
if (currentChildViews = property_get.get(view, 'childViews')) {
|
36666
|
+
ret.pushObjects(currentChildViews);
|
36667
|
+
}
|
36668
|
+
} else {
|
36669
|
+
ret.push(view);
|
36670
|
+
}
|
36671
|
+
});
|
36672
|
+
|
36673
|
+
ret.replace = function (idx, removedCount, addedViews) {
|
36674
|
+
throw new EmberError['default']("childViews is immutable");
|
36675
|
+
};
|
36676
|
+
|
36677
|
+
return ret;
|
36678
|
+
});
|
36679
|
+
|
36680
|
+
var EMPTY_ARRAY = [];
|
36681
|
+
|
36682
|
+
var ViewChildViewsSupport = mixin.Mixin.create({
|
36683
|
+
/**
|
36684
|
+
Array of child views. You should never edit this array directly.
|
36685
|
+
Instead, use `appendChild` and `removeFromParent`.
|
36686
|
+
|
36687
|
+
@property childViews
|
36688
|
+
@type Array
|
36689
|
+
@default []
|
36690
|
+
@private
|
36691
|
+
*/
|
36692
|
+
childViews: childViewsProperty,
|
36693
|
+
|
36694
|
+
_childViews: EMPTY_ARRAY,
|
36695
|
+
|
36696
|
+
init: function() {
|
36697
|
+
// setup child views. be sure to clone the child views array first
|
36698
|
+
this._childViews = this._childViews.slice();
|
36699
|
+
|
36700
|
+
this._super.apply(this, arguments);
|
36701
|
+
},
|
36702
|
+
|
36703
|
+
appendChild: function(view, options) {
|
36704
|
+
return this.currentState.appendChild(this, view, options);
|
36705
|
+
},
|
36706
|
+
|
36707
|
+
/**
|
36708
|
+
Removes the child view from the parent view.
|
36709
|
+
|
36710
|
+
@method removeChild
|
36711
|
+
@param {Ember.View} view
|
36712
|
+
@return {Ember.View} receiver
|
36713
|
+
*/
|
36714
|
+
removeChild: function(view) {
|
36715
|
+
// If we're destroying, the entire subtree will be
|
36716
|
+
// freed, and the DOM will be handled separately,
|
36717
|
+
// so no need to mess with childViews.
|
36718
|
+
if (this.isDestroying) { return; }
|
36719
|
+
|
36720
|
+
// update parent node
|
36721
|
+
property_set.set(view, '_parentView', null);
|
36722
|
+
|
36723
|
+
// remove view from childViews array.
|
36724
|
+
var childViews = this._childViews;
|
36725
|
+
|
36726
|
+
enumerable_utils.removeObject(childViews, view);
|
36727
|
+
|
36728
|
+
this.propertyDidChange('childViews'); // HUH?! what happened to will change?
|
36729
|
+
|
36730
|
+
return this;
|
36731
|
+
},
|
36732
|
+
|
36733
|
+
/**
|
36734
|
+
Instantiates a view to be added to the childViews array during view
|
36735
|
+
initialization. You generally will not call this method directly unless
|
36736
|
+
you are overriding `createChildViews()`. Note that this method will
|
36737
|
+
automatically configure the correct settings on the new view instance to
|
36738
|
+
act as a child of the parent.
|
36739
|
+
|
36740
|
+
@method createChildView
|
36741
|
+
@param {Class|String} viewClass
|
36742
|
+
@param {Hash} [attrs] Attributes to add
|
36743
|
+
@return {Ember.View} new instance
|
36744
|
+
*/
|
36745
|
+
createChildView: function(maybeViewClass, _attrs) {
|
36746
|
+
if (!maybeViewClass) {
|
36747
|
+
throw new TypeError("createChildViews first argument must exist");
|
36748
|
+
}
|
36749
|
+
|
36750
|
+
if (maybeViewClass.isView && maybeViewClass._parentView === this && maybeViewClass.container === this.container) {
|
36751
|
+
return maybeViewClass;
|
36752
|
+
}
|
36753
|
+
|
36754
|
+
var attrs = _attrs || {};
|
36755
|
+
var view;
|
36756
|
+
attrs._parentView = this;
|
36757
|
+
attrs.renderer = this.renderer;
|
36758
|
+
|
36759
|
+
if (maybeViewClass.isViewClass) {
|
36760
|
+
attrs.container = this.container;
|
36761
|
+
|
36762
|
+
view = maybeViewClass.create(attrs);
|
36763
|
+
|
36764
|
+
// don't set the property on a virtual view, as they are invisible to
|
36765
|
+
// consumers of the view API
|
36766
|
+
if (view.viewName) {
|
36767
|
+
property_set.set(property_get.get(this, 'concreteView'), view.viewName, view);
|
36768
|
+
}
|
36769
|
+
} else if ('string' === typeof maybeViewClass) {
|
36770
|
+
var fullName = 'view:' + maybeViewClass;
|
36771
|
+
var ViewKlass = this.container.lookupFactory(fullName);
|
36772
|
+
|
36773
|
+
Ember['default'].assert("Could not find view: '" + fullName + "'", !!ViewKlass);
|
36774
|
+
|
36775
|
+
view = ViewKlass.create(attrs);
|
36776
|
+
} else {
|
36777
|
+
view = maybeViewClass;
|
36778
|
+
Ember['default'].assert('You must pass instance or subclass of View', view.isView);
|
36779
|
+
|
36780
|
+
attrs.container = this.container;
|
36781
|
+
setProperties['default'](view, attrs);
|
36782
|
+
}
|
36783
|
+
|
36784
|
+
return view;
|
36785
|
+
}
|
36786
|
+
});
|
36787
|
+
|
36788
|
+
exports['default'] = ViewChildViewsSupport;
|
36789
|
+
|
36790
|
+
exports.childViewsProperty = childViewsProperty;
|
36791
|
+
|
36792
|
+
});
|
36793
|
+
enifed('ember-views/mixins/view_context_support', ['exports', 'ember-metal/mixin', 'ember-metal/computed', 'ember-metal/property_get', 'ember-metal/property_set'], function (exports, mixin, computed, property_get, property_set) {
|
36794
|
+
|
36795
|
+
'use strict';
|
36796
|
+
|
36797
|
+
var ViewContextSupport = mixin.Mixin.create({
|
36798
|
+
/**
|
36799
|
+
The object from which templates should access properties.
|
36800
|
+
|
36801
|
+
This object will be passed to the template function each time the render
|
36802
|
+
method is called, but it is up to the individual function to decide what
|
36803
|
+
to do with it.
|
36804
|
+
|
36805
|
+
By default, this will be the view's controller.
|
36806
|
+
|
36807
|
+
@property context
|
36808
|
+
@type Object
|
36809
|
+
*/
|
36810
|
+
context: computed.computed(function(key, value) {
|
36811
|
+
if (arguments.length === 2) {
|
36812
|
+
property_set.set(this, '_context', value);
|
36813
|
+
return value;
|
36814
|
+
} else {
|
36815
|
+
return property_get.get(this, '_context');
|
36816
|
+
}
|
36817
|
+
})["volatile"](),
|
36818
|
+
|
36819
|
+
/**
|
36820
|
+
Private copy of the view's template context. This can be set directly
|
36821
|
+
by Handlebars without triggering the observer that causes the view
|
36822
|
+
to be re-rendered.
|
36823
|
+
|
36824
|
+
The context of a view is looked up as follows:
|
36825
|
+
|
36826
|
+
1. Supplied context (usually by Handlebars)
|
36827
|
+
2. Specified controller
|
36828
|
+
3. `parentView`'s context (for a child of a ContainerView)
|
36829
|
+
|
36830
|
+
The code in Handlebars that overrides the `_context` property first
|
36831
|
+
checks to see whether the view has a specified controller. This is
|
36832
|
+
something of a hack and should be revisited.
|
36833
|
+
|
36834
|
+
@property _context
|
36835
|
+
@private
|
36836
|
+
*/
|
36837
|
+
_context: computed.computed(function(key, value) {
|
36838
|
+
if (arguments.length === 2) {
|
36839
|
+
return value;
|
36840
|
+
}
|
36841
|
+
|
36842
|
+
var parentView, controller;
|
36843
|
+
|
36844
|
+
if (controller = property_get.get(this, 'controller')) {
|
36845
|
+
return controller;
|
36846
|
+
}
|
36847
|
+
|
36848
|
+
parentView = this._parentView;
|
36849
|
+
if (parentView) {
|
36850
|
+
return property_get.get(parentView, '_context');
|
36851
|
+
}
|
36852
|
+
|
36853
|
+
return null;
|
36854
|
+
}),
|
36855
|
+
|
36856
|
+
_controller: null,
|
36857
|
+
|
36858
|
+
/**
|
36859
|
+
The controller managing this view. If this property is set, it will be
|
36860
|
+
made available for use by the template.
|
36861
|
+
|
36862
|
+
@property controller
|
36863
|
+
@type Object
|
36864
|
+
*/
|
36865
|
+
controller: computed.computed(function(key, value) {
|
36866
|
+
if (arguments.length === 2) {
|
36867
|
+
this._controller = value;
|
36868
|
+
return value;
|
36869
|
+
}
|
36870
|
+
|
36871
|
+
if (this._controller) {
|
36872
|
+
return this._controller;
|
36873
|
+
}
|
36874
|
+
|
36875
|
+
var parentView = this._parentView;
|
36876
|
+
return parentView ? property_get.get(parentView, 'controller') : null;
|
36877
|
+
})
|
36878
|
+
});
|
36879
|
+
|
36880
|
+
exports['default'] = ViewContextSupport;
|
36881
|
+
|
36882
|
+
});
|
36883
|
+
enifed('ember-views/mixins/view_keyword_support', ['exports', 'ember-metal/mixin', 'ember-metal/platform/create', 'ember-views/streams/key_stream'], function (exports, mixin, create, KeyStream) {
|
36884
|
+
|
36885
|
+
'use strict';
|
36886
|
+
|
36887
|
+
var ViewKeywordSupport = mixin.Mixin.create({
|
36888
|
+
init: function() {
|
36889
|
+
this._super.apply(this, arguments);
|
36890
|
+
|
36891
|
+
if (!this._keywords) {
|
36892
|
+
this._keywords = create['default'](null);
|
36893
|
+
}
|
36894
|
+
this._keywords._view = this;
|
36895
|
+
this._keywords.view = undefined;
|
36896
|
+
this._keywords.controller = new KeyStream['default'](this, 'controller');
|
36897
|
+
this._setupKeywords();
|
36898
|
+
},
|
36899
|
+
|
36900
|
+
_setupKeywords: function() {
|
36901
|
+
var keywords = this._keywords;
|
36902
|
+
var contextView = this._contextView || this._parentView;
|
36903
|
+
|
36904
|
+
if (contextView) {
|
36905
|
+
var parentKeywords = contextView._keywords;
|
36906
|
+
|
36907
|
+
keywords.view = this.isVirtual ? parentKeywords.view : this;
|
36908
|
+
|
36909
|
+
for (var name in parentKeywords) {
|
36910
|
+
if (keywords[name]) {
|
36911
|
+
continue;
|
36912
|
+
}
|
36913
|
+
|
36914
|
+
keywords[name] = parentKeywords[name];
|
36915
|
+
}
|
36916
|
+
} else {
|
36917
|
+
keywords.view = this.isVirtual ? null : this;
|
36918
|
+
}
|
36919
|
+
}
|
36920
|
+
});
|
36921
|
+
|
36922
|
+
exports['default'] = ViewKeywordSupport;
|
36923
|
+
|
36924
|
+
});
|
36925
|
+
enifed('ember-views/mixins/view_state_support', ['exports', 'ember-metal/core', 'ember-metal/mixin'], function (exports, Ember, mixin) {
|
36926
|
+
|
36927
|
+
'use strict';
|
36928
|
+
|
36929
|
+
var ViewStateSupport = mixin.Mixin.create({
|
36930
|
+
transitionTo: function(state, children) {
|
36931
|
+
Ember['default'].deprecate("Ember.View#transitionTo has been deprecated, it is for internal use only");
|
36932
|
+
this._transitionTo(state, children);
|
36933
|
+
},
|
36934
|
+
|
36935
|
+
_transitionTo: function(state, children) {
|
36936
|
+
var priorState = this.currentState;
|
36937
|
+
var currentState = this.currentState = this._states[state];
|
36938
|
+
this._state = state;
|
36939
|
+
|
36940
|
+
if (priorState && priorState.exit) { priorState.exit(this); }
|
36941
|
+
if (currentState.enter) { currentState.enter(this); }
|
36942
|
+
}
|
36943
|
+
});
|
36944
|
+
|
36945
|
+
exports['default'] = ViewStateSupport;
|
36946
|
+
|
36947
|
+
});
|
36948
|
+
enifed('ember-views/mixins/view_stream_support', ['exports', 'ember-metal/mixin', 'ember-metal/streams/stream_binding', 'ember-views/streams/key_stream', 'ember-views/streams/context_stream', 'ember-metal/platform/create', 'ember-metal/streams/utils'], function (exports, mixin, StreamBinding, KeyStream, ContextStream, create, utils) {
|
36949
|
+
|
36950
|
+
'use strict';
|
36951
|
+
|
36952
|
+
var ViewStreamSupport = mixin.Mixin.create({
|
36953
|
+
init: function() {
|
36954
|
+
this._baseContext = undefined;
|
36955
|
+
this._contextStream = undefined;
|
36956
|
+
this._streamBindings = undefined;
|
36957
|
+
this._super.apply(this, arguments);
|
36958
|
+
},
|
36959
|
+
|
36960
|
+
getStream: function(path) {
|
36961
|
+
var stream = this._getContextStream().get(path);
|
36962
|
+
|
36963
|
+
stream._label = path;
|
36964
|
+
|
36965
|
+
return stream;
|
36966
|
+
},
|
36967
|
+
|
36968
|
+
_willDestroyElement: function() {
|
36969
|
+
if (this._streamBindings) {
|
36970
|
+
this._destroyStreamBindings();
|
36971
|
+
}
|
36972
|
+
if (this._contextStream) {
|
36973
|
+
this._destroyContextStream();
|
36974
|
+
}
|
36975
|
+
},
|
36976
|
+
|
36977
|
+
_getBindingForStream: function(pathOrStream) {
|
36978
|
+
if (this._streamBindings === undefined) {
|
36979
|
+
this._streamBindings = create['default'](null);
|
36980
|
+
}
|
36981
|
+
|
36982
|
+
var path = pathOrStream;
|
36983
|
+
if (utils.isStream(pathOrStream)) {
|
36984
|
+
path = pathOrStream._label;
|
36985
|
+
|
36986
|
+
if (!path) {
|
36987
|
+
// if no _label is present on the provided stream
|
36988
|
+
// it is likely a subexpr and cannot be set (so it
|
36989
|
+
// does not need a StreamBinding)
|
36990
|
+
return pathOrStream;
|
36991
|
+
}
|
36992
|
+
}
|
36993
|
+
|
36994
|
+
if (this._streamBindings[path] !== undefined) {
|
36995
|
+
return this._streamBindings[path];
|
36996
|
+
} else {
|
36997
|
+
var stream = this._getContextStream().get(path);
|
36998
|
+
var streamBinding = new StreamBinding['default'](stream);
|
36999
|
+
|
37000
|
+
streamBinding._label = path;
|
37001
|
+
|
37002
|
+
return this._streamBindings[path] = streamBinding;
|
37003
|
+
}
|
37004
|
+
},
|
37005
|
+
|
37006
|
+
_destroyStreamBindings: function() {
|
37007
|
+
var streamBindings = this._streamBindings;
|
37008
|
+
for (var path in streamBindings) {
|
37009
|
+
streamBindings[path].destroy();
|
37010
|
+
}
|
37011
|
+
this._streamBindings = undefined;
|
37012
|
+
},
|
37013
|
+
|
37014
|
+
_getContextStream: function() {
|
37015
|
+
if (this._contextStream === undefined) {
|
37016
|
+
this._baseContext = new KeyStream['default'](this, 'context');
|
37017
|
+
this._contextStream = new ContextStream['default'](this);
|
37018
|
+
}
|
37019
|
+
|
37020
|
+
return this._contextStream;
|
37021
|
+
},
|
37022
|
+
|
37023
|
+
_destroyContextStream: function() {
|
37024
|
+
this._baseContext.destroy();
|
37025
|
+
this._baseContext = undefined;
|
37026
|
+
this._contextStream.destroy();
|
37027
|
+
this._contextStream = undefined;
|
37028
|
+
},
|
37029
|
+
|
37030
|
+
_unsubscribeFromStreamBindings: function() {
|
37031
|
+
for (var key in this._streamBindingSubscriptions) {
|
37032
|
+
var streamBinding = this[key + 'Binding'];
|
37033
|
+
var callback = this._streamBindingSubscriptions[key];
|
37034
|
+
streamBinding.unsubscribe(callback);
|
37035
|
+
}
|
37036
|
+
}
|
37037
|
+
});
|
37038
|
+
|
37039
|
+
exports['default'] = ViewStreamSupport;
|
37040
|
+
|
36346
37041
|
});
|
36347
37042
|
enifed('ember-views/mixins/view_target_action_support', ['exports', 'ember-metal/mixin', 'ember-runtime/mixins/target_action_support', 'ember-metal/alias'], function (exports, mixin, TargetActionSupport, alias) {
|
36348
37043
|
|
@@ -36359,6 +37054,99 @@ enifed('ember-views/mixins/view_target_action_support', ['exports', 'ember-metal
|
|
36359
37054
|
actionContext: alias['default']('context')
|
36360
37055
|
});
|
36361
37056
|
|
37057
|
+
});
|
37058
|
+
enifed('ember-views/mixins/visibility_support', ['exports', 'ember-metal/mixin', 'ember-metal/property_get', 'ember-metal/run_loop'], function (exports, mixin, property_get, run) {
|
37059
|
+
|
37060
|
+
'use strict';
|
37061
|
+
|
37062
|
+
function K() { return this; }
|
37063
|
+
|
37064
|
+
var VisibilitySupport = mixin.Mixin.create({
|
37065
|
+
/**
|
37066
|
+
If `false`, the view will appear hidden in DOM.
|
37067
|
+
|
37068
|
+
@property isVisible
|
37069
|
+
@type Boolean
|
37070
|
+
@default null
|
37071
|
+
*/
|
37072
|
+
isVisible: true,
|
37073
|
+
|
37074
|
+
becameVisible: K,
|
37075
|
+
becameHidden: K,
|
37076
|
+
|
37077
|
+
/**
|
37078
|
+
When the view's `isVisible` property changes, toggle the visibility
|
37079
|
+
element of the actual DOM element.
|
37080
|
+
|
37081
|
+
@method _isVisibleDidChange
|
37082
|
+
@private
|
37083
|
+
*/
|
37084
|
+
_isVisibleDidChange: mixin.observer('isVisible', function() {
|
37085
|
+
if (this._isVisible === property_get.get(this, 'isVisible')) { return ; }
|
37086
|
+
run['default'].scheduleOnce('render', this, this._toggleVisibility);
|
37087
|
+
}),
|
37088
|
+
|
37089
|
+
_toggleVisibility: function() {
|
37090
|
+
var $el = this.$();
|
37091
|
+
var isVisible = property_get.get(this, 'isVisible');
|
37092
|
+
|
37093
|
+
if (this._isVisible === isVisible) { return ; }
|
37094
|
+
|
37095
|
+
// It's important to keep these in sync, even if we don't yet have
|
37096
|
+
// an element in the DOM to manipulate:
|
37097
|
+
this._isVisible = isVisible;
|
37098
|
+
|
37099
|
+
if (!$el) { return; }
|
37100
|
+
|
37101
|
+
$el.toggle(isVisible);
|
37102
|
+
|
37103
|
+
if (this._isAncestorHidden()) { return; }
|
37104
|
+
|
37105
|
+
if (isVisible) {
|
37106
|
+
this._notifyBecameVisible();
|
37107
|
+
} else {
|
37108
|
+
this._notifyBecameHidden();
|
37109
|
+
}
|
37110
|
+
},
|
37111
|
+
|
37112
|
+
_notifyBecameVisible: function() {
|
37113
|
+
this.trigger('becameVisible');
|
37114
|
+
|
37115
|
+
this.forEachChildView(function(view) {
|
37116
|
+
var isVisible = property_get.get(view, 'isVisible');
|
37117
|
+
|
37118
|
+
if (isVisible || isVisible === null) {
|
37119
|
+
view._notifyBecameVisible();
|
37120
|
+
}
|
37121
|
+
});
|
37122
|
+
},
|
37123
|
+
|
37124
|
+
_notifyBecameHidden: function() {
|
37125
|
+
this.trigger('becameHidden');
|
37126
|
+
this.forEachChildView(function(view) {
|
37127
|
+
var isVisible = property_get.get(view, 'isVisible');
|
37128
|
+
|
37129
|
+
if (isVisible || isVisible === null) {
|
37130
|
+
view._notifyBecameHidden();
|
37131
|
+
}
|
37132
|
+
});
|
37133
|
+
},
|
37134
|
+
|
37135
|
+
_isAncestorHidden: function() {
|
37136
|
+
var parent = property_get.get(this, 'parentView');
|
37137
|
+
|
37138
|
+
while (parent) {
|
37139
|
+
if (property_get.get(parent, 'isVisible') === false) { return true; }
|
37140
|
+
|
37141
|
+
parent = property_get.get(parent, 'parentView');
|
37142
|
+
}
|
37143
|
+
|
37144
|
+
return false;
|
37145
|
+
}
|
37146
|
+
});
|
37147
|
+
|
37148
|
+
exports['default'] = VisibilitySupport;
|
37149
|
+
|
36362
37150
|
});
|
36363
37151
|
enifed('ember-views/streams/class_name_binding', ['exports', 'ember-metal/streams/utils', 'ember-metal/property_get', 'ember-runtime/system/string', 'ember-metal/utils'], function (exports, utils, property_get, string, ember_metal__utils) {
|
36364
37152
|
|
@@ -37598,11 +38386,8 @@ enifed('ember-views/system/render_buffer', ['exports', 'ember-views/system/jquer
|
|
37598
38386
|
if (content.nodeType) {
|
37599
38387
|
this._element.appendChild(content);
|
37600
38388
|
} else {
|
37601
|
-
var
|
37602
|
-
|
37603
|
-
while (nodes[0]) {
|
37604
|
-
this._element.appendChild(nodes[0]);
|
37605
|
-
}
|
38389
|
+
var frag = this.dom.parseHTML(content, contextualElement);
|
38390
|
+
this._element.appendChild(frag);
|
37606
38391
|
}
|
37607
38392
|
|
37608
38393
|
// This should only happen with legacy string buffers
|
@@ -37906,8 +38691,8 @@ enifed('ember-views/system/utils', ['exports'], function (exports) {
|
|
37906
38691
|
*/
|
37907
38692
|
function getViewRange(view) {
|
37908
38693
|
var range = document.createRange();
|
37909
|
-
range.
|
37910
|
-
range.
|
38694
|
+
range.setStartBefore(view._morph.firstNode);
|
38695
|
+
range.setEndAfter(view._morph.lastNode);
|
37911
38696
|
return range;
|
37912
38697
|
}
|
37913
38698
|
|
@@ -38960,7 +39745,7 @@ enifed('ember-views/views/container_view', ['exports', 'ember-metal/core', 'embe
|
|
38960
39745
|
buffer._element = element;
|
38961
39746
|
this._childViewsMorph = dom.appendMorph(element, this._morph.contextualElement);
|
38962
39747
|
} else {
|
38963
|
-
this._childViewsMorph = dom.
|
39748
|
+
this._childViewsMorph = dom.appendMorph(element);
|
38964
39749
|
}
|
38965
39750
|
|
38966
39751
|
return element;
|
@@ -39083,12 +39868,13 @@ enifed('ember-views/views/container_view', ['exports', 'ember-metal/core', 'embe
|
|
39083
39868
|
var childViews = view._childViews;
|
39084
39869
|
var renderer = view._renderer;
|
39085
39870
|
|
39086
|
-
var
|
39087
|
-
for (i =
|
39088
|
-
childView = childViews[i];
|
39871
|
+
var refMorph = null;
|
39872
|
+
for (var i = childViews.length-1; i >= 0; i--) {
|
39873
|
+
var childView = childViews[i];
|
39089
39874
|
if (!childView._elementCreated) {
|
39090
|
-
renderer.renderTree(childView, view,
|
39875
|
+
renderer.renderTree(childView, view, refMorph);
|
39091
39876
|
}
|
39877
|
+
refMorph = childView._morph;
|
39092
39878
|
}
|
39093
39879
|
}
|
39094
39880
|
});
|
@@ -39379,6 +40165,7 @@ enifed('ember-views/views/select', ['exports', 'ember-metal/enumerable_utils', '
|
|
39379
40165
|
|
39380
40166
|
var selectOptionDefaultTemplate = {
|
39381
40167
|
isHTMLBars: true,
|
40168
|
+
revision: 'Ember@1.11.0-beta.2',
|
39382
40169
|
render: function(context, env, contextualElement) {
|
39383
40170
|
var lazyValue = context.getStream('view.label');
|
39384
40171
|
|
@@ -39958,7 +40745,7 @@ enifed('ember-views/views/select', ['exports', 'ember-metal/enumerable_utils', '
|
|
39958
40745
|
var content = property_get.get(this, 'contentValues');
|
39959
40746
|
if (!el) { return; }
|
39960
40747
|
|
39961
|
-
var selectionIndex =
|
40748
|
+
var selectionIndex = enumerable_utils.indexOf(content, selectionValue);
|
39962
40749
|
var prompt = property_get.get(this, 'prompt');
|
39963
40750
|
|
39964
40751
|
if (prompt) { selectionIndex += 1; }
|
@@ -40407,565 +41194,186 @@ enifed('ember-views/views/states/in_dom', ['exports', 'ember-metal/core', 'ember
|
|
40407
41194
|
});
|
40408
41195
|
enifed('ember-views/views/states/pre_render', ['exports', 'ember-views/views/states/default', 'ember-metal/platform/create'], function (exports, _default, create) {
|
40409
41196
|
|
40410
|
-
'use strict';
|
40411
|
-
|
40412
|
-
var preRender = create['default'](_default['default']);
|
40413
|
-
|
40414
|
-
exports['default'] = preRender;
|
40415
|
-
|
40416
|
-
});
|
40417
|
-
enifed('ember-views/views/text_area', ['exports', 'ember-metal/property_get', 'ember-views/views/component', 'ember-views/mixins/text_support', 'ember-metal/mixin'], function (exports, property_get, Component, TextSupport, mixin) {
|
40418
|
-
|
40419
|
-
'use strict';
|
40420
|
-
|
40421
|
-
|
40422
|
-
/**
|
40423
|
-
@module ember
|
40424
|
-
@submodule ember-views
|
40425
|
-
*/
|
40426
|
-
exports['default'] = Component['default'].extend(TextSupport['default'], {
|
40427
|
-
instrumentDisplay: '{{textarea}}',
|
40428
|
-
|
40429
|
-
classNames: ['ember-text-area'],
|
40430
|
-
|
40431
|
-
tagName: "textarea",
|
40432
|
-
attributeBindings: [
|
40433
|
-
'rows',
|
40434
|
-
'cols',
|
40435
|
-
'name',
|
40436
|
-
'selectionEnd',
|
40437
|
-
'selectionStart',
|
40438
|
-
'wrap',
|
40439
|
-
'lang',
|
40440
|
-
'dir'
|
40441
|
-
],
|
40442
|
-
rows: null,
|
40443
|
-
cols: null,
|
40444
|
-
|
40445
|
-
_updateElementValue: mixin.observer('value', function() {
|
40446
|
-
// We do this check so cursor position doesn't get affected in IE
|
40447
|
-
var value = property_get.get(this, 'value');
|
40448
|
-
var $el = this.$();
|
40449
|
-
if ($el && value !== $el.val()) {
|
40450
|
-
$el.val(value);
|
40451
|
-
}
|
40452
|
-
}),
|
40453
|
-
|
40454
|
-
init: function() {
|
40455
|
-
this._super.apply(this, arguments);
|
40456
|
-
this.on("didInsertElement", this, this._updateElementValue);
|
40457
|
-
}
|
40458
|
-
});
|
40459
|
-
|
40460
|
-
});
|
40461
|
-
enifed('ember-views/views/text_field', ['exports', 'ember-views/views/component', 'ember-views/mixins/text_support'], function (exports, Component, TextSupport) {
|
40462
|
-
|
40463
|
-
'use strict';
|
40464
|
-
|
40465
|
-
/**
|
40466
|
-
@module ember
|
40467
|
-
@submodule ember-views
|
40468
|
-
*/
|
40469
|
-
exports['default'] = Component['default'].extend(TextSupport['default'], {
|
40470
|
-
instrumentDisplay: '{{input type="text"}}',
|
40471
|
-
|
40472
|
-
classNames: ['ember-text-field'],
|
40473
|
-
tagName: "input",
|
40474
|
-
attributeBindings: [
|
40475
|
-
'accept',
|
40476
|
-
'autocomplete',
|
40477
|
-
'autosave',
|
40478
|
-
'dir',
|
40479
|
-
'formaction',
|
40480
|
-
'formenctype',
|
40481
|
-
'formmethod',
|
40482
|
-
'formnovalidate',
|
40483
|
-
'formtarget',
|
40484
|
-
'height',
|
40485
|
-
'inputmode',
|
40486
|
-
'lang',
|
40487
|
-
'list',
|
40488
|
-
'max',
|
40489
|
-
'min',
|
40490
|
-
'multiple',
|
40491
|
-
'name',
|
40492
|
-
'pattern',
|
40493
|
-
'size',
|
40494
|
-
'step',
|
40495
|
-
'type',
|
40496
|
-
'value',
|
40497
|
-
'width'
|
40498
|
-
],
|
40499
|
-
|
40500
|
-
defaultLayout: null,
|
40501
|
-
|
40502
|
-
/**
|
40503
|
-
The `value` attribute of the input element. As the user inputs text, this
|
40504
|
-
property is updated live.
|
40505
|
-
|
40506
|
-
@property value
|
40507
|
-
@type String
|
40508
|
-
@default ""
|
40509
|
-
*/
|
40510
|
-
value: "",
|
40511
|
-
|
40512
|
-
/**
|
40513
|
-
The `type` attribute of the input element.
|
40514
|
-
|
40515
|
-
@property type
|
40516
|
-
@type String
|
40517
|
-
@default "text"
|
40518
|
-
*/
|
40519
|
-
type: "text",
|
40520
|
-
|
40521
|
-
/**
|
40522
|
-
The `size` of the text field in characters.
|
40523
|
-
|
40524
|
-
@property size
|
40525
|
-
@type String
|
40526
|
-
@default null
|
40527
|
-
*/
|
40528
|
-
size: null,
|
40529
|
-
|
40530
|
-
/**
|
40531
|
-
The `pattern` attribute of input element.
|
40532
|
-
|
40533
|
-
@property pattern
|
40534
|
-
@type String
|
40535
|
-
@default null
|
40536
|
-
*/
|
40537
|
-
pattern: null,
|
40538
|
-
|
40539
|
-
/**
|
40540
|
-
The `min` attribute of input element used with `type="number"` or `type="range"`.
|
40541
|
-
|
40542
|
-
@property min
|
40543
|
-
@type String
|
40544
|
-
@default null
|
40545
|
-
@since 1.4.0
|
40546
|
-
*/
|
40547
|
-
min: null,
|
40548
|
-
|
40549
|
-
/**
|
40550
|
-
The `max` attribute of input element used with `type="number"` or `type="range"`.
|
40551
|
-
|
40552
|
-
@property max
|
40553
|
-
@type String
|
40554
|
-
@default null
|
40555
|
-
@since 1.4.0
|
40556
|
-
*/
|
40557
|
-
max: null
|
40558
|
-
});
|
40559
|
-
|
40560
|
-
});
|
40561
|
-
enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/platform/create', 'ember-runtime/mixins/evented', 'ember-runtime/system/object', 'ember-metal/error', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/set_properties', 'ember-metal/run_loop', 'ember-metal/observer', 'ember-metal/properties', 'ember-metal/utils', 'ember-metal/computed', 'ember-metal/mixin', 'ember-views/streams/key_stream', 'ember-metal/streams/stream_binding', 'ember-views/streams/context_stream', 'ember-metal/streams/utils', 'ember-views/attr_nodes/attr_node', 'ember-metal/deprecate_property', 'ember-runtime/system/native_array', 'ember-views/streams/class_name_binding', 'ember-metal/enumerable_utils', 'ember-metal/property_events', 'ember-views/system/jquery', 'ember-views/system/ext', 'ember-views/views/core_view', 'ember-views/system/platform'], function (exports, Ember, create, Evented, EmberObject, EmberError, property_get, property_set, setProperties, run, ember_metal__observer, properties, utils, computed, mixin, KeyStream, StreamBinding, ContextStream, streams__utils, AttrNode, deprecate_property, native_array, class_name_binding, enumerable_utils, property_events, jQuery, __dep25__, CoreView, platform) {
|
40562
|
-
|
40563
|
-
'use strict';
|
40564
|
-
|
40565
|
-
// Ember.assert, Ember.deprecate, Ember.warn, Ember.TEMPLATES,
|
40566
|
-
// jQuery, Ember.lookup,
|
40567
|
-
// Ember.ContainerView circular dependency
|
40568
|
-
// Ember.ENV
|
40569
|
-
function K() { return this; }
|
40570
|
-
|
40571
|
-
// Circular dep
|
40572
|
-
var _renderView;
|
40573
|
-
function renderView(view, buffer, template) {
|
40574
|
-
if (_renderView === undefined) {
|
40575
|
-
_renderView = eriuqer('ember-htmlbars/system/render-view')['default'];
|
40576
|
-
}
|
40577
|
-
_renderView(view, buffer, template);
|
40578
|
-
}
|
40579
|
-
|
40580
|
-
/**
|
40581
|
-
@module ember
|
40582
|
-
@submodule ember-views
|
40583
|
-
*/
|
40584
|
-
var childViewsProperty = computed.computed(function() {
|
40585
|
-
var childViews = this._childViews;
|
40586
|
-
var ret = native_array.A();
|
40587
|
-
|
40588
|
-
enumerable_utils.forEach(childViews, function(view) {
|
40589
|
-
var currentChildViews;
|
40590
|
-
if (view.isVirtual) {
|
40591
|
-
if (currentChildViews = property_get.get(view, 'childViews')) {
|
40592
|
-
ret.pushObjects(currentChildViews);
|
40593
|
-
}
|
40594
|
-
} else {
|
40595
|
-
ret.push(view);
|
40596
|
-
}
|
40597
|
-
});
|
40598
|
-
|
40599
|
-
ret.replace = function (idx, removedCount, addedViews) {
|
40600
|
-
throw new EmberError['default']("childViews is immutable");
|
40601
|
-
};
|
40602
|
-
|
40603
|
-
return ret;
|
40604
|
-
});
|
40605
|
-
|
40606
|
-
Ember['default'].warn("The VIEW_PRESERVES_CONTEXT flag has been removed and the functionality can no longer be disabled.", Ember['default'].ENV.VIEW_PRESERVES_CONTEXT !== false);
|
40607
|
-
|
40608
|
-
/**
|
40609
|
-
Global hash of shared templates. This will automatically be populated
|
40610
|
-
by the build tools so that you can store your Handlebars templates in
|
40611
|
-
separate files that get loaded into JavaScript at buildtime.
|
40612
|
-
|
40613
|
-
@property TEMPLATES
|
40614
|
-
@for Ember
|
40615
|
-
@type Hash
|
40616
|
-
*/
|
40617
|
-
Ember['default'].TEMPLATES = {};
|
40618
|
-
|
40619
|
-
var EMPTY_ARRAY = [];
|
40620
|
-
|
40621
|
-
var ViewStreamSupport = mixin.Mixin.create({
|
40622
|
-
init: function() {
|
40623
|
-
this._baseContext = undefined;
|
40624
|
-
this._contextStream = undefined;
|
40625
|
-
this._streamBindings = undefined;
|
40626
|
-
this._super.apply(this, arguments);
|
40627
|
-
},
|
40628
|
-
|
40629
|
-
getStream: function(path) {
|
40630
|
-
var stream = this._getContextStream().get(path);
|
40631
|
-
|
40632
|
-
stream._label = path;
|
40633
|
-
|
40634
|
-
return stream;
|
40635
|
-
},
|
40636
|
-
|
40637
|
-
_willDestroyElement: function() {
|
40638
|
-
if (this._streamBindings) {
|
40639
|
-
this._destroyStreamBindings();
|
40640
|
-
}
|
40641
|
-
if (this._contextStream) {
|
40642
|
-
this._destroyContextStream();
|
40643
|
-
}
|
40644
|
-
},
|
40645
|
-
|
40646
|
-
_getBindingForStream: function(pathOrStream) {
|
40647
|
-
if (this._streamBindings === undefined) {
|
40648
|
-
this._streamBindings = create['default'](null);
|
40649
|
-
}
|
40650
|
-
|
40651
|
-
var path = pathOrStream;
|
40652
|
-
if (streams__utils.isStream(pathOrStream)) {
|
40653
|
-
path = pathOrStream._label;
|
40654
|
-
|
40655
|
-
if (!path) {
|
40656
|
-
// if no _label is present on the provided stream
|
40657
|
-
// it is likely a subexpr and cannot be set (so it
|
40658
|
-
// does not need a StreamBinding)
|
40659
|
-
return pathOrStream;
|
40660
|
-
}
|
40661
|
-
}
|
40662
|
-
|
40663
|
-
if (this._streamBindings[path] !== undefined) {
|
40664
|
-
return this._streamBindings[path];
|
40665
|
-
} else {
|
40666
|
-
var stream = this._getContextStream().get(path);
|
40667
|
-
var streamBinding = new StreamBinding['default'](stream);
|
40668
|
-
|
40669
|
-
streamBinding._label = path;
|
40670
|
-
|
40671
|
-
return this._streamBindings[path] = streamBinding;
|
40672
|
-
}
|
40673
|
-
},
|
40674
|
-
|
40675
|
-
_destroyStreamBindings: function() {
|
40676
|
-
var streamBindings = this._streamBindings;
|
40677
|
-
for (var path in streamBindings) {
|
40678
|
-
streamBindings[path].destroy();
|
40679
|
-
}
|
40680
|
-
this._streamBindings = undefined;
|
40681
|
-
},
|
40682
|
-
|
40683
|
-
_getContextStream: function() {
|
40684
|
-
if (this._contextStream === undefined) {
|
40685
|
-
this._baseContext = new KeyStream['default'](this, 'context');
|
40686
|
-
this._contextStream = new ContextStream['default'](this);
|
40687
|
-
}
|
40688
|
-
|
40689
|
-
return this._contextStream;
|
40690
|
-
},
|
40691
|
-
|
40692
|
-
_destroyContextStream: function() {
|
40693
|
-
this._baseContext.destroy();
|
40694
|
-
this._baseContext = undefined;
|
40695
|
-
this._contextStream.destroy();
|
40696
|
-
this._contextStream = undefined;
|
40697
|
-
},
|
40698
|
-
|
40699
|
-
_unsubscribeFromStreamBindings: function() {
|
40700
|
-
for (var key in this._streamBindingSubscriptions) {
|
40701
|
-
var streamBinding = this[key + 'Binding'];
|
40702
|
-
var callback = this._streamBindingSubscriptions[key];
|
40703
|
-
streamBinding.unsubscribe(callback);
|
40704
|
-
}
|
40705
|
-
}
|
40706
|
-
});
|
40707
|
-
|
40708
|
-
var ViewKeywordSupport = mixin.Mixin.create({
|
40709
|
-
init: function() {
|
40710
|
-
this._super.apply(this, arguments);
|
40711
|
-
|
40712
|
-
if (!this._keywords) {
|
40713
|
-
this._keywords = create['default'](null);
|
40714
|
-
}
|
40715
|
-
this._keywords._view = this;
|
40716
|
-
this._keywords.view = undefined;
|
40717
|
-
this._keywords.controller = new KeyStream['default'](this, 'controller');
|
40718
|
-
this._setupKeywords();
|
40719
|
-
},
|
40720
|
-
|
40721
|
-
_setupKeywords: function() {
|
40722
|
-
var keywords = this._keywords;
|
40723
|
-
var contextView = this._contextView || this._parentView;
|
40724
|
-
|
40725
|
-
if (contextView) {
|
40726
|
-
var parentKeywords = contextView._keywords;
|
40727
|
-
|
40728
|
-
keywords.view = this.isVirtual ? parentKeywords.view : this;
|
40729
|
-
|
40730
|
-
for (var name in parentKeywords) {
|
40731
|
-
if (keywords[name]) {
|
40732
|
-
continue;
|
40733
|
-
}
|
40734
|
-
|
40735
|
-
keywords[name] = parentKeywords[name];
|
40736
|
-
}
|
40737
|
-
} else {
|
40738
|
-
keywords.view = this.isVirtual ? null : this;
|
40739
|
-
}
|
40740
|
-
}
|
40741
|
-
});
|
40742
|
-
|
40743
|
-
var ViewContextSupport = mixin.Mixin.create({
|
40744
|
-
/**
|
40745
|
-
The object from which templates should access properties.
|
40746
|
-
|
40747
|
-
This object will be passed to the template function each time the render
|
40748
|
-
method is called, but it is up to the individual function to decide what
|
40749
|
-
to do with it.
|
40750
|
-
|
40751
|
-
By default, this will be the view's controller.
|
40752
|
-
|
40753
|
-
@property context
|
40754
|
-
@type Object
|
40755
|
-
*/
|
40756
|
-
context: computed.computed(function(key, value) {
|
40757
|
-
if (arguments.length === 2) {
|
40758
|
-
property_set.set(this, '_context', value);
|
40759
|
-
return value;
|
40760
|
-
} else {
|
40761
|
-
return property_get.get(this, '_context');
|
40762
|
-
}
|
40763
|
-
})["volatile"](),
|
40764
|
-
|
40765
|
-
/**
|
40766
|
-
Private copy of the view's template context. This can be set directly
|
40767
|
-
by Handlebars without triggering the observer that causes the view
|
40768
|
-
to be re-rendered.
|
40769
|
-
|
40770
|
-
The context of a view is looked up as follows:
|
40771
|
-
|
40772
|
-
1. Supplied context (usually by Handlebars)
|
40773
|
-
2. Specified controller
|
40774
|
-
3. `parentView`'s context (for a child of a ContainerView)
|
40775
|
-
|
40776
|
-
The code in Handlebars that overrides the `_context` property first
|
40777
|
-
checks to see whether the view has a specified controller. This is
|
40778
|
-
something of a hack and should be revisited.
|
40779
|
-
|
40780
|
-
@property _context
|
40781
|
-
@private
|
40782
|
-
*/
|
40783
|
-
_context: computed.computed(function(key, value) {
|
40784
|
-
if (arguments.length === 2) {
|
40785
|
-
return value;
|
40786
|
-
}
|
40787
|
-
|
40788
|
-
var parentView, controller;
|
40789
|
-
|
40790
|
-
if (controller = property_get.get(this, 'controller')) {
|
40791
|
-
return controller;
|
40792
|
-
}
|
40793
|
-
|
40794
|
-
parentView = this._parentView;
|
40795
|
-
if (parentView) {
|
40796
|
-
return property_get.get(parentView, '_context');
|
40797
|
-
}
|
41197
|
+
'use strict';
|
40798
41198
|
|
40799
|
-
|
40800
|
-
}),
|
41199
|
+
var preRender = create['default'](_default['default']);
|
40801
41200
|
|
40802
|
-
|
41201
|
+
exports['default'] = preRender;
|
40803
41202
|
|
40804
|
-
|
40805
|
-
|
40806
|
-
made available for use by the template.
|
41203
|
+
});
|
41204
|
+
enifed('ember-views/views/text_area', ['exports', 'ember-metal/property_get', 'ember-views/views/component', 'ember-views/mixins/text_support', 'ember-metal/mixin'], function (exports, property_get, Component, TextSupport, mixin) {
|
40807
41205
|
|
40808
|
-
|
40809
|
-
@type Object
|
40810
|
-
*/
|
40811
|
-
controller: computed.computed(function(key, value) {
|
40812
|
-
if (arguments.length === 2) {
|
40813
|
-
this._controller = value;
|
40814
|
-
return value;
|
40815
|
-
}
|
41206
|
+
'use strict';
|
40816
41207
|
|
40817
|
-
if (this._controller) {
|
40818
|
-
return this._controller;
|
40819
|
-
}
|
40820
41208
|
|
40821
|
-
|
40822
|
-
|
40823
|
-
|
40824
|
-
|
41209
|
+
/**
|
41210
|
+
@module ember
|
41211
|
+
@submodule ember-views
|
41212
|
+
*/
|
41213
|
+
exports['default'] = Component['default'].extend(TextSupport['default'], {
|
41214
|
+
instrumentDisplay: '{{textarea}}',
|
40825
41215
|
|
40826
|
-
|
40827
|
-
/**
|
40828
|
-
Array of child views. You should never edit this array directly.
|
40829
|
-
Instead, use `appendChild` and `removeFromParent`.
|
41216
|
+
classNames: ['ember-text-area'],
|
40830
41217
|
|
40831
|
-
|
40832
|
-
|
40833
|
-
|
40834
|
-
|
40835
|
-
|
40836
|
-
|
41218
|
+
tagName: "textarea",
|
41219
|
+
attributeBindings: [
|
41220
|
+
'rows',
|
41221
|
+
'cols',
|
41222
|
+
'name',
|
41223
|
+
'selectionEnd',
|
41224
|
+
'selectionStart',
|
41225
|
+
'wrap',
|
41226
|
+
'lang',
|
41227
|
+
'dir'
|
41228
|
+
],
|
41229
|
+
rows: null,
|
41230
|
+
cols: null,
|
40837
41231
|
|
40838
|
-
|
41232
|
+
_updateElementValue: mixin.observer('value', function() {
|
41233
|
+
// We do this check so cursor position doesn't get affected in IE
|
41234
|
+
var value = property_get.get(this, 'value');
|
41235
|
+
var $el = this.$();
|
41236
|
+
if ($el && value !== $el.val()) {
|
41237
|
+
$el.val(value);
|
41238
|
+
}
|
41239
|
+
}),
|
40839
41240
|
|
40840
41241
|
init: function() {
|
40841
|
-
// setup child views. be sure to clone the child views array first
|
40842
|
-
this._childViews = this._childViews.slice();
|
40843
|
-
|
40844
41242
|
this._super.apply(this, arguments);
|
40845
|
-
|
40846
|
-
|
40847
|
-
|
40848
|
-
return this.currentState.appendChild(this, view, options);
|
40849
|
-
},
|
41243
|
+
this.on("didInsertElement", this, this._updateElementValue);
|
41244
|
+
}
|
41245
|
+
});
|
40850
41246
|
|
40851
|
-
|
40852
|
-
|
41247
|
+
});
|
41248
|
+
enifed('ember-views/views/text_field', ['exports', 'ember-views/views/component', 'ember-views/mixins/text_support'], function (exports, Component, TextSupport) {
|
40853
41249
|
|
40854
|
-
|
40855
|
-
@param {Ember.View} view
|
40856
|
-
@return {Ember.View} receiver
|
40857
|
-
*/
|
40858
|
-
removeChild: function(view) {
|
40859
|
-
// If we're destroying, the entire subtree will be
|
40860
|
-
// freed, and the DOM will be handled separately,
|
40861
|
-
// so no need to mess with childViews.
|
40862
|
-
if (this.isDestroying) { return; }
|
41250
|
+
'use strict';
|
40863
41251
|
|
40864
|
-
|
40865
|
-
|
41252
|
+
/**
|
41253
|
+
@module ember
|
41254
|
+
@submodule ember-views
|
41255
|
+
*/
|
41256
|
+
exports['default'] = Component['default'].extend(TextSupport['default'], {
|
41257
|
+
instrumentDisplay: '{{input type="text"}}',
|
40866
41258
|
|
40867
|
-
|
40868
|
-
|
41259
|
+
classNames: ['ember-text-field'],
|
41260
|
+
tagName: "input",
|
41261
|
+
attributeBindings: [
|
41262
|
+
'accept',
|
41263
|
+
'autocomplete',
|
41264
|
+
'autosave',
|
41265
|
+
'dir',
|
41266
|
+
'formaction',
|
41267
|
+
'formenctype',
|
41268
|
+
'formmethod',
|
41269
|
+
'formnovalidate',
|
41270
|
+
'formtarget',
|
41271
|
+
'height',
|
41272
|
+
'inputmode',
|
41273
|
+
'lang',
|
41274
|
+
'list',
|
41275
|
+
'max',
|
41276
|
+
'min',
|
41277
|
+
'multiple',
|
41278
|
+
'name',
|
41279
|
+
'pattern',
|
41280
|
+
'size',
|
41281
|
+
'step',
|
41282
|
+
'type',
|
41283
|
+
'value',
|
41284
|
+
'width'
|
41285
|
+
],
|
40869
41286
|
|
40870
|
-
|
41287
|
+
defaultLayout: null,
|
40871
41288
|
|
40872
|
-
|
41289
|
+
/**
|
41290
|
+
The `value` attribute of the input element. As the user inputs text, this
|
41291
|
+
property is updated live.
|
40873
41292
|
|
40874
|
-
|
40875
|
-
|
41293
|
+
@property value
|
41294
|
+
@type String
|
41295
|
+
@default ""
|
41296
|
+
*/
|
41297
|
+
value: "",
|
40876
41298
|
|
40877
41299
|
/**
|
40878
|
-
|
40879
|
-
initialization. You generally will not call this method directly unless
|
40880
|
-
you are overriding `createChildViews()`. Note that this method will
|
40881
|
-
automatically configure the correct settings on the new view instance to
|
40882
|
-
act as a child of the parent.
|
41300
|
+
The `type` attribute of the input element.
|
40883
41301
|
|
40884
|
-
@
|
40885
|
-
@
|
40886
|
-
@
|
40887
|
-
@return {Ember.View} new instance
|
41302
|
+
@property type
|
41303
|
+
@type String
|
41304
|
+
@default "text"
|
40888
41305
|
*/
|
40889
|
-
|
40890
|
-
if (!maybeViewClass) {
|
40891
|
-
throw new TypeError("createChildViews first argument must exist");
|
40892
|
-
}
|
40893
|
-
|
40894
|
-
if (maybeViewClass.isView && maybeViewClass._parentView === this && maybeViewClass.container === this.container) {
|
40895
|
-
return maybeViewClass;
|
40896
|
-
}
|
41306
|
+
type: "text",
|
40897
41307
|
|
40898
|
-
|
40899
|
-
|
40900
|
-
attrs._parentView = this;
|
40901
|
-
attrs.renderer = this.renderer;
|
41308
|
+
/**
|
41309
|
+
The `size` of the text field in characters.
|
40902
41310
|
|
40903
|
-
|
40904
|
-
|
41311
|
+
@property size
|
41312
|
+
@type String
|
41313
|
+
@default null
|
41314
|
+
*/
|
41315
|
+
size: null,
|
40905
41316
|
|
40906
|
-
|
41317
|
+
/**
|
41318
|
+
The `pattern` attribute of input element.
|
40907
41319
|
|
40908
|
-
|
40909
|
-
|
40910
|
-
|
40911
|
-
|
40912
|
-
|
40913
|
-
} else if ('string' === typeof maybeViewClass) {
|
40914
|
-
var fullName = 'view:' + maybeViewClass;
|
40915
|
-
var ViewKlass = this.container.lookupFactory(fullName);
|
41320
|
+
@property pattern
|
41321
|
+
@type String
|
41322
|
+
@default null
|
41323
|
+
*/
|
41324
|
+
pattern: null,
|
40916
41325
|
|
40917
|
-
|
41326
|
+
/**
|
41327
|
+
The `min` attribute of input element used with `type="number"` or `type="range"`.
|
40918
41328
|
|
40919
|
-
|
40920
|
-
|
40921
|
-
|
40922
|
-
|
41329
|
+
@property min
|
41330
|
+
@type String
|
41331
|
+
@default null
|
41332
|
+
@since 1.4.0
|
41333
|
+
*/
|
41334
|
+
min: null,
|
40923
41335
|
|
40924
|
-
|
40925
|
-
|
40926
|
-
}
|
41336
|
+
/**
|
41337
|
+
The `max` attribute of input element used with `type="number"` or `type="range"`.
|
40927
41338
|
|
40928
|
-
|
40929
|
-
|
41339
|
+
@property max
|
41340
|
+
@type String
|
41341
|
+
@default null
|
41342
|
+
@since 1.4.0
|
41343
|
+
*/
|
41344
|
+
max: null
|
40930
41345
|
});
|
40931
41346
|
|
40932
|
-
|
40933
|
-
|
40934
|
-
Ember['default'].deprecate("Ember.View#transitionTo has been deprecated, it is for internal use only");
|
40935
|
-
this._transitionTo(state, children);
|
40936
|
-
},
|
41347
|
+
});
|
41348
|
+
enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-runtime/mixins/evented', 'ember-runtime/system/object', 'ember-metal/error', 'ember-metal/property_get', 'ember-metal/run_loop', 'ember-metal/observer', 'ember-metal/utils', 'ember-metal/computed', 'ember-metal/mixin', 'ember-metal/deprecate_property', 'ember-metal/property_events', 'ember-views/system/jquery', 'ember-views/system/ext', 'ember-views/views/core_view', 'ember-views/mixins/view_stream_support', 'ember-views/mixins/view_keyword_support', 'ember-views/mixins/view_context_support', 'ember-views/mixins/view_child_views_support', 'ember-views/mixins/view_state_support', 'ember-views/mixins/template_rendering_support', 'ember-views/mixins/class_names_support', 'ember-views/mixins/attribute_bindings_support', 'ember-views/mixins/legacy_view_support', 'ember-views/mixins/instrumentation_support', 'ember-views/mixins/visibility_support'], function (exports, Ember, Evented, EmberObject, EmberError, property_get, run, observer, utils, computed, mixin, deprecate_property, property_events, jQuery, __dep13__, CoreView, ViewStreamSupport, ViewKeywordSupport, ViewContextSupport, view_child_views_support, ViewStateSupport, TemplateRenderingSupport, ClassNamesSupport, AttributeBindingsSupport, LegacyViewSupport, InstrumentationSupport, VisibilitySupport) {
|
40937
41349
|
|
40938
|
-
|
40939
|
-
var priorState = this.currentState;
|
40940
|
-
var currentState = this.currentState = this._states[state];
|
40941
|
-
this._state = state;
|
41350
|
+
'use strict';
|
40942
41351
|
|
40943
|
-
|
40944
|
-
|
40945
|
-
|
40946
|
-
|
41352
|
+
// Ember.assert, Ember.deprecate, Ember.warn, Ember.TEMPLATES,
|
41353
|
+
// jQuery, Ember.lookup,
|
41354
|
+
// Ember.ContainerView circular dependency
|
41355
|
+
// Ember.ENV
|
41356
|
+
function K() { return this; }
|
40947
41357
|
|
40948
|
-
|
40949
|
-
|
40950
|
-
|
40951
|
-
|
40952
|
-
or `templateName` properties instead of this method.
|
41358
|
+
/**
|
41359
|
+
@module ember
|
41360
|
+
@submodule ember-views
|
41361
|
+
*/
|
40953
41362
|
|
40954
|
-
|
40955
|
-
property and invoke it with the value of `context`. The value of
|
40956
|
-
`context` will be the view's controller unless you override it.
|
41363
|
+
Ember['default'].warn("The VIEW_PRESERVES_CONTEXT flag has been removed and the functionality can no longer be disabled.", Ember['default'].ENV.VIEW_PRESERVES_CONTEXT !== false);
|
40957
41364
|
|
40958
|
-
|
40959
|
-
|
40960
|
-
|
40961
|
-
|
40962
|
-
|
40963
|
-
|
40964
|
-
|
40965
|
-
|
40966
|
-
|
40967
|
-
|
40968
|
-
|
41365
|
+
/**
|
41366
|
+
Global hash of shared templates. This will automatically be populated
|
41367
|
+
by the build tools so that you can store your Handlebars templates in
|
41368
|
+
separate files that get loaded into JavaScript at buildtime.
|
41369
|
+
|
41370
|
+
@property TEMPLATES
|
41371
|
+
@for Ember
|
41372
|
+
@type Hash
|
41373
|
+
*/
|
41374
|
+
Ember['default'].TEMPLATES = {};
|
41375
|
+
|
41376
|
+
var EMPTY_ARRAY = [];
|
40969
41377
|
|
40970
41378
|
/**
|
40971
41379
|
`Ember.View` is the class in Ember responsible for encapsulating templates of
|
@@ -41570,9 +41978,18 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
41570
41978
|
@namespace Ember
|
41571
41979
|
@extends Ember.CoreView
|
41572
41980
|
*/
|
41573
|
-
var View = CoreView['default'].extend(
|
41574
|
-
|
41575
|
-
|
41981
|
+
var View = CoreView['default'].extend(
|
41982
|
+
ViewStreamSupport['default'],
|
41983
|
+
ViewKeywordSupport['default'],
|
41984
|
+
ViewContextSupport['default'],
|
41985
|
+
view_child_views_support["default"],
|
41986
|
+
ViewStateSupport['default'],
|
41987
|
+
TemplateRenderingSupport['default'],
|
41988
|
+
ClassNamesSupport['default'],
|
41989
|
+
AttributeBindingsSupport['default'],
|
41990
|
+
LegacyViewSupport['default'],
|
41991
|
+
InstrumentationSupport['default'],
|
41992
|
+
VisibilitySupport['default'], {
|
41576
41993
|
|
41577
41994
|
/**
|
41578
41995
|
@property isView
|
@@ -41610,18 +42027,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
41610
42027
|
*/
|
41611
42028
|
layoutName: null,
|
41612
42029
|
|
41613
|
-
/**
|
41614
|
-
Used to identify this view during debugging
|
41615
|
-
|
41616
|
-
@property instrumentDisplay
|
41617
|
-
@type String
|
41618
|
-
*/
|
41619
|
-
instrumentDisplay: computed.computed(function() {
|
41620
|
-
if (this.helperName) {
|
41621
|
-
return '{{' + this.helperName + '}}';
|
41622
|
-
}
|
41623
|
-
}),
|
41624
|
-
|
41625
42030
|
/**
|
41626
42031
|
The template used to render the view. This should be a function that
|
41627
42032
|
accepts an optional context parameter and returns a string of HTML that
|
@@ -41671,12 +42076,7 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
41671
42076
|
var template = property_get.get(this, 'template');
|
41672
42077
|
|
41673
42078
|
if (template) {
|
41674
|
-
|
41675
|
-
|
41676
|
-
useHTMLBars = template.isHTMLBars;
|
41677
|
-
|
41678
|
-
|
41679
|
-
if (useHTMLBars) {
|
42079
|
+
if (template.isHTMLBars) {
|
41680
42080
|
return template.render(this, options, morph.contextualElement);
|
41681
42081
|
} else {
|
41682
42082
|
return template(context, options);
|
@@ -41710,16 +42110,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
41710
42110
|
this.rerender();
|
41711
42111
|
}),
|
41712
42112
|
|
41713
|
-
/**
|
41714
|
-
If `false`, the view will appear hidden in DOM.
|
41715
|
-
|
41716
|
-
@property isVisible
|
41717
|
-
@type Boolean
|
41718
|
-
@default null
|
41719
|
-
*/
|
41720
|
-
isVisible: true,
|
41721
|
-
|
41722
|
-
|
41723
42113
|
// When it's a virtual view, we need to notify the parent that their
|
41724
42114
|
// childViews will change.
|
41725
42115
|
_childViewsWillChange: mixin.beforeObserver('childViews', function() {
|
@@ -41738,25 +42128,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
41738
42128
|
}
|
41739
42129
|
}),
|
41740
42130
|
|
41741
|
-
/**
|
41742
|
-
Return the nearest ancestor that is an instance of the provided
|
41743
|
-
class.
|
41744
|
-
|
41745
|
-
@method nearestInstanceOf
|
41746
|
-
@param {Class} klass Subclass of Ember.View (or Ember.View itself)
|
41747
|
-
@return Ember.View
|
41748
|
-
@deprecated
|
41749
|
-
*/
|
41750
|
-
nearestInstanceOf: function(klass) {
|
41751
|
-
Ember['default'].deprecate("nearestInstanceOf is deprecated and will be removed from future releases. Use nearestOfType.");
|
41752
|
-
var view = property_get.get(this, 'parentView');
|
41753
|
-
|
41754
|
-
while (view) {
|
41755
|
-
if (view instanceof klass) { return view; }
|
41756
|
-
view = property_get.get(view, 'parentView');
|
41757
|
-
}
|
41758
|
-
},
|
41759
|
-
|
41760
42131
|
/**
|
41761
42132
|
Return the nearest ancestor that is an instance of the provided
|
41762
42133
|
class or mixin.
|
@@ -41794,26 +42165,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
41794
42165
|
}
|
41795
42166
|
},
|
41796
42167
|
|
41797
|
-
/**
|
41798
|
-
Return the nearest ancestor whose parent is an instance of
|
41799
|
-
`klass`.
|
41800
|
-
|
41801
|
-
@method nearestChildOf
|
41802
|
-
@param {Class} klass Subclass of Ember.View (or Ember.View itself)
|
41803
|
-
@return Ember.View
|
41804
|
-
@deprecated
|
41805
|
-
*/
|
41806
|
-
nearestChildOf: function(klass) {
|
41807
|
-
Ember['default'].deprecate("nearestChildOf has been deprecated.");
|
41808
|
-
|
41809
|
-
var view = property_get.get(this, 'parentView');
|
41810
|
-
|
41811
|
-
while (view) {
|
41812
|
-
if (property_get.get(view, 'parentView') instanceof klass) { return view; }
|
41813
|
-
view = property_get.get(view, 'parentView');
|
41814
|
-
}
|
41815
|
-
},
|
41816
|
-
|
41817
42168
|
/**
|
41818
42169
|
When the parent view changes, recursively invalidate `controller`
|
41819
42170
|
|
@@ -41861,159 +42212,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
41861
42212
|
return this.currentState.rerender(this);
|
41862
42213
|
},
|
41863
42214
|
|
41864
|
-
/**
|
41865
|
-
Iterates over the view's `classNameBindings` array, inserts the value
|
41866
|
-
of the specified property into the `classNames` array, then creates an
|
41867
|
-
observer to update the view's element if the bound property ever changes
|
41868
|
-
in the future.
|
41869
|
-
|
41870
|
-
@method _applyClassNameBindings
|
41871
|
-
@private
|
41872
|
-
*/
|
41873
|
-
_applyClassNameBindings: function(classBindings) {
|
41874
|
-
var classNames = this.classNames;
|
41875
|
-
var elem, newClass, dasherizedClass;
|
41876
|
-
|
41877
|
-
// Loop through all of the configured bindings. These will be either
|
41878
|
-
// property names ('isUrgent') or property paths relative to the view
|
41879
|
-
// ('content.isUrgent')
|
41880
|
-
enumerable_utils.forEach(classBindings, function(binding) {
|
41881
|
-
|
41882
|
-
var boundBinding;
|
41883
|
-
if (streams__utils.isStream(binding)) {
|
41884
|
-
boundBinding = binding;
|
41885
|
-
} else {
|
41886
|
-
boundBinding = class_name_binding.streamifyClassNameBinding(this, binding, '_view.');
|
41887
|
-
}
|
41888
|
-
|
41889
|
-
// Variable in which the old class value is saved. The observer function
|
41890
|
-
// closes over this variable, so it knows which string to remove when
|
41891
|
-
// the property changes.
|
41892
|
-
var oldClass;
|
41893
|
-
|
41894
|
-
// Set up an observer on the context. If the property changes, toggle the
|
41895
|
-
// class name.
|
41896
|
-
var observer = this._wrapAsScheduled(function() {
|
41897
|
-
// Get the current value of the property
|
41898
|
-
elem = this.$();
|
41899
|
-
newClass = streams__utils.read(boundBinding);
|
41900
|
-
|
41901
|
-
// If we had previously added a class to the element, remove it.
|
41902
|
-
if (oldClass) {
|
41903
|
-
elem.removeClass(oldClass);
|
41904
|
-
// Also remove from classNames so that if the view gets rerendered,
|
41905
|
-
// the class doesn't get added back to the DOM.
|
41906
|
-
classNames.removeObject(oldClass);
|
41907
|
-
}
|
41908
|
-
|
41909
|
-
// If necessary, add a new class. Make sure we keep track of it so
|
41910
|
-
// it can be removed in the future.
|
41911
|
-
if (newClass) {
|
41912
|
-
elem.addClass(newClass);
|
41913
|
-
oldClass = newClass;
|
41914
|
-
} else {
|
41915
|
-
oldClass = null;
|
41916
|
-
}
|
41917
|
-
});
|
41918
|
-
|
41919
|
-
// Get the class name for the property at its current value
|
41920
|
-
dasherizedClass = streams__utils.read(boundBinding);
|
41921
|
-
|
41922
|
-
if (dasherizedClass) {
|
41923
|
-
// Ensure that it gets into the classNames array
|
41924
|
-
// so it is displayed when we render.
|
41925
|
-
enumerable_utils.addObject(classNames, dasherizedClass);
|
41926
|
-
|
41927
|
-
// Save a reference to the class name so we can remove it
|
41928
|
-
// if the observer fires. Remember that this variable has
|
41929
|
-
// been closed over by the observer.
|
41930
|
-
oldClass = dasherizedClass;
|
41931
|
-
}
|
41932
|
-
|
41933
|
-
streams__utils.subscribe(boundBinding, observer, this);
|
41934
|
-
// Remove className so when the view is rerendered,
|
41935
|
-
// the className is added based on binding reevaluation
|
41936
|
-
this.one('willClearRender', function() {
|
41937
|
-
if (oldClass) {
|
41938
|
-
classNames.removeObject(oldClass);
|
41939
|
-
oldClass = null;
|
41940
|
-
}
|
41941
|
-
});
|
41942
|
-
|
41943
|
-
}, this);
|
41944
|
-
},
|
41945
|
-
|
41946
|
-
_unspecifiedAttributeBindings: null,
|
41947
|
-
|
41948
|
-
/**
|
41949
|
-
Iterates through the view's attribute bindings, sets up observers for each,
|
41950
|
-
then applies the current value of the attributes to the passed render buffer.
|
41951
|
-
|
41952
|
-
@method _applyAttributeBindings
|
41953
|
-
@param {Ember.RenderBuffer} buffer
|
41954
|
-
@param {Array} attributeBindings
|
41955
|
-
@private
|
41956
|
-
*/
|
41957
|
-
_applyAttributeBindings: function(buffer, attributeBindings) {
|
41958
|
-
var unspecifiedAttributeBindings = this._unspecifiedAttributeBindings = this._unspecifiedAttributeBindings || {};
|
41959
|
-
|
41960
|
-
var binding, colonIndex, property, attrName, attrNode, attrValue;
|
41961
|
-
var i, l;
|
41962
|
-
for (i=0, l=attributeBindings.length; i<l; i++) {
|
41963
|
-
binding = attributeBindings[i];
|
41964
|
-
colonIndex = binding.indexOf(':');
|
41965
|
-
if (colonIndex === -1) {
|
41966
|
-
property = binding;
|
41967
|
-
attrName = binding;
|
41968
|
-
} else {
|
41969
|
-
property = binding.substring(0, colonIndex);
|
41970
|
-
attrName = binding.substring(colonIndex + 1);
|
41971
|
-
}
|
41972
|
-
|
41973
|
-
Ember['default'].assert('You cannot use class as an attributeBinding, use classNameBindings instead.', attrName !== 'class');
|
41974
|
-
|
41975
|
-
if (property in this) {
|
41976
|
-
attrValue = this.getStream('view.'+property);
|
41977
|
-
attrNode = new AttrNode['default'](attrName, attrValue);
|
41978
|
-
this.appendAttr(attrNode);
|
41979
|
-
if (!platform.canSetNameOnInputs && attrName === 'name') {
|
41980
|
-
buffer.attr('name', streams__utils.read(attrValue));
|
41981
|
-
}
|
41982
|
-
} else {
|
41983
|
-
unspecifiedAttributeBindings[property] = attrName;
|
41984
|
-
}
|
41985
|
-
}
|
41986
|
-
|
41987
|
-
// Lazily setup setUnknownProperty after attributeBindings are initially applied
|
41988
|
-
this.setUnknownProperty = this._setUnknownProperty;
|
41989
|
-
},
|
41990
|
-
|
41991
|
-
/**
|
41992
|
-
We're using setUnknownProperty as a hook to setup attributeBinding observers for
|
41993
|
-
properties that aren't defined on a view at initialization time.
|
41994
|
-
|
41995
|
-
Note: setUnknownProperty will only be called once for each property.
|
41996
|
-
|
41997
|
-
@method setUnknownProperty
|
41998
|
-
@param key
|
41999
|
-
@param value
|
42000
|
-
@private
|
42001
|
-
*/
|
42002
|
-
setUnknownProperty: null, // Gets defined after initialization by _applyAttributeBindings
|
42003
|
-
|
42004
|
-
_setUnknownProperty: function(key, value) {
|
42005
|
-
var attrName = this._unspecifiedAttributeBindings && this._unspecifiedAttributeBindings[key];
|
42006
|
-
|
42007
|
-
properties.defineProperty(this, key);
|
42008
|
-
|
42009
|
-
if (attrName) {
|
42010
|
-
var attrValue = this.getStream('view.'+key);
|
42011
|
-
var attrNode = new AttrNode['default'](attrName, attrValue);
|
42012
|
-
this.appendAttr(attrNode);
|
42013
|
-
}
|
42014
|
-
return property_set.set(this, key, value);
|
42015
|
-
},
|
42016
|
-
|
42017
42215
|
/**
|
42018
42216
|
Given a property name, returns a dasherized version of that
|
42019
42217
|
property name if the property evaluates to a non-falsy value.
|
@@ -42057,19 +42255,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
42057
42255
|
return this.currentState.$(this, sel);
|
42058
42256
|
},
|
42059
42257
|
|
42060
|
-
mutateChildViews: function(callback) {
|
42061
|
-
var childViews = this._childViews;
|
42062
|
-
var idx = childViews.length;
|
42063
|
-
var view;
|
42064
|
-
|
42065
|
-
while (--idx >= 0) {
|
42066
|
-
view = childViews[idx];
|
42067
|
-
callback(this, view, idx);
|
42068
|
-
}
|
42069
|
-
|
42070
|
-
return this;
|
42071
|
-
},
|
42072
|
-
|
42073
42258
|
forEachChildView: function(callback) {
|
42074
42259
|
var childViews = this._childViews;
|
42075
42260
|
|
@@ -42298,32 +42483,16 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
42298
42483
|
*/
|
42299
42484
|
parentViewDidChange: K,
|
42300
42485
|
|
42301
|
-
instrumentName: 'view',
|
42302
|
-
|
42303
|
-
instrumentDetails: function(hash) {
|
42304
|
-
hash.template = property_get.get(this, 'templateName');
|
42305
|
-
this._super(hash);
|
42306
|
-
},
|
42307
|
-
|
42308
|
-
beforeRender: function(buffer) {},
|
42309
|
-
|
42310
|
-
afterRender: function(buffer) {},
|
42311
|
-
|
42312
42486
|
applyAttributesToBuffer: function(buffer) {
|
42313
42487
|
// Creates observers for all registered class name and attribute bindings,
|
42314
42488
|
// then adds them to the element.
|
42315
|
-
|
42316
|
-
|
42317
|
-
this._applyClassNameBindings(classNameBindings);
|
42318
|
-
}
|
42489
|
+
|
42490
|
+
this._applyClassNameBindings();
|
42319
42491
|
|
42320
42492
|
// Pass the render buffer so the method can apply attributes directly.
|
42321
42493
|
// This isn't needed for class name bindings because they use the
|
42322
42494
|
// existing classNames infrastructure.
|
42323
|
-
|
42324
|
-
if (attributeBindings.length) {
|
42325
|
-
this._applyAttributeBindings(buffer, attributeBindings);
|
42326
|
-
}
|
42495
|
+
this._applyAttributeBindings(buffer);
|
42327
42496
|
|
42328
42497
|
buffer.setClasses(this.classNames);
|
42329
42498
|
buffer.id(this.elementId);
|
@@ -42373,88 +42542,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
42373
42542
|
*/
|
42374
42543
|
ariaRole: null,
|
42375
42544
|
|
42376
|
-
/**
|
42377
|
-
Standard CSS class names to apply to the view's outer element. This
|
42378
|
-
property automatically inherits any class names defined by the view's
|
42379
|
-
superclasses as well.
|
42380
|
-
|
42381
|
-
@property classNames
|
42382
|
-
@type Array
|
42383
|
-
@default ['ember-view']
|
42384
|
-
*/
|
42385
|
-
classNames: ['ember-view'],
|
42386
|
-
|
42387
|
-
/**
|
42388
|
-
A list of properties of the view to apply as class names. If the property
|
42389
|
-
is a string value, the value of that string will be applied as a class
|
42390
|
-
name.
|
42391
|
-
|
42392
|
-
```javascript
|
42393
|
-
// Applies the 'high' class to the view element
|
42394
|
-
Ember.View.extend({
|
42395
|
-
classNameBindings: ['priority']
|
42396
|
-
priority: 'high'
|
42397
|
-
});
|
42398
|
-
```
|
42399
|
-
|
42400
|
-
If the value of the property is a Boolean, the name of that property is
|
42401
|
-
added as a dasherized class name.
|
42402
|
-
|
42403
|
-
```javascript
|
42404
|
-
// Applies the 'is-urgent' class to the view element
|
42405
|
-
Ember.View.extend({
|
42406
|
-
classNameBindings: ['isUrgent']
|
42407
|
-
isUrgent: true
|
42408
|
-
});
|
42409
|
-
```
|
42410
|
-
|
42411
|
-
If you would prefer to use a custom value instead of the dasherized
|
42412
|
-
property name, you can pass a binding like this:
|
42413
|
-
|
42414
|
-
```javascript
|
42415
|
-
// Applies the 'urgent' class to the view element
|
42416
|
-
Ember.View.extend({
|
42417
|
-
classNameBindings: ['isUrgent:urgent']
|
42418
|
-
isUrgent: true
|
42419
|
-
});
|
42420
|
-
```
|
42421
|
-
|
42422
|
-
This list of properties is inherited from the view's superclasses as well.
|
42423
|
-
|
42424
|
-
@property classNameBindings
|
42425
|
-
@type Array
|
42426
|
-
@default []
|
42427
|
-
*/
|
42428
|
-
classNameBindings: EMPTY_ARRAY,
|
42429
|
-
|
42430
|
-
/**
|
42431
|
-
A list of properties of the view to apply as attributes. If the property is
|
42432
|
-
a string value, the value of that string will be applied as the attribute.
|
42433
|
-
|
42434
|
-
```javascript
|
42435
|
-
// Applies the type attribute to the element
|
42436
|
-
// with the value "button", like <div type="button">
|
42437
|
-
Ember.View.extend({
|
42438
|
-
attributeBindings: ['type'],
|
42439
|
-
type: 'button'
|
42440
|
-
});
|
42441
|
-
```
|
42442
|
-
|
42443
|
-
If the value of the property is a Boolean, the name of that property is
|
42444
|
-
added as an attribute.
|
42445
|
-
|
42446
|
-
```javascript
|
42447
|
-
// Renders something like <div enabled="enabled">
|
42448
|
-
Ember.View.extend({
|
42449
|
-
attributeBindings: ['enabled'],
|
42450
|
-
enabled: true
|
42451
|
-
});
|
42452
|
-
```
|
42453
|
-
|
42454
|
-
@property attributeBindings
|
42455
|
-
*/
|
42456
|
-
attributeBindings: EMPTY_ARRAY,
|
42457
|
-
|
42458
42545
|
// .......................................................
|
42459
42546
|
// CORE DISPLAY METHODS
|
42460
42547
|
//
|
@@ -42475,12 +42562,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
42475
42562
|
}
|
42476
42563
|
|
42477
42564
|
this._super.apply(this, arguments);
|
42478
|
-
|
42479
|
-
Ember['default'].assert("Only arrays are allowed for 'classNameBindings'", utils.typeOf(this.classNameBindings) === 'array');
|
42480
|
-
this.classNameBindings = native_array.A(this.classNameBindings.slice());
|
42481
|
-
|
42482
|
-
Ember['default'].assert("Only arrays of static class strings are allowed for 'classNames'. For dynamic classes, use 'classNameBindings'.", utils.typeOf(this.classNames) === 'array');
|
42483
|
-
this.classNames = native_array.A(this.classNames.slice());
|
42484
42565
|
},
|
42485
42566
|
|
42486
42567
|
__defineNonEnumerable: function(property) {
|
@@ -42491,24 +42572,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
42491
42572
|
return this.currentState.appendAttr(this, node);
|
42492
42573
|
},
|
42493
42574
|
|
42494
|
-
/**
|
42495
|
-
Removes all children from the `parentView`.
|
42496
|
-
|
42497
|
-
@method removeAllChildren
|
42498
|
-
@return {Ember.View} receiver
|
42499
|
-
*/
|
42500
|
-
removeAllChildren: function() {
|
42501
|
-
return this.mutateChildViews(function(parentView, view) {
|
42502
|
-
parentView.removeChild(view);
|
42503
|
-
});
|
42504
|
-
},
|
42505
|
-
|
42506
|
-
destroyAllChildren: function() {
|
42507
|
-
return this.mutateChildViews(function(parentView, view) {
|
42508
|
-
view.destroy();
|
42509
|
-
});
|
42510
|
-
},
|
42511
|
-
|
42512
42575
|
/**
|
42513
42576
|
Removes the view from its `parentView`, if one is found. Otherwise
|
42514
42577
|
does nothing.
|
@@ -42549,79 +42612,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
42549
42612
|
return this;
|
42550
42613
|
},
|
42551
42614
|
|
42552
|
-
becameVisible: K,
|
42553
|
-
becameHidden: K,
|
42554
|
-
|
42555
|
-
/**
|
42556
|
-
When the view's `isVisible` property changes, toggle the visibility
|
42557
|
-
element of the actual DOM element.
|
42558
|
-
|
42559
|
-
@method _isVisibleDidChange
|
42560
|
-
@private
|
42561
|
-
*/
|
42562
|
-
_isVisibleDidChange: mixin.observer('isVisible', function() {
|
42563
|
-
if (this._isVisible === property_get.get(this, 'isVisible')) { return ; }
|
42564
|
-
run['default'].scheduleOnce('render', this, this._toggleVisibility);
|
42565
|
-
}),
|
42566
|
-
|
42567
|
-
_toggleVisibility: function() {
|
42568
|
-
var $el = this.$();
|
42569
|
-
var isVisible = property_get.get(this, 'isVisible');
|
42570
|
-
|
42571
|
-
if (this._isVisible === isVisible) { return ; }
|
42572
|
-
|
42573
|
-
// It's important to keep these in sync, even if we don't yet have
|
42574
|
-
// an element in the DOM to manipulate:
|
42575
|
-
this._isVisible = isVisible;
|
42576
|
-
|
42577
|
-
if (!$el) { return; }
|
42578
|
-
|
42579
|
-
$el.toggle(isVisible);
|
42580
|
-
|
42581
|
-
if (this._isAncestorHidden()) { return; }
|
42582
|
-
|
42583
|
-
if (isVisible) {
|
42584
|
-
this._notifyBecameVisible();
|
42585
|
-
} else {
|
42586
|
-
this._notifyBecameHidden();
|
42587
|
-
}
|
42588
|
-
},
|
42589
|
-
|
42590
|
-
_notifyBecameVisible: function() {
|
42591
|
-
this.trigger('becameVisible');
|
42592
|
-
|
42593
|
-
this.forEachChildView(function(view) {
|
42594
|
-
var isVisible = property_get.get(view, 'isVisible');
|
42595
|
-
|
42596
|
-
if (isVisible || isVisible === null) {
|
42597
|
-
view._notifyBecameVisible();
|
42598
|
-
}
|
42599
|
-
});
|
42600
|
-
},
|
42601
|
-
|
42602
|
-
_notifyBecameHidden: function() {
|
42603
|
-
this.trigger('becameHidden');
|
42604
|
-
this.forEachChildView(function(view) {
|
42605
|
-
var isVisible = property_get.get(view, 'isVisible');
|
42606
|
-
|
42607
|
-
if (isVisible || isVisible === null) {
|
42608
|
-
view._notifyBecameHidden();
|
42609
|
-
}
|
42610
|
-
});
|
42611
|
-
},
|
42612
|
-
|
42613
|
-
_isAncestorHidden: function() {
|
42614
|
-
var parent = property_get.get(this, 'parentView');
|
42615
|
-
|
42616
|
-
while (parent) {
|
42617
|
-
if (property_get.get(parent, 'isVisible') === false) { return true; }
|
42618
|
-
|
42619
|
-
parent = property_get.get(parent, 'parentView');
|
42620
|
-
}
|
42621
|
-
|
42622
|
-
return false;
|
42623
|
-
},
|
42624
|
-
|
42625
42615
|
// .......................................................
|
42626
42616
|
// EVENT HANDLING
|
42627
42617
|
//
|
@@ -42650,10 +42640,10 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
42650
42640
|
|
42651
42641
|
var scheduledObserver = this._wrapAsScheduled(observer);
|
42652
42642
|
|
42653
|
-
|
42643
|
+
observer.addObserver(root, path, target, scheduledObserver);
|
42654
42644
|
|
42655
42645
|
this.one('willClearRender', function() {
|
42656
|
-
|
42646
|
+
observer.removeObserver(root, path, target, scheduledObserver);
|
42657
42647
|
});
|
42658
42648
|
},
|
42659
42649
|
|
@@ -42727,16 +42717,18 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/pl
|
|
42727
42717
|
// supplied childViews and then restore the original computed property
|
42728
42718
|
// at view initialization time. This happens in Ember.ContainerView's init
|
42729
42719
|
// method.
|
42730
|
-
View.childViewsProperty = childViewsProperty;
|
42720
|
+
View.childViewsProperty = view_child_views_support.childViewsProperty;
|
42731
42721
|
|
42732
42722
|
exports['default'] = View;
|
42733
42723
|
|
42734
|
-
exports.ViewKeywordSupport = ViewKeywordSupport;
|
42735
|
-
exports.ViewStreamSupport = ViewStreamSupport;
|
42736
|
-
exports.ViewContextSupport = ViewContextSupport;
|
42737
|
-
exports.ViewChildViewsSupport =
|
42738
|
-
exports.ViewStateSupport = ViewStateSupport;
|
42739
|
-
exports.TemplateRenderingSupport = TemplateRenderingSupport;
|
42724
|
+
exports.ViewKeywordSupport = ViewKeywordSupport['default'];
|
42725
|
+
exports.ViewStreamSupport = ViewStreamSupport['default'];
|
42726
|
+
exports.ViewContextSupport = ViewContextSupport['default'];
|
42727
|
+
exports.ViewChildViewsSupport = view_child_views_support["default"];
|
42728
|
+
exports.ViewStateSupport = ViewStateSupport['default'];
|
42729
|
+
exports.TemplateRenderingSupport = TemplateRenderingSupport['default'];
|
42730
|
+
exports.ClassNamesSupport = ClassNamesSupport['default'];
|
42731
|
+
exports.AttributeBindingsSupport = AttributeBindingsSupport['default'];
|
42740
42732
|
|
42741
42733
|
});
|
42742
42734
|
enifed('ember-views/views/with_view', ['exports', 'ember-metal/property_set', 'ember-views/views/metamorph_view', 'ember-views/mixins/normalized_rerender_if_needed', 'ember-metal/run_loop', 'ember-htmlbars/system/render-view'], function (exports, property_set, _MetamorphView, NormalizedRerenderIfNeededSupport, run, renderView) {
|
@@ -42811,7 +42803,7 @@ enifed('ember-views/views/with_view', ['exports', 'ember-metal/property_set', 'e
|
|
42811
42803
|
});
|
42812
42804
|
|
42813
42805
|
});
|
42814
|
-
enifed('ember', ['ember-metal', 'ember-runtime', 'ember-views', 'ember-routing', 'ember-application', 'ember-extension-support', 'ember-htmlbars', 'ember-routing-htmlbars', 'ember-metal/environment', 'ember-runtime/system/lazy_load'], function (__dep0__, __dep1__, __dep2__, __dep3__, __dep4__, __dep5__, __dep6__, __dep7__, environment, lazy_load) {
|
42806
|
+
enifed('ember', ['ember-metal', 'ember-runtime', 'ember-views', 'ember-routing', 'ember-application', 'ember-extension-support', 'ember-htmlbars', 'ember-routing-htmlbars', 'ember-routing-views', 'ember-metal/environment', 'ember-runtime/system/lazy_load'], function (__dep0__, __dep1__, __dep2__, __dep3__, __dep4__, __dep5__, __dep6__, __dep7__, __dep8__, environment, lazy_load) {
|
42815
42807
|
|
42816
42808
|
'use strict';
|
42817
42809
|
|
@@ -43212,298 +43204,310 @@ enifed("morph-attr/sanitize-attribute-value",
|
|
43212
43204
|
__exports__.sanitizeAttributeValue = sanitizeAttributeValue;
|
43213
43205
|
});
|
43214
43206
|
enifed("morph-range",
|
43215
|
-
["exports"],
|
43216
|
-
function(__exports__) {
|
43207
|
+
["./morph-range/utils","exports"],
|
43208
|
+
function(__dependency1__, __exports__) {
|
43217
43209
|
"use strict";
|
43218
|
-
var
|
43210
|
+
var clear = __dependency1__.clear;
|
43211
|
+
var insertBefore = __dependency1__.insertBefore;
|
43219
43212
|
|
43220
|
-
function
|
43221
|
-
|
43222
|
-
|
43223
|
-
|
43213
|
+
function Morph(domHelper, contextualElement) {
|
43214
|
+
this.domHelper = domHelper;
|
43215
|
+
// context if content if current content is detached
|
43216
|
+
this.contextualElement = contextualElement;
|
43217
|
+
|
43218
|
+
// flag to force text to setContent to be treated as html
|
43219
|
+
this.parseTextAsHTML = false;
|
43220
|
+
|
43221
|
+
this.firstNode = null;
|
43222
|
+
this.lastNode = null;
|
43223
|
+
|
43224
|
+
// morph graph
|
43225
|
+
this.parentMorph = null;
|
43226
|
+
this.firstChildMorph = null;
|
43227
|
+
this.lastChildMorph = null;
|
43228
|
+
|
43229
|
+
this.previousMorph = null;
|
43230
|
+
this.nextMorph = null;
|
43224
43231
|
}
|
43225
43232
|
|
43226
|
-
function
|
43227
|
-
if (
|
43228
|
-
|
43229
|
-
(contextualElement ? 'nodeType ' + contextualElement.nodeType : 'nothing'));
|
43233
|
+
Morph.prototype.setContent = function Morph$setContent(content) {
|
43234
|
+
if (content === null || content === undefined) {
|
43235
|
+
return this.clear();
|
43230
43236
|
}
|
43231
|
-
}
|
43232
43237
|
|
43233
|
-
|
43234
|
-
|
43235
|
-
|
43236
|
-
|
43237
|
-
|
43238
|
-
|
43239
|
-
|
43238
|
+
var type = typeof content;
|
43239
|
+
switch (type) {
|
43240
|
+
case 'string':
|
43241
|
+
if (this.parseTextAsHTML) {
|
43242
|
+
return this.setHTML(content);
|
43243
|
+
}
|
43244
|
+
return this.setText(content);
|
43245
|
+
case 'object':
|
43246
|
+
if (typeof content.nodeType === 'number') {
|
43247
|
+
return this.setNode(content);
|
43248
|
+
}
|
43249
|
+
/* Handlebars.SafeString */
|
43250
|
+
if (typeof content.string === 'string') {
|
43251
|
+
return this.setHTML(content.string);
|
43252
|
+
}
|
43253
|
+
if (this.parseTextAsHTML) {
|
43254
|
+
return this.setHTML(content.toString());
|
43255
|
+
}
|
43256
|
+
/* falls through */
|
43257
|
+
case 'boolean':
|
43258
|
+
case 'number':
|
43259
|
+
return this.setText(content.toString());
|
43260
|
+
default:
|
43261
|
+
throw new TypeError('unsupported content');
|
43240
43262
|
}
|
43241
|
-
|
43242
|
-
this.start = start;
|
43243
|
-
this.end = end;
|
43244
|
-
this.domHelper = domHelper;
|
43245
|
-
ensureContext(contextualElement);
|
43246
|
-
this.contextualElement = contextualElement;
|
43247
|
-
this.escaped = true;
|
43248
|
-
this.reset();
|
43249
|
-
}
|
43263
|
+
};
|
43250
43264
|
|
43251
|
-
Morph.prototype.
|
43252
|
-
this.
|
43253
|
-
this.owner = null;
|
43254
|
-
this.morphs = null;
|
43255
|
-
this.before = null;
|
43256
|
-
this.after = null;
|
43265
|
+
Morph.prototype.clear = function Morph$clear() {
|
43266
|
+
return this.setNode(this.domHelper.createComment(''));
|
43257
43267
|
};
|
43258
43268
|
|
43259
|
-
Morph.prototype.
|
43260
|
-
|
43261
|
-
|
43262
|
-
|
43263
|
-
|
43264
|
-
|
43265
|
-
|
43266
|
-
|
43267
|
-
|
43269
|
+
Morph.prototype.setText = function Morph$setText(text) {
|
43270
|
+
var firstNode = this.firstNode;
|
43271
|
+
var lastNode = this.lastNode;
|
43272
|
+
|
43273
|
+
if (firstNode &&
|
43274
|
+
lastNode === firstNode &&
|
43275
|
+
firstNode.nodeType === 3) {
|
43276
|
+
firstNode.nodeValue = text;
|
43277
|
+
return firstNode;
|
43268
43278
|
}
|
43269
|
-
|
43279
|
+
|
43280
|
+
return this.setNode(
|
43281
|
+
text ? this.domHelper.createTextNode(text) : this.domHelper.createComment('')
|
43282
|
+
);
|
43270
43283
|
};
|
43271
43284
|
|
43272
|
-
Morph.prototype.
|
43273
|
-
|
43274
|
-
|
43275
|
-
|
43276
|
-
|
43285
|
+
Morph.prototype.setNode = function Morph$setNode(newNode) {
|
43286
|
+
var firstNode, lastNode;
|
43287
|
+
switch (newNode.nodeType) {
|
43288
|
+
case 3:
|
43289
|
+
firstNode = newNode;
|
43290
|
+
lastNode = newNode;
|
43291
|
+
break;
|
43292
|
+
case 11:
|
43293
|
+
firstNode = newNode.firstChild;
|
43294
|
+
lastNode = newNode.lastChild;
|
43295
|
+
if (firstNode === null) {
|
43296
|
+
firstNode = this.domHelper.createComment('');
|
43297
|
+
newNode.appendChild(firstNode);
|
43298
|
+
lastNode = firstNode;
|
43299
|
+
}
|
43300
|
+
break;
|
43301
|
+
default:
|
43302
|
+
firstNode = newNode;
|
43303
|
+
lastNode = newNode;
|
43304
|
+
break;
|
43277
43305
|
}
|
43306
|
+
|
43307
|
+
var previousFirstNode = this.firstNode;
|
43308
|
+
if (previousFirstNode !== null) {
|
43309
|
+
|
43310
|
+
var parentNode = previousFirstNode.parentNode;
|
43311
|
+
insertBefore(parentNode, firstNode, lastNode, previousFirstNode);
|
43312
|
+
clear(parentNode, previousFirstNode, this.lastNode);
|
43313
|
+
}
|
43314
|
+
|
43315
|
+
this.firstNode = firstNode;
|
43316
|
+
this.lastNode = lastNode;
|
43317
|
+
|
43318
|
+
if (this.parentMorph) {
|
43319
|
+
syncFirstNode(this);
|
43320
|
+
syncLastNode(this);
|
43321
|
+
}
|
43322
|
+
|
43323
|
+
return newNode;
|
43278
43324
|
};
|
43279
43325
|
|
43280
|
-
|
43281
|
-
var
|
43282
|
-
|
43283
|
-
|
43284
|
-
|
43326
|
+
function syncFirstNode(_morph) {
|
43327
|
+
var morph = _morph;
|
43328
|
+
var parentMorph;
|
43329
|
+
while (parentMorph = morph.parentMorph) {
|
43330
|
+
if (morph !== parentMorph.firstChildMorph) {
|
43331
|
+
break;
|
43332
|
+
}
|
43333
|
+
if (morph.firstNode === parentMorph.firstNode) {
|
43285
43334
|
break;
|
43286
43335
|
}
|
43287
|
-
}
|
43288
|
-
};
|
43289
43336
|
|
43290
|
-
|
43291
|
-
this._update(this.element || this.parent(), nodeOrString);
|
43292
|
-
};
|
43337
|
+
parentMorph.firstNode = morph.firstNode;
|
43293
43338
|
|
43294
|
-
|
43295
|
-
var parent = this.element || this.parent();
|
43296
|
-
if (!node) {
|
43297
|
-
return this._updateText(parent, '');
|
43339
|
+
morph = parentMorph;
|
43298
43340
|
}
|
43299
|
-
|
43300
|
-
};
|
43341
|
+
}
|
43301
43342
|
|
43302
|
-
|
43303
|
-
|
43304
|
-
|
43343
|
+
function syncLastNode(_morph) {
|
43344
|
+
var morph = _morph;
|
43345
|
+
var parentMorph;
|
43346
|
+
while (parentMorph = morph.parentMorph) {
|
43347
|
+
if (morph !== parentMorph.lastChildMorph) {
|
43348
|
+
break;
|
43349
|
+
}
|
43350
|
+
if (morph.lastNode === parentMorph.lastNode) {
|
43351
|
+
break;
|
43352
|
+
}
|
43353
|
+
|
43354
|
+
parentMorph.lastNode = morph.lastNode;
|
43305
43355
|
|
43306
|
-
|
43307
|
-
var parent = this.element || this.parent();
|
43308
|
-
if (!html) {
|
43309
|
-
return this._updateText(parent, '');
|
43356
|
+
morph = parentMorph;
|
43310
43357
|
}
|
43311
|
-
|
43358
|
+
}
|
43359
|
+
|
43360
|
+
// return morph content to an undifferentiated state
|
43361
|
+
// drops knowledge that the node has content.
|
43362
|
+
// this is for rerender, I need to test, but basically
|
43363
|
+
// the idea is to leave the content, but allow render again
|
43364
|
+
// without appending, so n
|
43365
|
+
Morph.prototype.reset = function Morph$reset() {
|
43366
|
+
this.firstChildMorph = null;
|
43367
|
+
this.lastChildMorph = null;
|
43312
43368
|
};
|
43313
43369
|
|
43314
|
-
Morph.prototype.
|
43315
|
-
|
43316
|
-
|
43317
|
-
|
43318
|
-
|
43319
|
-
|
43370
|
+
Morph.prototype.destroy = function Morph$destroy() {
|
43371
|
+
var parentMorph = this.parentMorph;
|
43372
|
+
var previousMorph = this.previousMorph;
|
43373
|
+
var nextMorph = this.nextMorph;
|
43374
|
+
var firstNode = this.firstNode;
|
43375
|
+
var lastNode = this.lastNode;
|
43376
|
+
var parentNode = firstNode && firstNode.parentNode;
|
43377
|
+
|
43378
|
+
if (previousMorph) {
|
43379
|
+
if (nextMorph) {
|
43380
|
+
previousMorph.nextMorph = nextMorph;
|
43381
|
+
nextMorph.previousMorph = previousMorph;
|
43320
43382
|
} else {
|
43321
|
-
|
43383
|
+
previousMorph.nextMorph = null;
|
43384
|
+
if (parentMorph) { parentMorph.lastChildMorph = previousMorph; }
|
43322
43385
|
}
|
43323
|
-
} else if (nodeOrString.nodeType) {
|
43324
|
-
this._updateNode(parent, nodeOrString);
|
43325
|
-
} else if (nodeOrString.string) { // duck typed SafeString
|
43326
|
-
this._updateHTML(parent, nodeOrString.string);
|
43327
43386
|
} else {
|
43328
|
-
|
43387
|
+
if (nextMorph) {
|
43388
|
+
nextMorph.previousMorph = null;
|
43389
|
+
if (parentMorph) { parentMorph.firstChildMorph = nextMorph; }
|
43390
|
+
} else if (parentMorph) {
|
43391
|
+
parentMorph.lastChildMorph = parentMorph.firstChildMorph = null;
|
43392
|
+
}
|
43329
43393
|
}
|
43330
|
-
};
|
43331
43394
|
|
43332
|
-
|
43333
|
-
|
43334
|
-
|
43335
|
-
|
43395
|
+
this.parentMorph = null;
|
43396
|
+
this.firstNode = null;
|
43397
|
+
this.lastNode = null;
|
43398
|
+
|
43399
|
+
if (parentMorph) {
|
43400
|
+
if (!parentMorph.firstChildMorph) {
|
43401
|
+
// list is empty
|
43402
|
+
parentMorph.clear();
|
43336
43403
|
return;
|
43337
43404
|
} else {
|
43338
|
-
|
43405
|
+
syncFirstNode(parentMorph.firstChildMorph);
|
43406
|
+
syncLastNode(parentMorph.lastChildMorph);
|
43339
43407
|
}
|
43340
43408
|
}
|
43341
|
-
var start = this.start, end = this.end;
|
43342
|
-
clear(parent, start, end);
|
43343
|
-
parent.insertBefore(node, end);
|
43344
|
-
if (this.before !== null) {
|
43345
|
-
this.before.end = start.nextSibling;
|
43346
|
-
}
|
43347
|
-
if (this.after !== null) {
|
43348
|
-
this.after.start = end.previousSibling;
|
43349
|
-
}
|
43350
|
-
};
|
43351
43409
|
|
43352
|
-
|
43353
|
-
if (this.text) {
|
43354
|
-
this.text.nodeValue = text;
|
43355
|
-
return;
|
43356
|
-
}
|
43357
|
-
var node = this.domHelper.createTextNode(text);
|
43358
|
-
this.text = node;
|
43359
|
-
clear(parent, this.start, this.end);
|
43360
|
-
parent.insertBefore(node, this.end);
|
43361
|
-
if (this.before !== null) {
|
43362
|
-
this.before.end = node;
|
43363
|
-
}
|
43364
|
-
if (this.after !== null) {
|
43365
|
-
this.after.start = node;
|
43366
|
-
}
|
43410
|
+
clear(parentNode, firstNode, lastNode);
|
43367
43411
|
};
|
43368
43412
|
|
43369
|
-
Morph.prototype.
|
43370
|
-
var
|
43371
|
-
|
43372
|
-
this.text = null;
|
43373
|
-
var childNodes = this.domHelper.parseHTML(html, this.contextualElement);
|
43374
|
-
appendChildren(parent, end, childNodes);
|
43375
|
-
if (this.before !== null) {
|
43376
|
-
this.before.end = start.nextSibling;
|
43377
|
-
}
|
43378
|
-
if (this.after !== null) {
|
43379
|
-
this.after.start = end.previousSibling;
|
43380
|
-
}
|
43413
|
+
Morph.prototype.setHTML = function(text) {
|
43414
|
+
var fragment = this.domHelper.parseHTML(text, this.contextualElement);
|
43415
|
+
return this.setNode(fragment);
|
43381
43416
|
};
|
43382
43417
|
|
43383
|
-
Morph.prototype.
|
43384
|
-
|
43385
|
-
this.morphs = [];
|
43386
|
-
}
|
43387
|
-
var index = this.morphs.length;
|
43388
|
-
return this.insert(index, node);
|
43418
|
+
Morph.prototype.appendContent = function(content) {
|
43419
|
+
return this.insertContentBeforeMorph(content, null);
|
43389
43420
|
};
|
43390
43421
|
|
43391
|
-
Morph.prototype.
|
43392
|
-
|
43393
|
-
|
43394
|
-
|
43395
|
-
|
43396
|
-
|
43397
|
-
var before = index > 0 ? morphs[index-1] : null;
|
43398
|
-
var after = index < morphs.length ? morphs[index] : null;
|
43399
|
-
var start = before === null ? this.start : (before.end === null ? parent.lastChild : before.end.previousSibling);
|
43400
|
-
var end = after === null ? this.end : (after.start === null ? parent.firstChild : after.start.nextSibling);
|
43401
|
-
var morph = new Morph(parent, start, end, this.domHelper, this.contextualElement);
|
43422
|
+
Morph.prototype.insertContentBeforeMorph = function (content, referenceMorph) {
|
43423
|
+
var morph = new Morph(this.domHelper, this.contextualElement);
|
43424
|
+
morph.setContent(content);
|
43425
|
+
this.insertBeforeMorph(morph, referenceMorph);
|
43426
|
+
return morph;
|
43427
|
+
};
|
43402
43428
|
|
43403
|
-
|
43404
|
-
|
43429
|
+
Morph.prototype.appendMorph = function(morph) {
|
43430
|
+
this.insertBeforeMorph(morph, null);
|
43431
|
+
};
|
43405
43432
|
|
43406
|
-
|
43407
|
-
|
43408
|
-
before
|
43409
|
-
before.after = morph;
|
43433
|
+
Morph.prototype.insertBeforeMorph = function(morph, referenceMorph) {
|
43434
|
+
if (referenceMorph && referenceMorph.parentMorph !== this) {
|
43435
|
+
throw new Error('The morph before which the new morph is to be inserted is not a child of this morph.');
|
43410
43436
|
}
|
43411
43437
|
|
43412
|
-
|
43413
|
-
morph.after = after;
|
43414
|
-
after.before = morph;
|
43415
|
-
after.start = end.previousSibling;
|
43416
|
-
}
|
43438
|
+
morph.parentMorph = this;
|
43417
43439
|
|
43418
|
-
this.
|
43419
|
-
return morph;
|
43420
|
-
};
|
43440
|
+
var parentNode = this.firstNode.parentNode;
|
43421
43441
|
|
43422
|
-
|
43423
|
-
|
43424
|
-
|
43425
|
-
|
43426
|
-
|
43427
|
-
|
43428
|
-
var before = index > 0 ? morphs[index-1] : null;
|
43429
|
-
var after = index+removedLength < morphs.length ? morphs[index+removedLength] : null;
|
43430
|
-
var start = before === null ? this.start : (before.end === null ? parent.lastChild : before.end.previousSibling);
|
43431
|
-
var end = after === null ? this.end : (after.start === null ? parent.firstChild : after.start.nextSibling);
|
43432
|
-
var addedLength = addedNodes === undefined ? 0 : addedNodes.length;
|
43433
|
-
var args, i, current;
|
43442
|
+
insertBefore(
|
43443
|
+
parentNode,
|
43444
|
+
morph.firstNode,
|
43445
|
+
morph.lastNode,
|
43446
|
+
referenceMorph ? referenceMorph.firstNode : this.lastNode.nextSibling
|
43447
|
+
);
|
43434
43448
|
|
43435
|
-
|
43436
|
-
|
43449
|
+
// was not in list mode replace current content
|
43450
|
+
if (!this.firstChildMorph) {
|
43451
|
+
clear(parentNode, this.firstNode, this.lastNode);
|
43437
43452
|
}
|
43438
43453
|
|
43439
|
-
|
43440
|
-
|
43441
|
-
|
43442
|
-
|
43443
|
-
|
43444
|
-
|
43445
|
-
after.before = before;
|
43446
|
-
after.start = start;
|
43447
|
-
}
|
43448
|
-
morphs.splice(index, removedLength);
|
43449
|
-
return;
|
43454
|
+
var previousMorph = referenceMorph ? referenceMorph.previousMorph : this.lastChildMorph;
|
43455
|
+
if (previousMorph) {
|
43456
|
+
previousMorph.nextMorph = morph;
|
43457
|
+
morph.previousMorph = previousMorph;
|
43458
|
+
} else {
|
43459
|
+
this.firstChildMorph = morph;
|
43450
43460
|
}
|
43451
43461
|
|
43452
|
-
|
43453
|
-
|
43454
|
-
|
43455
|
-
|
43456
|
-
|
43457
|
-
current.owner = this;
|
43458
|
-
if (before !== null) {
|
43459
|
-
current.before = before;
|
43460
|
-
before.end = start.nextSibling;
|
43461
|
-
before.after = current;
|
43462
|
-
}
|
43463
|
-
before = current;
|
43464
|
-
start = end === null ? parent.lastChild : end.previousSibling;
|
43465
|
-
}
|
43466
|
-
if (after !== null) {
|
43467
|
-
current.after = after;
|
43468
|
-
after.before = current;
|
43469
|
-
after.start = end.previousSibling;
|
43470
|
-
}
|
43462
|
+
if (referenceMorph) {
|
43463
|
+
referenceMorph.previousMorph = morph;
|
43464
|
+
morph.nextMorph = referenceMorph;
|
43465
|
+
} else {
|
43466
|
+
this.lastChildMorph = morph;
|
43471
43467
|
}
|
43472
43468
|
|
43473
|
-
|
43474
|
-
|
43475
|
-
|
43476
|
-
splice.apply(morphs, args);
|
43469
|
+
syncFirstNode(this.firstChildMorph);
|
43470
|
+
syncLastNode(this.lastChildMorph);
|
43477
43471
|
};
|
43478
43472
|
|
43479
|
-
|
43480
|
-
|
43481
|
-
|
43482
|
-
|
43473
|
+
__exports__["default"] = Morph;
|
43474
|
+
});
|
43475
|
+
enifed("morph-range/utils",
|
43476
|
+
["exports"],
|
43477
|
+
function(__exports__) {
|
43478
|
+
"use strict";
|
43479
|
+
// inclusive of both nodes
|
43480
|
+
function clear(parentNode, firstNode, lastNode) {
|
43481
|
+
if (!parentNode) { return; }
|
43483
43482
|
|
43484
|
-
|
43485
|
-
|
43486
|
-
|
43487
|
-
|
43488
|
-
|
43483
|
+
var node = firstNode;
|
43484
|
+
var nextNode;
|
43485
|
+
do {
|
43486
|
+
nextNode = node.nextSibling;
|
43487
|
+
parentNode.removeChild(node);
|
43488
|
+
if (node === lastNode) {
|
43489
|
+
break;
|
43490
|
+
}
|
43491
|
+
node = nextNode;
|
43492
|
+
} while (node);
|
43489
43493
|
}
|
43490
43494
|
|
43491
|
-
function
|
43492
|
-
var
|
43493
|
-
|
43494
|
-
|
43495
|
-
|
43496
|
-
|
43497
|
-
|
43498
|
-
|
43499
|
-
|
43500
|
-
|
43501
|
-
|
43502
|
-
|
43503
|
-
}
|
43495
|
+
__exports__.clear = clear;function insertBefore(parentNode, firstNode, lastNode, _refNode) {
|
43496
|
+
var node = lastNode;
|
43497
|
+
var refNode = _refNode;
|
43498
|
+
var prevNode;
|
43499
|
+
do {
|
43500
|
+
prevNode = node.previousSibling;
|
43501
|
+
parentNode.insertBefore(node, refNode);
|
43502
|
+
if (node === firstNode) {
|
43503
|
+
break;
|
43504
|
+
}
|
43505
|
+
refNode = node;
|
43506
|
+
node = prevNode;
|
43507
|
+
} while (node);
|
43504
43508
|
}
|
43505
43509
|
|
43506
|
-
__exports__
|
43510
|
+
__exports__.insertBefore = insertBefore;
|
43507
43511
|
});
|
43508
43512
|
enifed("route-recognizer",
|
43509
43513
|
["./route-recognizer/dsl","exports"],
|