Ignore:
Timestamp:
Apr 13, 2011 12:04:44 PM (13 years ago)
Author:
kroman0
Message:

Added qcomments view

Location:
quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/browser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/browser/comments.py

    r2598 r3104  
    9191        portal = portal_url.getPortalObject() 
    9292        return portal.email_from_address 
     93 
     94 
     95from zope.interface import Interface 
     96from Products.Five.browser import BrowserView 
     97 
     98 
     99class IQCommentsView(Interface): 
     100    """ 
     101    """ 
     102 
     103    def js3(): 
     104        """ 
     105        """ 
     106 
     107    def js4(): 
     108        """ 
     109        """ 
     110 
     111 
     112class QCommentsView(BrowserView): 
     113    """ 
     114    """ 
     115 
     116    def js3(self): 
     117        """ 
     118        """ 
     119        portal_properties = getToolByName(self.context, 'portal_properties') 
     120        prop_sheet = portal_properties['qPloneComments'] 
     121        value = prop_sheet.getProperty('visual_effects', -1) 
     122        return value == 1 
     123 
     124    def js4(self): 
     125        """ 
     126        """ 
     127        portal_properties = getToolByName(self.context, 'portal_properties') 
     128        prop_sheet = portal_properties['qPloneComments'] 
     129        value = prop_sheet.getProperty('visual_effects', -1) 
     130        jstool = aq_inner(self.context).portal_javascripts 
     131        popupenabled = jstool.getResource('popupforms.js').getEnabled() 
     132        return value == 0 and popupenabled or value == 2 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/browser/configure.zcml

    r2088 r3104  
    55    i18n_domain="quintagroup.plonecomments"> 
    66 
     7    <browser:page 
     8        for="*" 
     9        name="qcomments" 
     10        class=".comments.QCommentsView" 
     11        allowed_interface=".comments.IQCommentsView" 
     12        permission="zope.Public" 
     13        /> 
     14 
    715</configure> 
Note: See TracChangeset for help on using the changeset viewer.