// Create user extension namespace (Application)
Ext.namespace('Application');

/**
  *  Application.guestTree Extension class
  * 
  *  @author Seabor
  *  @version 1.0
  *  
  *  @class Application.guestTree
  *  @extends Ext.tree.treePanel
  *  @constructor
  *  @param {Object} config Configuration options
  */

Application.guestTree = function(config) {

    // call parent constructor
    Application.guestTree.superclass.constructor.call(this, config);
    
}; // end of Application.guestTree constructor

Ext.extend(Application.guestTree, Ext.tree.TreePanel, {

    // configurables
    // anything what is here can be configured from outside
	title: 'Каталог продукции',
	useArrows: false,
    autoScroll: true,
    animate: true,
    enableDD: false,
    containerScroll: true,
    border: true,
    requestMethod: 'GET',
	dataUrl: '/treejson',
    root: {
        nodeType: 'async',
        text: 'Ext JS',
        draggable: false,
        id: 'src'
    }
	,rootVisible: false
    ,bodyStyle: 'background: #142f4c url(/i/tree_bg.jpg) repeat-y'
    ,autoScroll: true
    
});

// register new xtype
Ext.reg('guestTree', Application.guestTree);
