Browse Source

Update docs and extensions.

zhixin 10 years ago
parent
commit
904ef1b6f6

+ 3 - 0
.gitignore

@@ -3,6 +3,9 @@ node_modules
 # docs site
 # docs site
 _gh_pages
 _gh_pages
 
 
+# build the extensions
+extensions.js
+
 # deploy the docs
 # deploy the docs
 deploy.sh
 deploy.sh
 
 

+ 6 - 1
README.md

@@ -7,7 +7,12 @@
 
 
 An extended Bootstrap table with radio, checkbox, sort, pagination, extensions and other added features.
 An extended Bootstrap table with radio, checkbox, sort, pagination, extensions and other added features.
 
 
-To get started, check out [Docs](http://bootstrap-table.wenzhixin.net.cn), [More examples](https://github.com/wenzhixin/bootstrap-table-examples), [Example issues](https://github.com/wenzhixin/bootstrap-table/issues?q=label%3Aexample+is%3Aclosed), [Resource issues](https://github.com/wenzhixin/bootstrap-table/issues?q=label%3Aresource+is%3Aclosed) and [Questions / Helps](http://stackoverflow.com/questions/tagged/bootstrap-table)!
+To get started, check out:
+
+* [Docs](http://bootstrap-table.wenzhixin.net.cn)
+* [Examples](https://github.com/wenzhixin/bootstrap-table-examples)
+* [Questions/Helps](http://stackoverflow.com/questions/tagged/bootstrap-table)
+* [问题/帮助](http://segmentfault.com/t/bootstrap-table)
 
 
 
 
 [**List of donators**](https://github.com/wenzhixin/bootstrap-table/blob/master/DONATORS.md)
 [**List of donators**](https://github.com/wenzhixin/bootstrap-table/blob/master/DONATORS.md)

+ 1 - 0
docs/_i18n/en.yml

@@ -26,4 +26,5 @@ pages:
     lead: "If you like Bootstrap Table, if your project uses Bootstrap Table, if you want Bootstrap Table do better..."
     lead: "If you like Bootstrap Table, if your project uses Bootstrap Table, if you want Bootstrap Table do better..."
 common:
 common:
   social_tip: "If you like bootstrap table: "
   social_tip: "If you like bootstrap table: "
+  help: "Questions/Helps: "
   qq_group: "QQ group: "
   qq_group: "QQ group: "

+ 1 - 0
docs/_i18n/es.yml

@@ -26,4 +26,5 @@ pages:
     lead: "If you like Bootstrap Table, if your project uses Bootstrap Table, if you want Bootstrap Table do better..."
     lead: "If you like Bootstrap Table, if your project uses Bootstrap Table, if you want Bootstrap Table do better..."
 common:
 common:
   social_tip: "If you like bootstrap table: "
   social_tip: "If you like bootstrap table: "
+  help: "Questions/Helps: "
   qq_group: "QQ group: "
   qq_group: "QQ group: "

+ 1 - 0
docs/_i18n/zh-cn.yml

@@ -26,4 +26,5 @@ pages:
     lead: "假如你喜欢 Bootstrap Table,假如你的项目使用到 Bootstrap Table,假如你想让 Bootstrap Table 更好……"
     lead: "假如你喜欢 Bootstrap Table,假如你的项目使用到 Bootstrap Table,假如你想让 Bootstrap Table 更好……"
 common:
 common:
   social_tip: "假如您喜欢 Bootstrap Table:"
   social_tip: "假如您喜欢 Bootstrap Table:"
+  help: "问题/帮助:"
   qq_group: "QQ群:"
   qq_group: "QQ群:"

+ 0 - 3
docs/_includes/nav.html

@@ -31,9 +31,6 @@
                     <a href="{{ site.baseurl }}/faq/">{% t pages.faq.title %}</a>
                     <a href="{{ site.baseurl }}/faq/">{% t pages.faq.title %}</a>
                 </li>
                 </li>
                 <li>
                 <li>
-                    <a href="http://stackoverflow.com/questions/tagged/bootstrap-table" target="_blank">Questions / Helps</a>
-                </li>
-                <li>
                     <a href="{{ site.repo }}" target="_blank">GitHub</a>
                     <a href="{{ site.repo }}" target="_blank">GitHub</a>
                 </li>
                 </li>
             </ul>
             </ul>

+ 15 - 6
docs/_includes/social-buttons.html

@@ -15,16 +15,25 @@
             <iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=wenzhixin&type=follow&count=true"
             <iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=wenzhixin&type=follow&count=true"
                     width="175" height="20" title="Follow on GitHub"></iframe>
                     width="175" height="20" title="Follow on GitHub"></iframe>
         </li>
         </li>
-        <li>
+        <!--<li>-->
             <!-- https://about.twitter.com/resources/buttons#tweet -->
             <!-- https://about.twitter.com/resources/buttons#tweet -->
-            <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://wenzhixin.net.cn/p/bootstrap-table" data-via="BootstrapTable" data-related="BootstrapTable">Tweet</a>
-        </li>
+            <!--<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://wenzhixin.net.cn/p/bootstrap-table" data-via="BootstrapTable" data-related="BootstrapTable">Tweet</a>-->
+        <!--</li>-->
+        <!--<li>-->
+             <!--将此标记放置在你希望显示+1 按钮的位置。 -->
+            <!--<div class="g-plusone" data-annotation="inline" data-width="120"></div>-->
+        <!--</li>-->
+        <!--<li>-->
+            <!--<div>{% t common.qq_group %} 103558783</div>-->
+        <!--</li>-->
+    </ul>
+    {% t common.help %}
+    <ul class="bs-docs-social-buttons">
         <li>
         <li>
-            <!-- 将此标记放置在你希望显示+1 按钮的位置。 -->
-            <div class="g-plusone" data-annotation="inline" data-width="120"></div>
+            <a class="help-btn" href="http://stackoverflow.com/questions/tagged/bootstrap-table">StackOverflow</a>
         </li>
         </li>
         <li>
         <li>
-            <div>{% t common.qq_group %} 103558783</div>
+            <a class="help-btn" href="http://segmentfault.com/t/bootstrap-table">SegmentFault</a>
         </li>
         </li>
     </ul>
     </ul>
 </div>
 </div>

+ 24 - 0
docs/assets/css/style.css

@@ -23,4 +23,28 @@
 }
 }
 .tc img {
 .tc img {
     max-width: 100%;
     max-width: 100%;
+}
+.help-btn {
+    background-color: #eee;
+    background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#fcfcfc),color-stop(100%,#eee));
+    background-image: -webkit-linear-gradient(top,#fcfcfc 0,#eee 100%);
+    background-image: -moz-linear-gradient(top,#fcfcfc 0,#eee 100%);
+    background-image: -ms-linear-gradient(top,#fcfcfc 0,#eee 100%);
+    background-image: -o-linear-gradient(top,#fcfcfc 0,#eee 100%);
+    background-image: linear-gradient(to bottom,#fcfcfc 0,#eee 100%);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fcfcfc', endColorstr='#eeeeee', GradientType=0);
+    background-repeat: no-repeat;
+    border: 1px solid #d5d5d5;
+    padding: 2px 5px 2px 4px;
+    color: #333;
+    text-decoration: none;
+    text-shadow: 0 1px 0 #fff;
+    white-space: nowrap;
+    cursor: pointer;
+    border-radius: 3px;
+    font-weight: bold;
+    font-size: 12px;
+}
+.github-btn, .help-btn {
+    vertical-align: bottom;
 }
 }

+ 50 - 48
docs/data/extensions.json

@@ -1,51 +1,53 @@
 [
 [
-  {
-    "name": "Table Editable",
-    "version": "1.1.0",
-    "description": "Use the x-editable to editable your table.",
-    "url": "https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/editable",
-    "example": "http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/editable.html",
-
-    "plugins": [{
-      "name": "x-editable",
-      "url": "https://github.com/vitalets/x-editable"
-    }],
-
-    "author": {
-      "name": "wenzhixin",
-      "image": "https://avatars1.githubusercontent.com/u/2117018"
+    {
+        "name": "Table Editable",
+        "version": "1.1.0",
+        "description": "Use the x-editable to in-place editing your table.",
+        "url": "https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/editable",
+        "example": "http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/editable.html",
+        "plugins": [
+            {
+                "name": "x-editable",
+                "url": "https://github.com/vitalets/x-editable"
+            }
+        ],
+        "author": {
+            "name": "wenzhixin",
+            "image": "https://avatars1.githubusercontent.com/u/2117018"
+        }
+    },
+    {
+        "name": "Table Export",
+        "version": "1.1.0",
+        "description": "Export your table data to JSON, XML, CSV, TXT, SQL, Word, Excel, PNG, PDF.",
+        "url": "https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/export",
+        "example": "http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/export.html",
+        "plugins": [
+            {
+                "name": "tableExport.jquery.plugin",
+                "url": "https://github.com/hhurz/tableExport.jquery.plugin"
+            }
+        ],
+        "author": {
+            "name": "wenzhixin",
+            "image": "https://avatars1.githubusercontent.com/u/2117018"
+        }
+    },
+    {
+        "name": "Flat JSON",
+        "version": "1.3.0",
+        "description": "Plugin to flat the JSON object.",
+        "url": "https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/flat-json",
+        "example": "http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/flat-json.html",
+        "plugins": [
+            {
+                "name": "bootstrap-table-flat-json",
+                "url": "https://github.com/djhvscf/bootstrap-table-flat-json"
+            }
+        ],
+        "author": {
+            "name": "djhvscf",
+            "image": "https://avatars1.githubusercontent.com/u/4496763"
+        }
     }
     }
-  }, {
-    "name": "Table Export",
-    "version": "1.1.0",
-    "description": "Export your table data to JSON, XML, CSV, TXT, SQL, Word, Excel, PNG, PDF.",
-    "url": "https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/export",
-    "example": "http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/export.html",
-
-    "plugins": [{
-      "name": "tableExport.jquery.plugin",
-      "url": "https://github.com/hhurz/tableExport.jquery.plugin"
-    }],
-
-    "author": {
-      "name": "wenzhixin",
-      "image": "https://avatars1.githubusercontent.com/u/2117018"
-    }
-  }, {
-    "name": "Flat JSON",
-    "version": "1.3.0",
-    "description": "Plugin to flat the JSON object.",
-    "url": "https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/flat-json",
-    "example": "http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/flat-json.html",
-
-    "plugins": [{
-      "name": "bootstrap-table-flat-json",
-      "url": "https://github.com/djhvscf/bootstrap-table-flat-json"
-    }],
-
-    "author": {
-      "name": "djhvscf",
-      "image": "https://avatars1.githubusercontent.com/u/4496763"
-    }
-  }
 ]
 ]

+ 3 - 3
src/extensions/filter-control/bootstrap-table-filter-control.js

@@ -134,7 +134,7 @@
                         break;
                         break;
                     case 'select':
                     case 'select':
                         html.push(sprintf('<select class="%s form-control" style="width: 100%; visibility: %s"></select>',
                         html.push(sprintf('<select class="%s form-control" style="width: 100%; visibility: %s"></select>',
-                            column.field, isVisible))
+                            column.field, isVisible));
                         break;
                         break;
                     case 'datepicker':
                     case 'datepicker':
                         html.push(sprintf('<input type="text" class="date-filter-control %s form-control" style="width: 100%; visibility: %s">',
                         html.push(sprintf('<input type="text" class="date-filter-control %s form-control" style="width: 100%; visibility: %s">',
@@ -258,7 +258,7 @@
         _initSearch = BootstrapTable.prototype.initSearch;
         _initSearch = BootstrapTable.prototype.initSearch;
 
 
     BootstrapTable.prototype.init = function () {
     BootstrapTable.prototype.init = function () {
-        //Make sure that the filtercontrol option is set
+        //Make sure that the filterControl option is set
         if (this.options.filterControl) {
         if (this.options.filterControl) {
             var that = this;
             var that = this;
             //Make sure that the internal variables are set correctly
             //Make sure that the internal variables are set correctly
@@ -282,7 +282,7 @@
                 if (that.options.height) {
                 if (that.options.height) {
                     fixHeaderCSS(that);
                     fixHeaderCSS(that);
                 }
                 }
-            }).on('column-switch.bs.table', function(field, checked) {
+            }).on('column-switch.bs.table', function() {
                 setValues(that);
                 setValues(that);
             });
             });
         }
         }