Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

"Show the context menu" JavaScript function #4459

Closed
xchs opened this issue Jun 15, 2012 · 22 comments
Closed

"Show the context menu" JavaScript function #4459

xchs opened this issue Jun 15, 2012 · 22 comments

Comments

@xchs
Copy link
Contributor

xchs commented Jun 15, 2012

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

@leofeyer
Copy link
Member

What exactly do you mean?

@xchs
Copy link
Contributor Author

xchs commented Jun 16, 2012

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
Copy link
Member

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
Copy link
Contributor Author

xchs commented Jun 18, 2012

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

@leofeyer
Copy link
Member

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

@xchs
Copy link
Contributor Author

xchs commented Jun 18, 2012

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.

@xchs xchs closed this as completed Jun 18, 2012
@leofeyer leofeyer reopened this Jun 18, 2012
@leofeyer
Copy link
Member

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
Copy link
Contributor

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
Copy link
Member

Bin für alternative Vorschläge offen.

@psi-4ward
Copy link
Contributor

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

@xchs
Copy link
Contributor Author

xchs commented Aug 11, 2012

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

Who would have thought it? W00t! 😒

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: f796f96]

@leofeyer
Copy link
Member

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
Copy link
Contributor Author

xchs commented Aug 17, 2012

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
Copy link
Member

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

@xchs
Copy link
Contributor Author

xchs commented Aug 17, 2012

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.

  • open the back end module "Articles"
  • right-click on the edit (pencil) icon for e.g. the article "Home"
  • either click on "Edit article" or "Edit article settings"
  • nothing happens – no JavaScript error, just nothing

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

@leofeyer
Copy link
Member

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

leofeyer added a commit that referenced this issue Sep 26, 2012
@leofeyer
Copy link
Member

I have removed the context menu entirely in a974334. 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
Copy link
Contributor Author

xchs commented Sep 26, 2012

//Huh, no email notification today #fail

@pmmueller
Copy link

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

@leofeyer
Copy link
Member

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

@backbone87
Copy link
Contributor

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

@pmmueller
Copy link

@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 ;-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants