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.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | core-js-edit-dynamic-contextual-1981760-6.patch | 10.62 KB | nod_ |
| #6 | interdiff.txt | 5.39 KB | nod_ |
| #5 | edit_dynamic_contextual_link-1981760-5.patch | 6.41 KB | wim leers |
| #5 | interdiff-review.txt | 2.49 KB | wim leers |
| #5 | interdiff-touch.txt | 806 bytes | wim leers |
Comments
Comment #1
wim leersNot NR because #1971108: Convert contextual.js to use Backbone (and support dynamic contextual links) needs to land first.
Comment #2
wim leers#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.
Comment #3
wim leersManually tested on simplytest.me, still works fine.
Comment #4
nod_Drupal.edit = Drupal.edit || { metadataCache: {}, contextualLinksQueue: [] };can beDrupal.edit = { metadataCache: {}, contextualLinksQueue: [] };var that = this;not needed.var hasFieldWithPermission = function(editIDs) {tofunction hasFieldWithPermission (editIDs) {allMetadataExistsvar app = new Drupal.edit.EditAppView({can beDrupal.edit.app = new …And we probably want to put the model/views definition and instances at the same places as in contextual.js
Comment #5
wim leers#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.Comment #6
nod_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.
Comment #7
wim leersCode style fixes are all fine — thanks! :)
RTBC? :)
Comment #8
nod_Comment #9
wim leersThis patch now blocks #1966704: In-place editing for taxonomy terms and custom blocks.
Comment #10
wim leersIt also blocks #914382: Contextual links incompatible with render cache.
Comment #11
webchickCommitted and pushed to 8.x. Thanks!
Comment #12
wim leersLovely, thanks! I just set the issues referenced in #10 & #11 to needs review, they should come back green :)