Improved tag handling.
This commit is contained in:
parent
86634cc4af
commit
9d4c8087f6
@ -519,7 +519,8 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
|
||||
function (someGroups) {
|
||||
return MochiKit.Iter.reduce(function(aCollector, aGroup) {
|
||||
if (aGroup[0] != Clipperz.PM.DataModel.Record.archivedTag) {
|
||||
aCollector[aGroup[0]] = MochiKit.Iter.list(aGroup[1]).length;
|
||||
var currentValue = aCollector[aGroup[0]] ? aCollector[aGroup[0]] : 0;
|
||||
aCollector[aGroup[0]] = MochiKit.Iter.list(aGroup[1]).length + currentValue;
|
||||
}
|
||||
return aCollector;
|
||||
}, someGroups, {});
|
||||
|
@ -49,7 +49,6 @@ Clipperz.PM.UI.Components.Selections = React.createClass({
|
||||
var tags;
|
||||
|
||||
tagInfo = this.props['tags'] ? this.props['tags'] : {};
|
||||
// tagInfo = {"tag1":1, "tag2":2, "tag3":1, "tag4":2, "tag5":1, "tag6":2, "tag7":1, "tag8":3, "tag9":1, "tag10":11, "tag11":1, "tag12":8, "tag13":1, "tag14":3, "tag15":1, "tag16":1};
|
||||
tags = MochiKit.Base.keys(tagInfo).sort(Clipperz.Base.caseInsensitiveCompare);
|
||||
|
||||
return React.DOM.div({'key':'selections', 'id':'selections'}, [
|
||||
|
@ -34,8 +34,8 @@ Clipperz.PM.UI.Components.TagIndexItem = React.createClass({
|
||||
},
|
||||
|
||||
handleClick: function (anEvent) {
|
||||
//console.log("TAG INDEX ITEM - handle click TAG", anEvent.target.dataset.tag);
|
||||
MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'tagSelected', anEvent.target.dataset.tag);
|
||||
//console.log("TAG INDEX ITEM - handle click TAG", anEvent.currentTarget.dataset.tag);
|
||||
MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'tagSelected', anEvent.currentTarget.dataset.tag);
|
||||
},
|
||||
|
||||
render: function () {
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user