def static(self, component=None, title=None, width=(100, "%"), height=(None, "px"), sizing=None, options=None, profile=False): """ Description: ------------ Related Pages: https://getbootstrap.com/docs/4.4/components/modal/ Attributes: ---------- :param component: :param title: :param width: :param height: :param sizing: :param options: :param profile: """ container = BsHtml.BsModals(self.context.rptObj, component or [], title, width, height, options or {}, profile) if sizing is not None: container.dialog.attr["class"].add("modal-%s" % sizing) container.attr['data-backdrop'] = "static" return container
def toast(self, component=None, title=None, width=(100, "%"), height=(None, "px"), options=None, profile=False): """ :param component: """ if component is not None and not isinstance(component, list): component = [component] h_toast = BsHtml.BsToasts(self.rptObj, component or [], title, width, height, options, profile) return h_toast
def actions(self, component=None, title=None, events=None, category='primary', width=(100, "%"), height=(None, "px"), sizing=None, options=None, profile=False): """ Description: ------------ Related Pages: https://getbootstrap.com/docs/4.4/components/modal/ Attributes: ---------- :param component: :param title: :param events: :param category: :param width: :param height: :param sizing: :param options: :param profile: """ container = BsHtml.BsModals(self.context.rptObj, component or [], title, width, height, options or {}, profile) if sizing is not None: container.dialog.attr["class"].add("modal-%s" % sizing) self.buttons = [] header = container.header closure = self.context.rptObj.bootstrap.buttons.close(dismiss='modal') closure.options.managed = False header += closure footer = container.footer for b in events: button = self.context.rptObj.bootstrap.button(b, category=category) button.options.managed = False footer += button return container
def card(self, component=None, title=None, width=(100, "%"), height=(None, "px"), options=None, profile=False): """ https://getbootstrap.com/docs/4.4/components/card/ :param data: """ container = BsHtml.BsCards(self.rptObj, component or [], title, width, height, options, profile) container.style.clear_all() container.attr["class"].add("card") return container
def confirmation(self, component=None, title=None, event='Valid', category='primary', width=(100, "%"), height=(None, "px"), sizing=None, options=None, profile=False): """ Description: ------------ Related Pages: https://getbootstrap.com/docs/4.4/components/modal/ Attributes: ---------- :param component: :param title: :param event: :param category: :param width: :param height: :param sizing: :param options: :param profile: """ container = BsHtml.BsModals(self.context.rptObj, component or [], title, width, height, options or {}, profile) if sizing is not None: container.dialog.attr["class"].add("modal-%s" % sizing) self.button = self.context.rptObj.bootstrap.button(event, category=category) self.button.options.managed = False self.button.attr["data-dismiss"] = "modal" footer = container.footer footer += self.button return container
def composite(self, schema, width=(None, "%"), height=(None, "px"), htmlCode=None, helper=None, options=None, profile=None): """ Description: ------------ Composite bespoke object. This object will be built based on its schema. No specific CSS Style and class will be added to this object. The full definition will be done in the nested dictionary schema. Usage:: schema = {'type': 'div', 'css': {}, 'class': , 'attrs': {} 'arias': {}, 'children': [ {'type': : {...}} ... ]} Attributes: ---------- :param schema: Dictionary. The schema of the composite item with the different sub items :param width: Optional. Tuple. The component width in pixel or percentage :param height: Optional. Tuple. The component height in pixel or percentage :param htmlCode: Optional. String. The component identifier code (for both Python and Javascript) :param helper: Optional. String. Optional. The helper message :param options: Optional. Dictionary. the component specific items :param profile: Optional. Not yet available """ html_help = BsHtml.BsComposite(self.rptObj, schema, width=width, height=height, htmlCode=htmlCode, profile=profile, options=options or {}, helper=helper) return html_help