use SliceList rather than SimpleList
[unfold.git] / engine / plugin.py
index 00b37b7..92bbe6c 100644 (file)
@@ -61,7 +61,8 @@ class Plugin:
         self.title=title
         if not domid: domid=Plugin.newdomid()
         self.domid=domid
-        self.classname=self._classname()
+        self.classname=self._py_classname()
+        self.plugin_classname=self._js_classname()
         self.visible=visible
         self.togglable=togglable
         self.toggled=toggled
@@ -77,10 +78,14 @@ class Plugin:
         # do this only once the structure is fine
         self.pluginset.record_plugin(self)
 
-    def _classname (self): 
+    def _py_classname (self): 
         try:    return self.__class__.__name__
         except: return 'Plugin'
 
+    def _js_classname (self): 
+        try:    return self.plugin_classname ()
+        except: return self._py_classname()
+
     ##########
     def need_debug (self):
         if not DEBUG:           return False
@@ -221,3 +226,5 @@ class Plugin:
     # also 'query_uuid' gets replaced with query.uuid
     def json_settings_list (self): return ['json_settings_list-must-be-redefined']
 
+    # might also define this one; see e.g. slicelist.py that piggybacks simplelist js code
+    # def plugin_classname (self):