1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

static styling of filter widget

This commit is contained in:
Tim Daubenschütz 2015-08-04 10:06:02 +02:00
parent ae8bc674d2
commit 7ee296c963
4 changed files with 34 additions and 9 deletions

View File

@ -1,7 +1,7 @@
'use strict';
import React from 'react';
import { getLangText } from '../../utils/lang_utils.js'
import { getLangText } from '../../utils/lang_utils.js';
let PieceListBulkModalSelectedEditionsWidget = React.createClass({
propTypes: {

View File

@ -2,6 +2,8 @@
import React from 'react';
import PieceListToolbarFilterWidget from './piece_list_toolbar_filter_widget';
import Input from 'react-bootstrap/lib/Input';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
import { getLangText } from '../../utils/lang_utils';
@ -41,6 +43,9 @@ let PieceListToolbar = React.createClass({
onChange={this.searchFor}
addonAfter={searchIcon} />
</span>
<span className="pull-right">
<PieceListToolbarFilterWidget />
</span>
</div>
</div>
</div>

View File

@ -5,25 +5,28 @@ import React from 'react';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
import DropdownButton from 'react-bootstrap/lib/DropdownButton';
import MenuItem from 'react-bootstrap/lib/MenuItem';
import { getLangText } from '../../utils/lang_utils.js'
import { getLangText } from '../../utils/lang_utils.js';
let PieceListToolbarFilterWidgetFilter = React.createClass({
render() {
let filterIcon = <Glyphicon glyph='filter' className="filter-glyph"/>;
return (
<DropdownButton title={filterIcon}>
<DropdownButton
title={filterIcon}
className="ascribe-piece-list-toolbar-filter-widget">
<li style={{'textAlign': 'center'}}>
<em>{getLangText('Show Pieces that')}:</em>
</li>
<MenuItem eventKey='1'>
<div className="checkbox">
{getLangText('I can transfer')} <input type="checkbox" />
<MenuItem eventKey='1' style={{'textAlign': 'center'}}>
<div className="checkbox-line">
<label>{getLangText('I can transfer')}<input type="checkbox" /></label>
</div>
</MenuItem>
<MenuItem eventKey='2'>
<div className="checkbox">
{getLangText('I can consign')} <input type="checkbox" />
<MenuItem eventKey='2' style={{'textAlign': 'center'}}>
<div className="checkbox-line">
<label>{getLangText('I can consign')}<input type="checkbox" /></label>
</div>
</MenuItem>
</DropdownButton>

View File

@ -6,4 +6,21 @@
.search-bar {
max-width: 160px;
input {
height: 33px;
}
}
.ascribe-piece-list-toolbar-filter-widget {
margin-right: 1em;
.checkbox-line {
label {
font-weight: normal;
}
input {
position: relative;
top: 2px;
margin-left: 10px;
}
}
}