pgadmin4/web/pgadmin/utils/menu.py

39 lines
1.1 KiB
Python
Raw Normal View History

##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
2016-01-18 08:48:14 -06:00
# Copyright (C) 2013 - 2016, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
PRIORITY = 100
2016-06-21 08:21:06 -05:00
class MenuItem(object):
def __init__(self, **kwargs):
self.__dict__.update(**kwargs)
2016-06-21 08:21:06 -05:00
class Panel(object):
2016-04-12 07:35:47 -05:00
def __init__(self, name, title, content='', width=500, height=600, isIframe=True,
showTitle=True, isCloseable=True, isPrivate=False, priority=None,
2016-05-05 10:42:16 -05:00
icon=None, data=None, events=None):
self.name = name
self.title = title
self.content = content
self.width = width
self.height = height
self.isIframe = isIframe
self.showTitle = showTitle
self.isCloseable = isCloseable
self.isPrivate = isPrivate
self.icon = icon
2016-05-05 10:42:16 -05:00
self.data = data
self.events = events
if priority is None:
global PRIORITY
PRIORITY += 100
priority = PRIORITY
self.priority = priority