Author: nathangray
New Revision: 55198
URL: http://svn.stylite.de/viewvc/egroupware?rev=55198&view=rev
Log:
Cancel taglist validation check so enter key can trigger ajax search instead
Modified:
trunk/etemplate/js/et2_widget_taglist.js
— trunk/etemplate/js/et2_widget_taglist.js (original)
+++ trunk/etemplate/js/et2_widget_taglist.js Mon Feb 29 19:17:20 2016
@@ -323,6 +323,10 @@
_keyup: function(e, taglist, event) {
if(event.which === jQuery.ui.keyCode.ENTER && taglist.combobox.find(’.ms-res-item.ms-res-item-active’).length==0)
{
-
// Change keycode to abort the validation process
-
// This means enter does not add a tag
-
event.keyCode = jQuery.ui.keyCode.DOWN;
-
this._query_server = true;
this.taglist.collapse();
this.taglist.expand();
@@ -775,6 +779,75 @@
});
et2_register_widget(et2_taglist_email, [“taglist-email”]);
+/**
-
- Taglist customized specifically for categories, with colors
-
-
- Free entries are not allowed.
-
-
- */
+var et2_taglist_category = et2_taglist.extend(
+{
- attributes: {
-
"autocomplete_url": {
-
"default": ""
-
},
-
"autocomplete_params": {
-
"default": {}
-
},
-
allowFreeEntries: {
-
"default": false,
-
ignore: true
-
}
- },
- lib_options: {
- },
-
- init: function() {
-
this._super.apply(this, arguments);
- },
-
- /**
-
- convert _options to taglist data [{id:…,label:…},…] format
-
-
-
@param {(object|array)} _options id: label or id: {label: …, title: …} pairs, or array if id’s are 0, 1, …
- */
- _options2data: function(_options)
- {
-
var options = jQuery.isArray(_options) ? jQuery.extend({}, _options) : _options;
-
var data = [];
-
for(var id in options)
-
{
-
var option = {};
-
if (typeof options[id] == 'object')
-
{
-
jQuery.extend(option, options[id]);
-
if(option.value) option.id = option.value;
-
}
-
else
-
{
-
option.label = options[id];
-
}
-
data.push(option);
-
}
-
return data;
- },
- selectionRenderer: function(item)
- {
-
var label = jQuery('<span>').text(item.label);
-
-
if (item.class) label.addClass(item.class);
-
jQuery('<span class="cat_'+item.id+'"/>').prependTo(label);
-
if (typeof item.title != 'undefined') label.attr('title', item.title);
-
if (typeof item.data != 'undefined') label.attr('data', item.data);
-
-
return label;
- }
+});
+et2_register_widget(et2_taglist_category, [“taglist-category”]);
-
-
/**
- et2_taglist_ro is the readonly implementation of the taglist.
-
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs