mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-15 08:48:42 +00:00
Add mouse click for row
This commit is contained in:
parent
eaa9173df4
commit
970bc410b8
|
|
@ -43,7 +43,7 @@
|
||||||
this.bindElement(e);
|
this.bindElement(e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const tables = document.querySelectorAll('.tables'),
|
const tables = document.getElementsByTagName('table'),
|
||||||
length = !tables ? 0 : tables.length;
|
length = !tables ? 0 : tables.length;
|
||||||
|
|
||||||
for (var i = 0; i < length; i++) {
|
for (var i = 0; i < length; i++) {
|
||||||
|
|
@ -64,5 +64,14 @@
|
||||||
*/
|
*/
|
||||||
jsOMS.UI.TableManager.prototype.bindElement = function (e)
|
jsOMS.UI.TableManager.prototype.bindElement = function (e)
|
||||||
{
|
{
|
||||||
|
const rows = e.querySelectorAll('[data-href]'),
|
||||||
|
length = rows.length;
|
||||||
|
|
||||||
|
for(let i = 0; i < length; i++) {
|
||||||
|
rows[i].addEventListener('click', function(event) {
|
||||||
|
jsOMS.preventAll(event);
|
||||||
|
window.location = jsOMS.Uri.UriFactory.build(this.getAttribute('data-href'));
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}(window.jsOMS = window.jsOMS || {}));
|
}(window.jsOMS = window.jsOMS || {}));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user