Beispiel #1
0
 def __init__(self, button=Button(), **attrs):
     W3.Div.__init__(self, **attrs)
     self.baseattr(Class='dropdown')
     button.attr(**{'class' : 'dropdown-toggle', 'data-toggle' : 'dropdown', 'aria-haspopup' : 'true', 'aria-expanded' : 'false'})
     self['elems'].append(button)
     self._dropdown_menu = W3.Div(Class='dropdown-menu')
     self['elems'].append(self._dropdown_menu)
Beispiel #2
0
 def __init__(self, prev=Carousel.Prev(), next=Carousel.Next(), indicator=Carousel.Indicator(), **attrs):
     W3.Div.__init__(self, **attrs)
     self._carousel_id = createVid()
     self.baseattr(**{'id' : self._carousel_id, 'class' : 'carousel slide', 'data-ride' : 'carousel'})
     self._carousel_indicator = indicator
     self._carousel_count = 0
     self._carousel_inner = W3.Div(Class='carousel-inner')
     if indicator != None: self['elems'].append(self._carousel_indicator)
     self['elems'].append(self._carousel_inner)
     if prev != None: self['elems'].append(prev.attr(Href='#' + self._carousel_id))
     if next != None: self['elems'].append(next.attr(Href='#' + self._carousel_id))