mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 17:58:41 +00:00
Add mouse click for row
This commit is contained in:
parent
eaa9173df4
commit
970bc410b8
|
|
@ -43,7 +43,7 @@
|
|||
this.bindElement(e);
|
||||
}
|
||||
} else {
|
||||
const tables = document.querySelectorAll('.tables'),
|
||||
const tables = document.getElementsByTagName('table'),
|
||||
length = !tables ? 0 : tables.length;
|
||||
|
||||
for (var i = 0; i < length; i++) {
|
||||
|
|
@ -64,5 +64,14 @@
|
|||
*/
|
||||
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 || {}));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user