{
  xtype: 'container'
	,title: ip2.i18n('translate')
	,closable: true
  ,onInitialize: function(myPanel) {
    if (!Ext.ClassManager.isCreated('messageDescription')) {
      Ext.define('messageDescription', {
        extend: 'Ext.data.Model'
        ,proxy:{
          type:'ajax'
          ,url:ip2.navigator.setUrl('message', {action:'list'})
          ,reader:{
            type:'json'
            ,rootProperty:'rows'
            ,totalProperty:'totalRows'
          }
        }
      });
    }

    var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
        clicksToEdit: 1
    });

    var grid = Ext.create('Ext.grid.Panel', {
      hidden:true
      ,flex:1
      ,autoScroll:true
      ,store:Ext.create('Ext.data.BufferedStore', {
        model:'messageDescription'
        ,pageSize: 300
        ,listeners:{
          update: function(store, record, operation) {
            var params = {}
            params.msgId   = record.data.MSGID;
            params.msgF    = ip2.navigator.up.getValue(grid, 'panel', 'msgF');
            params.msgTxt2 = record.data.MSGTXT2;
            Ext.Ajax.request({
              url:ip2.navigator.setUrl('message', {action:'update'})
              ,params: params
              ,method: 'POST'
            })
          }
        }
      })
      ,columns: [
        {header: ip2.i18n('MSGID'),  dataIndex: 'MSGID'}
        ,{header: ip2.i18n('fromText'), dataIndex: 'MSGTXT1', flex:3}
        ,{header: ip2.i18n('toText'), dataIndex: 'MSGTXT2', flex:3
          ,field:{xtype:'textfield', hideLabel:true, name:'langugeText', width:500, allowBlank:false}
        }
      ]
      ,listeners: {
        itemcontextmenu:function(view, record, item, index, e) {
          e.stopEvent();
          var coords = e.getXY();
          rowMenu.showAt([coords[0], coords[1]]);
        }
      }
		  ,tbar:[{
        xtype:'button'
        ,text:ip2.i18n('refresh')
        ,iconCls:'ip2-icon-refresh'
        ,handler:function() {
          grid.store.load();
          grid.getView().refresh();
        }
      }]
      ,plugins: [cellEditing]
    });

    var i_panel = Ext.widget("panel", {
      layout: "border",
      items: [
        {
          xtype:"panel"
          ,region:"north"
          ,border:false
          ,height:40
          ,layout: 'anchor'
          ,defaults:{
            border:false
          }
          ,items: [{
            xtype:'hidden',name:'msgF'
          },{
            xtype:'panel'
            ,height:26
            ,margin:5
            ,items: [{
              xtype:'ip2NavigatorLanguageComboBox'
              ,width:500
              ,listWidth:500
              ,listeners:{
                select:function(box, record) {
                  var msgF = 'I18N_' + record.data.LNGID.split('-')[0]
                  ip2.navigator.up.setValue(box, 'panel', 'msgF', msgF);

                  grid.show();
                  grid.store.load({params:{msgF:msgF}});
                }
              }
            }]
          }]
        },
        {
          xtype:'panel'
          ,border:false
          ,flex:1
          ,region:"center"
          ,layout: "fit"
          ,items:grid
        }
      ]
    });

    myPanel.add(i_panel);
  }
}
