|
|
@@ -15,10 +15,31 @@
|
|
|
autoRefreshStatus: true,
|
|
|
autoRefreshFunction: null
|
|
|
});
|
|
|
+
|
|
|
+ var bootstrapVersion = 3;
|
|
|
+ try {
|
|
|
+ var rawVersion = $.fn.dropdown.Constructor.VERSION;
|
|
|
|
|
|
- $.extend($.fn.bootstrapTable.defaults.icons, {
|
|
|
- autoRefresh: 'glyphicon-time icon-time'
|
|
|
- });
|
|
|
+ // Only try to parse VERSION if is is defined.
|
|
|
+ // It is undefined in older versions of Bootstrap (tested with 3.1.1).
|
|
|
+ if (rawVersion !== undefined) {
|
|
|
+ bootstrapVersion = parseInt(rawVersion, 10);
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ // ignore
|
|
|
+ }
|
|
|
+
|
|
|
+ switch(bootstrapVersion){
|
|
|
+ case 4:
|
|
|
+ $.extend($.fn.bootstrapTable.defaults.icons, {
|
|
|
+ autoRefresh: 'fa-clock'
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ $.extend($.fn.bootstrapTable.defaults.icons, {
|
|
|
+ autoRefresh: 'glyphicon-time icon-time'
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
$.extend($.fn.bootstrapTable.locales, {
|
|
|
formatAutoRefresh: function() {
|