+from unfold.plugin import Plugin
+
+# lists levels and sets them to enabled or not at startup
+default_levels = {'fatal': True, 'error': True, 'warning' : True, 'info' : True, 'debug' : False}
+
+# there are two implementations available here
+# one shows up in the main page like a regular part of the page,
+# while the other one relies on transient popups
+# by default we use the latter, but you can specify
+# transient=False if you want to use the former
+# xxx
+# also the pieces that go with this transient mode are
+# under views/templates, it would make sense to move them over here
+# however it turns out that views/templates/base.html unconditionnally
+# includes messages-transient-header.html
+class Messages (Plugin):
+
+ def __init__ (self, transient=True, levels=None, **settings):
+ Plugin.__init__ (self, **settings)
+ if levels is None: levels=default_levels
+ # shortcut: 'ALL' turn everything on
+ elif levels=='ALL': levels=dict( [ (k,True) for k in default_levels ] )
+ elif levels=='NONE': levels=dict( [ (k,False) for k in default_levels ] )
+ self.transient=transient
+ self.levels=levels
+
+ def template_file (self):
+ return "messages.html" if not self.transient else "messages-transient.html"
+
+ def requirements (self):
+ return {
+ 'js_files' : [ "js/messages.js", "js/manifold.js", ],
+ 'css_files' : "css/messages.css",
+ }
+
+ # although this has no query, we need a plugin instance to be created in the js output
+ def export_json_settings (self):
+ return True
+ # the js plugin expects a domid
+ def json_settings_list (self):
+ return [ 'plugin_uuid', 'levels' ]
+
+ # and we don't need a spin wheel
+ def start_with_spin (self):
+ return False
+++ /dev/null
-from unfold.plugin import Plugin
-
-# lists levels and sets them to enabled or not at startup
-default_levels = {'fatal': True, 'error': True, 'warning' : True, 'info' : True, 'debug' : False}
-
-# there are two implementations available here
-# one shows up in the main page like a regular part of the page,
-# while the other one relies on transient popups
-# by default we use the latter, but you can specify
-# transient=False if you want to use the former
-# xxx
-# also the pieces that go with this transient mode are
-# under views/templates, it would make sense to move them over here
-# however it turns out that views/templates/base.html unconditionnally
-# includes messages-transient-header.html
-class Messages (Plugin):
-
- def __init__ (self, transient=True, levels=None, **settings):
- Plugin.__init__ (self, **settings)
- if levels is None: levels=default_levels
- # shortcut: 'ALL' turn everything on
- elif levels=='ALL': levels=dict( [ (k,True) for k in default_levels ] )
- elif levels=='NONE': levels=dict( [ (k,False) for k in default_levels ] )
- self.transient=transient
- self.levels=levels
-
- def template_file (self):
- return "messages.html" if not self.transient else "messages-transient.html"
-
- def requirements (self):
- return {
- 'js_files' : [ "js/messages.js", "js/manifold.js", ],
- 'css_files' : "css/messages.css",
- }
-
- # although this has no query, we need a plugin instance to be created in the js output
- def export_json_settings (self):
- return True
- # the js plugin expects a domid
- def json_settings_list (self):
- return [ 'plugin_uuid', 'levels' ]
-
- # and we don't need a spin wheel
- def start_with_spin (self):
- return False
+from unfold.plugin import Plugin
+
+class QueryCode (Plugin):
+
+ def __init__ (self, query, **settings):
+ Plugin.__init__ (self, **settings)
+ self.query=query
+
+ def template_file (self):
+ return "querycode.html"
+
+ def requirements (self):
+ return {
+ 'js_files' : [
+ "js/querycode.js",
+ "js/manifold.js", "js/manifold-query.js",
+ "js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js",
+ "js/shAutoloader.js","js/shCore.js","js/shBrushPython.js","js/shBrushRuby.js",
+ ] ,
+# thierry: see this file for details of why we turn this off for now
+ 'css_files': [
+ "css/querycode.css" ,
+ "css/shCore.css","css/shCoreDefault.css","css/shThemeDefault.css",
+ ],
+ }
+
+ def json_settings_list (self): return ['plugin_uuid','query_uuid']
+
+ # because we have a link to a query it looks like we need a spin, let's make this right
+ def start_with_spin (self): return False
+++ /dev/null
-from unfold.plugin import Plugin
-
-class QueryCode (Plugin):
-
- def __init__ (self, query, **settings):
- Plugin.__init__ (self, **settings)
- self.query=query
-
- def template_file (self):
- return "querycode.html"
-
- def requirements (self):
- return {
- 'js_files' : [
- "js/querycode.js",
- "js/manifold.js", "js/manifold-query.js",
- "js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js",
- "js/shAutoloader.js","js/shCore.js","js/shBrushPython.js","js/shBrushRuby.js",
- ] ,
-# thierry: see this file for details of why we turn this off for now
- 'css_files': [
- "css/querycode.css" ,
- "css/shCore.css","css/shCoreDefault.css","css/shThemeDefault.css",
- ],
- }
-
- def json_settings_list (self): return ['plugin_uuid','query_uuid']
-
- # because we have a link to a query it looks like we need a spin, let's make this right
- def start_with_spin (self): return False
+from unfold.plugin import Plugin
+
+class QuickFilter (Plugin) :
+
+ def __init__ (self, criterias, **settings):
+ Plugin.__init__ (self, **settings)
+ self.criterias=criterias
+ self.page.expose_js_metadata()
+
+ def template_file (self): return "quickfilter.html"
+
+ def requirements (self):
+ return {
+ 'js_files' : [ "js/quickfilter.js", "js/metadata.js",
+ ],
+ 'css_files': "css/quickfilter.css",
+ }
+
+ def json_settings_list (self):
+ return ['criterias','plugin_uuid']
+
+ def template_env (self,request):
+ return {'criterias':self.criterias}
+++ /dev/null
-from unfold.plugin import Plugin
-
-class QuickFilter (Plugin) :
-
- def __init__ (self, criterias, **settings):
- Plugin.__init__ (self, **settings)
- self.criterias=criterias
- self.page.expose_js_metadata()
-
- def template_file (self): return "quickfilter.html"
-
- def requirements (self):
- return {
- 'js_files' : [ "js/quickfilter.js", "js/metadata.js",
- ],
- 'css_files': "css/quickfilter.css",
- }
-
- def json_settings_list (self):
- return ['criterias','plugin_uuid']
-
- def template_env (self,request):
- return {'criterias':self.criterias}
+from unfold.plugin import Plugin
+
+# usage Raw (html="some html text")
+
+class Raw (Plugin):
+
+ def __init__ (self, html, **kwds):
+ Plugin.__init__ (self, **kwds)
+ self.html=html
+
+ def render_content (self, request):
+ return self.html
+++ /dev/null
-from unfold.plugin import Plugin
-
-# usage Raw (html="some html text")
-
-class Raw (Plugin):
-
- def __init__ (self, html, **kwds):
- Plugin.__init__ (self, **kwds)
- self.html=html
-
- def render_content (self, request):
- return self.html
+from django.template.loader import render_to_string
+
+from unfold.composite import Composite
+
+class Stack (Composite) :
+
+ def template_file (self): return "stack.html"
+ def template_env (self, request):
+ env = Composite.template_env (self, request)
+ env['domid'] = self.domid
+ return env
+++ /dev/null
-from django.template.loader import render_to_string
-
-from unfold.composite import Composite
-
-class Stack (Composite) :
-
- def template_file (self): return "stack.html"
- def template_env (self, request):
- env = Composite.template_env (self, request)
- env['domid'] = self.domid
- return env
+from unfold.composite import Composite
+
+class Tabs (Composite):
+
+ def requirements (self):
+ return { 'js_files' : ['js/tabs.js', 'js/bootstrap.js'],
+ 'css_files' : ['css/bootstrap.css', 'css/tabs.css', ]
+ }
+
+ def template_file (self):
+ return "tabs.html"
+
+ # see Composite.py for the details of template_env, that exposes global
+ # 'sons' as a list of sons with each a set of a few attributes
+ def json_settings_list (self):
+ return []
+
+ def export_json_settings(self):
+ return True
+++ /dev/null
-from unfold.composite import Composite
-
-class Tabs (Composite):
-
- def requirements (self):
- return { 'js_files' : ['js/tabs.js', 'js/bootstrap.js'],
- 'css_files' : ['css/bootstrap.css', 'css/tabs.css', ]
- }
-
- def template_file (self):
- return "tabs.html"
-
- # see Composite.py for the details of template_env, that exposes global
- # 'sons' as a list of sons with each a set of a few attributes
- def json_settings_list (self):
- return []
-
- def export_json_settings(self):
- return True
from myslice.viewutils import topmenu_items, the_user
-from plugins.raw.raw import Raw
-from plugins.stack.stack import Stack
-from plugins.tabs.tabs import Tabs
+from plugins.raw import Raw
+from plugins.stack import Stack
+from plugins.tabs import Tabs
from plugins.hazelnut import Hazelnut
from plugins.resources_selected import ResourcesSelected
from plugins.googlemap import GoogleMap
from plugins.senslabmap.senslabmap import SensLabMap
-from plugins.querycode.querycode import QueryCode
+from plugins.querycode import QueryCode
from plugins.query_editor import QueryEditor
from plugins.active_filters import ActiveFilters
-from plugins.quickfilter.quickfilter import QuickFilter
-from plugins.messages.messages import Messages
-#from plugins.updater import Updater
+from plugins.quickfilter import QuickFilter
+from plugins.messages import Messages
tmp_default_slice='ple.upmc.myslicedemo'
from manifold.core.query import Query
#from manifold.manifoldquery import ManifoldQuery
-from plugins.stack.stack import Stack
+from plugins.stack import Stack
from plugins.lists.slicelist import SliceList
-from plugins.querycode.querycode import QueryCode
-from plugins.quickfilter.quickfilter import QuickFilter
+from plugins.querycode import QueryCode
+from plugins.quickfilter import QuickFilter
from trash.trashutils import quickfilter_criterias
from unfold.page import Page
from manifold.core.query import Query
-from plugins.stack.stack import Stack
-from plugins.tabs.tabs import Tabs
+from plugins.stack import Stack
+from plugins.tabs import Tabs
from plugins.lists.staticlist import StaticList
-from plugins.quickfilter.quickfilter import QuickFilter
-from plugins.querycode.querycode import QueryCode
-from plugins.raw.raw import Raw
-from plugins.messages.messages import Messages
+from plugins.quickfilter import QuickFilter
+from plugins.querycode import QueryCode
+from plugins.raw import Raw
+from plugins.messages import Messages
from plugins.hazelnut import Hazelnut
from plugins.updater import Updater