ezcontent-8.x-dev/modules/ezcontent_node/modules/ezcontent_smart_article/js/ez_auto_deluxe_smart_tags.js

modules/ezcontent_node/modules/ezcontent_smart_article/js/ez_auto_deluxe_smart_tags.js
/**
 * @file
 */

(function ($, Drupal, drupalSettings) {

  "use strict";

  /**
   * Custom code for autocomplete deluxe smart tags.
   */
  Drupal.behaviors.ez_auto_deluxe_smart_tags = {
    attach: function (context, settings) {
      // Remove tag.
      $('.autocomplete-deluxe-item-delete', context).on('click', function () {
        $(this).parent().remove();
      });
    }
  };

  /**
   * Places the tags in the autocomplete deluxe value field.
   */
  $.fn.update_tags = function (data, target_editor) {
    var existingTags = $(this).val();
    if (existingTags === '"" ""') {
      $(this).val(data);
    }
    else {
      $(this).val(existingTags + ' ' + data);
    }
  };

})(jQuery, Drupal, drupalSettings);

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc