Skip to content

Commit 0d8b8f6

Browse files
committed
'refine' to 'apply'. highlight 'apply' button for non-empty queries
1 parent f5bc5f0 commit 0d8b8f6

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/refine-view/index.jade

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
form: .input-group(data-hook='refine-input-group')
33
input.form-control.input-sm(type='text', data-hook='refine-input')
44
span.input-group-btn
5-
button.btn.btn-default.btn-sm(type='button', data-hook='refine-button') Refine
6-
span.input-group-btn
5+
button.btn.btn-info.btn-sm(type='button', data-hook='refine-button') Apply
76
button.btn.btn-default.btn-sm(type='button', data-hook='reset-button') Reset

src/refine-view/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,15 @@ module.exports = AmpersandView.extend({
2525
type: 'value',
2626
hook: 'refine-input'
2727
},
28-
notEmpty: {
28+
notEmpty: [{
2929
type: 'toggle',
3030
hook: 'reset-button'
31-
},
31+
}, {
32+
type: 'booleanClass',
33+
hook: 'refine-button',
34+
yes: 'btn-info',
35+
no: 'btn-default'
36+
}],
3237
valid: [
3338
// red input border while query is invalid
3439
{

src/refine-view/index.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
height: 28px;
1111
& + .input-group-btn {
1212
padding-left: 10px;
13+
14+
&:last-child > .btn {
15+
margin-left: 2px;
16+
}
1317
}
1418
}
1519
}

0 commit comments

Comments
 (0)