contao / core

Contao 3 → see contao/contao for Contao 4
GNU Lesser General Public License v3.0
492 stars 213 forks source link

"Show the context menu" JavaScript function #4459

Closed xchs closed 11 years ago

xchs commented 12 years ago

contao-uncompressed.js:L1717: are the element attributes el.title and el2.title somehow populated with a value?

leofeyer commented 12 years ago

What exactly do you mean?

xchs commented 12 years ago

While testing yesterday I came across the issue that the title attributes in the anchor elements are actually empty. Just open the back end module "Articles" and right-click on an arbitrary edit icon (pencil icon) to show-up the context menu. All the links there have a title attribute, however, without any attribute value.

Perhaps it has something to do with the new MooTools tooltips introduced in Contao 3 (since it actually worked until Contao 2.11.x).

Anyway, if it is pretty much time-consuming or complicated to accomplish this issue, just leave it as it is. No one will blame, I suppose.

leofeyer commented 12 years ago

Did you check this in the source code or with Firebug? The MooTools script removes the original title attributes so they are not shown by the browser and adds a data attribute instead. Therefore, if you inspect elements using Firebug, it seems like an empty title attribute, however, it is not.

xchs commented 12 years ago

I checked this with the Firefox function "View Selection Source" (a Firefox context menu function).

leofeyer commented 12 years ago

Ok, so please cross-check in the page source and then close the ticket :)

xchs commented 12 years ago

Dass die title Attribute in der "normalen" Quelltextansicht vorhanden sind und allesamt einen Wert haben, ist schon klar. Der Tooltip mit dem title-Attribut wird ja richtigerweise auch angezeigt, wenn beispielsweise im Browser JavaScript deaktiviert ist:

Kontext-Menü - ohne JS

Hier geht es allerdings um die Frage, wieso die beiden Links im diesem Kontextmenü

Kontext-Menü

nun keine Tooltips mehr anzeigen. Ich würde meinen, der Grund liegt eben darin, dass bei aktiviertem JavaScript und seit Version 3.0 das title-Attribut nicht mehr richtig befüllt wird. Dass es vorher (z.B. unter 2.11) noch anders war, kann leicht überprüft werden bzw. zeigt auch dieses Bild:

Kontext-Menü Contao 2.11

Nun gut, wie schon gesagt, das soll jetzt nicht unser größtes Problem sein, deshalb folge ich auch Deiner Empfehlung und schließe das Ticket.

leofeyer commented 12 years ago

Ach so, dann meinte ich etwas anderes. Die Empfehlung bezüglich Schließen bezog sich auf die Annahme, dass Du falsch lagst. Aber ich lag falsch :)

psi-4ward commented 12 years ago

Zum Thema Kontextmenü beim Edit-Button - ich finde die Usability extrem schlecht! Selbst erfahrene Contao Anwender kennen diese Feature nicht und ich hatte schon ein Ticket mit "Head-Einstellungen können nicht bearbeitet werden". Es ist die einzige Stelle an der ein Kontextmenü verwendet wird - das schnallt fast niemand. Wir sollten uns hier eine Alternative überlegen.

leofeyer commented 12 years ago

Bin für alternative Vorschläge offen.

psi-4ward commented 12 years ago

Gut, ich hab da eine konkrete Idee. Ich bastel nächste Woche nen mal nen POC

xchs commented 12 years ago

Apparently, the back end context menu function does no longer work in the Internet Explorer 8 web browser.

Who would have thought it? W00t! :unamused:

Console JS error message:

Meldung: Das Objekt unterstützt diese Eigenschaft oder Methode nicht.
Zeile: 18
Zeichen: 722
Code: 0
URI: http://st2.develop.contao.local/assets/js/1054262fe604.js

[Contao 3.0.RC1 Commit: f796f96b7d01b54a48efe624abc8c4446733711c]

leofeyer commented 12 years ago

I just tried it (VirtualBox, Windows 7, IE9 in IE8 mode) and it worked like a charm. Which function causes the error on your system?

xchs commented 12 years ago

Just hover (one or two times and wait some second) over an icon in the back end and you'll get:

Meldung: Das Objekt unterstützt diese Eigenschaft oder Methode nicht.
Zeile: 4
Zeichen: 87720
Code: 0
URI: http://st2.develop.contao.local/assets/js/1054262fe604.js

Meldung: Das Objekt unterstützt diese Eigenschaft oder Methode nicht.
Zeile: 18
Zeichen: 722
Code: 0
URI: http://st2.develop.contao.local/assets/js/1054262fe604.js

As far as I can see, the first entry refers to mootools-more-uncompressed.js#L6707

The second one refers to Mootao-uncompressed.js#L105

Looks like an issue with the MooTools Tips.

leofeyer commented 12 years ago

Can you check whether 13fc08a7c3f915f283d3a0767134274829c07be8 fixes this issue as well?

xchs commented 12 years ago

Very good! Seems to be working now with the MooTools Tips (regarding the mentioned JavaScript errors above).


However, I just checked the context menu functionality again, and there I still encounter the same issue as mentioned above: the two context menu links do not work.

Nonetheless, perhaps @psi-4ward found meanwhile another (maybe better) solution for this feature (as he announced two months ago)

leofeyer commented 11 years ago

@psi-4ward What is the status of your POC?

leofeyer commented 11 years ago

I have removed the context menu entirely in a974334b094fda684d85bde7a4c1d21551735efe. Besides being buggy in IE, @psi-4ward pointed out to me yesterday that touch-based devices like the iPad do not support right-clicks and thus the context menu is not usable there at all.

We might come up with a better context menu in the future, but for now, I am going to close this ticket.

xchs commented 11 years ago

//Huh, no email notification today #fail

pmmueller commented 11 years ago

Uff. That means a new icon almost everywhere in the backend. And potentially a lot of new last minute screenshots...

leofeyer commented 11 years ago

Sorry for that, Peter. I had to fix this somehow, though :(

backbone87 commented 11 years ago

How about a generel "more" menu, triggered by left click/hover?

pmmueller commented 11 years ago

@leo Don't feel sorry, it's a great fix!

I have already fixed the screenshots. There were A LOT LESS than I feared. Even the text has been been updated to remove references to the context menu.

Plus I really LIKE the new icon. Saves a lot of clicks, and I always forgot to click with the right mouse button ;-)