dist/ember.js in ember-source-1.11.0.beta.3 vs dist/ember.js in ember-source-1.11.0.beta.4

- old
+ new

@@ -3,11 +3,11 @@ * @copyright Copyright 2011-2015 Tilde Inc. and contributors * Portions Copyright 2006-2011 Strobe Inc. * Portions Copyright 2008-2011 Apple Inc. All rights reserved. * @license Licensed under MIT license * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 1.11.0-beta.3.780ac356 + * @version 1.11.0-beta.4.a4140e29 */ (function() { var enifed, requireModule, eriuqer, requirejs, Ember; var mainContext = this; @@ -3918,11 +3918,11 @@ // Start off the number of deferrals at 1. This will be // decremented by the Application's own `initialize` method. this._readinessDeferrals = 1; - this.Router = Router['default'].extend(); + this.Router = (this.Router || Router['default']).extend(); this.waitForDOMReady(this.buildDefaultInstance()); }, /** @@ -6107,11 +6107,11 @@ for (var i = 1; i < arguments.length; i++) { dependentKeys.push(arguments[i]); } function helperFunc(params, hash, options, env) { - var view = this; + var view = env.data.view; var numParams = params.length; var param; Ember['default'].assert("registerBoundHelper-generated helpers do not support use with Handlebars blocks.", !options.template); @@ -6395,11 +6395,11 @@ function bindAttrHelper(params, hash, options, env) { var element = options.element; Ember['default'].assert("You must specify at least one hash argument to bind-attr", !!keys['default'](hash).length); - var view = this; + var view = env.data.view; // Handle classes differently, as we can bind multiple classes var classNameBindings = hash['class']; if (classNameBindings !== null && classNameBindings !== undefined) { if (!utils.isStream(classNameBindings)) { @@ -6577,11 +6577,11 @@ } else if (hash.emptyViewClass) { emptyViewClass = utils.readViewFactory(hash.emptyViewClass, container); } if (emptyViewClass) { hash.emptyView = emptyViewClass; } - var viewOptions = mergeViewBindings['default'](this, {}, itemHash); + var viewOptions = mergeViewBindings['default'](view, {}, itemHash); if (hash.itemClassBinding) { var itemClassBindings = hash.itemClassBinding.split(' '); viewOptions.classNameBindings = enumerable_utils.map(itemClassBindings, function(classBinding) { return class_name_binding.streamifyClassNameBinding(view, classBinding); @@ -6611,12 +6611,13 @@ Ember['default'].assert( "The `component` helper expects exactly one argument, plus name/property values.", params.length === 1 ); + var view = env.data.view; var componentNameParam = params[0]; - var container = this.container || utils.read(this._keywords.view).container; + var container = view.container || utils.read(view._keywords.view).container; var props = { helperName: options.helperName || 'component' }; if (options.template) { @@ -6631,14 +6632,14 @@ } else { viewClass = streams__utils.readComponentFactory(componentNameParam, container); if (!viewClass) { throw new EmberError['default']('HTMLBars error: Could not find component named "' + componentNameParam + '".'); } - mergeViewBindings['default'](this, props, hash); + mergeViewBindings['default'](view, props, hash); } - appendTemplatedView['default'](this, options.morph, viewClass, props); + appendTemplatedView['default'](view, options.morph, viewClass, props); } }); enifed('ember-htmlbars/helpers/debugger', ['exports', 'ember-metal/logger'], function (exports, Logger) { @@ -6650,14 +6651,14 @@ /** @module ember @submodule ember-htmlbars */ - function debuggerHelper() { + function debuggerHelper(params, hash, options, env) { /* jshint unused: false */ - var view = this; + var view = env.data.view; /* jshint unused: false */ var context = view.get('context'); /* jshint unused: false */ @@ -6680,12 +6681,13 @@ /** @module ember @submodule ember-htmlbars */ function eachHelper(params, hash, options, env) { + var view = env.data.view; var helperName = 'each'; - var path = params[0] || this.getStream(''); + var path = params[0] || view.getStream(''); Ember['default'].assert( "If you pass more than one argument to the each helper, " + "it must be in the form #each foo in bar", params.length <= 1 @@ -6726,31 +6728,33 @@ @submodule ember-htmlbars */ function ifHelper(params, hash, options, env) { var helperName = options.helperName || 'if'; - return appendConditional(this, false, helperName, params, hash, options, env); + return appendConditional(false, helperName, params, hash, options, env); } /** @method unless @for Ember.Handlebars.helpers */ function unlessHelper(params, hash, options, env) { var helperName = options.helperName || 'unless'; - return appendConditional(this, true, helperName, params, hash, options, env); + return appendConditional(true, helperName, params, hash, options, env); } function assertInlineIfNotEnabled() { Ember['default'].assert( "To use the inline forms of the `if` and `unless` helpers you must " + "enable the `ember-htmlbars-inline-if-helper` feature flag." ); } - function appendConditional(view, inverted, helperName, params, hash, options, env) { + function appendConditional(inverted, helperName, params, hash, options, env) { + var view = env.data.view; + if (options.isBlock) { return appendBlockConditional(view, inverted, helperName, params, hash, options, env); } else { return appendInlineConditional(view, inverted, helperName, params, hash, options, env); @@ -6845,11 +6849,11 @@ } } return true; })()); - return string.loc.apply(this, params); + return string.loc.apply(env.data.view, params); } }); enifed('ember-htmlbars/helpers/log', ['exports', 'ember-metal/logger', 'ember-metal/streams/utils'], function (exports, Logger, utils) { @@ -6878,22 +6882,23 @@ 'use strict'; exports.partialHelper = partialHelper; function partialHelper(params, hash, options, env) { + var view = env.data.view; var templateName = params[0]; if (utils.isStream(templateName)) { - this.appendChild(BoundPartialView['default'], { + view.appendChild(BoundPartialView['default'], { _morph: options.morph, - _context: property_get.get(this, 'context'), + _context: property_get.get(view, 'context'), templateNameStream: templateName, helperName: options.helperName || 'partial' }); } else { - var template = lookupPartial['default'](this, templateName); - return template.render(this, env, options.morph.contextualElement); + var template = lookupPartial['default'](view, templateName); + return template.render(view, env, options.morph.contextualElement); } } }); enifed('ember-htmlbars/helpers/template', ['exports', 'ember-metal/core'], function (exports, Ember) { @@ -6946,18 +6951,19 @@ if (params.length === 1) { return utils.read(params[0]); } else { options.helperName = options.helperName || 'unbound'; + var view = env.data.view; var helperName = params[0]._label; - var helper = lookupHelper['default'](helperName, this, env); + var helper = lookupHelper['default'](helperName, view, env); if (!helper) { throw new EmberError['default']('HTMLBars error: Could not find component or helper named ' + helperName + '.'); } - return helper.helperFunction.call(this, readParams(params), readHash(hash, this), options, env); + return helper.helperFunction.call(this, readParams(params), readHash(hash, view), options, env); } } function readParams(params) { var l = params.length; @@ -7005,11 +7011,12 @@ Ember['default'].assert( "The `view` helper expects zero or one arguments.", params.length <= 2 ); - var container = this.container || utils.read(this._keywords.view).container; + var view = env.data.view; + var container = view.container || utils.read(view._keywords.view).container; var viewClassOrInstance; if (params.length === 0) { if (container) { viewClassOrInstance = container.lookupFactory('view:toplevel'); } else { @@ -7025,12 +7032,12 @@ if (options.template) { props.template = options.template; } - mergeViewBindings['default'](this, props, hash); - appendTemplatedView['default'](this, options.morph, viewClassOrInstance, props); + mergeViewBindings['default'](view, props, hash); + appendTemplatedView['default'](view, options.morph, viewClassOrInstance, props); } }); enifed('ember-htmlbars/helpers/with', ['exports', 'ember-metal/core', 'ember-views/views/with_view'], function (exports, Ember, WithView) { @@ -7053,10 +7060,11 @@ Ember['default'].assert( "The {{#with}} helper must be called with a block", !!options.template ); + var view = env.data.view; var preserveContext; if (options.template.blockParams) { preserveContext = true; } else { @@ -7067,15 +7075,15 @@ { url: 'http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope' } ); preserveContext = false; } - this.appendChild(WithView['default'], { + view.appendChild(WithView['default'], { _morph: options.morph, withValue: params[0], preserveContext: preserveContext, - previousContext: this.get('context'), + previousContext: view.get('context'), controllerName: hash.controller, mainTemplate: options.template, inverseTemplate: options.inverse, helperName: options.helperName || 'with' }); @@ -7092,24 +7100,25 @@ @module ember @submodule ember-htmlbars */ function yieldHelper(params, hash, options, env) { - var view = this; + var view = env.data.view; + var layoutView = view; // Yea gods - while (view && !property_get.get(view, 'layout')) { - if (view._contextView) { - view = view._contextView; + while (layoutView && !property_get.get(layoutView, 'layout')) { + if (layoutView._contextView) { + layoutView = layoutView._contextView; } else { - view = view._parentView; + layoutView = layoutView._parentView; } } - Ember['default'].assert("You called yield in a template that was not a layout", !!view); + Ember['default'].assert("You called yield in a template that was not a layout", !!layoutView); - return view._yield(this, env, options.morph, params); + return layoutView._yield(view, env, options.morph, params); } }); enifed('ember-htmlbars/hooks/attribute', ['exports', 'ember-views/attr_nodes/attr_node', 'ember-metal/error', 'ember-metal/streams/utils', 'ember-views/system/sanitize_attribute_value'], function (exports, AttrNode, EmberError, utils, sanitizeAttributeValue) { @@ -7161,11 +7170,11 @@ morph: morph, template: template, inverse: inverse, isBlock: true }; - var result = helper.helperFunction.call(view, params, hash, options, env); + var result = helper.helperFunction.call(undefined, params, hash, options, env); if (utils.isStream(result)) { simple_bound_view.appendSimpleBoundView(view, morph, result); } else { morph.setContent(result); @@ -7186,11 +7195,11 @@ function component(env, morph, view, tagName, attrs, template) { var helper = lookupHelper['default'](tagName, view, env); Ember['default'].assert('You specified `' + tagName + '` in your template, but a component for `' + tagName + '` could not be found.', !!helper); - return helper.helperFunction.call(view, [], attrs, { morph: morph, template: template }, env); + return helper.helperFunction.call(undefined, [], attrs, { morph: morph, template: template }, env); } exports['default'] = component; }); enifed('ember-htmlbars/hooks/concat', ['exports', 'ember-metal/streams/utils'], function (exports, utils) { @@ -7224,11 +7233,11 @@ if (helper) { var options = { morph: morph, isInline: true }; - result = helper.helperFunction.call(view, [], {}, options, env); + result = helper.helperFunction.call(undefined, [], {}, options, env); } else { result = view.getStream(path); } if (utils.isStream(result)) { @@ -7255,11 +7264,11 @@ if (helper) { var options = { element: domElement }; - valueOrLazyValue = helper.helperFunction.call(view, params, hash, options, env); + valueOrLazyValue = helper.helperFunction.call(undefined, params, hash, options, env); } else { valueOrLazyValue = view.getStream(path); } var value = utils.read(valueOrLazyValue); @@ -7308,11 +7317,11 @@ function inline(env, morph, view, path, params, hash) { var helper = lookupHelper['default'](path, view, env); Ember.assert("A helper named '"+path+"' could not be found", helper); - var result = helper.helperFunction.call(view, params, hash, { morph: morph }, env); + var result = helper.helperFunction.call(undefined, params, hash, { morph: morph }, env); if (utils.isStream(result)) { simple_bound_view.appendSimpleBoundView(view, morph, result); } else { morph.setContent(result); @@ -7351,11 +7360,11 @@ Ember.assert("A helper named '"+path+"' could not be found", helper); var options = { isInline: true }; - return helper.helperFunction.call(view, params, hash, options, env); + return helper.helperFunction.call(undefined, params, hash, options, env); } exports['default'] = subexpr; }); enifed('ember-htmlbars/system/append-templated-view', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-views/views/view'], function (exports, Ember, property_get, View) { @@ -7596,11 +7605,11 @@ @submodule ember-htmlbars */ function makeBoundHelper(fn) { function helperFunc(params, hash, options, env) { - var view = this; + var view = env.data.view; var numParams = params.length; var param, prop; Ember['default'].assert("makeBoundHelper generated helpers do not support use with blocks", !options.template); @@ -7760,12 +7769,12 @@ exports['default'] = renderView; function renderHTMLBarsTemplate(view, buffer, template) { Ember['default'].assert( 'The template being rendered by `' + view + '` was compiled with `' + template.revision + - '` which does not match `Ember@1.11.0-beta.3.780ac356` (this revision).', - template.revision === 'Ember@1.11.0-beta.3.780ac356' + '` which does not match `Ember@1.11.0-beta.4.a4140e29` (this revision).', + template.revision === 'Ember@1.11.0-beta.4.a4140e29' ); var contextualElement = buffer.innerContextualElement(); var args = view._blockArguments; var env = { @@ -7801,11 +7810,11 @@ 'use strict'; exports['default'] = template['default']((function() { return { isHTMLBars: true, - revision: "Ember@1.11.0-beta.3.780ac356", + revision: "Ember@1.11.0-beta.4.a4140e29", blockParams: 0, cachedFragment: null, hasRendered: false, build: function build(dom) { var el0 = dom.createDocumentFragment(); @@ -7848,11 +7857,11 @@ 'use strict'; exports['default'] = template['default']((function() { return { isHTMLBars: true, - revision: "Ember@1.11.0-beta.3.780ac356", + revision: "Ember@1.11.0-beta.4.a4140e29", blockParams: 0, cachedFragment: null, hasRendered: false, build: function build(dom) { var el0 = dom.createDocumentFragment(); @@ -7881,19 +7890,113 @@ } }; }())); }); +enifed('ember-htmlbars/templates/link-to-escaped', ['exports', 'ember-template-compiler/system/template'], function (exports, template) { + + 'use strict'; + + exports['default'] = template['default']((function() { + return { + isHTMLBars: true, + revision: "Ember@1.11.0-beta.4.a4140e29", + blockParams: 0, + cachedFragment: null, + hasRendered: false, + build: function build(dom) { + var el0 = dom.createDocumentFragment(); + var el1 = dom.createComment(""); + dom.appendChild(el0, el1); + return el0; + }, + render: function render(context, env, contextualElement) { + var dom = env.dom; + var hooks = env.hooks, content = hooks.content; + dom.detectNamespace(contextualElement); + var fragment; + if (env.useFragmentCache && dom.canClone) { + if (this.cachedFragment === null) { + fragment = this.build(dom); + if (this.hasRendered) { + this.cachedFragment = fragment; + } else { + this.hasRendered = true; + } + } + if (this.cachedFragment) { + fragment = dom.cloneNode(this.cachedFragment, true); + } + } else { + fragment = this.build(dom); + } + var morph0 = dom.createMorphAt(fragment,0,0,contextualElement); + dom.insertBoundary(fragment, null); + dom.insertBoundary(fragment, 0); + content(env, morph0, context, "linkTitle"); + return fragment; + } + }; + }())); + +}); +enifed('ember-htmlbars/templates/link-to-unescaped', ['exports', 'ember-template-compiler/system/template'], function (exports, template) { + + 'use strict'; + + exports['default'] = template['default']((function() { + return { + isHTMLBars: true, + revision: "Ember@1.11.0-beta.4.a4140e29", + blockParams: 0, + cachedFragment: null, + hasRendered: false, + build: function build(dom) { + var el0 = dom.createDocumentFragment(); + var el1 = dom.createComment(""); + dom.appendChild(el0, el1); + return el0; + }, + render: function render(context, env, contextualElement) { + var dom = env.dom; + var hooks = env.hooks, content = hooks.content; + dom.detectNamespace(contextualElement); + var fragment; + if (env.useFragmentCache && dom.canClone) { + if (this.cachedFragment === null) { + fragment = this.build(dom); + if (this.hasRendered) { + this.cachedFragment = fragment; + } else { + this.hasRendered = true; + } + } + if (this.cachedFragment) { + fragment = dom.cloneNode(this.cachedFragment, true); + } + } else { + fragment = this.build(dom); + } + var morph0 = dom.createUnsafeMorphAt(fragment,0,0,contextualElement); + dom.insertBoundary(fragment, null); + dom.insertBoundary(fragment, 0); + content(env, morph0, context, "linkTitle"); + return fragment; + } + }; + }())); + +}); enifed('ember-htmlbars/templates/select', ['exports', 'ember-template-compiler/system/template'], function (exports, template) { 'use strict'; exports['default'] = template['default']((function() { var child0 = (function() { return { isHTMLBars: true, - revision: "Ember@1.11.0-beta.3.780ac356", + revision: "Ember@1.11.0-beta.4.a4140e29", blockParams: 0, cachedFragment: null, hasRendered: false, build: function build(dom) { var el0 = dom.createDocumentFragment(); @@ -7932,11 +8035,11 @@ }()); var child1 = (function() { var child0 = (function() { return { isHTMLBars: true, - revision: "Ember@1.11.0-beta.3.780ac356", + revision: "Ember@1.11.0-beta.4.a4140e29", blockParams: 0, cachedFragment: null, hasRendered: false, build: function build(dom) { var el0 = dom.createDocumentFragment(); @@ -7972,11 +8075,11 @@ } }; }()); return { isHTMLBars: true, - revision: "Ember@1.11.0-beta.3.780ac356", + revision: "Ember@1.11.0-beta.4.a4140e29", blockParams: 0, cachedFragment: null, hasRendered: false, build: function build(dom) { var el0 = dom.createDocumentFragment(); @@ -8014,11 +8117,11 @@ }()); var child2 = (function() { var child0 = (function() { return { isHTMLBars: true, - revision: "Ember@1.11.0-beta.3.780ac356", + revision: "Ember@1.11.0-beta.4.a4140e29", blockParams: 0, cachedFragment: null, hasRendered: false, build: function build(dom) { var el0 = dom.createDocumentFragment(); @@ -8054,11 +8157,11 @@ } }; }()); return { isHTMLBars: true, - revision: "Ember@1.11.0-beta.3.780ac356", + revision: "Ember@1.11.0-beta.4.a4140e29", blockParams: 0, cachedFragment: null, hasRendered: false, build: function build(dom) { var el0 = dom.createDocumentFragment(); @@ -8094,11 +8197,11 @@ } }; }()); return { isHTMLBars: true, - revision: "Ember@1.11.0-beta.3.780ac356", + revision: "Ember@1.11.0-beta.4.a4140e29", blockParams: 0, cachedFragment: null, hasRendered: false, build: function build(dom) { var el0 = dom.createDocumentFragment(); @@ -11241,11 +11344,11 @@ The core Runtime framework is based on the jQuery API with a number of performance optimizations. @class Ember @static - @version 1.11.0-beta.3.780ac356 + @version 1.11.0-beta.4.a4140e29 */ if ('undefined' === typeof Ember) { // Create core object. Make it act like an instance of Ember.Namespace so that // objects assigned to it are given a sane string representation. @@ -11269,14 +11372,14 @@ /** @property VERSION @type String - @default '1.11.0-beta.3.780ac356' + @default '1.11.0-beta.4.a4140e29' @static */ - Ember.VERSION = '1.11.0-beta.3.780ac356'; + Ember.VERSION = '1.11.0-beta.4.a4140e29'; /** Standard environmental variables. You can define these in a global `EmberENV` variable before loading Ember to control various configuration settings. @@ -18453,27 +18556,27 @@ @param {String} actionName @param {Object} [context]* @param {Hash} options */ function actionHelper(params, hash, options, env) { - + var view = env.data.view; var target; if (!hash.target) { - target = this.getStream('controller'); + target = view.getStream('controller'); } else if (ember_metal__streams__utils.isStream(hash.target)) { target = hash.target; } else { - target = this.getStream(hash.target); + target = view.getStream(hash.target); } // Ember.assert("You specified a quoteless path to the {{action}} helper which did not resolve to an action name (a string). Perhaps you meant to use a quoted actionName? (e.g. {{action 'save'}}).", !params[0].isStream); // Ember.deprecate("You specified a quoteless path to the {{action}} helper which did not resolve to an action name (a string). Perhaps you meant to use a quoted actionName? (e.g. {{action 'save'}}).", params[0].isStream); var actionOptions = { eventName: hash.on || "click", parameters: params.slice(1), - view: this, + view: view, bubbles: hash.bubbles, preventDefault: hash.preventDefault, target: target, withKeyCode: hash.withKeyCode }; @@ -18483,11 +18586,11 @@ } exports.ActionHelper = ActionHelper; }); -enifed('ember-routing-htmlbars/helpers/link-to', ['exports', 'ember-metal/core', 'ember-routing-views/views/link', 'ember-metal/streams/utils', 'ember-runtime/mixins/controller', 'ember-htmlbars'], function (exports, Ember, link, utils, ControllerMixin) { +enifed('ember-routing-htmlbars/helpers/link-to', ['exports', 'ember-metal/core', 'ember-routing-views/views/link', 'ember-metal/streams/utils', 'ember-runtime/mixins/controller', 'ember-htmlbars/templates/link-to-escaped', 'ember-htmlbars/templates/link-to-unescaped', 'ember-htmlbars'], function (exports, Ember, link, utils, ControllerMixin, inlineEscapedLinkTo, inlineUnescapedLinkTo) { 'use strict'; exports.deprecatedLinkToHelper = deprecatedLinkToHelper; exports.linkToHelper = linkToHelper; @@ -18515,26 +18618,17 @@ if (!options.template) { var linkTitle = params.shift(); var parseTextAsHTML = options.morph.parseTextAsHTML; - if (utils.isStream(linkTitle)) { - hash.linkTitle = { stream: linkTitle }; + if (parseTextAsHTML) { + hash.layout = inlineUnescapedLinkTo['default']; + } else { + hash.layout = inlineEscapedLinkTo['default']; } - options.template = { - isHTMLBars: true, - revision: 'Ember@1.11.0-beta.3.780ac356', - render: function(view, env) { - var value = utils.read(linkTitle) || ""; - if (parseTextAsHTML) { - return value; - } else { - return env.dom.createTextNode(value); - } - } - }; + hash.linkTitle = linkTitle; } for (var i = 0; i < params.length; i++) { if (utils.isStream(params[i])) { var lazyValue = params[i]; @@ -18586,10 +18680,11 @@ function outletHelper(params, hash, options, env) { var viewName; var viewClass; var viewFullName; + var view = env.data.view; Ember['default'].assert( "Using {{outlet}} with an unquoted name is not supported.", params.length === 0 || typeof params[0] === 'string' ); @@ -18607,15 +18702,15 @@ " Please update to quoted usage '{{outlet ... view=\"" + viewName + "\"}}.", typeof hash.view === 'string' ); Ember['default'].assert( "The view name you supplied '" + viewName + "' did not resolve to a view.", - this.container._registry.has(viewFullName) + view.container._registry.has(viewFullName) ); } - viewClass = viewName ? this.container.lookupFactory(viewFullName) : hash.viewClass || this.container.lookupFactory('view:-outlet'); + viewClass = viewName ? view.container.lookupFactory(viewFullName) : hash.viewClass || view.container.lookupFactory('view:-outlet'); hash._outletName = property; options.helperName = options.helperName || 'outlet'; return env.helpers.view.helperFunction.call(this, [viewClass], hash, options, env); } @@ -18650,16 +18745,17 @@ @module ember @submodule ember-routing-htmlbars */ function renderHelper(params, hash, options, env) { + var currentView = env.data.view; var container, router, controller, view, initialContext; var name = params[0]; var context = params[1]; - container = this._keywords.controller.value().container; + container = currentView._keywords.controller.value().container; router = container.lookup('router:main'); Ember['default'].assert( "The first argument of {{render}} must be quoted, e.g. {{render \"sidebar\"}}.", typeof name === 'string' @@ -18709,11 +18805,11 @@ } else { controllerName = name; controllerFullName = 'controller:' + controllerName; } - var parentController = this._keywords.controller.value(); + var parentController = currentView._keywords.controller.value(); // choose name if (params.length > 1) { var factory = container.lookupFactory(controllerFullName) || generate_controller.generateControllerFactory(container, controllerName, initialContext); @@ -18755,12 +18851,12 @@ template: template, controller: controller, helperName: 'render "' + name + '"' }; - mergeViewBindings['default'](this, props, hash); - appendTemplatedView['default'](this, options.morph, view, props); + mergeViewBindings['default'](currentView, props, hash); + appendTemplatedView['default'](currentView, options.morph, view, props); } }); enifed('ember-routing-views', ['exports', 'ember-metal/core', 'ember-routing-views/views/link', 'ember-routing-views/views/outlet'], function (exports, Ember, link, outlet) { @@ -19009,18 +19105,12 @@ @since 1.3.0 **/ _setupPathObservers: function() { var params = this.params; - var scheduledRerender = this._wrapAsScheduled(this.rerender); var scheduledParamsChanged = this._wrapAsScheduled(this._paramsChanged); - if (this.linkTitle) { - var linkTitle = this.linkTitle.stream || this.linkTitle; - streams__utils.subscribe(linkTitle, scheduledRerender, this); - } - for (var i = 0; i < params.length; i++) { streams__utils.subscribe(params[i], scheduledParamsChanged, this); } var queryParamsObject = this.queryParamsObject; @@ -20875,12 +20965,19 @@ if (arguments.length === 1) { options = {}; } var type = options.resetNamespace === true ? 'resource' : 'route'; - Ember['default'].assert("'" + name + "' cannot be used as a " + type + " name.", name !== 'array' && name !== 'basic' && name !== 'object'); + Ember['default'].assert( + "'" + name + "' cannot be used as a " + type + " name.", + (function() { + if (options.overrideNameAssertion === true) { return true; } + return ['array', 'basic', 'object', 'application'].indexOf(name) === -1; + })() + ); + if (this.enableLoadingSubstates) { createRoute(this, name + '_loading', { resetNamespace: options.resetNamespace }); createRoute(this, name + '_error', { path: "/_unused_dummy_error_path_route_" + name + "/:error" }); } @@ -23099,11 +23196,11 @@ var dsl = new EmberRouterDSL['default'](null, { enableLoadingSubstates: !!moduleBasedResolver }); function generateDSL() { - this.resource('application', { path: "/" }, function() { + this.resource('application', { path: "/", overrideNameAssertion: true }, function() { for (var i=0; i < dslCallbacks.length; i++) { dslCallbacks[i].call(this); } }); } @@ -34408,11 +34505,11 @@ exports['default'] = function() { var disableComponentGeneration = true; return { - revision: 'Ember@1.11.0-beta.3.780ac356', + revision: 'Ember@1.11.0-beta.4.a4140e29', disableComponentGeneration: disableComponentGeneration, plugins: plugins['default'] }; @@ -35769,10 +35866,11 @@ this.attrName = attrName; this.attrValue = simpleAttrValue; this.isDirty = true; this.isDestroying = false; this.lastValue = null; + this.hasRenderedInitially = false; utils.subscribe(this.attrValue, this.rerender, this); }; AttrNode.prototype.renderIfDirty = function renderIfDirty() { @@ -35796,17 +35894,19 @@ if (this.attrName === 'value' && (value === null || value === undefined)) { value = ''; } // If user is typing in a value we don't want to rerender and loose cursor position. - if (this.attrName === 'value' && this._morph.element.value === value) { + if (this.hasRenderedInitially && this.attrName === 'value' && this._morph.element.value === value) { + this.lastValue = value; return; } if (this.lastValue !== null || value !== null) { this._morph.setContent(value); this.lastValue = value; + this.hasRenderedInitially = true; } }; AttrNode.prototype.rerender = function render() { this.isDirty = true; @@ -40183,11 +40283,11 @@ var defaultTemplate = htmlbarsTemplate['default']; var selectOptionDefaultTemplate = { isHTMLBars: true, - revision: 'Ember@1.11.0-beta.3.780ac356', + revision: 'Ember@1.11.0-beta.4.a4140e29', render: function(context, env, contextualElement) { var lazyValue = context.getStream('view.label'); lazyValue.subscribe(context._wrapAsScheduled(function() { run['default'].scheduleOnce('render', context, 'rerender'); @@ -42270,9 +42370,10 @@ @method $ @param {String} [selector] a jQuery-compatible selector string @return {jQuery} the jQuery object for the DOM node */ $: function(sel) { + Ember['default'].assert('You cannot access this.$() on a component with `tagName: \'\'` specified.', this.tagName !== ''); return this.currentState.$(this, sel); }, forEachChildView: function(callback) { var childViews = this._childViews; \ No newline at end of file