Skip to content

Commit

Permalink
bem-xjst 8.x support: js() to addJs() rewrived
Browse files Browse the repository at this point in the history
  • Loading branch information
miripiruni committed Jun 2, 2017
1 parent 5797997 commit 879df9c
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion common.blocks/attach/attach.bemhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ block('attach')(

tag()('span'),

js()(true),
addJs()(true),

content()(
function() {
Expand Down
2 changes: 1 addition & 1 deletion common.blocks/button/button.bemhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ block('button')(
return this.ctx.tag || 'button';
}),

js()(true),
addJs()(true),

// NOTE: mix below is to satisfy interface of `control`
addMix()({ elem : 'control' }),
Expand Down
2 changes: 1 addition & 1 deletion common.blocks/checkbox-group/checkbox-group.bemhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ block('checkbox-group')(

addAttrs()({ role : 'group' }),

js()(true),
addJs()(true),

addMix()([{ block : 'control-group' }]),

Expand Down
2 changes: 1 addition & 1 deletion common.blocks/checkbox/checkbox.bemhtml.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
block('checkbox')(
tag()('label'),

js()(true),
addJs()(true),

content()(function() {
var ctx = this.ctx,
Expand Down
2 changes: 1 addition & 1 deletion common.blocks/dropdown/dropdown.bemhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ block('dropdown')(
ctx.js = this.extend(apply('js'), ctx.js);
return applyNext({ _dropdown : ctx, _popupId : this.generateId() });
}),
js()(function() {
addJs()(function() {
return { id : this.generateId() };
}),
elem('switcher').replace()(function() {
Expand Down
2 changes: 1 addition & 1 deletion common.blocks/input/input.bemhtml.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
block('input')(
tag()('span'),
js()(true),
addJs()(true),
def()(function() {
return applyNext({ _input : this.ctx });
}),
Expand Down
2 changes: 1 addition & 1 deletion common.blocks/link/link.bemhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ block('link')(

tag()('a'),

js()(true),
addJs()(true),

// NOTE: mix below is to satisfy interface of `control`
addMix()([{ elem : 'control' }]),
Expand Down
2 changes: 1 addition & 1 deletion common.blocks/menu/menu.bemhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ block('menu')(
// bemjson has more priority
return this.extend(attrs, applyNext());
}),
js()(true),
addJs()(true),
addMix()({ elem : 'control' }),
mod('disabled', true)
.js()(function() {
Expand Down
2 changes: 1 addition & 1 deletion common.blocks/modal/modal.bemhtml.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
block('modal')(
js()(true),
addJs()(true),

addMix()(function() {
return {
Expand Down
2 changes: 1 addition & 1 deletion common.blocks/popup/popup.bemhtml.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
block('popup')(
js()(function() {
addJs()(function() {
var ctx = this.ctx;
return {
mainOffset : ctx.mainOffset,
Expand Down
2 changes: 1 addition & 1 deletion common.blocks/progressbar/progressbar.bemhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ block('progressbar')(
return applyNext({ _val : this.ctx.val || 0 });
}),

js()(function(){
addJs()(function(){
return { val : this._val };
}),

Expand Down
2 changes: 1 addition & 1 deletion common.blocks/radio-group/radio-group.bemhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ block('radio-group')(

addAttrs()({ role : 'radiogroup' }),

js()(true),
addJs()(true),

addMix()([{ block : 'control-group' }]),

Expand Down
2 changes: 1 addition & 1 deletion common.blocks/radio/radio.bemhtml.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
block('radio')(
tag()('label'),
js()(true),
addJs()(true),
content()(function() {
var ctx = this.ctx;
return [
Expand Down
4 changes: 2 additions & 2 deletions common.blocks/select/_mode/select_mode_check.bemhtml.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
block('select').mod('mode', 'check')(
js()(function() {
return this.extend(applyNext(), { text : this.ctx.text });
addJs()(function() {
return { text : this.ctx.text };
}),

elem('button').content()(function() {
Expand Down
4 changes: 2 additions & 2 deletions common.blocks/select/_mode/select_mode_radio-check.bemhtml.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
block('select').mod('mode', 'radio-check')(
js()(function() {
return this.extend(applyNext(), { text : this.ctx.text });
addJs()(function() {
return { text : this.ctx.text };
}),

elem('button').content()(function() {
Expand Down
2 changes: 1 addition & 1 deletion common.blocks/textarea/textarea.bemhtml.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
block('textarea')(
js()(true),
addJs()(true),
tag()('textarea'),

// NOTE: mix below is to satisfy interface of `control`
Expand Down

0 comments on commit 879df9c

Please sign in to comment.