From fcdf36b3d03879afe1dd5a86bdf7d709bedd1a39 Mon Sep 17 00:00:00 2001 From: David Sevilla Martin Date: Sun, 27 Nov 2016 19:39:47 -0500 Subject: [PATCH] Added search input types to 3 inputs total, closes #726 * Added type search to search bar (forum) * Added CSS `box-sizing: inherit` to search because bootstrap styles mess up the search box * Added type color to both color settings in appearance (admin) --- js/admin/dist/app.js | 4 ++-- js/admin/src/components/AppearancePage.js | 4 ++-- js/forum/dist/app.js | 1 + js/forum/src/components/Search.js | 1 + less/lib/Search.less | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/js/admin/dist/app.js b/js/admin/dist/app.js index 16071a43a..62ca44abf 100644 --- a/js/admin/dist/app.js +++ b/js/admin/dist/app.js @@ -17834,8 +17834,8 @@ System.register('flarum/components/AppearancePage', ['flarum/components/Page', ' m( 'div', { className: 'AppearancePage-colors-input' }, - m('input', { className: 'FormControl', placeholder: '#aaaaaa', value: this.primaryColor(), onchange: m.withAttr('value', this.primaryColor) }), - m('input', { className: 'FormControl', placeholder: '#aaaaaa', value: this.secondaryColor(), onchange: m.withAttr('value', this.secondaryColor) }) + m('input', { className: 'FormControl', type: 'color', placeholder: '#aaaaaa', value: this.primaryColor(), onchange: m.withAttr('value', this.primaryColor) }), + m('input', { className: 'FormControl', type: 'color', placeholder: '#aaaaaa', value: this.secondaryColor(), onchange: m.withAttr('value', this.secondaryColor) }) ), Switch.component({ state: this.darkMode(), diff --git a/js/admin/src/components/AppearancePage.js b/js/admin/src/components/AppearancePage.js index 92bbc1b93..8e35a958a 100644 --- a/js/admin/src/components/AppearancePage.js +++ b/js/admin/src/components/AppearancePage.js @@ -28,8 +28,8 @@ export default class AppearancePage extends Page {
- - + +
{Switch.component({ diff --git a/js/forum/dist/app.js b/js/forum/dist/app.js index 1e71e9705..21bdc8d2f 100644 --- a/js/forum/dist/app.js +++ b/js/forum/dist/app.js @@ -26653,6 +26653,7 @@ System.register('flarum/components/Search', ['flarum/Component', 'flarum/compone 'div', { className: 'Search-input' }, m('input', { className: 'FormControl', + type: 'search', placeholder: extractText(app.translator.trans('core.forum.header.search_placeholder')), value: this.value(), oninput: m.withAttr('value', this.value), diff --git a/js/forum/src/components/Search.js b/js/forum/src/components/Search.js index c4bfddb21..9481f053c 100644 --- a/js/forum/src/components/Search.js +++ b/js/forum/src/components/Search.js @@ -83,6 +83,7 @@ export default class Search extends Component { })}>