Package ZenWidgets
[hide private]
[frames] | no frames]

Source Code for Package ZenWidgets

 1  ########################################################################### 
 2  # 
 3  # This program is part of Zenoss Core, an open source monitoring platform. 
 4  # Copyright (C) 2007, Zenoss Inc. 
 5  # 
 6  # This program is free software; you can redistribute it and/or modify it 
 7  # under the terms of the GNU General Public License version 2 as published by 
 8  # the Free Software Foundation. 
 9  # 
10  # For complete information please visit: http://www.zenoss.com/oss/ 
11  # 
12  ########################################################################### 
13   
14  """__init__ 
15   
16  Initializer for ZenTableManager 
17   
18  $Id: __init__.py,v 1.3 2004/04/04 23:56:49 edahl Exp $""" 
19   
20  __version__ = 0.5 
21  __revision__ = "$Revision: 1.3 $"[11:-2] 
22   
23   
24  from Products.Five.browser import BrowserView 
25  from ZenTableManager import ZenTableManager 
26  from ZenTableManager import manage_addZenTableManager 
27   
28  try: 
29      from Products.CMFCore.DirectoryView import registerDirectory 
30      registerDirectory('skins', globals()) 
31  except ImportError: pass 
32   
33 -def update_portlets(app):
34 """ 35 Reread in portlet source on startup. If this is the initial load, and 36 objects don't exist yet, don't do anything. 37 """ 38 if hasattr(app, 'zport') and hasattr(app.zport, 'ZenPortletManager'): 39 app.zport.ZenPortletManager.update_source()
40
41 -def initialize(registrar):
42 registrar.registerClass( 43 ZenTableManager, 44 permission="Add ZenTableManager", 45 constructors = (manage_addZenTableManager,), 46 icon = "ZenTableManager_icon.gif" 47 ) 48 update_portlets(registrar._ProductContext__app)
49 50 # Enable gzip compression of static files 51 import FileGzipper 52 if 0: 53 FileGzipper = None # pyflakes 54
55 -class ExtJSShortcut(BrowserView):
56 - def __getitem__(self, name):
57 return self.context.unrestrictedTraverse('++resource++extjs')[name]
58