Commit 2abf9109 authored by mkomm's avatar mkomm
Browse files

update container view to extended plugin system

parent 3b527150
......@@ -52,7 +52,7 @@ class PXLBrowserExtension(AbstractExtension):
for plugin in pluginList:
instance = plugin()
#---------------------------------------------------------------------------------------------------for dev
if instance.getPluginName()=="BasicNavigation":
if instance.getPluginName()=="ContainerView":
logging.getLogger(__name__+".plugins").info("Load plugin config: "+plugin.__module__)
self.pluginConfigList.append(instance)
for jsfile in instance.getJSFiles():
......
import os
from vispa.extensions.pxlbrowser.plugins import PXLBrowserPluginConfig
from vispa.extensions.pxlbrowser.plugins.ContainerView.controller import Controller
class PluginConfig(PXLBrowserPluginConfig):
def __init__(self):
PXLBrowserPluginConfig.__init__(self)
@staticmethod
def getJSFiles():
def getJSFiles(self):
return [os.path.join('ContainerView','controller.js')]
@staticmethod
def getDescription():
def getDescription(self):
return "Plugin for simple navigation in pxlio-file"
@staticmethod
def getPluginName():
def getPluginName(self):
return "ContainerView"
@staticmethod
def getRemoteDirectories():
def getRemoteDirectories(self):
return []
@staticmethod
def getCherrypyController():
def getCherrypyController(self):
return None
@staticmethod
def getRemoteControllerClassString():
def getRemoteControllerClassString(self):
return None
\ No newline at end of file
......@@ -111,7 +111,8 @@ var ContainerView=PxlBrowserPlugin.extend({
$(document).ready(function() {
StaticPxlBrowserPluginManager.registerPlugin({
name: "View.Container",
pluginname: "ContainerView",
modulename: "View.Container",
constructor: ContainerView,
isModule: true,
dependencies: ["Cache.Container", "Navigation"]
......
......@@ -118,10 +118,12 @@ var PxlBrowserPluginManager= Class.extend({
var _this = this;
$.each (dependencies, function(index,depName) {
var depMatch = StaticPxlBrowserPluginManager.findSubPlugin(depName)[0];
if (!_this.availablePlugins[depMatch.modulename].isModule) {
if ((depMatch!=undefined) && (!_this.availablePlugins[depMatch.modulename].isModule)) {
if (!(depMatch.modulename in _this.activePlugins)) {
_this.newInstance(depMatch.modulename);
}
} else {
console.warn("could not resolve dependencies for pxlbrowser plugin: '"+modulename+"' requires '"+dependencies+"'");
}
});
//console.log(dependencies);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment