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 | 9f8959d4607ba675dec5985412a874aa488d9e58.json | Make promise usage nicer without mixing | packages/ember-runtime/tests/mixins/deferred_test.js | @@ -1,11 +1,11 @@
-module("Ember.Deferred");
+module("Ember.DeferredMixin");
test("can resolve deferred", function() {
var deferred, count = 0;
Ember.run(function() {
- deferred = Ember.Object.createWithMixins(Ember.Deferred);
+ deferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
});
... | true |
Other | emberjs | ember.js | 9f8959d4607ba675dec5985412a874aa488d9e58.json | Make promise usage nicer without mixing | packages/ember-runtime/tests/system/deferred_test.js | @@ -0,0 +1,33 @@
+module("Ember.Deferred all-in-one");
+
+asyncTest("Can resolve a promise", function() {
+ var value = { value: true };
+
+ var promise = Ember.Deferred.promise(function(deferred) {
+ setTimeout(function() {
+ Ember.run(function() { deferred.resolve(value); });
+ });
+ });
+
+ promise.th... | true |
Other | emberjs | ember.js | 3fbf4b8d29a19d6f9891b48662726b1209a061d3.json | Add redirection and inline documentation | packages/ember-routing/lib/system/route.js | @@ -4,6 +4,19 @@ var get = Ember.get, set = Ember.set,
Ember.Route = Ember.Object.extend({
+ /**
+ Transition into another route. Optionally supply a model for the
+ route in question. The model will be serialized into the URL
+ using the `serialize` hook.
+
+ @param {String} name the name of the rout... | true |
Other | emberjs | ember.js | 3fbf4b8d29a19d6f9891b48662726b1209a061d3.json | Add redirection and inline documentation | packages/ember-routing/tests/integration/basic_test.js | @@ -644,4 +644,32 @@ test("It is possible to get the model from a parent route", function() {
});
});
+test("A redirection hook is provided", function() {
+ Router.map(function(match) {
+ match("/").to("choose");
+ match("/home").to("home");
+ });
+
+ var chooseFollowed = 0, destination;
+
+ App.ChooseR... | true |
Other | emberjs | ember.js | e4aefe6366e335e126c03c803c094f4e83a7d32b.json | Add documentation to `render` | packages/ember-routing/lib/system/route.js | @@ -84,6 +84,56 @@ Ember.Route = Ember.Object.extend({
this.render();
},
+ /**
+ Renders a template into an outlet.
+
+ This method has a number of defaults, based on the name of the
+ route specified in the router.
+
+ For example:
+
+ ```js
+ App.Router.map(function(match) {
+ match(... | false |
Other | emberjs | ember.js | c87ad9fc13f7883e7b898c9fb9b1630cb2fc9bf1.json | Improve linkTo and write more tests | packages/ember-routing/lib/handlebars_ext.js | @@ -98,55 +98,78 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
}
});
-});
+ function args(linkView, route) {
+ var ret = [ route || linkView.namedRoute ],
+ params = linkView.parameters,
+ contexts = params.contexts,
+ roots = params.roots,
+ data = params.data;
+
... | true |
Other | emberjs | ember.js | c87ad9fc13f7883e7b898c9fb9b1630cb2fc9bf1.json | Improve linkTo and write more tests | packages/ember-routing/tests/helpers/link_to_test.js | @@ -21,8 +21,8 @@ module("The {{linkTo}} helper", {
container = Ember.Application.buildContainer(App);
Ember.TEMPLATES.app = Ember.Handlebars.compile("{{outlet}}");
- Ember.TEMPLATES.home = Ember.Handlebars.compile("<h3>Home</h3>{{#linkTo about id='about-link'}}About{{/linkTo}}");
- Ember.TEMP... | true |
Other | emberjs | ember.js | c0207ba0a0948f70ed65f5e3095ec7ea40463259.json | Add capitalize function to Ember.String
Conflicts:
packages/ember-runtime/lib/ext/string.js | packages/ember-runtime/lib/ext/string.js | @@ -15,6 +15,7 @@ var fmt = Ember.String.fmt,
decamelize = Ember.String.decamelize,
dasherize = Ember.String.dasherize,
underscore = Ember.String.underscore,
+ capitalize = Ember.String.capitalize,
classify = Ember.String.classify;
if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPE... | true |
Other | emberjs | ember.js | c0207ba0a0948f70ed65f5e3095ec7ea40463259.json | Add capitalize function to Ember.String
Conflicts:
packages/ember-runtime/lib/ext/string.js | packages/ember-runtime/lib/system/string.js | @@ -214,5 +214,22 @@ Ember.String = {
underscore: function(str) {
return str.replace(STRING_UNDERSCORE_REGEXP_1, '$1_$2').
replace(STRING_UNDERSCORE_REGEXP_2, '_').toLowerCase();
+ },
+
+ /**
+ Returns the Capitalized form of a string
+
+ 'innerHTML'.capitalize() => 'InnerHTML'
+ ... | true |
Other | emberjs | ember.js | c0207ba0a0948f70ed65f5e3095ec7ea40463259.json | Add capitalize function to Ember.String
Conflicts:
packages/ember-runtime/lib/ext/string.js | packages/ember-runtime/tests/system/string/capitalize.js | @@ -0,0 +1,44 @@
+// ==========================================================================
+// Project: Ember Runtime
+// Copyright: ©2006-2011 Strobe Inc. and contributors.
+// ©2008-2011 Apple Inc. All rights reserved.
+// License: Licensed under MIT license (see license.js)
+// ===================... | true |
Other | emberjs | ember.js | a511b094fc720f5ba4c612c3dff610f3dc39d231.json | Add custom names to Ember.Namespace | packages/ember-runtime/lib/system/namespace.js | @@ -5,7 +5,7 @@ require('ember-runtime/system/object');
@submodule ember-runtime
*/
-var indexOf = Ember.ArrayPolyfills.indexOf;
+var get = Ember.get, indexOf = Ember.ArrayPolyfills.indexOf;
/**
A Namespace is an object usually used to contain other objects or methods
@@ -33,6 +33,9 @@ Ember.Namespace = Ember... | true |
Other | emberjs | ember.js | a511b094fc720f5ba4c612c3dff610f3dc39d231.json | Add custom names to Ember.Namespace | packages/ember-runtime/tests/system/namespace/base_test.js | @@ -79,3 +79,19 @@ test("Lowercase namespaces should be deprecated", function() {
// Ignore backtrace
equal(loggerWarning.split("\n")[0], "DEPRECATION: Namespaces should not begin with lowercase.");
});
+
+test("A namespace can be assigned a custom name", function() {
+ var nsA = Ember.Namespace.create({
+ n... | true |
Other | emberjs | ember.js | 1948a604bf86200a5ab9187d93be669b370b5d5a.json | Reorganize mixins and mergeMixins | packages/ember-metal/lib/mixin.js | @@ -56,103 +56,136 @@ function isMethod(obj) {
obj !== Boolean && obj !== Object && obj !== Number && obj !== Array && obj !== Date && obj !== String;
}
-function mergeMixins(mixins, m, descs, values, base) {
- var len = mixins.length, idx, mixin, guid, props, value, key, ovalue, concats, meta;
+function ... | true |
Other | emberjs | ember.js | 1948a604bf86200a5ab9187d93be669b370b5d5a.json | Reorganize mixins and mergeMixins | packages/ember-metal/tests/mixin/required_test.js | @@ -21,23 +21,6 @@ module('Module.required', {
}
});
-test('applying a mixin with unmet requirement', function() {
- raises(function() {
- PartialMixin.apply(obj);
- }, Error, 'should raise error for unmet requirement');
-});
-
-test('applying a mixin with unmet requirement using applyPartial', function() {
... | true |
Other | emberjs | ember.js | f0b653e37b60e62cc16a69e28575af7387c386e3.json | Fix Select test to append to right place | packages/ember-handlebars/tests/controls/select_test.js | @@ -26,7 +26,7 @@ function setAndFlush(view, key, value) {
function append() {
Ember.run(function() {
- select.appendTo('body');
+ select.appendTo('#qunit-fixture');
});
}
| false |
Other | emberjs | ember.js | 041cb831cf3ed938ae765ab3b3a6484d25f0d26e.json | Fix precompilation test in IE | packages/ember-handlebars/tests/handlebars_test.js | @@ -1767,7 +1767,7 @@ test("should be able to use unbound helper in #each helper (with objects)", func
test("should work with precompiled templates", function() {
var templateString = Ember.Handlebars.precompile("{{view.value}}"),
- compiledTemplate = Ember.Handlebars.template(eval('('+templateString+')'));
... | false |
Other | emberjs | ember.js | e4b1b073b12f5baf2800cffab47d1f828988d58d.json | Fix prompt value in IE8 | packages/ember-handlebars/lib/controls/select.js | @@ -264,7 +264,7 @@ Ember.Select = Ember.View.extend(
tagName: 'select',
classNames: ['ember-select'],
- defaultTemplate: Ember.Handlebars.compile('{{#if view.prompt}}<option value>{{view.prompt}}</option>{{/if}}{{#each view.content}}{{view Ember.SelectOption contentBinding="this"}}{{/each}}'),
+ defaultTempl... | false |
Other | emberjs | ember.js | 0bc406cc0096f58b6f428afce4fdfb200c643fe5.json | Fix Select tests on IE8
Previously, the RenderBuffer was trying to set innerHTML on the select
tag which isn't supported by IE8. This add an assert for that case and
changes tests to avoid this. | packages/ember-handlebars/tests/controls/select_test.js | @@ -1,18 +1,21 @@
var map = Ember.EnumerableUtils.map;
-var dispatcher, select;
+var dispatcher, wrapper, select;
module("Ember.Select", {
setup: function() {
dispatcher = Ember.EventDispatcher.create();
dispatcher.setup();
+ wrapper = Ember.ContainerView.create();
select = Ember.Select.creat... | true |
Other | emberjs | ember.js | 0bc406cc0096f58b6f428afce4fdfb200c643fe5.json | Fix Select tests on IE8
Previously, the RenderBuffer was trying to set innerHTML on the select
tag which isn't supported by IE8. This add an assert for that case and
changes tests to avoid this. | packages/ember-views/lib/system/render_buffer.js | @@ -81,6 +81,27 @@ var setInnerHTML = function(element, html) {
/*** END METAMORPH HELPERS */
+var allowedTags = {};
+var allowedAsRoot = function(tagName) {
+ if (allowedTags[tagName] !== undefined) {
+ return allowedTags[tagName];
+ }
+
+ var allowed = true;
+
+ // IE 8 and earlier don't allow us to do in... | true |
Other | emberjs | ember.js | 7867be4471a3111e828b35dade7c8b2d036e5a78.json | Update router.js (allow redirection) | packages/ember-routing/lib/vendor/router.js | @@ -82,9 +82,10 @@ define("router",
var params = output.params, toSetup = output.toSetup;
- setupContexts(this, toSetup);
var url = this.recognizer.generate(name, params);
this.updateURL(url);
+
+ setupContexts(this, toSetup);
},
/** | false |
Other | emberjs | ember.js | 3c489d6f3263895c672692b9b3b171fea7191924.json | Fix bug with metamorph views and outlets | packages/ember-routing/lib/handlebars_ext.js | @@ -54,7 +54,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
property = 'main';
}
- options.hash.currentViewBinding = "view._outlets." + property;
+ options.hash.currentViewBinding = "_view._outlets." + property;
return Handlebars.helpers.view.call(this, Handlebars.OutletView, op... | true |
Other | emberjs | ember.js | 3c489d6f3263895c672692b9b3b171fea7191924.json | Fix bug with metamorph views and outlets | packages/ember-routing/tests/helpers/outlet_test.js | @@ -70,3 +70,34 @@ test("outlet should support an optional name", function() {
equal(view.$().text(), 'HIBYE');
});
+
+test("Outlets bind to the current view, not the current concrete view", function() {
+ var parentTemplate = "<h1>HI</h1>{{outlet}}";
+ var middleTemplate = "<h2>MIDDLE</h2>{{outlet}}";
+ var b... | true |
Other | emberjs | ember.js | 3c489d6f3263895c672692b9b3b171fea7191924.json | Fix bug with metamorph views and outlets | packages/ember-views/lib/views/view.js | @@ -1115,6 +1115,7 @@ Ember.View = Ember.CoreView.extend(
var keywords = templateData ? Ember.copy(templateData.keywords) : {};
set(keywords, 'view', get(this, 'concreteView'));
+ set(keywords, '_view', this);
set(keywords, 'controller', get(this, 'controller'));
return keywords; | true |
Other | emberjs | ember.js | cc75d4e4e493d6322000d86f7939500fb46e7ec4.json | Fix extra closing tag in RenderBuffer | packages/ember-views/lib/system/render_buffer.js | @@ -306,7 +306,8 @@ Ember._RenderBuffer.prototype =
},
generateElement: function() {
- var element = document.createElement(this.currentTagName()),
+ var tagName = this.tagNames.pop(), // pop since we don't need to close
+ element = document.createElement(tagName),
$element = Ember.$(eleme... | false |
Other | emberjs | ember.js | e4a867039190a4b59bee434f8776731ae7dbc484.json | Fix an instance of Array#indexOf in IE8 | packages/ember-runtime/lib/system/core_object.js | @@ -25,7 +25,8 @@ var set = Ember.set, get = Ember.get,
finishPartial = Mixin.finishPartial,
reopen = Mixin.prototype.reopen,
classToString = Mixin.prototype.toString,
- MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
+ MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER,
+ indexOf = Ember.EnumerableUt... | false |
Other | emberjs | ember.js | d198eae4ce40e4884d5a2e76429c2d819e631503.json | Add view to active views in routes | packages/ember-routing/lib/system/route.js | @@ -85,6 +85,8 @@ Ember.Route = Ember.Object.extend({
className = classify(templateName),
view = container.lookup('view:' + templateName) || DefaultView.create();
+ this.router._activeViews[templateName] = view;
+
set(view, 'template', container.lookup('template:' + templateName));
op... | false |
Other | emberjs | ember.js | c9edfccbcf3b172228d3e2ba85c3d2cc3a4ebe7a.json | use prop instead of attr to make git query happy | packages/ember-handlebars/tests/controls/select_test.js | @@ -591,7 +591,7 @@ test("select element should correctly initialize and update selectedIndex and bo
equal(selectEl.selectedIndex, 2, "Precond: The DOM reflects the correct selection");
select.$('option:eq(2)').removeAttr('selected');
- select.$('option:eq(1)').attr('selected', true);
+ select.$('option:eq(1)... | false |
Other | emberjs | ember.js | da2b2a0f2aa7586254985827555bf7722114be54.json | Pass the container and namespace into initializers | packages/ember-application/lib/system/application.js | @@ -430,6 +430,7 @@ var Application = Ember.Application = Ember.Namespace.extend(
runInitializers: function() {
var router = this.container.lookup('router:main'),
initializers = get(this.constructor, 'initializers'),
+ container = this.container,
graph = new Ember.DAG(),
namesp... | false |
Other | emberjs | ember.js | 479d6bb6ec9d3dfc202a1576ff1e6d71009ede2c.json | Add linkTo test | packages/ember-routing/lib/handlebars_ext.js | @@ -72,3 +72,54 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
});
});
+
+function args(linkView) {
+ var ret = [ linkView.namedRoute ],
+ params = linkView.parameters,
+ contexts = params.contexts,
+ roots = params.roots,
+ data = params.data;
+
+ for (var i=0, l=contexts.length... | true |
Other | emberjs | ember.js | 479d6bb6ec9d3dfc202a1576ff1e6d71009ede2c.json | Add linkTo test | packages/ember-routing/lib/system/route.js | @@ -18,7 +18,9 @@ Ember.Route = Ember.Object.extend({
setup: function(context) {
var templateName = this.templateName,
controller = this.lookup('controller', templateName, function() {
- if (context) {
+ if (context && context.isSCArray) {
+ return Ember.ArrayController.cre... | true |
Other | emberjs | ember.js | 479d6bb6ec9d3dfc202a1576ff1e6d71009ede2c.json | Add linkTo test | packages/ember-routing/tests/helpers/link_to_test.js | @@ -0,0 +1,133 @@
+var Router, App, AppView, templates, router, eventDispatcher;
+var get = Ember.get, set = Ember.set;
+
+function bootApplication() {
+ router = Router.create({
+ location: 'none'
+ });
+
+ Ember.run(function() {
+ router._activeViews.application = AppView.create().appendTo('#qunit-fixture');... | true |
Other | emberjs | ember.js | 479d6bb6ec9d3dfc202a1576ff1e6d71009ede2c.json | Add linkTo test | packages/ember-views/lib/views/view.js | @@ -864,9 +864,9 @@ Ember.View = Ember.CoreView.extend(
@type Object
*/
controller: Ember.computed(function(key) {
- var parentView = get(this, 'parentView');
+ var parentView = get(this, '_parentView');
return parentView ? get(parentView, 'controller') : null;
- }).property(),
+ }).property('_p... | true |
Other | emberjs | ember.js | 9d13b7cf3dff1bd3298bbbe48da01d94bd848f56.json | Remove excessive instrumentation | packages/ember-handlebars/lib/helpers/binding.js | @@ -20,7 +20,6 @@ function bind(property, options, preserveContext, shouldDisplay, valueNormalizer
fn = options.fn,
inverse = options.inverse,
view = data.view,
- instrumentName = view.instrumentName,
currentContext = this,
pathRoot, path, normalized,
observer;
@@ -50,28 +... | true |
Other | emberjs | ember.js | 9d13b7cf3dff1bd3298bbbe48da01d94bd848f56.json | Remove excessive instrumentation | packages/ember-handlebars/lib/helpers/collection.js | @@ -149,7 +149,6 @@ Ember.Handlebars.registerHelper('collection', function(path, options) {
var data = options.data;
var inverse = options.inverse;
var view = options.data.view;
- var instrumentName = view.instrumentName;
// If passed a path string, convert that into an object.
// Otherwise, just defa... | true |
Other | emberjs | ember.js | 9d13b7cf3dff1bd3298bbbe48da01d94bd848f56.json | Remove excessive instrumentation | packages/ember-handlebars/lib/views/handlebars_bound_view.js | @@ -51,16 +51,7 @@ SimpleHandlebarsView.prototype = {
return result;
},
- renderToBuffer: function(parentBuffer) {
- var name = 'render-to-buffer.simpleHandlebars',
- details = { object: '<Ember._SimpleHandlebarsView>' };
-
- return Ember.instrument(name, details, function() {
- return this... | true |
Other | emberjs | ember.js | 9d13b7cf3dff1bd3298bbbe48da01d94bd848f56.json | Remove excessive instrumentation | packages/ember-views/lib/views/view.js | @@ -135,7 +135,7 @@ Ember.CoreView = Ember.Object.extend(Ember.Evented, {
be used.
*/
renderToBuffer: function(parentBuffer, bufferOperation) {
- var name = 'render-to-buffer.' + this.instrumentName,
+ var name = 'render.' + this.instrumentName,
details = {};
this.instrumentDetails(de... | true |
Other | emberjs | ember.js | 50cfa59755418192c7f17a2564c7bea72c66811a.json | Remove excessive instrumentation | packages/ember-handlebars/lib/helpers/binding.js | @@ -20,7 +20,6 @@ function bind(property, options, preserveContext, shouldDisplay, valueNormalizer
fn = options.fn,
inverse = options.inverse,
view = data.view,
- instrumentName = view.instrumentName,
currentContext = this,
pathRoot, path, normalized,
observer;
@@ -50,28 +... | true |
Other | emberjs | ember.js | 50cfa59755418192c7f17a2564c7bea72c66811a.json | Remove excessive instrumentation | packages/ember-handlebars/lib/helpers/collection.js | @@ -149,7 +149,6 @@ Ember.Handlebars.registerHelper('collection', function(path, options) {
var data = options.data;
var inverse = options.inverse;
var view = options.data.view;
- var instrumentName = view.instrumentName;
// If passed a path string, convert that into an object.
// Otherwise, just defa... | true |
Other | emberjs | ember.js | 50cfa59755418192c7f17a2564c7bea72c66811a.json | Remove excessive instrumentation | packages/ember-handlebars/lib/views/handlebars_bound_view.js | @@ -51,16 +51,7 @@ SimpleHandlebarsView.prototype = {
return result;
},
- renderToBuffer: function(parentBuffer) {
- var name = 'render-to-buffer.simpleHandlebars',
- details = { object: '<Ember._SimpleHandlebarsView>' };
-
- return Ember.instrument(name, details, function() {
- return this... | true |
Other | emberjs | ember.js | 50cfa59755418192c7f17a2564c7bea72c66811a.json | Remove excessive instrumentation | packages/ember-views/lib/views/view.js | @@ -135,7 +135,7 @@ Ember.CoreView = Ember.Object.extend(Ember.Evented, {
be used.
*/
renderToBuffer: function(parentBuffer, bufferOperation) {
- var name = 'render-to-buffer.' + this.instrumentName,
+ var name = 'render.' + this.instrumentName,
details = {};
this.instrumentDetails(de... | true |
Other | emberjs | ember.js | ab469a432a33740f3c182ee36304bcd2b87c7469.json | Move tests to ember-old-router | packages/ember-old-router/tests/application_test.js | @@ -0,0 +1,46 @@
+require('ember-application');
+
+var set = Ember.set, get = Ember.get;
+var app;
+
+module("Ember.Application initialization", {
+ teardown: function() {
+ Ember.run(function(){ app.destroy(); });
+ }
+});
+
+test('initialized application go to initial route', function() {
+ Ember.run(function()... | true |
Other | emberjs | ember.js | ab469a432a33740f3c182ee36304bcd2b87c7469.json | Move tests to ember-old-router | packages/ember-old-router/tests/helpers/action_test.js | @@ -0,0 +1,116 @@
+var namespace = {
+ "Component": {
+ toString: function() { return "Component"; },
+ find: function() { return { id: 1 }; }
+ }
+};
+
+var compile = function(string) {
+ return Ember.Handlebars.compile(string);
+};
+
+test("it sets an URL with a context", function() {
+ var router = Ember.R... | true |
Other | emberjs | ember.js | cd2645c15c173745d52fd9539e7cef87b3126059.json | Remove straggling test | packages/ember-views/tests/views/view/nearest_view_test.js | @@ -1,92 +0,0 @@
-var set = Ember.set, get = Ember.get;
-
-module("Ember.View nearest view helpers");
-
-test("collectionView should return the nearest collection view", function() {
- var itemViewChild;
-
- var view = Ember.CollectionView.create({
- content: Ember.A([1, 2, 3]),
- isARealCollection: true,
-
- ... | false |
Other | emberjs | ember.js | 4f651930b51756388b6aa7517f550f3aca769d01.json | Remove the nearest view computed properties
(but leave the method-style lookups) | packages/ember-views/lib/views/view.js | @@ -1082,38 +1082,6 @@ Ember.View = Ember.CoreView.extend(
}
},
- /**
- Return the nearest ancestor that is an `Ember.CollectionView`
-
- @property collectionView
- @return Ember.CollectionView
- */
- collectionView: Ember.computed(function() {
- return this.nearestOfType(Ember.CollectionView);... | true |
Other | emberjs | ember.js | 4f651930b51756388b6aa7517f550f3aca769d01.json | Remove the nearest view computed properties
(but leave the method-style lookups) | packages/ember-views/tests/views/view/nearest_of_type_test.js | @@ -1,6 +1,6 @@
var set = Ember.set, get = Ember.get;
-module("Ember.View#nearestOfType");
+module("Ember.View#nearest*");
(function() {
var Mixin = Ember.Mixin.create({}),
@@ -34,4 +34,24 @@ module("Ember.View#nearestOfType");
equal(child.nearestOfType(Mixin), parent, "finds closest view in the hierarchy... | true |
Other | emberjs | ember.js | b7b832437a896a02180ec59ef490c4c14b832ffc.json | Add a views test suite from rake | Rakefile | @@ -75,6 +75,7 @@ task :test, [:suite] => :dist do |t, args|
suites = {
:default => packages.map{|p| "package=#{p}" },
:runtime => [ "package=ember-metal,ember-runtime" ],
+ :views => [ "package=ember-views,ember-handlebars" ],
:all => packages.map{|p| "package=#{p}" } +
["package=al... | false |
Other | emberjs | ember.js | 8bb14d5e3b50abc58d7ed9b053709e604070de00.json | Move location to ember-routing | packages/ember-routing/lib/location.js | @@ -0,0 +1,5 @@
+require('ember-views');
+require('ember-routing/location/api');
+require('ember-routing/location/none_location');
+require('ember-routing/location/hash_location');
+require('ember-routing/location/history_location'); | true |
Other | emberjs | ember.js | 8bb14d5e3b50abc58d7ed9b053709e604070de00.json | Move location to ember-routing | packages/ember-routing/lib/location/api.js | @@ -0,0 +1,50 @@
+/**
+@module ember
+@submodule ember-old-router
+*/
+
+var get = Ember.get, set = Ember.set;
+
+/*
+ This file implements the `location` API used by Ember's router.
+
+ That API is:
+
+ getURL: returns the current URL
+ setURL(path): sets the current URL
+ onUpdateURL(callback): triggers the call... | true |
Other | emberjs | ember.js | 8bb14d5e3b50abc58d7ed9b053709e604070de00.json | Move location to ember-routing | packages/ember-routing/lib/location/hash_location.js | @@ -0,0 +1,96 @@
+/**
+@module ember
+@submodule ember-old-router
+*/
+
+var get = Ember.get, set = Ember.set;
+
+/**
+ Ember.HashLocation implements the location API using the browser's
+ hash. At present, it relies on a hashchange event existing in the
+ browser.
+
+ @class HashLocation
+ @namespace Ember
+ @ex... | true |
Other | emberjs | ember.js | 8bb14d5e3b50abc58d7ed9b053709e604070de00.json | Move location to ember-routing | packages/ember-routing/lib/location/history_location.js | @@ -0,0 +1,152 @@
+/**
+@module ember
+@submodule ember-old-router
+*/
+
+var get = Ember.get, set = Ember.set;
+var popstateReady = false;
+
+/**
+ Ember.HistoryLocation implements the location API using the browser's
+ history.pushState API.
+
+ @class HistoryLocation
+ @namespace Ember
+ @extends Ember.Object
+... | true |
Other | emberjs | ember.js | 8bb14d5e3b50abc58d7ed9b053709e604070de00.json | Move location to ember-routing | packages/ember-routing/lib/location/none_location.js | @@ -0,0 +1,41 @@
+/**
+@module ember
+@submodule ember-old-router
+*/
+
+var get = Ember.get, set = Ember.set;
+
+/**
+ Ember.NoneLocation does not interact with the browser. It is useful for
+ testing, or when you need to manage state with your Router, but temporarily
+ don't want it to muck with the URL (for examp... | true |
Other | emberjs | ember.js | aa3cb1eeac5ebe2e85b3bebf0b9f458d9b38237e.json | Remove straggling test | packages/ember-views/tests/views/view/nearest_view_test.js | @@ -1,92 +0,0 @@
-var set = Ember.set, get = Ember.get;
-
-module("Ember.View nearest view helpers");
-
-test("collectionView should return the nearest collection view", function() {
- var itemViewChild;
-
- var view = Ember.CollectionView.create({
- content: Ember.A([1, 2, 3]),
- isARealCollection: true,
-
- ... | false |
Other | emberjs | ember.js | 558b888b6eb27333f919749a03e956248771d2dc.json | Remove the nearest view computed properties
(but leave the method-style lookups) | packages/ember-views/lib/views/view.js | @@ -1082,38 +1082,6 @@ Ember.View = Ember.CoreView.extend(
}
},
- /**
- Return the nearest ancestor that is an `Ember.CollectionView`
-
- @property collectionView
- @return Ember.CollectionView
- */
- collectionView: Ember.computed(function() {
- return this.nearestOfType(Ember.CollectionView);... | true |
Other | emberjs | ember.js | 558b888b6eb27333f919749a03e956248771d2dc.json | Remove the nearest view computed properties
(but leave the method-style lookups) | packages/ember-views/tests/views/view/nearest_of_type_test.js | @@ -1,6 +1,6 @@
var set = Ember.set, get = Ember.get;
-module("Ember.View#nearestOfType");
+module("Ember.View#nearest*");
(function() {
var Mixin = Ember.Mixin.create({}),
@@ -34,4 +34,24 @@ module("Ember.View#nearestOfType");
equal(child.nearestOfType(Mixin), parent, "finds closest view in the hierarchy... | true |
Other | emberjs | ember.js | cadc544ba17471d12a7b58f07a6577f94569b53f.json | Add a views test suite from rake | Rakefile | @@ -75,6 +75,7 @@ task :test, [:suite] => :dist do |t, args|
suites = {
:default => packages.map{|p| "package=#{p}" },
:runtime => [ "package=ember-metal,ember-runtime" ],
+ :views => [ "package=ember-views,ember-handlebars" ],
:all => packages.map{|p| "package=#{p}" } +
["package=al... | false |
Other | emberjs | ember.js | 4df1d40e5b650fa20c598b36f5da14e7ab2aa5e9.json | change bindingContext to context | packages/ember-handlebars/lib/helpers/view.js | @@ -82,18 +82,14 @@ EmberHandlebars.ViewHelper = Ember.Object.create({
//
// is converted to this:
//
- // classNameBinding="bindingContext.isGreen:green"
+ // classNameBinding="context.isGreen:green"
var parsedPath = Ember.View._parsePropertyPath(fu... | true |
Other | emberjs | ember.js | 4df1d40e5b650fa20c598b36f5da14e7ab2aa5e9.json | change bindingContext to context | packages/ember-handlebars/tests/handlebars_test.js | @@ -2351,7 +2351,7 @@ test("should accept bindings as a string or an Ember.Binding", function() {
Ember.Handlebars.registerHelper('boogie', function(id, options) {
options.hash = options.hash || {};
- options.hash.bindingTestBinding = Ember.Binding.oneWay('bindingContext.' + id);
+ options.hash.bindingT... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-handlebars/tests/controls/text_area_test.js | @@ -125,7 +125,7 @@ test("input tabindex is updated when setting tabindex property of view", functio
test("value binding works properly for inputs that haven't been created", function() {
Ember.run(function() {
- textArea = Ember.TextArea.create({
+ textArea = Ember.TextArea.createWithMixins({
valueB... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-handlebars/tests/controls/text_field_test.js | @@ -121,7 +121,7 @@ test("input type is configurable when creating view", function() {
test("value binding works properly for inputs that haven't been created", function() {
Ember.run(function() {
- textField = Ember.TextField.create({
+ textField = Ember.TextField.createWithMixins({
valueBinding: 'T... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-handlebars/tests/handlebars_test.js | @@ -103,7 +103,7 @@ test("template view should call the function of the associated template", functi
});
test("template view should call the function of the associated template with itself as the context", function() {
- view = Ember.View.create({
+ view = Ember.View.createWithMixins({
templateName: 'test_te... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/lib/system/core_object.js | @@ -24,7 +24,8 @@ var set = Ember.set, get = Ember.get,
applyMixin = Mixin._apply,
finishPartial = Mixin.finishPartial,
reopen = Mixin.prototype.reopen,
- classToString = Mixin.prototype.toString;
+ classToString = Mixin.prototype.toString,
+ MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
var... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/legacy_1x/mixins/observable/observable_test.js | @@ -41,7 +41,7 @@ var originalLookup = Ember.lookup, lookup;
module("object.get()", {
setup: function() {
- object = ObservableObject.create(Ember.Observable, {
+ object = ObservableObject.createWithMixins(Ember.Observable, {
normal: 'value',
numberVal: 24,
@@ -90,7 +90,7 @@ test("should cal... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/legacy_1x/mixins/observable/propertyChanges_test.js | @@ -24,7 +24,7 @@ var revMatches = false , ObjectA;
module("object.propertyChanges", {
setup: function() {
- ObjectA = ObservableObject.create({
+ ObjectA = ObservableObject.createWithMixins({
foo : 'fooValue',
prop : 'propValue',
@@ -115,7 +115,7 @@ test("should notify that the property of... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/legacy_1x/system/binding_test.js | @@ -80,7 +80,7 @@ test("deferred observing during bindings", function() {
value2: 'value2'
});
- toObject = Ember.Object.create({
+ toObject = Ember.Object.createWithMixins({
value1: 'value1',
value2: 'value2',
@@ -164,7 +164,7 @@ module("chained binding", {
Ember.run(function() {
fi... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/legacy_1x/system/object/base_test.js | @@ -80,7 +80,7 @@ module("Ember.Object observers", {
};
// create an object
- obj = Ember.Object.create({
+ obj = Ember.Object.createWithMixins({
prop1: null,
// normal observer | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/legacy_1x/system/object/bindings_test.js | @@ -114,7 +114,7 @@ module("fooBinding method", fooBindingModuleOpts);
test("fooBinding: TestNamespace.fromObject.bar should follow absolute path", function() {
// create binding
Ember.run(function(){
- testObject = TestObject.create({
+ testObject = TestObject.createWithMixins({
fooBinding: "TestNa... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/legacy_1x/system/run_loop_test.js | @@ -21,7 +21,7 @@ module("System:run_loop() - chained binding", {
output: 'MyApp.first'
}) ;
- MyApp.second = Ember.Object.create(Ember.Observable, {
+ MyApp.second = Ember.Object.createWithMixins(Ember.Observable, {
input: 'MyApp.second',
output: 'MyApp.second',
| true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/legacy_1x/system/set_test.js | @@ -41,7 +41,7 @@ test("new Ember.Set([1,2,3]) should create set with three items in them", functi
});
test("new Ember.Set() should accept anything that implements Ember.Array", function() {
- var arrayLikeObject = Ember.Object.create(Ember.Array, {
+ var arrayLikeObject = Ember.Object.createWithMixins(Ember.Arra... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/mixins/array_test.js | @@ -87,7 +87,7 @@ module('mixins/array/arrayContent[Will|Did]Change');
test('should notify observers of []', function() {
- obj = DummyArray.create({
+ obj = DummyArray.createWithMixins({
_count: 0,
enumerablePropertyDidChange: Ember.observer(function() {
this._count++;
@@ -109,7 +109,7 @@ test(... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/mixins/deferred_test.js | @@ -5,7 +5,7 @@ test("can resolve deferred", function() {
var deferred, count = 0;
Ember.run(function() {
- deferred = Ember.Object.create(Ember.Deferred);
+ deferred = Ember.Object.createWithMixins(Ember.Deferred);
});
deferred.then(function() {
@@ -28,7 +28,7 @@ test("can reject deferred", funct... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/mixins/enumerable_test.js | @@ -74,7 +74,7 @@ module('mixins/enumerable/enumerableContentDidChange');
test('should notify observers of []', function() {
- var obj = Ember.Object.create(Ember.Enumerable, {
+ var obj = Ember.Object.createWithMixins(Ember.Enumerable, {
nextObject: function() {}, // avoid exceptions
_count: 0,
@@ -... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/mixins/observable_test.js | @@ -38,7 +38,7 @@ test('should be able to use setProperties to set multiple properties at once', f
testBoth('calling setProperties completes safely despite exceptions', function(get,set) {
var exc = new Error("Something unexpected happened!");
- var obj = Ember.Object.create({
+ var obj = Ember.Object.createWit... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/mixins/sortable_test.js | @@ -11,7 +11,7 @@ module("Ember.Sortable with content", {
unsortedArray = Ember.A(Ember.A(array).copy());
- sortedArrayController = Ember.ArrayProxy.create(Ember.SortableMixin, {
+ sortedArrayController = Ember.ArrayProxy.createWithMixins(Ember.SortableMixin, {
content: unsortedArray
... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/mixins/target_action_support_test.js | @@ -14,15 +14,15 @@ module("Ember.TargetActionSupport", {
test("it should return false if no target or action are specified", function() {
expect(1);
- var obj = Ember.Object.create(Ember.TargetActionSupport);
+ var obj = Ember.Object.createWithMixins(Ember.TargetActionSupport);
ok(false === obj.triggerAct... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/system/array_proxy/content_update_test.js | @@ -10,7 +10,7 @@ test("The `contentArrayDidChange` method is invoked after `content` is updated."
var proxy, observerCalled = false;
- proxy = Ember.ArrayProxy.create({
+ proxy = Ember.ArrayProxy.createWithMixins({
content: Ember.A([]),
arrangedContent: Ember.computed('content', function(key, valu... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/system/object/create_test.js | @@ -2,15 +2,79 @@
module('Ember.Object.create');
+test("simple properties are set", function() {
+ var o = Ember.Object.create({ohai: 'there'});
+ equal(o.get('ohai'), 'there');
+});
+
+test("calls computed property setters", function() {
+ var MyClass = Ember.Object.extend({
+ foo: Ember.computed(function(k... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/system/object/destroy_test.js | @@ -17,7 +17,7 @@ test("should schedule objects to be destroyed at the end of the run loop", funct
test("should raise an exception when modifying watched properties on a destroyed object", function() {
if (Ember.platform.hasAccessors) {
- var obj = Ember.Object.create({
+ var obj = Ember.Object.createWithMi... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/system/object/events_test.js | @@ -4,7 +4,7 @@ test("a listener can be added to an object", function() {
var count = 0;
var F = function() { count++; };
- var obj = Ember.Object.create(Ember.Evented);
+ var obj = Ember.Object.createWithMixins(Ember.Evented);
obj.on('event!', F);
obj.trigger('event!');
@@ -20,7 +20,7 @@ test("a list... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/system/object/extend_test.js | @@ -42,7 +42,7 @@ test('Overriding a method several layers deep', function() {
equal(obj.barCnt, 2, 'should invoke both');
// Try overriding on create also
- obj = FinalClass.create({
+ obj = FinalClass.createWithMixins({
foo: function() { this.fooCnt++; this._super(); }
});
| true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-runtime/tests/system/object/observer_test.js | @@ -55,7 +55,7 @@ testBoth('observer on subclass', function(get, set) {
testBoth('observer on instance', function(get, set) {
- var obj = Ember.Object.create({
+ var obj = Ember.Object.createWithMixins({
count: 0,
@@ -84,7 +84,7 @@ testBoth('observer on instance overridding class', function(get, set) {
... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-views/lib/views/view.js | @@ -2159,7 +2159,7 @@ Ember.View = Ember.CoreView.extend(
attrs._parentView = this;
attrs.templateData = attrs.templateData || get(this, 'templateData');
- view = view.create(attrs);
+ view = view.createWithMixins(attrs);
// don't set the property on a virtual view, as they are invisi... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-views/tests/system/event_dispatcher_test.js | @@ -24,7 +24,7 @@ test("should dispatch events to views", function() {
var childKeyDownCalled = 0;
var parentKeyDownCalled = 0;
- view = Ember.ContainerView.create({
+ view = Ember.ContainerView.createWithMixins({
childViews: ['child'],
child: Ember.View.extend({
@@ -80,7 +80,7 @@ test("should dis... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-views/tests/system/jquery_ext_test.js | @@ -53,7 +53,7 @@ test("drop handler should receive event with dataTransfer property", function()
var receivedEvent;
var dropCalled = 0;
- view = Ember.View.create({
+ view = Ember.View.createWithMixins({
render: function(buffer) {
buffer.push('please drop stuff on me');
this._super(buffer)... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-views/tests/views/container_view_test.js | @@ -34,7 +34,7 @@ test("should be able to observe properties that contain child views", function()
var container;
Ember.run(function() {
- container = Ember.ContainerView.create({
+ container = Ember.ContainerView.createWithMixins({
childViews: ['displayView'],
displayIsDisplayedBinding: 'di... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-views/tests/views/view/init_test.js | @@ -28,9 +28,11 @@ test("registers itself with a controller if the viewController property is set",
equal(lookup.TestApp.fooController.get('view'), v, "sets the view property of the controller");
});
+module("Ember.View.createWithMixins");
+
test("should warn if a non-array is used for classNames", function() {
... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-views/tests/views/view/render_test.js | @@ -10,15 +10,15 @@ module("Ember.View#render");
test("default implementation does not render child views", function() {
var rendered = 0, updated = 0, parentRendered = 0, parentUpdated = 0 ;
- var view = Ember.ContainerView.create({
+ var view = Ember.ContainerView.createWithMixins({
childViews: ["child"]... | true |
Other | emberjs | ember.js | c1c720781c976f69fd4014ea50a1fee652286048.json | Change the behavior of Ember.Object.create().
The prior create behavior is available as
Ember.Object.createWithMixins().
We suggest using Ember.Object.extend() to create classes and use create
to initialize properties on your instance.
The new behavior will call computed property setters instead of
overwriting them.... | packages/ember-views/tests/views/view/view_lifecycle_test.js | @@ -33,7 +33,7 @@ test("should create and append a DOM element after bindings have synced", functi
fakeThing: 'controllerPropertyValue'
});
- view = Ember.View.create({
+ view = Ember.View.createWithMixins({
fooBinding: 'ViewTest.fakeController.fakeThing',
render: function(buffer) { | true |
Other | emberjs | ember.js | 635de93a9329f3f3fbf53473542b266805f81cc6.json | Use Ember.$ in the tests | packages/ember-views/tests/system/render_buffer_test.js | @@ -179,6 +179,6 @@ test("properly handles old IE's zero-scope bug", function() {
buffer.push('<script></script>foo');
var element = buffer.element();
- ok($(element).html().match(/script/i), "should have script tag");
- ok(!$(element).html().match(/­/), "should not have ­");
+ ok(Ember.$(element).ht... | false |
Other | emberjs | ember.js | 16b3af3762bcf3b430c677de3eebff25236f3cac.json | Use createElement and innerHTML | packages/ember-views/lib/system/render_buffer.js | @@ -348,14 +348,44 @@ Ember._RenderBuffer.prototype =
of this buffer
*/
element: function() {
- return Ember.$(this.string())[0];
+ var element = document.createElement(this.elementTag),
+ id = this.elementId,
+ classes = this.elementClasses,
+ attrs = this.elementAttributes,
+ ... | false |
Other | emberjs | ember.js | 37107a04e46852086077f428d99f91e7d59926fb.json | Implement a default computed property setter.
If your computed property's function is defined with two arguments we
assume you've implemented a setter. If you do not implement a setter, we will
overwrite the computed property with the value you've set. | packages/ember-metal/lib/computed.js | @@ -314,8 +314,11 @@ ComputedPropertyPrototype.set = function(obj, keyName, value) {
// argument.
if (func.length === 3) {
ret = func.call(obj, keyName, value, cachedValue);
- } else {
+ } else if (func.length === 2) {
ret = func.call(obj, keyName, value);
+ } else {
+ Ember.define... | true |
Other | emberjs | ember.js | 37107a04e46852086077f428d99f91e7d59926fb.json | Implement a default computed property setter.
If your computed property's function is defined with two arguments we
assume you've implemented a setter. If you do not implement a setter, we will
overwrite the computed property with the value you've set. | packages/ember-metal/tests/computed_test.js | @@ -178,7 +178,7 @@ module('Ember.computed - cacheable', {
setup: function() {
obj = {};
count = 0;
- Ember.defineProperty(obj, 'foo', Ember.computed(function() {
+ Ember.defineProperty(obj, 'foo', Ember.computed(function(key, value) {
count++;
return 'bar '+count;
}));
@@ -290,7 +... | true |
Other | emberjs | ember.js | 27cca3ff3d67bcd9972d3d7f4480c084b7acf843.json | Add support for {{action}} and events | .jshintrc | @@ -15,6 +15,7 @@
"requireModule",
"equal",
"test",
+ "asyncTest",
"testBoth",
"testWithDefault",
"raises", | true |
Other | emberjs | ember.js | 27cca3ff3d67bcd9972d3d7f4480c084b7acf843.json | Add support for {{action}} and events | packages/ember-handlebars/lib/helpers/action.js | @@ -44,7 +44,7 @@ ActionHelper.registerAction = function(actionName, options) {
var target = options.target;
// Check for StateManager (or compatible object)
- if (target.isState && typeof target.send === 'function') {
+ if (typeof target.send === 'function') {
return target.send(acti... | true |
Other | emberjs | ember.js | 27cca3ff3d67bcd9972d3d7f4480c084b7acf843.json | Add support for {{action}} and events | packages/ember-routing/lib/system/route.js | @@ -49,8 +49,10 @@ Ember.Route = Ember.Object.extend({
return modelClass.find(value);
},
- setupControllers: function(context) {
-
+ setupControllers: function(controller, context) {
+ if (controller) {
+ controller.set('content', context);
+ }
},
controller: function(name) {
@@ -77,6 +79... | true |
Other | emberjs | ember.js | 27cca3ff3d67bcd9972d3d7f4480c084b7acf843.json | Add support for {{action}} and events | packages/ember-routing/lib/system/router.js | @@ -26,6 +26,14 @@ Ember.Router = Ember.Object.extend({
transitionTo: function(handler) {
var args = [].slice.call(arguments);
this.router.transitionTo.apply(this.router, args);
+ },
+
+ send: function(name, context) {
+ if (Ember.$ && context instanceof Ember.$.Event) {
+ context = context.conte... | true |
Other | emberjs | ember.js | 27cca3ff3d67bcd9972d3d7f4480c084b7acf843.json | Add support for {{action}} and events | packages/ember-routing/lib/vendor/router.js | @@ -116,8 +116,8 @@ define("router",
this.updateURL(url);
},
- trigger: function(name) {
- trigger(this, name);
+ trigger: function(name, context) {
+ trigger(this, name, context);
}
};
@@ -406,7 +406,7 @@ define("router",
return handlers;
}
- fun... | true |
Other | emberjs | ember.js | 27cca3ff3d67bcd9972d3d7f4480c084b7acf843.json | Add support for {{action}} and events | packages/ember-routing/tests/integration/basic_test.js | @@ -137,7 +137,7 @@ test("The Homepage with a `setupControllers` hook modifying other controllers",
equal(Ember.$('ul li', '#qunit-fixture').eq(2).text(), "Sunday: Noon to 6pm", "The template was rendered with the hours context");
});
-test("The Homepage getting its controller context via controllerContext", func... | true |
Other | emberjs | ember.js | 3634605361d7dca709838583de051b9a91e6d4d3.json | Implement basic serialize | packages/ember-routing/lib/system/route.js | @@ -20,6 +20,15 @@ Ember.Route = Ember.Object.extend({
return this.model(params);
},
+ serialize: function(model, params) {
+ if (params.length !== 1) { return; }
+
+ var name = params[0], object = {};
+ object[name] = get(model, 'id');
+
+ return object;
+ },
+
model: function(params) {
... | true |
Other | emberjs | ember.js | 3634605361d7dca709838583de051b9a91e6d4d3.json | Implement basic serialize | packages/ember-routing/lib/system/router.js | @@ -16,10 +16,16 @@ Ember.Router = Ember.Object.extend({
router.map(this.constructor.callback);
router.getHandler = getHandlerFunction(this, container);
+ router.updateURL = this.updateURL;
},
handleURL: function(url) {
this.router.handleURL(url);
+ },
+
+ transitionTo: function(handler) {... | true |
Other | emberjs | ember.js | 3634605361d7dca709838583de051b9a91e6d4d3.json | Implement basic serialize | packages/ember-routing/lib/vendor/router.js | @@ -103,7 +103,7 @@ define("router",
if (names.length) {
object = objects.shift();
- if (handler.serialize) { merge(params, handler.serialize(object)); }
+ if (handler.serialize) { merge(params, handler.serialize(object, names)); }
} else {
object ... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.