Exemple #1
0
    def prepare(self):
        super(TabbedContainer, self).prepare()
        if not getattr(self, "id", None):
            raise ValueError("JQueryUITabs is supposed to have id")

        if self.config == None:
            self.config = {}

        o = {
            'tabdefault': self.tabdefault,
            'staticLoadOnClick': self.staticLoadOnClick
        }
        self.add_call(when_ready(
            tw2.jquery.jQuery("#%s" % self.id).mokshatabs(o)))

        tabs = eval_app_config(self.config.get(self.config_key, "None"))
        if not tabs:
            if isinstance(self.tabs, str):
                tabs = eval_app_config(self.tabs)
            else:
                tabs = self.tabs

        # Filter out any None's in the list which signify apps which are
        # not allowed to run with the current session's authorization level
        tabs = ConfigWrapper.process_wrappers(tabs, self)

        self.tabs = tabs
        self.tabwidget = tabwidget
        self.panewidget = panewidget
        self.root_id = id
Exemple #2
0
    def prepare(self):
        super(DashboardContainer, self).prepare()
        layout = eval_app_config(self.config_key)

        if not layout:
            if isinstance(self.layout, basestring):
                layout = eval_app_config(self.layout)
            else:
                layout = self.layout

        # Filter out any None's in the layout which signify apps which are
        # not allowed to run with the current session's authorization level
        self.layout = ConfigWrapper.process_wrappers(layout, self)