Issue #2089397 by jessebeach, swentel, Wim Leers: Fixed Double 'Quick edit' contextual link.
parent
1a1ba935cf
commit
9f6d0920f6
|
@ -385,8 +385,9 @@ function initializeEntityContextualLink (contextualLink) {
|
|||
});
|
||||
fieldsAvailableQueue = _.difference(fieldsAvailableQueue, fields);
|
||||
|
||||
// Set up contextual link view after loading any missing in-place editors.
|
||||
loadMissingEditors(function () {
|
||||
// Initialization should only be called once. Use Underscore's once method
|
||||
// to get a one-time use version of the function.
|
||||
var initContextualLink = _.once(function () {
|
||||
var $links = $(contextualLink.el).find('.contextual-links');
|
||||
var contextualLinkView = new Drupal.edit.ContextualLinkView($.extend({
|
||||
el: $('<li class="quick-edit"><a href=""></a></li>').prependTo($links),
|
||||
|
@ -396,6 +397,9 @@ function initializeEntityContextualLink (contextualLink) {
|
|||
entityModel.set('contextualLinkView', contextualLinkView);
|
||||
});
|
||||
|
||||
// Set up ContextualLinkView after loading any missing in-place editors.
|
||||
loadMissingEditors(initContextualLink);
|
||||
|
||||
return true;
|
||||
}
|
||||
// There was not at least one field that the current user may edit in-place,
|
||||
|
|
Loading…
Reference in New Issue