language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | emberjs | ember.js | 2f5adaa7a2ed502932e33dc441d613098c6af79a.json | Render values with val. Fixes #1828
In jQuery 1.9, setting the value of an input with
`attr(` is no longer supported. Here we explode
`applyAttributeBindings` to handle value properties
with `val(` instead. of `attr(`. This required adding
an duck of value handling in jQuery to `RenderBuffer` | packages/ember-views/tests/system/render_buffer_test.js | @@ -48,6 +48,20 @@ test("prevents XSS injection via `attr`", function() {
equal(el.childNodes.length, 0, 'should not have children');
});
+test("prevents XSS injection via `val`", function() {
+ var buffer = new Ember.RenderBuffer('input');
+
+ buffer.val('trololol" onmouseover="pwn()');
+ buffer.pushOpeningTa... | true |
Other | emberjs | ember.js | f3789b7acdd9c025c33b0519304036ebc11769ef.json | Add intersection to enumerable utils | packages/ember-metal/lib/array.js | @@ -1,4 +1,5 @@
/*jshint newcap:false*/
+require('ember-metal/enumerable_utils');
/**
@module ember-metal
@@ -77,46 +78,6 @@ Ember.ArrayPolyfills = {
indexOf: arrayIndexOf
};
-var utils = Ember.EnumerableUtils = {
- map: function(obj, callback, thisArg) {
- return obj.map ? obj.map.call(obj, callback, th... | true |
Other | emberjs | ember.js | f3789b7acdd9c025c33b0519304036ebc11769ef.json | Add intersection to enumerable utils | packages/ember-metal/lib/enumerable_utils.js | @@ -0,0 +1,50 @@
+var utils = Ember.EnumerableUtils = {
+ map: function(obj, callback, thisArg) {
+ return obj.map ? obj.map.call(obj, callback, thisArg) : Array.prototype.map.call(obj, callback, thisArg);
+ },
+
+ forEach: function(obj, callback, thisArg) {
+ return obj.forEach ? obj.forEach.call(obj, callbac... | true |
Other | emberjs | ember.js | f3789b7acdd9c025c33b0519304036ebc11769ef.json | Add intersection to enumerable utils | packages/ember-metal/tests/enumerable_utils_test.js | @@ -0,0 +1,9 @@
+module('Ember.EnumerableUtils.intersection');
+
+test('returns an array of objects that appear in both enumerables', function() {
+ var a = [1,2,3], b = [2,3,4], result;
+
+ result = Ember.EnumerableUtils.intersection(a, b);
+
+ deepEqual(result, [2,3]);
+}); | true |
Other | emberjs | ember.js | 14d3f7920141600030c60d921c84f5385a28148b.json | Fix issue with Metamorph replace
Scenario: Two nested {{if}}. Outer true, inner false.
Step 1: Set inner to true.
Step 2: Set outer to false in same runloop.
Result: Children of the inner conditional are created without being
destroyed.
Expected: Children should not be created at all. | packages/ember-handlebars/lib/views/metamorph_view.js | @@ -36,7 +36,7 @@ var DOMManager = {
view.transitionTo('preRender');
Ember.run.schedule('render', this, function() {
- if (get(view, 'isDestroyed')) { return; }
+ if (view.isDestroying) { return; }
view.clearRenderedChildren();
var buffer = view.renderToBuffer(); | true |
Other | emberjs | ember.js | 14d3f7920141600030c60d921c84f5385a28148b.json | Fix issue with Metamorph replace
Scenario: Two nested {{if}}. Outer true, inner false.
Step 1: Set inner to true.
Step 2: Set outer to false in same runloop.
Result: Children of the inner conditional are created without being
destroyed.
Expected: Children should not be created at all. | packages/ember-handlebars/tests/handlebars_test.js | @@ -664,6 +664,32 @@ test("should update the block when object passed to #if helper changes and an in
});
});
+test("edge case: child conditional should not render children if parent conditional becomes false", function() {
+ var childCreated = false;
+
+ view = Ember.View.create({
+ cond1: true,
+ cond2:... | true |
Other | emberjs | ember.js | 01e7f281a01f11c775f73072db55cf472df14391.json | Update documentation for logging transitions | lib/ember.js | @@ -24263,9 +24263,7 @@ var get = Ember.get, set = Ember.set,
```javascript
window.App = Ember.Application.create({
- ready: function() {
- this.set('router.enableLogging', true);
- }
+ LOG_TRANSITIONS: true
});
To begin routing, you must have at a minimum a top-level controller and view. | false |
Other | emberjs | ember.js | 42290bd66c38ce78122b66789eb3c898cd532dc8.json | Remove typos in code example | lib/ember.js | @@ -8195,7 +8195,7 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
arr.indexOf("a", -1); // 4
arr.indexOf("b", 3); // -1
arr.indexOf("a", 100); // -1
- ```javascript
+ ```
@method indexOf
@param {Object} object the item to search for
@@ -8840,7... | true |
Other | emberjs | ember.js | 42290bd66c38ce78122b66789eb3c898cd532dc8.json | Remove typos in code example | packages/ember-old-router/lib/router.js | @@ -346,7 +346,7 @@ var merge = function(original, hash) {
})
});
App.initialize();
- ```javascript
+ ```
And application code:
| true |
Other | emberjs | ember.js | 42290bd66c38ce78122b66789eb3c898cd532dc8.json | Remove typos in code example | packages/ember-runtime/lib/mixins/array.js | @@ -180,7 +180,7 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
arr.indexOf("a", -1); // 4
arr.indexOf("b", 3); // -1
arr.indexOf("a", 100); // -1
- ```javascript
+ ```
@method indexOf
@param {Object} object the item to search for | true |
Other | emberjs | ember.js | 42290bd66c38ce78122b66789eb3c898cd532dc8.json | Remove typos in code example | packages/ember-runtime/lib/mixins/mutable_array.js | @@ -83,7 +83,7 @@ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,
var colors = ["red", "green", "blue"];
colors.insertAt(2, "yellow"); // ["red", "green", "yellow", "blue"]
colors.insertAt(5, "orange"); // Error: Index out of range
- ```javascript
+ ```
@metho... | true |
Other | emberjs | ember.js | 3c3e77a72ff52b8ee3aaef9af145ddae8685cd16.json | Remove typos in code example | lib/ember.js | @@ -6373,7 +6373,7 @@ Ember.empty = Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.i
Ember.compare('hello', 'hello'); // 0
Ember.compare('abc', 'dfg'); // -1
Ember.compare(2, 1); // 1
- ```javascript
+ ```
@method compare
@for Ember | true |
Other | emberjs | ember.js | 3c3e77a72ff52b8ee3aaef9af145ddae8685cd16.json | Remove typos in code example | packages/ember-runtime/lib/core.js | @@ -148,7 +148,7 @@ Ember.empty = Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.i
Ember.compare('hello', 'hello'); // 0
Ember.compare('abc', 'dfg'); // -1
Ember.compare(2, 1); // 1
- ```javascript
+ ```
@method compare
@for Ember | true |
Other | emberjs | ember.js | e0f7c70256a696538fd1f91b2d70025134a6551b.json | Use getURL() in HistoryLocation
When trying to subclass HistoryLocation, it's hard to override certain
methods, because they don't use public API of this class for getting
URL. This patch changes all calls to location.pathname into getURL()
calls. | packages/ember-routing/lib/location/history_location.js | @@ -29,7 +29,7 @@ Ember.HistoryLocation = Ember.Object.extend({
@method initState
*/
initState: function() {
- this.replaceState(get(this, 'location').pathname);
+ this.replaceState(this.formatURL(this.getURL()));
set(this, 'history', window.history);
},
| false |
Other | emberjs | ember.js | 8bd4aa3358616b3ff19b5a93da7e4c3f850831ca.json | Add documentation stub for Ember.Router
Adding /** @scope Ember.Router.prototype */ makes YUIdoc print out the
entire router definition, without any error message. It doesn't actually
blow up, it just prints source. It's strange.
The method listing don't seem right yet -- it contains methods like
Ember.Route#controll... | packages/ember-routing/lib/system/router.js | @@ -25,6 +25,14 @@ function setupLocation(router) {
}
}
+/**
+ The `Ember.Router` class manages the application state and URLs. Refer to
+ the [routing guide](http://emberjs.com/guides/routing/) for documentation.
+
+ @class Router
+ @namespace Ember
+ @extends Ember.Object
+*/
Ember.Router = Ember.Object.e... | false |
Other | emberjs | ember.js | 7c796e45649195ab88de86bcf3d503aed636e689.json | Skip container tests when testing build | Rakefile | @@ -87,14 +87,16 @@ task :test, [:suite] => :dist do |t, args|
:standard => packages.map{|p| "package=#{p}" } +
["package=all&jquery=1.7.2&nojshint=true",
"package=all&extendprototypes=true&nojshint=true",
- "package=all&dist=build&nojshint=true"],
+ ... | false |
Other | emberjs | ember.js | 14ec9b2219602d889f27c622a6bdc16c8fbc3986.json | Fix global leaks between tests | packages/ember-metal/tests/accessors/getPath_test.js | @@ -11,23 +11,23 @@ var obj, moduleOpts = {
};
- Foo = {
+ window.Foo = {
bar: {
baz: { biff: 'FooBiff' }
}
};
- $foo = {
+ window.$foo = {
bar: {
baz: { biff: '$FOOBIFF' }
}
};
},
teardown: function() {
- obj = null;
- Foo = n... | true |
Other | emberjs | ember.js | 14ec9b2219602d889f27c622a6bdc16c8fbc3986.json | Fix global leaks between tests | packages/ember-metal/tests/accessors/normalizeTuple_test.js | @@ -10,22 +10,23 @@ var obj, moduleOpts = {
}
};
- Foo = {
+ window.Foo = {
bar: {
baz: {}
}
};
- $foo = {
+ window.$foo = {
bar: {
baz: {}
}
};
},
teardown: function() {
- obj = null;
- Foo = null;
+ obj = undefined;
+... | true |
Other | emberjs | ember.js | cd23742826d041dbb55e763879fab6570882de43.json | Run container tests | Rakefile | @@ -83,7 +83,7 @@ task :test, [:suite] => :dist do |t, args|
:default => packages.map{|p| "package=#{p}" },
:built => [ "package=all&dist=build" ],
:runtime => [ "package=ember-metal,ember-runtime" ],
- :views => [ "package=ember-views,ember-handlebars" ],
+ :views => [ "package=containe... | true |
Other | emberjs | ember.js | cd23742826d041dbb55e763879fab6570882de43.json | Run container tests | tests/index.html | @@ -167,11 +167,12 @@ <h2 id="qunit-userAgent"></h2>
if (packages[0] === 'all') {
packages = [
- 'ember-handlebars',
+ 'container',
'ember-metal',
'ember-runtime',
'ember-states',
'ember-views',
+ 'ember-handlebars',
'ember-routing',
... | true |
Other | emberjs | ember.js | b4189a5316b490e6523d0fa49a02f55bf9c91de0.json | Fix default index for Router#replaceWith | packages/ember-routing/lib/system/router.js | @@ -73,24 +73,14 @@ Ember.Router = Ember.Object.extend({
this.notifyPropertyChange('url');
},
- transitionTo: function(passedName) {
- var args = [].slice.call(arguments), name;
-
- if (!this.router.hasRoute(passedName)) {
- name = args[0] = passedName + '.index';
- } else {
- name = passe... | false |
Other | emberjs | ember.js | 3f84548699fdf631b02be61d57456f67d3e45468.json | Update license year | LICENSE | @@ -1,4 +1,4 @@
-Copyright (c) 2012 Yehuda Katz, Tom Dale, Charles Jolley and Ember.js contributors
+Copyright (c) 2013 Yehuda Katz, Tom Dale, Charles Jolley and Ember.js contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (th... | true |
Other | emberjs | ember.js | 3f84548699fdf631b02be61d57456f67d3e45468.json | Update license year | generators/license.js | @@ -1,6 +1,6 @@
// ==========================================================================
// Project: Ember - JavaScript Application Framework
-// Copyright: ©2011-2012 Tilde Inc. and contributors
+// Copyright: ©2011-2013 Tilde Inc. and contributors
// Portions ©2006-2011 Strobe Inc.
// ... | true |
Other | emberjs | ember.js | 7aa2e11fbda64d3112bf69cc9e2382ad53f41f5f.json | Update router.js - Fixes #1800 | packages/ember-routing/lib/vendor/router.js | @@ -159,13 +159,13 @@ define("router",
Used internally by `generate` and `transitionTo`.
*/
- _paramsForHandler: function(handlerName, objects, callback) {
+ _paramsForHandler: function(handlerName, objects, doUpdate) {
var handlers = this.recognizer.handlersFor(handlerName),
... | false |
Other | emberjs | ember.js | 6e6668a7acd93ccea5ccc7d87fe22414effa42c0.json | Add a test for this.render('template')
It should pull in the associated controller. | packages/ember/tests/routing/basic_test.js | @@ -122,6 +122,30 @@ test("The Homepage with explicit template name in renderTemplate", function() {
equal(Ember.$('h3:contains(Megatroll)', '#qunit-fixture').length, 1, "The homepage template was rendered");
});
+test("An alternate template will pull in an alternate controller", function() {
+ Router.map(functi... | false |
Other | emberjs | ember.js | ec58bba6dfbacc4c2426bbf75c63435b48ae2aa0.json | Update version replace in release scripts | Rakefile | @@ -201,7 +201,7 @@ namespace :release do
# Bump ember-metal/core version
contents = File.read("packages/ember-metal/lib/core.js")
- current_version = contents.match(/@version ([\w\.]+)/) && $1
+ current_version = contents.match(/@version ([\w\.-]+)/) && $1
contents.gsub!(curr... | false |
Other | emberjs | ember.js | b54825d70ffc104291d6feec8ce28d18ec130a15.json | Exclude vendor directories from docs | docs/yuidoc.json | @@ -15,6 +15,7 @@
"../packages/ember-routing/lib",
"../packages/ember-application/lib"
],
+ "exclude": "vendor",
"outdir": "./build"
}
} | false |
Other | emberjs | ember.js | f1d54fb74899fbae1452c1f013dbc69050346d37.json | Support jQuery 1.9.0 | README.md | @@ -127,7 +127,7 @@ To run multiple packages, you can separate them with commas. You can run all the
<http://localhost:9292/tests/index.html?package=all>
-You can also pass `jquery=VERSION` in the test URL to test different versions of jQuery. Default is 1.7.2.
+You can also pass `jquery=VERSION` in the test URL t... | true |
Other | emberjs | ember.js | f1d54fb74899fbae1452c1f013dbc69050346d37.json | Support jQuery 1.9.0 | Rakefile | @@ -75,6 +75,7 @@ task :test, [:suite] => :dist do |t, args|
"package=all&dist=build&nojshint=true"],
:all => packages.map{|p| "package=#{p}" } +
["package=all&jquery=1.7.2&nojshint=true",
+ "package=all&jquery=1.8.3&nojshint=true",
... | true |
Other | emberjs | ember.js | f1d54fb74899fbae1452c1f013dbc69050346d37.json | Support jQuery 1.9.0 | packages/ember-views/lib/core.js | @@ -4,7 +4,7 @@
*/
var jQuery = Ember.imports.jQuery;
-Ember.assert("Ember Views require jQuery 1.7 (>= 1.7.2) or 1.8", jQuery && (jQuery().jquery.match(/^1\.(7(?!$)(?!\.[01])|8)(\.\d+)?(pre|rc\d?)?/) || Ember.ENV.FORCE_JQUERY));
+Ember.assert("Ember Views require jQuery 1.7 (>= 1.7.2), 1.8 or 1.9", jQuery && (jQue... | true |
Other | emberjs | ember.js | f1d54fb74899fbae1452c1f013dbc69050346d37.json | Support jQuery 1.9.0 | tests/index.html | @@ -96,7 +96,7 @@ <h2 id="qunit-userAgent"></h2>
<script>
// Load custom version of jQuery if possible (assign to window so IE8 can use in later blocks)
- var jQueryVersion = QUnit.urlParams.jquery || "1.8.2";
+ var jQueryVersion = QUnit.urlParams.jquery || "1.9.0";
if (jQueryVersion !== 'none') {
... | true |
Other | emberjs | ember.js | c0cbf374940507c57af748fbc9015ef04ab70363.json | Add helpful assert for non-route controllers | packages/ember-routing/lib/system/route.js | @@ -248,6 +248,9 @@ Ember.Route = Ember.Object.extend({
if (!controller) {
model = model || this.modelFor(name);
+
+ Ember.assert("You are trying to look up a controller that you did not define, and for which Ember does not know the model.\n\nThis is not a controller for a route, so you must explicit... | true |
Other | emberjs | ember.js | c0cbf374940507c57af748fbc9015ef04ab70363.json | Add helpful assert for non-route controllers | packages/ember/tests/routing/basic_test.js | @@ -1227,3 +1227,17 @@ test("Parent route context change", function() {
equal(editCount, 2, 'set up the edit route twice without failure');
deepEqual(editedPostIds, ['1', '2'], 'modelFor posts.post returns the right context');
});
+
+test("Calling controllerFor for a non-route controller returns a controller", f... | true |
Other | emberjs | ember.js | a1aa67ab3db06cb2018f482a721324f38f240529.json | Fix duplicate test name | packages/ember/tests/routing/basic_test.js | @@ -122,7 +122,7 @@ test("The Homepage with explicit template name in renderTemplate", function() {
equal(Ember.$('h3:contains(Megatroll)', '#qunit-fixture').length, 1, "The homepage template was rendered");
});
-test("The Homepage with explicit template name in renderTemplate", function() {
+test("The Homepage w... | false |
Other | emberjs | ember.js | a60bd5fd92a7c3b4a5c407dbab52ae8d3030089b.json | Fix Route#render with slash notation | packages/ember-routing/lib/system/route.js | @@ -335,7 +335,7 @@ Ember.Route = Ember.Object.extend({
name = this.templateName;
}
- name = name || this.templateName;
+ name = name ? name.replace(/\//g, '.') : this.templateName;
var container = this.container,
view = container.lookup('view:' + name), | true |
Other | emberjs | ember.js | a60bd5fd92a7c3b4a5c407dbab52ae8d3030089b.json | Fix Route#render with slash notation | packages/ember/tests/routing/basic_test.js | @@ -146,6 +146,32 @@ test("The Homepage with explicit template name in renderTemplate", function() {
equal(Ember.$('h3:contains(Megatroll) + p:contains(YES I AM HOME)', '#qunit-fixture').length, 1, "The homepage template was rendered");
});
+test("Renders correct view with slash notation", function() {
+ Ember.T... | true |
Other | emberjs | ember.js | 1cb786d770b754cb591284785d7250abc10c3193.json | Fix tests so that controllers are not routes | packages/ember/tests/routing/basic_test.js | @@ -58,7 +58,7 @@ test("The Homepage", function() {
var currentPath;
- App.ApplicationController = Ember.Route.extend({
+ App.ApplicationController = Ember.Controller.extend({
currentPathDidChange: Ember.observer(function() {
currentPath = get(this, 'currentPath');
}, 'currentPath')
@@ -127,7 ... | false |
Other | emberjs | ember.js | 8604952ded96faa5ab172a60bc8279f4c3245d41.json | add container#reset useful in tests | packages/container/lib/main.js | @@ -151,6 +151,13 @@ define("container",
delete this.parent;
this.isDestroyed = true;
+ },
+
+ reset: function() {
+ for (var i=0, l=this.children.length; i<l; i++) {
+ resetCache(this.children[i]);
+ }
+ resetCache(this);
}
};
@@ -231,5 +238,13 ... | false |
Other | emberjs | ember.js | ddb09515a0abf34d35c432b4a178d708ca5f470a.json | Fix failing router tests using old API | packages/ember/tests/routing/basic_test.js | @@ -148,7 +148,7 @@ test("The Homepage with explicit template name in renderTemplate", function() {
test('render does not replace templateName if user provided', function() {
Router.map(function(match) {
- match("/").to("home");
+ this.route("home", { path: "/" });
});
Ember.TEMPLATES.the_real_home_... | false |
Other | emberjs | ember.js | e4af09edd357cdccfddfa684247bc43a6eaae0fe.json | Change the API to this.resource/this.route
This will hopefully be the last API change.
Website docs forthcoming. | packages/ember-routing/lib/system.js | @@ -1,3 +1,4 @@
+require('ember-routing/system/dsl');
require('ember-routing/system/controller_for');
require('ember-routing/system/router');
require('ember-routing/system/route'); | true |
Other | emberjs | ember.js | e4af09edd357cdccfddfa684247bc43a6eaae0fe.json | Change the API to this.resource/this.route
This will hopefully be the last API change.
Website docs forthcoming. | packages/ember-routing/lib/system/dsl.js | @@ -0,0 +1,74 @@
+function DSL(name) {
+ this.parent = name;
+ this.matches = [];
+}
+
+DSL.prototype = {
+ resource: function(name, options, callback) {
+ if (arguments.length === 2 && typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+
+ if (arguments.length === 1) {
+ ... | true |
Other | emberjs | ember.js | e4af09edd357cdccfddfa684247bc43a6eaae0fe.json | Change the API to this.resource/this.route
This will hopefully be the last API change.
Website docs forthcoming. | packages/ember-routing/lib/system/router.js | @@ -3,6 +3,8 @@ var get = Ember.get, set = Ember.set, classify = Ember.String.classify;
var DefaultView = Ember.View.extend(Ember._Metamorph);
+require("ember-routing/system/dsl");
+
function setupLocation(router) {
var location = get(router, 'location'),
rootURL = get(router, 'rootURL');
@@ -28,7 +30,7... | true |
Other | emberjs | ember.js | e4af09edd357cdccfddfa684247bc43a6eaae0fe.json | Change the API to this.resource/this.route
This will hopefully be the last API change.
Website docs forthcoming. | packages/ember/tests/helpers/link_to_test.js | @@ -54,7 +54,7 @@ module("The {{linkTo}} helper", {
test("The {{linkTo}} helper moves into the named route", function() {
Router.map(function(match) {
- match("/about").to("about");
+ this.route("about");
});
bootApplication();
@@ -96,8 +96,8 @@ test("The {{linkTo}} helper supports URL replacement",... | true |
Other | emberjs | ember.js | e4af09edd357cdccfddfa684247bc43a6eaae0fe.json | Change the API to this.resource/this.route
This will hopefully be the last API change.
Website docs forthcoming. | packages/ember/tests/routing/basic_test.js | @@ -50,7 +50,7 @@ module("Basic Routing", {
test("The Homepage", function() {
Router.map(function(match) {
- match("/").to("home");
+ this.route("home", { path: "/" });
});
App.HomeRoute = Ember.Route.extend({
@@ -76,8 +76,8 @@ test("The Homepage", function() {
test("The Homepage register as acti... | true |
Other | emberjs | ember.js | da4aa8531f337811c69e86300d81352fc1dab241.json | Add `action` support to Ember.TextField | packages/ember-handlebars/lib/controls/text_field.js | @@ -81,5 +81,29 @@ Ember.TextField = Ember.View.extend(Ember.TextSupport,
@type String
@default null
*/
- size: null
+ size: null,
+
+ /**
+ The action to be sent when the user presses the return key.
+
+ This is similar to the `{{action}}` helper, but is fired when
+ the user presses the retur... | true |
Other | emberjs | ember.js | da4aa8531f337811c69e86300d81352fc1dab241.json | Add `action` support to Ember.TextField | packages/ember-handlebars/tests/controls/text_field_test.js | @@ -173,6 +173,29 @@ test("should call the cancel method when escape key is pressed", function() {
ok(wasCalled, "invokes cancel method");
});
+test("should sent an action if one is defined when the return key is pressed", function() {
+ expect(2);
+
+ var StubController = Ember.Object.extend({
+ send: funct... | true |
Other | emberjs | ember.js | d1116a1cef2c2e52c188b6f534c6b771a2c898d9.json | update Metamorph with latest amd distribution | packages/metamorph/lib/main.js | @@ -1,458 +1,458 @@
-// ==========================================================================
-// Project: metamorph
-// Copyright: ©2011 My Company Inc. All rights reserved.
-// ==========================================================================
-
define("metamorph",
[],
function() {
+ "use str... | false |
Other | emberjs | ember.js | 8714394fd9ced690512b2b5ae9a795b6ff2d5136.json | Fix a bug with item controllers.
The shadow array of subcontainers was out of sync when array observers were
fired. | packages/ember-runtime/lib/controllers/array_controller.js | @@ -158,8 +158,6 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
},
arrayContentDidChange: function(idx, removedCnt, addedCnt) {
- this._super(idx, removedCnt, addedCnt);
-
var subContainers = get(this, 'subContainers'),
subContainersToRemove = subContainers.slice(idx,... | true |
Other | emberjs | ember.js | 8714394fd9ced690512b2b5ae9a795b6ff2d5136.json | Fix a bug with item controllers.
The shadow array of subcontainers was out of sync when array observers were
fired. | packages/ember-runtime/tests/controllers/item_controller_class_test.js | @@ -223,3 +223,30 @@ test("if `lookupItemController` returns a string, it must be resolvable by the c
/NonExistant/,
"`lookupItemController` must return either null or a valid controller name");
});
+
+test("array observers can invoke `objectAt` without overwriting existing item controllers", function() {
+ ... | true |
Other | emberjs | ember.js | 494bbbb33154e8bd3201959112974b008657e557.json | Refine Ember.aliasMethod tests | packages/ember-metal/tests/mixin/alias_method_test.js | @@ -1,20 +1,13 @@
module('Ember.aliasMethod');
function validateAliasMethod(obj) {
- var get = Ember.get;
- equal(get(obj, 'foo'), 'foo', 'obj.foo');
- equal(get(obj, 'bar'), 'foo', 'obj.bar should be a copy of foo');
-
equal(obj.fooMethod(), 'FOO', 'obj.fooMethod()');
equal(obj.barMethod(), 'FOO', 'obj.ba... | false |
Other | emberjs | ember.js | b53c217705331c2594faa780a83434b74ca7061f.json | Improve Docs of Ember.alias and Ember.aliasMethod | packages/ember-metal/lib/mixin.js | @@ -543,11 +543,11 @@ Alias.prototype = new Ember.Descriptor();
```javascript
App.PaintSample = Ember.Object.extend({
color: 'red',
- colour: Ember.aliasMethod('color'),
+ colour: Ember.alias('color'),
name: function(){
return "Zed";
},
- moniker: Ember.aliasMethod("name")
+ moni... | false |
Other | emberjs | ember.js | 32c1d6b1d0f0b83511691435a48a7b7282737ab7.json | Clarify itemController out of range case. | packages/ember-runtime/lib/controllers/array_controller.js | @@ -142,6 +142,12 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
if (controllerClass && idx < length) {
return this.controllerAt(idx, object, controllerClass);
} else {
+ // When controllerClass is falsy we have not opted in to using item
+ // controllers, so return... | false |
Other | emberjs | ember.js | 075ed988996a79bc27f76fd1a582ac6cd94452b2.json | Fix trailing slash issue. Fixes #1691 | packages/ember-routing/lib/vendor/route-recognizer.js | @@ -373,8 +373,14 @@ define("route-recognizer",
// DEBUG GROUP path
+ var pathLen = path.length;
+
if (path.charAt(0) !== "/") { path = "/" + path; }
+ if (pathLen > 1 && path.charAt(pathLen - 1) === "/") {
+ path = path.substr(0, pathLen - 1);
+ }
+
for (i... | false |
Other | emberjs | ember.js | 971ac729a36eb4d495e34a9ef051cf6eadeed7f5.json | Update gitsubmodules urls to public repos. | .gitmodules | @@ -1,9 +1,9 @@
-[submodule "cookbooks/phantomjs"]
- path = cookbooks/phantomjs
- url = git@github.com:customink-webops/phantomjs.git
[submodule "cookbooks/build-essential"]
path = cookbooks/build-essential
- url = git@github.com:opscode-cookbooks/build-essential.git
+ url = https://github.com/opscode-cookbooks/buil... | false |
Other | emberjs | ember.js | 49dd221e8cc0453f0e6ba260b109d88108b927a4.json | Make `model` an alias for `content` on controllers | packages/ember-routing/lib/ext/controller.js | @@ -1,4 +1,4 @@
-var get = Ember.get;
+var get = Ember.get, set = Ember.set;
Ember.ControllerMixin.reopen({
concatenatedProperties: ['needs'],
@@ -22,7 +22,15 @@ Ember.ControllerMixin.reopen({
controllerFor: function(controllerName) {
var container = get(this, 'container');
return container.lookup('c... | false |
Other | emberjs | ember.js | 335215bd5aab3e18e7d1fe7651cf7628b78d51ca.json | add test for SortableMixin bugfix | packages/ember-runtime/tests/mixins/sortable_test.js | @@ -195,6 +195,15 @@ test("don't remove and insert if position didn't change", function() {
ok(!insertItemSortedCalled, "insertItemSorted should not have been called");
});
+test("sortProperties observers removed on content removal", function() {
+ var removedObject = unsortedArray.objectAt(2);
+ equal(Ember.li... | false |
Other | emberjs | ember.js | 8f6000057475dc0011bebc61d0539146986bc9b2.json | Add needs to controllers | packages/ember-routing/lib/ext/controller.js | @@ -1,6 +1,18 @@
var get = Ember.get;
Ember.ControllerMixin.reopen({
+ concatenatedProperties: ['needs'],
+ needs: [],
+
+ init: function() {
+ this._super.apply(this, arguments);
+
+ // Structure asserts to still do verification but not string concat in production
+ if(!verifyDependencies(this)) {
+ ... | true |
Other | emberjs | ember.js | 8f6000057475dc0011bebc61d0539146986bc9b2.json | Add needs to controllers | packages/ember-routing/tests/system/controller.js | @@ -0,0 +1,33 @@
+module("Controller dependencies");
+
+test("If a controller specifies a dependency, it is available to `controllerFor`", function() {
+ var container = new Ember.Container();
+
+ container.register('controller', 'post', Ember.Controller.extend({
+ needs: 'posts',
+
+ postsController: Ember.com... | true |
Other | emberjs | ember.js | 1bf0df4c95512dd42687a9b2b5ca3936a11aa09a.json | Add currentPath to applicationController | packages/ember-routing/lib/system/router.js | @@ -37,7 +37,8 @@ Ember.Router = Ember.Object.extend({
startRouting: function() {
var router = this.router,
location = get(this, 'location'),
- container = this.container;
+ container = this.container,
+ self = this;
var lastURL;
@@ -51,6 +52,10 @@ Ember.Router = Ember.Obj... | true |
Other | emberjs | ember.js | 1bf0df4c95512dd42687a9b2b5ca3936a11aa09a.json | Add currentPath to applicationController | packages/ember-routing/lib/vendor/router.js | @@ -59,7 +59,7 @@ define("router",
@param {String} url a URL to process
- @returns {Array} an Array of `[handler, parameter]` tuples
+ @return {Array} an Array of `[handler, parameter]` tuples
*/
handleURL: function(url) {
var results = this.recognizer.recognize(url),
@... | true |
Other | emberjs | ember.js | 1bf0df4c95512dd42687a9b2b5ca3936a11aa09a.json | Add currentPath to applicationController | packages/ember/tests/routing/basic_test.js | @@ -47,12 +47,21 @@ test("The Homepage", function() {
App.HomeRoute = Ember.Route.extend({
});
+ var currentPath;
+
+ App.ApplicationController = Ember.Route.extend({
+ currentPathDidChange: Ember.observer(function() {
+ currentPath = get(this, 'currentPath');
+ }, 'currentPath')
+ });
+
bootAp... | true |
Other | emberjs | ember.js | c0311318c448b03d032f46a5cfc7f06318c4f29a.json | Add controllerFor on controllers | packages/ember-routing/lib/ext/controller.js | @@ -5,5 +5,10 @@ Ember.ControllerMixin.reopen({
var router = get(this, 'target');
return router.transitionTo.apply(router, arguments);
+ },
+
+ controllerFor: function(controllerName) {
+ var container = get(this, 'container');
+ return container.lookup('controller:' + controllerName);
}
}); | false |
Other | emberjs | ember.js | 0087cade0c720cf2b42d5b2d727762d34de2520c.json | Move connectControllers to old-router | packages/ember-application/lib/system/application.js | @@ -601,7 +601,6 @@ Ember.Application.reopenClass({
container.injection('router:main', 'namespace', 'application:main');
container.typeInjection('controller', 'target', 'router:main');
- container.typeInjection('controller', 'controllers', 'router:main');
container.typeInjection('controller', 'names... | true |
Other | emberjs | ember.js | 0087cade0c720cf2b42d5b2d727762d34de2520c.json | Move connectControllers to old-router | packages/ember-old-router/lib/controller_ext.js | @@ -12,6 +12,7 @@ Additional methods for the ControllerMixin
@namespace Ember
*/
Ember.ControllerMixin.reopen({
+ controllers: null,
/**
`connectOutlet` creates a new instance of a provided view
@@ -163,6 +164,31 @@ Ember.ControllerMixin.reopen({
return view;
},
+ /**
+ Convenience method to... | true |
Other | emberjs | ember.js | 0087cade0c720cf2b42d5b2d727762d34de2520c.json | Move connectControllers to old-router | packages/ember-old-router/tests/controller_test.js | @@ -191,3 +191,42 @@ test("can disconnect outlet from controller", function() {
equal(appController.get('master'), null, "the app controller's master view is null");
});
+
+module("Ember.Controller#connectControllers", {
+ setup: function() {
+ lookup = Ember.lookup = {};
+
+ Ember.run(function () {
+ ... | true |
Other | emberjs | ember.js | 0087cade0c720cf2b42d5b2d727762d34de2520c.json | Move connectControllers to old-router | packages/ember-views/lib/system/controller.js | @@ -15,35 +15,8 @@ Additional methods for the ControllerMixin
@namespace Ember
*/
Ember.ControllerMixin.reopen({
-
target: null,
- controllers: null,
namespace: null,
view: null,
- container: null,
-
- /**
- Convenience method to connect controllers. This method makes other controllers
- available ... | true |
Other | emberjs | ember.js | 0087cade0c720cf2b42d5b2d727762d34de2520c.json | Move connectControllers to old-router | packages/ember-views/tests/system/controller_test.js | @@ -1,40 +0,0 @@
-var originalLookup = Ember.lookup, TestApp, lookup;
-
-module("Ember.Controller#connectControllers", {
- setup: function() {
- lookup = Ember.lookup = {};
-
- Ember.run(function () {
- lookup.TestApp = TestApp = Ember.Application.create();
- });
-
-
- TestApp.ApplicationController = ... | true |
Other | emberjs | ember.js | 0087cade0c720cf2b42d5b2d727762d34de2520c.json | Move connectControllers to old-router | packages/ember/tests/routing/basic_test.js | @@ -505,7 +505,7 @@ asyncTest("Events are triggered on the controller if a matching action name is i
},
events: {
- showStuff: function(handler, obj) {
+ showStuff: function(obj) {
stateIsNotCalled = false;
}
}
@@ -551,8 +551,8 @@ asyncTest("Events are triggered on the current... | true |
Other | emberjs | ember.js | 3fe33981e67baf226ef0afe27e02c4a3b9294a29.json | Provide a precompilation package
This should make it easier to maintain external
precompilers without stubbing out parts of Ember | Assetfile | @@ -114,11 +114,25 @@ class VersionInfo < Rake::Pipeline::Filter
end
end
+class EmberStub < Rake::Pipeline::Filter
+ def generate_output(inputs, output)
+ inputs.each do |input|
+ file = File.read(input.fullpath)
+ out = "(function() {\nvar Ember = { assert: function() {} };\n"
+ out << file
+ ... | true |
Other | emberjs | ember.js | 3fe33981e67baf226ef0afe27e02c4a3b9294a29.json | Provide a precompilation package
This should make it easier to maintain external
precompilers without stubbing out parts of Ember | Rakefile | @@ -74,6 +74,7 @@ task :test, [:suite] => :dist do |t, args|
suites = {
:default => packages.map{|p| "package=#{p}" },
+ :built => [ "package=all&dist=build" ],
:runtime => [ "package=ember-metal,ember-runtime" ],
:views => [ "package=ember-views,ember-handlebars" ],
:standard => pac... | true |
Other | emberjs | ember.js | 3fe33981e67baf226ef0afe27e02c4a3b9294a29.json | Provide a precompilation package
This should make it easier to maintain external
precompilers without stubbing out parts of Ember | packages/ember-handlebars-compiler/lib/main.js | @@ -0,0 +1,171 @@
+/**
+@module ember
+@submodule ember-handlebars
+*/
+
+// Eliminate dependency on any Ember to simplify precompilation workflow
+var objectCreate = Object.create || function(parent) {
+ function F() {}
+ F.prototype = parent;
+ return new F();
+};
+
+var Handlebars = this.Handlebars || Ember.impor... | true |
Other | emberjs | ember.js | 3fe33981e67baf226ef0afe27e02c4a3b9294a29.json | Provide a precompilation package
This should make it easier to maintain external
precompilers without stubbing out parts of Ember | packages/ember-handlebars-compiler/package.json | @@ -0,0 +1,35 @@
+{
+ "name": "ember-handlebars-compiler",
+ "summary": "Ember Handlebars Compiler",
+ "description": "A programmatic compiler for Handlebars with the few syntax extensions supported by Ember with minimal dependencies",
+ "homepage": "http://emberjs.com",
+ "author": "Yehuda Katz",
+ "version": "1... | true |
Other | emberjs | ember.js | 3fe33981e67baf226ef0afe27e02c4a3b9294a29.json | Provide a precompilation package
This should make it easier to maintain external
precompilers without stubbing out parts of Ember | packages/ember-handlebars/lib/ext.js | @@ -1,170 +1,4 @@
-require("ember-views/system/render_buffer");
-
-/**
-@module ember
-@submodule ember-handlebars
-*/
-
-var objectCreate = Ember.create;
-
-var Handlebars = Ember.imports.Handlebars;
-Ember.assert("Ember Handlebars requires Handlebars 1.0.beta.5 or greater", Handlebars && Handlebars.VERSION.match(/^1\... | true |
Other | emberjs | ember.js | 3fe33981e67baf226ef0afe27e02c4a3b9294a29.json | Provide a precompilation package
This should make it easier to maintain external
precompilers without stubbing out parts of Ember | packages/ember-handlebars/lib/main.js | @@ -1,3 +1,4 @@
+require("ember-handlebars-compiler");
require("ember-runtime");
require("ember-views");
require("ember-handlebars/ext"); | true |
Other | emberjs | ember.js | 3fe33981e67baf226ef0afe27e02c4a3b9294a29.json | Provide a precompilation package
This should make it easier to maintain external
precompilers without stubbing out parts of Ember | packages/ember-handlebars/package.json | @@ -7,7 +7,7 @@
"version": "1.0.0-pre.2",
"dependencies": {
"spade": "~> 1.0.0",
- "handlebars": "~> 1.0.0.beta.6",
+ "ember-handlebars-compiler", "1.0.0-pre.2",
"ember-views": "1.0.0-pre.2",
"metamorph": "~> 1.0.0"
}, | true |
Other | emberjs | ember.js | 3fe33981e67baf226ef0afe27e02c4a3b9294a29.json | Provide a precompilation package
This should make it easier to maintain external
precompilers without stubbing out parts of Ember | packages/handlebars/lib/main.js | @@ -0,0 +1,1937 @@
+// lib/handlebars/base.js
+
+/*jshint eqnull:true*/
+this.Handlebars = {};
+
+(function(Handlebars) {
+
+Handlebars.VERSION = "1.0.rc.1";
+
+Handlebars.helpers = {};
+Handlebars.partials = {};
+
+Handlebars.registerHelper = function(name, fn, inverse) {
+ if(inverse) { fn.not = inverse; }
+ this.... | true |
Other | emberjs | ember.js | de601dbc92008e97611424309dc6a7a5dc09feb6.json | Add title attribute binding to linkTo helper. | packages/ember-routing/lib/helpers/link_to.js | @@ -16,8 +16,9 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
tagName: 'a',
namedRoute: null,
currentWhen: null,
+ title: null,
activeClass: 'active',
- attributeBindings: 'href',
+ attributeBindings: ['href', 'title'],
classNameBindings: 'active',
active: Ember.comp... | true |
Other | emberjs | ember.js | de601dbc92008e97611424309dc6a7a5dc09feb6.json | Add title attribute binding to linkTo helper. | packages/ember/tests/helpers/link_to_test.js | @@ -181,3 +181,14 @@ test("The {{linkTo}} helper moves into the named route with context", function()
equal(Ember.$('p', '#qunit-fixture').text(), "Erik Brynroflsson", "The name is correct");
});
+test("The {{linkTo}} helper binds some anchor html tag common attributes", function() {
+ Router.map(function(match)... | true |
Other | emberjs | ember.js | 471e6f5396c3ab661ab9459b4e0ff6f935b50194.json | Fix typos in documentation guidelines | CONTRIBUTING.md | @@ -102,10 +102,10 @@ Syntax:
* a = b and not a=b.
* Follow the conventions you see used in the source already.
-Inline Documenation Guidelines:
+Inline Documentation Guidelines:
All inline documentation is written using YUIDoc. Follow these rules when
-updating or writing new documenation:
+updating or writing ... | false |
Other | emberjs | ember.js | d39c1e1754eb93d8ac06d9ae50e1ead66cf7d310.json | Fix Chrome (pre v25) MutationObserver Memory Leak
https://github.com/tildeio/rsvp.js/pull/40
https://github.com/emberjs/ember.js/issues/1667
http://code.google.com/p/chromium/issues/detail?id=160985 | packages/rsvp/lib/main.js | @@ -30,6 +30,12 @@ define("rsvp",
var element = document.createElement('div');
observer.observe(element, { attributes: true });
+ // Chrome Memory Leak: https://bugs.webkit.org/show_bug.cgi?id=93661
+ window.addEventListener('unload', function(){
+ observer.disconnect();
+ observ... | false |
Other | emberjs | ember.js | 3e033ffeb8f69e7f386afc632b107bd60b2cb1ae.json | Add test for #1669 | packages/ember-old-router/tests/view_test.js | @@ -0,0 +1,27 @@
+var set = Ember.set, get = Ember.get;
+
+module("Ember.View - Old Router Functionality", {
+ setup: function() {
+ Ember.TEMPLATES = {};
+ }
+});
+
+test("should load named templates from View.templates", function() {
+ var view;
+
+
+ view = Ember.View.create({
+ templates: {
+ testTem... | false |
Other | emberjs | ember.js | a5d45f66e1f71bb5eda417c688db0ea08b474903.json | Update route-recognizer with wildcard fixes | packages/ember-routing/lib/vendor/route-recognizer.js | @@ -186,9 +186,9 @@ define("route-recognizer",
charSpec = child.charSpec;
- if (chars = charSpec.validChars) {
+ if (typeof (chars = charSpec.validChars) !== 'undefined') {
if (chars.indexOf(char) !== -1) { returned.push(child); }
- } else if (chars = charSpec.inva... | false |
Other | emberjs | ember.js | bcdb04efbbf8b69cdb89c175f2eec5e80b1e31f3.json | Fix build order for old-router | Assetfile | @@ -118,7 +118,7 @@ distros = {
"runtime" => %w(ember-metal ember-runtime),
"data-deps" => %w(ember-metal ember-runtime ember-states),
"full" => %w(ember-metal rsvp container ember-runtime ember-views metamorph ember-handlebars ember-routing ember-application ember-states),
- "old-router" => %w(embe... | false |
Other | emberjs | ember.js | 8bfaf7fba84decc5123133be7b1aaaff68a3582d.json | Fix tests with same names | packages/ember/tests/routing/basic_test.js | @@ -581,7 +581,7 @@ asyncTest("Events are triggered on the current state", function() {
action.handler(event);
});
-asyncTest("Events are triggered on the current state", function() {
+asyncTest("Events are triggered on the current state when routes are nested", function() {
Router.map(function(match) {
m... | false |
Other | emberjs | ember.js | b2ddd989b89acfeabcf92ffb2e180c04cd8d308b.json | Fix object comparisons in IE tests | packages/ember/tests/routing/basic_test.js | @@ -553,7 +553,8 @@ asyncTest("Events are triggered on the current state", function() {
events: {
showStuff: function(handler, obj) {
ok(handler instanceof App.HomeRoute, "the handler is an App.HomeRoute");
- deepEqual(obj, { name: "Tom Dale" }, "the context is correct");
+ // Using E... | false |
Other | emberjs | ember.js | dfb63a217518cc10ae48e8ce7dfd1d6f334de5d1.json | Normalize urls in tests for IE | packages/ember/tests/helpers/link_to_test.js | @@ -9,6 +9,11 @@ function bootApplication() {
});
}
+// IE includes the host name
+function normalizeUrl(url) {
+ return url.replace(/https?:\/\/[^\/]+/,'');
+}
+
module("The {{linkTo}} helper", {
setup: function() {
Ember.run(function() {
@@ -152,7 +157,7 @@ test("The {{linkTo}} helper moves into the n... | false |
Other | emberjs | ember.js | 97a86c83363786bd8191609bd9b61259cd25f0ce.json | Fix IE whitespace issues in tests | packages/ember-routing/tests/helpers/outlet_test.js | @@ -34,7 +34,8 @@ test("view should support connectOutlet for the main outlet", function() {
}));
});
- equal(view.$().text(), 'HIBYE');
+ // Replace whitespace for older IE
+ equal(view.$().text().replace(/\s+/,''), 'HIBYE');
});
test("outlet should support connectOutlet in slots in prerender state", ... | false |
Other | emberjs | ember.js | 39f4e2eebb0aadf4e01cf0e85fe30356ea5169a0.json | Use Ember.Error instead of default | packages/ember-handlebars/lib/views/handlebars_bound_view.js | @@ -91,7 +91,7 @@ SimpleHandlebarsView.prototype = {
case 'destroyed':
break;
case 'inBuffer':
- throw new Error("Something you did tried to replace an {{expression}} before it was inserted into the DOM.");
+ throw new Ember.Error("Something you did tried to replace an {{expression}... | true |
Other | emberjs | ember.js | 39f4e2eebb0aadf4e01cf0e85fe30356ea5169a0.json | Use Ember.Error instead of default | packages/ember-views/lib/views/states/in_buffer.js | @@ -22,7 +22,7 @@ Ember.merge(inBuffer, {
// when a view is rendered in a buffer, rerendering it simply
// replaces the existing buffer with a new one
rerender: function(view) {
- throw new Error("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.");
+ ... | true |
Other | emberjs | ember.js | 17f8edf1773c363e5bdb9f3d753f8dd10191c2a4.json | bugfix Ember.Set#addEach documentation | packages/ember-runtime/lib/system/set.js | @@ -313,8 +313,10 @@ Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Emb
This is an alias of `Ember.MutableEnumerable.addObjects()`
+ ```javascript
var colors = new Ember.Set();
colors.addEach(["red", "green", "blue"]); // ["red", "green", "blue"]
+ ```
@met... | false |
Other | emberjs | ember.js | bf3f851ecbe3a22963975d5f3f2cb4505ed40c6f.json | Fix default `into` for nested routes
By default, routes now render into their nearest
parent that rendered a template.
As a side-effect, application is now even less
special. It just happens to be a top-level route,
like `loading`. | packages/ember-application/lib/system/application.js | @@ -587,7 +587,6 @@ Ember.Application.reopenClass({
buildContainer: function(namespace) {
var container = new Ember.Container();
Ember.Container.defaultContainer = container;
- var ApplicationView = Ember.View.extend();
container.set = Ember.set;
container.resolve = resolveFor(namespace);
@@... | true |
Other | emberjs | ember.js | bf3f851ecbe3a22963975d5f3f2cb4505ed40c6f.json | Fix default `into` for nested routes
By default, routes now render into their nearest
parent that rendered a template.
As a side-effect, application is now even less
special. It just happens to be a top-level route,
like `loading`. | packages/ember-routing/lib/system/route.js | @@ -4,6 +4,10 @@ var get = Ember.get, set = Ember.set,
Ember.Route = Ember.Object.extend({
+ exit: function() {
+ teardownView(this);
+ },
+
/**
Transition into another route. Optionally supply a model for the
route in question. The model will be serialized into the URL
@@ -304,20 +308,42 @@ Embe... | true |
Other | emberjs | ember.js | bf3f851ecbe3a22963975d5f3f2cb4505ed40c6f.json | Fix default `into` for nested routes
By default, routes now render into their nearest
parent that rendered a template.
As a side-effect, application is now even less
special. It just happens to be a top-level route,
like `loading`. | packages/ember-routing/lib/system/router.js | @@ -49,6 +49,7 @@ Ember.Router = Ember.Object.extend({
};
container.register('view', 'default', DefaultView);
+ container.register('view', 'toplevel', Ember.View.extend());
router.handleURL(location.getURL());
location.onUpdateURL(function(url) { | true |
Other | emberjs | ember.js | bf3f851ecbe3a22963975d5f3f2cb4505ed40c6f.json | Fix default `into` for nested routes
By default, routes now render into their nearest
parent that rendered a template.
As a side-effect, application is now even less
special. It just happens to be a top-level route,
like `loading`. | packages/ember/tests/routing/basic_test.js | @@ -9,6 +9,10 @@ function bootApplication() {
});
}
+function compile(string) {
+ return Ember.Handlebars.compile(string);
+}
+
module("Basic Routing", {
setup: function() {
Ember.run(function() {
@@ -22,8 +26,9 @@ module("Basic Routing", {
App.LoadingRoute = Ember.Route.extend({
});
- ... | true |
Other | emberjs | ember.js | 807e23fb2febf5a8857303a0dec1f5f644707264.json | Add concatenatedProperties documentation | packages/ember-runtime/lib/system/core_object.js | @@ -163,6 +163,63 @@ CoreObject.PrototypeMixin = Mixin.create({
init: function() {},
+ /**
+ Defines the properties that will be concatenated from the superclass
+ (instead of overridden).
+
+ By default, when you extend an Ember class a property defined in
+ the subclass overrides a property with t... | false |
Other | emberjs | ember.js | 179744aca0557c53e4c38fd5e6d8dc7f38a2348a.json | Fix pre-registered injections
Pre-registered injections are passed to the
factory's `create`, so they are available in the
init method of the class | packages/container/lib/main.js | @@ -1,3 +1,5 @@
+require('ember-runtime');
+
var get = Ember.get, set = Ember.set;
function Container() {
@@ -74,16 +76,20 @@ function isSingleton(container, fullName) {
return singleton !== false;
}
-function applyInjections(container, value, injections) {
- if (!injections) { return; }
+function buildInjec... | true |
Other | emberjs | ember.js | 179744aca0557c53e4c38fd5e6d8dc7f38a2348a.json | Fix pre-registered injections
Pre-registered injections are passed to the
factory's `create`, so they are available in the
init method of the class | packages/container/tests/container_test.js | @@ -1,18 +1,19 @@
-var get = Ember.get;
+var get = Ember.get, setProperties = Ember.setProperties, passedOptions;
module("Container");
function factory() {
- var Klass = function(container) {
- this.container = container;
+ var Klass = function(options) {
+ setProperties(this, options);
};
Klass.p... | true |
Other | emberjs | ember.js | 9f8959d4607ba675dec5985412a874aa488d9e58.json | Make promise usage nicer without mixing | packages/ember-runtime/lib/mixins/deferred.js | @@ -17,8 +17,7 @@ var get = Ember.get,
@namespace Ember
@extends Ember.Mixin
*/
-Ember.Deferred = Ember.Mixin.create({
-
+Ember.DeferredMixin = Ember.Mixin.create({
/**
Add handlers to be called when the Deferred object is resolved or rejected.
@@ -27,7 +26,8 @@ Ember.Deferred = Ember.Mixin.create({
... | true |
Other | emberjs | ember.js | 9f8959d4607ba675dec5985412a874aa488d9e58.json | Make promise usage nicer without mixing | packages/ember-runtime/lib/system.js | @@ -10,5 +10,6 @@ require('ember-runtime/system/object');
require('ember-runtime/system/set');
require('ember-runtime/system/string');
require('ember-runtime/system/promise_chain');
+require('ember-runtime/system/deferred');
require('ember-runtime/system/lazy_load'); | true |
Other | emberjs | ember.js | 9f8959d4607ba675dec5985412a874aa488d9e58.json | Make promise usage nicer without mixing | packages/ember-runtime/lib/system/deferred.js | @@ -0,0 +1,18 @@
+require("ember-runtime/mixins/deferred");
+require("ember-runtime/system/object");
+
+var DeferredMixin = Ember.DeferredMixin, // mixins/deferred
+ EmberObject = Ember.Object, // system/object
+ get = Ember.get;
+
+var Deferred = Ember.Object.extend(DeferredMixin);
+
+Deferred.reopenCla... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.