Browse Source

Update card view.

zhixin 11 years ago
parent
commit
d75cb196e2
2 changed files with 4 additions and 2 deletions
  1. 2 0
      src/bootstrap-table.css
  2. 2 2
      src/bootstrap-table.js

+ 2 - 0
src/bootstrap-table.css

@@ -138,6 +138,8 @@
 
 
 .fixed-table-body .card-view .title {
 .fixed-table-body .card-view .title {
     font-weight: bold;
     font-weight: bold;
+    display: inline-block;
+    min-width: 30%;
 }
 }
 
 
 /* support bootstrap 2 */
 /* support bootstrap 2 */

+ 2 - 2
src/bootstrap-table.js

@@ -576,9 +576,9 @@
 
 
                     text = that.options.cardView ?
                     text = that.options.cardView ?
                         ['<div class="card-view">',
                         ['<div class="card-view">',
-                            sprintf('<div class="title" %s>%s</div>', style,
+                            sprintf('<span class="title" %s>%s</span>', style,
                                 getPropertyFromOther(that.options.columns, 'field', 'title', field)),
                                 getPropertyFromOther(that.options.columns, 'field', 'title', field)),
-                            sprintf('<div class="value">%s</div>', value),
+                            sprintf('<span class="value">%s</span>', value),
                             '</div>'].join('') :
                             '</div>'].join('') :
                         [sprintf('<td %s>', style),
                         [sprintf('<td %s>', style),
                             value,
                             value,