Browse Source

Add examples.

zhixin 11 years ago
parent
commit
a250962d40

+ 4 - 4
docs/_includes/examples/basic.md

@@ -1,4 +1,4 @@
-# Basic Table []({{ site.repo }}/blob/master/docs/_includes/examples/basic.md)
+# Basic []({{ site.repo }}/blob/master/docs/_includes/examples/basic.md)
 
 ---
 
@@ -6,16 +6,16 @@
 
 Transform table from an existing, unformatted html table. _by [@wenzhixin](https://github.com/wenzhixin)_
 
-<iframe width="100%" height="300" src="http://jsfiddle.net/wenyi/e3nk137y/2/embedded/html,js,css,resources,result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
+<iframe width="100%" height="300" src="http://jsfiddle.net/wenyi/e3nk137y/11/embedded/html,result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
 
 ## Table from data
 
 Transform table from an existing data. _by [@wenzhixin](https://github.com/wenzhixin)_
 
-<iframe width="100%" height="300" src="http://jsfiddle.net/wenyi/e3nk137y/1/embedded/html,js,css,resources,result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
+<iframe width="100%" height="300" src="http://jsfiddle.net/wenyi/e3nk137y/13/embedded/html,js,result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
 
 ## Table from url
 
 Transform table from an url. _by [@wenzhixin](https://github.com/wenzhixin)_
 
-<iframe width="100%" height="300" src="http://jsfiddle.net/wenyi/e3nk137y/3/embedded/html,js,css,resources,result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
+<iframe width="100%" height="300" src="http://jsfiddle.net/wenyi/e3nk137y/14/embedded/html,result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>

+ 9 - 0
docs/_includes/examples/sort.md

@@ -0,0 +1,9 @@
+# Sort []({{ site.repo }}/blob/master/docs/_includes/examples/sort.md)
+
+---
+
+## Basic Sort
+
+Use `sortName`, `sortOrder`, `sortable` options, and `sortable`, `order` column options to set the basic sort of bootstrap table. _by [@wenzhixin](https://github.com/wenzhixin)_
+
+<iframe width="100%" height="300" src="http://jsfiddle.net/wenyi/e3nk137y/10/embedded/html,js,result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>

+ 21 - 0
docs/_includes/examples/style.md

@@ -0,0 +1,21 @@
+# Style []({{ site.repo }}/blob/master/docs/_includes/examples/style.md)
+
+---
+
+## Classes
+
+Use `height, classes, striped` options and `class, width` column options to set the styles of bootstrap table. _by [@wenzhixin](https://github.com/wenzhixin)_
+
+<iframe width="100%" height="300" src="http://jsfiddle.net/wenyi/e3nk137y/15/embedded/html,result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
+
+## RowStyle
+
+Use `rowStyle` option to set the row style of bootstrap table. _by [@wenzhixin](https://github.com/wenzhixin)_
+
+<iframe width="100%" height="300" src="http://jsfiddle.net/wenyi/e3nk137y/16/embedded/html,js,result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
+
+## CellStyle
+
+Use `cellStyle` column option to set the cell style of bootstrap table. _by [@wenzhixin](https://github.com/wenzhixin)_
+
+<iframe width="100%" height="300" src="http://jsfiddle.net/wenyi/30sx4h3t/embedded/html,js,result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>

+ 20 - 95
docs/data/data1/demo.response.json

@@ -1,107 +1,32 @@
 [
     {
-        "id": 0,
-        "name": "Item 0",
-        "price": "$0"
+        "name": "bootstrap-table",
+        "stargazers_count": "526",
+        "forks_count": "122",
+        "description": "An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3)"
     },
     {
-        "id": 1,
-        "name": "Item 1",
-        "price": "$1"
+        "name": "multiple-select",
+        "stargazers_count": "288",
+        "forks_count": "150",
+        "description": "A jQuery plugin to select multiple elements with checkboxes :)"
     },
     {
-        "id": 2,
-        "name": "Item 2",
-        "price": "$2"
+        "name": "bootstrap-show-password",
+        "stargazers_count": "32",
+        "forks_count": "11",
+        "description": "Show/hide password plugin for twitter bootstrap."
     },
     {
-        "id": 3,
-        "name": "Item 3",
-        "price": "$3"
+        "name": "blog",
+        "stargazers_count": "13",
+        "forks_count": "4",
+        "description": "my blog"
     },
     {
-        "id": 4,
-        "name": "Item 4",
-        "price": "$4"
-    },
-    {
-        "id": 5,
-        "name": "Item 5",
-        "price": "$5"
-    },
-    {
-        "id": 6,
-        "name": "Item 6",
-        "price": "$6"
-    },
-    {
-        "id": 7,
-        "name": "Item 7",
-        "price": "$7"
-    },
-    {
-        "id": 8,
-        "name": "Item 8",
-        "price": "$8"
-    },
-    {
-        "id": 9,
-        "name": "Item 9",
-        "price": "$9"
-    },
-    {
-        "id": 10,
-        "name": "Item 10",
-        "price": "$10"
-    },
-    {
-        "id": 11,
-        "name": "Item 11",
-        "price": "$11"
-    },
-    {
-        "id": 12,
-        "name": "Item 12",
-        "price": "$12"
-    },
-    {
-        "id": 13,
-        "name": "Item 13",
-        "price": "$13"
-    },
-    {
-        "id": 14,
-        "name": "Item 14",
-        "price": "$14"
-    },
-    {
-        "id": 15,
-        "name": "Item 15",
-        "price": "$15"
-    },
-    {
-        "id": 16,
-        "name": "Item 16",
-        "price": "$16"
-    },
-    {
-        "id": 17,
-        "name": "Item 17",
-        "price": "$17"
-    },
-    {
-        "id": 18,
-        "name": "Item 18",
-        "price": "$18"
-    },
-    {
-        "id": 19,
-        "name": "Item 19",
-        "price": "$19"
-    },
-    {
-        "id": 20,
-        "name": "Item 20",
-        "price": "$20"
+        "name": "scutech-redmine",
+        "stargazers_count": "6",
+        "forks_count": "3",
+        "description": "Redmine notification tools for chrome extension."
     }
 ]

+ 6 - 1
docs/examples.md

@@ -7,4 +7,9 @@ lead: "The examples of bootstrap table."
 
 {% markdown examples/note.md %}
 
-{% markdown examples/basic.md %}
+{% markdown examples/basic.md %}
+
+{% markdown examples/style.md %}
+
+
+{% markdown examples/sort.md %}