corrade-nucleus-nucleons

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 19  →  ?path2? @ 20
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/src/extensions/i18n-enhance/README.md
@@ -0,0 +1,28 @@
# Table i18n Enhance
 
Use Plugin: [bootstrap-table-i18n-enhance](https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/select2-filter)
 
## Usage
 
```html
<script src="extensions/select2-filter/bootstrap-table-i18n-enhance.js"></script>
```
 
## Methods
 
### changeLocale
 
* Change table locale.
* Parameters
* String : localeId
* Example: <code> $table.bootstrapTable("changeLocale", "zh_TW");</code>
 
### changeTitle
 
* Change column's title.
* Parameters
* Object : object's key is column field , value is new title.
* Example: <code> $table.bootstrapTable("changeTitle", {
columnA.field: "New column A title.",
columnB.field: "New column B title."
});</code>
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/src/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js
@@ -0,0 +1,34 @@
/**
* @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);
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/src/extensions/i18n-enhance/extension.json
@@ -0,0 +1,17 @@
{
"name": "i18n Enhance",
"version": "1.0.0",
"description": "Plugin to add i18n API in order to change column's title and table locale.",
"url": "https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/i18n-enhance",
"example": "http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/i18n-enhance.html",
 
"plugins": [{
"name": "bootstrap-table-i18n-enhance",
"url": "https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/i18n-enhance"
}],
 
"author": {
"name": "Jewway",
"image": "https://avatars0.githubusercontent.com/u/3501899"
}
}