Support

Akeeba Ticket System

#21028 status selector changes all labels

Posted in ‘Akeeba Ticket System for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Ticket System version
n/a

Latest post by jasperd on Wednesday, 24 September 2014 06:54 CDT

jasperd
Hi Nicholas,

I’ve been working on a redesign of my site and am currently integrating Akeeba Ticket System as support solution. While creating a template override for the tickets view (specifically, the “default_ticket.php” file and the corresponding JavaScript file), I came across an issue (tested on both J2.5.22 and J3.3.3 with ATS 1.5.4).

On changing the status (for instance from “Open” to “Pending”), the JavaScript function for the selector will:
1. looking up the parent td element
2. within this “td” element it searches for all elements with a “label-*” class and changes them.

This not only changes the label of the status, but also changes the labels used in the assign drop down menu. (The logo's are changed into the status... see attached image.)

Furthermore, people (like me) creating template overrides might use labels instead of badges in their design.. which will not work as those will be changed as well upon changing the status.

As solution I'd suggest to add a separate and specific class to the element that requires to be changed (for instance ”atsStatus”) and look that up instead of looking up a generic class like “label” as it is less error prone.

P.S. more a feature request on this matter. The html for both the selectors is currently hard-coded in the helper files. It would be nice to have it in a file that can be overridden, for instance a JLayout file. That would allow me to style the corresponding elements easier. (I can manage otherwise as well but it would require defining quite some additional styles that are already available by default under different names in the template's bootstrap file).

Thanks in advance for your time and answer.

Kind regards,


Jasper

nicholas
Akeeba Staff
Manager
If you are using a custom override you are advised to override the Javascript as well. The problem with Javascript (all Javascript, not just ours) is that it is dependent on the DOM. The DOM is dependent on the HTML elements. When you do a template override you change the DOM, therefore the Javascript will no longer work as it was intended.

There is a way to override the Javascript without it being overwitten. It's pretty much the same way as customising the CSS, JS and HTML of Akeeba Susbcriptions, just replacing com_akeebasubs with com_ats.

Regarding JLayout, it's only available in Joomla! 3.2+. It doesn't work on Joomla! 2.5, 3.0 and 3.1, all of them platforms on which our software runs. In fact, Joomla! 2.5 is a supported platform. Another problem with JLayout is that even though its API changes over time the directory, file names and class names remain the same. This means that we'd need to produce, test and distribute a different package for each Joomla! 3 version. If you also count Joomla! 2.5 and the Core and Pro version it means that for each version we'd need to develop, test and produce 8 packages. Considering that ATS draws an income of 80 Euros per month (before taxes, mind you...) I don't think we'll ever bother.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

jasperd
Hi Nicholas,

Thanks for your elaborate reply. Considering what you wrote, I can imagine that you limit the on my suggestions on ATS.

By the way, the issue I reported about the labels changing in the "assign" drop down when changing the status, occurred as well when I removed the template override. (On the J2.5 site I did not have a template override and it occurred there as well).

Anyway, I'll fix the issue on my site by overriding the JS.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!