Projet

Général

Profil

Révision 6ff32cea

Ajouté par Florent Torregrosa il y a environ 9 ans

Update core to 7.36

Voir les différences:

drupal7/misc/autocomplete.js
114 114
 */
115 115
Drupal.jsAC.prototype.select = function (node) {
116 116
  this.input.value = $(node).data('autocompleteValue');
117
  $(this.input).trigger('autocompleteSelect', [node]);
117 118
};
118 119

  
119 120
/**
......
167 168
Drupal.jsAC.prototype.hidePopup = function (keycode) {
168 169
  // Select item if the right key or mousebutton was pressed.
169 170
  if (this.selected && ((keycode && keycode != 46 && keycode != 8 && keycode != 27) || !keycode)) {
170
    this.input.value = $(this.selected).data('autocompleteValue');
171
    this.select(this.selected);
171 172
  }
172 173
  // Hide popup.
173 174
  var popup = this.popup;
......
220 221
  for (key in matches) {
221 222
    $('<li></li>')
222 223
      .html($('<div></div>').html(matches[key]))
223
      .mousedown(function () { ac.select(this); })
224
      .mousedown(function () { ac.hidePopup(this); })
224 225
      .mouseover(function () { ac.highlight(this); })
225 226
      .mouseout(function () { ac.unhighlight(this); })
226 227
      .data('autocompleteValue', key)

Formats disponibles : Unified diff