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 | 4331b5365034565ae1fadffb0a824c9e4967a00d.json | Add layout support to Ember.View | packages/ember-views/tests/views/view/layout_test.js | @@ -0,0 +1,95 @@
+var set = Ember.set, get = Ember.get;
+
+module("Ember.View - Template Functionality");
+
+test("should call the function of the associated layout", function() {
+ var view;
+ var templateCalled = 0, layoutCalled = 0;
+
+ view = Ember.View.create({
+ layoutName: 'layout',
+ templateName: 'tem... | true |
Other | emberjs | ember.js | 6661f147e764f5275e4301ca5f4dadea1893a283.json | Ignore more parent properties | packages/ember-metal/lib/mixin.js | @@ -413,7 +413,7 @@ function findNamespaces() {
// globalStorage is a storage obsoleted by the WhatWG storage specification. See https://developer.mozilla.org/en/DOM/Storage#globalStorage
if (prop === "globalStorage" && window.StorageList && window.globalStorage instanceof window.StorageList) { continue; }
... | false |
Other | emberjs | ember.js | dff8edefdf0c25aa206719cbca85934596936432.json | fix incorrect message in equals test | packages/ember-runtime/tests/suites/enumerable/contains.js | @@ -19,6 +19,6 @@ suite.test('contains returns true if items is in enumerable', function() {
suite.test('contains returns false if item is not in enumerable', function() {
var data = this.newFixture(1);
var obj = this.newObject(this.newFixture(3));
- equals(obj.contains(data[0]), false, 'should return true if ... | false |
Other | emberjs | ember.js | 4c3107d23844580eb81147c84af3a8fc21c48664.json | Fix path resolution for states
The name property of states was busted. We now
have two properties--name and path--that describe
the individual name of the state, as well as the
path to it from the root. | packages/ember-states/lib/state.js | @@ -1,12 +1,24 @@
-var get = Ember.get, set = Ember.set;
+var get = Ember.get, set = Ember.set, getPath = Ember.getPath;
Ember.State = Ember.Object.extend({
isState: true,
parentState: null,
start: null,
+ name: null,
+ path: Ember.computed(function() {
+ var parentPath = getPath(this, 'parentState.pat... | true |
Other | emberjs | ember.js | 4c3107d23844580eb81147c84af3a8fc21c48664.json | Fix path resolution for states
The name property of states was busted. We now
have two properties--name and path--that describe
the individual name of the state, as well as the
path to it from the root. | packages/ember-states/lib/state_manager.js | @@ -80,7 +80,7 @@ Ember.StateManager = Ember.State.extend(
if (parentState) {
this.sendRecursively(event, parentState, context);
} else if (get(this, 'errorOnUnhandledEvent')) {
- throw new Ember.Error(this.toString() + " could not respond to event " + event + ".");
+ throw new Embe... | true |
Other | emberjs | ember.js | 4c3107d23844580eb81147c84af3a8fc21c48664.json | Fix path resolution for states
The name property of states was busted. We now
have two properties--name and path--that describe
the individual name of the state, as well as the
path to it from the root. | packages/ember-states/tests/state_test.js | @@ -86,3 +86,39 @@ test("a state finds properties that are state classes and instantiates them", fu
equal(get(states.state1, 'isState1'), true, "instantiated first state");
equal(get(states.state2, 'isState2'), true, "instantiated second state");
});
+
+test("states set up proper names on their children", functi... | true |
Other | emberjs | ember.js | c93627fe2a6f136ab83bd36292d917d6c09432bc.json | Add pointer to website repository | docs/README.md | @@ -1,5 +1,6 @@
-Ember Documentation
-========================
+# Ember Documentation
+
+## Building the Documentation
Generating the Ember documentation requires node.js, as well as the port of jsdoc-toolkit to node, located [here](https://github.com/p120ph37/node-jsdoc-toolkit). In order to build the docs, run the... | false |
Other | emberjs | ember.js | 8c87d67414b338d3c7e979fd06f0357b9ec32684.json | Fix typo in Ember.MutableEnumerable#addObjects | packages/ember-runtime/lib/mixins/mutable_enumerable.js | @@ -69,7 +69,7 @@ Ember.MutableEnumerable = Ember.Mixin.create(Ember.Enumerable,
/**
Adds each object in the passed enumerable to the receiver.
- @param {Ember.Enumerable} objects the objects to remove
+ @param {Ember.Enumerable} objects the objects to add.
@returns {Object} receiver
*/
addOb... | false |
Other | emberjs | ember.js | f272b70b774f179899f72dd958557acba9bb24e3.json | Ignore docs folder | .gitignore | @@ -15,9 +15,7 @@ assets/bpm_styles.css
bin/
coverage
dist
-doc/
-docs/jsdoc
-docs/output
+docs
lib/*/tests/all.js
lib/*/tests/qunit*
lib/bundler/man | false |
Other | emberjs | ember.js | f9375ca87191d93edfc4f9726d2ec353c98a2a7d.json | Use Ember.$ instead of $ global | packages/ember-handlebars/lib/helpers/action.js | @@ -9,7 +9,7 @@ ActionHelper.registerAction = function(actionName, eventName, target, view) {
existingHandler = view[eventName];
function handler(event) {
- if ($(event.target).closest('[data-ember-action]').attr('data-ember-action') === actionId) {
+ if (Ember.$(event.target).closest('[data-ember-act... | false |
Other | emberjs | ember.js | ea26cf46fdfb1f5308530d8c9570e7ff2b78a4c2.json | Remove more trailing commas. | packages/ember-metal/tests/mixin/observer_test.js | @@ -122,7 +122,7 @@ testBoth('observing chain with property in mixin applied later', function(get, s
count: 0,
foo: Ember.observer(function() {
set(this, 'count', get(this, 'count')+1);
- }, 'bar.baz'),
+ }, 'bar.baz')
});
var MyMixin2 = Ember.Mixin.create({bar: obj2});
@@ -144,7 +144,7 @... | false |
Other | emberjs | ember.js | d34ab243b9c9a5ca26f89b36b2e90da2f88108da.json | Remove trailing comma | packages/ember-views/tests/views/view/attribute_bindings_test.js | @@ -21,7 +21,7 @@ test("should render attribute bindings", function() {
exists: true,
nothing: null,
notDefined: undefined,
- notNumber: NaN,
+ notNumber: NaN
});
view.createElement(); | false |
Other | emberjs | ember.js | 8061b909c33024b93ec163882be3ec7dad921495.json | Add Ember.Select control | packages/ember-handlebars/lib/controls.js | @@ -10,3 +10,4 @@ require("ember-handlebars/controls/button");
require("ember-handlebars/controls/radio_button");
require("ember-handlebars/controls/text_area");
require("ember-handlebars/controls/tabs");
+require("ember-handlebars/controls/select"); | true |
Other | emberjs | ember.js | 8061b909c33024b93ec163882be3ec7dad921495.json | Add Ember.Select control | packages/ember-handlebars/lib/controls/select.js | @@ -0,0 +1,68 @@
+var set = Ember.set, get = Ember.get, getPath = Ember.getPath;
+
+Ember.Select = Ember.CollectionView.extend({
+ tagName: 'select',
+
+ optionLabelPath: 'content',
+ optionValuePath: 'content',
+
+ selection: null,
+
+ didInsertElement: function() {
+ var selection = get(this, 'selection');
+ ... | true |
Other | emberjs | ember.js | 8061b909c33024b93ec163882be3ec7dad921495.json | Add Ember.Select control | packages/ember-handlebars/tests/controls/select_test.js | @@ -0,0 +1,81 @@
+var application, select;
+
+module("Ember.Select", {
+ setup: function() {
+ application = Ember.Application.create();
+ select = Ember.Select.create();
+ },
+
+ teardown: function() {
+ select.destroy();
+ application.destroy();
+ }
+});
+
+function append() {
+ Ember.run(function() ... | true |
Other | emberjs | ember.js | 60c55e3085b5c36569328be4414faa0383c5e3ba.json | Add Ember.Handlebars action helper | packages/ember-handlebars/lib/helpers.js | @@ -11,3 +11,4 @@ require("ember-handlebars/helpers/unbound");
require("ember-handlebars/helpers/debug");
require("ember-handlebars/helpers/each");
require("ember-handlebars/helpers/template");
+require("ember-handlebars/helpers/action");
\ No newline at end of file | true |
Other | emberjs | ember.js | 60c55e3085b5c36569328be4414faa0383c5e3ba.json | Add Ember.Handlebars action helper | packages/ember-handlebars/lib/helpers/action.js | @@ -0,0 +1,54 @@
+require('ember-handlebars/ext');
+
+var EmberHandlebars = Ember.Handlebars, getPath = Ember.Handlebars.getPath;
+
+var ActionHelper = EmberHandlebars.ActionHelper = {};
+
+ActionHelper.registerAction = function(actionName, eventName, target, view) {
+ var actionId = (++jQuery.uuid).toString(),
+ ... | true |
Other | emberjs | ember.js | 60c55e3085b5c36569328be4414faa0383c5e3ba.json | Add Ember.Handlebars action helper | packages/ember-handlebars/tests/helpers/action_test.js | @@ -0,0 +1,252 @@
+var application, view,
+ ActionHelper = Ember.Handlebars.ActionHelper,
+ originalRegisterAction = ActionHelper.registerAction;
+
+var appendView = function() {
+ Ember.run(function() { view.appendTo('#qunit-fixture'); });
+};
+
+module("Ember.Handlebars - action helper", {
+ setup: function()... | true |
Other | emberjs | ember.js | 949f380718e796bf4441694fea4b564349f9204d.json | Add a runtime target for node usage. | Rakefile | @@ -74,7 +74,8 @@ task :metamorph => compile_package_task("metamorph")
task :build => ["ember:metal", "ember:runtime", "ember:handlebars", "ember:views", "ember:states", "ember:datetime", :handlebars, :metamorph]
distributions = {
- "ember" => ["handlebars", "ember-metal", "ember-runtime", "ember-views", "ember-st... | false |
Other | emberjs | ember.js | cd4b0b2c14c99c1c78e87c9014d4686b2b8d39af.json | Fix template in Ember.RadioButton. | packages/ember-handlebars/lib/controls/radio_button.js | @@ -17,7 +17,7 @@ Ember.RadioButton = Ember.View.extend({
classNames: ['ember-radio-button'],
- defaultTemplate: Ember.Handlebars.compile('<input type="radio" {{bindAttr disabled="disabled" name="group" value="val" checked="checked"}}>{{title}}</input>'),
+ defaultTemplate: Ember.Handlebars.compile('<label><in... | false |
Other | emberjs | ember.js | ffef82e6d94faa3e10133c7cca32e0f5698ca811.json | add image of current travis ci build status | README.md | @@ -1,4 +1,4 @@
-# Ember.js
+# Ember.js [](http://travis-ci.org/emberjs/ember.js)
Ember.js (formerly SproutCore 2.0) is a JavaScript framework that does all of the heavy lifting that you'd normally have to do by hand. There are tasks tha... | false |
Other | emberjs | ember.js | 3d1094139785cc4dcb50a259f39c10852cc59537.json | add upload task | Gemfile | @@ -6,3 +6,4 @@ gem "execjs", "~> 1.2.6"
gem "rack"
gem "rake-pipeline", :git => "https://github.com/livingsocial/rake-pipeline.git"
gem "rake-pipeline-web-filters", :git => "https://github.com/wycats/rake-pipeline-web-filters.git"
+gem "github-upload"
\ No newline at end of file | true |
Other | emberjs | ember.js | 3d1094139785cc4dcb50a259f39c10852cc59537.json | add upload task | Gemfile.lock | @@ -22,9 +22,24 @@ GIT
GEM
remote: http://rubygems.org/
specs:
+ confparser (0.0.2.1)
execjs (1.2.6)
multi_json (~> 1.0)
+ faster_xml_simple (0.5.0)
+ libxml-ruby (>= 0.3.8.4)
+ github-upload (0.0.2)
+ confparser
+ net-github-upload (>= 0.0.6)
+ httpclient (2.2.4)
+ json... | true |
Other | emberjs | ember.js | 3d1094139785cc4dcb50a259f39c10852cc59537.json | add upload task | Rakefile | @@ -1,5 +1,8 @@
abort "Please use Ruby 1.9 to build Ember.js!" if RUBY_VERSION !~ /^1\.9/
+require "rubygems"
+require "net/github-upload"
+
require "bundler/setup"
require "erb"
require "uglifier"
@@ -124,6 +127,48 @@ end
+### UPLOAD LATEST EMBERJS BUILD TASK ###
+desc "Upload latest Ember.js build to GitH... | true |
Other | emberjs | ember.js | 68ded658b1baa1801effd2094ac526b014609372.json | Move states property to Ember.State
Easy access to substates for everyone, not just StateManagers | packages/ember-states/lib/state.js | @@ -6,14 +6,27 @@ Ember.State = Ember.Object.extend({
start: null,
init: function() {
- Ember.keys(this).forEach(function(name) {
- var value = this[name];
-
- if (value && value.isState) {
- set(value, 'parentState', this);
- set(value, 'name', (get(this, 'name') || '') + '.' + name)... | true |
Other | emberjs | ember.js | 68ded658b1baa1801effd2094ac526b014609372.json | Move states property to Ember.State
Easy access to substates for everyone, not just StateManagers | packages/ember-states/lib/state_manager.js | @@ -18,20 +18,6 @@ Ember.StateManager = Ember.State.extend(
init: function() {
this._super();
- var states = get(this, 'states');
- if (!states) {
- states = {};
- Ember.keys(this).forEach(function(name) {
- var value = get(this, name);
-
- if (value && value.isState) {
- ... | true |
Other | emberjs | ember.js | 5bafc9c5126fdeedff94ccaa834e126322cdb0c3.json | Update Array#lastIndexOf documentation | packages/ember-runtime/lib/mixins/array.js | @@ -140,7 +140,7 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
@returns {Number} index or -1 if not found
@example
- arr = ["a", "b", "c", "d", "a"];
+ var arr = ["a", "b", "c", "d", "a"];
arr.indexOf("a"); => 0
arr.indexOf("z"); => -1
ar... | false |
Other | emberjs | ember.js | 96522474290fd46353045b1655febf349843fba2.json | Fix doc typo. | packages/ember-handlebars/lib/helpers/binding.js | @@ -16,7 +16,7 @@ var helpers = EmberHandlebars.helpers;
(function() {
// Binds a property into the DOM. This will create a hook in DOM that the
- // KVO system will look for and upate if the property changes.
+ // KVO system will look for and update if the property changes.
var bind = function(property, opt... | false |
Other | emberjs | ember.js | 44af4f35fb85651dc84b3c24e763bcb26eae79d4.json | Add bin/ to gitignore | .gitignore | @@ -12,6 +12,7 @@ _yardoc
assets
assets/bpm_libs.js
assets/bpm_styles.css
+bin/
coverage
dist
doc/ | false |
Other | emberjs | ember.js | c5f2eeaafe09026bceda4b90981836eed6a607e6.json | Save shared data structures to local variables | packages/ember-handlebars/lib/helpers/binding.js | @@ -11,6 +11,9 @@ require('ember-handlebars/views/metamorph_view');
var get = Ember.get, getPath = Ember.getPath, set = Ember.set, fmt = Ember.String.fmt;
+var EmberHandlebars = Ember.Handlebars, helpers = EmberHandlebars.helpers;
+var helpers = EmberHandlebars.helpers;
+
(function() {
// Binds a property into... | false |
Other | emberjs | ember.js | b4d7b38de0f4b05606420aed2449eea410d29f70.json | Add callbacks for isVisible changes to Ember.View
These callbacks, becameVisible and becameHidden,
will work recursively through the child view
hierarchy if you use isVisible as your mechanism
for controlling visibility.
If you (or a library) manually shows or hides a
view, you may not receive callbacks as expected. | packages/ember-views/lib/views/view.js | @@ -152,9 +152,9 @@ Ember.View = Ember.Object.extend(
If false, the view will appear hidden in DOM.
@type Boolean
- @default true
+ @default null
*/
- isVisible: true,
+ isVisible: null,
/**
Array of child views. You should never edit this array directly.
@@ -569,6 +569,9 @@ Ember.View ... | true |
Other | emberjs | ember.js | b4d7b38de0f4b05606420aed2449eea410d29f70.json | Add callbacks for isVisible changes to Ember.View
These callbacks, becameVisible and becameHidden,
will work recursively through the child view
hierarchy if you use isVisible as your mechanism
for controlling visibility.
If you (or a library) manually shows or hides a
view, you may not receive callbacks as expected. | packages/ember-views/tests/views/view/is_visible_test.js | @@ -0,0 +1,201 @@
+var get = Ember.get, set = Ember.set;
+
+var View, view, parentBecameVisible, childBecameVisible, grandchildBecameVisible;
+var parentBecameHidden, childBecameHidden, grandchildBecameHidden;
+
+module("Ember.View#isVisible", {
+ setup: function() {
+ parentBecameVisible=0;
+ childBecameVisible... | true |
Other | emberjs | ember.js | b4d7b38de0f4b05606420aed2449eea410d29f70.json | Add callbacks for isVisible changes to Ember.View
These callbacks, becameVisible and becameHidden,
will work recursively through the child view
hierarchy if you use isVisible as your mechanism
for controlling visibility.
If you (or a library) manually shows or hides a
view, you may not receive callbacks as expected. | packages/ember-views/tests/views/view/render_test.js | @@ -91,51 +91,6 @@ test("should render child views with a different tagName", function() {
equals(view.$('aside').length, 1);
});
-test("should hide views when isVisible is false", function() {
- var view = Ember.View.create({
- isVisible: false
- });
-
- Ember.run(function() {
- view.append();
- });
-
... | true |
Other | emberjs | ember.js | f41e667d5cf13b7284cb1cad6f44d568f35ef279.json | add tests for Ember.isGlobalPath | packages/ember-metal/tests/accessors/isGlobalPath_test.js | @@ -0,0 +1,22 @@
+// ==========================================================================
+// Project: Ember Runtime
+// Copyright: ©2011 Strobe Inc. and contributors.
+// License: Licensed under MIT license (see license.js)
+// ==========================================================================
+
+modu... | false |
Other | emberjs | ember.js | a0fadf121fe08bec3cca433057374dbd466d2308.json | Fix unbound helper when used with {{this}}
When the #each helper is used, the unbound helper didn't
work with {{this}}. | packages/ember-handlebars/tests/handlebars_test.js | @@ -1289,6 +1289,17 @@ test("should be able to use standard Handlebars #each helper", function() {
equals(view.$().html(), "abc");
});
+test("should be able to use unbound helper in #each helper", function() {
+ view = Ember.View.create({
+ items: Ember.A(['a', 'b', 'c']),
+ template: Ember.Handlebars.comp... | true |
Other | emberjs | ember.js | a0fadf121fe08bec3cca433057374dbd466d2308.json | Fix unbound helper when used with {{this}}
When the #each helper is used, the unbound helper didn't
work with {{this}}. | packages/ember-metal/lib/accessors.js | @@ -260,6 +260,11 @@ Ember.getPath = function(root, path) {
var hasThis, hasStar, isGlobal;
if (!path && 'string'===typeof root) {
+ // Helpers that operate with 'this' within an #each
+ if (path === '') {
+ return root;
+ }
+
path = root;
root = null;
} | true |
Other | emberjs | ember.js | 3edefeae22cf7c84fafc026230c26fc4af75d608.json | Remove unnecessary set watching to zero.
Once all the refs are gone, watching is no longer used, so there is no reason to set its count back to 0. | packages/ember-metal/lib/watching.js | @@ -549,18 +549,16 @@ var propertyDidChange = Ember.propertyDidChange = function(obj, keyName) {
@returns {void}
*/
Ember.destroy = function (obj) {
- var meta = obj[META_KEY], chains, watching, paths, path;
+ var meta = obj[META_KEY], chains, paths, path;
if (meta) {
obj[META_KEY] = null;
// remove... | false |
Other | emberjs | ember.js | 901b0f64cbd03d4dcf75bb616ef2b500b2dab449.json | Add chain removal to Ember.destroy
This breaks circular references so Objects can be garbage collected after being destroyed. | packages/ember-metal/lib/properties.js | @@ -401,16 +401,3 @@ Ember.createPrototype = function(obj, props) {
if (META_KEY in ret) Ember.rewatch(ret); // setup watch chains if needed.
return ret;
};
-
-
-/**
- Tears down the meta on an object so that it can be garbage collected.
- Multiple calls will have no effect.
-
- @param {Object} obj the o... | true |
Other | emberjs | ember.js | 901b0f64cbd03d4dcf75bb616ef2b500b2dab449.json | Add chain removal to Ember.destroy
This breaks circular references so Objects can be garbage collected after being destroyed. | packages/ember-metal/lib/watching.js | @@ -19,6 +19,7 @@ var normalizeTuple = Ember.normalizeTuple.primitive;
var normalizePath = Ember.normalizePath;
var SIMPLE_PROPERTY = Ember.SIMPLE_PROPERTY;
var GUID_KEY = Ember.GUID_KEY;
+var META_KEY = Ember.META_KEY;
var notifyObservers = Ember.notifyObservers;
var FIRST_KEY = /^([^\.\*]+)/;
@@ -539,3 +540,2... | true |
Other | emberjs | ember.js | 901b0f64cbd03d4dcf75bb616ef2b500b2dab449.json | Add chain removal to Ember.destroy
This breaks circular references so Objects can be garbage collected after being destroyed. | packages/ember-metal/tests/watching/watch_test.js | @@ -123,3 +123,19 @@ testBoth('watching a global object that does not yet exist should queue', functi
Global = null; // reset
});
+testBoth('destroy should tear down chainWatchers', function(get, set) {
+
+ Global = { foo: 'bar' };
+ var obj = {};
+
+ Ember.watch(obj, 'Global.foo');
+
+ var metaGlobal = Ember... | true |
Other | emberjs | ember.js | 901b0f64cbd03d4dcf75bb616ef2b500b2dab449.json | Add chain removal to Ember.destroy
This breaks circular references so Objects can be garbage collected after being destroyed. | packages/ember-runtime/lib/system/core_object.js | @@ -101,7 +101,7 @@ CoreObject.PrototypeMixin = Ember.Mixin.create(
@private
*/
_scheduledDestroy: function() {
- this[Ember.META_KEY] = null;
+ Ember.destroy(this);
},
bind: function(to, from) { | true |
Other | emberjs | ember.js | 3a07b4df1ee579b9fb92eb26db495120c37a870f.json | Unify attribute bindings logic and fix some bugs
when bound value is null or undefined. | packages/ember-handlebars/lib/helpers/binding.js | @@ -232,20 +232,7 @@ Ember.Handlebars.registerHelper('bindAttr', function(options) {
return;
}
- var currentValue = elem.attr(attr);
-
- // A false result will remove the attribute from the element. This is
- // to support attributes such as disabled, whose presence is meaningful.
- ... | true |
Other | emberjs | ember.js | 3a07b4df1ee579b9fb92eb26db495120c37a870f.json | Unify attribute bindings logic and fix some bugs
when bound value is null or undefined. | packages/ember-views/lib/system/render_buffer.js | @@ -138,15 +138,38 @@ Ember._RenderBuffer = Ember.Object.extend(
return this;
},
+ // duck type attribute functionality like jQuery so a render buffer
+ // can be used like a jQuery object in attribute binding scenarios.
+
/**
Adds an attribute which will be rendered to the element.
@param {S... | true |
Other | emberjs | ember.js | 3a07b4df1ee579b9fb92eb26db495120c37a870f.json | Unify attribute bindings logic and fix some bugs
when bound value is null or undefined. | packages/ember-views/lib/views/view.js | @@ -430,38 +430,22 @@ Ember.View = Ember.Object.extend(
if (!attributeBindings) { return; }
- attributeBindings.forEach(function(attribute) {
+ attributeBindings.forEach(function(attributeName) {
// Create an observer to add/remove/change the attribute if the
// JavaScript property changes.... | true |
Other | emberjs | ember.js | 3a07b4df1ee579b9fb92eb26db495120c37a870f.json | Unify attribute bindings logic and fix some bugs
when bound value is null or undefined. | packages/ember-views/tests/views/view/attribute_bindings_test.js | @@ -10,7 +10,32 @@ require('ember-views/views/view');
module("Ember.View - Attribute Bindings");
-test("should render and update attribute bindings", function() {
+test("should render attribute bindings", function() {
+ var view = Ember.View.create({
+ classNameBindings: ['priority', 'isUrgent', 'isClassified:... | true |
Other | emberjs | ember.js | 56acdc1fdcdcada0d850c64eb77f76c920f93f28.json | Reduce dereferencing of Array.prototype.slice | packages/ember-metal/lib/mixin.js | @@ -16,6 +16,7 @@ var Mixin, MixinDelegate, REQUIRED, Alias;
var classToString, superClassString;
var a_map = Array.prototype.map;
+var a_slice = Array.prototype.slice;
var EMPTY_META = {}; // dummy for non-writable meta
var META_SKIP = { __emberproto__: true, __ember_count__: true };
@@ -263,7 +264,7 @@ functi... | true |
Other | emberjs | ember.js | 56acdc1fdcdcada0d850c64eb77f76c920f93f28.json | Reduce dereferencing of Array.prototype.slice | packages/ember-runtime/lib/ext/function.js | @@ -7,6 +7,8 @@
require('ember-runtime/core');
+var a_slice = Array.prototype.slice;
+
if (Ember.EXTEND_PROTOTYPES) {
Function.prototype.property = function() {
@@ -15,12 +17,12 @@ if (Ember.EXTEND_PROTOTYPES) {
};
Function.prototype.observes = function() {
- this.__ember_observes__ = Array.protot... | true |
Other | emberjs | ember.js | 56acdc1fdcdcada0d850c64eb77f76c920f93f28.json | Reduce dereferencing of Array.prototype.slice | packages/ember-runtime/lib/mixins/enumerable.js | @@ -13,6 +13,7 @@
//
var get = Ember.get, set = Ember.set;
+var a_slice = Array.prototype.slice;
var contexts = [];
function popCtx() {
@@ -522,7 +523,7 @@ Ember.Enumerable = Ember.Mixin.create( /** @lends Ember.Enumerable */ {
*/
invoke: function(methodName) {
var args, ret = [];
- if (arguments... | true |
Other | emberjs | ember.js | 56acdc1fdcdcada0d850c64eb77f76c920f93f28.json | Reduce dereferencing of Array.prototype.slice | packages/ember-views/lib/views/view.js | @@ -9,6 +9,7 @@
require("ember-views/system/render_buffer");
var get = Ember.get, set = Ember.set, addObserver = Ember.addObserver;
var getPath = Ember.getPath, meta = Ember.meta, fmt = Ember.String.fmt;
+var a_slice = Array.prototype.slice;
var childViewsProperty = Ember.computed(function() {
var childViews =... | true |
Other | emberjs | ember.js | bd87a07f16489d4596404cc5523977b7b2a0a7d1.json | Change behavior of Ember.empty for functions | packages/ember-runtime/lib/core.js | @@ -126,7 +126,7 @@ Ember.none = function(obj) {
@returns {Boolean}
*/
Ember.empty = function(obj) {
- return obj === null || obj === undefined || obj.length === 0;
+ return obj === null || obj === undefined || (obj.length === 0 && typeof obj !== 'function');
};
/** | true |
Other | emberjs | ember.js | bd87a07f16489d4596404cc5523977b7b2a0a7d1.json | Change behavior of Ember.empty for functions | packages/ember-runtime/tests/core/type_test.js | @@ -39,18 +39,20 @@ test("Ember.none", function() {
});
test("Ember.empty", function() {
- var string = "string", fn = function() {};
+ var string = "string", fn = function() {},
+ object = {length: 0};
equals(true, Ember.empty(null), "for null");
equals(true, Ember.empty(undefined), "for unde... | true |
Other | emberjs | ember.js | 85ef51674431f3a04dfe806522a9c711276cf645.json | Pass meta instead of looking up twice. | packages/ember-metal/lib/watching.js | @@ -38,14 +38,14 @@ function isKeyName(path) {
//
var DEP_SKIP = { __emberproto__: true }; // skip some keys and toString
-function iterDeps(method, obj, depKey, seen) {
+function iterDeps(method, obj, depKey, seen, meta) {
var guid = guidFor(obj);
if (!seen[guid]) seen[guid] = {};
if (seen[guid][depKey]... | false |
Other | emberjs | ember.js | 9e099c1ffd0c49f9ffdb08c9c8adc9a5c2ecf0cb.json | Improve performance of Ember.A(), especially when
native array enhancements have already been applied. | packages/ember-runtime/lib/system/native_array.js | @@ -130,7 +130,7 @@ Ember.NativeArray = NativeArray;
*/
Ember.A = function(arr){
if (arr === undefined) { arr = []; }
- return Ember.NativeArray.apply(Array.prototype.slice.apply(arr));
+ return Ember.NativeArray.apply(arr);
};
/**
@@ -141,6 +141,8 @@ Ember.A = function(arr){
*/
Ember.NativeArray.activate ... | false |
Other | emberjs | ember.js | 13052de12a3f380193a80fb7e47751e26ada7122.json | Remove ember_asserts from hot code paths | packages/ember-metal/lib/events.js | @@ -167,7 +167,6 @@ function watchedEvents(obj) {
}
function sendEvent(obj, eventName) {
- ember_assert("You must pass an object and event name to Ember.sendEvent", !!obj && !!eventName);
// first give object a chance to handle it
if (obj !== Ember && 'function' === typeof obj.sendEvent) { | true |
Other | emberjs | ember.js | 13052de12a3f380193a80fb7e47751e26ada7122.json | Remove ember_asserts from hot code paths | packages/ember-metal/lib/utils.js | @@ -172,8 +172,6 @@ if (Object.freeze) Object.freeze(EMPTY_META);
@returns {Hash}
*/
Ember.meta = function meta(obj, writable) {
-
- ember_assert("You must pass an object to Ember.meta. This was probably called from Ember internals, so you probably called a Ember method with undefined that was expecting an obje... | true |
Other | emberjs | ember.js | 13052de12a3f380193a80fb7e47751e26ada7122.json | Remove ember_asserts from hot code paths | packages/ember-metal/lib/watching.js | @@ -35,16 +35,16 @@ function isKeyName(path) {
// ..........................................................
// DEPENDENT KEYS
-//
+//
var DEP_SKIP = { __emberproto__: true }; // skip some keys and toString
function iterDeps(method, obj, depKey, seen) {
-
+
var guid = guidFor(obj);
if (!seen[guid]) see... | true |
Other | emberjs | ember.js | f77832499898d970ea665a92333a3ed2ec0d663c.json | Add missing semicolon | packages/ember-metal/tests/run_loop/unwind_test.js | @@ -11,7 +11,7 @@ test('RunLoop unwinds despite unhandled exception', function() {
raises(function(){
Ember.run(function() {
- Ember.run.schedule('actions', function() { throw new Error("boom!") });
+ Ember.run.schedule('actions', function() { throw new Error("boom!"); });
});
}, Error, "boo... | false |
Other | emberjs | ember.js | b15342c06210f1eb60392f6eebc86ea6b6dd4d0e.json | allow use of multiple {{bindAttr}}s per element | packages/ember-handlebars/lib/helpers/binding.js | @@ -218,7 +218,7 @@ Ember.Handlebars.registerHelper('bindAttr', function(options) {
ember_assert(fmt("Attributes must be numbers, strings or booleans, not %@", [result]), result == null || typeof result === 'number' || typeof result === 'string' || typeof result === 'boolean');
- var elem = view.$("[dat... | true |
Other | emberjs | ember.js | b15342c06210f1eb60392f6eebc86ea6b6dd4d0e.json | allow use of multiple {{bindAttr}}s per element | packages/ember-handlebars/tests/handlebars_test.js | @@ -1046,6 +1046,59 @@ test("should be able to bind element attributes using {{bindAttr}}", function()
equals(view.$('img').attr('alt'), "Nanananana Ember!", "updates alt attribute when title property is computed");
});
+test("should be able to bind use {{bindAttr}} more than once on an element", function() {
+ ... | true |
Other | emberjs | ember.js | 86edd79b43134c8d20490b6979f6a21f8b77b39c.json | Update SC reference to Ember | packages/ember-states/tests/state_manager_test.js | @@ -178,12 +178,12 @@ test("it automatically transitions to a default state specified using the initia
});
test("it reports the view associated with the current view state, if any", function() {
- var view = SC.View.create();
+ var view = Ember.View.create();
- stateManager = SC.StateManager.create({
- foo:... | false |
Other | emberjs | ember.js | 16522c45f2a0e801a542f7ad18777924e728701c.json | Show gzipped size for `rake dist` | Rakefile | @@ -92,16 +92,24 @@ distributions.each do |name, libraries|
# Minified distribution
file "dist/#{name}.min.js" => "dist/#{name}.js" do
- puts "Generating #{name}.min.js"
+ require 'zlib'
+
+ print "Generating #{name}.min.js... "
+ STDOUT.flush
File.open("dist/#{name}.prod.js", "w") do |file|
... | false |
Other | emberjs | ember.js | df461ea70b3fd71747d96e333d6391ee65671d2f.json | Fix toString() for objects in the Ember namespace | packages/ember-metal/lib/core.js | @@ -26,7 +26,10 @@ if ('undefined' === typeof Ember) {
The core Runtime framework is based on the jQuery API with a number of
performance optimizations.
*/
-Ember = {};
+
+// Create core object. Make it act like an instance of Ember.Namespace so that
+// objects assigned to it are given a sane string representat... | true |
Other | emberjs | ember.js | df461ea70b3fd71747d96e333d6391ee65671d2f.json | Fix toString() for objects in the Ember namespace | packages/ember-metal/lib/mixin.js | @@ -375,6 +375,7 @@ Mixin.prototype.keys = function() {
/** @private - make Mixin's have nice displayNames */
var NAME_KEY = Ember.GUID_KEY+'_name';
+var get = Ember.get;
function processNames(paths, root, seen) {
var idx = paths.length;
@@ -385,7 +386,7 @@ function processNames(paths, root, seen) {
if... | true |
Other | emberjs | ember.js | df461ea70b3fd71747d96e333d6391ee65671d2f.json | Fix toString() for objects in the Ember namespace | packages/ember-runtime/lib/system/namespace.js | @@ -20,6 +20,8 @@ require('ember-runtime/system/object');
*/
Ember.Namespace = Ember.Object.extend({
+ isNamespace: true,
+
init: function() {
Ember.Namespace.NAMESPACES.push(this);
Ember.Namespace.PROCESSED = false;
@@ -38,5 +40,5 @@ Ember.Namespace = Ember.Object.extend({
}
});
-Ember.Namespac... | true |
Other | emberjs | ember.js | df461ea70b3fd71747d96e333d6391ee65671d2f.json | Fix toString() for objects in the Ember namespace | packages/ember-runtime/tests/system/namespace/base_test.js | @@ -4,6 +4,8 @@
// License: Licensed under MIT license (see license.js)
// ==========================================================================
+var get = Ember.get;
+
module('Ember.Namespace', {
teardown: function() {
if (window.NamespaceA) { window.NamespaceA.destroy(); }
@@ -15,6 +17,10 @@ test(... | true |
Other | emberjs | ember.js | 7429f461cb8b5ee82b12efefe5e15f936b25ff97.json | Add a currentView property to StateManager | packages/ember-states/lib/state_manager.js | @@ -40,6 +40,27 @@ Ember.StateManager = Ember.State.extend({
currentState: null,
+ /**
+ If the current state is a view state or the descendent of a view state,
+ this property will be the view associated with it. If there is no
+ view state active in this state manager, this value will be null.
+ */
... | true |
Other | emberjs | ember.js | 7429f461cb8b5ee82b12efefe5e15f936b25ff97.json | Add a currentView property to StateManager | packages/ember-states/tests/state_manager_test.js | @@ -177,6 +177,21 @@ test("it automatically transitions to a default state specified using the initia
ok(get(stateManager, 'currentState').isStart, "automatically transitions to beginning state");
});
+test("it reports the view associated with the current view state, if any", function() {
+ var view = SC.View.cr... | true |
Other | emberjs | ember.js | 8618e230995193a740277b53ae3edbcc24702a37.json | Fix mistake made in renamespacing | README.md | @@ -21,7 +21,7 @@ MyApp.president = Ember.Object.create({
name: "Barack Obama"
});
-MyApp.country = Ember({
+MyApp.country = Ember.Object.create({
// Ending a property with 'Binding' tells Ember.js to
// create a binding to the presidentName property.
presidentNameBinding: 'MyApp.president.name' | false |
Other | emberjs | ember.js | fdb4ae03401c353113c550967a29b53e259e63ee.json | Add license file | LICENSE | @@ -0,0 +1,19 @@
+Copyright (c) 2011 Yehuda Katz, Tom Dale, Charles Jolley and Ember.js contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limi... | false |
Other | emberjs | ember.js | e00a8befb352caefe3af41a6ff1f41b3132abf4e.json | Update Rakefile to build Ember.js | Rakefile | @@ -3,12 +3,13 @@ abort "Please use Ruby 1.9 to build Amber.js!" if RUBY_VERSION !~ /^1\.9/
require "bundler/setup"
require "erb"
require "uglifier"
+
+# for now, the SproutCore compiler will be used to compile Ember.js
require "sproutcore"
LICENSE = File.read("generators/license.js")
-## Some SproutCore modul... | false |
Other | emberjs | ember.js | ba51f13c92ad66aab422a57e03d7499e47bcda29.json | Add Ember namespaces | packages/sproutcore-metal/lib/core.js | @@ -30,7 +30,7 @@ SC = {};
// aliases needed to keep minifiers from removing the global context
if ('undefined' !== typeof window) {
- window.SC = window.SproutCore = SproutCore = SC;
+ window.Em = window.Ember = window.SC = window.SproutCore = Em = Ember = SproutCore = SC;
}
} | false |
Other | emberjs | ember.js | e283a95ab5c629ed9cc4c15d9ffda92006d4bfd5.json | Add missing var | packages/sproutcore-views/lib/views/view.js | @@ -487,7 +487,7 @@ SC.View = SC.Object.extend(
// Normalize property path to be suitable for use
// as a class name. For exaple, content.foo.barBaz
// becomes bar-baz.
- parts = property.split('.');
+ var parts = property.split('.');
return SC.String.dasherize(parts[parts.length-1... | false |
Other | emberjs | ember.js | c3802f16380843b39c8363cda68d8813a3e00cdf.json | Allow aliasing of classNameBindings from templates | packages/sproutcore-handlebars/lib/helpers/binding.js | @@ -304,11 +304,16 @@ SC.Handlebars.bindClasses = function(context, classBindings, view, id) {
// determine which class string to return, based on whether it is
// a Boolean or not.
var classStringForProperty = function(property) {
+ var split = property.split(':'), className = split[1];
+ property = spl... | true |
Other | emberjs | ember.js | c3802f16380843b39c8363cda68d8813a3e00cdf.json | Allow aliasing of classNameBindings from templates | packages/sproutcore-handlebars/tests/handlebars_test.js | @@ -1136,10 +1136,11 @@ test("should be able to bind boolean element attributes using {{bindAttr}}", fun
});
test("should be able to add multiple classes using {{bindAttr class}}", function() {
- var template = SC.Handlebars.compile('<div {{bindAttr class="content.isAwesomeSauce content.isAlsoCool"}}></div>');
+ ... | true |
Other | emberjs | ember.js | 318ad59c2a738688826b12c7de48be13b5342fe5.json | Use charAt for IE7 support | packages/sproutcore-metal/lib/accessors.js | @@ -158,7 +158,7 @@ function getPath(target, path) {
var len = path.length, idx, next, key;
idx = path.indexOf('*');
- if (idx>0 && path[idx-1]!=='.') {
+ if (idx>0 && path.charAt(idx-1)!=='.') {
return getPath(getPath(target, path.slice(0, idx)), path.slice(idx+1));
}
| false |
Other | emberjs | ember.js | 0aa19c52977f06b64f40d2821378b4dcf1969a0e.json | Require Ruby 1.9 to build. | Rakefile | @@ -1,3 +1,5 @@
+abort "Please use Ruby 1.9 to build Amber.js!" if RUBY_VERSION !~ /^1\.9/
+
require "bundler/setup"
require "erb"
require "uglifier" | false |
Other | emberjs | ember.js | 194bfa2bc060a24c64b0377a62508c089cc735c8.json | Change the name and some elementary bits. | README.md | @@ -1,16 +1,18 @@
-# SproutCore
+# Amber.js
-SproutCore is a JavaScript framework that does all of the heavy lifting that you'd normally have to do by hand. There are tasks that are common to every web app; SproutCore does those things for you, so you can focus on building killer features and UI.
+Amber.js (formerly ... | false |
Other | emberjs | ember.js | 3ef01860e0274bf782ac714b8b8313fa1832f9b5.json | Add sproutcore-states to Rakefile | Rakefile | @@ -53,7 +53,7 @@ end
# Create sproutcore:package tasks for each of the SproutCore packages
namespace :sproutcore do
- %w(metal runtime handlebars views).each do |package|
+ %w(metal runtime handlebars views states).each do |package|
task package => compile_package_task("sproutcore-#{package}")
end
end
@... | false |
Other | emberjs | ember.js | f701bff1e4eb52112e7b125f034e1bb68acdb6d8.json | Update Metamorph to latest version. | packages/metamorph/lib/main.js | @@ -7,6 +7,7 @@
var K = function(){},
guid = 0,
+ document = window.document,
// Feature-detect the W3C range API
supportsRange = ('createRange' in document);
@@ -22,7 +23,7 @@
if (this instanceof Metamorph) {
self = this;
} else {
- self = new K;
+ self = new... | false |
Other | emberjs | ember.js | 0c632a6be3440c8f941f271921765ba35083528d.json | Use SC.get instead of this.get | packages/sproutcore-handlebars/lib/controls/button.js | @@ -22,7 +22,7 @@ SC.Button = SC.View.extend(SC.TargetActionSupport, {
set(this, 'isActive', true);
this._mouseDown = true;
this._mouseEntered = true;
- return this.get('propagateEvents');
+ return get(this, 'propagateEvents');
},
mouseLeave: function() {
@@ -50,7 +50,7 @@ SC.Button = SC.Vi... | false |
Other | emberjs | ember.js | 86f5f87b06d4786f90c6e3c5bb5725f1b38654c0.json | Remove overriding removeObserver on bind views.
I have no idea what this does and it seems crazy. | packages/sproutcore-handlebars/lib/helpers/binding.js | @@ -54,10 +54,6 @@ var get = SC.get, getPath = SC.getPath, set = SC.set, fmt = SC.String.fmt;
// is an empty string, we are printing the current context
// object ({{this}}) so updating it is not our responsibility.
if (property !== '') {
- set(bindView, 'removeObserver', function() {
- ... | false |
Other | emberjs | ember.js | 0eae4c91d196b97decb34be66cd45d08d3fa8a44.json | Improve performance of namespace stringification.
New heuristic:
* after a namespace is added for the first time, scan for it and give it a name
* after that, only scan namespaces for new classes
A possible further improvement: preemptively process classes at the end of the
run loop following their creation. There s... | packages/sproutcore-metal/lib/mixin.js | @@ -395,6 +395,24 @@ function processNames(paths, root, seen) {
paths.length = idx; // cut out last item
}
+function findNamespaces() {
+ var Namespace = SC.Namespace, obj;
+
+ if (Namespace.PROCESSED) { return; }
+
+ for (var prop in window) {
+ if (!window.hasOwnProperty(prop)) { continue; }
+
+ obj = ... | true |
Other | emberjs | ember.js | 0eae4c91d196b97decb34be66cd45d08d3fa8a44.json | Improve performance of namespace stringification.
New heuristic:
* after a namespace is added for the first time, scan for it and give it a name
* after that, only scan namespaces for new classes
A possible further improvement: preemptively process classes at the end of the
run loop following their creation. There s... | packages/sproutcore-runtime/lib/system/namespace.js | @@ -8,15 +8,35 @@ require('sproutcore-runtime/system/object');
/**
@private
- A Namespace is an object usually used to contain other objects or methods
+ A Namespace is an object usually used to contain other objects or methods
such as an application or framework. Create a namespace anytime you want
to ... | true |
Other | emberjs | ember.js | 0eae4c91d196b97decb34be66cd45d08d3fa8a44.json | Improve performance of namespace stringification.
New heuristic:
* after a namespace is added for the first time, scan for it and give it a name
* after that, only scan namespaces for new classes
A possible further improvement: preemptively process classes at the end of the
run loop following their creation. There s... | packages/sproutcore-runtime/tests/system/namespace/base_test.js | @@ -4,8 +4,34 @@
// License: Licensed under MIT license (see license.js)
// ==========================================================================
-module('SC.Namepsace');
+module('SC.Namespace', {
+ teardown: function() {
+ if (window.NamespaceA) { window.NamespaceA.destroy(); }
+ if (window.Namespace... | true |
Other | emberjs | ember.js | 0eae4c91d196b97decb34be66cd45d08d3fa8a44.json | Improve performance of namespace stringification.
New heuristic:
* after a namespace is added for the first time, scan for it and give it a name
* after that, only scan namespaces for new classes
A possible further improvement: preemptively process classes at the end of the
run loop following their creation. There s... | packages/sproutcore-views/tests/views/view/attribute_bindings_test.js | @@ -93,6 +93,6 @@ test("should allow attributes to be set in the inBuffer state", function() {
equals(parentView.get('childViews')[0].$().attr('foo'), 'baz');
parentView.destroy();
-
+ Test.destroy();
});
| true |
Other | emberjs | ember.js | 6c6b8f9b21b79c69f6c19ff2f27ac57db72f38b8.json | Fix EXTEND_PROTOTYPES for sproutcore-handlebars | packages/sproutcore-handlebars/lib/helpers/binding.js | @@ -316,7 +316,8 @@ SC.Handlebars.bindClasses = function(context, classBindings, view, id) {
// Normalize property path to be suitable for use
// as a class name. For exaple, content.foo.barBaz
// becomes bar-baz.
- return SC.String.dasherize(get(property.split('.'), 'lastObject'));
+ var... | true |
Other | emberjs | ember.js | 6c6b8f9b21b79c69f6c19ff2f27ac57db72f38b8.json | Fix EXTEND_PROTOTYPES for sproutcore-handlebars | packages/sproutcore-handlebars/lib/helpers/collection.js | @@ -9,7 +9,7 @@
require('sproutcore-handlebars');
require('sproutcore-handlebars/helpers/view');
-var get = SC.get;
+var get = SC.get, fmt = SC.String.fmt;
/**
@name Handlebars.helpers.collection
@@ -35,7 +35,7 @@ SC.Handlebars.registerHelper('collection', function(path, options) {
// Otherwise, just defau... | true |
Other | emberjs | ember.js | 6c6b8f9b21b79c69f6c19ff2f27ac57db72f38b8.json | Fix EXTEND_PROTOTYPES for sproutcore-handlebars | packages/sproutcore-handlebars/tests/each_test.js | @@ -47,7 +47,7 @@ test("it updates the view if an item is added", function() {
test("it allows you to access the current context using {{this}}", function() {
view = SC.View.create({
template: templateFor("{{#each people}}{{this}}{{/each}}"),
- people: ['Black Francis', 'Joey Santiago', 'Kim Deal', 'David L... | true |
Other | emberjs | ember.js | 6c6b8f9b21b79c69f6c19ff2f27ac57db72f38b8.json | Fix EXTEND_PROTOTYPES for sproutcore-handlebars | packages/sproutcore-handlebars/tests/handlebars_test.js | @@ -561,7 +561,7 @@ test("should update the block when object passed to #if helper changes", functio
set(view, 'inception', val);
});
- equals(view.$('h1').text(), '', "hides block when conditional is '%@'".fmt(val));
+ equals(view.$('h1').text(), '', SC.String.fmt("hides block when conditional is '... | true |
Other | emberjs | ember.js | 6c6b8f9b21b79c69f6c19ff2f27ac57db72f38b8.json | Fix EXTEND_PROTOTYPES for sproutcore-handlebars | packages/sproutcore-handlebars/tests/views/collection_view_test.js | @@ -32,7 +32,7 @@ module("sproutcore-handlebars/tests/views/collection_view_test", {
test("passing a block to the collection helper sets it as the template for example views", function() {
TemplateTests.CollectionTestView = SC.CollectionView.extend({
tagName: 'ul',
- content: ['foo', 'bar', 'baz']
+ cont... | true |
Other | emberjs | ember.js | 5431c3990377ef052eced529f0bce0929a90f439.json | Fix EXTEND_PROTOTYPES for sproutcore-views | packages/sproutcore-views/lib/system/ext.js | @@ -8,4 +8,4 @@
// Add a new named queue for rendering views that happens
// after bindings have synced.
var queues = SC.run.queues;
-queues.insertAt(queues.indexOf('actions')+1, 'render');
+queues.splice(jQuery.inArray('actions', queues)+1, 0, 'render'); | true |
Other | emberjs | ember.js | 5431c3990377ef052eced529f0bce0929a90f439.json | Fix EXTEND_PROTOTYPES for sproutcore-views | packages/sproutcore-views/lib/system/render_buffer.js | @@ -98,10 +98,10 @@ SC._RenderBuffer = SC.Object.extend(
init: function() {
this._super();
- set(this ,'elementClasses', []);
+ set(this ,'elementClasses', SC.NativeArray.apply([]));
set(this, 'elementAttributes', {});
set(this, 'elementStyle', {});
- set(this, 'childBuffers', []);
+ set... | true |
Other | emberjs | ember.js | 5431c3990377ef052eced529f0bce0929a90f439.json | Fix EXTEND_PROTOTYPES for sproutcore-views | packages/sproutcore-views/lib/views/view.js | @@ -13,11 +13,11 @@ var getPath = SC.getPath, meta = SC.meta, fmt = SC.String.fmt;
var childViewsProperty = SC.computed(function() {
var childViews = get(this, '_childViews');
- var ret = [];
+ var ret = SC.NativeArray.apply([]);
childViews.forEach(function(view) {
if (view.isVirtual) {
- ret = r... | true |
Other | emberjs | ember.js | 5431c3990377ef052eced529f0bce0929a90f439.json | Fix EXTEND_PROTOTYPES for sproutcore-views | packages/sproutcore-views/tests/views/collection_test.js | @@ -20,7 +20,7 @@ module("SC.CollectionView", {
test("should render a view for each item in its content array", function() {
view = SC.CollectionView.create({
- content: [1, 2, 3, 4]
+ content: SC.NativeArray.apply([1, 2, 3, 4])
});
SC.run(function() {
@@ -32,7 +32,7 @@ test("should render a view fo... | true |
Other | emberjs | ember.js | 5431c3990377ef052eced529f0bce0929a90f439.json | Fix EXTEND_PROTOTYPES for sproutcore-views | packages/sproutcore-views/tests/views/view/nearest_view_test.js | @@ -12,7 +12,7 @@ test("collectionView should return the nearest collection view", function() {
var itemViewChild;
var view = SC.CollectionView.create({
- content: [1, 2, 3],
+ content: SC.NativeArray.apply([1, 2, 3]),
isARealCollection: true,
itemViewClass: SC.View.extend({
@@ -34,7 +34,7 @@ ... | true |
Other | emberjs | ember.js | 1fa9fa630fc31a7310fd838c2ee51ac940464a9d.json | Fix EXTEND_PROTOTYPES for sproutcore-runtime | packages/sproutcore-handlebars/tests/each_test.js | @@ -3,7 +3,7 @@ var people, view;
module("the #each helper", {
setup: function() {
template = templateFor("{{#each people}}{{name}}{{/each}}");
- people = SC.Array.apply([{ name: "Steve Holt" }, { name: "Annabelle" }]);
+ people = SC.NativeArray.apply([{ name: "Steve Holt" }, { name: "Annabelle" }]);
... | true |
Other | emberjs | ember.js | 1fa9fa630fc31a7310fd838c2ee51ac940464a9d.json | Fix EXTEND_PROTOTYPES for sproutcore-runtime | packages/sproutcore-runtime/tests/controllers/array_controller_test.js | @@ -15,7 +15,7 @@ SC.MutableArrayTests.extend({
newObject: function(ary) {
var ret = ary ? ary.slice() : this.newFixture(3);
return SC.ArrayController.create({
- content: ret
+ content: SC.NativeArray.apply(ret)
});
},
| true |
Other | emberjs | ember.js | 1fa9fa630fc31a7310fd838c2ee51ac940464a9d.json | Fix EXTEND_PROTOTYPES for sproutcore-runtime | packages/sproutcore-runtime/tests/legacy_1x/mixins/observable/chained_test.js | @@ -30,7 +30,7 @@ test("chained observers on enumerable properties are triggered when the observed
var child4 = SC.Object.create({ name: "Nancy" });
set(family, 'momma', momma);
- set(momma, 'children', [child1, child2, child3]);
+ set(momma, 'children', SC.NativeArray.apply([child1, child2, child3]));
v... | true |
Other | emberjs | ember.js | 1fa9fa630fc31a7310fd838c2ee51ac940464a9d.json | Fix EXTEND_PROTOTYPES for sproutcore-runtime | packages/sproutcore-runtime/tests/legacy_1x/mixins/observable/observable_test.js | @@ -382,37 +382,37 @@ module("Computed properties", {
test("getting values should call function return value", function() {
// get each property twice. Verify return.
- var keys = 'computed computedCached dependent dependentCached'.w();
+ var keys = SC.String.w('computed computedCached dependent dependentCached... | true |
Other | emberjs | ember.js | 1fa9fa630fc31a7310fd838c2ee51ac940464a9d.json | Fix EXTEND_PROTOTYPES for sproutcore-runtime | packages/sproutcore-runtime/tests/legacy_1x/mixins/observable/observersForKey_test.js | @@ -36,14 +36,14 @@ test("should get observers", function() {
o3 = ObservableObject.create({ func: function() {} }),
observers = null;
- equals(o1.observersForKey('foo').get('length'), 0, "o1.observersForKey should return empty array");
+ equals(SC.get(o1.observersForKey('foo'), 'length'), 0, "o... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.