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 | b947b89ab37c3baabf8182f3592570a9da11f6d9.json | Fix documentation on what Ember.tryInvoke returns | packages/ember-metal/lib/utils.js | @@ -388,8 +388,7 @@ Ember.canInvoke = canInvoke;
@param {String} methodName The method name to check for
@param {Array} args The arguments to pass to the method
- @returns {Boolean} true if the method does not return false
- @returns {Boolean} false otherwise
+ @returns {*} whatever the invoked function retu... | false |
Other | emberjs | ember.js | baede126baf9e001b67bdd45412be89e86a987bf.json | Provide default args to tryInvoke - fixes #1327 | packages/ember-metal/lib/utils.js | @@ -393,6 +393,6 @@ Ember.canInvoke = canInvoke;
*/
Ember.tryInvoke = function(obj, methodName, args) {
if (canInvoke(obj, methodName)) {
- return obj[methodName].apply(obj, args);
+ return obj[methodName].apply(obj, args || []);
}
}; | false |
Other | emberjs | ember.js | 279de45122a7441e3c125cdeb3ee6e209c9203cb.json | Fix a bug in multi-selects with primitive options
The single select code path handled this case but the multi-select
did not. | packages/ember-handlebars/lib/controls/select.js | @@ -313,7 +313,7 @@ Ember.SelectOption = Ember.View.extend({
var content = get(this, 'content'),
selection = get(this, 'parentView.selection');
if (get(this, 'parentView.multiple')) {
- return selection && indexOf(selection, content) > -1;
+ return selection && indexOf(selection, content.va... | true |
Other | emberjs | ember.js | 279de45122a7441e3c125cdeb3ee6e209c9203cb.json | Fix a bug in multi-selects with primitive options
The single select code path handled this case but the multi-select
did not. | packages/ember-handlebars/tests/controls/select_test.js | @@ -220,6 +220,21 @@ test("Ember.SelectedOption knows when it is selected when multiple=true", functi
deepEqual(selectedOptions(), [false, true, true, false], "After changing it, selection should be correct");
});
+test("Ember.SelectedOption knows when it is selected when multiple=true and options are primatives"... | true |
Other | emberjs | ember.js | e53be50824d38b3e2b4ea17639571a74d049bdb0.json | Fix formatURL to use rootURL and remove formatPath | packages/ember-routing/lib/location/history_location.js | @@ -47,7 +47,7 @@ Ember.HistoryLocation = Ember.Object.extend(
var state = window.history.state,
initialURL = get(this, '_initialURL');
- path = this.formatPath(path);
+ path = this.formatURL(path);
if ((initialURL !== path && !state) || (state && state.path !== path)) {
window.histo... | true |
Other | emberjs | ember.js | e53be50824d38b3e2b4ea17639571a74d049bdb0.json | Fix formatURL to use rootURL and remove formatPath | packages/ember-routing/tests/location_test.js | @@ -169,7 +169,7 @@ test("it calls pushState if at initialURL and history.state does not exist", fun
});
test("it handles an empty path as root", function() {
- equal(locationObject.formatPath(''), '/', "The formatted url is '/'");
+ equal(locationObject.formatURL(''), '/', "The formatted url is '/'");
});
te... | true |
Other | emberjs | ember.js | 3f7a1181510c21c3afd87731970e3b79eb2e37b1.json | move guid key init before initMixins
cache more functions locally | packages/ember-runtime/lib/system/core_object.js | @@ -10,17 +10,23 @@
// Ember.Object. We only define this separately so that Ember.Set can depend on it
-
-var classToString = Ember.Mixin.prototype.toString;
-var set = Ember.set, get = Ember.get;
-var o_create = Ember.create,
+var set = Ember.set, get = Ember.get,
+ o_create = Ember.create,
o_definePrope... | false |
Other | emberjs | ember.js | 933b2b4a6eb4f82884c4ec5c567890ffb458beab.json | Add disconnectOutlet method to controller | packages/ember-views/lib/system/controller.js | @@ -132,8 +132,10 @@ Ember.ControllerMixin.reopen(/** @scope Ember.ControllerMixin.prototype */ {
Ember.assert("The name you supplied " + name + " did not resolve to a controller " + name + 'Controller', (!!controller && !!context) || !context);
}
- if (controller && context) { controller.set('content'... | true |
Other | emberjs | ember.js | 933b2b4a6eb4f82884c4ec5c567890ffb458beab.json | Add disconnectOutlet method to controller | packages/ember-views/tests/system/controller_test.js | @@ -183,3 +183,26 @@ test("connectControllers injects other controllers", function() {
equal(controller.get('postController'), postController, "should connect postController");
equal(controller.get('commentController'), commentController, "should connect commentController");
});
+
+test("can disconnect outlet fr... | true |
Other | emberjs | ember.js | a1fa3dbabe633dc8ee46a832c89ee781089c6c28.json | Add API doc for Ember.alias | packages/ember-metal/lib/mixin.js | @@ -572,6 +572,24 @@ Alias = function(methodName) {
};
Alias.prototype = new Ember.Descriptor();
+/**
+ Makes a property or method available via an additional name.
+
+ App.PaintSample = Ember.Object.extend({
+ color: 'red',
+ colour: Ember.alias('color'),
+ name: function(){
+ r... | false |
Other | emberjs | ember.js | 35fb8026e6f5abbeb936cd98f17e749f257beef1.json | Support jQuery 1.8 - fixes #1267 | Rakefile | @@ -137,7 +137,8 @@ task :test, [:suite] => :dist do |t, args|
:default => packages.map{|p| "package=#{p}" },
:runtime => [ "package=ember-metal,ember-runtime" ],
:all => packages.map{|p| "package=#{p}" } +
- ["package=all&jquery=git&nojshint=true",
+ ["package=all&jquery=1.7.2&nojs... | true |
Other | emberjs | ember.js | 35fb8026e6f5abbeb936cd98f17e749f257beef1.json | Support jQuery 1.8 - fixes #1267 | packages/ember-views/lib/core.js | @@ -5,5 +5,5 @@
// License: Licensed under MIT license (see license.js)
// ==========================================================================
-Ember.assert("Ember Views require jQuery 1.7", window.jQuery && (window.jQuery().jquery.match(/^1\.7(\.\d+)?(pre|rc\d?)?/) || Ember.ENV.FORCE_JQUERY));
+Ember.asse... | true |
Other | emberjs | ember.js | 35fb8026e6f5abbeb936cd98f17e749f257beef1.json | Support jQuery 1.8 - fixes #1267 | tests/index.html | @@ -104,7 +104,7 @@ <h2 id="qunit-userAgent"></h2>
<script>
// Load custom version of jQuery if possible
- var jQueryVersion = QUnit.urlParams.jquery || "1.7.2";
+ var jQueryVersion = QUnit.urlParams.jquery || "1.8.0";
if (jQueryVersion !== 'none') {
document.write('<script src="http://code.... | true |
Other | emberjs | ember.js | 0be5c862660e284a86ec35306da85325571987f3.json | add scheduleOnce and remove flag | packages/ember-metal/lib/run_loop.js | @@ -474,6 +474,35 @@ function invokeOnceTimer(guid, onceTimers) {
delete timers[guid];
}
+function scheduleOnce(queue, target, method, args) {
+ var tguid = Ember.guidFor(target),
+ mguid = Ember.guidFor(method),
+ onceTimers = run.autorun().onceTimers,
+ guid = onceTimers[tguid] && onceTimers[tguid][mg... | true |
Other | emberjs | ember.js | 0be5c862660e284a86ec35306da85325571987f3.json | add scheduleOnce and remove flag | packages/ember-views/lib/views/container_view.js | @@ -350,7 +350,11 @@ Ember.ContainerView = Ember.View.extend({
if (currentView) {
childViews.pushObject(currentView);
}
- }, 'currentView')
+ }, 'currentView'),
+
+ _ensureChildrenAreInDOM: function () {
+ this.invokeForState('ensureChildrenAreInDOM', this);
+ }
});
// Ember.ContainerView ex... | true |
Other | emberjs | ember.js | 1f1909bfef698d7fa1e8cdd569961e18f4c35a80.json | Remove remaining references to viewstates | ember.json | @@ -27,7 +27,6 @@
"ember-views",
"ember-states",
"ember-routing",
- "ember-viewstates",
"ember-handlebars"
]
} | true |
Other | emberjs | ember.js | 1f1909bfef698d7fa1e8cdd569961e18f4c35a80.json | Remove remaining references to viewstates | tests/index.html | @@ -189,7 +189,6 @@ <h2 id="qunit-userAgent"></h2>
'ember-states',
'ember-views',
'ember-routing',
- 'ember-viewstates',
'ember-application'
];
} | true |
Other | emberjs | ember.js | 817e2671b600dcc063b8b5f5643ffc81d6452af5.json | Remove stray require
Test files apparently do not (and should not) have `require` calls. | packages/ember-routing/tests/routable_test.js | @@ -1,5 +1,3 @@
-require('ember-routing/location');
-
module("Ember.Routable");
test("it should have its updateRoute method called when it is entered", function() { | false |
Other | emberjs | ember.js | 032e874ba0dec3cec3eb1a9efcd5e5c9b77852ab.json | Add documentation for ControllerMixin | packages/ember-runtime/lib/controllers/controller.js | @@ -1,6 +1,33 @@
require('ember-runtime/system/object');
require('ember-runtime/system/string');
+/**
+ @class
+
+ Ember.ControllerMixin provides a standard interface for all classes
+ that compose Ember's controller layer: Ember.Controller, Ember.ArrayController,
+ and Ember.ObjectController.
+
+ Within a... | true |
Other | emberjs | ember.js | 032e874ba0dec3cec3eb1a9efcd5e5c9b77852ab.json | Add documentation for ControllerMixin | packages/ember-views/lib/system/controller.js | @@ -1,6 +1,7 @@
var get = Ember.get, set = Ember.set;
-Ember.ControllerMixin.reopen({
+// @class declaration and documentation in runtime/lib/controllers/controller.js
+Ember.ControllerMixin.reopen(/** @scope Ember.ControllerMixin.prototype */ {
target: null,
controllers: null, | true |
Other | emberjs | ember.js | 1f56feb5fe5be11c0968a61c2affd16038cb6f5b.json | Add documentation for ObjectController | packages/ember-runtime/lib/controllers/object_controller.js | @@ -1,4 +1,18 @@
require('ember-runtime/system/object_proxy');
require('ember-runtime/controllers/controller');
+/**
+ @class
+
+ Ember.ObjectController is part of Ember's Controller layer. A single
+ shared instance of each Ember.ObjectController subclass in your application's
+ namespace will be created at ... | false |
Other | emberjs | ember.js | c7203f636e97d7fb7ba90c370ff2549effcf276c.json | * packages/ember-routing/lib/router.js: Fix bits of documentation. | packages/ember-routing/lib/router.js | @@ -108,11 +108,11 @@ var merge = function(original, hash) {
route: '/theBaseRouteForThisSet',
indexSubRoute: Ember.Route.extend({
- route: '/',
+ route: '/'
}),
subRouteOne: Ember.Route.extend({
-... | false |
Other | emberjs | ember.js | d8f76a7fdde741ae3d1e07b12df9cb6718170e48.json | Use git version of github_downloads | Gemfile | @@ -8,7 +8,7 @@ gem "uglifier", :git => "https://github.com/lautis/uglifier.git"
group :development do
gem "rack"
- gem "github_downloads"
+ gem "github_downloads", :git => "https://github.com/pangratz/github_downloads.git"
gem "ember-docs", :git => "https://github.com/emberjs/docs-generator.git"
gem "kic... | true |
Other | emberjs | ember.js | d8f76a7fdde741ae3d1e07b12df9cb6718170e48.json | Use git version of github_downloads | Gemfile.lock | @@ -22,6 +22,14 @@ GIT
rake (~> 0.9.0)
thor
+GIT
+ remote: https://github.com/pangratz/github_downloads.git
+ revision: 021d83165bcf37f6c2752736a9c05c13d6976f38
+ specs:
+ github_downloads (0.1.2)
+ github_api (~> 0.6)
+ rest-client (~> 1.6)
+
GIT
remote: https://github.com/wycats/ra... | true |
Other | emberjs | ember.js | a6b437824d618b549e5ae1d3d98eba8cca7dd1be.json | Fix routing with initialState | packages/ember-routing/lib/routable.js | @@ -364,8 +364,10 @@ Ember.Routable = Ember.Mixin.create({
state of the state it will eventually move into.
*/
unroutePath: function(router, path) {
+ var parentState = get(this, 'parentState');
+
// If we're at the root state, we're done
- if (get(this, 'parentState') === router) {
+ if (paren... | true |
Other | emberjs | ember.js | a6b437824d618b549e5ae1d3d98eba8cca7dd1be.json | Fix routing with initialState | packages/ember-routing/tests/router_test.js | @@ -355,6 +355,30 @@ test("should be able to unroute out of a state with context", function() {
equal(get(router, 'currentState.path'), 'root.components.show.index', "should go to the correct state");
});
+test("should be able to route with initialState", function() {
+ var router = Ember.Router.create({
+ lo... | true |
Other | emberjs | ember.js | 079adc65f3ad2e53a48c3339a06e0e62ae4500da.json | Implement immediateObserver placeholder
At present, observers are fired synchronously
when a property changes, unless they have been
manually suspended (via begin/endPropertyChanges)
or automatically, as part of the binding
synchronization process.
However, we have plans to make observers
asynchronous in the future, ... | packages/ember-metal/lib/mixin.js | @@ -586,6 +586,17 @@ Ember.observer = function(func) {
return func;
};
+// If observers ever become asynchronous, Ember.immediateObserver
+// must remain synchronous.
+Ember.immediateObserver = function() {
+ for (var i=0, l=arguments.length; i<l; i++) {
+ var arg = arguments[i];
+ Ember.assert("Immediate ... | true |
Other | emberjs | ember.js | 079adc65f3ad2e53a48c3339a06e0e62ae4500da.json | Implement immediateObserver placeholder
At present, observers are fired synchronously
when a property changes, unless they have been
manually suspended (via begin/endPropertyChanges)
or automatically, as part of the binding
synchronization process.
However, we have plans to make observers
asynchronous in the future, ... | packages/ember-metal/tests/observer_test.js | @@ -629,3 +629,45 @@ testBoth('setting a cached computed property whose value has changed should trig
equal(count, 3);
equal(get(obj, 'foo'), 'bar');
});
+
+module("Ember.immediateObserver");
+
+testBoth("immediate observers should fire synchronously", function(get, set) {
+ var obj = {},
+ observerCalled ... | true |
Other | emberjs | ember.js | 6a863c6cbef95f232d2933486c69830e381bcc1c.json | Call pushState when state null and at initial url | packages/ember-application/lib/system/history_location.js | @@ -42,8 +42,7 @@ Ember.HistoryLocation = Ember.Object.extend({
path = this.formatPath(path);
- if ((initialURL && initialURL !== path) || (state && state.path !== path)) {
- set(this, '_initialURL', null);
+ if ((initialURL !== path && !state) || (state && state.path !== path)) {
window.hist... | false |
Other | emberjs | ember.js | 464d9502d6221946864028a716d1c4f8b5fe35f9.json | add failing test | packages/ember-metal/tests/watching/watch_test.js | @@ -60,6 +60,26 @@ testBoth('watching a regular defined property', function(get, set) {
set(obj, 'foo', 'bar');
equal(willCount, 1, 'should have invoked willCount');
equal(didCount, 1, 'should have invoked didCount');
+
+ equal(get(obj, 'foo'), 'bar', 'should get new value');
+ equal(obj.foo, 'bar', 'propert... | false |
Other | emberjs | ember.js | 632307eba5d030e2f5085987e293e6ee4c314b86.json | destroy previous currentView | packages/ember-views/lib/views/container_view.js | @@ -356,6 +356,7 @@ Ember.ContainerView = Ember.View.extend({
if (currentView) {
childViews.removeObject(currentView);
+ currentView.destroy();
}
}, 'currentView'),
| false |
Other | emberjs | ember.js | 26519bc932b1e96fef2530449c22cb0dc3f0dad4.json | add failing test | packages/ember-views/tests/views/container_view_test.js | @@ -246,7 +246,7 @@ test("if a ContainerView starts with a currentView and then is set to null, the
equal(get(container, 'childViews.length'), 0, "should not have any child views");
});
-test("if a ContainerView starts with a currentView and then is set to null, the ContainerView is updated", function() {
+test("... | false |
Other | emberjs | ember.js | 396c08b1322f4b642a65005cc89cdd7bb8acce06.json | Add connectControllers convenience | packages/ember-views/lib/system/controller.js | @@ -137,6 +137,28 @@ Ember.ControllerMixin.reopen({
set(this, outletName, view);
return view;
+ },
+
+ /**
+ Convenience method to connect controllers. This method makes other controllers
+ available on the controller the method was invoked on.
+
+ For example, to make the `personController` and ... | true |
Other | emberjs | ember.js | 396c08b1322f4b642a65005cc89cdd7bb8acce06.json | Add connectControllers convenience | packages/ember-views/tests/system/controller_test.js | @@ -167,3 +167,19 @@ test("if the controller is not given while connecting an outlet, the instantiate
equal(view.get('controller'), postController, "the controller was inherited from the parent");
});
+
+test("connectControllers injects other controllers", function() {
+ var postController = {}, commentControlle... | true |
Other | emberjs | ember.js | 852f41faa7862cd3908ebee08041fef160c29f03.json | Delay routing while contexts are loading | packages/ember-routing/lib/resolved_state.js | @@ -0,0 +1,45 @@
+var get = Ember.get;
+
+Ember._ResolvedState = Ember.Object.extend({
+ manager: null,
+ state: null,
+ match: null,
+
+ object: Ember.computed(function(key, value) {
+ if (arguments.length === 2) {
+ this._object = value;
+ return value;
+ } else {
+ if (this._object) {
+ ... | true |
Other | emberjs | ember.js | 852f41faa7862cd3908ebee08041fef160c29f03.json | Delay routing while contexts are loading | packages/ember-routing/lib/routable.js | @@ -1,3 +1,5 @@
+require('ember-routing/resolved_state');
+
var get = Ember.get;
// The Ember Routable mixin assumes the existance of a simple
@@ -275,16 +277,9 @@ Ember.Routable = Ember.Mixin.create({
/**
@private
-
- Once `unroute` has finished unwinding, `routePath` will be called
- with the rema... | true |
Other | emberjs | ember.js | 852f41faa7862cd3908ebee08041fef160c29f03.json | Delay routing while contexts are loading | packages/ember-routing/lib/router.js | @@ -396,7 +396,14 @@ Ember.Router = Ember.StateManager.extend(
*/
transitionEvent: 'connectOutlets',
+ transitionTo: function() {
+ this.abortRoutingPromises();
+ this._super.apply(this, arguments);
+ },
+
route: function(path) {
+ this.abortRoutingPromises();
+
set(this, 'isRouting', true);
... | true |
Other | emberjs | ember.js | 852f41faa7862cd3908ebee08041fef160c29f03.json | Delay routing while contexts are loading | packages/ember-routing/tests/routable_test.js | @@ -345,21 +345,225 @@ test("should use a specified class `modelType` in the default `deserialize`", fu
router.route("/users/1");
});
-module("default serialize and deserialize without modelType", {
+var postSuccessCallback, postFailureCallback,
+ userSuccessCallback, userFailureCallback,
+ connectedUser, c... | true |
Other | emberjs | ember.js | 9250abaf5e12084cd12ee62a7d1e335a5ee7c5f1.json | Remove odd construct in normalizeTuples | packages/ember-metal/lib/accessors.js | @@ -217,8 +217,6 @@ Ember.normalizeTuple = function(target, path) {
return normalizeTuple(target, path);
};
-Ember.normalizeTuple.primitive = normalizeTuple;
-
Ember.getWithDefault = function(root, key, defaultValue) {
var value = get(root, key);
@@ -318,4 +316,4 @@ if (Ember.config.overrideAccessors) {
... | true |
Other | emberjs | ember.js | 9250abaf5e12084cd12ee62a7d1e335a5ee7c5f1.json | Remove odd construct in normalizeTuples | packages/ember-metal/lib/watching.js | @@ -16,7 +16,7 @@ var guidFor = Ember.guidFor, // utils.js
metaFor = Ember.meta, // utils.js
get = Ember.get, // accessors.js
set = Ember.set, // accessors.js
- normalizeTuple = Ember.normalizeTuple.primitive, // accessors.js
+ normalizeTuple = Ember.normalizeTuple, // accessors.js
GUID_KEY = ... | true |
Other | emberjs | ember.js | 3d0fbece8afe03610db33ed07a864e18772933d3.json | Remove LEGACY_HANDLEBARS_TAG flag | packages/ember-handlebars/lib/loader.js | @@ -18,10 +18,6 @@ require("ember-handlebars/ext");
Ember.Handlebars.bootstrap = function(ctx) {
var selectors = 'script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';
- if (Ember.ENV.LEGACY_HANDLEBARS_TAGS) { selectors += ', script[type="text/html"]'; }
-
- Ember.warn("Ember no longer parses... | true |
Other | emberjs | ember.js | 3d0fbece8afe03610db33ed07a864e18772933d3.json | Remove LEGACY_HANDLEBARS_TAG flag | packages/ember-handlebars/tests/loader_test.js | @@ -72,22 +72,6 @@ test('template without data-element-id should still get an attribute', function(
ok(id && /^ember\d+$/.test(id), "has standard Ember id");
});
-test('template with type text/html should work if LEGACY_HANDLEBARS_TAGS is true', function() {
- Ember.ENV.LEGACY_HANDLEBARS_TAGS = true;
-
- try {
... | true |
Other | emberjs | ember.js | 96840c6b861603a312e28fa1ab5944328fcb6372.json | Add more documentation | packages/ember-views/lib/views/view.js | @@ -162,6 +162,14 @@ var invokeForState = {
isEnabled: true
});
+ Will result in view instances with an HTML representation of:
+
+ <div id="ember1" class="ember-view enabled"></div>
+
+ When isEnabled is `false`, the resulting HTML reprensentation looks like this:
+
+ <div id="ember1" class="... | false |
Other | emberjs | ember.js | b0d48458e28d484ac58b8ea85698aaa589e578a5.json | Add some documentation to Ember.View helpers | packages/ember-views/lib/views/view.js | @@ -1991,6 +1991,23 @@ Ember.View.reopen({
});
Ember.View.reopenClass({
+
+ /**
+ @private
+
+ Parse a path and return an object which holds the parsed properties.
+
+ For example a path like "content.isEnabled:enabled:disabled" wil return the
+ following object:
+
+ {
+ path: "content.... | false |
Other | emberjs | ember.js | 6309f24ccd4e2dccf7e68a876d853d12dbd45544.json | Change ternary syntax to double colon sytax
The syntax to define class names for truthy and falsy values changed from isEnabled?enabled:disabled to isEnabled:enabled:disabled | packages/ember-handlebars/tests/handlebars_test.js | @@ -1155,7 +1155,7 @@ test("{{view}} should evaluate class bindings set to global paths", function() {
});
view = Ember.View.create({
- template: Ember.Handlebars.compile('{{view Ember.TextField class="unbound" classBinding="App.isGreat:great App.directClass App.isApp App.isEnabled?enabled:disabled"}}')
+ ... | true |
Other | emberjs | ember.js | 6309f24ccd4e2dccf7e68a876d853d12dbd45544.json | Change ternary syntax to double colon sytax
The syntax to define class names for truthy and falsy values changed from isEnabled?enabled:disabled to isEnabled:enabled:disabled | packages/ember-views/lib/views/view.js | @@ -1972,23 +1972,22 @@ Ember.View.reopen({
Ember.View.reopenClass({
_parsePropertyPath: function(path) {
- var split = path.split(/\?|:/),
+ var split = path.split(/:/),
propertyPath = split[0],
className,
falsyClassName;
- // check if the property is defined as prop?trueCla... | true |
Other | emberjs | ember.js | 6309f24ccd4e2dccf7e68a876d853d12dbd45544.json | Change ternary syntax to double colon sytax
The syntax to define class names for truthy and falsy values changed from isEnabled?enabled:disabled to isEnabled:enabled:disabled | packages/ember-views/tests/views/view/class_name_bindings_test.js | @@ -12,7 +12,7 @@ test("should apply bound class names to the element", function() {
var view = Ember.View.create({
classNameBindings: ['priority', 'isUrgent', 'isClassified:classified',
'canIgnore', 'messages.count', 'messages.resent:is-resent', 'isNumber:is-number',
- ... | true |
Other | emberjs | ember.js | 6309f24ccd4e2dccf7e68a876d853d12dbd45544.json | Change ternary syntax to double colon sytax
The syntax to define class names for truthy and falsy values changed from isEnabled?enabled:disabled to isEnabled:enabled:disabled | packages/ember-views/tests/views/view/parse_property_path_test.js | @@ -28,10 +28,10 @@ test("className is extracted", function() {
});
test("falsyClassName is extracted", function() {
- var parsed = Ember.View._parsePropertyPath("content.simpleProperty?class:falsyClass");
+ var parsed = Ember.View._parsePropertyPath("content.simpleProperty:class:falsyClass");
equal(parsed.p... | true |
Other | emberjs | ember.js | e596ab0cb9b3a176e1598b0a1d59629c2043669b.json | Add tests for Ember.View helpers | packages/ember-views/tests/views/view/class_string_for_value_test.js | @@ -0,0 +1,36 @@
+module("Ember.View - _classStringForValue");
+
+var cSFV = Ember.View._classStringForValue;
+
+test("returns dasherized version of last path part if value is true", function() {
+ equal(cSFV("propertyName", true), "property-name", "class is dasherized");
+ equal(cSFV("content.propertyName", true), "... | true |
Other | emberjs | ember.js | e596ab0cb9b3a176e1598b0a1d59629c2043669b.json | Add tests for Ember.View helpers | packages/ember-views/tests/views/view/parse_property_path_test.js | @@ -0,0 +1,37 @@
+module("Ember.View - _parsePropertyPath");
+
+test("it works with a simple property path", function() {
+ var parsed = Ember.View._parsePropertyPath("simpleProperty");
+
+ equal(parsed.path, "simpleProperty", "path is parsed correctly");
+ equal(parsed.className, undefined, "there is no className")... | true |
Other | emberjs | ember.js | 411321a81346b2d15ecfb110510a0bd9dd68108b.json | Implement helper methods in Ember.View
The helper methods are
- _parsePropertyPath
- _classStringForValue
- _classStringForPath | packages/ember-views/lib/views/view.js | @@ -926,7 +926,7 @@ Ember.View = Ember.Object.extend(Ember.Evented,
// Variable in which the old class value is saved. The observer function
// closes over this variable, so it knows which string to remove when
// the property changes.
- var oldClass, property;
+ var oldClass;
//... | false |
Other | emberjs | ember.js | a75451c878d3cda382da583118e8c021366ee82f.json | Add tests for ternary operator in class bindings | packages/ember-handlebars/tests/handlebars_test.js | @@ -1149,12 +1149,13 @@ test("{{view}} should evaluate class bindings set to global paths", function() {
window.App = Ember.Application.create({
isApp: true,
isGreat: true,
- directClass: "app-direct"
+ directClass: "app-direct",
+ isEnabled: true
});
});
view ... | true |
Other | emberjs | ember.js | a75451c878d3cda382da583118e8c021366ee82f.json | Add tests for ternary operator in class bindings | packages/ember-views/tests/views/view/class_name_bindings_test.js | @@ -11,13 +11,15 @@ module("Ember.View - Class Name Bindings");
test("should apply bound class names to the element", function() {
var view = Ember.View.create({
classNameBindings: ['priority', 'isUrgent', 'isClassified:classified',
- 'canIgnore', 'messages.count', 'messages.resent:is-re... | true |
Other | emberjs | ember.js | 60a906c49ee023653a7329e1f74989bbfe8b3adc.json | Fix example js syntax in comment | packages/ember-handlebars/lib/controls/select.js | @@ -119,7 +119,7 @@ Ember.Select = Ember.View.extend(
content: Ember.A([
{ id: 1, firstName: 'Yehuda' },
{ id: 2, firstName: 'Tom' }
- ])),
+ ]),
optionLabelPath: 'content.firstName',
optionValuePath: 'content.id'
| false |
Other | emberjs | ember.js | 7b7656f4d938b8979bdc760396b78d20403607eb.json | remove duplicate test | packages/ember-metal/tests/accessors/get_test.js | @@ -24,21 +24,6 @@ test('should get arbitrary properties on an object', function() {
});
-test('should call unknownProperty if defined and value is undefined', function() {
-
- var obj = {
- count: 0,
- unknownProperty: function(key) {
- equal(key, 'foo', 'should pass key');
- this.count++;
- ... | false |
Other | emberjs | ember.js | e668276a3aab382e145c3bc7afd059a9a6438534.json | Allow alternate clicks for href handling - Fixes #1096 | packages/ember-application/tests/system/action_url_test.js | @@ -108,3 +108,56 @@ test("it sets an URL with a context", function() {
ok(view.$().html().match(/href=['"].*\/dashboard\/1['"]/), "The html (" + view.$().html() + ") has the href /dashboard/1 in it");
});
+
+test("it does not trigger action with special clicks", function() {
+ var dispatcher = Ember.EventDispat... | true |
Other | emberjs | ember.js | e668276a3aab382e145c3bc7afd059a9a6438534.json | Allow alternate clicks for href handling - Fixes #1096 | packages/ember-handlebars/lib/helpers/action.js | @@ -6,12 +6,19 @@ var ActionHelper = EmberHandlebars.ActionHelper = {
registeredActions: {}
};
-ActionHelper.registerAction = function(actionName, eventName, target, view, context) {
+ActionHelper.registerAction = function(actionName, eventName, target, view, context, link) {
var actionId = (++Ember.$.uuid).to... | true |
Other | emberjs | ember.js | e668276a3aab382e145c3bc7afd059a9a6438534.json | Allow alternate clicks for href handling - Fixes #1096 | packages/ember-views/lib/system/event_dispatcher.js | @@ -139,7 +139,6 @@ Ember.EventDispatcher = Ember.Object.extend(
handler = action.handler;
if (action.eventName === eventName) {
- evt.preventDefault();
return handler(evt);
}
}); | true |
Other | emberjs | ember.js | 2a31b5fac2ba230565d6b64224d5598ef0bfa3cf.json | Fix failing location test | packages/ember-application/tests/system/location_test.js | @@ -151,14 +151,7 @@ test("doesn't push a state if path has not changed", function() {
});
test("it handles an empty path as root", function() {
- var setPath;
-
- window.history.pushState = function(data, title, path) {
- setPath = path;
- };
-
- locationObject.setURL('');
- equal(setPath, '/', "The update... | false |
Other | emberjs | ember.js | 8348aba5031aa8cce8b3bb9a14be94b52af527ec.json | fix meta jquery.extend issue | packages/ember-metal/lib/utils.js | @@ -152,6 +152,21 @@ if (Object.freeze) Object.freeze(EMPTY_META);
var isDefinePropertySimulated = Ember.platform.defineProperty.isSimulated;
+function Meta(obj) {
+ this.descs = {};
+ this.watching = {};
+ this.cache = {};
+ this.source = obj;
+}
+
+if (isDefinePropertySimulated) {
+ // on platforms that don... | false |
Other | emberjs | ember.js | b019bed4daea16db7867ba806b6b00a0872a08e0.json | dataTransfer property for drag and drop events | packages/ember-views/lib/system.js | @@ -5,6 +5,7 @@
// License: Licensed under MIT license (see license.js)
// ==========================================================================
+require("ember-views/system/jquery_ext");
require("ember-views/system/render_buffer");
require("ember-views/system/event_dispatcher");
require("ember-views/syst... | true |
Other | emberjs | ember.js | b019bed4daea16db7867ba806b6b00a0872a08e0.json | dataTransfer property for drag and drop events | packages/ember-views/lib/system/jquery_ext.js | @@ -0,0 +1,15 @@
+// ==========================================================================
+// Project: Ember - JavaScript Application Framework
+// Copyright: ©2006-2011 Strobe Inc. and contributors.
+// Portions ©2008-2011 Apple Inc. All rights reserved.
+// License: Licensed under MIT license (se... | true |
Other | emberjs | ember.js | b019bed4daea16db7867ba806b6b00a0872a08e0.json | dataTransfer property for drag and drop events | packages/ember-views/tests/system/jquery_ext_test.js | @@ -0,0 +1,83 @@
+// ==========================================================================
+// Project: Ember - JavaScript Application Framework
+// Copyright: ©2006-2011 Strobe Inc. and contributors.
+// Portions ©2008-2011 Apple Inc. All rights reserved.
+// License: Licensed under MIT license (se... | true |
Other | emberjs | ember.js | 1d03e01b8e6dc7458575a31b6721d643ef8482ba.json | add mandatory setter assertion | packages/ember-debug/lib/main.js | @@ -8,6 +8,13 @@ if ('undefined' === typeof Ember) {
}
}
+Ember.ENV = 'undefined' === typeof ENV ? {} : ENV;
+
+if (!('MANDATORY_SETTER' in Ember.ENV)) {
+ //Ember.ENV.MANDATORY_SETTER = 'defineProperty' in Object;
+ Ember.ENV.MANDATORY_SETTER = false;
+}
+
/**
Define an assertion that will throw an excepti... | true |
Other | emberjs | ember.js | 1d03e01b8e6dc7458575a31b6721d643ef8482ba.json | add mandatory setter assertion | packages/ember-metal/lib/accessors.js | @@ -10,6 +10,8 @@ require('ember-metal/utils');
var META_KEY = Ember.META_KEY, get, set;
+var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
+
// ..........................................................
// GET AND SET
//
@@ -30,6 +32,7 @@ get = function get(obj, keyName) {
return obj.unknownProperty(ke... | true |
Other | emberjs | ember.js | 1d03e01b8e6dc7458575a31b6721d643ef8482ba.json | add mandatory setter assertion | packages/ember-metal/lib/computed.js | @@ -266,7 +266,7 @@ ComputedPropertyPrototype.didChange = function(obj, keyName) {
var meta = metaFor(obj);
if (keyName in meta.cache) {
delete meta.cache[keyName];
- if (!meta.watching[keyName]) {
+ if (!(meta.watching[keyName] > 0)) {
removeDependentKeys(this, obj, keyName, meta);
... | true |
Other | emberjs | ember.js | 1d03e01b8e6dc7458575a31b6721d643ef8482ba.json | add mandatory setter assertion | packages/ember-metal/lib/mixin.js | @@ -22,6 +22,7 @@ var Mixin, REQUIRED, Alias,
EMPTY_META = {}, // dummy for non-writable meta
META_SKIP = { __emberproto__: true, __ember_count__: true },
o_create = Ember.create,
+ defineProperty = Ember.defineProperty,
guidFor = Ember.guidFor;
/** @private */
@@ -190,8 +191,7 @@ function fin... | true |
Other | emberjs | ember.js | 1d03e01b8e6dc7458575a31b6721d643ef8482ba.json | add mandatory setter assertion | packages/ember-metal/lib/properties.js | @@ -16,6 +16,8 @@ var GUID_KEY = Ember.GUID_KEY,
o_create = Ember.create,
objectDefineProperty = Ember.platform.defineProperty;
+var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
+
// ..........................................................
// DESCRIPTOR
//
@@ -69,23 +71,39 @@ var Descriptor = Ember.D... | true |
Other | emberjs | ember.js | 1d03e01b8e6dc7458575a31b6721d643ef8482ba.json | add mandatory setter assertion | packages/ember-metal/lib/utils.js | @@ -15,6 +15,8 @@ var o_defineProperty = Ember.platform.defineProperty,
numberCache = [],
stringCache = {};
+var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
+
/**
@private
@static
@@ -142,6 +144,8 @@ var EMPTY_META = {
watching: {}
};
+if (MANDATORY_SETTER) { EMPTY_META.values = {}; }
+
E... | true |
Other | emberjs | ember.js | 1d03e01b8e6dc7458575a31b6721d643ef8482ba.json | add mandatory setter assertion | packages/ember-metal/lib/watching.js | @@ -26,6 +26,9 @@ var guidFor = Ember.guidFor, // utils.js
FIRST_KEY = /^([^\.\*]+)/,
IS_PATH = /[\.\*]/;
+var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER,
+o_defineProperty = Ember.platform.defineProperty;
+
/** @private */
function firstKey(path) {
return path.match(FIRST_KEY)[0];
@@ -436,6 +439,25... | true |
Other | emberjs | ember.js | b534482da2bf66e2fd61226ad7026c6e46a16f3b.json | Fix `one` method on evented interface
* it should be able to take method as string
* it should properly remove listener when using different target | packages/ember-runtime/lib/mixins/evented.js | @@ -28,8 +28,11 @@ Ember.Evented = Ember.Mixin.create(
target = null;
}
+ var self = this;
var wrapped = function() {
- Ember.removeListener(this, name, target, wrapped);
+ Ember.removeListener(self, name, target, wrapped);
+
+ if ('string' === typeof method) { method = this[method]... | true |
Other | emberjs | ember.js | b534482da2bf66e2fd61226ad7026c6e46a16f3b.json | Fix `one` method on evented interface
* it should be able to take method as string
* it should properly remove listener when using different target | packages/ember-runtime/tests/system/object/events_test.js | @@ -89,3 +89,19 @@ test("binding an event can specify a different target", function() {
equal(self, target);
});
+test("a listener registered with one can take method as string and can be added with different target", function() {
+ var count = 0;
+ var target = {};
+ target.fn = function() { count++; };
+
+ ... | true |
Other | emberjs | ember.js | 526e0c51f581699e179201a0e7a890cc8a9a7230.json | Use Ember.set when cloning keywords - fixes #1062 | packages/ember-views/lib/views/view.js | @@ -750,13 +750,13 @@ Ember.View = Ember.Object.extend(Ember.Evented,
controller = get(this, 'controller');
var keywords = templateData ? Ember.copy(templateData.keywords) : {};
- keywords.view = get(this, 'concreteView');
+ set(keywords, 'view', get(this, 'concreteView'));
// If the view h... | false |
Other | emberjs | ember.js | ac900848c109addd2429b7f8d8ca5f08cb78a2a3.json | simplify defineProperty to match what mixin does | packages/ember-metal/lib/properties.js | @@ -35,12 +35,6 @@ var Descriptor = Ember.Descriptor = function() {};
// DEFINING PROPERTIES API
//
-/** @private */
-function hasDesc(descs, keyName) {
- if (keyName === 'toString') return 'function' !== typeof descs.toString;
- else return !!descs[keyName];
-}
-
/**
@private
@@ -76,45 +70,21 @@ function h... | false |
Other | emberjs | ember.js | b3f2c9c3ff07658fc5b31a152ef17952a785a160.json | Add date comparison to Ember.compare | packages/ember-runtime/lib/core.js | @@ -214,6 +214,13 @@ Ember.compare = function compare(v, w) {
}
return 0;
+ case 'date':
+ var vNum = v.getTime();
+ var wNum = w.getTime();
+ if (vNum < wNum) { return -1; }
+ if (vNum > wNum) { return 1; }
+ return 0;
+
default:
return 0;
}
@@ -329,7 +336,8 @... | true |
Other | emberjs | ember.js | b3f2c9c3ff07658fc5b31a152ef17952a785a160.json | Add date comparison to Ember.compare | packages/ember-runtime/tests/core/compare_test.js | @@ -24,6 +24,8 @@ module("Ember.compare()", {
v[11] = {a: 'hash'};
v[12] = Ember.Object.create();
v[13] = function (a) {return a;};
+ v[14] = new Date('2012/01/01');
+ v[15] = new Date('2012/06/06');
}
});
| true |
Other | emberjs | ember.js | 7ad0873be294d9d365dea74de9d51e91083b9be5.json | Remove reference to annotated todos - Fixes #583 | README.md | @@ -91,8 +91,6 @@ Hopefully you can see how all three of these powerful tools work together: start
For new users, we recommend downloading the [Ember.js Starter Kit](https://github.com/emberjs/starter-kit/downloads), which includes everything you need to get started.
-We also recommend that you check out the [anno... | false |
Other | emberjs | ember.js | eac3ae1fa2016ade07243afe5971cfdf48577900.json | Fix tests for git version of jQuery | packages/ember-handlebars/tests/views/collection_view_test.js | @@ -148,7 +148,12 @@ test("a block passed to a collection helper defaults to the content property of
view.appendTo('#qunit-fixture');
});
- equal(view.$('li:has(label:contains("foo")) + li:has(label:contains("bar")) + li:has(label:contains("baz"))').length, 1, 'one label element is created for each content i... | true |
Other | emberjs | ember.js | eac3ae1fa2016ade07243afe5971cfdf48577900.json | Fix tests for git version of jQuery | packages/ember-views/tests/views/view/view_lifecycle_test.js | @@ -152,8 +152,10 @@ test("rerender should work inside a template", function() {
Ember.TESTING_DEPRECATION = false;
}
- ok(view.$('div:contains(2), div:contains(Inside child2').length === 2,
- "Rerendering a view causes it to rerender");
+ equal(view.$('div:nth-child(1)').length, 1);
+ equal(view.$('di... | true |
Other | emberjs | ember.js | 531dac71be52d9ec38d990b020a3b0d8f833fcc4.json | Fix TextArea cursor positioning in IE - fixes #1077 | packages/ember-handlebars/lib/controls/text_area.js | @@ -36,7 +36,11 @@ Ember.TextArea = Ember.View.extend(Ember.TextSupport,
cols: null,
_updateElementValue: Ember.observer(function() {
- this.$().val(get(this, 'value'));
+ // We do this check so cursor position doesn't get affected in IE
+ var value = get(this, 'value');
+ if (value !== this.$().val... | false |
Other | emberjs | ember.js | 3fb87cf07765307ab6082436abe35bd437135116.json | Prevent proxies from being set to themselves | packages/ember-runtime/lib/system/array_proxy.js | @@ -130,6 +130,8 @@ Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray,
var content = get(this, 'content'),
len = content ? get(content, 'length') : 0;
+ Ember.assert("Can't set ArrayProxy's content to itself", content !== this);
+
if (content) {
content.addArrayObserver(this, ... | true |
Other | emberjs | ember.js | 3fb87cf07765307ab6082436abe35bd437135116.json | Prevent proxies from being set to themselves | packages/ember-runtime/lib/system/object_proxy.js | @@ -141,6 +141,10 @@ Ember.ObjectProxy = Ember.Object.extend(
*/
content: null,
/** @private */
+ _contentDidChange: Ember.observer(function() {
+ Ember.assert("Can't set ObjectProxy's content to itself", this.get('content') !== this);
+ }, 'content'),
+ /** @private */
delegateGet: function (key) {
... | true |
Other | emberjs | ember.js | 1c6d434493d566f02cd89c871dd6b3ba3789ffde.json | Add README for how to run benchmarks | benchmarks/README.md | @@ -0,0 +1,7 @@
+# Extremely simple Ember benchmarks
+
+To run the benchmarks, serve the repository root on a web server (`gem install
+asdf; asdf`), run `rake` to build Ember, and open e.g.
+`http://localhost:9292/benchmarks/index.html?suitePath=plain_object.js` to run
+`benchmarks/suites/plain_object.js`. Run `cp -r ... | false |
Other | emberjs | ember.js | a71efcd69b5a5bd6d202fcddfb89e539ae4803c1.json | Remove old ember_assert call
Ember is still undefined, so I'm deleting it instead of using Ember.assert. | benchmarks/iframe_runner.js | @@ -10,7 +10,6 @@ BenchWarmer.evalString = function(string, emberPath, logger, profile) {
var benchWarmer = new BenchWarmer(emberPath, logger, profile);
var bench = function(name, fn) {
- ember_assert("Please pass in a name and function", arguments.length === 2);
benchWarmer.bench(name, fn);
};
| false |
Other | emberjs | ember.js | 3097ea8f12b53f6e34d559d22f85d81d2f857b1b.json | Fix tests for git version of jQuery | packages/ember-handlebars/tests/views/collection_view_test.js | @@ -172,7 +172,12 @@ test("a block passed to a collection helper defaults to the content property of
view.appendTo('#qunit-fixture');
});
- equal(view.$('li:has(label:contains("foo")) + li:has(label:contains("bar")) + li:has(label:contains("baz"))').length, 1, 'one label element is created for each content i... | true |
Other | emberjs | ember.js | 3097ea8f12b53f6e34d559d22f85d81d2f857b1b.json | Fix tests for git version of jQuery | packages/ember-views/tests/views/view/view_lifecycle_test.js | @@ -151,8 +151,11 @@ test("rerender should work inside a template", function() {
} finally {
Ember.TESTING_DEPRECATION = false;
}
- ok(view.$('div:contains(2), div:contains(Inside child2').length === 2,
- "Rerendering a view causes it to rerender");
+
+ equal(view.$('div:nth-child(1)').length, 1);
+ e... | true |
Other | emberjs | ember.js | c28bdec39586de3721c9e1d14a68696f4ac24159.json | give function names | packages/ember-handlebars/lib/helpers/binding.js | @@ -17,7 +17,7 @@ var EmberHandlebars = Ember.Handlebars, helpers = EmberHandlebars.helpers;
// Binds a property into the DOM. This will create a hook in DOM that the
// KVO system will look for and update if the property changes.
/** @private */
-var bind = function(property, options, preserveContext, shouldDisplay... | true |
Other | emberjs | ember.js | c28bdec39586de3721c9e1d14a68696f4ac24159.json | give function names | packages/ember-metal/lib/utils.js | @@ -57,7 +57,7 @@ var GUID_DESC = {
@returns {String} the guid
*/
-Ember.generateGuid = function(obj, prefix) {
+Ember.generateGuid = function generateGuid(obj, prefix) {
if (!prefix) prefix = 'ember';
var ret = (prefix + (uuid++));
if (obj) {
@@ -80,7 +80,7 @@ Ember.generateGuid = function(obj, prefix) ... | true |
Other | emberjs | ember.js | b4f4edd67b076fcd91bc1763693611577244b92a.json | Add support for tabindex in Ember Controls.
For power users, having a well defined tab order on controls is a
must. The 'tabindex' property of HTML adds support for this, however
there was no way to add the attribute when using Ember controls.
This patch adds tabindex support and tests for all the major HTML
controls... | packages/ember-handlebars/lib/controls/button.js | @@ -16,7 +16,7 @@ Ember.Button = Ember.View.extend(Ember.TargetActionSupport, {
propagateEvents: false,
- attributeBindings: ['type', 'disabled', 'href'],
+ attributeBindings: ['type', 'disabled', 'href', 'tabindex'],
/** @private
Overrides TargetActionSupport's targetObject computed | true |
Other | emberjs | ember.js | b4f4edd67b076fcd91bc1763693611577244b92a.json | Add support for tabindex in Ember Controls.
For power users, having a well defined tab order on controls is a
must. The 'tabindex' property of HTML adds support for this, however
there was no way to add the attribute when using Ember controls.
This patch adds tabindex support and tests for all the major HTML
controls... | packages/ember-handlebars/lib/controls/checkbox.js | @@ -42,7 +42,7 @@ Ember.Checkbox = Ember.View.extend({
tagName: 'input',
- attributeBindings: ['type', 'checked', 'disabled'],
+ attributeBindings: ['type', 'checked', 'disabled', 'tabindex'],
type: "checkbox",
checked: false, | true |
Other | emberjs | ember.js | b4f4edd67b076fcd91bc1763693611577244b92a.json | Add support for tabindex in Ember Controls.
For power users, having a well defined tab order on controls is a
must. The 'tabindex' property of HTML adds support for this, however
there was no way to add the attribute when using Ember controls.
This patch adds tabindex support and tests for all the major HTML
controls... | packages/ember-handlebars/lib/controls/select.js | @@ -97,7 +97,7 @@ Ember.Select = Ember.View.extend(
tagName: 'select',
classNames: ['ember-select'],
defaultTemplate: Ember.Handlebars.compile('{{#if view.prompt}}<option value>{{view.prompt}}</option>{{/if}}{{#each view.content}}{{view Ember.SelectOption contentBinding="this"}}{{/each}}'),
- attributeBinding... | true |
Other | emberjs | ember.js | b4f4edd67b076fcd91bc1763693611577244b92a.json | Add support for tabindex in Ember Controls.
For power users, having a well defined tab order on controls is a
must. The 'tabindex' property of HTML adds support for this, however
there was no way to add the attribute when using Ember controls.
This patch adds tabindex support and tests for all the major HTML
controls... | packages/ember-handlebars/lib/controls/text_support.js | @@ -15,7 +15,7 @@ Ember.TextSupport = Ember.Mixin.create(
value: "",
- attributeBindings: ['placeholder', 'disabled', 'maxlength'],
+ attributeBindings: ['placeholder', 'disabled', 'maxlength', 'tabindex'],
placeholder: null,
disabled: false,
maxlength: null, | true |
Other | emberjs | ember.js | b4f4edd67b076fcd91bc1763693611577244b92a.json | Add support for tabindex in Ember Controls.
For power users, having a well defined tab order on controls is a
must. The 'tabindex' property of HTML adds support for this, however
there was no way to add the attribute when using Ember controls.
This patch adds tabindex support and tests for all the major HTML
controls... | packages/ember-handlebars/tests/controls/button_test.js | @@ -59,6 +59,17 @@ test("should become disabled if the disabled attribute is changed", function() {
ok(button.$().is(":not(:disabled)"));
});
+test("should support the tabindex property", function() {
+ button.set('tabindex', 6);
+ append();
+
+ equal(button.$().prop('tabindex'), '6', 'the initial button tabin... | true |
Other | emberjs | ember.js | b4f4edd67b076fcd91bc1763693611577244b92a.json | Add support for tabindex in Ember Controls.
For power users, having a well defined tab order on controls is a
must. The 'tabindex' property of HTML adds support for this, however
there was no way to add the attribute when using Ember controls.
This patch adds tabindex support and tests for all the major HTML
controls... | packages/ember-handlebars/tests/controls/checkbox_test.js | @@ -53,6 +53,19 @@ test("should become disabled if the disabled attribute is changed", function() {
ok(checkboxView.$().is(":not(:disabled)"));
});
+test("should support the tabindex property", function() {
+ checkboxView = Ember.Checkbox.create({});
+
+ checkboxView.set('tabindex', 6);
+ append();
+
+ equal(... | true |
Other | emberjs | ember.js | b4f4edd67b076fcd91bc1763693611577244b92a.json | Add support for tabindex in Ember Controls.
For power users, having a well defined tab order on controls is a
must. The 'tabindex' property of HTML adds support for this, however
there was no way to add the attribute when using Ember controls.
This patch adds tabindex support and tests for all the major HTML
controls... | packages/ember-handlebars/tests/controls/select_test.js | @@ -56,6 +56,18 @@ test("can have options", function() {
equal(select.$().text(), "123", "Options should have content");
});
+
+test("select tabindex is updated when setting tabindex property of view", function() {
+ select.set('tabindex', '4');
+ append();
+
+ equal(select.$().attr('tabindex'), "4", "renders ... | true |
Other | emberjs | ember.js | b4f4edd67b076fcd91bc1763693611577244b92a.json | Add support for tabindex in Ember Controls.
For power users, having a well defined tab order on controls is a
must. The 'tabindex' property of HTML adds support for this, however
there was no way to add the attribute when using Ember controls.
This patch adds tabindex support and tests for all the major HTML
controls... | packages/ember-handlebars/tests/controls/text_area_test.js | @@ -114,6 +114,19 @@ test("input cols is updated when setting cols property of view", function() {
equal(textArea.$().attr('cols'), "40", "updates text area after cols changes");
});
+test("input tabindex is updated when setting tabindex property of view", function() {
+ Ember.run(function() {
+ set(textArea,... | true |
Other | emberjs | ember.js | b4f4edd67b076fcd91bc1763693611577244b92a.json | Add support for tabindex in Ember Controls.
For power users, having a well defined tab order on controls is a
must. The 'tabindex' property of HTML adds support for this, however
there was no way to add the attribute when using Ember controls.
This patch adds tabindex support and tests for all the major HTML
controls... | packages/ember-handlebars/tests/controls/text_field_test.js | @@ -101,6 +101,19 @@ test("input size is updated when setting size property of view", function() {
equal(textField.$().attr('size'), "40", "updates text field after size changes");
});
+test("input tabindex is updated when setting tabindex property of view", function() {
+ Ember.run(function() {
+ set(textFie... | true |
Other | emberjs | ember.js | 7f773de4af3f2613fa9ec86d1b0132c6bdd0fcda.json | Remove redundant check for !HAS_THIS
Any string matching IS_GLOBAL cannot match HAS_THIS. | packages/ember-metal/lib/accessors.js | @@ -309,5 +309,5 @@ Ember.trySetPath = function(root, path, value) {
@returns Boolean
*/
Ember.isGlobalPath = function(path) {
- return !HAS_THIS.test(path) && IS_GLOBAL.test(path);
+ return IS_GLOBAL.test(path);
}; | false |
Other | emberjs | ember.js | 71d1e61c44bbc84ee2a29d7ffc1173406e83cd88.json | Move redundant regex test into assert | packages/ember-metal/lib/accessors.js | @@ -254,7 +254,8 @@ Ember.getPath = function(root, path) {
Ember.setPath = function(root, path, value, tolerant) {
var keyName;
- if (typeof root === 'string' && IS_GLOBAL.test(root)) {
+ if (typeof root === 'string') {
+ Ember.assert("Path '" + root + "' must be global if no root is given.", IS_GLOBAL.test(... | false |
Other | emberjs | ember.js | ca4476adf97e8d869609ded000e660938783040d.json | Fix a stray variable missed in 3d5587 | packages/ember-states/lib/state_manager.js | @@ -593,7 +593,7 @@ Ember.StateManager = Ember.State.extend(
exitStates.shift();
}
- currentState.pathsCache[name] = {
+ currentState.pathsCache[path] = {
exitStates: exitStates,
enterStates: enterStates,
resolveState: resolveState | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.