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

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

        tabs = eval_app_config(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, d)

        self.tabs = tabs
        self.tabwidget = tabwidget
        self.panewidget = panewidget
        self.root_id = self.id
Пример #2
0
    def update_params(self, d):
        super(TabbedContainer, self).update_params(d)
        if not getattr(d,"id",None):
            raise ValueError, "JQueryUITabs is supposed to have id"

        o = {
             'tabdefault': d.get('tabdefault', 0),
             'staticLoadOnClick': d.get('staticLoadOnClick', False)
            }
        self.add_call(when_ready(jQuery("#%s" % d.id).mokshatabs(o)))

        tabs = eval_app_config(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, d)

        d['tabs'] = tabs
        d['tabwidget'] = tabwidget
        d['panewidget'] = panewidget
        d['root_id'] = d['id']
Пример #3
0
    def prepare(self):
        super(DashboardContainer, self).prepare()
        layout = eval_app_config(config.get(self.config_key, "None"))

        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, d)
Пример #4
0
    def update_params(self, d):
        super(DashboardContainer, self).update_params(d)
        layout = eval_app_config(config.get(self.config_key, "None"))

        if not layout:
            if isinstance(d.layout, basestring):
                layout = eval_app_config(d.layout)
            else:
                layout = d.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
        d.layout = ConfigWrapper.process_wrappers(layout, d)

        return d