Sha256: e1dd47a1e43f07c93c1710b94f2bfc3f8ccef70be57f34e8dcc409423bbeeae2

Contents?: true

Size: 759 Bytes

Versions: 2

Compression:

Stored size: 759 Bytes

Contents

/**
 * @author: Jewway
 * @version: v1.0.0
 */

!function ($) {
  'use strict';

  var BootstrapTable = $.fn.bootstrapTable.Constructor;

  BootstrapTable.prototype.changeTitle = function (locale) {
    $.each(this.options.columns, function (idx, columnList) {
      $.each(columnList, function (idx, column) {
        if (column.field) {
          column.title = locale[column.field];
        }
      });
    });

    this.initHeader();
    this.initBody();
    this.initToolbar();
  };

  BootstrapTable.prototype.changeLocale = function (localeId) {
    this.options.locale = localeId;
    this.initLocale();
    this.initPagination();
  };

  $.fn.bootstrapTable.methods.push('changeTitle');
  $.fn.bootstrapTable.methods.push('changeLocale');

}(jQuery);

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bootstrap-table-rails-1.11.1.1 vendor/assets/javascripts/extensions/bootstrap-table-i18n-enhance.js
bootstrap-table-rails-1.11.0 vendor/assets/javascripts/extensions/bootstrap-table-i18n-enhance.js