浏览代码

Merge pull request #1495 from thornomad/issue-1248

Fixes #1248 - IE8 does not support indexOf()
文翼 10 年之前
父节点
当前提交
9c9514467b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/bootstrap-table.js

+ 1 - 1
src/bootstrap-table.js

@@ -1151,7 +1151,7 @@
                 var pageLst = typeof this.options.pageList === 'string' ?
                 var pageLst = typeof this.options.pageList === 'string' ?
                     this.options.pageList.replace('[', '').replace(']', '')
                     this.options.pageList.replace('[', '').replace(']', '')
                         .replace(/ /g, '').toLowerCase().split(',') : this.options.pageList;
                         .replace(/ /g, '').toLowerCase().split(',') : this.options.pageList;
-                if (pageLst.indexOf(this.options.formatAllRows().toLowerCase()) > -1) {
+                if ($.inArray(this.options.formatAllRows().toLowerCase(), pageLst)  > -1) {
                     $allSelected = true;
                     $allSelected = true;
                 }
                 }
             }
             }