--- /dev/null
+/*
+ * - LGPL
+ *
+ * page contgainer.
+ *
+ */
+Roo.bootstrap.ButtonGroup = function(config){
+ Roo.bootstrap.ButtonGroup.superclass.constructor.call(this, config);
+};
+
+Roo.extend(Roo.bootstrap.ButtonGroup, Roo.bootstrap.Component, {
+
+ size: '',
+ align: '',
+ dropdirection: '',
+
+ autoCreate : {
+ cls: 'btn-group',
+ html : null
+ },
+
+ getAutoCreate : function(){
+
+ var cfg = Roo.apply({}, Roo.bootstrap.ButtonGroup.superclass.getAutoCreate.call(this));
+
+ cfg.html = this.html || cfg.html;
+
+ if (['vertical','justified'].indexOf(this.align)!==-1) {
+ cfg.cls = 'btn-group-' + this.align;
+
+ if (this.align==='justified') {
+ console.log(this.items)
+ }
+ }
+
+ if (['lg','sm','xs'].indexOf(this.size)!==-1) {
+ cfg.cls += ' btn-group-' + this.size;
+ }
+
+ if (['dropup'].indexOf(this.dropdirection)) {
+ cfg.cls += ' dropup';
+ }
+
+ return cfg;
+ }
+
+});
+
+
\ No newline at end of file
--- /dev/null
+/*
+ * - LGPL
+ *
+ * row
+ *
+ */
+Roo.bootstrap.Menu = function(config){
+ Roo.bootstrap.Menu.superclass.constructor.call(this, config);
+};
+
+Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component, {
+
+ html : false,
+ align : '',
+ triggerEl : false,
+
+
+ getChildContainer : function() {
+ return this.el;
+ },
+
+ getAutoCreate : function(){
+
+ //if (['right'].indexOf(this.align)!==-1) {
+ // cfg.cn[1].cls += ' pull-right'
+ //}
+
+ return {
+ tag : 'ul',
+ cls : 'dropdown-menu',
+
+ };
+ },
+ initEvents : function() {
+ Roo.log("ADD event");
+ Roo.log(this.triggerEl.dom);
+ this.triggerEl.on('click', this.toggle, this);
+
+ },
+ toggle : function(e)
+ {
+ Roo.log(e.getTarget());
+ Roo.log(this.triggerEl.dom);
+ if (Roo.get(e.getTarget()).findParent('.dropdown-menu')) {
+ return;
+ }
+ var isActive = this.triggerEl.hasClass('open');
+ // if disabled.. ingore
+ this.clearMenus(e);
+ //if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
+ // if mobile we use a backdrop because click events don't delegate
+ // $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
+ // }
+
+ //var relatedTarget = { relatedTarget: this }
+ //$parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
+
+ //if (e.isDefaultPrevented()) return;
+
+ this.triggerEl.toggleClass('open');
+
+ // .trigger('shown.bs.dropdown', relatedTarget)
+
+ this.triggerEl.focus();
+ Roo.log(e);
+ e.preventDefault();
+
+
+ },
+ clearMenus : function()
+ {
+ //$(backdrop).remove()
+ this.triggerEl.select('a.dropdown-toggle',true).each(function(aa) {
+ if (!aa.hasClass('open')) {
+ return;
+ }
+ // triger close...
+ aa.removeClass('open');
+ //var parent = getParent($(this))
+ //var relatedTarget = { relatedTarget: this }
+
+ //$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
+ //if (e.isDefaultPrevented()) return
+ //$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
+ })
+ }
+
+
+});
+
+
+
+
\ No newline at end of file
--- /dev/null
+/*
+ * - LGPL
+ *
+ * row
+ *
+ */
+Roo.bootstrap.MenuItem = function(config){
+ Roo.bootstrap.MenuItem.superclass.constructor.call(this, config);
+};
+
+Roo.extend(Roo.bootstrap.MenuItem, Roo.bootstrap.Component, {
+
+ href : false,
+ html : false,
+
+
+
+ getAutoCreate : function(){
+ var cfg= {
+ // cls: '',
+ tag : 'li',
+ cn : [
+ {
+ tag : 'a',
+ href : '#',
+ html : 'Link'
+ }
+ ]
+ };
+
+ cfg.cn[0].href = this.href || cfg.cn[0].href ;
+ cfg.cn[0].html = this.html || cfg.cn[0].html ;
+ return cfg;
+ }
+
+});
+
+
+
+
\ No newline at end of file
--- /dev/null
+/*
+ * - LGPL
+ *
+ * row
+ *
+ */
+Roo.bootstrap.Navbar.Button = function(config){
+ Roo.bootstrap.Navbar.Button.superclass.constructor.call(this, config);
+};
+
+Roo.extend(Roo.bootstrap.Navbar.Button, Roo.bootstrap.Component, {
+
+ href : false,
+ html : false,
+
+ autoCreate : {
+ cls: 'btn',
+ tag : 'button',
+ html: 'hello'
+ },
+
+ getAutoCreate : function(){
+
+ var cfg = {
+ cls: 'btn',
+ tag : 'button',
+ html: 'hello',
+ cn : []
+
+ } ;
+ cfg.cn.push({
+ html : this.html || '',
+ //href : this.
+ // )
+ });
+ cfg.cn.push({
+ tag: 'span',
+ cls : 'carat'
+ });
+
+ return cfg;
+ }
+
+});
+
+
+
+
\ No newline at end of file