Skip to content

Commit 0d2a48d

Browse files
committed
Converted to Font Awesome from Glyphicon
1 parent 6192e7b commit 0d2a48d

File tree

11 files changed

+21
-20
lines changed

11 files changed

+21
-20
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ var products = [{
118118
},........];
119119
// It's a data format example.
120120
function priceFormatter(cell, row){
121-
return '<i class="glyphicon glyphicon-usd"></i> ' + cell;
121+
return '<i class="fa fa-usd"></i> ' + cell;
122122
}
123123

124124
React.render(

examples/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
77
<script src="http://code.jquery.com/jquery-2.1.3.min.js"></script>
88
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.js"></script>
9+
<script src="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"></script>
910
</head>
1011
<body>
1112
<div id="root"></div>

examples/js/cell-edit/custom-cell-edit-table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class RegionsEditor extends React.Component {
165165
}
166166

167167
function priceFormatter(cell, row) {
168-
return `<i class='glyphicon glyphicon-${cell.currency.toLowerCase()}'></i> ${cell.amount}`;
168+
return `<i class='fa fa-${cell.currency.toLowerCase()}'></i> ${cell.amount}`;
169169
}
170170

171171
const regionsFormatter = (cell, row) => (<span>{ (cell || []).join(',') }</span>);

examples/js/column-format/html-column-format-table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ addProducts(5);
2222

2323

2424
function priceFormatter(cell, row) {
25-
return `<i class='glyphicon glyphicon-usd'></i> ${cell}`;
25+
return `<i class='fa fa-usd'></i> ${cell}`;
2626
}
2727

2828

examples/js/custom/csv-button/default-custom-csv-button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default class DefaultCustomExportButtonTable extends React.Component {
3636
btnText='CustomExportText'
3737
btnContextual='btn-danger'
3838
className='my-custom-class'
39-
btnGlyphicon='glyphicon-edit'
39+
btnFAwesome='fa-edit'
4040
onClick={ e => this.handleExportCSVButtonClick(onClick) }/>
4141
);
4242
// If you want have more power to custom the child of ExportCSVButton,

examples/js/custom/delete-button/default-custom-delete-button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default class DefaultCustomInsertButtonTable extends React.Component {
3636
btnText='CustomDeleteText'
3737
btnContextual='btn-success'
3838
className='my-custom-class'
39-
btnGlyphicon='glyphicon-edit'
39+
btnFAwesome='fa-edit'
4040
onClick={ e => this.handleDeleteButtonClick(onClick) }/>
4141
);
4242
// If you want have more power to custom the child of DeleteButton,

examples/js/custom/insert-button/default-custom-insert-button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default class DefaultCustomInsertButtonTable extends React.Component {
3636
btnText='CustomInsertText'
3737
btnContextual='btn-warning'
3838
className='my-custom-class'
39-
btnGlyphicon='glyphicon-edit'
39+
btnFAwesome='fa-edit'
4040
onClick={ () => this.handleInsertButtonClick(onClick) }/>
4141
);
4242
// If you want have more power to custom the child of InsertButton,

examples/js/manipulation/search-format-table.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const products = [];
1010
function addProducts(quantity) {
1111
const startId = products.length;
1212
const pname = [ 'Cloud Service', 'Message Service', 'Add Service', 'Edit Service', 'Money' ];
13-
const icons = [ 'glyphicon-cloud', 'glyphicon-envelope', 'glyphicon-plus', 'glyphicon-pencil', 'glyphicon-euro' ];
13+
const icons = [ 'fa-cloud', 'fa-envelope', 'fa-plus', 'fa-pencil', 'fa-euro' ];
1414
const types = [ 'Cloud', 'Mail', 'Insert', 'Modify', 'Money' ];
1515
const years = [ 2005, 2006, 2008, 2001, 2015 ];
1616
for (let i = 0; i < quantity; i++) {
@@ -36,7 +36,7 @@ function filterType(cell, row) {
3636
}
3737

3838
function nameFormatter(cell) {
39-
return `<p><span class='glyphicons ${cell.icon}' aria-hidden='true'></span> ${cell.pname}, from ${cell.year}</p>`;
39+
return `<p><i class='fa fa-${cell.icon}'></i> ${cell.pname}, from ${cell.year}</p>`;
4040
}
4141

4242
function priceFormatter(cell) {

src/toolbar/DeleteButton.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ class DeleteButton extends Component {
99
btnContextual,
1010
className,
1111
onClick,
12-
btnGlyphicon,
12+
btnFAwesome,
1313
btnText,
1414
children,
1515
...rest
1616
} = this.props;
1717
const content = children ||
18-
(<span><i className={ `glyphicon ${btnGlyphicon}` }></i> { btnText }</span>);
18+
(<span><i className={ `fa ${btnFAwesome}` }></i> { btnText }</span>);
1919
return (
2020
<button type='button'
2121
className={ `btn ${btnContextual} ${deleteBtnDefaultClass} ${className}` }
@@ -32,14 +32,14 @@ DeleteButton.propTypes = {
3232
btnContextual: PropTypes.string,
3333
className: PropTypes.string,
3434
onClick: PropTypes.func,
35-
btnGlyphicon: PropTypes.string
35+
btnFAwesome: PropTypes.string
3636
};
3737
DeleteButton.defaultProps = {
3838
btnText: Const.DELETE_BTN_TEXT,
3939
btnContextual: 'btn-warning',
4040
className: '',
4141
onClick: undefined,
42-
btnGlyphicon: 'glyphicon-trash'
42+
btnFAwesome: 'fa-trash'
4343
};
4444

4545
export default DeleteButton;

src/toolbar/ExportCSVButton.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ class ExportCSVButton extends Component {
99
btnContextual,
1010
className,
1111
onClick,
12-
btnGlyphicon,
12+
btnFAwesome,
1313
btnText,
1414
children,
1515
...rest
1616
} = this.props;
1717
const content = children ||
18-
(<span><i className={ `glyphicon ${btnGlyphicon}` }></i> { btnText }</span>);
18+
(<span><i className={ `fa ${btnFAwesome}` }></i> { btnText }</span>);
1919
return (
2020
<button type='button'
2121
className={ `btn ${btnContextual} ${exportCsvBtnDefaultClass} ${className} hidden-print` }
@@ -32,14 +32,14 @@ ExportCSVButton.propTypes = {
3232
btnContextual: PropTypes.string,
3333
className: PropTypes.string,
3434
onClick: PropTypes.func,
35-
btnGlyphicon: PropTypes.string
35+
btnFAwesome: PropTypes.string
3636
};
3737
ExportCSVButton.defaultProps = {
3838
btnText: Const.EXPORT_CSV_TEXT,
3939
btnContextual: 'btn-success',
4040
className: '',
4141
onClick: undefined,
42-
btnGlyphicon: 'glyphicon-export'
42+
btnFAwesome: 'fa-arrow-circle-down'
4343
};
4444

4545
export default ExportCSVButton;

src/toolbar/InsertButton.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ class InsertButton extends Component {
99
btnContextual,
1010
className,
1111
onClick,
12-
btnGlyphicon,
12+
btnFAwesome,
1313
btnText,
1414
children,
1515
...rest
1616
} = this.props;
1717
const content = children ||
18-
(<span><i className={ `glyphicon ${btnGlyphicon}` }></i>{ btnText }</span>);
18+
(<span><i className={ `fa ${btnFAwesome}` }></i>{ btnText }</span>);
1919
return (
2020
<button type='button'
2121
className={ `btn ${btnContextual} ${insertBtnDefaultClass} ${className}` }
@@ -32,14 +32,14 @@ InsertButton.propTypes = {
3232
btnContextual: PropTypes.string,
3333
className: PropTypes.string,
3434
onClick: PropTypes.func,
35-
btnGlyphicon: PropTypes.string
35+
btnFAwesome: PropTypes.string
3636
};
3737
InsertButton.defaultProps = {
3838
btnText: Const.INSERT_BTN_TEXT,
3939
btnContextual: 'btn-info',
4040
className: '',
4141
onClick: undefined,
42-
btnGlyphicon: 'glyphicon-plus'
42+
btnFAwesome: 'fa-plus'
4343
};
4444

4545
export default InsertButton;

0 commit comments

Comments
 (0)