Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field identifier #29504

Open
zephyriony opened this issue Apr 26, 2024 · 0 comments
Open

Field identifier #29504

zephyriony opened this issue Apr 26, 2024 · 0 comments
Labels
Feature request This is a feature request

Comments

@zephyriony
Copy link
Contributor

Feature Request

Please, folks, think of the developers who are redesigning Dolibarr using Javascript to meet a specific need. Currently, Dolibarr's biggest drawback is that there are very few, if any, id attributes except on inputs.
Maybe I'll do a pull request, but I think it's really important for tables, for example.
At the moment I'm getting by with Jquery by telling it to select the first child, or the td that contains such and such a word. It's not clean, the structure can change with each update and I don't like that.
I'd like each block or even the main ones to be uniquely identified by the id attribute.

Use case

I encountered this problem when I tried to create a Javascript code on the "Subject" line of the Ticket, but no luck:
<tr><td class="nowrap">Sujet</td><td class="right"><a class="editfielda reposition" href="/ticket/card.php?action=editsubject&amp;token=11233888ce88c278d00b3c044708e3b6&amp;id=1808"><span class="fas fa-pencil-alt" style=" color: #444; float: right" title="Éditer"></span></a></td></tr>
No unique identifier, could possibly be based on href but again, not clean.

Suggested implementation

<tr id="subjectParent"><td class="nowrap" id="subjectTitle">Sujet</td><td class="right" id="subjectField"><a class="editfielda reposition" href="/ticket/card.php?action=editsubject&amp;token=11233888ce88c278d00b3c044708e3b6&amp;id=1808"><span class="fas fa-pencil-alt" style=" color: #444; float: right" title="Éditer"></span></a></td></tr>

Suggested steps

No response

@zephyriony zephyriony added the Feature request This is a feature request label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request This is a feature request
Projects
None yet
Development

No branches or pull requests

1 participant