Browse Source

Merge pull request #571 from djhvscf/master

Update readme of locale files and added comments to css file
文翼 10 years ago
parent
commit
50a585eb63

+ 6 - 0
src/bootstrap-table.css

@@ -1,3 +1,9 @@
+/**
+ * @author zhixin wen <wenzhixin2010@gmail.com>
+ * version: 1.6.0
+ * https://github.com/wenzhixin/bootstrap-table/
+ */
+ 
 .bootstrap-table .table {
     margin-bottom: 0 !important;
     border-bottom: 1px solid #dddddd;

+ 5 - 5
src/bootstrap-table.js

@@ -604,14 +604,14 @@
         }
 
         if (this.options.showRefresh) {
-            html.push(sprintf('<button class="btn btn-default' + (this.options.iconSize == undefined ? '' :  ' btn-' + this.options.iconSize) + '" type="button" name="refresh" title="%s">',
+            html.push(sprintf('<button class="btn btn-default' + (this.options.iconSize === undefined ? '' :  ' btn-' + this.options.iconSize) + '" type="button" name="refresh" title="%s">',
                 this.options.formatRefresh()),
                 sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.refresh),
                 '</button>');
         }
 
         if (this.options.showToggle) {
-            html.push(sprintf('<button class="btn btn-default' + (this.options.iconSize == undefined ? '' :  ' btn-' + this.options.iconSize) + '" type="button" name="toggle" title="%s">',
+            html.push(sprintf('<button class="btn btn-default' + (this.options.iconSize === undefined ? '' :  ' btn-' + this.options.iconSize) + '" type="button" name="toggle" title="%s">',
                 this.options.formatToggle()),
                 sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.toggle),
                 '</button>');
@@ -691,7 +691,7 @@
             html = [];
             html.push(
                 '<div class="pull-' + this.options.searchAlign + ' search">',
-                    sprintf('<input class="form-control' + (this.options.iconSize == undefined ? '' :  ' input-' + this.options.iconSize)  + '" type="text" placeholder="%s">',
+                    sprintf('<input class="form-control' + (this.options.iconSize === undefined ? '' :  ' input-' + this.options.iconSize)  + '" type="text" placeholder="%s">',
                         this.options.formatSearch()),
                 '</div>');
 
@@ -813,7 +813,7 @@
 
         var pageNumber = [
             '<span class="btn-group dropup">',
-            '<button type="button" class="btn btn-default '+ (this.options.iconSize == undefined ? '' :  ' btn-' + this.options.iconSize)+ ' dropdown-toggle" data-toggle="dropdown">',
+            '<button type="button" class="btn btn-default '+ (this.options.iconSize === undefined ? '' :  ' btn-' + this.options.iconSize)+ ' dropdown-toggle" data-toggle="dropdown">',
             '<span class="page-size">',
             this.options.pageSize,
             '</span>',
@@ -844,7 +844,7 @@
 
         html.push('</div>',
             '<div class="pull-right pagination">',
-                '<ul class="pagination' + (this.options.iconSize == undefined ? '' :  ' pagination-' + this.options.iconSize)  + '">',
+                '<ul class="pagination' + (this.options.iconSize === undefined ? '' :  ' pagination-' + this.options.iconSize)  + '">',
                     '<li class="page-first"><a href="javascript:void(0)">&lt;&lt;</a></li>',
                     '<li class="page-pre"><a href="javascript:void(0)">&lt;</a></li>');
 

+ 6 - 1
src/extensions/flatJSON/bootstrap-table-flatJSON.js

@@ -87,7 +87,12 @@
         },
 
         flatHelper: function (data) {
-            var flatArray = [];
+            var flatArray = [],
+				arrayHelper = [];
+			if (!$.isArray(data)) {
+				arrayHelper.push(data);
+				data = arrayHelper;
+			}
             $.each(data, function (i, element) {
                 flatArray.push(sd.flat(element));
             });

+ 1 - 9
src/locale/README.md

@@ -63,7 +63,6 @@ es-EC
 es-ES
 es-GT
 es-HN
-es-MX
 es-PA
 es-PE
 es-PR
@@ -102,7 +101,6 @@ is-IS
 it-CH
 iu-Cans-CA
 iu-Latn-CA
-ja-JP
 ka-GE
 kk-KZ
 kl-GL
@@ -122,9 +120,7 @@ mn-Mong-CN
 moh-CA
 mr-IN
 ms-BN
-ms-MY
 mt-MT
-nb-NO
 ne-NP
 nl-BE
 nn-NO
@@ -134,7 +130,6 @@ or-IN
 pa-IN
 prs-AF
 ps-AF
-pt-PT
 qut-GT
 quz-BO
 quz-EC
@@ -148,7 +143,6 @@ se-FI
 se-NO
 se-SE
 si-LK
-sk-SK
 sl-SI
 sma-NO
 sma-SE
@@ -166,7 +160,6 @@ sr-Latn-CS
 sr-Latn-ME
 sr-Latn-RS
 sv-FI
-sv-SE
 sw-KE
 syr-SY
 ta-IN
@@ -177,7 +170,6 @@ tn-ZA
 tt-RU
 tzm-Latn-DZ
 ug-CN
-uk-UA
 uz-Cyrl-UZ
 uz-Latn-UZ
 wo-SN
@@ -187,4 +179,4 @@ zh-HK
 zh-MO
 zh-SG
 zu-ZA
-```
+```