From 0d2a48d843dc16648c61605a46301f91eae56e52 Mon Sep 17 00:00:00 2001 From: Max Gordon Date: Mon, 17 Oct 2016 22:00:12 +0200 Subject: [PATCH 1/5] Converted to Font Awesome from Glyphicon --- README.md | 2 +- examples/index.html | 1 + examples/js/cell-edit/custom-cell-edit-table.js | 2 +- examples/js/column-format/html-column-format-table.js | 2 +- .../js/custom/csv-button/default-custom-csv-button.js | 2 +- .../custom/delete-button/default-custom-delete-button.js | 2 +- .../custom/insert-button/default-custom-insert-button.js | 2 +- examples/js/manipulation/search-format-table.js | 4 ++-- src/toolbar/DeleteButton.js | 8 ++++---- src/toolbar/ExportCSVButton.js | 8 ++++---- src/toolbar/InsertButton.js | 8 ++++---- 11 files changed, 21 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index cc996e9ba..4088413d7 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ var products = [{ },........]; // It's a data format example. function priceFormatter(cell, row){ - return ' ' + cell; + return ' ' + cell; } React.render( diff --git a/examples/index.html b/examples/index.html index fe20b40c3..98921238d 100644 --- a/examples/index.html +++ b/examples/index.html @@ -6,6 +6,7 @@ +
diff --git a/examples/js/cell-edit/custom-cell-edit-table.js b/examples/js/cell-edit/custom-cell-edit-table.js index 0160b7825..41709ec0c 100644 --- a/examples/js/cell-edit/custom-cell-edit-table.js +++ b/examples/js/cell-edit/custom-cell-edit-table.js @@ -165,7 +165,7 @@ class RegionsEditor extends React.Component { } function priceFormatter(cell, row) { - return ` ${cell.amount}`; + return ` ${cell.amount}`; } const regionsFormatter = (cell, row) => ({ (cell || []).join(',') }); diff --git a/examples/js/column-format/html-column-format-table.js b/examples/js/column-format/html-column-format-table.js index e9365a692..0198bbcfc 100644 --- a/examples/js/column-format/html-column-format-table.js +++ b/examples/js/column-format/html-column-format-table.js @@ -22,7 +22,7 @@ addProducts(5); function priceFormatter(cell, row) { - return ` ${cell}`; + return ` ${cell}`; } diff --git a/examples/js/custom/csv-button/default-custom-csv-button.js b/examples/js/custom/csv-button/default-custom-csv-button.js index ed328c9b6..ced86fb03 100644 --- a/examples/js/custom/csv-button/default-custom-csv-button.js +++ b/examples/js/custom/csv-button/default-custom-csv-button.js @@ -36,7 +36,7 @@ export default class DefaultCustomExportButtonTable extends React.Component { btnText='CustomExportText' btnContextual='btn-danger' className='my-custom-class' - btnGlyphicon='glyphicon-edit' + btnFAwesome='fa-edit' onClick={ e => this.handleExportCSVButtonClick(onClick) }/> ); // If you want have more power to custom the child of ExportCSVButton, diff --git a/examples/js/custom/delete-button/default-custom-delete-button.js b/examples/js/custom/delete-button/default-custom-delete-button.js index 1ca3d2a9a..420c298d0 100644 --- a/examples/js/custom/delete-button/default-custom-delete-button.js +++ b/examples/js/custom/delete-button/default-custom-delete-button.js @@ -36,7 +36,7 @@ export default class DefaultCustomInsertButtonTable extends React.Component { btnText='CustomDeleteText' btnContextual='btn-success' className='my-custom-class' - btnGlyphicon='glyphicon-edit' + btnFAwesome='fa-edit' onClick={ e => this.handleDeleteButtonClick(onClick) }/> ); // If you want have more power to custom the child of DeleteButton, diff --git a/examples/js/custom/insert-button/default-custom-insert-button.js b/examples/js/custom/insert-button/default-custom-insert-button.js index 6dc1a2731..b22ecb529 100644 --- a/examples/js/custom/insert-button/default-custom-insert-button.js +++ b/examples/js/custom/insert-button/default-custom-insert-button.js @@ -36,7 +36,7 @@ export default class DefaultCustomInsertButtonTable extends React.Component { btnText='CustomInsertText' btnContextual='btn-warning' className='my-custom-class' - btnGlyphicon='glyphicon-edit' + btnFAwesome='fa-edit' onClick={ () => this.handleInsertButtonClick(onClick) }/> ); // If you want have more power to custom the child of InsertButton, diff --git a/examples/js/manipulation/search-format-table.js b/examples/js/manipulation/search-format-table.js index 67875853c..052b963b7 100644 --- a/examples/js/manipulation/search-format-table.js +++ b/examples/js/manipulation/search-format-table.js @@ -10,7 +10,7 @@ const products = []; function addProducts(quantity) { const startId = products.length; const pname = [ 'Cloud Service', 'Message Service', 'Add Service', 'Edit Service', 'Money' ]; - const icons = [ 'glyphicon-cloud', 'glyphicon-envelope', 'glyphicon-plus', 'glyphicon-pencil', 'glyphicon-euro' ]; + const icons = [ 'fa-cloud', 'fa-envelope', 'fa-plus', 'fa-pencil', 'fa-euro' ]; const types = [ 'Cloud', 'Mail', 'Insert', 'Modify', 'Money' ]; const years = [ 2005, 2006, 2008, 2001, 2015 ]; for (let i = 0; i < quantity; i++) { @@ -36,7 +36,7 @@ function filterType(cell, row) { } function nameFormatter(cell) { - return `

${cell.pname}, from ${cell.year}

`; + return `

${cell.pname}, from ${cell.year}

`; } function priceFormatter(cell) { diff --git a/src/toolbar/DeleteButton.js b/src/toolbar/DeleteButton.js index 5d7115954..2b25d8e85 100644 --- a/src/toolbar/DeleteButton.js +++ b/src/toolbar/DeleteButton.js @@ -9,13 +9,13 @@ class DeleteButton extends Component { btnContextual, className, onClick, - btnGlyphicon, + btnFAwesome, btnText, children, ...rest } = this.props; const content = children || - ( { btnText }); + ( { btnText }); return (