﻿/*!
 * Ext JS Library 3.0.0
 * Copyright(c) 2006-2009 Ext JS, LLC
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
var MX_DESCRIPTIONBIS4 = Ext.extend(Ext.util.Observable, {
    constructor: function(config){
        this.addEvents('finished'); // specify the events we're going to fire
        MX_DESCRIPTIONBIS4.constructor.call(this, config);
    },
    
    create: function(pid, value){
		var jsonData = Ext.util.JSON.decode(value.substring(3,value.length-3));
		jsonData.desc = jsonData.desc.length > 0 ? jsonData.desc : '&nbsp;';
		
		this.panel = new Ext.Panel({ 
			id: 'mt_detail_mx_descriptionbis4',
			title: jsonData.labels[0],
			hideLabel: (jsonData.labels[0].length > 0?false:true),
			layout:'form',
			width:'auto',
			html: '<div class="mt_detail_mx_description_field">'+jsonData.desc+"</div>",
			mobiClass: 'mx_descriptionbis4'
		});
		
		this.fireEvent('finished', this.panel);
    }
});
