Title says it all.

That event is being introduced at #1971108: Convert contextual.js to use Backbone (and support dynamic contextual links).

From #2 of that issue:

Essentially, I want to get rid of this hacky, ad-hoc solution:

   // Add "Quick edit" links to all contextual menus where editing the full
   // node is possible.
   // @todo Generalize this to work for all entities.
-  $('ul.contextual-links li.node-edit')
+  $('ul.contextual-links').find('li.node-edit, li.taxonomy-edit, li.custom-block-edit')
   .before('<li class="quick-edit"></li>')

This will become more important once #1966704: In-place editing for taxonomy terms and custom blocks lands.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers’s picture

Wim Leers’s picture

Status: Postponed » Needs review

#1971108: Convert contextual.js to use Backbone (and support dynamic contextual links) landed, now this is unblocked. This patch should still be good to go.

Wim Leers’s picture

Manually tested on simplytest.me, still works fine.

nod_’s picture

Status: Needs review » Needs work
  • Drupal.edit = Drupal.edit || { metadataCache: {}, contextualLinksQueue: [] }; can be Drupal.edit = { metadataCache: {}, contextualLinksQueue: [] };
  • var that = this; not needed.
  • var hasFieldWithPermission = function(editIDs) { to function hasFieldWithPermission (editIDs) {
  • Same for allMetadataExists
  • var app = new Drupal.edit.EditAppView({ can be Drupal.edit.app = new …

And we probably want to put the model/views definition and instances at the same places as in contextual.js

Wim Leers’s picture

Status: Needs work » Needs review
FileSize
806 bytes
2.49 KB
6.41 KB

#4: Thanks, all fixed! With the exception of "model/views in same places as contextual.js", because that would break #1979784: Factor Create.js and VIE.js out of the Edit module very significantly, I'll get that done there instead. That's a refactoring issue anyway, so it makes a lot more sense to do it there :) I promise it'll get done.
See interdiff-review.txt.

I made one other change: touch support. That was added to #1971108: Convert contextual.js to use Backbone (and support dynamic contextual links) after this issue was split off from it.
See interdiff-touch.txt.

nod_’s picture

There were some more anonymous functions to convert and a lot of spaces missing from functions declarations. Refactored annotateField a little.

( edit ) apart from those style changes, it's RTBC.

Wim Leers’s picture

Code style fixes are all fine — thanks! :)

RTBC? :)

nod_’s picture

Status: Needs review » Reviewed & tested by the community
Wim Leers’s picture

Wim Leers’s picture

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Wim Leers’s picture

Issue tags: -sprint

Lovely, thanks! I just set the issues referenced in #10 & #11 to needs review, they should come back green :)

Automatically closed -- issue fixed for 2 weeks with no activity.