isobit-ui 0.0.254 → 0.0.258
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +26 -62
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* isobit-ui v0.0.
|
|
2
|
+
* isobit-ui v0.0.258
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1514,76 +1514,40 @@ var script$d = {
|
|
|
1514
1514
|
var th = originalHeader.childNodes[0].querySelectorAll("th");
|
|
1515
1515
|
me.columns.forEach(function (e) {
|
|
1516
1516
|
if (e.filter) {
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
input[i].addEventListener("keyup", listener);
|
|
1521
|
-
}
|
|
1517
|
+
e.filter.elm.querySelectorAll('input').forEach(function (e) {
|
|
1518
|
+
return e.addEventListener("keyup", listener);
|
|
1519
|
+
});
|
|
1522
1520
|
}
|
|
1523
1521
|
});
|
|
1524
|
-
var filters = me.$el.querySelector(".filters");
|
|
1525
|
-
filters.querySelectorAll('input');
|
|
1526
|
-
/*for (var i = 0; i < filters.children.length; i++) {
|
|
1527
|
-
var td = filters.children[i];
|
|
1528
|
-
var m = {};
|
|
1529
|
-
for (var att, k = 0, atts = td.attributes, n = atts.length; k < n; k++) {
|
|
1530
|
-
att = atts[k];
|
|
1531
|
-
m[att.nodeName] = (att.nodeValue);
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
td.style.marginTop = '5px';
|
|
1535
|
-
td.onchange=()=>{
|
|
1536
|
-
me.load();
|
|
1537
|
-
};
|
|
1538
|
-
filtersMap[m.index] = td;
|
|
1539
|
-
}*/
|
|
1540
|
-
//se crea la nueva tabla header a clonar
|
|
1541
|
-
|
|
1542
1522
|
var ht = new _.HTML2Canvas({
|
|
1543
1523
|
lineHeight: parseInt(cs.lineHeight),
|
|
1544
1524
|
ctx: ctx
|
|
1545
|
-
})
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
cltd.setAttribute("ind", '' + (i - (me.selectable0
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
cltd.appendChild(th[i].childNodes[0]);
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
if (filter && filter.elm) {
|
|
1559
|
-
filter.elm.children.forEach(function (e) {
|
|
1560
|
-
return cltd.appendChild(e);
|
|
1525
|
+
}),
|
|
1526
|
+
i,
|
|
1527
|
+
tw = 0;
|
|
1528
|
+
th.forEach(function (e, i) {
|
|
1529
|
+
e.childNodes[0].onclick = sortClick;
|
|
1530
|
+
var f = me.columns[i - (me.selectable0 ? 1 : 0)]; //cltd.setAttribute("ind", '' + (i - (me.selectable0?1:0)));
|
|
1531
|
+
|
|
1532
|
+
if (f && f.filter && f.filter.elm) {
|
|
1533
|
+
f.filter.elm.children.forEach(function (ef) {
|
|
1534
|
+
return e.appendChild(ef);
|
|
1561
1535
|
});
|
|
1562
1536
|
}
|
|
1563
1537
|
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
for (i = 1; i < th.length; i++) {
|
|
1574
|
-
tw += parseInt(th[i].width);
|
|
1575
|
-
var hh = th[i].childNodes[0].offsetHeight;
|
|
1576
|
-
hh = ht.heightText(th[i].childNodes[0].textContent, parseInt(th[i].width));
|
|
1577
|
-
th[i].childNodes[0].style.width = th[i].width + 'px';
|
|
1578
|
-
th[i].childNodes[0].style.display = 'table-cell';
|
|
1579
|
-
th[i].childNodes[0].style.verticalAlign = 'middle';
|
|
1538
|
+
if (e.clientHeight > maxLabelHeight) maxLabelHeight = e.clientHeight;
|
|
1539
|
+
tw += parseInt(e.width);
|
|
1540
|
+
var hh = e.childNodes[0].offsetHeight;
|
|
1541
|
+
hh = ht.heightText(e.childNodes[0].textContent, parseInt(e.width));
|
|
1542
|
+
e.childNodes[0].style.width = e.width + 'px';
|
|
1543
|
+
e.childNodes[0].style.display = 'table-cell';
|
|
1544
|
+
e.childNodes[0].style.verticalAlign = 'middle';
|
|
1580
1545
|
if (hh > maxLabelHeight) maxLabelHeight = hh;
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
th
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1546
|
+
});
|
|
1547
|
+
th.forEach(function (e, i) {
|
|
1548
|
+
if (i) e.childNodes[0].style.height = maxLabelHeight + 'px';
|
|
1549
|
+
clonedHeader.appendChild(th);
|
|
1550
|
+
});
|
|
1587
1551
|
t[0].style.width = tw + 'px';
|
|
1588
1552
|
t[0].width = tw; //console.log(t);
|
|
1589
1553
|
|