Changeset 3361 in products for quintagroup.portlet.cumulus


Ignore:
Timestamp:
Feb 24, 2012 10:15:53 AM (12 years ago)
Author:
kroman0
Message:

Implemented max. number of tags to be displayed (Suresh V)

Location:
quintagroup.portlet.cumulus/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.portlet.cumulus/trunk/docs/HISTORY.txt

    r3317 r3361  
    11Changelog 
    22========= 
     3 
     41.2 (2012-02-24) 
     5------------------ 
     6 
     7* Implemented max. number of tags to be displayed (Suresh V) 
    38 
    491.1.1 (2011-10-28) 
  • quintagroup.portlet.cumulus/trunk/quintagroup/portlet/cumulus/cumulusportlet.py

    r1041 r3361  
    9898        required=True, 
    9999        default=u'pt') 
     100 
     101    max_tags = schema.Int( 
     102        title=_(u'Maximum number of tags to display'), 
     103        description=_(u'Used when too many tags make the display ugly.'), 
     104        required=True, 
     105        default=50) 
    100106 
    101107class Assignment(base.Assignment): 
     
    122128    largest  = 22 
    123129    unit     = u'pt' 
     130    max_tags = 50 
    124131 
    125132    def __init__(self, **kw): 
     
    209216            return [] 
    210217 
     218        tags.sort(lambda x,y: (x[1]<y[1] and 1) or (x[1]>y[1] and -1) or 0) 
     219        tags = tags[:self.data.max_tags] 
     220 
    211221        number_of_entries = [i[1] for i in tags] 
    212222 
  • quintagroup.portlet.cumulus/trunk/setup.py

    r3323 r3361  
    22import os 
    33 
    4 version = '1.1.1' 
     4version = '1.2' 
    55 
    66setup(name='quintagroup.portlet.cumulus', 
Note: See TracChangeset for help on using the changeset viewer.