dist/ember.js in ember-source-1.4.0.beta.2 vs dist/ember.js in ember-source-1.4.0.beta.3
- old
+ new
@@ -3,11 +3,11 @@
* @copyright Copyright 2011-2014 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.4.0-beta.2
+ * @version 1.4.0-beta.3
*/
(function() {
/*global __fail__*/
@@ -196,11 +196,11 @@
* @copyright Copyright 2011-2014 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.4.0-beta.2
+ * @version 1.4.0-beta.3
*/
(function() {
var define, requireModule, require, requirejs;
@@ -279,11 +279,11 @@
The core Runtime framework is based on the jQuery API with a number of
performance optimizations.
@class Ember
@static
- @version 1.4.0-beta.2
+ @version 1.4.0-beta.3
*/
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.
@@ -306,14 +306,14 @@
/**
@property VERSION
@type String
- @default '1.4.0-beta.2'
+ @default '1.4.0-beta.3'
@static
*/
-Ember.VERSION = '1.4.0-beta.2';
+Ember.VERSION = '1.4.0-beta.3';
/**
Standard environmental variables. You can define these in a global `EmberENV`
variable before loading Ember to control various configuration settings.
@@ -13936,17 +13936,17 @@
## Writing Your Own Enumerable
To make your own custom class enumerable, you need two items:
1. You must have a length property. This property should change whenever
- the number of items in your enumerable object changes. If you using this
+ the number of items in your enumerable object changes. If you use this
with an `Ember.Object` subclass, you should be sure to change the length
property using `set().`
2. You must implement `nextObject().` See documentation.
- Once you have these two methods implement, apply the `Ember.Enumerable` mixin
+ Once you have these two methods implemented, apply the `Ember.Enumerable` mixin
to your class and you will be able to enumerate the contents of your object
like any other collection.
## Using Ember Enumeration with Other Libraries
@@ -18517,10 +18517,39 @@
delete props[hashName];
}
},
+ /**
+ Triggers a named action on the `ActionHandler`. Any parameters
+ supplied after the `actionName` string will be passed as arguments
+ to the action target function.
+
+ If the `ActionHandler` has its `target` property set, actions may
+ bubble to the `target`. Bubbling happens when an `actionName` can
+ not be found in the `ActionHandler`'s `actions` hash or if the
+ action target function returns `true`.
+
+ Example
+
+ ```js
+ App.WelcomeRoute = Ember.Route.extend({
+ actions: {
+ playTheme: function() {
+ this.send('playMusic', 'theme.mp3');
+ },
+ playMusic: function(track) {
+ // ...
+ }
+ }
+ });
+ ```
+
+ @method send
+ @param {String} actionName The action to trigger
+ @param {*} context a context to send with the action
+ */
send: function(actionName) {
var args = [].slice.call(arguments, 1), target;
if (this._actions && this._actions[actionName]) {
if (this._actions[actionName].apply(this, args) === true) {
@@ -21190,11 +21219,11 @@
var jQuery = (this && this.jQuery) || (Ember.imports && Ember.imports.jQuery);
if (!jQuery && typeof require === 'function') {
jQuery = require('jquery');
}
-Ember.assert("Ember Views require jQuery 1.7, 1.8, 1.9, 1.10, or 2.0", jQuery && (jQuery().jquery.match(/^((1\.(7|8|9|10))|2.0)(\.\d+)?(pre|rc\d?)?/) || Ember.ENV.FORCE_JQUERY));
+Ember.assert("Ember Views require jQuery between 1.7 and 2.1", jQuery && (jQuery().jquery.match(/^((1\.(7|8|9|10|11))|(2\.(0|1)))(\.\d+)?(pre|rc\d?)?/) || Ember.ENV.FORCE_JQUERY));
/**
Alias for jQuery
@method $
@@ -35308,9 +35337,55 @@
@method enter
*/
enter: function() {
this.activate();
},
+
+ /**
+ The name of the view to use by default when rendering this routes template.
+
+ When rendering a template, the route will, by default, determine the
+ template and view to use from the name of the route itself. If you need to
+ define a specific view, set this property.
+
+ This is useful when multiple routes would benefit from using the same view
+ because it doesn't require a custom `renderTemplate` method. For example,
+ the following routes will all render using the `App.PostsListView` view:
+
+ ```js
+ var PostsList = Ember.Route.extend({
+ viewName: 'postsList',
+ });
+
+ App.PostsIndexRoute = PostsList.extend();
+ App.PostsArchivedRoute = PostsList.extend();
+ ```
+
+ @property viewName
+ @type String
+ @default null
+ */
+ viewName: null,
+
+ /**
+ The name of the controller to associate with this route.
+
+ By default, Ember will lookup a route's controller that matches the name
+ of the route (i.e. `App.PostController` for `App.PostRoute`). However,
+ if you would to like define a specific controller to use, you can do so
+ using this property.
+
+ This is useful in many ways, as the controller specified will be:
+
+ * passed to the `setupController` method.
+ * used as the controller for the view being rendered by the route.
+ * returned from a call to `controllerFor` for the route.
+
+ @property controllerName
+ @type String
+ @default null
+ */
+ controllerName: null,
/**
The collection of functions, keyed by name, available on this route as
action targets.