papasilo
10 Sep 2012, 11:08 PM
Hi Mentors!
Im new with sencha touch :)
May I ask some advice on how to come up with the design.
38575
im using navigation view for this design, but it seems doesn't work :-|
Here's my code:
var onNavigationPush = function(v, item)
{
v.down('#txtSearchPeronsel').hide();
v.down('#cmdSearchPersonel').hide();
v.down('#cmdOptionPersonel').show();
}
var onNavigationPop = function(v, item)
{
console.log(v.getActiveItem().xtype);
if (v.getActiveItem().xtype == 'personellist')
{
v.down('#txtSearchPeronsel').show();
v.down('#cmdSearchPersonel').hide();
v.down('#cmdOptionPersonel').hide();
}
if (v.getActiveItem().xtype == 'personeldetail')
{
v.down('#cmdOptionPersonel').show();
}
}
Ext.define('InnosoftCRM.view.PersonelContainer',
{
extend: 'Ext.NavigationView',
require: ['Ext.Titlebar', 'Ext.List', 'InnosoftCRM.view.PersonelTaskList', 'InnosoftCRM.view.PersonelDetail'],
xtype: 'personelcontainer',
config:
{
autoDestroy: false,
iconCls: 'team',
title: 'Personel',
styleHtmlContent: true,
navigationBar:
{
items:
[
{
hidden: true,
xtype: 'button',
iconCls: 'action',
id: 'cmdSearchPersonel',
iconMask: true,
align: 'right'
},
{
xtype: 'button',
iconMask: true,
hidden: true,
iconCls: 'settings6',
action: 'selectactiontask',
id: 'cmdOptionPersonel',
align: 'right'
}
]
},
items:
[
{
xtype: 'container',
items:
[
{
xtype: 'searchfield',
placeHolder: 'Search...',
align: 'right',
id: 'txtSearchPeronsel'
},
{
xtype: 'personellist'
},
]
}
],
listeners:
{
pop: onNavigationPop,
push: onNavigationPush
}
}
})
:s
Thanks in advance :D
Im new with sencha touch :)
May I ask some advice on how to come up with the design.
38575
im using navigation view for this design, but it seems doesn't work :-|
Here's my code:
var onNavigationPush = function(v, item)
{
v.down('#txtSearchPeronsel').hide();
v.down('#cmdSearchPersonel').hide();
v.down('#cmdOptionPersonel').show();
}
var onNavigationPop = function(v, item)
{
console.log(v.getActiveItem().xtype);
if (v.getActiveItem().xtype == 'personellist')
{
v.down('#txtSearchPeronsel').show();
v.down('#cmdSearchPersonel').hide();
v.down('#cmdOptionPersonel').hide();
}
if (v.getActiveItem().xtype == 'personeldetail')
{
v.down('#cmdOptionPersonel').show();
}
}
Ext.define('InnosoftCRM.view.PersonelContainer',
{
extend: 'Ext.NavigationView',
require: ['Ext.Titlebar', 'Ext.List', 'InnosoftCRM.view.PersonelTaskList', 'InnosoftCRM.view.PersonelDetail'],
xtype: 'personelcontainer',
config:
{
autoDestroy: false,
iconCls: 'team',
title: 'Personel',
styleHtmlContent: true,
navigationBar:
{
items:
[
{
hidden: true,
xtype: 'button',
iconCls: 'action',
id: 'cmdSearchPersonel',
iconMask: true,
align: 'right'
},
{
xtype: 'button',
iconMask: true,
hidden: true,
iconCls: 'settings6',
action: 'selectactiontask',
id: 'cmdOptionPersonel',
align: 'right'
}
]
},
items:
[
{
xtype: 'container',
items:
[
{
xtype: 'searchfield',
placeHolder: 'Search...',
align: 'right',
id: 'txtSearchPeronsel'
},
{
xtype: 'personellist'
},
]
}
],
listeners:
{
pop: onNavigationPop,
push: onNavigationPush
}
}
})
:s
Thanks in advance :D