Issue #2089397 by swentel, Wim Leers: Fixed Double 'Quick edit' contextual link.

8.0.x
webchick 2013-10-10 07:52:28 -07:00
parent cb8406205d
commit 9bc576cded
1 changed files with 6 additions and 2 deletions

View File

@ -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,