Changeset 1041 in products
- Timestamp:
- Apr 22, 2009 12:23:08 PM (17 years ago)
- Location:
- quintagroup.portlet.cumulus/trunk/quintagroup/portlet/cumulus
- Files:
-
- 2 edited
-
catalog.py (modified) (2 diffs)
-
cumulusportlet.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.portlet.cumulus/trunk/quintagroup/portlet/cumulus/catalog.py
r1039 r1041 11 11 portal_properties = getToolByName(self.context, 'portal_properties') 12 12 self.default_charset = portal_properties.site_properties.getProperty('default_charset', 'utf-8') 13 portal = getToolByName(context, 'portal_url').getPortalObject() 14 self.portal_url = portal.absolute_url() 13 15 14 16 def getTags(self, number=None): … … 23 25 except TypeError: 24 26 number_of_entries = 1 25 tags.append((name.decode(self.default_charset), number_of_entries, '#')) 27 name = name.decode(self.default_charset) 28 url = '%s/search?Subject:list=%s' % (self.portal_url, name) 29 tags.append((name, number_of_entries, url)) 26 30 27 31 return tags -
quintagroup.portlet.cumulus/trunk/quintagroup/portlet/cumulus/cumulusportlet.py
r1039 r1041 24 24 description=_(u'Width in pixels (500 or more is recommended).'), 25 25 required=True, 26 default= 550)26 default=152) 27 27 28 28 height = schema.Int( … … 30 30 description=_(u'Height in pixels (ideally around 3/4 of the width).'), 31 31 required=True, 32 default= 375)32 default=152) 33 33 34 34 tcolor = schema.TextLine( … … 108 108 implements(ICumulusPortlet) 109 109 110 width = 550;111 height = 375;110 width = 152; 111 height = 152; 112 112 tcolor = u'5391d0' 113 113 tcolor2 = u'333333' … … 159 159 params = self.getParams() 160 160 return """<script type="text/javascript"> 161 var so = new SWFObject("%(url)s", "tagcloudflash", "%(width)s", "%(height)s", "9", "#%(bgcolor)s");162 %(trans)s163 so.addParam("allowScriptAccess", "always");164 so.addVariable("tcolor", "0x%(tcolor)s");165 so.addVariable("tcolor2", "0x%(tcolor2)s");166 so.addVariable("hicolor", "0x%(hicolor)s");167 so.addVariable("tspeed", "%(tspeed)s");168 so.addVariable("distr", "%(distr)s");169 so.addVariable("mode", "%(mode)s");170 so.addVariable("tagcloud", "%(tagcloud)s");171 so.write("comulus");172 </script>""" % params161 var so = new SWFObject("%(url)s", "tagcloudflash", "%(width)s", "%(height)s", "9", "#%(bgcolor)s"); 162 %(trans)s 163 so.addParam("allowScriptAccess", "always"); 164 so.addVariable("tcolor", "0x%(tcolor)s"); 165 so.addVariable("tcolor2", "0x%(tcolor2)s"); 166 so.addVariable("hicolor", "0x%(hicolor)s"); 167 so.addVariable("tspeed", "%(tspeed)s"); 168 so.addVariable("distr", "%(distr)s"); 169 so.addVariable("mode", "%(mode)s"); 170 so.addVariable("tagcloud", "%(tagcloud)s"); 171 so.write("comulus"); 172 </script>""" % params 173 173 174 174 def getParams(self):
Note: See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/trac/chrome/common/qtrac_logo.png)