浏览代码

Added the correct operators in some "ternaries" IF

Dennis Hernández 10 年之前
父节点
当前提交
41bc3c3bd5
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      src/bootstrap-table.js

+ 5 - 5
src/bootstrap-table.js

@@ -604,14 +604,14 @@
         }
         }
 
 
         if (this.options.showRefresh) {
         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()),
                 this.options.formatRefresh()),
                 sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.refresh),
                 sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.refresh),
                 '</button>');
                 '</button>');
         }
         }
 
 
         if (this.options.showToggle) {
         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()),
                 this.options.formatToggle()),
                 sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.toggle),
                 sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.toggle),
                 '</button>');
                 '</button>');
@@ -691,7 +691,7 @@
             html = [];
             html = [];
             html.push(
             html.push(
                 '<div class="pull-' + this.options.searchAlign + ' search">',
                 '<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()),
                         this.options.formatSearch()),
                 '</div>');
                 '</div>');
 
 
@@ -813,7 +813,7 @@
 
 
         var pageNumber = [
         var pageNumber = [
             '<span class="btn-group dropup">',
             '<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">',
             '<span class="page-size">',
             this.options.pageSize,
             this.options.pageSize,
             '</span>',
             '</span>',
@@ -844,7 +844,7 @@
 
 
         html.push('</div>',
         html.push('</div>',
             '<div class="pull-right pagination">',
             '<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-first"><a href="javascript:void(0)">&lt;&lt;</a></li>',
                     '<li class="page-pre"><a href="javascript:void(0)">&lt;</a></li>');
                     '<li class="page-pre"><a href="javascript:void(0)">&lt;</a></li>');