From e1774ac9b7e8f287188c0b3d879e583d119c6002 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 21 Nov 2013 23:08:07 +0000 Subject: [PATCH] Add attribute to include mailing lists in email results --- etemplate/js/et2_widget_taglist.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/etemplate/js/et2_widget_taglist.js b/etemplate/js/et2_widget_taglist.js index 547cf2ad6f..f397e029fb 100644 --- a/etemplate/js/et2_widget_taglist.js +++ b/etemplate/js/et2_widget_taglist.js @@ -344,6 +344,12 @@ var et2_taglist_email = et2_taglist.extend( allowFreeEntries: { "default": true, ignore: true + }, + include_lists: { + name: "Include lists", + description:"Include mailing lists in search results", + default: false, + type: "boolean" } }, lib_options: { @@ -351,6 +357,15 @@ var et2_taglist_email = et2_taglist.extend( minChars: 3 }, + init: function() { + this._super.apply(this, arguments); + + if(this.options.include_lists) + { + this.options.autocomplete_params.include_lists = true; + } + }, + // PREG for validation comes from et2_url //EMAIL_PREG: new RegExp(/^[^\x00-\x20()<>@,;:\".\[\]]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,6}/),