Roo/form/ComboBoxArray.js
[roojs1] / roojs-bootstrap-debug.js
index e82ff0a..01016b8 100644 (file)
@@ -16,6 +16,7 @@ Roo.bootstrap = Roo.bootstrap || {};
  * @cfg {Boolean} can_build_overlaid  True if element can be rebuild from a HTML page
  * @cfg {string} dataId cutomer id
  * @cfg {string} name Specifies name attribute
+ * @cfg {string} tooltip  Text for the tooltip
  * 
  * @constructor
  * Do not use directly - it does not do anything..
@@ -39,7 +40,11 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
     
     autoCreate : false,
     
-    initEvents : function() {  },
+    tooltip : null,
+    /**
+     * Initialize Events for the element
+     */
+    initEvents : function() { },
     
     xattr : false,
     
@@ -104,8 +109,14 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
             cfg.name = this.name;
         }
         
+       
+        
         this.el = ct.createChild(cfg, position);
         
+        if (this.tooltip) {
+            this.tooltipEl().attr('tooltip', this.tooltip);
+        }
+        
         if(this.tabIndex !== undefined){
             this.el.dom.setAttribute('tabIndex', this.tabIndex);
         }
@@ -113,13 +124,23 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
        
         
     },
-    
+    /**
+     * Fetch the element to add children to
+     * @return {Roo.Element} defaults to this.el
+     */
     getChildContainer : function()
     {
         return this.el;
     },
-    
-    
+    /**
+     * Fetch the element to display the tooltip on.
+     * @return {Roo.Element} defaults to this.el
+     */
+    tooltipEl : function()
+    {
+        return this.el;
+    },
+        
     addxtype  : function(tree,cntr)
     {
         var cn = this;
@@ -179,7 +200,7 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
     
     addxtypeChild : function (tree, cntr)
     {
-        Roo.log('addxtypeChild:' + cntr);
+        Roo.debug && Roo.log('addxtypeChild:' + cntr);
         var cn = this;
         cntr = (typeof(cntr) == 'undefined' ) ? 'getChildContainer' : cntr;
         
@@ -225,10 +246,10 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
                   //  Roo.log("GOT");
                     //echild.dom.removeAttribute('xtype');
                 } else {
-                    Roo.log("MISSING " + cn.xtype + " on child of " + (this.el ? this.el.attr('xbuilderid') : 'no parent'));
-                    Roo.log(self_cntr_el);
-                    Roo.log(echild);
-                    Roo.log(cn);
+                    Roo.debug && Roo.log("MISSING " + cn.xtype + " on child of " + (this.el ? this.el.attr('xbuilderid') : 'no parent'));
+                    Roo.debug && Roo.log(self_cntr_el);
+                    Roo.debug && Roo.log(echild);
+                    Roo.debug && Roo.log(cn);
                 }
             }
            
@@ -237,10 +258,10 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
             // if object has flexy:if - then it may or may not be rendered.
             if (build_from_html && has_flexy && !cn.el &&  cn.can_build_overlaid) {
                 // skip a flexy if element.
-                Roo.log('skipping render');
-                Roo.log(tree);
+                Roo.debug && Roo.log('skipping render');
+                Roo.debug && Roo.log(tree);
                 if (!cn.el) {
-                    Roo.log('skipping all children');
+                    Roo.debug && Roo.log('skipping all children');
                     skip_children = true;
                 }
                 
@@ -1429,7 +1450,7 @@ Roo.bootstrap.MenuMgr = function(){
    // private
    function onMouseDown(e){
         Roo.log("on MouseDown");
-        if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu")){
+        if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu") && !e.getTarget('.user-menu')){
            hideAll();
         }
         
@@ -1691,7 +1712,7 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
     onClick : function(e){
         Roo.log("menu.onClick");
         var t = this.findTargetItem(e);
-        if(!t){
+        if(!t || t.isContainer){
             return;
         }
         Roo.log(e);
@@ -3719,17 +3740,20 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
         
         return cfg;
     },
-    initEvents: function() {
-       // Roo.log('init events?');
-       // Roo.log(this.el.dom);
+    initEvents: function() 
+    {
         if (typeof (this.menu) != 'undefined') {
             this.menu.parentType = this.xtype;
             this.menu.triggerEl = this.el;
             this.addxtype(Roo.apply({}, this.menu));
         }
-
-       
+        
         this.el.select('a',true).on('click', this.onClick, this);
+        
+        if(this.tagtype == 'span'){
+            this.el.select('span',true).on('click', this.onClick, this);
+        }
+       
         // at this point parent should be available..
         this.parent().register(this);
     },
@@ -3754,6 +3778,11 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
         if(this.fireEvent('click', this, e) === false){
             return;
         };
+        
+        if(this.tagtype == 'span'){
+            return;
+        }
+        
         var p = this.parent();
         if (['tabs','pills'].indexOf(p.type)!==-1) {
             if (typeof(p.setActiveItem) !== 'undefined') {
@@ -7198,6 +7227,12 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
     {
         return this.el.select('input.form-control',true).first();
     },
+    
+    tooltipEl : function()
+    {
+        return this.inputEl();
+    },
+    
     setDisabled : function(v)
     {
         var i  = this.inputEl().dom;
@@ -7210,7 +7245,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
     },
     initEvents : function()
     {
-        
+          
         this.inputEl().on("keydown" , this.fireKey,  this);
         this.inputEl().on("focus", this.onFocus,  this);
         this.inputEl().on("blur", this.onBlur,  this);
@@ -10126,7 +10161,7 @@ Roo.extend(Roo.data.JsonReader, Roo.data.DataReader, {
                if (s.id) {
                        var g = this.getJsonAccessor(s.id);
                        this.getId = function(rec) {
-                               var r = g(rec);
+                               var r = g(rec);  
                                return (r === undefined || r === "") ? null : r;
                        };
                } else {
@@ -11303,12 +11338,6 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
     setFromData : function(o){
         
         if(this.multiple){
-            if(typeof o.display_name !== 'string'){
-                for(var i=0;i<o.display_name.length;i++){
-                    this.addItem({'id':o.id[i],'display_name':o.display_name[i]});
-                }
-                return;
-            }
             this.addItem(o);
             return;
         }
@@ -11815,7 +11844,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         // scroll to?
         this.view.select(match);
         var sn = Roo.get(this.view.getSelectedNodes()[0])
-        //sn.scrollIntoView(sn.dom.parentNode, false);
+        sn.scrollIntoView(sn.dom.parentNode, false);
     },
     
     onViewScroll : function(e, t){
@@ -12605,6 +12634,7 @@ Roo.extend(Roo.View, Roo.util.Observable, {
         if(!keepExisting){
             this.clearSelections(true);
         }
+        
         if(this.fireEvent("beforeselect", this, node, this.selections) !== false){
             Roo.fly(node).addClass(this.selectedClass);
             this.selections.push(node);
@@ -13627,7 +13657,8 @@ Roo.extend(Roo.bootstrap.Calendar, Roo.bootstrap.Component,  {
  * @cfg {String} placement how it is placed
  * @cfg {String} trigger click || hover (or false to trigger manually)
  * @cfg {String} over what (parent or false to trigger manually.)
- * 
+ * @cfg {Number} delay - delay before showing
  * @constructor
  * Create a new Popover
  * @param {Object} config The config object
@@ -13645,6 +13676,8 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component,  {
     placement : 'right',
     trigger : 'hover', // hover
     
+    delay : 0,
+    
     over: 'parent',
     
     can_build_overlaid : false,
@@ -14343,15 +14376,15 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
  * @extends Roo.bootstrap.Input
  * Bootstrap DateField class
  * @cfg {Number} weekStart default 0
- * @cfg {Number} weekStart default 0
- * @cfg {Number} viewMode default empty, (months|years)
- * @cfg {Number} minViewMode default empty, (months|years)
+ * @cfg {String} viewMode default empty, (months|years)
+ * @cfg {String} minViewMode default empty, (months|years)
  * @cfg {Number} startDate default -Infinity
  * @cfg {Number} endDate default Infinity
  * @cfg {Boolean} todayHighlight default false
  * @cfg {Boolean} todayBtn default false
  * @cfg {Boolean} calendarWeeks default false
  * @cfg {Object} daysOfWeekDisabled default empty
+ * @cfg {Boolean} singleMode default false (true | false)
  * 
  * @cfg {Boolean} keyboardNavigation default true
  * @cfg {String} language default en
@@ -14427,6 +14460,8 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
     
     _events: [],
     
+    singleMode : false,
+    
     UTCDate: function()
     {
         return new Date(Date.UTC.apply(Date, arguments));
@@ -14514,6 +14549,16 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
         
         this.startViewMode = this.viewMode;
         
+        if(this.singleMode){
+            Roo.each(this.picker().select('thead > tr > th', true).elements, function(v){
+                v.setVisibilityMode(Roo.Element.DISPLAY)
+                v.hide();
+            })
+            
+            Roo.each(this.picker().select('tbody > tr > td', true).elements, function(v){
+                v.setStyle('width', '189px');
+            });
+        }
         
         Roo.each(this.picker().select('tfoot th.today', true).elements, function(v){
             if(!this.calendarWeeks){
@@ -14762,6 +14807,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
         if (dir) {
             this.viewMode = Math.max(this.minViewMode, Math.min(2, this.viewMode + dir));
         }
+        
         Roo.each(this.picker().select('>div',true).elements, function(v){
             v.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
             v.hide();
@@ -14798,7 +14844,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
             return value;
         }
         var v = Date.parseDate(value, this.format);
-        if (!v && this.useIso) {
+        if (!v && (this.useIso || value.match(/^(\d{4})-0?(\d+)-0?(\d+)/))) {
             v = Date.parseDate(value, 'Y-m-d');
         }
         if(!v && this.altFormats){
@@ -14813,7 +14859,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
     },
     
     formatDate : function(date, fmt)
-    {
+    {   
         return (!date || !(date instanceof Date)) ?
         date : date.dateFormat(fmt || this.format);
     },
@@ -14869,7 +14915,11 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
 
     setValue: function(v)
     {
-        var d = new Date(v).clearTime();
+        
+        // v can be a string or a date..
+        
+        
+        var d = new Date(this.parseDate(v) ).clearTime();
         
         if(isNaN(d.getTime())){
             this.date = this.viewDate = '';
@@ -14996,6 +15046,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
         var nodeName = target.nodeName;
         var className = target.className;
         var html = target.innerHTML;
+        //Roo.log(nodeName);
         
         switch(nodeName.toLowerCase()) {
             case 'th':
@@ -15028,34 +15079,42 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
                 }
                 break;
             case 'span':
-                if (className.indexOf('disabled') === -1) {
+                if (className.indexOf('disabled') < 0) {
                     this.viewDate.setUTCDate(1);
-                    if (className.indexOf('month') !== -1) {
+                    if (className.indexOf('month') > -1) {
                         this.viewDate.setUTCMonth(Roo.bootstrap.DateField.dates[this.language].monthsShort.indexOf(html));
                     } else {
                         var year = parseInt(html, 10) || 0;
                         this.viewDate.setUTCFullYear(year);
                         
                     }
+                    
+                    if(this.singleMode){
+                        this.setValue(this.formatDate(this.viewDate));
+                        this.hide();
+                        return;
+                    }
+                    
                     this.showMode(-1);
                     this.fill();
                 }
                 break;
                 
             case 'td':
-                if (className.indexOf('day') !== -1 && className.indexOf('disabled') === -1){
+                //Roo.log(className);
+                if (className.indexOf('day') > -1 && className.indexOf('disabled') < 0 ){
                     var day = parseInt(html, 10) || 1;
                     var year = this.viewDate.getUTCFullYear(),
                         month = this.viewDate.getUTCMonth();
 
-                    if (className.indexOf('old') !== -1) {
+                    if (className.indexOf('old') > -1) {
                         if(month === 0 ){
                             month = 11;
                             year -= 1;
                         }else{
                             month -= 1;
                         }
-                    } else if (className.indexOf('new') !== -1) {
+                    } else if (className.indexOf('new') > -1) {
                         if (month == 11) {
                             month = 0;
                             year += 1;
@@ -15063,9 +15122,11 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
                             month += 1;
                         }
                     }
+                    //Roo.log([year,month,day]);
                     this.date = this.UTCDate(year, month, day,0,0,0,0);
                     this.viewDate = this.UTCDate(year, month, Math.min(28, day),0,0,0,0);
 //                    this.fill();
+                    //Roo.log(this.formatDate(this.date));
                     this.setValue(this.formatDate(this.date));
                     this.hide();
                 }
@@ -15108,6 +15169,10 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
     
     updateNavArrows: function() 
     {
+        if(this.singleMode){
+            return;
+        }
+        
         var d = new Date(this.viewDate),
         year = d.getUTCFullYear(),
         month = d.getUTCMonth();
@@ -19877,6 +19942,7 @@ Roo.bootstrap.dash = Roo.bootstrap.dash || {};
  * @cfg {String} title Title of the TabBox
  * @cfg {String} icon Icon of the TabBox
  * @cfg {Boolean} showtabs (true|false) show the tabs default true
+ * @cfg {Boolean} tabScrollable (true|false) tab scrollable when mobile view default false
  * 
  * @constructor
  * Create a new TabBox
@@ -19893,9 +19959,18 @@ Roo.bootstrap.dash.TabBox = function(config){
          * When a pane is added
          * @param {Roo.bootstrap.dash.TabPane} pane
          */
-        "addpane" : true
+        "addpane" : true,
+        /**
+         * @event activatepane
+         * When a pane is activated
+         * @param {Roo.bootstrap.dash.TabPane} pane
+         */
+        "activatepane" : true
+        
          
     });
+    
+    this.panes = [];
 };
 
 Roo.extend(Roo.bootstrap.dash.TabBox, Roo.bootstrap.Component,  {
@@ -19903,6 +19978,7 @@ Roo.extend(Roo.bootstrap.dash.TabBox, Roo.bootstrap.Component,  {
     title : '',
     icon : false,
     showtabs : true,
+    tabScrollable : false,
     
     getChildContainer : function()
     {
@@ -19925,18 +20001,35 @@ Roo.extend(Roo.bootstrap.dash.TabBox, Roo.bootstrap.Component,  {
             });
         }
         
+        var h = {
+            tag: 'ul',
+            cls: 'nav nav-tabs pull-right',
+            cn: [
+                header
+            ]
+        };
+        
+        if(this.tabScrollable){
+            h = {
+                tag: 'div',
+                cls: 'tab-header',
+                cn: [
+                    {
+                        tag: 'ul',
+                        cls: 'nav nav-tabs pull-right',
+                        cn: [
+                            header
+                        ]
+                    }
+                ]
+            }
+        }
         
         var cfg = {
             tag: 'div',
             cls: 'nav-tabs-custom',
             cn: [
-                {
-                    tag: 'ul',
-                    cls: 'nav nav-tabs pull-right',
-                    cn: [
-                        header
-                    ]
-                },
+                h,
                 {
                     tag: 'div',
                     cls: 'tab-content no-padding',
@@ -19962,6 +20055,7 @@ Roo.extend(Roo.bootstrap.dash.TabBox, Roo.bootstrap.Component,  {
     },
     onAddPane : function(pane)
     {
+        this.panes.push(pane);
         //Roo.log('addpane');
         //Roo.log(pane);
         // tabs are rendere left to right..
@@ -20008,11 +20102,26 @@ Roo.extend(Roo.bootstrap.dash.TabBox, Roo.bootstrap.Component,  {
         this.getChildContainer().select('.tab-pane',true).removeClass('active');
         // technically we should have a deactivate event.. but maybe add later.
         // and it should not de-activate the selected tab...
-        
+        this.fireEvent('activatepane', pane);
         pane.el.addClass('active');
         pane.fireEvent('activate');
         
         
+    },
+    
+    getActivePane : function()
+    {
+        var r = false;
+        Roo.each(this.panes, function(p) {
+            if(p.el.hasClass('active')){
+                r = p;
+                return false;
+            }
+            
+            return;
+        });
+        
+        return r;
     }
     
     
@@ -20505,4 +20614,259 @@ Roo.extend(Roo.bootstrap.menu.Separator, Roo.bootstrap.Component,  {
 
  
 
+ /*
+ * - LGPL
+ *
+ * Tooltip
+ * 
+ */
+
+/**
+ * @class Roo.bootstrap.Tooltip
+ * Bootstrap Tooltip class
+ * This is basic at present - all componets support it by default, however they should add tooltipEl() method
+ * to determine which dom element triggers the tooltip.
+ * 
+ * It needs to add support for additional attributes like tooltip-position
+ * 
+ * @constructor
+ * Create a new Toolti
+ * @param {Object} config The config object
+ */
+
+Roo.bootstrap.Tooltip = function(config){
+    Roo.bootstrap.Tooltip.superclass.constructor.call(this, config);
+};
+
+Roo.apply(Roo.bootstrap.Tooltip, {
+    /**
+     * @function init initialize tooltip monitoring.
+     * @static
+     */
+    currentEl : false,
+    currentTip : false,
+    currentRegion : false,
+    
+    //  init : delay?
+    
+    init : function()
+    {
+        Roo.get(document).on('mouseover', this.enter ,this);
+        Roo.get(document).on('mouseout', this.leave, this);
+         
+        
+        this.currentTip = new Roo.bootstrap.Tooltip();
+    },
+    
+    enter : function(ev)
+    {
+        var dom = ev.getTarget();
+        //Roo.log(['enter',dom]);
+        var el = Roo.fly(dom);
+        if (this.currentEl) {
+            //Roo.log(dom);
+            //Roo.log(this.currentEl);
+            //Roo.log(this.currentEl.contains(dom));
+            if (this.currentEl == el) {
+                return;
+            }
+            if (dom != this.currentEl.dom && this.currentEl.contains(dom)) {
+                return;
+            }
+
+        }
+        
+        
+        
+        if (this.currentTip.el) {
+            this.currentTip.el.hide(); // force hiding...
+        }    
+        //Roo.log(el);
+        if (!el.attr('tooltip')) { // parents who have tip?
+            return;
+        }
+        this.currentEl = el;
+        this.currentTip.bind(el);
+        this.currentRegion = Roo.lib.Region.getRegion(dom);
+        this.currentTip.enter();
+        
+    },
+    leave : function(ev)
+    {
+        var dom = ev.getTarget();
+        //Roo.log(['leave',dom]);
+        if (!this.currentEl) {
+            return;
+        }
+        
+        
+        if (dom != this.currentEl.dom) {
+            return;
+        }
+        var xy = ev.getXY();
+        if (this.currentRegion.contains( new Roo.lib.Region( xy[1], xy[0] ,xy[1], xy[0]  ))) {
+            return;
+        }
+        // only activate leave if mouse cursor is outside... bounding box..
+        
+        
+        
+        
+        if (this.currentTip) {
+            this.currentTip.leave();
+        }
+        //Roo.log('clear currentEl');
+        this.currentEl = false;
+        
+        
+    },
+    alignment : {
+        'left' : ['r-l', [-2,0], 'right'],
+        'right' : ['l-r', [2,0], 'left'],
+        'bottom' : ['t-b', [0,2], 'top'],
+        'top' : [ 'b-t', [0,-2], 'bottom']
+    }
+    
+});
+
+
+Roo.extend(Roo.bootstrap.Tooltip, Roo.bootstrap.Component,  {
+    
+    
+    bindEl : false,
+    
+    delay : null, // can be { show : 300 , hide: 500}
+    
+    timeout : null,
+    
+    hoverState : null, //???
+    
+    placement : 'bottom', 
+    
+    getAutoCreate : function(){
+    
+        var cfg = {
+           cls : 'tooltip',
+           role : 'tooltip',
+           cn : [
+                {
+                    cls : 'tooltip-arrow'
+                },
+                {
+                    cls : 'tooltip-inner'
+                }
+           ]
+        };
+        
+        return cfg;
+    },
+    bind : function(el)
+    {
+        this.bindEl = el;
+    },
+      
+    
+    enter : function () {
+       
+        if (this.timeout != null) {
+            clearTimeout(this.timeout);
+        }
+        
+        this.hoverState = 'in'
+         //Roo.log("enter - show");
+        if (!this.delay || !this.delay.show) {
+            this.show();
+            return;
+        }
+        var _t = this;
+        this.timeout = setTimeout(function () {
+            if (_t.hoverState == 'in') {
+                _t.show();
+            }
+        }, this.delay.show);
+    },
+    leave : function()
+    {
+        clearTimeout(this.timeout);
+    
+        this.hoverState = 'out'
+         if (!this.delay || !this.delay.hide) {
+            this.hide();
+            return 
+        }
+       
+        var _t = this;
+        this.timeout = setTimeout(function () {
+            //Roo.log("leave - timeout");
+            
+            if (_t.hoverState == 'out') {
+                _t.hide();
+                Roo.bootstrap.Tooltip.currentEl = false;
+            }
+        }, delay)
+    },
+    
+    show : function ()
+    {
+        if (!this.el) {
+            this.render(document.body);
+        }
+        // set content.
+        //Roo.log([this.bindEl, this.bindEl.attr('tooltip')]);
+        this.el.select('.tooltip-inner',true).first().dom.innerHTML = this.bindEl.attr('tooltip');
+        
+        this.el.removeClass(['fade','top','bottom', 'left', 'right','in']);
+        
+        var placement = typeof this.placement == 'function' ?
+            this.placement.call(this, this.el, on_el) :
+            this.placement;
+            
+        var autoToken = /\s?auto?\s?/i;
+        var autoPlace = autoToken.test(placement);
+        if (autoPlace) {
+            placement = placement.replace(autoToken, '') || 'top';
+        }
+        
+        //this.el.detach()
+        //this.el.setXY([0,0]);
+        this.el.show();
+        //this.el.dom.style.display='block';
+        this.el.addClass(placement);
+        
+        //this.el.appendTo(on_el);
+        
+        var p = this.getPosition();
+        var box = this.el.getBox();
+        
+        if (autoPlace) {
+            // fixme..
+        }
+        var align = Roo.bootstrap.Tooltip.alignment[placement]
+        this.el.alignTo(this.bindEl, align[0],align[1]);
+        //var arrow = this.el.select('.arrow',true).first();
+        //arrow.set(align[2], 
+        
+        this.el.addClass('in fade');
+        this.hoverState = null;
+        
+        if (this.el.hasClass('fade')) {
+            // fade it?
+        }
+        
+    },
+    hide : function()
+    {
+         
+        if (!this.el) {
+            return;
+        }
+        //this.el.setXY([0,0]);
+        this.el.removeClass('in');
+        //this.el.hide();
+        
+    }
+    
+});
+
  
\ No newline at end of file