Inherited the test, about & help module from PgAdminModule class to load

them automatically by PgAdmin.
This commit is contained in:
Ronan Dunklau
2015-06-29 13:26:43 +05:30
committed by Ashesh Vashi
parent eb6580b43a
commit b626eec0fd
15 changed files with 280 additions and 267 deletions
+7
View File
@@ -55,6 +55,13 @@ class PgAdminModule(Blueprint):
"""
return defaultdict(list)
def get_panels(self):
"""
Returns:
list: a list of panel objects to add
"""
return []
@property
def stylesheets(self):
stylesheets = self.get_own_stylesheets()
+21
View File
@@ -1,6 +1,27 @@
from collections import namedtuple
PRIORITY = 100
class MenuItem(object):
def __init__(self, **kwargs):
self.__dict__.update(**kwargs)
class Panel(object):
def __init__(self, name, title, content, width=500, height=600, isIframe=True,
showTitle=True, isCloseable=True, isPrivate=False, priority=None):
self.name = name
self.title = title
self.content = content
self.width = width
self.height = height
self.isIfframe = isIframe
self.showTitle = showTitle
self.isCloseable = isCloseable
self.isPrivate = isPrivate
if priority is None:
global PRIORITY
PRIORITY += 100
priority = PRIORITY
self.priority = priority