2015-06-30 00:51:55 -05:00
|
|
|
##########################################################################
|
|
|
|
#
|
|
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
|
|
#
|
2016-01-18 08:48:14 -06:00
|
|
|
# Copyright (C) 2013 - 2016, The pgAdmin Development Team
|
2015-06-30 00:51:55 -05:00
|
|
|
# This software is released under the PostgreSQL Licence
|
|
|
|
#
|
|
|
|
##########################################################################
|
|
|
|
|
2015-06-29 02:54:05 -05:00
|
|
|
PRIORITY = 100
|
|
|
|
|
2015-06-29 01:58:41 -05:00
|
|
|
|
2016-06-21 08:21:06 -05:00
|
|
|
class MenuItem(object):
|
2015-06-29 01:58:41 -05:00
|
|
|
def __init__(self, **kwargs):
|
|
|
|
self.__dict__.update(**kwargs)
|
2015-06-29 02:54:05 -05:00
|
|
|
|
|
|
|
|
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,
|
2015-06-30 00:51:55 -05:00
|
|
|
showTitle=True, isCloseable=True, isPrivate=False, priority=None,
|
2016-05-05 10:42:16 -05:00
|
|
|
icon=None, data=None, events=None):
|
2015-06-29 02:54:05 -05:00
|
|
|
self.name = name
|
|
|
|
self.title = title
|
|
|
|
self.content = content
|
|
|
|
self.width = width
|
|
|
|
self.height = height
|
2015-06-30 00:51:55 -05:00
|
|
|
self.isIframe = isIframe
|
2015-06-29 02:54:05 -05:00
|
|
|
self.showTitle = showTitle
|
|
|
|
self.isCloseable = isCloseable
|
|
|
|
self.isPrivate = isPrivate
|
2015-06-30 00:51:55 -05:00
|
|
|
self.icon = icon
|
2016-05-05 10:42:16 -05:00
|
|
|
self.data = data
|
|
|
|
self.events = events
|
2015-06-29 02:54:05 -05:00
|
|
|
if priority is None:
|
|
|
|
global PRIORITY
|
|
|
|
PRIORITY += 100
|
|
|
|
priority = PRIORITY
|
|
|
|
self.priority = priority
|