mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Some convenience functions
This commit is contained in:
parent
e3605001e4
commit
1360b1592d
@ -1,6 +1,29 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
|
|
||||||
|
function tdWrap(html, options={}) {
|
||||||
|
/* Wraps provided html in <td>..</td> elements
|
||||||
|
*/
|
||||||
|
|
||||||
|
var colspan = '';
|
||||||
|
|
||||||
|
if (options.colspan) {
|
||||||
|
colspan = ` colspan=${options.colspan}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return `<td${colspan}>${html}</td>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function trWrap(html) {
|
||||||
|
/* Wraps provided html in <tr>..</tr> elements
|
||||||
|
*/
|
||||||
|
|
||||||
|
return `<tr>${html}</tr>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function reloadtable(table) {
|
function reloadtable(table) {
|
||||||
$(table).bootstrapTable('refresh');
|
$(table).bootstrapTable('refresh');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user