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 | 3634605361d7dca709838583de051b9a91e6d4d3.json | Implement basic serialize | packages/ember-routing/tests/integration/basic_test.js | @@ -1,8 +1,12 @@
-var Router, App, AppView, templates, router;
+var Router, App, AppView, templates, router, urls;
var get = Ember.get, set = Ember.set;
function bootApplication() {
- router = Router.create();
+ router = Router.create({
+ updateURL: function(url) {
+ urls.push(url);
+ }
+ });
Emb... | true |
Other | emberjs | ember.js | be91b981e3a9f88a871c54c5dcc18c57cedf5eaf.json | Add support for models | packages/ember-routing/lib/system/route.js | @@ -16,6 +16,14 @@ Ember.Route = Ember.Object.extend({
this.renderTemplates(context);
},
+ deserialize: function(params) {
+ return this.model(params);
+ },
+
+ model: function() {
+
+ },
+
setupControllers: function(context) {
}, | true |
Other | emberjs | ember.js | be91b981e3a9f88a871c54c5dcc18c57cedf5eaf.json | Add support for models | packages/ember-routing/tests/integration/basic_test.js | @@ -131,3 +131,69 @@ 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", fun... | true |
Other | emberjs | ember.js | 7758d8ed25c9ebc7af80016c75539e60bdf588fa.json | Remove separator code.
We don't need to support them without '*'. | packages/ember-metal/lib/watching.js | @@ -142,7 +142,7 @@ function isProto(pvalue) {
// A ChainNode watches a single key on an object. If you provide a starting
// value for the key then the node won't actually watch it. For a root node
// pass null for parent and key and object for value.
-var ChainNode = function(parent, key, value, separator) {
+va... | false |
Other | emberjs | ember.js | c4bdb77f4625fb134686b8aa52c8ec6a7baaa3a0.json | Convert chain watchers to use arrays.
This eliminates the use of guidFor when adding/removing chains. | packages/ember-metal/lib/watching.js | @@ -96,8 +96,8 @@ function addChainWatcher(obj, keyName, node) {
nodes = m.chainWatchers = { __emberproto__: obj };
}
- if (!nodes[keyName]) { nodes[keyName] = {}; }
- nodes[keyName][guidFor(node)] = node;
+ if (!nodes[keyName]) { nodes[keyName] = []; }
+ nodes[keyName].push(node);
Ember.watch(obj, key... | true |
Other | emberjs | ember.js | c4bdb77f4625fb134686b8aa52c8ec6a7baaa3a0.json | Convert chain watchers to use arrays.
This eliminates the use of guidFor when adding/removing chains. | packages/ember-metal/tests/watching/watch_test.js | @@ -181,15 +181,16 @@ test('when watching a global object, destroy should remove chain watchers from t
var meta_Global = Ember.meta(Global);
var chainNode = Ember.meta(obj).chains._chains.Global._chains.foo;
- var guid = Ember.guidFor(chainNode);
+ var index = meta_Global.chainWatchers.foo.indexOf(chainNode);... | true |
Other | emberjs | ember.js | 65e800fbe3f91b60ac7e65e7016e42fd1506ab17.json | Load external dependencies via an AMD shim
The shim is included inside a closure that wraps
the entire Ember package, so it doesn't leak out
into the global space and conflict with other AMD
loaders that may be in use. | .jshintrc | @@ -11,6 +11,7 @@
"ember_deprecate",
"ember_deprecateFunc",
"require",
+ "requireModule",
"equal",
"test",
"testBoth", | true |
Other | emberjs | ember.js | 65e800fbe3f91b60ac7e65e7016e42fd1506ab17.json | Load external dependencies via an AMD shim
The shim is included inside a closure that wraps
the entire Ember package, so it doesn't leak out
into the global space and conflict with other AMD
loaders that may be in use. | Assetfile | @@ -50,6 +50,31 @@ class EmberLicenseFilter < Rake::Pipeline::Filter
end
end
+class AddMicroLoader < Rake::Pipeline::Filter
+ LOADER = File.expand_path("../packages/loader/lib/main.js", __FILE__)
+
+ def initialize(options={}, &block)
+ super(&block)
+ @global = options[:global]
+ end
+
+ def generate_o... | true |
Other | emberjs | ember.js | 65e800fbe3f91b60ac7e65e7016e42fd1506ab17.json | Load external dependencies via an AMD shim
The shim is included inside a closure that wraps
the entire Ember package, so it doesn't leak out
into the global space and conflict with other AMD
loaders that may be in use. | Gemfile.lock | @@ -52,7 +52,7 @@ GEM
multi_json (>= 1.0)
kicker (2.6.1)
listen
- listen (0.5.3)
+ listen (0.6.0)
mime-types (1.19)
multi_json (1.3.7)
multipart-post (1.1.5) | true |
Other | emberjs | ember.js | 65e800fbe3f91b60ac7e65e7016e42fd1506ab17.json | Load external dependencies via an AMD shim
The shim is included inside a closure that wraps
the entire Ember package, so it doesn't leak out
into the global space and conflict with other AMD
loaders that may be in use. | packages/ember-runtime/lib/mixins/deferred.js | @@ -1,4 +1,4 @@
-require("rsvp");
+var RSVP = requireModule("rsvp");
/**
@module ember | true |
Other | emberjs | ember.js | 65e800fbe3f91b60ac7e65e7016e42fd1506ab17.json | Load external dependencies via an AMD shim
The shim is included inside a closure that wraps
the entire Ember package, so it doesn't leak out
into the global space and conflict with other AMD
loaders that may be in use. | packages/loader/lib/main.js | @@ -0,0 +1,31 @@
+var define, requireModule;
+
+(function() {
+ var registry = {}, seen = {};
+
+ define = function(name, deps, callback) {
+ registry[name] = { deps: deps, callback: callback };
+ };
+
+ requireModule = function(name) {
+ if (seen[name]) { return seen[name]; }
+ seen[name] = {};
+
+ var... | true |
Other | emberjs | ember.js | 65e800fbe3f91b60ac7e65e7016e42fd1506ab17.json | Load external dependencies via an AMD shim
The shim is included inside a closure that wraps
the entire Ember package, so it doesn't leak out
into the global space and conflict with other AMD
loaders that may be in use. | packages/loader/package.json | @@ -0,0 +1,28 @@
+{
+ "name": "ember-microloader",
+ "summary": "Ember Microloader",
+ "description": "The external dependency loader for Ember",
+ "homepage": "http://emberjs.com",
+ "author": "Yehuda Katz",
+ "version": "1.0.0-pre.2",
+
+ "directories": {
+ "lib": "lib"
+ },
+
+ "dependencies": {},
+
+ "... | true |
Other | emberjs | ember.js | 65e800fbe3f91b60ac7e65e7016e42fd1506ab17.json | Load external dependencies via an AMD shim
The shim is included inside a closure that wraps
the entire Ember package, so it doesn't leak out
into the global space and conflict with other AMD
loaders that may be in use. | packages/rsvp/lib/main.js | @@ -1,208 +1,224 @@
-(function(exports) { "use strict";
-
-var browserGlobal = (typeof window !== 'undefined') ? window : {};
-
-var MutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var async;
-
-if (typeof process !== 'undefined') {
- async = function(callback, binding) {
- ... | true |
Other | emberjs | ember.js | 65e800fbe3f91b60ac7e65e7016e42fd1506ab17.json | Load external dependencies via an AMD shim
The shim is included inside a closure that wraps
the entire Ember package, so it doesn't leak out
into the global space and conflict with other AMD
loaders that may be in use. | tests/index.html | @@ -181,6 +181,9 @@ <h2 id="qunit-userAgent"></h2>
];
}
+ // External dependencies are loaded via the AMD shim
+ packages.unshift('rsvp');
+
len = packages.length;
// There is no require for this in the code | true |
Other | emberjs | ember.js | b212d2f58324909af7994de0c607b2fde74c529a.json | Fix failing build
:full != "full" | Assetfile | @@ -144,7 +144,7 @@ input "packages" do
end
distros.each do |name, modules|
- name = name == :full ? "ember" : "ember-#{name}"
+ name = name == "full" ? "ember" : "ember-#{name}"
input "dist/modules" do
module_paths = modules.map{|m| "#{m}.js" } | false |
Other | emberjs | ember.js | 240d28aac0b67c2d8848a280d395085c6385bbbe.json | Fix meta objects appearing in JSON on IE7/8
Define a no-open toJSON() function on Meta objects to surpress them from
JSON output on IE7/8. | packages/ember-metal/lib/utils.js | @@ -169,6 +169,10 @@ if (isDefinePropertySimulated) {
// jQuery.extend() by having a property that fails
// hasOwnProperty check.
Meta.prototype.__preventPlainObject__ = true;
+
+ // Without non-enumerable properties, meta objects will be output in JSON
+ // unless explicitly suppressed
+ Meta.prototype.toJ... | false |
Other | emberjs | ember.js | b35fcaa45da30a593b9238aaa2194fc79c85d919.json | Remove unneeded lazy check
Now that we eagerly remove the observer on
willClearRender, we don't need a lazy check. | packages/ember-views/lib/views/view.js | @@ -1267,10 +1267,6 @@ Ember.View = Ember.CoreView.extend(
// Get the current value of the property
newClass = this._classStringForProperty(binding);
elem = this.$();
- if (!elem) {
- removeObserver(this, parsedPath.path, observer);
- return;
- }
// ... | false |
Other | emberjs | ember.js | 3b8987626fc2516dc324a8ccb5fc8a6013bac2dc.json | Fix failing Ember.Checkbox test on jQuery master | packages/ember-handlebars/tests/controls/checkbox_test.js | @@ -1,4 +1,6 @@
-var get = Ember.get, set = Ember.set, checkboxView, dispatcher;
+var get = Ember.get, set = Ember.set,
+ isInternetExplorer = window.navigator.userAgent.match(/msie/i),
+ checkboxView, dispatcher;
module("Ember.Checkbox", {
setup: function() {
@@ -92,7 +94,7 @@ test("checking the checkbox u... | false |
Other | emberjs | ember.js | 9bc2b4159bfb6545958c5368e41ebe649cc45ea6.json | Add capitalize function to Ember.String | packages/ember-runtime/lib/ext/string.js | @@ -16,7 +16,8 @@ var fmt = Ember.String.fmt,
camelize = Ember.String.camelize,
decamelize = Ember.String.decamelize,
dasherize = Ember.String.dasherize,
- underscore = Ember.String.underscore;
+ underscore = Ember.String.underscore,
+ capitalize = Ember.String.capitalize;
if (Ember.EXTEND_PR... | true |
Other | emberjs | ember.js | 9bc2b4159bfb6545958c5368e41ebe649cc45ea6.json | Add capitalize function to Ember.String | packages/ember-runtime/lib/system/string.js | @@ -201,5 +201,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 | 9bc2b4159bfb6545958c5368e41ebe649cc45ea6.json | Add capitalize function to Ember.String | 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 | 48da23b0956d0f0eeef8ddcd212e2e17ba79b3f7.json | Fix typo in Application.initialize assertion. | packages/ember-application/lib/system/application.js | @@ -325,7 +325,7 @@ Ember.Application = Ember.Namespace.extend(
@param router {Ember.Router}
*/
initialize: function(router) {
- Ember.assert("Application initialize may only be call once", !this.isInitialized);
+ Ember.assert("Application initialize may only be called once", !this.isInitialized);
... | false |
Other | emberjs | ember.js | b1c0b4ce617fc7a5e7165d352283355b69290d25.json | Fix typo in test | packages/ember-metal/tests/utils/meta_test.js | @@ -63,7 +63,7 @@ if (Ember.platform.defineProperty.isSimulated) {
props.push(prop);
}
deepEqual(props.sort(), ['bar', 'foo']);
- if (typeof JSON !== 'undefiend' && 'stringify' in JSON) {
+ if (typeof JSON !== 'undefined' && 'stringify' in JSON) {
try {
JSON.stringify(obj);
... | false |
Other | emberjs | ember.js | d884654354a179533fc80132eb85d2fb19dc30f0.json | fix edge cases with adding/removing observers | packages/ember-metal/lib/events.js | @@ -54,8 +54,7 @@ function targetSetFor(obj, eventName) {
// meta system.
var SKIP_PROPERTIES = { __ember_source__: true };
-function iterateSet(obj, eventName, callback, params) {
- var targetSet = targetSetFor(obj, eventName);
+function iterateSet(targetSet, callback) {
if (!targetSet) { return false; }
//... | true |
Other | emberjs | ember.js | d884654354a179533fc80132eb85d2fb19dc30f0.json | fix edge cases with adding/removing observers | packages/ember-metal/lib/observer.js | @@ -10,94 +10,96 @@ require('ember-metal/array');
var AFTER_OBSERVERS = ':change';
var BEFORE_OBSERVERS = ':before';
+
var guidFor = Ember.guidFor;
var deferred = 0;
-var array_Slice = [].slice;
-
-var ObserverSet = function () {
- this.targetSet = {};
-};
-ObserverSet.prototype.add = function (target, path) {... | true |
Other | emberjs | ember.js | 5ebcd2187c9ce059dd20224e6f6f3c697527954b.json | add another edge case | packages/ember-metal/tests/observer_test.js | @@ -774,8 +774,10 @@ testBoth("observers added/removed during changeProperties should do the right th
var addedAfterFirstChangeObserver = new Observer();
var addedAfterLastChangeObserver = new Observer();
var removedBeforeFirstChangeObserver = new Observer();
+ var removedBeforeLastChangeObserver = new Observ... | false |
Other | emberjs | ember.js | 8555c0f5d616e8594362cebf5a3b4c0f146afe08.json | Use markdown syntax | packages/ember-runtime/lib/mixins/enumerable.js | @@ -42,7 +42,7 @@ function iter(key, value) {
can use any of these methods on simple arrays. If Array already implements
one of these methods, the mixin will not override them.
- h3. Writing Your Own Enumerable
+ ## Writing Your Own Enumerable
To make your own custom class enumerable, you need two items... | false |
Other | emberjs | ember.js | 4260efe344c02a8a3b195162746a7d40bb95d5fb.json | add tests for Em.View#nearestOfType | packages/ember-views/tests/views/view/nearest_of_type_test.js | @@ -0,0 +1,37 @@
+var set = Ember.set, get = Ember.get;
+
+module("Ember.View#nearestOfType");
+
+(function() {
+ var Mixin = Ember.Mixin.create({}),
+ Parent = Ember.View.extend(Mixin, {
+ render: function(buffer) {
+ this.appendChild( Ember.View.create() );
+ }
+ });
+
+ test("neare... | false |
Other | emberjs | ember.js | e754cf4d289745279e1801eb97e0fd639164b67b.json | TabPane: prefer nearestOfType to nearestInstanceOf | packages/ember-handlebars/lib/controls/tabs/tab_pane_view.js | @@ -13,7 +13,7 @@ var get = Ember.get;
*/
Ember.TabPaneView = Ember.View.extend({
tabsContainer: Ember.computed(function() {
- return this.nearestInstanceOf(Ember.TabContainerView);
+ return this.nearestOfType(Ember.TabContainerView);
}).property().volatile(),
isVisible: Ember.computed(function() { | true |
Other | emberjs | ember.js | e754cf4d289745279e1801eb97e0fd639164b67b.json | TabPane: prefer nearestOfType to nearestInstanceOf | packages/ember-views/lib/views/view.js | @@ -1040,7 +1040,7 @@ Ember.View = Ember.CoreView.extend(
@return Ember.CollectionView
*/
collectionView: Ember.computed(function() {
- return this.nearestInstanceOf(Ember.CollectionView);
+ return this.nearestOfType(Ember.CollectionView);
}),
/** | true |
Other | emberjs | ember.js | ac54388c817881fc14072b3dfce49cfa1ef63f10.json | Fix overrideAccessors for Ember Data tests | packages/ember-metal/lib/accessors.js | @@ -162,6 +162,8 @@ set = function set(obj, keyName, value, tolerant) {
// Currently used only by Ember Data tests
if (Ember.config.overrideAccessors) {
+ Ember.get = get;
+ Ember.set = set;
Ember.config.overrideAccessors();
get = Ember.get;
set = Ember.set; | false |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | Rakefile | @@ -80,7 +80,6 @@ task :test, [:suite] => :dist do |t, args|
"package=all&jquery=git&nojshint=true",
"package=all&extendprototypes=true&nojshint=true",
"package=all&extendprototypes=true&jquery=git&nojshint=true",
- "package=all&nocpdefaultcacheable=true&nojshin... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-handlebars/lib/controls/button.js | @@ -40,22 +40,22 @@ Ember.Button = Ember.View.extend(Ember.TargetActionSupport, {
if (typeof target !== 'string') { return target; }
return Ember.Handlebars.getPath(root, target, { data: data });
- }).property('target').cacheable(),
+ }).property('target'),
// Defaults to 'button' if tagName is 'inpu... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-handlebars/lib/controls/select.js | @@ -325,7 +325,7 @@ Ember.Select = Ember.View.extend(
var valuePath = get(this, 'optionValuePath').replace(/^content\.?/, '');
return valuePath ? get(this, 'selection.' + valuePath) : get(this, 'selection');
- }).property('selection').cacheable(),
+ }).property('selection'),
/**
If given, a top-... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-handlebars/tests/controls/select_test.js | @@ -461,7 +461,7 @@ test("works from a template with bindings", function() {
fullName: Ember.computed(function() {
return this.get('firstName') + " " + this.get('lastName');
- }).property('firstName', 'lastName').cacheable()
+ }).property('firstName', 'lastName')
});
var erik = Person.create... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-handlebars/tests/handlebars_test.js | @@ -112,7 +112,7 @@ test("template view should call the function of the associated template with its
personName: Ember.computed(function() {
this._i++;
return this._personName + this._i;
- }).cacheable(),
+ }),
templates: Ember.Object.create({
test_template: Ember.Handlebars.compi... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-handlebars/tests/helpers/yield_test.js | @@ -69,7 +69,7 @@ test("templates should yield to block, when the yield is embedded in a hierarchy
indexArray[i] = i;
}
return indexArray;
- }).property().cacheable()
+ }).property()
});
view = Ember.View.create({ | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-handlebars/tests/views/collection_view_test.js | @@ -446,7 +446,7 @@ test("should render multiple, bound nested collections (#68)", function() {
template: Ember.Handlebars.compile('{{#collection TemplateTests.InnerList class="inner"}}{{content}}{{/collection}}{{content}}'),
innerListContent: Ember.computed(function() {
return Ember.A([1,2,3]);
... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-metal/lib/computed.js | @@ -8,7 +8,7 @@ require('ember-metal/watching');
@module ember-metal
*/
-Ember.warn("Computed properties will soon be cacheable by default. To enable this in your app, set `ENV.CP_DEFAULT_CACHEABLE = true`.", Ember.CP_DEFAULT_CACHEABLE);
+Ember.warn("The CP_DEFAULT_CACHEABLE flag has been removed and computed prope... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-metal/lib/core.js | @@ -109,20 +109,6 @@ Ember.LOG_STACKTRACE_ON_DEPRECATION = (Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION !
*/
Ember.SHIM_ES5 = (Ember.ENV.SHIM_ES5 === false) ? false : Ember.EXTEND_PROTOTYPES;
-
-/**
- Determines whether computed properties are cacheable by default.
- This option will be removed for the 1.1 release.
-... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-metal/lib/properties.js | @@ -69,7 +69,7 @@ var Descriptor = Ember.Descriptor = function() {};
// define a computed property
Ember.defineProperty(contact, 'fullName', Ember.computed(function() {
return this.firstName+' '+this.lastName;
- }).property('firstName', 'lastName').cacheable());
+ }).property('firstName... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-metal/tests/computed_test.js | @@ -181,7 +181,7 @@ module('Ember.computed - cacheable', {
Ember.defineProperty(obj, 'foo', Ember.computed(function() {
count++;
return 'bar '+count;
- }).cacheable());
+ }));
},
teardown: function() {
@@ -230,7 +230,7 @@ testBoth('cacheFor should return falsy cached values', function(g... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-metal/tests/observer_test.js | @@ -683,7 +683,7 @@ testBoth('setting a cached computed property whose value has changed should trig
Ember.defineProperty(obj, 'foo', Ember.computed(function(key, value) {
if (arguments.length === 2) { return value; }
return get(this, 'baz');
- }).property('baz').cacheable());
+ }).property('baz'));
... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-routing/lib/routable.js | @@ -161,7 +161,7 @@ Ember.Routable = Ember.Mixin.create({
*/
isRoutable: Ember.computed(function() {
return typeof get(this, 'route') === 'string';
- }).cacheable(),
+ }),
/**
@private
@@ -174,7 +174,7 @@ Ember.Routable = Ember.Mixin.create({
isLeafRoute: Ember.computed(function() {
if (g... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/lib/mixins/array.js | @@ -120,15 +120,15 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
'[]': Ember.computed(function(key, value) {
if (value !== undefined) this.replace(0, get(this, 'length'), value) ;
return this ;
- }).property().cacheable(),
+ }).property(),
firstObject: Ember.com... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/lib/mixins/deferred.js | @@ -46,5 +46,5 @@ Ember.Deferred = Ember.Mixin.create({
promise: Ember.computed(function() {
return new RSVP.Promise();
- }).cacheable()
+ })
}); | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/lib/mixins/enumerable.js | @@ -137,7 +137,7 @@ Ember.Enumerable = Ember.Mixin.create(
ret = this.nextObject(0, null, context);
pushCtx(context);
return ret ;
- }).property('[]').cacheable(),
+ }).property('[]'),
/**
Helper method returns the last object from a collection. If your enumerable
@@ -163,7 +163,7 @@ Ember.En... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/lib/mixins/sortable.js | @@ -105,7 +105,7 @@ Ember.SortableMixin = Ember.Mixin.create(Ember.MutableEnumerable, {
}
return content;
- }).cacheable(),
+ }),
_contentWillChange: Ember.beforeObserver(function() {
var content = get(this, 'content'), | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/lib/mixins/target_action_support.js | @@ -24,7 +24,7 @@ Ember.TargetActionSupport = Ember.Mixin.create({
} else {
return target;
}
- }).property('target').cacheable(),
+ }).property('target'),
triggerAction: function() {
var action = get(this, 'action'), | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/lib/system/array_proxy.js | @@ -63,7 +63,7 @@ Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray,
*/
arrangedContent: Ember.computed('content', function() {
return get(this, 'content');
- }).cacheable(),
+ }),
/**
Should actually retrieve the object at the specified index from the
@@ -205,7 +205,7 @@ Ember.ArrayProxy... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/lib/system/each_proxy.js | @@ -27,7 +27,7 @@ var EachArray = Ember.Object.extend(Ember.Array, {
length: Ember.computed(function() {
var content = this._content;
return content ? get(content, 'length') : 0;
- }).property().cacheable()
+ }).property()
});
| true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/lib/system/set.js | @@ -335,12 +335,12 @@ Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Emb
// more optimized version
firstObject: Ember.computed(function() {
return this.length > 0 ? this[0] : undefined;
- }).property().cacheable(),
+ }).property(),
// more optimized version
lastObject:... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/tests/legacy_1x/mixins/observable/observable_test.js | @@ -331,7 +331,7 @@ module("Computed properties", {
computedCached: Ember.computed(function(key, value) {
this.computedCachedCalls.push(value);
return 'computedCached';
- }).property().cacheable(),
+ }).property(),
// DEPENDENT KEYS
@@ -354,19 +354,19 @@ module("Computed pr... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/tests/mixins/array_test.js | @@ -37,7 +37,7 @@ var TestArray = Ember.Object.extend(Ember.Array, {
length: Ember.computed(function() {
return this._content.length;
- }).property().cacheable(),
+ }).property(),
slice: function() {
return this._content.slice();
@@ -374,7 +374,7 @@ testBoth("should be clear caches for computed pr... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/tests/mixins/enumerable_test.js | @@ -26,7 +26,7 @@ var TestEnumerable = Ember.Object.extend(Ember.Enumerable, {
length: Ember.computed(function() {
return this._content.length;
- }).property().cacheable(),
+ }).property(),
slice: function() {
return this._content.slice(); | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/tests/mixins/mutable_array_test.js | @@ -33,7 +33,7 @@ var TestMutableArray = Ember.Object.extend(Ember.MutableArray, {
length: Ember.computed(function() {
return this._content.length;
- }).property().cacheable(),
+ }).property(),
slice: function() {
return this._content.slice(); | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/tests/mixins/mutable_enumerable_test.js | @@ -37,7 +37,7 @@ var TestMutableEnumerable = Ember.Object.extend(Ember.MutableEnumerable, {
length: Ember.computed(function() {
return this._content.length;
- }).property().cacheable(),
+ }).property(),
slice: function() {
return this._content.slice(); | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/tests/mixins/observable_test.js | @@ -72,7 +72,7 @@ testBoth("should be able to retrieve cached values of computed properties withou
var obj = Ember.Object.create({
foo: Ember.computed(function() {
return "foo";
- }).cacheable(),
+ }),
bar: "bar"
}); | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/tests/suites/enumerable.js | @@ -219,7 +219,7 @@ var EnumerableTests = Ember.Object.extend({
*/
canTestMutation: Ember.computed(function() {
return this.mutate !== EnumerableTests.prototype.mutate;
- }).property().cacheable(),
+ }).property(),
/**
Invoked to actually run the test - overridden by mixins | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-runtime/tests/system/object/computed_test.js | @@ -5,7 +5,7 @@ module('Ember.Object computed property');
testWithDefault('computed property on instance', function(get, set) {
var MyClass = Ember.Object.extend({
- foo: Ember.computed(function() { return 'FOO'; }).cacheable()
+ foo: Ember.computed(function() { return 'FOO'; })
});
equal(get(new My... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-states/lib/state.js | @@ -47,7 +47,7 @@ Ember.State = Ember.Object.extend(Ember.Evented,
}
return path;
- }).property().cacheable(),
+ }).property(),
/**
@private
@@ -144,7 +144,7 @@ Ember.State = Ember.Object.extend(Ember.Evented,
*/
isLeaf: Ember.computed(function() {
return !get(this, 'childStates').len... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-states/lib/state_manager.js | @@ -601,7 +601,7 @@ Ember.StateManager = Ember.State.extend({
*/
currentPath: Ember.computed('currentState', function() {
return get(this, 'currentState.path');
- }).cacheable(),
+ }),
/**
The name of transitionEvent that this stateManager will dispatch | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-views/lib/views/container_view.js | @@ -10,7 +10,7 @@ var forEach = Ember.EnumerableUtils.forEach;
var childViewsProperty = Ember.computed(function() {
return get(this, '_childViews');
-}).property('_childViews').cacheable();
+}).property('_childViews');
/**
A `ContainerView` is an `Ember.View` subclass that allows for manual or programatic | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | packages/ember-views/lib/views/view.js | @@ -24,7 +24,7 @@ var childViewsProperty = Ember.computed(function() {
});
return ret;
-}).property().cacheable();
+}).property();
Ember.warn("The VIEW_PRESERVES_CONTEXT flag has been removed and the functionality can no longer be disabled.", Ember.ENV.VIEW_PRESERVES_CONTEXT !== false);
@@ -794,7 +794,7 @@... | true |
Other | emberjs | ember.js | 5ef55f22c584abc788fd98994af591f010ba82e9.json | Remove CP_DEFAULT_CACHEABLE flag
Computed Properties will always be cached by default. Use `volatile` to
change this on a per-property basis. | tests/index.html | @@ -70,12 +70,6 @@
var extendPrototypes = QUnit.urlParams.extendprototypes;
ENV['EXTEND_PROTOTYPES'] = !!extendPrototypes;
- // Handle CP cacheable by default
- QUnit.config.urlConfig.push('nocpdefaultcacheable');
-
- var noCpDefaultCacheable = QUnit.urlParams.nocpdefaultcacheable;
- ENV['CP_DEF... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | Rakefile | @@ -81,7 +81,6 @@ task :test, [:suite] => :dist do |t, args|
"package=all&extendprototypes=true&nojshint=true",
"package=all&extendprototypes=true&jquery=git&nojshint=true",
"package=all&nocpdefaultcacheable=true&nojshint=true",
- "package=all&noviewpreservescon... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | packages/ember-handlebars/lib/helpers/outlet.js | @@ -51,11 +51,7 @@ Ember.Handlebars.registerHelper('outlet', function(property, options) {
property = 'view';
}
- if(Ember.VIEW_PRESERVES_CONTEXT) {
- options.hash.currentViewBinding = "view.context." + property;
- } else {
- options.hash.currentViewBinding = "controller." + property;
- }
+ options.... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | packages/ember-handlebars/lib/helpers/view.js | @@ -11,7 +11,6 @@ require("ember-handlebars");
var get = Ember.get, set = Ember.set;
var PARENT_VIEW_PATH = /^parentView\./;
var EmberHandlebars = Ember.Handlebars;
-var VIEW_PRESERVES_CONTEXT = Ember.VIEW_PRESERVES_CONTEXT;
EmberHandlebars.ViewHelper = Ember.Object.create({
@@ -143,7 +142,7 @@ EmberHandlebars.... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | packages/ember-handlebars/tests/handlebars_test.js | @@ -220,23 +220,13 @@ test("child views can be inserted using the {{view}} Handlebars helper", functio
templates: templates
});
- if (Ember.VIEW_PRESERVES_CONTEXT) {
- view.set('cruel', "cruel");
- } else {
- TemplateTests.LabelView.reopen({ cruel: "cruel" });
- }
+ view.set('cruel', "cruel");
... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | packages/ember-handlebars/tests/helpers/each_test.js | @@ -270,72 +270,68 @@ test("it works with the controller keyword", function() {
equal(view.$().text(), "foobarbaz");
});
-if (Ember.VIEW_PRESERVES_CONTEXT) {
+module("{{#each foo in bar}}");
- module("{{#each foo in bar}}");
-
- test("#each accepts a name binding and does not change the context", function() {... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | packages/ember-handlebars/tests/helpers/if_unless_test.js | @@ -14,18 +14,14 @@ module("Handlebars {{#if}} and {{#unless}} helpers", {
}
});
-if (Ember.VIEW_PRESERVES_CONTEXT) {
+test("unless should keep the current context (#784)", function() {
+ view = Ember.View.create({
+ o: Ember.Object.create({foo: '42'}),
- test("unless should keep the current context (#784)... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | packages/ember-handlebars/tests/helpers/outlet_test.js | @@ -58,26 +58,24 @@ test("outlet should allow controllers to fill in slots in prerender state", func
equal(view.$().text(), 'HIBYE');
});
-if(Ember.VIEW_PRESERVES_CONTEXT) {
- test("outlet should allow a view's default context to fill in slots", function() {
- var template = "<h1>HI</h1>{{outlet}}";
- view... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | packages/ember-handlebars/tests/helpers/with_test.js | @@ -122,22 +122,20 @@ test("it should support #with foo as bar, then #with bar as qux", function() {
equal(view.$().text(), "butterfly", "should update");
});
-if (Ember.VIEW_PRESERVES_CONTEXT) {
- module("Handlebars {{#with this as foo}}");
+module("Handlebars {{#with this as foo}}");
- test("it should suppo... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | packages/ember-metal/lib/core.js | @@ -123,46 +123,6 @@ Ember.SHIM_ES5 = (Ember.ENV.SHIM_ES5 === false) ? false : Ember.EXTEND_PROTOTYPE
*/
Ember.CP_DEFAULT_CACHEABLE = (Ember.ENV.CP_DEFAULT_CACHEABLE !== false);
-/**
- Determines whether views render their templates using themselves
- as the context, or whether it is inherited from the parent. Th... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | packages/ember-views/lib/views/view.js | @@ -26,8 +26,7 @@ var childViewsProperty = Ember.computed(function() {
return ret;
}).property().cacheable();
-var VIEW_PRESERVES_CONTEXT = Ember.VIEW_PRESERVES_CONTEXT;
-Ember.warn("The way that the {{view}} helper affects templates is about to change. Previously, templates inside child views would use the new v... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | packages/ember-views/tests/views/container_view_test.js | @@ -157,11 +157,9 @@ test("if a ContainerView starts with a currentView, it is rendered as a child vi
equal(get(container, 'childViews.length'), 1, "should have one child view");
equal(get(container, 'childViews').objectAt(0), mainView, "should have the currentView as the only child view");
equal(mainView.get(... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | packages/ember-views/tests/views/view/context_test.js | @@ -1,58 +1,32 @@
module("Ember.View - context property");
-if (Ember.VIEW_PRESERVES_CONTEXT) {
- test("setting a controller on a inner view should change it context", function() {
- var App = {};
- var a = { name: 'a' };
- var b = { name: 'b' };
-
- var innerView = Ember.View.create();
- var middleV... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | packages/ember-views/tests/views/view/template_test.js | @@ -1,7 +1,5 @@
var set = Ember.set, get = Ember.get;
-var VIEW_PRESERVES_CONTEXT = Ember.VIEW_PRESERVES_CONTEXT;
-
module("Ember.View - Template Functionality");
test("should call the function of the associated template", function() {
@@ -111,7 +109,7 @@ test("should render an empty element if no template is sp... | true |
Other | emberjs | ember.js | 710d1e1ab55a60edd259d8a3cd9c7467e1b50c41.json | Remove VIEW_PRESERVES_CONTEXT flag
Functionality can no longer be disabled. | tests/index.html | @@ -76,12 +76,6 @@
var noCpDefaultCacheable = QUnit.urlParams.nocpdefaultcacheable;
ENV['CP_DEFAULT_CACHEABLE'] = !noCpDefaultCacheable;
- // Handle preserving context
- QUnit.config.urlConfig.push('noviewpreservescontext');
-
- var noViewPreservesContext = QUnit.urlParams.noviewpreservescontext;
-... | true |
Other | emberjs | ember.js | b0c4adb23fb6bce43291f217d45294fa486b09b8.json | Replace willRerender with willClearRender
This should also fix some memory leaks with
observers previously not torn down on parent
view destruction. | packages/ember-handlebars/lib/helpers/action.js | @@ -53,7 +53,7 @@ ActionHelper.registerAction = function(actionName, options) {
}
};
- options.view.on('willRerender', function() {
+ options.view.on('willClearRender', function() {
delete ActionHelper.registeredActions[actionId];
});
| true |
Other | emberjs | ember.js | b0c4adb23fb6bce43291f217d45294fa486b09b8.json | Replace willRerender with willClearRender
This should also fix some memory leaks with
observers previously not torn down on parent
view destruction. | packages/ember-handlebars/lib/helpers/binding.js | @@ -59,11 +59,7 @@ function bind(property, options, preserveContext, shouldDisplay, valueNormalizer
if (path !== '') {
Ember.addObserver(pathRoot, path, observer);
- view.one('willRerender', function() {
- Ember.removeObserver(pathRoot, path, observer);
- });
-
- view.one('willDestro... | true |
Other | emberjs | ember.js | b0c4adb23fb6bce43291f217d45294fa486b09b8.json | Replace willRerender with willClearRender
This should also fix some memory leaks with
observers previously not torn down on parent
view destruction. | packages/ember-views/lib/views/states/in_buffer.js | @@ -24,7 +24,7 @@ Ember.View.states.inBuffer = {
rerender: function(view) {
Ember.deprecate("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM. Because this is avoidable and the cause of significant performance issues in applications, this behavior is depreca... | true |
Other | emberjs | ember.js | b0c4adb23fb6bce43291f217d45294fa486b09b8.json | Replace willRerender with willClearRender
This should also fix some memory leaks with
observers previously not torn down on parent
view destruction. | packages/ember-views/lib/views/states/in_dom.js | @@ -35,7 +35,7 @@ Ember.View.states.hasElement = {
// once the view has been inserted into the DOM, rerendering is
// deferred to allow bindings to synchronize.
rerender: function(view) {
- view._notifyWillRerender();
+ view._notifyWillClearRender();
view.clearRenderedChildren();
| true |
Other | emberjs | ember.js | b0c4adb23fb6bce43291f217d45294fa486b09b8.json | Replace willRerender with willClearRender
This should also fix some memory leaks with
observers previously not torn down on parent
view destruction. | packages/ember-views/lib/views/view.js | @@ -1276,7 +1276,7 @@ Ember.View = Ember.CoreView.extend(
addObserver(this, parsedPath.path, observer);
- this.one('willRerender', function() {
+ this.one('willClearRender', function() {
removeObserver(this, parsedPath.path, observer);
});
}, this);
@@ -1315,7 +1315,7 @@ Ember.... | true |
Other | emberjs | ember.js | 7a19600404fc75f5eb8b26f7c4c34cb4393d05ea.json | Consolidate CoreView a bit and fix leaks | packages/ember-handlebars/lib/helpers/binding.js | @@ -62,6 +62,10 @@ function bind(property, options, preserveContext, shouldDisplay, valueNormalizer
view.one('willRerender', function() {
Ember.removeObserver(pathRoot, path, observer);
});
+
+ view.one('willDestroyElement', function() {
+ Ember.removeObserver(pathRoot, path, observer... | true |
Other | emberjs | ember.js | 7a19600404fc75f5eb8b26f7c4c34cb4393d05ea.json | Consolidate CoreView a bit and fix leaks | packages/ember-views/lib/views/view.js | @@ -49,6 +49,14 @@ var invokeForState = {
};
Ember.CoreView = Ember.Object.extend(Ember.Evented, {
+ init: function() {
+ this._super();
+
+ // Register the view for event handling. This hash is used by
+ // Ember.EventDispatcher to dispatch incoming events.
+ if (!this.isVirtual) Ember.View.views[get(... | true |
Other | emberjs | ember.js | 12741f7e413687ccc73190d8ab041259256d4ba5.json | Fix instrumentation tests | packages/ember-metal/tests/instrumentation_test.js | @@ -22,7 +22,7 @@ test("subscribing to a simple path receives the listener", function() {
strictEqual(name, "render.handlebars");
}
- ok(timestamp instanceof Date);
+ ok(typeof timestamp === 'number');
strictEqual(payload, sentPayload);
},
@@ -33,7 +33,7 @@ test("subscribing to... | false |
Other | emberjs | ember.js | 0ddf21a77620b88ddd9a7f679c98f88df8a95b1a.json | Fix instrumentation patterns | packages/ember-metal/lib/instrumentation.js | @@ -98,22 +98,23 @@ Ember.Instrumentation.instrument = function(name, payload, callback, binding) {
};
Ember.Instrumentation.subscribe = function(pattern, object) {
- var paths = pattern.split("."), path, regex = "^";
+ var paths = pattern.split("."), path, regex = [];
for (var i=0, l=paths.length; i<l; i++)... | false |
Other | emberjs | ember.js | 50de50ea046009dc10c1c3e574581db77add3d1a.json | Add performance.now() and fix view stuff | packages/ember-metal/lib/instrumentation.js | @@ -58,6 +58,14 @@ var populateListeners = function(name) {
return listeners;
};
+var time = (function() {
+ var perf = window.performance || {};
+ var fn = perf.now || perf.mozNow || perf.webkitNow || perf.msNow || perf.oNow;
+ // fn.bind will be available in all the browsers that support the advanced window.per... | true |
Other | emberjs | ember.js | 50de50ea046009dc10c1c3e574581db77add3d1a.json | Add performance.now() and fix view stuff | packages/ember-views/lib/views/view.js | @@ -1642,7 +1642,9 @@ Ember.View = Ember.Object.extend(Ember.Evented,
*/
renderToBuffer: function(parentBuffer, bufferOperation) {
var name = get(this, 'instrumentName'),
- details = this.instrumentDetails({});
+ details = {};
+
+ this.instrumentDetails(details);
return Ember.instrume... | true |
Other | emberjs | ember.js | 299cdf8d5efd7107fc8c68869867402fa5b94421.json | Fix instrumentation and add render instruments | packages/ember-handlebars/lib/views/handlebars_bound_view.js | @@ -25,6 +25,7 @@ require('ember-handlebars/views/metamorph_view');
@private
*/
Ember._HandlebarsBoundView = Ember._MetamorphView.extend({
+ instrumentName: 'render.boundHandlebars',
/**
The function used to determine if the `displayTemplate` or | true |
Other | emberjs | ember.js | 299cdf8d5efd7107fc8c68869867402fa5b94421.json | Fix instrumentation and add render instruments | packages/ember-metal/lib/instrumentation.js | @@ -65,17 +65,17 @@ Ember.Instrumentation.instrument = function(name, payload, callback, binding) {
listeners = populateListeners(name);
}
- if (listeners.length === 0) { return; }
+ if (listeners.length === 0) { return callback.call(binding); }
- var beforeValues = [], listener, i, l;
+ var beforeValue... | true |
Other | emberjs | ember.js | 299cdf8d5efd7107fc8c68869867402fa5b94421.json | Fix instrumentation and add render instruments | packages/ember-views/lib/views/container_view.js | @@ -328,6 +328,8 @@ Ember.ContainerView = Ember.View.extend({
});
},
+ instrumentName: 'render.container',
+
/**
@private
| true |
Other | emberjs | ember.js | 299cdf8d5efd7107fc8c68869867402fa5b94421.json | Fix instrumentation and add render instruments | packages/ember-views/lib/views/view.js | @@ -1641,6 +1641,22 @@ Ember.View = Ember.Object.extend(Ember.Evented,
be used.
*/
renderToBuffer: function(parentBuffer, bufferOperation) {
+ var name = get(this, 'instrumentName'),
+ details = this.instrumentDetails({});
+
+ return Ember.instrument(name, details, function() {
+ return t... | true |
Other | emberjs | ember.js | 972d310aebd73a85bad819121617d5adb506fa50.json | Add Ember.String.classify() to string extensions | packages/ember-runtime/lib/ext/string.js | @@ -14,7 +14,8 @@ var fmt = Ember.String.fmt,
camelize = Ember.String.camelize,
decamelize = Ember.String.decamelize,
dasherize = Ember.String.dasherize,
- underscore = Ember.String.underscore;
+ underscore = Ember.String.underscore,
+ classify = Ember.String.classify;
if (Ember.EXTEND_PROTOT... | true |
Other | emberjs | ember.js | 972d310aebd73a85bad819121617d5adb506fa50.json | Add Ember.String.classify() to string extensions | packages/ember-runtime/tests/system/string/classify.js | @@ -0,0 +1,29 @@
+module('Ember.String.classify');
+
+test("classify normal string", function() {
+ deepEqual(Ember.String.classify('my favorite items'), 'MyFavoriteItems');
+ if (Ember.EXTEND_PROTOTYPES) {
+ deepEqual('my favorite items'.classify(), 'MyFavoriteItems');
+ }
+});
+
+test("classify dasherized strin... | true |
Other | emberjs | ember.js | 0c25a1c7b96f05b1db4993f4672cebdabeeec7d0.json | Add basic attributeBinding docs | packages/ember-handlebars/lib/controls/text_area.js | @@ -20,6 +20,20 @@ var get = Ember.get, set = Ember.set;
Because HTML `textarea` elements do not contain inner HTML the `layout` and `layoutName`
properties will not be applied. See `Ember.View`'s layout section for more information.
+ ## HTML Attributes
+
+ By default `Ember.TextArea` provides support for `... | true |
Other | emberjs | ember.js | 0c25a1c7b96f05b1db4993f4672cebdabeeec7d0.json | Add basic attributeBinding docs | packages/ember-handlebars/lib/controls/text_field.js | @@ -25,6 +25,22 @@ var get = Ember.get, set = Ember.set;
Because HTML `input` elements are self closing `layout` and `layoutName` properties will
not be applied. See `Ember.View`'s layout section for more information.
+ ## HTML Attributes
+
+ By default `Ember.TextField` provides support for `type`, `value`, ... | true |
Other | emberjs | ember.js | 1b34a2a115fa7fbc65de37f867ab8e4db410c5d1.json | Use rsvp.js in Deferred mixin | .jshintrc | @@ -5,6 +5,7 @@
"DS",
"Handlebars",
"Metamorph",
+ "RSVP",
"ember_assert",
"ember_warn",
"ember_deprecate", | true |
Other | emberjs | ember.js | 1b34a2a115fa7fbc65de37f867ab8e4db410c5d1.json | Use rsvp.js in Deferred mixin | Assetfile | @@ -85,7 +85,7 @@ end
distros = {
:runtime => %w(ember-metal ember-runtime),
- :full => %w(ember-metal ember-runtime ember-application ember-views ember-states ember-routing ember-viewstates metamorph ember-handlebars)
+ :full => %w(ember-metal rsvp ember-runtime ember-application ember-views ember-states... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.