[Koha-bugs] [Bug 25639] Add search queries to HTML so queries can be retrieved via JS

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 31 03:43:31 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25639

--- Comment #13 from David Cook <dcook at prosentient.com.au> ---
(In reply to Nick Clemens from comment #12)
> bug 23648 and bug 20921 - it was borrower data, not branch info
> 

Thanks for those references! That's helpful!

I'd actually argue that those two aren't great uses of data-* attributes either
heh.

I like the examples used here though:
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*

In that first example, it stores an ID for each list item. You could take that
data and do an API lookup. 

In the second example, you could store state information in the data-*
attributes.

In these Koha cases, it seems like we're putting data into HTML elements, which
doesn't have anything to do with the HTML elements. I suppose you could argue
that data-borrowernumber could be used to determine whether or not a user was
logged in... but there's only 1 user so that would be trivial to store in the
Javascript space. I could understand storing data-borrowernumber if you had a
list of borrowers in a table for instance...

Anyway, thanks for indulging me 😅

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list