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 | 80be0ac7c8ab46f6ed09d27ca87bf6877c20229b.json | Remove duplicate `props_helper` module
Utilize the more full-fledged `ember-runtime/tests/props_helper` module
instead. | packages/ember-runtime/tests/ext/function_test.js | @@ -1,4 +1,4 @@
-import {testBoth} from 'ember-runtime/tests/props_helper';
+import { testBoth } from "ember-metal/tests/props_helper";
QUnit.module('Function.prototype.observes() helper');
| true |
Other | emberjs | ember.js | 80be0ac7c8ab46f6ed09d27ca87bf6877c20229b.json | Remove duplicate `props_helper` module
Utilize the more full-fledged `ember-runtime/tests/props_helper` module
instead. | packages/ember-runtime/tests/mixins/array_test.js | @@ -4,9 +4,9 @@ import { set } from "ember-metal/property_set";
import { addObserver } from "ember-metal/observer";
import { observer as emberObserver } from "ember-metal/mixin";
import { computed } from "ember-metal/computed";
-import { testBoth } from 'ember-runtime/tests/props_helper';
-import { ArrayTests } from... | true |
Other | emberjs | ember.js | 80be0ac7c8ab46f6ed09d27ca87bf6877c20229b.json | Remove duplicate `props_helper` module
Utilize the more full-fledged `ember-runtime/tests/props_helper` module
instead. | packages/ember-runtime/tests/mixins/observable_test.js | @@ -1,7 +1,7 @@
import { computed } from "ember-metal/computed";
import { addObserver } from "ember-metal/observer";
-import EmberObject from 'ember-runtime/system/object';
-import { testBoth } from 'ember-runtime/tests/props_helper';
+import EmberObject from "ember-runtime/system/object";
+import { testBoth } from "... | true |
Other | emberjs | ember.js | 80be0ac7c8ab46f6ed09d27ca87bf6877c20229b.json | Remove duplicate `props_helper` module
Utilize the more full-fledged `ember-runtime/tests/props_helper` module
instead. | packages/ember-runtime/tests/props_helper.js | @@ -1,53 +0,0 @@
-import Ember from 'ember-metal/core';
-import {get as getFromEmberMetal, getWithDefault as getWithDefaultFromEmberMetal} from 'ember-metal/property_get';
-import {set as setFromEmberMetal} from 'ember-metal/property_set';
-
-// used by unit tests to test both accessor mode and non-accessor mode
-var t... | true |
Other | emberjs | ember.js | 80be0ac7c8ab46f6ed09d27ca87bf6877c20229b.json | Remove duplicate `props_helper` module
Utilize the more full-fledged `ember-runtime/tests/props_helper` module
instead. | packages/ember-runtime/tests/system/object/computed_test.js | @@ -1,7 +1,7 @@
-import {computed} from "ember-metal/computed";
-import {get as emberGet} from "ember-metal/property_get";
-import {observer} from "ember-metal/mixin";
-import { testWithDefault } from 'ember-runtime/tests/props_helper';
+import { computed } from "ember-metal/computed";
+import { get as emberGet } from ... | true |
Other | emberjs | ember.js | 80be0ac7c8ab46f6ed09d27ca87bf6877c20229b.json | Remove duplicate `props_helper` module
Utilize the more full-fledged `ember-runtime/tests/props_helper` module
instead. | packages/ember-runtime/tests/system/object/destroy_test.js | @@ -8,8 +8,8 @@ import {
endPropertyChanges
} from "ember-metal/property_events";
import objectKeys from "ember-metal/keys";
-import { testBoth } from 'ember-runtime/tests/props_helper';
-import EmberObject from 'ember-runtime/system/object';
+import { testBoth } from "ember-metal/tests/props_helper";
+import Embe... | true |
Other | emberjs | ember.js | 80be0ac7c8ab46f6ed09d27ca87bf6877c20229b.json | Remove duplicate `props_helper` module
Utilize the more full-fledged `ember-runtime/tests/props_helper` module
instead. | packages/ember-runtime/tests/system/object/observer_test.js | @@ -1,7 +1,7 @@
import Ember from "ember-metal/core";
-import {observer} from "ember-metal/mixin";
+import { observer } from "ember-metal/mixin";
import run from "ember-metal/run_loop";
-import {testBoth} from 'ember-runtime/tests/props_helper';
+import { testBoth } from "ember-metal/tests/props_helper";
import Embe... | true |
Other | emberjs | ember.js | 80be0ac7c8ab46f6ed09d27ca87bf6877c20229b.json | Remove duplicate `props_helper` module
Utilize the more full-fledged `ember-runtime/tests/props_helper` module
instead. | packages/ember-runtime/tests/system/object_proxy_test.js | @@ -1,7 +1,7 @@
-import {addObserver, removeObserver} from "ember-metal/observer";
-import {computed} from "ember-metal/computed";
-import {isWatching} from "ember-metal/watching";
-import {testBoth} from 'ember-runtime/tests/props_helper';
+import { addObserver, removeObserver } from "ember-metal/observer";
+import { ... | true |
Other | emberjs | ember.js | b2d86a3cfcca0d8b0974169fede63ed872b92fde.json | Include number of expected assertions
Without specifying the number of expected assertions, the callback might
never be evaluated, and the test might pass, acting as a false positive. | packages/ember-metal/tests/run_loop/run_bind_test.js | @@ -19,6 +19,7 @@ test('Ember.run.bind builds a run-loop wrapped callback handler', function() {
});
test('Ember.run.bind keeps the async callback arguments', function() {
+ expect(4);
var asyncCallback = function(increment, increment2, increment3) {
ok(run.currentRunLoop, 'expected a run-loop'); | false |
Other | emberjs | ember.js | a7e40622157fad6822d5f734c6325b99de811211.json | Remove Duplicate Test
`should be able to be inserted...` occurs twice in the test file. | packages/ember-routing-htmlbars/tests/helpers/link-to_test.js | @@ -28,17 +28,6 @@ QUnit.module("Handlebars {{link-to}} helper", {
});
-test("should be able to be inserted in DOM when the router is not present", function() {
- var template = "{{#link-to 'index'}}Go to Index{{/link-to}}";
- view = EmberView.create({
- template: compile(template)
- });
-
- appendView(view... | false |
Other | emberjs | ember.js | b2617c0284e335ee2718b28b24e0310521ef5c91.json | Improve test names | packages/ember-htmlbars/tests/attr_nodes/boolean_test.js | @@ -19,7 +19,7 @@ QUnit.module("ember-htmlbars: boolean attribute", {
}
});
-test("true property is output", function() {
+test("disabled property can be set true", function() {
view = EmberView.create({
context: {isDisabled: true},
template: compile("<input disabled={{isDisabled}}>")
@@ -32,7 +32,7 ... | true |
Other | emberjs | ember.js | b2617c0284e335ee2718b28b24e0310521ef5c91.json | Improve test names | packages/ember-htmlbars/tests/attr_nodes/class_test.js | @@ -19,7 +19,7 @@ QUnit.module("ember-htmlbars: class attribute", {
}
});
-test("property can set multiple classes", function() {
+test("class property can contain multiple classes", function() {
view = EmberView.create({
context: {classes: 'large blue'},
template: compile("<div class={{classes}}></d... | true |
Other | emberjs | ember.js | b8aef4dce60e65c8044f4dae5f13e4b62b72efa1.json | Allow multiple classes per stream | packages/ember-htmlbars/lib/attr_nodes/quoted_class.js | @@ -62,6 +62,20 @@ QuotedClassAttrNode.prototype.scheduledRenderIfNeeded = function scheduledRender
}
};
+function pushString(list, string) {
+ var parts = string.split(' ');
+ var length = parts.length;
+ if (length === 1 && parts[0].length > 0) {
+ list.push(parts[0]);
+ } else {
+ for (var i=0;i<leng... | true |
Other | emberjs | ember.js | b8aef4dce60e65c8044f4dae5f13e4b62b72efa1.json | Allow multiple classes per stream | packages/ember-htmlbars/tests/attr_nodes/class_test.js | @@ -84,4 +84,23 @@ test("attribute can use multiple props with subxpression", function() {
ok(view.$('.round')[0], 'third class found after change');
});
+test("multiple classed can yield from a single id", function() {
+ view = EmberView.create({
+ context: {
+ size: 'large small'
+ },
+ template:... | true |
Other | emberjs | ember.js | 1122e66b56b3aa6ef7cca57eaefc0cd1a6a63ff5.json | Remove some closures | packages/ember-htmlbars/lib/attr_nodes/quoted_class.js | @@ -11,10 +11,7 @@ function ClassNode(stream, renderable) {
this.lastValue = null;
this.currentValue = null;
this.isDirty = false;
- var node = this;
- stream.subscribe(function(){
- node.update();
- });
+ stream.subscribe(this.update, this);
this.update();
}
@@ -55,12 +52,14 @@ function QuotedCla... | true |
Other | emberjs | ember.js | 1122e66b56b3aa6ef7cca57eaefc0cd1a6a63ff5.json | Remove some closures | packages/ember-htmlbars/lib/attr_nodes/simple.js | @@ -19,10 +19,7 @@ SimpleAttrNode.prototype.init = function init(element, attrName, simpleAttrValue
this.currentValue = null;
if (this.attrValue.isStream) {
- var attrNode = this;
- this.attrValue.subscribe(function(){
- attrNode.renderIfNeeded();
- });
+ this.attrValue.subscribe(this.renderIfN... | true |
Other | emberjs | ember.js | 1122e66b56b3aa6ef7cca57eaefc0cd1a6a63ff5.json | Remove some closures | packages/ember-htmlbars/lib/helpers/bind-attr.js | @@ -226,9 +226,7 @@ function streamifyClassBindings(view, classBindingsString) {
var value = lazyValue.value();
return classStringForParsedPath(_parsedPath, value);
});
- lazyValue.subscribe(function(){
- classNameBound.notify();
- });
+ lazyValue.subscribe(c... | true |
Other | emberjs | ember.js | a36af0579635b1255074dabc690eb3f0b48da238.json | Add a feature flag for attribute syntax | FEATURES.md | @@ -94,3 +94,10 @@ for a detailed explanation.
Added in [#9718](https://github.com/emberjs/ember.js/pull/9718).
+* `ember-htmlbars-attribute-syntax`
+
+ Adds the `class="{{color}}"` syntax to Ember HTMLBars templates.
+ Works with arbitrary attributes and properties.
+
+ Added in [#9721](https://github.com/em... | true |
Other | emberjs | ember.js | a36af0579635b1255074dabc690eb3f0b48da238.json | Add a feature flag for attribute syntax | features.json | @@ -19,7 +19,8 @@
"ember-htmlbars": null,
"ember-htmlbars-block-params": null,
"ember-htmlbars-component-generation": null,
- "ember-htmlbars-inline-if-helper": null
+ "ember-htmlbars-inline-if-helper": null,
+ "ember-htmlbars-attribute-syntax": null
},
"debugStatements": [
"Ember.war... | true |
Other | emberjs | ember.js | a36af0579635b1255074dabc690eb3f0b48da238.json | Add a feature flag for attribute syntax | packages/ember-htmlbars/lib/hooks/attribute.js | @@ -6,6 +6,21 @@
import attrNodeTypeFor from "ember-htmlbars/attr_nodes";
export default function attribute(element, attrName, quoted, view, attrValue, options, env) {
- var AttrNode = attrNodeTypeFor(attrName, element, quoted);
- new AttrNode(element, attrName, attrValue, env.dom);
+ var isAllowed = true;
+
+ ... | true |
Other | emberjs | ember.js | a36af0579635b1255074dabc690eb3f0b48da238.json | Add a feature flag for attribute syntax | packages/ember-htmlbars/tests/attr_nodes/boolean_test.js | @@ -9,7 +9,7 @@ function appendView(view) {
run(function() { view.appendTo('#qunit-fixture'); });
}
-if (Ember.FEATURES.isEnabled('ember-htmlbars')) {
+if (Ember.FEATURES.isEnabled('ember-htmlbars-attribute-syntax')) {
QUnit.module("ember-htmlbars: boolean attribute", {
teardown: function(){ | true |
Other | emberjs | ember.js | a36af0579635b1255074dabc690eb3f0b48da238.json | Add a feature flag for attribute syntax | packages/ember-htmlbars/tests/attr_nodes/class_test.js | @@ -9,7 +9,7 @@ function appendView(view) {
run(function() { view.appendTo('#qunit-fixture'); });
}
-if (Ember.FEATURES.isEnabled('ember-htmlbars')) {
+if (Ember.FEATURES.isEnabled('ember-htmlbars-attribute-syntax')) {
QUnit.module("ember-htmlbars: class attribute", {
teardown: function(){ | true |
Other | emberjs | ember.js | a36af0579635b1255074dabc690eb3f0b48da238.json | Add a feature flag for attribute syntax | packages/ember-htmlbars/tests/attr_nodes/data_test.js | @@ -9,7 +9,8 @@ import { appendView, destroyView } from "ember-views/tests/view_helpers";
var view, originalSetAttribute, setAttributeCalls;
var dom = defaultEnv.dom;
-if (Ember.FEATURES.isEnabled('ember-htmlbars')) {
+if (Ember.FEATURES.isEnabled('ember-htmlbars-attribute-syntax')) {
+
QUnit.module("ember-htmlb... | true |
Other | emberjs | ember.js | a36af0579635b1255074dabc690eb3f0b48da238.json | Add a feature flag for attribute syntax | packages/ember-htmlbars/tests/attr_nodes/href_test.js | @@ -9,7 +9,7 @@ function appendView(view) {
run(function() { view.appendTo('#qunit-fixture'); });
}
-if (Ember.FEATURES.isEnabled('ember-htmlbars')) {
+if (Ember.FEATURES.isEnabled('ember-htmlbars-attribute-syntax')) {
QUnit.module("ember-htmlbars: href attribute", {
teardown: function(){ | true |
Other | emberjs | ember.js | a36af0579635b1255074dabc690eb3f0b48da238.json | Add a feature flag for attribute syntax | packages/ember-htmlbars/tests/attr_nodes/nonmatching_reflection_test.js | @@ -9,7 +9,7 @@ function appendView(view) {
run(function() { view.appendTo('#qunit-fixture'); });
}
-if (Ember.FEATURES.isEnabled('ember-htmlbars')) {
+if (Ember.FEATURES.isEnabled('ember-htmlbars-attribute-syntax')) {
QUnit.module("ember-htmlbars: nonmatching reflection", {
teardown: function(){ | true |
Other | emberjs | ember.js | a36af0579635b1255074dabc690eb3f0b48da238.json | Add a feature flag for attribute syntax | packages/ember-htmlbars/tests/attr_nodes/svg_test.js | @@ -9,7 +9,7 @@ function appendView(view) {
run(function() { view.appendTo('#qunit-fixture'); });
}
-if (Ember.FEATURES.isEnabled('ember-htmlbars')) {
+if (Ember.FEATURES.isEnabled('ember-htmlbars-attribute-syntax')) {
QUnit.module("ember-htmlbars: svg attribute", {
teardown: function(){ | true |
Other | emberjs | ember.js | a36af0579635b1255074dabc690eb3f0b48da238.json | Add a feature flag for attribute syntax | packages/ember-htmlbars/tests/attr_nodes/value_test.js | @@ -9,7 +9,7 @@ function appendView(view) {
run(function() { view.appendTo('#qunit-fixture'); });
}
-if (Ember.FEATURES.isEnabled('ember-htmlbars')) {
+if (Ember.FEATURES.isEnabled('ember-htmlbars-attribute-syntax')) {
QUnit.module("ember-htmlbars: value attribute", {
teardown: function(){ | true |
Other | emberjs | ember.js | a87de7ac38a48b3da362fcf5b2dd64daf2a3c8aa.json | Port attrs and classes via bind-attr to AttrNode | packages/ember-htmlbars/lib/attr_nodes/legacy_bind.js | @@ -0,0 +1,53 @@
+/**
+@module ember
+@submodule ember-htmlbars
+*/
+
+import { fmt } from "ember-runtime/system/string";
+import { typeOf } from "ember-metal/utils";
+import isNone from 'ember-metal/is_none';
+import SimpleAttrNode from "./simple";
+import { create as o_create } from "ember-metal/platform";
+
+functio... | true |
Other | emberjs | ember.js | a87de7ac38a48b3da362fcf5b2dd64daf2a3c8aa.json | Port attrs and classes via bind-attr to AttrNode | packages/ember-htmlbars/lib/helpers/bind-attr.js | @@ -6,12 +6,12 @@
import Ember from "ember-metal/core"; // Ember.assert
import { fmt } from "ember-runtime/system/string";
-import { typeOf } from "ember-metal/utils";
-import { forEach } from "ember-metal/array";
+import QuotedClassAttrNode from "ember-htmlbars/attr_nodes/quoted_class";
+import LegacyBindAttrNode ... | true |
Other | emberjs | ember.js | a87de7ac38a48b3da362fcf5b2dd64daf2a3c8aa.json | Port attrs and classes via bind-attr to AttrNode | packages/ember-htmlbars/tests/helpers/bind_attr_test.js | @@ -329,11 +329,12 @@ test("should not allow XSS injection via {{bind-attr}} with class", function() {
foo: '" onmouseover="alert(\'I am in your classes hacking your app\');'
});
- appendView(view);
+ try {
+ appendView(view);
+ } catch (e) {
+ }
equal(view.$('img').attr('onmouseover'), undefined)... | true |
Other | emberjs | ember.js | a87de7ac38a48b3da362fcf5b2dd64daf2a3c8aa.json | Port attrs and classes via bind-attr to AttrNode | packages/ember-views/lib/views/view.js | @@ -2273,6 +2273,7 @@ View.views = {};
// method.
View.childViewsProperty = childViewsProperty;
+// Used by Handlebars helpers, view element attributes
View.applyAttributeBindings = function(elem, name, value) {
var type = typeOf(value);
| true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | package.json | @@ -42,7 +42,7 @@
"git-repo-version": "0.0.1",
"glob": "~3.2.8",
"handlebars": "^2.0",
- "htmlbars": "0.1.12",
+ "htmlbars": "0.1.13",
"ncp": "~0.5.1",
"rimraf": "~2.2.8",
"rsvp": "~3.0.6" | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/helpers/binding.js | @@ -97,7 +97,7 @@ function bindHelper(params, hash, options, env) {
var property = params[0];
- if (options.paramTypes[0] === 'string') {
+ if (typeof property === 'string') {
property = this.getStream(property);
}
| true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/helpers/collection.js | @@ -168,7 +168,6 @@ export function collectionHelper(params, hash, options, env) {
collectionClass = CollectionView;
}
- var hashTypes = options.hashTypes;
var itemHash = {};
var match;
@@ -192,8 +191,6 @@ export function collectionHelper(params, hash, options, env) {
delete hash.itemViewClass;
... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/helpers/input.js | @@ -188,18 +188,16 @@ import Ember from "ember-metal/core"; // Ember.assert
export function inputHelper(params, hash, options, env) {
Ember.assert('You can only pass attributes to the `input` helper, not arguments', params.length === 0);
- var types = options.hashTypes;
var onEvent = hash.on;
var inputType... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/helpers/loc.js | @@ -1,5 +1,6 @@
import Ember from 'ember-metal/core';
import { loc } from 'ember-runtime/system/string';
+import { isStream } from "ember-metal/streams/utils";
/**
@module ember
@@ -39,14 +40,14 @@ import { loc } from 'ember-runtime/system/string';
@see {Ember.String#loc}
*/
export function locHelper(params,... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/helpers/log.js | @@ -3,6 +3,7 @@
@submodule ember-htmlbars
*/
import Logger from "ember-metal/logger";
+import { read } from "ember-metal/streams/utils";
/**
`log` allows you to output the value of variables in the current rendering
@@ -21,12 +22,7 @@ export function logHelper(params, hash, options, env) {
var values = [];
... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/helpers/view.js | @@ -9,41 +9,41 @@ import EmberObject from "ember-runtime/system/object";
import { get } from "ember-metal/property_get";
import keys from "ember-metal/keys";
import { IS_BINDING } from "ember-metal/mixin";
-import { read } from "ember-metal/streams/utils";
+import { read, isStream } from "ember-metal/streams/utils";... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/hooks/component.js | @@ -4,7 +4,6 @@
*/
import Ember from "ember-metal/core";
-import streamifyArgs from "ember-htmlbars/system/streamify-arguments";
import lookupHelper from "ember-htmlbars/system/lookup-helper";
export default function component(morph, tagName, view, hash, options, env) {
@@ -13,7 +12,6 @@ export default function... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/hooks/element.js | @@ -3,14 +3,12 @@
@submodule ember-htmlbars
*/
-import streamifyArgs from "ember-htmlbars/system/streamify-arguments";
import lookupHelper from "ember-htmlbars/system/lookup-helper";
export default function element(domElement, path, view, params, hash, options, env) { //jshint ignore:line
var helper = lookup... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/hooks/get.js | @@ -0,0 +1,8 @@
+/**
+@module ember
+@submodule ember-htmlbars
+*/
+
+export default function get(view, path) {
+ return view.getStream(path);
+} | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/hooks/subexpr.js | @@ -3,14 +3,12 @@
@submodule ember-htmlbars
*/
-import streamifyArgs from "ember-htmlbars/system/streamify-arguments";
import lookupHelper from "ember-htmlbars/system/lookup-helper";
export default function subexpr(path, view, params, hash, options, env) {
var helper = lookupHelper(path, view, env);
if ... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/main.js | @@ -4,6 +4,7 @@ import component from "ember-htmlbars/hooks/component";
import element from "ember-htmlbars/hooks/element";
import subexpr from "ember-htmlbars/hooks/subexpr";
import attribute from "ember-htmlbars/hooks/attribute";
+import get from "ember-htmlbars/hooks/get";
import set from "ember-htmlbars/hooks/s... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/system/sanitize-for-helper.js | @@ -1,23 +0,0 @@
-/**
-@module ember
-@submodule ember-htmlbars
-*/
-
-/**
- Sanitize options so that all helpers have `types`, `hash`, and `hashTypes`.
-
- @private
- @method sanitizeOptionsForHelper
- @param {Object} options The options hash provided by the template engine.
-*/
-export function sanitizeOptionsFor... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/lib/system/streamify-arguments.js | @@ -1,27 +0,0 @@
-/**
-@module ember
-@submodule ember-htmlbars
-*/
-
-import { sanitizeOptionsForHelper } from "ember-htmlbars/system/sanitize-for-helper";
-
-export default function streamifyArgs(view, params, hash, options, env, helper) {
- sanitizeOptionsForHelper(options);
- helper.preprocessArguments(view, para... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/tests/integration/binding_integration_test.js | @@ -175,8 +175,6 @@ test('should accept bindings as a string or an Ember.Binding', function() {
EmberHandlebars.registerHelper('boogie', function(id, options) {
options.hash = options.hash || {};
- options.hashTypes = options.hashTypes || {};
-
options.hash.bindingTestBinding = Binding.oneWay('context... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-htmlbars/tests/system/sanitize-for-helper_test.js | @@ -1,51 +0,0 @@
-import { sanitizeOptionsForHelper } from "ember-htmlbars/system/sanitize-for-helper";
-
-var options;
-QUnit.module('ember-htmlbars: sanitize-for-helper', {
- setup: function() {
- options = {};
- },
-
- teardown: function() {
- ok(options.paramTypes, 'paramTypes is present');
- ok(options... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-routing-htmlbars/lib/helpers/link-to.js | @@ -5,7 +5,7 @@
import Ember from "ember-metal/core"; // assert
import { LinkView } from "ember-routing-views/views/link";
-import { read } from "ember-metal/streams/utils";
+import { read, isStream } from "ember-metal/streams/utils";
import ControllerMixin from "ember-runtime/mixins/controller";
// We need the... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-routing-htmlbars/lib/helpers/outlet.js | @@ -78,7 +78,7 @@ export function outletHelper(params, hash, options, env) {
Ember.assert(
"Using {{outlet}} with an unquoted name is not supported.",
- params.length === 0 || options.paramTypes[0] === 'string'
+ params.length === 0 || typeof params[0] === 'string'
);
var property = params[0] ||... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-routing-htmlbars/lib/helpers/render.js | @@ -11,6 +11,7 @@ import {
default as generateController
} from "ember-routing/system/generate_controller";
import { ViewHelper } from "ember-htmlbars/helpers/view";
+import { isStream } from "ember-metal/streams/utils";
/**
Calling ``{{render}}`` from within a template will insert another
@@ -93,12 +94,12 @... | true |
Other | emberjs | ember.js | 734b551f2b8407420c2a2e3497ddd9df71007d4a.json | Remove types in HTMLBars helpers | packages/ember-routing-views/lib/views/link.js | @@ -14,7 +14,7 @@ import keys from "ember-metal/keys";
import { isSimpleClick } from "ember-views/system/utils";
import EmberComponent from "ember-views/views/component";
import { routeArgs } from "ember-routing/utils";
-import { read } from "ember-metal/streams/utils";
+import { read, subscribe } from "ember-metal/... | true |
Other | emberjs | ember.js | 6ebca89f578125c617e9b0770d694730649c2d5e.json | Add HTMLBars version of makeBoundHelper.
Much simplified. Behold... | packages/ember-htmlbars/lib/main.js | @@ -9,6 +9,7 @@ import { DOMHelper } from "morph";
import template from "ember-htmlbars/system/template";
import compile from "ember-htmlbars/system/compile";
import makeViewHelper from "ember-htmlbars/system/make-view-helper";
+import makeBoundHelper from "ember-htmlbars/system/make_bound_helper";
import {
re... | true |
Other | emberjs | ember.js | 6ebca89f578125c617e9b0770d694730649c2d5e.json | Add HTMLBars version of makeBoundHelper.
Much simplified. Behold... | packages/ember-htmlbars/lib/system/make_bound_helper.js | @@ -0,0 +1,99 @@
+/**
+@module ember
+@submodule ember-htmlbars
+*/
+
+import Ember from "ember-metal/core"; // Ember.FEATURES, Ember.assert, Ember.Handlebars, Ember.lookup
+import { IS_BINDING } from "ember-metal/mixin";
+import { appendSimpleBoundView } from "ember-views/views/simple_bound_view";
+import Helper from ... | true |
Other | emberjs | ember.js | 6ebca89f578125c617e9b0770d694730649c2d5e.json | Add HTMLBars version of makeBoundHelper.
Much simplified. Behold... | packages/ember-htmlbars/tests/system/make_bound_helper_test.js | @@ -0,0 +1,219 @@
+import EmberView from "ember-views/views/view";
+import run from "ember-metal/run_loop";
+import Container from "container";
+import makeBoundHelper from "ember-htmlbars/system/make_bound_helper";
+import compile from "ember-htmlbars/system/compile";
+
+var view, container;
+
+function appendView(vie... | true |
Other | emberjs | ember.js | 800b09465da06f54996893ea8e744bc3d3569cf3.json | Remove lingering templateData | packages/ember-handlebars/lib/helpers/binding.js | @@ -62,7 +62,6 @@ function bind(property, options, preserveContext, shouldDisplay, valueNormalizer
lazyValue: lazyValue,
previousContext: currentContext,
isEscaped: !options.hash.unescaped,
- templateData: options.data,
templateHash: options.hash,
helperName: options.helperName
}; | true |
Other | emberjs | ember.js | 800b09465da06f54996893ea8e744bc3d3569cf3.json | Remove lingering templateData | packages/ember-handlebars/lib/helpers/view.js | @@ -137,7 +137,6 @@ export var ViewHelper = EmberObject.create({
var viewOptions = this.propertiesFromHTMLOptions(options, thisContext);
var currentView = data.view;
- viewOptions.templateData = data;
var newViewProto = newView.proto();
if (fn) {
@@ -168,7 +167,6 @@ export var ViewHelper = Em... | true |
Other | emberjs | ember.js | 800b09465da06f54996893ea8e744bc3d3569cf3.json | Remove lingering templateData | packages/ember-htmlbars/lib/helpers/binding.js | @@ -49,7 +49,6 @@ function bind(property, hash, options, env, preserveContext, shouldDisplay, valu
lazyValue: lazyValue,
previousContext: get(this, 'context'),
isEscaped: !hash.unescaped,
- templateData: env.data,
templateHash: hash,
helperName: options.helperName
}; | true |
Other | emberjs | ember.js | 800b09465da06f54996893ea8e744bc3d3569cf3.json | Remove lingering templateData | packages/ember-htmlbars/lib/helpers/view.js | @@ -126,7 +126,6 @@ export var ViewHelper = EmberObject.create({
var viewOptions = this.propertiesFromHTMLOptions(hash, options, env);
var currentView = data.view;
- viewOptions.templateData = data;
var newViewProto = newView.proto();
if (fn) {
@@ -159,7 +158,6 @@ export var ViewHelper = Embe... | true |
Other | emberjs | ember.js | 800b09465da06f54996893ea8e744bc3d3569cf3.json | Remove lingering templateData | packages/ember-htmlbars/tests/helpers/with_test.js | @@ -230,37 +230,6 @@ test("it should support #with this as qux", function() {
});
});
-QUnit.module("Handlebars {{#with foo}} insideGroup");
-
-test("it should render without fail [DEPRECATED]", function() {
- var View = EmberView.extend({
- template: compile("{{#view view.childView}}{{#with person}}{{name}}{... | true |
Other | emberjs | ember.js | 800b09465da06f54996893ea8e744bc3d3569cf3.json | Remove lingering templateData | packages/ember-htmlbars/tests/integration/group_test.js | @@ -1,299 +0,0 @@
-/*jshint newcap:false*/
-
-import run from "ember-metal/run_loop";
-import jQuery from "ember-views/system/jquery";
-import EmberView from "ember-views/views/view";
-import _MetamorphView from "ember-views/views/metamorph_view";
-import EmberHandlebars from "ember-handlebars-compiler";
-import ArrayP... | true |
Other | emberjs | ember.js | 800b09465da06f54996893ea8e744bc3d3569cf3.json | Remove lingering templateData | packages/ember-views/lib/views/component.js | @@ -185,8 +185,7 @@ var Component = View.extend(TargetActionSupport, ComponentTemplateDeprecation, {
_contextView: parentView,
_morph: morph,
context: get(parentView, 'context'),
- controller: get(parentView, 'controller'),
- templateData: { keywords: {} }
+ controller: g... | true |
Other | emberjs | ember.js | 800b09465da06f54996893ea8e744bc3d3569cf3.json | Remove lingering templateData | packages/ember-views/lib/views/container_view.js | @@ -328,23 +328,19 @@ var ContainerView = View.extend(MutableArray, {
childViewsDidChange: function(views, start, removed, added) {
if (added > 0) {
var changedViews = views.slice(start, start+added);
- this.initializeViews(changedViews, this, get(this, 'templateData'));
+ this.initializeViews(... | true |
Other | emberjs | ember.js | 800b09465da06f54996893ea8e744bc3d3569cf3.json | Remove lingering templateData | packages/ember-views/lib/views/view.js | @@ -1875,8 +1875,6 @@ var View = CoreView.extend({
attrs._parentView = this;
if (CoreView.detect(view)) {
- attrs.templateData = attrs.templateData || get(this, 'templateData');
-
attrs.container = this.container;
view = view.create(attrs);
@@ -1891,18 +1889,12 @@ var View = CoreView.ex... | true |
Other | emberjs | ember.js | 800b09465da06f54996893ea8e744bc3d3569cf3.json | Remove lingering templateData | packages/ember-views/tests/views/view/template_test.js | @@ -162,7 +162,6 @@ test("should provide a controller to the template if a controller is specified o
template: function(buffer, options) {
options.data.view.appendChild(EmberView.create({
controller: controller2,
- templateData: options.data,
template: function(context, options) {
... | true |
Other | emberjs | ember.js | 15aaa9e41e11e5f9bf6fa702467d1fc03dbabbd7.json | Implement block params | features.json | @@ -17,6 +17,7 @@
"ember-routing-fire-activate-deactivate-events": true,
"ember-testing-pause-test": true,
"ember-htmlbars": null,
+ "ember-htmlbars-block-params": null,
"ember-htmlbars-component-generation": null
},
"debugStatements": [ | true |
Other | emberjs | ember.js | 15aaa9e41e11e5f9bf6fa702467d1fc03dbabbd7.json | Implement block params | package.json | @@ -42,7 +42,7 @@
"git-repo-version": "0.0.1",
"glob": "~3.2.8",
"handlebars": "^2.0",
- "htmlbars": "0.1.7",
+ "htmlbars": "0.1.8",
"ncp": "~0.5.1",
"rimraf": "~2.2.8",
"rsvp": "~3.0.6" | true |
Other | emberjs | ember.js | 15aaa9e41e11e5f9bf6fa702467d1fc03dbabbd7.json | Implement block params | packages/ember-htmlbars/lib/helpers/yield.js | @@ -103,5 +103,5 @@ export function yieldHelper(params, hash, options, env) {
Ember.assert("You called yield in a template that was not a layout", !!view);
- view._yield(null, env, options.morph);
+ view._yield(null, env, options.morph, params);
} | true |
Other | emberjs | ember.js | 15aaa9e41e11e5f9bf6fa702467d1fc03dbabbd7.json | Implement block params | packages/ember-htmlbars/lib/hooks.js | @@ -1,4 +1,5 @@
import Ember from "ember-metal/core";
+import EmberError from "ember-metal/error";
import run from "ember-metal/run_loop";
import lookupHelper from "ember-htmlbars/system/lookup-helper";
import concat from "ember-htmlbars/system/concat";
@@ -24,6 +25,17 @@ function streamifyArgs(view, params, hash, ... | true |
Other | emberjs | ember.js | 15aaa9e41e11e5f9bf6fa702467d1fc03dbabbd7.json | Implement block params | packages/ember-htmlbars/lib/main.js | @@ -1,5 +1,6 @@
import Ember from "ember-metal/core";
import {
+ set,
content,
element,
subexpr,
@@ -94,6 +95,7 @@ export var defaultEnv = {
dom: new DOMHelper(),
hooks: {
+ set: set,
content: content,
element: element,
subexpr: subexpr, | true |
Other | emberjs | ember.js | 15aaa9e41e11e5f9bf6fa702467d1fc03dbabbd7.json | Implement block params | packages/ember-htmlbars/tests/integration/block_params_test.js | @@ -0,0 +1,132 @@
+import Container from 'container/container';
+import run from "ember-metal/run_loop";
+import ComponentLookup from 'ember-views/component_lookup';
+import View from "ember-views/views/view";
+import compile from "ember-htmlbars/system/compile";
+import helpers from "ember-htmlbars/helpers";
+import {... | true |
Other | emberjs | ember.js | 15aaa9e41e11e5f9bf6fa702467d1fc03dbabbd7.json | Implement block params | packages/ember-views/lib/views/component.js | @@ -169,7 +169,7 @@ var Component = View.extend(TargetActionSupport, ComponentTemplateDeprecation, {
this._keywords.view.setSource(this);
},
- _yield: function(context, options, morph) {
+ _yield: function(context, options, morph, blockArguments) {
var view = options.data.view;
var parentView = th... | true |
Other | emberjs | ember.js | 15aaa9e41e11e5f9bf6fa702467d1fc03dbabbd7.json | Implement block params | packages/ember-views/lib/views/view.js | @@ -807,7 +807,7 @@ var View = CoreView.extend({
if (template) {
var useHTMLBars = false;
if (Ember.FEATURES.isEnabled('ember-htmlbars')) {
- useHTMLBars = template.length === 3;
+ useHTMLBars = template.length >= 3;
}
if (useHTMLBars) {
@@ -821,6 +821,8 @@ var View = Co... | true |
Other | emberjs | ember.js | df4e1723ae290cd38876fd4e50b6157208db84d3.json | Add tests for attribute hook/helper.
* Add tests to confirm we are using `setAttribute` for some level of
escaping (equivalent to what we have today with `{{bind-attr}}`).
* Updated to ensure that rerenders happen in the `render` queue.
* Added dirty tracking to not needlessly update attributes.
* Move `attribute` a... | packages/ember-htmlbars/lib/helpers/attribute.js | @@ -0,0 +1,29 @@
+import run from "ember-metal/run_loop";
+
+export function attributeHelper(params, hash, options, env) {
+ var dom = env.dom;
+ var name = params[0];
+ var value = params[1];
+
+ var isDirty, lastRenderedValue;
+
+ value.subscribe(function(lazyValue) {
+ isDirty = true;
+
+ run.schedule('re... | true |
Other | emberjs | ember.js | df4e1723ae290cd38876fd4e50b6157208db84d3.json | Add tests for attribute hook/helper.
* Add tests to confirm we are using `setAttribute` for some level of
escaping (equivalent to what we have today with `{{bind-attr}}`).
* Updated to ensure that rerenders happen in the `render` queue.
* Added dirty tracking to not needlessly update attributes.
* Move `attribute` a... | packages/ember-htmlbars/lib/helpers/concat.js | @@ -0,0 +1,19 @@
+import Stream from "ember-metal/streams/stream";
+import {readArray} from "ember-metal/streams/read";
+
+export function concatHelper(params, hash, options, env) {
+ var stream = new Stream(function() {
+ return readArray(params).join('');
+ });
+
+ for (var i = 0, l = params.length; i < l; i++)... | true |
Other | emberjs | ember.js | df4e1723ae290cd38876fd4e50b6157208db84d3.json | Add tests for attribute hook/helper.
* Add tests to confirm we are using `setAttribute` for some level of
escaping (equivalent to what we have today with `{{bind-attr}}`).
* Updated to ensure that rerenders happen in the `render` queue.
* Added dirty tracking to not needlessly update attributes.
* Move `attribute` a... | packages/ember-htmlbars/lib/helpers/unbound.js | @@ -1,4 +1,4 @@
-import { lookupHelper } from 'ember-htmlbars/system/lookup-helper';
+import lookupHelper from 'ember-htmlbars/system/lookup-helper';
import { read } from 'ember-metal/streams/read';
import EmberError from "ember-metal/error";
import merge from "ember-metal/merge"; | true |
Other | emberjs | ember.js | df4e1723ae290cd38876fd4e50b6157208db84d3.json | Add tests for attribute hook/helper.
* Add tests to confirm we are using `setAttribute` for some level of
escaping (equivalent to what we have today with `{{bind-attr}}`).
* Updated to ensure that rerenders happen in the `render` queue.
* Added dirty tracking to not needlessly update attributes.
* Move `attribute` a... | packages/ember-htmlbars/lib/hooks.js | @@ -1,5 +1,5 @@
import Ember from "ember-metal/core";
-import { lookupHelper } from "ember-htmlbars/system/lookup-helper";
+import lookupHelper from "ember-htmlbars/system/lookup-helper";
import { sanitizeOptionsForHelper } from "ember-htmlbars/system/sanitize-for-helper";
function streamifyArgs(view, params, hash... | true |
Other | emberjs | ember.js | df4e1723ae290cd38876fd4e50b6157208db84d3.json | Add tests for attribute hook/helper.
* Add tests to confirm we are using `setAttribute` for some level of
escaping (equivalent to what we have today with `{{bind-attr}}`).
* Updated to ensure that rerenders happen in the `render` queue.
* Added dirty tracking to not needlessly update attributes.
* Move `attribute` a... | packages/ember-htmlbars/lib/main.js | @@ -14,6 +14,8 @@ import {
helper,
default as helpers
} from "ember-htmlbars/helpers";
+import { attributeHelper} from "ember-htmlbars/helpers/attribute";
+import { concatHelper } from "ember-htmlbars/helpers/concat";
import { bindHelper } from "ember-htmlbars/helpers/binding";
import { viewHelper } from "embe... | true |
Other | emberjs | ember.js | df4e1723ae290cd38876fd4e50b6157208db84d3.json | Add tests for attribute hook/helper.
* Add tests to confirm we are using `setAttribute` for some level of
escaping (equivalent to what we have today with `{{bind-attr}}`).
* Updated to ensure that rerenders happen in the `render` queue.
* Added dirty tracking to not needlessly update attributes.
* Move `attribute` a... | packages/ember-htmlbars/lib/system/lookup-helper.js | @@ -2,46 +2,11 @@ import Ember from "ember-metal/core";
import Cache from "ember-metal/cache";
import makeViewHelper from "ember-htmlbars/system/make-view-helper";
import HandlebarsCompatibleHelper from "ember-htmlbars/compat/helper";
-import Stream from "ember-metal/streams/stream";
-import {readArray} from "ember-... | true |
Other | emberjs | ember.js | df4e1723ae290cd38876fd4e50b6157208db84d3.json | Add tests for attribute hook/helper.
* Add tests to confirm we are using `setAttribute` for some level of
escaping (equivalent to what we have today with `{{bind-attr}}`).
* Updated to ensure that rerenders happen in the `render` queue.
* Added dirty tracking to not needlessly update attributes.
* Move `attribute` a... | packages/ember-htmlbars/tests/helpers/attribute_test.js | @@ -0,0 +1,154 @@
+import EmberView from "ember-views/views/view";
+import run from "ember-metal/run_loop";
+import EmberObject from "ember-runtime/system/object";
+import { compile } from "htmlbars-compiler/compiler";
+import { equalInnerHTML } from "htmlbars-test-helpers";
+import { defaultEnv } from "ember-htmlbars"... | true |
Other | emberjs | ember.js | df4e1723ae290cd38876fd4e50b6157208db84d3.json | Add tests for attribute hook/helper.
* Add tests to confirm we are using `setAttribute` for some level of
escaping (equivalent to what we have today with `{{bind-attr}}`).
* Updated to ensure that rerenders happen in the `render` queue.
* Added dirty tracking to not needlessly update attributes.
* Move `attribute` a... | packages/ember-htmlbars/tests/system/lookup-helper_test.js | @@ -1,8 +1,4 @@
-import {
- concat,
- attribute,
- lookupHelper
-} from "ember-htmlbars/system/lookup-helper";
+import lookupHelper from "ember-htmlbars/system/lookup-helper";
import ComponentLookup from "ember-views/component_lookup";
import Container from "container";
import Component from "ember-views/views/co... | true |
Other | emberjs | ember.js | 73499f627f1c6151dc05ce38f82f1b4b8db578e4.json | Add asObject compat mode for ember-htmlbars. | packages/ember-htmlbars/lib/compat/precompile.js | @@ -1,3 +1,8 @@
-import { compile } from "htmlbars-compiler/compiler";
+import { compile, compileSpec } from "htmlbars-compiler/compiler";
-export default compile;
+export default function(string) {
+ var asObject = arguments[1] === undefined ? true : arguments[1];
+ var compileFunc = asObject ? compile : compileSp... | true |
Other | emberjs | ember.js | 73499f627f1c6151dc05ce38f82f1b4b8db578e4.json | Add asObject compat mode for ember-htmlbars. | packages/ember-htmlbars/tests/compat/precompile_test.js | @@ -4,27 +4,32 @@ var parse = EmberHandlebars.parse;
var template = 'Hello World';
var result;
-QUnit.module("Ember.Handlebars.precompileType");
+QUnit.module("ember-htmlbars: Ember.Handlebars.precompile");
-if (!Ember.FEATURES.isEnabled('ember-htmlbars')) {
- // precompile does not accept the same args with emb... | true |
Other | emberjs | ember.js | 0ee52696fce0407bd73d34dd51e5813c1b0085f5.json | Move component invocation test into ember-htmlbars. | packages/ember-htmlbars/tests/integration/component_invocation_test.js | @@ -3,9 +3,16 @@ import Container from 'container/container';
import run from "ember-metal/run_loop";
import jQuery from "ember-views/system/jquery";
import EmberHandlebars from 'ember-handlebars-compiler';
+import htmlbarsCompile from "ember-htmlbars/system/compile";
import ComponentLookup from 'ember-views/compon... | false |
Other | emberjs | ember.js | 65800fe09483bed3fc8adadd0678ee343f05a3e5.json | Allow usage of a string path with {{bind}} helper. | packages/ember-htmlbars/lib/helpers/binding.js | @@ -99,12 +99,16 @@ function bindHelper(params, hash, options, env) {
var property = params[0];
+ if (options.types[0] === 'string') {
+ property = this.getStream(property);
+ }
+
if (options.render) {
options.helperName = 'bind';
Ember.deprecate("The block form of bind, {{#bind foo}}{{/bind}},... | true |
Other | emberjs | ember.js | 65800fe09483bed3fc8adadd0678ee343f05a3e5.json | Allow usage of a string path with {{bind}} helper. | packages/ember-htmlbars/tests/helpers/bind_test.js | @@ -67,6 +67,25 @@ test("it should render the current value of a path on the context", function() {
equal(view.$().text(), "MWEEER", "value can be updated");
});
+test("it should render the current value of a string path on the context", function() {
+ view = EmberView.create({
+ template: compile('{{bind "fo... | true |
Other | emberjs | ember.js | 2ac6f1219e664a95d656f4656b63ac51aca65c97.json | Add Ember.Handlebars.get in ember-htmlbars/compat. | packages/ember-handlebars/lib/ext.js | @@ -21,27 +21,10 @@ import {
readArray,
readHash
} from "ember-metal/streams/read";
+import handlebarsGet from "ember-htmlbars/compat/handlebars-get";
var slice = [].slice;
-/**
- Lookup both on root and on window. If the path starts with
- a keyword, the corresponding object will be looked up in the
- t... | true |
Other | emberjs | ember.js | 2ac6f1219e664a95d656f4656b63ac51aca65c97.json | Add Ember.Handlebars.get in ember-htmlbars/compat. | packages/ember-htmlbars/lib/compat/handlebars-get.js | @@ -0,0 +1,17 @@
+/**
+ Lookup both on root and on window. If the path starts with
+ a keyword, the corresponding object will be looked up in the
+ template's data hash and used to resolve the path.
+
+ @method get
+ @for Ember.Handlebars
+ @param {Object} root The object to look up the property on
+ @param {Str... | true |
Other | emberjs | ember.js | 2ac6f1219e664a95d656f4656b63ac51aca65c97.json | Add Ember.Handlebars.get in ember-htmlbars/compat. | packages/ember-htmlbars/tests/compat/handlebars_get_test.js | @@ -3,18 +3,27 @@ import _MetamorphView from "ember-views/views/metamorph_view";
import EmberView from "ember-views/views/view";
import run from "ember-metal/run_loop";
import EmberHandlebars from "ember-handlebars";
-import { handlebarsGet } from "ember-handlebars/ext";
+import handlebarsGet from "ember-htmlbars/co... | true |
Other | emberjs | ember.js | aceb1d6bd1cf3a40649241112f81a811eb7c1373.json | Add HTMLBars version of `makeBoundHelper`. | packages/ember-htmlbars/lib/compat/make-bound-helper.js | @@ -0,0 +1,121 @@
+import Ember from "ember-metal/core"; // Ember.FEATURES, Ember.assert, Ember.Handlebars, Ember.lookup
+import { IS_BINDING } from "ember-metal/mixin";
+import simpleBind from "ember-htmlbars/system/simple-bind";
+import merge from "ember-metal/merge";
+import Helper from "ember-htmlbars/system/helper... | true |
Other | emberjs | ember.js | aceb1d6bd1cf3a40649241112f81a811eb7c1373.json | Add HTMLBars version of `makeBoundHelper`. | packages/ember-htmlbars/lib/compat/register-bound-helper.js | @@ -0,0 +1,125 @@
+/**
+@module ember
+@submodule ember-htmlbars
+*/
+
+import helpers from "ember-htmlbars/helpers";
+import makeBoundHelper from "ember-htmlbars/compat/make-bound-helper";
+
+var slice = [].slice;
+
+/**
+ Register a bound handlebars helper. Bound helpers behave similarly to regular
+ handlebars hel... | true |
Other | emberjs | ember.js | aceb1d6bd1cf3a40649241112f81a811eb7c1373.json | Add HTMLBars version of `makeBoundHelper`. | packages/ember-htmlbars/lib/helpers.js | @@ -75,9 +75,7 @@ export function helper(name, value) {
if (View.detect(value)) {
helpers[name] = makeViewHelper(value);
} else {
- // HTMLBars TODO: Support bound helpers
- // EmberHandlebars.registerBoundHelper.apply(null, arguments);
- throw new Error('unimplemented');
+ throw new Error('regis... | true |
Other | emberjs | ember.js | aceb1d6bd1cf3a40649241112f81a811eb7c1373.json | Add HTMLBars version of `makeBoundHelper`. | packages/ember-htmlbars/lib/helpers/binding.js | @@ -7,9 +7,9 @@ import isNone from 'ember-metal/is_none';
import run from "ember-metal/run_loop";
import { get } from "ember-metal/property_get";
import SimpleStream from "ember-metal/streams/simple";
+import simpleBind from "ember-htmlbars/system/simple-bind";
import BoundView from "ember-views/views/bound_view"... | true |
Other | emberjs | ember.js | aceb1d6bd1cf3a40649241112f81a811eb7c1373.json | Add HTMLBars version of `makeBoundHelper`. | packages/ember-htmlbars/lib/system/simple-bind.js | @@ -0,0 +1,16 @@
+import run from "ember-metal/run_loop";
+import SimpleBoundView from "ember-views/views/simple_bound_view";
+
+export default function simpleBind(params, hash, options, env) {
+ var lazyValue = params[0];
+
+ var view = new SimpleBoundView(lazyValue, options.escaped);
+
+ view._parentView = this;
+... | true |
Other | emberjs | ember.js | aceb1d6bd1cf3a40649241112f81a811eb7c1373.json | Add HTMLBars version of `makeBoundHelper`. | packages/ember-htmlbars/tests/compat/make_bound_helper_test.js | @@ -10,7 +10,23 @@ import { get } from "ember-metal/property_get";
import { set } from "ember-metal/property_set";
import EmberHandlebars from "ember-handlebars-compiler";
-var compile = EmberHandlebars.compile;
+import htmlbarsHelpers from "ember-htmlbars/helpers";
+import htmlbarsRegisterBoundHelper from "ember-h... | true |
Other | emberjs | ember.js | aceb1d6bd1cf3a40649241112f81a811eb7c1373.json | Add HTMLBars version of `makeBoundHelper`. | packages/ember-htmlbars/tests/helpers/unbound_test.js | @@ -15,17 +15,22 @@ import {
import Container from 'ember-runtime/system/container';
-import { makeBoundHelper } from 'ember-handlebars/ext';
+import {
+ makeBoundHelper as handlebarsMakeBoundHelper
+} from 'ember-handlebars/ext';
+import htmlbarsMakeBoundHelper from "ember-htmlbars/compat/make-bound-helper";
-... | true |
Other | emberjs | ember.js | aceb1d6bd1cf3a40649241112f81a811eb7c1373.json | Add HTMLBars version of `makeBoundHelper`. | packages/ember/tests/helpers/helper_registration_test.js | @@ -3,14 +3,17 @@ import "ember";
import EmberHandlebars from "ember-handlebars";
import htmlbarsCompile from "ember-htmlbars/system/compile";
import htmlbarsHelpers from "ember-htmlbars/helpers";
+import htmlbarsMakeBoundHelper from "ember-htmlbars/compat/make-bound-helper";
-var compile, helpers;
+var compile, h... | true |
Other | emberjs | ember.js | 82ce12a0e9a117141e0d8242f676747075ce7458.json | Add several tests to HTMLBars feature flag | packages/ember-htmlbars/tests/helpers/bind_attr_test.js | @@ -407,9 +407,6 @@ test("should be able to bind classes to globals with {{bind-attr class}} (DEPREC
ok(view.$('img').hasClass('is-open'), "sets classname to the dasherized value of the global property");
});
-// HTMLBars TODO: Needs {{#each}} helper
-if (!Ember.FEATURES.isEnabled('ember-htmlbars')) {
-
test("sh... | true |
Other | emberjs | ember.js | 82ce12a0e9a117141e0d8242f676747075ce7458.json | Add several tests to HTMLBars feature flag | packages/ember-htmlbars/tests/helpers/yield_test.js | @@ -81,8 +81,6 @@ test("block should work properly even when templates are not hard-coded", functi
});
-if (!Ember.FEATURES.isEnabled('ember-htmlbars')) {
-
test("templates should yield to block, when the yield is embedded in a hierarchy of virtual views", function() {
var TimesView = EmberView.extend({
l... | true |
Other | emberjs | ember.js | 83209e5d909152cd13649b77b4b769d84445e1bc.json | Move argument special casing to the helpers.
Paves the way for Handlbars compat version of `registerHelper` and
`makeBoundHelper`. Also, cleans up troubling bits of `streamifyArgs`. | packages/ember-htmlbars/lib/helpers/each.js | @@ -189,6 +189,17 @@ function eachHelper(params, hash, options, env) {
return env.helpers.collection.call(this, [EachView], hash, options, env);
}
+eachHelper._preprocessArguments = function(view, params, hash, options, env) {
+ if (params.length === 3 && params[1] === "in") {
+ params.splice(0, 3, {
+ f... | true |
Other | emberjs | ember.js | 83209e5d909152cd13649b77b4b769d84445e1bc.json | Move argument special casing to the helpers.
Paves the way for Handlbars compat version of `registerHelper` and
`makeBoundHelper`. Also, cleans up troubling bits of `streamifyArgs`. | packages/ember-htmlbars/lib/helpers/with.js | @@ -93,6 +93,18 @@ export function withHelper(params, hash, options, env) {
bind.call(this, source, hash, options, env, preserveContext, exists, undefined, undefined, WithView);
}
+withHelper._preprocessArguments = function(view, params, hash, options, env) {
+ if (params.length === 3 && params[1] === "as") {
+ ... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.