From 2391da19f69c0d19228b55fb43bf317e2be68bf4 Mon Sep 17 00:00:00 2001 From: luqin Date: Mon, 19 Oct 2015 21:30:06 +0800 Subject: [PATCH 01/16] add dev deps --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1c6f7f422..cae9b06c8 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "babel-eslint": "^4.1.1", "babel-loader": "^5.3.2", "babelify": "^5.0.4", + "bootstrap": "3.3.5", "browserify": "^9.0.3", "css-loader": "^0.18.0", "eslint": "1.4.3", @@ -40,11 +41,13 @@ "gulp-babel": "^4.0.1", "gulp-concat-css": "^2.2.0", "gulp-cssmin": "^0.1.6", + "jquery": "^2.1.4", "jest-cli": "^0.4.0", "jsx-loader": "^0.13.2", "react": "^0.14.0", + "react-dom": "^0.14.0", "react-hot-loader": "^1.3.0", - "react-router": "^1.0.0-rc1", + "react-router": "^1.0.0-rc3", "style-loader": "^0.12.4", "vinyl-source-stream": "^1.1.0", "watchify": "^3.0.0", From a6d01a91e059d1cadc5ca405c74e5e1128a282ab Mon Sep 17 00:00:00 2001 From: luqin Date: Mon, 19 Oct 2015 22:03:52 +0800 Subject: [PATCH 02/16] add dev deps --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index cae9b06c8..6bbd98d48 100644 --- a/package.json +++ b/package.json @@ -41,10 +41,12 @@ "gulp-babel": "^4.0.1", "gulp-concat-css": "^2.2.0", "gulp-cssmin": "^0.1.6", + "history": "1.12.3", "jquery": "^2.1.4", "jest-cli": "^0.4.0", "jsx-loader": "^0.13.2", "react": "^0.14.0", + "react-bootstrap": "^0.27.2", "react-dom": "^0.14.0", "react-hot-loader": "^1.3.0", "react-router": "^1.0.0-rc3", From c411bcc6fd5b6c1296173a4acabcfca847846064 Mon Sep 17 00:00:00 2001 From: luqin Date: Mon, 19 Oct 2015 22:04:28 +0800 Subject: [PATCH 03/16] init react router demo --- examples/index.html | 16 +++++++ examples/js/app.js | 5 ++ examples/js/components/App.js | 0 examples/js/components/Home.js | 0 examples/js/routes.js | 24 ++++++++++ examples/js/sort/demo.js | 2 +- webpack.example.config.js | 88 +++++++++++++++------------------- 7 files changed, 85 insertions(+), 50 deletions(-) create mode 100644 examples/index.html create mode 100644 examples/js/app.js create mode 100644 examples/js/components/App.js create mode 100644 examples/js/components/Home.js create mode 100644 examples/js/routes.js diff --git a/examples/index.html b/examples/index.html new file mode 100644 index 000000000..d962dcf3d --- /dev/null +++ b/examples/index.html @@ -0,0 +1,16 @@ + + + + + react-bootstrap-table demo + + + + + + +
+ + + + diff --git a/examples/js/app.js b/examples/js/app.js new file mode 100644 index 000000000..03e9b4178 --- /dev/null +++ b/examples/js/app.js @@ -0,0 +1,5 @@ +import ReactDOM from 'react-dom'; + +import routes from './routes'; + +ReactDOM.render(routes, document.querySelector('#root')); diff --git a/examples/js/components/App.js b/examples/js/components/App.js new file mode 100644 index 000000000..e69de29bb diff --git a/examples/js/components/Home.js b/examples/js/components/Home.js new file mode 100644 index 000000000..e69de29bb diff --git a/examples/js/routes.js b/examples/js/routes.js new file mode 100644 index 000000000..27f30499f --- /dev/null +++ b/examples/js/routes.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { Router, Route, IndexRoute } from 'react-router'; + +const routes = ( + + + + + + + + + + + + + + + + + +); + +export default routes; diff --git a/examples/js/sort/demo.js b/examples/js/sort/demo.js index ffd4d0c17..31fbe755c 100644 --- a/examples/js/sort/demo.js +++ b/examples/js/sort/demo.js @@ -17,4 +17,4 @@ React.render( React.render( , document.getElementById('custom-sort') -); +); \ No newline at end of file diff --git a/webpack.example.config.js b/webpack.example.config.js index fbfc3b55a..934240bfb 100644 --- a/webpack.example.config.js +++ b/webpack.example.config.js @@ -3,54 +3,44 @@ var webpack = require('webpack'); module.exports = { - entry: { - basic: './examples/js/basic/demo.js', - column: './examples/js/column/demo.js', - columnFormat: './examples/js/column-format/demo.js', - sort: './examples/js/sort/demo.js', - pagination: './examples/js/pagination/demo.js', - selection: './examples/js/selection/demo.js', - manipulation: './examples/js/manipulation/demo.js', - cellEdit: './examples/js/cell-edit/demo.js', - complex: './examples/js/complex/demo.js', - style: './examples/js/style/demo.js', - advance: './examples/js/advance/demo.js', - vendors: ['webpack-dev-server/client?http://localhost:3004', 'webpack/hot/only-dev-server'] - }, - devtool: 'eval', - output: { - path: path.join(__dirname, 'examples'), - filename: '[name].bundle.js' - }, - serverConfig:{ - port:'3004',//server port - publicPath:'/',//js path - contentBase:'examples/'//web root path - }, - resolve: { - extensions: ['', '.js', '.jsx'], - alias:{ - 'react-bootstrap-table': '../../../src/index.js' - } - }, - module: { - loaders: [ + entry: { + app: './examples/js/app.js', + vendors: ['webpack-dev-server/client?http://localhost:3004', 'webpack/hot/only-dev-server'] + }, + devtool: 'eval', + output: { + path: path.join(__dirname, 'examples'), + filename: '[name].bundle.js' + }, + serverConfig: { + port: '3004',// server port + publicPath: '/',// js path + contentBase: 'examples/'//web root path + }, + resolve: { + extensions: ['', '.js', '.jsx'], + alias: { + 'react-bootstrap-table': '../../../src/index.js' + } + }, + module: { + loaders: [ - { - test: /\.jsx$/, - exclude: /node_modules/, - loaders: ['react-hot', 'babel'] - }, { - test: /\.js$/, - exclude: /node_modules/, - loaders: ['react-hot', 'babel'] - }, {test: /\.less$/, loader: 'style-loader!css-loader!less-loader'}, // use ! to chain loaders - {test: /\.css$/, loader: 'style-loader!css-loader'}] - }, + { + test: /\.jsx$/, + exclude: /node_modules/, + loaders: ['react-hot', 'babel'] + }, { + test: /\.js$/, + exclude: /node_modules/, + loaders: ['react-hot', 'babel'] + }, {test: /\.less$/, loader: 'style-loader!css-loader!less-loader'}, // use ! to chain loaders + {test: /\.css$/, loader: 'style-loader!css-loader'}] + }, - plugins: [ - new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), - new webpack.HotModuleReplacementPlugin(), - new webpack.NoErrorsPlugin() - ] -} + plugins: [ + new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), + new webpack.HotModuleReplacementPlugin(), + new webpack.NoErrorsPlugin() + ] +}; From 9ccc76ff6fa7652022191724e07dca49de776041 Mon Sep 17 00:00:00 2001 From: luqin Date: Mon, 19 Oct 2015 22:19:09 +0800 Subject: [PATCH 04/16] update --- examples/js/components/App.js | 13 +++++++++++++ examples/js/components/Home.js | 23 +++++++++++++++++++++++ examples/js/components/examples/Basic.js | 16 ++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 examples/js/components/examples/Basic.js diff --git a/examples/js/components/App.js b/examples/js/components/App.js index e69de29bb..cf15cb99e 100644 --- a/examples/js/components/App.js +++ b/examples/js/components/App.js @@ -0,0 +1,13 @@ +import React from 'react'; + +class App extends React.Component { + render() { + return ( +
+ {this.props.children} +
+ ); + } +} + +export default App; diff --git a/examples/js/components/Home.js b/examples/js/components/Home.js index e69de29bb..defc0a6bb 100644 --- a/examples/js/components/Home.js +++ b/examples/js/components/Home.js @@ -0,0 +1,23 @@ +import React from 'react'; + +class Home extends React.Component { + render() { + return ( + + ); + } +} + +export default Home; diff --git a/examples/js/components/examples/Basic.js b/examples/js/components/examples/Basic.js new file mode 100644 index 000000000..adde57434 --- /dev/null +++ b/examples/js/components/examples/Basic.js @@ -0,0 +1,16 @@ +import React from 'react'; +import {Col, Panel} from 'react-bootstrap'; + +class Basic extends React.Component { + render() { + return ( + + +
Source in /examples/js/basic/basic-table.js
+
+ + ); + } +} + +export default Basic; From 41c1105f3636e5e4bae1110f3ea54046c87b8b31 Mon Sep 17 00:00:00 2001 From: luqin Date: Wed, 21 Oct 2015 09:59:46 +0800 Subject: [PATCH 05/16] add git ignore : idea/webstrom/sublime --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 80dc72de8..9f3eb2387 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ node_modules .DS_Store *~ +*.sublime-project +*.sublime-workspace +*.idea +*.iml From f434c38069f60a0b3fbc177456886d062fe79004 Mon Sep 17 00:00:00 2001 From: luqin Date: Wed, 21 Oct 2015 11:31:06 +0800 Subject: [PATCH 06/16] add travis.yml --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..fb0f44365 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.12" + From 36dd57cb26fa34c1eb39ff87e45e3a4e9f4fdb6a Mon Sep 17 00:00:00 2001 From: luqin Date: Wed, 21 Oct 2015 11:31:35 +0800 Subject: [PATCH 07/16] add scripts: lint/test --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ebcf6de76..3efc3817b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "url": "https://github.com/AllenFang/react-bootstrap-table.git" }, "scripts": { - "test": "jest" + "lint": "eslint src", + "test": "eslint src && jest" }, "keywords": [ "react", From c53c01640e000e362e49c25dee8d9f68c9f095bd Mon Sep 17 00:00:00 2001 From: luqin Date: Wed, 21 Oct 2015 11:31:46 +0800 Subject: [PATCH 08/16] add badges --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d1931984d..56f1dcd20 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ # react-bootstrap-table -It's a react.js table for bootstrap, named reactbsTable. It's a configurable, functional table component and make you build a Bootstrap Table more efficiency and easy in your React application, However ```react-bootstrap-table``` support these features: + +[![NPM version][npm-badge]][npm] [![Build Status][travis-ci-image]][travis-ci-url] + +[![Dependency Status][deps-badge]][deps] +[![devDependency Status][dev-deps-badge]][dev-deps] +[![peerDependency Status][peer-deps-badge]][peer-deps] + +It's a [react.js](http://facebook.github.io/react/) table for bootstrap, named reactbsTable. It's a configurable, functional table component and make you build a Bootstrap Table more efficiency and easy in your React application, However ```react-bootstrap-table``` support these features: - column align - column hidden @@ -167,3 +174,18 @@ var dataSet = new TableDataSet(products); ``` dataSet.setData(newproducts); ``` + +[npm-badge]: http://badge.fury.io/js/react-bootstrap-table.svg +[npm]: http://badge.fury.io/js/react-bootstrap-table + +[deps-badge]: https://david-dm.org/AllenFang/react-bootstrap-table.svg +[deps]: https://david-dm.org/AllenFang/react-bootstrap-table + +[dev-deps-badge]: https://david-dm.org/AllenFang/react-bootstrap-table/dev-status.svg +[dev-deps]: https://david-dm.org/AllenFang/react-bootstrap-table#info=devDependencies + +[peer-deps-badge]: https://david-dm.org/AllenFang/react-bootstrap-table/peer-status.svg +[peer-deps]: https://david-dm.org/AllenFang/react-bootstrap-table#info=peerDependencies + +[travis-ci-image]: https://travis-ci.org/AllenFang/react-bootstrap-table.svg +[travis-ci-url]: https://travis-ci.org/AllenFang/react-bootstrap-table From ac625f1d2fad7a084cffe3fa610efa847b782b74 Mon Sep 17 00:00:00 2001 From: luqin Date: Wed, 21 Oct 2015 13:06:09 +0800 Subject: [PATCH 09/16] remove idea file --- .idea/.name | 1 - .idea/codeStyleSettings.xml | 20 -- .idea/encodings.xml | 6 - .idea/jsLibraryMappings.xml | 7 - .../react_bootstrap_table_node_modules.xml | 14 - .idea/misc.xml | 74 ---- .idea/modules.xml | 8 - .idea/react-bootstrap-table.iml | 9 - .idea/workspace.xml | 319 ------------------ 9 files changed, 458 deletions(-) delete mode 100644 .idea/.name delete mode 100644 .idea/codeStyleSettings.xml delete mode 100644 .idea/encodings.xml delete mode 100644 .idea/jsLibraryMappings.xml delete mode 100644 .idea/libraries/react_bootstrap_table_node_modules.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/react-bootstrap-table.iml delete mode 100644 .idea/workspace.xml diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 5b243a2cb..000000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -react-bootstrap-table \ No newline at end of file diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml deleted file mode 100644 index 40af03971..000000000 --- a/.idea/codeStyleSettings.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 97626ba45..000000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml deleted file mode 100644 index b348661f7..000000000 --- a/.idea/jsLibraryMappings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/react_bootstrap_table_node_modules.xml b/.idea/libraries/react_bootstrap_table_node_modules.xml deleted file mode 100644 index 0987e9f09..000000000 --- a/.idea/libraries/react_bootstrap_table_node_modules.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 4c91648c5..000000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - Bitwise operation issuesJavaScript - - - CSS - - - Code style issuesJavaScript - - - Control flow issuesJavaScript - - - Data flow issuesJavaScript - - - Error handlingJavaScript - - - GeneralJavaScript - - - HTML - - - Invalid elementsCSS - - - JSON - - - JavaScript - - - JavaScript validity issuesJavaScript - - - Potentially confusing code constructsJavaScript - - - XPath - - - - - CSS - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 9df51c53e..000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/react-bootstrap-table.iml b/.idea/react-bootstrap-table.iml deleted file mode 100644 index ddd5c890f..000000000 --- a/.idea/react-bootstrap-table.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index a8516ab91..000000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - $PROJECT_DIR$/gulpfile.js - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1445312024591 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 22ea02f4848c614b2d8550657e3ab8dd575d3f1d Mon Sep 17 00:00:00 2001 From: luqin Date: Wed, 21 Oct 2015 13:18:12 +0800 Subject: [PATCH 10/16] upgrade eslint --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3efc3817b..0e27c189e 100644 --- a/package.json +++ b/package.json @@ -34,9 +34,9 @@ "babelify": "^5.0.4", "browserify": "^9.0.3", "css-loader": "^0.18.0", - "eslint": "1.4.3", + "eslint": "1.7.2", "eslint-config-airbnb": "0.1.0", - "eslint-plugin-react": "3.4.1", + "eslint-plugin-react": "3.6.3", "gulp": "^3.8.11", "gulp-babel": "^4.0.1", "gulp-concat-css": "^2.2.0", From b3c8bf958c8d6a30bfd149d53f68f73e83d47b7d Mon Sep 17 00:00:00 2001 From: luqin Date: Wed, 21 Oct 2015 14:59:08 +0800 Subject: [PATCH 11/16] new examples --- .babelrc | 3 + examples/advance.html | 56 --------------- examples/basic.html | 43 ------------ examples/js/advance/demo.js | 43 +++++++----- examples/js/app.js | 36 +++++++++- examples/js/basic/demo.js | 35 ++++++---- examples/js/cell-edit/demo.js | 24 +++++++ examples/js/components/App.js | 88 +++++++++++++++++++++++- examples/js/components/GettingStarted.js | 14 ++++ examples/js/components/Home.js | 11 --- examples/js/components/PageNotFound.js | 11 +++ examples/js/components/examples/Basic.js | 16 ----- examples/js/routes.js | 24 ------- examples/js/style/demo.js | 63 ++++++++++++----- examples/js/style/style.css | 31 +++++++++ examples/style.html | 84 ---------------------- package.json | 1 - 17 files changed, 300 insertions(+), 283 deletions(-) create mode 100644 .babelrc delete mode 100644 examples/advance.html delete mode 100644 examples/basic.html create mode 100644 examples/js/components/GettingStarted.js create mode 100644 examples/js/components/PageNotFound.js delete mode 100644 examples/js/components/examples/Basic.js delete mode 100644 examples/js/routes.js create mode 100644 examples/js/style/style.css delete mode 100644 examples/style.html diff --git a/.babelrc b/.babelrc new file mode 100644 index 000000000..ce840ab86 --- /dev/null +++ b/.babelrc @@ -0,0 +1,3 @@ +{ + "stage": 0 +} \ No newline at end of file diff --git a/examples/advance.html b/examples/advance.html deleted file mode 100644 index 614630595..000000000 --- a/examples/advance.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - Advance cell edit type react-bootstrap-table demo - - - - - - -
-
-
Cell Edit Type Example(text, textarea, select, checkbox)
-
-
Source in /examples/js/advance/edit-type-table.js
-
-
-
-
- -
-
-
Data Insert Type Example(text, textarea, select, checkbox)
-
-
Source in /examples/js/advance/insert-type-table.js
-
-
-
-
- -
-
-
Auto RowKey on Data Insert Example
-
-
Source in /examples/js/advance/auto-rowkey-table.js
-
-
-
-
- -
-
-
Data Validator Example(Job Name length must great 10 char)
-
-
Source in /examples/js/advance/validator-table.js
-
-
-
-
- - - - - - diff --git a/examples/basic.html b/examples/basic.html deleted file mode 100644 index 2c7725a3a..000000000 --- a/examples/basic.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - A basic react-bootstrap-table demo - - - - - - -
-
-
A basic react-bootstrap-table
-
-
Source in /examples/js/basic/basic-table.js
-
-
-
-
-
-
-
Table hover, striped and condensed Example
-
-
Source in /examples/js/basic/hover-striped-table.js
-
-
-
-
-
-
-
Table Scroll Example
-
-
Source in /examples/js/basic/scroll-table.js
-
-
-
-
- - - - - diff --git a/examples/js/advance/demo.js b/examples/js/advance/demo.js index 6203b58df..77e1bd37f 100644 --- a/examples/js/advance/demo.js +++ b/examples/js/advance/demo.js @@ -5,22 +5,31 @@ import DataInsertTypeTable from './insert-type-table'; import AutoRowKeyTable from './auto-rowkey-table'; import ValidatorTable from './validator-table'; -React.render( - , - document.getElementById("edit-type") -); +import {Col, Panel} from 'react-bootstrap'; -React.render( - , - document.getElementById("insert-type") -); +class Demo extends React.Component { + render() { + return ( + + +
Source in /examples/js/advance/edit-type-table.js
+ +
+ +
Source in /examples/js/advance/insert-type-table.js
+ +
+ +
Source in /examples/js/advance/auto-rowkey-table.js
+ +
+ +
Source in /examples/js/advance/validator-table.js
+ +
+ + ); + } +} -React.render( - , - document.getElementById("auto-rowkey") -); - -React.render( - , - document.getElementById("validator") -); +export default Demo; diff --git a/examples/js/app.js b/examples/js/app.js index 03e9b4178..ec31813c0 100644 --- a/examples/js/app.js +++ b/examples/js/app.js @@ -1,5 +1,39 @@ +import React from 'react'; import ReactDOM from 'react-dom'; -import routes from './routes'; +import { IndexRoute, Router, Route } from 'react-router'; +import createHistory from 'history/lib/createHashHistory'; + +const history = createHistory( { queryKey: false } ); + +import App from './components/App'; +import Home from './components/Home'; +import GettingStarted from './components/GettingStarted'; +import PageNotFound from './components/PageNotFound'; + +const routes = ( + + + + + + + + + + + + + + + + + + + + + + +); ReactDOM.render(routes, document.querySelector('#root')); diff --git a/examples/js/basic/demo.js b/examples/js/basic/demo.js index f0a6e92e6..447c81b5b 100644 --- a/examples/js/basic/demo.js +++ b/examples/js/basic/demo.js @@ -4,18 +4,27 @@ import BasicTable from './basic-table'; import HoverStripedTable from './hover-striped-table'; import ScrollTable from './scroll-table'; -React.render( - , - document.getElementById("basic") -); +import {Col, Panel} from 'react-bootstrap'; -React.render( - , - document.getElementById('hover-striped') -); +class Demo extends React.Component { + render() { + return ( + + +
Source in /examples/js/basic/basic-table.js
+ +
+ +
Source in /examples/js/basic/basic-table.js
+ +
+ +
Source in /examples/js/basic/basic-table.js
+ +
+ + ); + } +} - -React.render( - , - document.getElementById('scroll') -); +export default Demo; diff --git a/examples/js/cell-edit/demo.js b/examples/js/cell-edit/demo.js index f45337e03..38b7385c1 100644 --- a/examples/js/cell-edit/demo.js +++ b/examples/js/cell-edit/demo.js @@ -30,3 +30,27 @@ React.render( , document.getElementById('hook') ); + + +class Demo extends React.Component { + render() { + return ( + + +
Source in /examples/js/basic/basic-table.js
+ +
+ +
Source in /examples/js/basic/basic-table.js
+ +
+ +
Source in /examples/js/basic/basic-table.js
+ +
+ + ); + } +} + +export default Demo; diff --git a/examples/js/components/App.js b/examples/js/components/App.js index cf15cb99e..053606f13 100644 --- a/examples/js/components/App.js +++ b/examples/js/components/App.js @@ -1,10 +1,96 @@ import React from 'react'; +// import 'bootstrap/dist/css/bootstrap.css'; +// import 'jquery'; +// import 'bootstrap'; +import { + Navbar, + NavBrand, + Nav, + NavItem, + NavDropdown, + MenuItem, + Grid, + Row, + Col, +} from 'react-bootstrap'; + class App extends React.Component { + + static propTypes = { + children: React.PropTypes.node, + }; + + static defaultProps = {}; + + constructor(props) { + super(props); + this.state = {}; + } + + componentDidMount() { + } + render() { + let examples = [{ + text: 'Basic Table', + href: 'basic', + }, { + text: 'Work on Column', + href: 'column', + }, { + text: 'Table Sort', + href: 'sort', + }, { + text: 'Column Format', + href: 'column-format', + }, { + text: 'Row Selection', + href: 'selection', + }, { + text: 'Pagination', + href: 'pagination', + }, { + text: 'Table Manipulation', + href: 'manipulation', + }, { + text: 'Cell Edit', + href: 'cell-edit', + }, { + text: 'Table Styling', + href: 'style', + }, { + text: 'Advance data edit&insert', + href: 'advance', + }, { + text: 'A complex demo', + href: 'complex', + }, { + text: 'TableDataSet demo', + href: 'tableDataSet', + }]; + const exampleMenuItems = examples.map((e, i)=>{ + return {e.text}; + }); return (
- {this.props.children} + + react-bootstrap-table + + + + + + {this.props.children} + + +
); } diff --git a/examples/js/components/GettingStarted.js b/examples/js/components/GettingStarted.js new file mode 100644 index 000000000..487eba994 --- /dev/null +++ b/examples/js/components/GettingStarted.js @@ -0,0 +1,14 @@ +import React from 'react'; + +class GettingStarted extends React.Component { + render() { + return ( +
+

Getting started

+ npm i react-bootstrap-table --save +
+ ); + } +} + +export default GettingStarted; diff --git a/examples/js/components/Home.js b/examples/js/components/Home.js index defc0a6bb..9658cf147 100644 --- a/examples/js/components/Home.js +++ b/examples/js/components/Home.js @@ -4,17 +4,6 @@ class Home extends React.Component { render() { return ( ); } diff --git a/examples/js/components/PageNotFound.js b/examples/js/components/PageNotFound.js new file mode 100644 index 000000000..0f6828cd5 --- /dev/null +++ b/examples/js/components/PageNotFound.js @@ -0,0 +1,11 @@ +import React from 'react'; + +class PageNotFound extends React.Component { + render() { + return ( +
Page Not Found
+ ); + } +} + +export default PageNotFound; diff --git a/examples/js/components/examples/Basic.js b/examples/js/components/examples/Basic.js deleted file mode 100644 index adde57434..000000000 --- a/examples/js/components/examples/Basic.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import {Col, Panel} from 'react-bootstrap'; - -class Basic extends React.Component { - render() { - return ( - - -
Source in /examples/js/basic/basic-table.js
-
- - ); - } -} - -export default Basic; diff --git a/examples/js/routes.js b/examples/js/routes.js deleted file mode 100644 index 27f30499f..000000000 --- a/examples/js/routes.js +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import { Router, Route, IndexRoute } from 'react-router'; - -const routes = ( - - - - - - - - - - - - - - - - - -); - -export default routes; diff --git a/examples/js/style/demo.js b/examples/js/style/demo.js index 7e24ceabe..ffb9b358e 100644 --- a/examples/js/style/demo.js +++ b/examples/js/style/demo.js @@ -1,26 +1,57 @@ require('../../../css/react-bootstrap-table.min.css'); +require('./style.css'); import React from 'react'; import TrClassStringTable from './tr-class-string-table'; import TrClassFunctionTable from './tr-class-function-table'; import TdClassStringTable from './td-class-string-table'; import TdClassFunctionTable from './td-class-function-table'; -React.render( - , - document.getElementById("tr-string-simple") -); +class Demo extends React.Component { + render() { + return ( +
+
+
+
Set String as classname on <tr>
+
+
Source in /examples/js/style/tr-class-string-table.js
+ +
+
+
+
+
+
Set Function as classname on <tr>(more easy to customize)
+
+
Source in /examples/js/style/tr-class-function-table.js
+ +
+
+
+
+
+
Set String as classname on <td>(header & column)
+
+
Source in /examples/js/style/td-class-string-table.js
+ +
+
+
+
+
+
Set Function as classname on <td>(more easy to customize column)
+
+
Source in /examples/js/style/td-class-function-table.js
+ +
+
+
+
-React.render( - , - document.getElementById("tr-function-simple") -); + ); + } +} + +export default Demo; -React.render( - , - document.getElementById("td-string-simple") -); -React.render( - , - document.getElementById("td-function-simple") -); diff --git a/examples/js/style/style.css b/examples/js/style/style.css new file mode 100644 index 000000000..a0b34c0c4 --- /dev/null +++ b/examples/js/style/style.css @@ -0,0 +1,31 @@ +.tr-string-example{ + font-style: oblique; + color: red; + background-color: aquamarine; +} + +.tr-function-example{ + font-weight: bold; + background-color: aquamarine; +} + +.td-header-string-example{ + font-style: oblique; + color: red; + background-color: aquamarine; +} + +.td-column-string-example{ + color: blue; + background-color: antiquewhite; +} + +.td-column-function-odd-example{ + color: blue; + background-color: antiquewhite; +} + +.td-column-function-even-example{ + color: red; + background-color: yellowgreen; +} \ No newline at end of file diff --git a/examples/style.html b/examples/style.html deleted file mode 100644 index 4ca627e34..000000000 --- a/examples/style.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - A react-bootstrap-table style demo - - - - - - -
-
-
Set String as classname on <tr>
-
-
Source in /examples/js/style/tr-class-string-table.js
-
-
-
-
-
-
-
Set Function as classname on <tr>(more easy to customize)
-
-
Source in /examples/js/style/tr-class-function-table.js
-
-
-
-
-
-
-
Set String as classname on <td>(header & column)
-
-
Source in /examples/js/style/td-class-string-table.js
-
-
-
-
-
-
-
Set Function as classname on <td>(more easy to customize column)
-
-
Source in /examples/js/style/td-class-function-table.js
-
-
-
-
- - - - - diff --git a/package.json b/package.json index 8d52ee6fb..08898c3e3 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,6 @@ "gulp-cssmin": "^0.1.6", "history": "1.12.3", "jquery": "^2.1.4", - "jest-cli": "^0.4.0", "jsx-loader": "^0.13.2", "react": "^0.14.0", "react-bootstrap": "^0.27.2", From f8d1ffc399e9c5b7d4c2bb1b0ad570c6e3d65312 Mon Sep 17 00:00:00 2001 From: luqin Date: Wed, 21 Oct 2015 20:51:48 +0800 Subject: [PATCH 12/16] new examples use react-router --- README.md | 2 +- examples/cell-edit.html | 61 ------------- examples/column-format.html | 34 -------- examples/column.html | 43 ---------- examples/complex.html | 30 ------- examples/example-list.html | 22 ----- examples/js/advance/auto-rowkey-table.js | 1 - examples/js/app.js | 21 +++-- examples/js/basic/demo.js | 8 +- examples/js/cell-edit/demo.js | 95 ++++++++++---------- examples/js/column-format/demo.js | 35 ++++++-- examples/js/column/demo.js | 51 +++++++---- examples/js/complex/demo.css | 4 + examples/js/complex/demo.js | 22 ++++- examples/js/manipulation/demo.js | 63 ++++++++++---- examples/js/pagination/demo.js | 35 ++++++-- examples/js/selection/demo.js | 105 ++++++++++++++++------- examples/js/sort/demo.js | 49 ++++++++--- examples/js/tableDataSet/demo.js | 21 ++++- examples/manipulation.html | 52 ----------- examples/pagination.html | 34 -------- examples/selection.html | 79 ----------------- examples/sort.html | 43 ---------- examples/tableDataSet.html | 24 ------ 24 files changed, 348 insertions(+), 586 deletions(-) delete mode 100644 examples/cell-edit.html delete mode 100644 examples/column-format.html delete mode 100644 examples/column.html delete mode 100644 examples/complex.html delete mode 100644 examples/example-list.html create mode 100644 examples/js/complex/demo.css delete mode 100644 examples/manipulation.html delete mode 100644 examples/pagination.html delete mode 100644 examples/selection.html delete mode 100644 examples/sort.html delete mode 100644 examples/tableDataSet.html diff --git a/README.md b/README.md index 56f1dcd20..ac57bb064 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ $ npm install Use gulp to build the react-bootstrap-table ``` $ gulp dev #for development -$ gulp example-server #see all examples, go to localhost:3004/example-list.html +$ gulp example-server #see all examples, go to localhost:3004 $ gulp prod #for production ``` diff --git a/examples/cell-edit.html b/examples/cell-edit.html deleted file mode 100644 index 477cb4238..000000000 --- a/examples/cell-edit.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - A react-bootstrap-table cell edit demo - - - - - - -
-
-
Click to Edit Cell Example (Press ENTER to save, ESC to cancel)
-
-
Source in /examples/js/cell-edit/click-to-edit-table.js
-
-
-
-
-
-
-
DbClick to Edit Cell Example (Press ENTER to save, ESC to cancel)
-
-
Source in /examples/js/cell-edit/dbclick-to-edit-table.js
-
-
-
-
-
-
-
Blur to Save Cell Example (ESC to cancel)
-
-
Source in /examples/js/cell-edit/blur-to-save-table.js
-
-
-
-
-
-
-
A Non Editable Cell Example (Product Name can't be edited)
-
-
Source in /examples/js/cell-edit/non-editable-table.js
-
-
-
-
-
-
-
After Cell Edit Hook Example
-
-
Source in /examples/js/cell-edit/cell-edit-hook-table.js
-
-
-
-
- - - - - diff --git a/examples/column-format.html b/examples/column-format.html deleted file mode 100644 index 5b9ab48b5..000000000 --- a/examples/column-format.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - A react-bootstrap-table column format demo - - - - - - -
-
-
Html Column format Example
-
-
Source in /examples/js/column-format/html-column-format-table.js
-
-
-
-
-
-
-
React Component Column format Example
-
-
Source in /examples/js/column-format/react-column-format-table.js
-
-
-
-
- - - - - diff --git a/examples/column.html b/examples/column.html deleted file mode 100644 index ad48f5b1f..000000000 --- a/examples/column.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - A react-bootstrap-table column demo - - - - - - -
-
-
Column Align Example
-
-
Source in /examples/js/column/column-align-table.js
-
-
-
-
-
-
-
Column Width Example
-
-
Source in /examples/js/column/column-width-table.js
-
-
-
-
-
-
-
Column Hide Example
-
-
Source in /examples/js/column/column-hide-table.js
-
-
-
-
- - - - - diff --git a/examples/complex.html b/examples/complex.html deleted file mode 100644 index 387b1a04a..000000000 --- a/examples/complex.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - A complex react-bootstrap-table demo - - - - - - -
-
-
A Complex Example
-
Source in /examples/js/complex/app.js
-
-
-
-
-
- - - - - diff --git a/examples/example-list.html b/examples/example-list.html deleted file mode 100644 index d11065e7a..000000000 --- a/examples/example-list.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - react-bootstrap-table demo - - - - Basic Table

- Work on Column

- Table Sort

- Column Format

- Row Selection

- Pagination

- Table Manipulation

- Cell Edit

- Table Styling

- Advance data edit&insert

- A complex demo

- TableDataSet demo

- - diff --git a/examples/js/advance/auto-rowkey-table.js b/examples/js/advance/auto-rowkey-table.js index 31833a6cc..cd54a9981 100644 --- a/examples/js/advance/auto-rowkey-table.js +++ b/examples/js/advance/auto-rowkey-table.js @@ -1,4 +1,3 @@ -'use strict'; import React from 'react'; import {BootstrapTable, TableHeaderColumn} from 'react-bootstrap-table'; diff --git a/examples/js/app.js b/examples/js/app.js index ec31813c0..282096206 100644 --- a/examples/js/app.js +++ b/examples/js/app.js @@ -14,22 +14,21 @@ import PageNotFound from './components/PageNotFound'; const routes = ( - + - - - - - - - - + + + + + + + - - + + diff --git a/examples/js/basic/demo.js b/examples/js/basic/demo.js index 447c81b5b..e80444a39 100644 --- a/examples/js/basic/demo.js +++ b/examples/js/basic/demo.js @@ -14,12 +14,12 @@ class Demo extends React.Component {
Source in /examples/js/basic/basic-table.js
- -
Source in /examples/js/basic/basic-table.js
+ +
Source in /examples/js/basic/hover-striped-table.js
- -
Source in /examples/js/basic/basic-table.js
+ +
Source in /examples/js/basic/scroll-table.js
diff --git a/examples/js/cell-edit/demo.js b/examples/js/cell-edit/demo.js index 38b7385c1..17522443d 100644 --- a/examples/js/cell-edit/demo.js +++ b/examples/js/cell-edit/demo.js @@ -6,51 +6,58 @@ import BlurToSaveTable from './blur-to-save-table'; import CellEditHookTable from './cell-edit-hook-table'; import NonEditableTable from './non-editable-table'; -React.render( - , - document.getElementById("click") -); - -React.render( - , - document.getElementById('dbclick') -); - -React.render( - , - document.getElementById('blur') -); - -React.render( - , - document.getElementById('non-editable') -); - -React.render( - , - document.getElementById('hook') -); - - class Demo extends React.Component { - render() { - return ( - - -
Source in /examples/js/basic/basic-table.js
- -
- -
Source in /examples/js/basic/basic-table.js
- -
- -
Source in /examples/js/basic/basic-table.js
- -
- - ); - } + render() { + return ( +
+
+
+
Click to Edit Cell Example (Press ENTER to save, ESC to cancel)
+
+
Source in /examples/js/cell-edit/click-to-edit-table.js
+ +
+
+
+
+
+
DbClick to Edit Cell Example (Press ENTER to save, ESC to cancel)
+
+
Source in /examples/js/cell-edit/dbclick-to-edit-table.js
+ +
+
+
+
+
+
Blur to Save Cell Example (ESC to cancel)
+
+
Source in /examples/js/cell-edit/blur-to-save-table.js
+ +
+
+
+
+
+
A Non Editable Cell Example (Product Name can't be edited)
+
+
Source in /examples/js/cell-edit/non-editable-table.js
+ +
+
+
+
+
+
After Cell Edit Hook Example
+
+
Source in /examples/js/cell-edit/cell-edit-hook-table.js
+ +
+
+
+
+ ); + } } export default Demo; diff --git a/examples/js/column-format/demo.js b/examples/js/column-format/demo.js index 1309274ba..6820cf970 100644 --- a/examples/js/column-format/demo.js +++ b/examples/js/column-format/demo.js @@ -3,12 +3,31 @@ import React from 'react'; import HtmlColumnFormatTable from './html-column-format-table'; import ReactColumnFormatTable from './react-column-format-table'; -React.render( - , - document.getElementById("html-format") -); +class Demo extends React.Component { + render() { + return ( +
+
+
+
Html Column format Example
+
+
Source in /examples/js/column-format/html-column-format-table.js
+ +
+
+
+
+
+
React Component Column format Example
+
+
Source in /examples/js/column-format/react-column-format-table.js
+ +
+
+
+
+ ); + } +} -React.render( - , - document.getElementById('react-format') -); +export default Demo; diff --git a/examples/js/column/demo.js b/examples/js/column/demo.js index 3364b9ecf..041917eb3 100644 --- a/examples/js/column/demo.js +++ b/examples/js/column/demo.js @@ -4,19 +4,40 @@ import ColumnAlignTable from './column-align-table'; import ColumnWidthTable from './column-width-table'; import ColumnHideTable from './column-hide-table'; -React.render( - , - document.getElementById("align") -); +class Demo extends React.Component { + render() { + return ( +
+
+
+
Column Align Example
+
+
Source in /examples/js/column/column-align-table.js
+ +
+
+
+
+
+
Column Width Example
+
+
Source in /examples/js/column/column-width-table.js
+ +
+
+
+
+
+
Column Hide Example
+
+
Source in /examples/js/column/column-hide-table.js
+ +
+
+
+
+ ); + } +} - -React.render( - , - document.getElementById("width") -); - - -React.render( - , - document.getElementById("hide") -); +export default Demo; diff --git a/examples/js/complex/demo.css b/examples/js/complex/demo.css new file mode 100644 index 000000000..2494c39a4 --- /dev/null +++ b/examples/js/complex/demo.css @@ -0,0 +1,4 @@ +.third-tr{ + font-weight: bold; + background-color: aquamarine; +} \ No newline at end of file diff --git a/examples/js/complex/demo.js b/examples/js/complex/demo.js index f09d915ad..76e62e709 100644 --- a/examples/js/complex/demo.js +++ b/examples/js/complex/demo.js @@ -1,8 +1,22 @@ +require('./demo.css'); require('../../../css/react-bootstrap-table.min.css'); import React from 'react'; import App from './app'; -React.render( - , - document.getElementById("complex") -); +class Demo extends React.Component { + render() { + return ( +
+
+
A Complex Example
+
Source in /examples/js/complex/app.js
+
+ +
+
+
+ ); + } +} + +export default Demo; diff --git a/examples/js/manipulation/demo.js b/examples/js/manipulation/demo.js index 3a9e964f6..a648a9eab 100644 --- a/examples/js/manipulation/demo.js +++ b/examples/js/manipulation/demo.js @@ -5,22 +5,49 @@ import DeleteRowTable from './delete-row-table'; import SearchTable from './search-table'; import ColumnFilterTable from './filter-table'; -React.render( - , - document.getElementById("insert") -); +class Demo extends React.Component { + render() { + return ( +
+
+
+
Insert Row Example
+
+
Source in /examples/js/manipulation/insert-row-table.js
+ +
+
+
+
+
+
Delete Row Example
+
+
Source in /examples/js/manipulation/delete-row-table.js
+ +
+
+
+
+
+
Table Search Example
+
+
Source in /examples/js/manipulation/search-table.js
+ +
+
+
+
+
+
Column Filter Example
+
+
Source in /examples/js/manipulation/filter-table.js
+ +
+
+
+
+ ); + } +} -React.render( - , - document.getElementById("delete") -); - -React.render( - , - document.getElementById("search") -); - -React.render( - , - document.getElementById("filter") -); +export default Demo; diff --git a/examples/js/pagination/demo.js b/examples/js/pagination/demo.js index 5bd6ab2b2..13a77d30b 100644 --- a/examples/js/pagination/demo.js +++ b/examples/js/pagination/demo.js @@ -3,12 +3,31 @@ import React from 'react'; import DefaultPaginationTable from './default-pagination-table'; import CustomPaginationTable from './custom-pagination-table'; -React.render( - , - document.getElementById("default") -); +class Demo extends React.Component { + render() { + return ( +
+
+
+
Basic Pagination Example
+
+
Source in /examples/js/pagination/default-pagination-table.js
+ +
+
+
+
+
+
Custom Pagination Example
+
+
Source in /examples/js/pagination/custom-pagination-table.js
+ +
+
+
+
+ ); + } +} -React.render( - , - document.getElementById("custom") -); +export default Demo; diff --git a/examples/js/selection/demo.js b/examples/js/selection/demo.js index ca0a6725b..fa4600a8f 100644 --- a/examples/js/selection/demo.js +++ b/examples/js/selection/demo.js @@ -8,37 +8,76 @@ import SelectBgColorTable from './select-bgcolor-table'; import SelectHookTable from './select-hook-table'; import HideSelectionColumnTable from './hide-selection-col-table'; -React.render( - , - document.getElementById("single") -); +class Demo extends React.Component { + render() { + return ( +
+
+
+
Single Select Example
+
+
Source in /examples/js/selection/single-select-table.js
+ +
+
+
+
+
+
Multi Select Example
+
+
Source in /examples/js/selection/multi-select-table.js
+ +
+
+
+
+
+
Click to Select Row Example
+
+
Source in /examples/js/selection/click-to-select-table.js
+ +
+
+
+
+
+
Default Select Example
+
+
Source in /examples/js/selection/default-select-table.js
+ +
+
+
+
+
+
Selected Row Bgcolor Example
+
+
Source in /examples/js/selection/select-bgcolor-table.js
+ +
+
+
+
+
+
Selection Hook Example
+
+
Source in /examples/js/selection/select-hook-table.js
+ +
+
+
+
+
+
Hide Selection Column Example
+
+
Source in /examples/js/selection/hide-selection-col-table.js
+ +
+
+
+
+ ); + } +} -React.render( - , - document.getElementById('multi') -); - -React.render( - , - document.getElementById('click') -); - -React.render( - , - document.getElementById('default-select') -); - -React.render( - , - document.getElementById('bgcolor') -); - -React.render( - , - document.getElementById('hook') -); - -React.render( - , - document.getElementById('hide') -); +export default Demo; diff --git a/examples/js/sort/demo.js b/examples/js/sort/demo.js index 31fbe755c..cc1f67a42 100644 --- a/examples/js/sort/demo.js +++ b/examples/js/sort/demo.js @@ -4,17 +4,40 @@ import SortTable from './sort-table'; import DefaultSortTable from './default-sort-table'; import CustomSortTable from './custom-sort-table'; -React.render( - , - document.getElementById("sort") -); +class Demo extends React.Component { + render() { + return ( +
+
+
+
Table Sort Example
+
+
Source in /examples/js/sort/sort-table.js
+ +
+
+
+
+
+
Default Table Sort Example
+
+
Source in /examples/js/sort/default-sort-table.js
+ +
+
+
+
+
+
Customize Table Sort Example
+
+
Source in /examples/js/sort/custom-sort-table.js
+ +
+
+
+
+ ); + } +} -React.render( - , - document.getElementById('default-sort') -); - -React.render( - , - document.getElementById('custom-sort') -); \ No newline at end of file +export default Demo; diff --git a/examples/js/tableDataSet/demo.js b/examples/js/tableDataSet/demo.js index ccb0686f9..0661e7ebd 100644 --- a/examples/js/tableDataSet/demo.js +++ b/examples/js/tableDataSet/demo.js @@ -2,7 +2,20 @@ require('../../../css/react-bootstrap-table.min.css'); import React from 'react'; import TableDataSetTable from './table-data-set'; -React.render( - , - document.getElementById("tableDataSet") -); +class Demo extends React.Component { + render() { + return ( +
+
+
A TableDataSet Example
+
Source in /examples/js/tableDataSet/app.js
+
+ +
+
+
+ ); + } +} + +export default Demo; diff --git a/examples/manipulation.html b/examples/manipulation.html deleted file mode 100644 index 1330f49e3..000000000 --- a/examples/manipulation.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - A manipulation react-bootstrap-table demo - - - - - - -
-
-
Insert Row Example
-
-
Source in /examples/js/manipulation/insert-row-table.js
-
-
-
-
-
-
-
Delete Row Example
-
-
Source in /examples/js/manipulation/delete-row-table.js
-
-
-
-
-
-
-
Table Search Example
-
-
Source in /examples/js/manipulation/search-table.js
- -
-
-
-
-
-
Column Filter Example
-
-
Source in /examples/js/manipulation/filter-table.js
-
-
-
-
- - - - - diff --git a/examples/pagination.html b/examples/pagination.html deleted file mode 100644 index 12d254db8..000000000 --- a/examples/pagination.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - A react-bootstrap-table pagination demo - - - - - - -
-
-
Basic Pagination Example
-
-
Source in /examples/js/pagination/default-pagination-table.js
-
-
-
-
-
-
-
Custom Pagination Example
-
-
Source in /examples/js/pagination/custom-pagination-table.js
-
-
-
-
- - - - - diff --git a/examples/selection.html b/examples/selection.html deleted file mode 100644 index ee38bf6d9..000000000 --- a/examples/selection.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - A react-bootstrap-table selection demo - - - - - - -
-
-
Single Select Example
-
-
Source in /examples/js/selection/single-select-table.js
-
-
-
-
-
-
-
Multi Select Example
-
-
Source in /examples/js/selection/multi-select-table.js
-
-
-
-
-
-
-
Click to Select Row Example
-
-
Source in /examples/js/selection/click-to-select-table.js
-
-
-
-
-
-
-
Default Select Example
-
-
Source in /examples/js/selection/default-select-table.js
-
-
-
-
-
-
-
Selected Row Bgcolor Example
-
-
Source in /examples/js/selection/select-bgcolor-table.js
-
-
-
-
-
-
-
Selection Hook Example
-
-
Source in /examples/js/selection/select-hook-table.js
-
-
-
-
-
-
-
Hide Selection Column Example
-
-
Source in /examples/js/selection/hide-selection-col-table.js
-
-
-
-
- - - - - diff --git a/examples/sort.html b/examples/sort.html deleted file mode 100644 index bd25b3621..000000000 --- a/examples/sort.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - A react-bootstrap-table sort demo - - - - - - -
-
-
Table Sort Example
-
-
Source in /examples/js/sort/sort-table.js
-
-
-
-
-
-
-
Default Table Sort Example
-
-
Source in /examples/js/sort/default-sort-table.js
-
-
-
-
-
-
-
Customize Table Sort Example
-
-
Source in /examples/js/sort/custom-sort-table.js
-
-
-
-
- - - - - diff --git a/examples/tableDataSet.html b/examples/tableDataSet.html deleted file mode 100644 index e282eff06..000000000 --- a/examples/tableDataSet.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - A TableDataSet demo - - - - - -
-
-
A TableDataSet Example
-
Source in /examples/js/tableDataSet/app.js
-
-
-
-
-
- - - - - From 4620791ee7f5c36b89893532a9f7a4a43af52f36 Mon Sep 17 00:00:00 2001 From: luqin Date: Wed, 21 Oct 2015 21:22:31 +0800 Subject: [PATCH 13/16] fix warning and menu active --- examples/js/components/App.js | 18 +++++++++++++----- package.json | 3 +-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/examples/js/components/App.js b/examples/js/components/App.js index 053606f13..261983d7e 100644 --- a/examples/js/components/App.js +++ b/examples/js/components/App.js @@ -1,4 +1,5 @@ import React from 'react'; +import {LinkContainer} from 'react-router-bootstrap'; // import 'bootstrap/dist/css/bootstrap.css'; // import 'jquery'; @@ -69,19 +70,26 @@ class App extends React.Component { text: 'TableDataSet demo', href: 'tableDataSet', }]; - const exampleMenuItems = examples.map((e, i)=>{ - return {e.text}; + + const exampleMenuItems = examples.map((item, idx)=> { + return ( + + {item.text} + + ); }); return (
react-bootstrap-table - From 1b99151e1ccd2265db9856d844a93e44d017a928 Mon Sep 17 00:00:00 2001 From: luqin Date: Thu, 22 Oct 2015 09:28:26 +0800 Subject: [PATCH 16/16] update webpack alias path --- webpack.example.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.example.config.js b/webpack.example.config.js index 934240bfb..5393858a4 100644 --- a/webpack.example.config.js +++ b/webpack.example.config.js @@ -20,7 +20,7 @@ module.exports = { resolve: { extensions: ['', '.js', '.jsx'], alias: { - 'react-bootstrap-table': '../../../src/index.js' + 'react-bootstrap-table': path.resolve(__dirname, './src') } }, module: {