Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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) {
allMetadataExists
var 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 :)