from plugins.hazelnut import Hazelnut
from plugins.resources_selected import ResourcesSelected
from plugins.googlemap import GoogleMap
-from plugins.senslabmap.senslabmap import SensLabMap
+from plugins.senslabmap import SensLabMap
from plugins.querycode import QueryCode
from plugins.query_editor import QueryEditor
from plugins.active_filters import ActiveFilters
page.add_js_files ( [ "js/common.functions.js" ] )
page.add_js_chunks ('$(function() { messages.debug("sliceview: jQuery version " + $.fn.jquery); });')
page.add_js_chunks ('$(function() { messages.debug("sliceview: users turned %s"); });'%("on" if do_query_users else "off"))
- page.add_js_chunks ('$(function() { messages.debug("manifold URL %s"); });'%(Config.manifold_url()))
+ config=Config()
+ page.add_js_chunks ('$(function() { messages.debug("manifold URL %s"); });'%(config.manifold_url()))
page.expose_js_metadata()
metadata = page.get_metadata()
domid = 'filters',
sons = [filter_query_editor, filter_active_filters],
togglable = True,
- # start turned off, it will open up itself when stuff comes in
- toggled = False,
+ toggled = 'persistent',
outline_complete = True,
)
main_stack.insert (filters_area)
resources_as_list = Hazelnut(
page = page,
domid = 'resources-list',
+ title = 'List view',
# this is the query at the core of the slice list
query = sq_resource,
query_all = query_resource_all,
},
)
- # List area itself is a Stack with hazelnut on top,
- # and a togglable tabs for customization plugins
- resources_as_list_area = Stack(
- page = page,
- title = 'Resources as a List',
- domid = 'resources-list-area',
- sons= [ resources_as_list,
- Tabs ( page=page,
- title="Customize Resources layout",
- togglable=True,
- toggled='persistent',
- domid="customize-resources",
- outline_complete=True,
- #sons = [ resources_query_editor, resources_active_filters, ],
- ),
- ],
- )
+ # with the new 'Filter' stuff on top, no need for anything but the hazelnut
+ resources_as_list_area = resources_as_list
+
resources_area = Tabs ( page=page,
domid="resources",
togglable=True,
'bAutoWidth' : True,
},
))
-
+# DEMO
# --------------------------------------------------------------------------
# MEASUREMENTS
- tab_measurements = Tabs (
- page = page,
- active_domid = 'measurements-list',
- outline_complete = True,
- togglable = True,
- title = 'Measurements',
- domid = 'measurements',
- )
- main_stack.insert(tab_measurements)
-
- tab_measurements.insert(Hazelnut(
- page = page,
- title = 'Measurements',
- domid = 'measurements-list',
- # tab's sons preferably turn this off
- togglable = False,
- # this is the query at the core of the slice list
- query = sq_measurement,
- # do NOT set checkboxes to False
- # this table being otherwise empty, it just does not fly with dataTables
- checkboxes = True,
- datatables_options = {
- 'iDisplayLength' : 25,
- 'bLengthChange' : True,
- 'bAutoWidth' : True,
- },
- ))
-
- # --------------------------------------------------------------------------
- # MESSAGES (we use transient=False for now)
- main_stack.insert(Messages(
- page = page,
- title = "Runtime messages for slice %s"%slicename,
- domid = "msgs-pre",
- levels = "ALL",
- # plain messages are probably less nice for production but more reliable for development for now
- transient = False,
- # these make sense only in non-transient mode..
- togglable = True,
- toggled = 'persistent',
- outline_complete = True,
- ))
-
+# tab_measurements = Tabs (
+# page = page,
+# active_domid = 'measurements-list',
+# outline_complete = True,
+# togglable = True,
+# title = 'Measurements',
+# domid = 'measurements',
+# )
+# main_stack.insert(tab_measurements)
+#
+# tab_measurements.insert(Hazelnut(
+# page = page,
+# title = 'Measurements',
+# domid = 'measurements-list',
+# # tab's sons preferably turn this off
+# togglable = False,
+# # this is the query at the core of the slice list
+# query = sq_measurement,
+# # do NOT set checkboxes to False
+# # this table being otherwise empty, it just does not fly with dataTables
+# checkboxes = True,
+# datatables_options = {
+# 'iDisplayLength' : 25,
+# 'bLengthChange' : True,
+# 'bAutoWidth' : True,
+# },
+# ))
+#
+# # --------------------------------------------------------------------------
+# # MESSAGES (we use transient=False for now)
+# main_stack.insert(Messages(
+# page = page,
+# title = "Runtime messages for slice %s"%slicename,
+# domid = "msgs-pre",
+# levels = "ALL",
+# # plain messages are probably less nice for production but more reliable for development for now
+# transient = False,
+# # these make sense only in non-transient mode..
+# togglable = True,
+# toggled = 'persistent',
+# outline_complete = True,
+# ))
+#
# variables that will get passed to the view-unfold1.html template
template_env = {}