Author: nathangray
New Revision: 55199
URL: http://svn.stylite.de/viewvc/egroupware?rev=55199&view=rev
Log:
Add taglist-cat widget for categories in taglist style
Modified:
trunk/etemplate/js/et2_widget_taglist.js
trunk/etemplate/templates/default/etemplate2.css
— trunk/etemplate/js/et2_widget_taglist.js (original)
+++ trunk/etemplate/js/et2_widget_taglist.js Mon Feb 29 21:29:49 2016
@@ -89,6 +89,9 @@
},
“width”: {
“default”: “100%”
@@ -194,9 +197,18 @@
highlight: false, // otherwise renderer have to return strings
selectFirst: true
}, this.lib_options);
+
-
if(this.options.height) {
-
this.div.css('height','');
-
this.taglist_options.maxDropHeight = parseInt(this.options.height);
-
}
-
this.taglist = this.taglist.magicSuggest(this.taglist_options);
this.$taglist = $j(this.taglist);
-
if(this.options.value)
-
{
-
this.taglist.addToSelection(this.options.value,true);
-
}
// AJAX _and_ select options - use custom function
if(this.options.autocomplete_url && !jQuery.isEmptyObject(this.options.select_options))
@@ -802,16 +814,32 @@
}
},
lib_options: {
- },
-
- /**
-
- convert _options to taglist data [{id:…,label:…},…] format
-
this.div.addClass('et2_taglist_category');
- },
-
- /**
-
- Get options automatically from select option cache
-
- */
- transformAttributes: function(_attrs) {
-
// Pretend to be a select box so it works
-
var type = this._type;
-
this._type = 'select-cat';
-
this._super.apply(this, arguments);
-
this._type = type;
- },
-
- /**
-
- convert selectbox options from the cache 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, …
-
-
-
@return {Object[]} Returns an array of objects with ID and label
*/
_options2data: function(_options)
{
@@ -845,7 +873,7 @@
return label;
}
});
-et2_register_widget(et2_taglist_category, [“taglist-category”]);
+et2_register_widget(et2_taglist_category, [“taglist-cat”]);
/**
— trunk/etemplate/templates/default/etemplate2.css (original)
+++ trunk/etemplate/templates/default/etemplate2.css Mon Feb 29 21:29:49 2016
@@ -921,6 +921,22 @@
.et2_taglist > div {
min-height: 2em;
}
+
+/* Taglist category /
+.et2_taglist_category span[class=“cat_”] {
- height: 1.7em;
- width: 6px;
- margin: -3px -6px;
- float: left;
+}
+.et2_taglist_category .ms-res-item > span {
- margin-left: 3px;
+}
+.et2_taglist_category .ms-sel-item > span:first-child {
- padding-left: 5px;
+}
-
-
/**
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