PDA

View Full Version : hideTabStripItem is not working on 3.2



intro
23 Oct 2010, 6:20 PM
Hi i am trying to hide one tab in tab strip.

this.tabizbornikwindow.hideTabStripItem('IzbornikSimpleHTML');

My tabpanel is "tabizbornikwindow" and tab "IzbornikSimpleHTML"

i can disable it but not hide.

Mabe i have to put some extra hide values for container -panel or..
Please i know that was lot of questions, but i try all and with no luck 6 hour spend.

Thanks in advance.

intro
24 Oct 2010, 7:40 AM
any one?

Animal
24 Oct 2010, 8:10 AM
show code.

intro
24 Oct 2010, 8:54 AM
i have big code..
But i am having tabpanel


MyTabPanelUi = Ext.extend(Ext.TabPanel, {
activeTab: 0,
region: 'center',
itemId: 'tabizbornikwindow',
hideMode: 'visibility',
autoHide: false,
maskDisabled: false,
id: 'tabizbornikwindow',
initComponent: function() {
this.items = [


and panel is

{
xtype: 'panel',
title: 'Rje?nik pojmova',
itemId: 'IzbornikSimpleHTML',
maskDisabled: false,
ref: 'IzbornikSimpleHTML',
id: 'IzbornikSimpleHTML',
items: [
{
xtype: 'form',
title: 'Rje?nik pojmova',
ref: '../RjecnikForm',
items: [
{
xtype: 'htmleditor',
height: 251,
name: 'RjecnikHTMLHR',
itemId: 'RjecnikHTMLHR',
fieldLabel: 'Rje?nik HR',
autoWidth: true,
ref: '../../RjecnikHTMLHR',
id: 'RjecnikHTMLHR'
},
{
xtype: 'htmleditor',
height: 285,
name: 'RjecnikHTMLEN',
itemId: 'RjecnikHTMLEN',
fieldLabel: 'Rje?nik EN',
autoWidth: true,
ref: '../../RjecnikHTMLEN',
id: 'RjecnikHTMLEN'
}
],
fbar: {
xtype: 'toolbar',
items: [
{
xtype: 'button',
text: 'Spremi',
style: 'padding:10px;',
itemId: 'SpremiCustomHTML',
ref: '../../../SpremiCustomHTML',
id: 'SpremiCustomHTML'
}
]
}
}
]
}
];

and i want to hide IzbornikSimpleHTML

intro
24 Oct 2010, 9:08 AM
sorry i paste all code..

Animal
24 Oct 2010, 10:23 AM
You'll have to break there, step into the code and see what's happening. It's not complicated code.

intro
24 Oct 2010, 1:08 PM
this is my all code... it is simple but i can not make to work..
mabe it is some simple false, true on some thing, i really can not find the way to make it work..Sorry..Thanks for help.
i add to the bottom

this.tabizbornikwindow.hideTabStripItem('IzbornikSimpleHTML'); and stil tab is show in tabpanel


MyTabPanelUi = Ext.extend(Ext.TabPanel, {
activeTab: 0,
region: 'center',
itemId: 'tabizbornikwindow',
hideMode: 'visibility',
autoHide: false,
maskDisabled: false,
id: 'tabizbornikwindow',
initComponent: function() {
this.items = [
{
xtype: 'panel',
title: 'HTML',
tpl: '',
itemId: 'IzbornikHTML',
autoScroll: true,
layout: 'form',
ref: 'IzbornikHTML',
id: 'IzbornikHTML',
items: [
{
xtype: 'form',
width: 920,
ref: '../Formularhtml',
items: [
{
xtype: 'fieldset',
title: 'HTML HR',
itemId: 'htmlHR',
style: 'margin:10px; padding-right:10px;',
height: 600,
width: 870,
ref: '../../htmlHR',
id: 'htmlHR',
items: [
{
xtype: 'textfield',
fieldLabel: 'Naziv HR',
anchor: '100%',
itemId: 'NazivIzbornikHR',
ref: '../../../NazivIzbornikHR',
id: 'NazivIzbornikHR'
}
]
},
{
xtype: 'fieldset',
title: 'HTML EN',
style: 'margin:10px;',
height: 600,
itemId: 'htmlEN',
width: 870,
ref: '../../htmlEN',
id: 'htmlEN',
items: [
{
xtype: 'textfield',
fieldLabel: 'Naziv EN',
anchor: '100%',
itemId: 'NazivIzbornikEN',
ref: '../../../NazivIzbornikEN',
id: 'NazivIzbornikEN'
}
]
}
],
fbar: {
xtype: 'toolbar',
height: 34,
hideBorders: true,
width: 200,
autoWidth: true,
buttonAlign: 'left',
items: [
{
xtype: 'button',
text: 'Spremi',
width: 100,
enableToggle: true,
scale: 'medium',
tooltipType: 'title',
arrowAlign: 'bottom',
ref: '../../../SpremiHTMLHR'
}
]
}
}
]
},
{
xtype: 'panel',
title: 'Download',
itemId: 'IzbornikDownload',
layout: 'form',
autoScroll: true,
width: 925,
ref: 'IzbornikDownload',
id: 'IzbornikDownload',
items: [
{
xtype: 'editorgrid',
title: 'Download HR',
store: 'DownloadBazaHR',
height: 341,
hideLabel: true,
itemId: 'DownloadHR',
autoShow: true,
enableColumnMove: false,
trackMouseOver: true,
stateId: 'DownloadHR',
stateful: true,
style: 'margin:10px;',
width: 915,
ddGroup: 'DownGridHR',
enableDragDrop: true,
ref: '../DownloadHR',
id: 'DownloadHR',
selModel: new Ext.grid.RowSelectionModel({
singleSelect: true
}),
columns: [
{
xtype: 'numbercolumn',
header: 'ID',
sortable: true,
width: 40,
align: 'Center',
format: 0,
dataIndex: 'ID',
editable: false,
id: 'ID'
},
{
xtype: 'gridcolumn',
dataIndex: 'NazivHR',
header: 'Ime dokumenta',
sortable: true,
width: 120,
editor: {
xtype: 'textfield'
}
},
{
xtype: 'gridcolumn',
header: 'Dokument',
sortable: true,
width: 190,
editable: false,
dataIndex: 'DocHR'
},
{
xtype: 'gridcolumn',
header: 'Ektenzija',
sortable: true,
width: 70,
dataIndex: 'Ekt',
editable: false
},
{
xtype: 'datecolumn',
header: 'Datum dodavanja',
sortable: true,
resizable: false,
width: 150,
dataIndex: 'DateAdd',
editable: false,
format: 'd.m.Y',
id: 'DateAdd'
},
{
xtype: 'datecolumn',
header: 'Datum zadnje promjene',
sortable: true,
width: 150,
dataIndex: 'DateChange',
editable: false,
format: 'd.m.Y',
id: 'DateChange'
},
{
xtype: 'gridcolumn',
dataIndex: 'Name_user',
header: 'User',
sortable: true,
width: 100
},
{
xtype: 'booleancolumn',
dataIndex: 'Status',
header: 'Status',
sortable: true,
width: 80,
falseText: 'Nektivan',
trueText: 'Aktivan',
editor: {
xtype: 'checkbox',
boxLabel: 'Promjena'
}
}
],
tbar: {
xtype: 'toolbar',
items: [
{
xtype: 'button',
text: 'Dodaj dokument',
itemId: 'AddDocHR',
ref: '../../../AddDocHR',
id: 'AddDocHR'
},
{
xtype: 'tbseparator'
},
{
xtype: 'button',
text: 'Obriši dokument',
ref: '../../../DelDocHR'
},
{
xtype: 'tbseparator'
},
{
xtype: 'button',
text: 'Promjeni dokumet',
itemId: 'ChgDocHR',
ref: '../../../ChgDocHR',
id: 'ChgDocHR'
}
]
},
bbar: {
xtype: 'paging',
store: 'DownloadBazaHR',
disabled: true,
displayInfo: true,
pageSize: 11
}
},
{
xtype: 'editorgrid',
title: 'DownloadEN',
store: 'DownloadBazaEN',
height: 341,
hideLabel: true,
itemId: 'DownloadEN',
autoShow: true,
enableColumnMove: false,
trackMouseOver: true,
stateId: 'DownloadEN',
stateful: true,
style: 'margin:10px;',
width: 916,
ddGroup: 'DownGridEN',
enableDragDrop: true,
ref: '../DownloadEN',
id: 'DownloadEN',
selModel: new Ext.grid.RowSelectionModel({
singleSelect: true
}),
columns: [
{
xtype: 'numbercolumn',
header: 'ID',
sortable: true,
width: 40,
align: 'Center',
format: 0,
dataIndex: 'ID',
editable: false,
id: 'ID'
},
{
xtype: 'gridcolumn',
dataIndex: 'NazivEN',
header: 'Ime dokumenta',
sortable: true,
width: 120,
editor: {
xtype: 'textfield'
}
},
{
xtype: 'gridcolumn',
header: 'Dokument',
sortable: true,
width: 190,
editable: false,
dataIndex: 'DocEN'
},
{
xtype: 'gridcolumn',
header: 'Ektenzija',
sortable: true,
width: 70,
dataIndex: 'Ekt',
editable: false
},
{
xtype: 'datecolumn',
header: 'Datum dodavanja',
sortable: true,
width: 150,
dataIndex: 'DateAdd',
editable: false,
format: 'd.m.Y',
id: 'DateAdd'
},
{
xtype: 'datecolumn',
header: 'Datum zadnje promjene',
sortable: true,
width: 150,
dataIndex: 'DateChange',
editable: false,
format: 'd.m.Y',
id: 'DateChange'
},
{
xtype: 'gridcolumn',
dataIndex: 'Name_user',
header: 'User',
sortable: true,
width: 100
},
{
xtype: 'booleancolumn',
dataIndex: 'Status',
header: 'Status',
sortable: true,
width: 80,
falseText: 'Nektivan',
trueText: 'Aktivan',
editor: {
xtype: 'checkbox',
boxLabel: 'Promjena'
}
}
],
tbar: {
xtype: 'toolbar',
items: [
{
xtype: 'button',
text: 'Dodaj dokument',
ref: '../../../AddDocEN'
},
{
xtype: 'tbseparator'
},
{
xtype: 'button',
text: 'Obriši dokument',
itemId: 'DelDocEN',
ref: '../../../DelDocEN',
id: 'DelDocEN'
},
{
xtype: 'tbseparator'
},
{
xtype: 'button',
text: 'Promjeni dokumet',
ref: '../../../ChgDocEN'
}
]
},
bbar: {
xtype: 'paging',
store: 'DownloadBazaEN',
disabled: true,
displayInfo: true,
pageSize: 11
}
}
]
},
{
xtype: 'panel',
title: 'Anketa',
itemId: 'IzbornikAnketa',
layout: 'border',
ref: 'IzbornikAnketa',
id: 'IzbornikAnketa',
items: [
{
xtype: 'panel',
title: 'Statistika',
region: 'east',
height: 310,
minWidth: 300,
width: 300,
ref: '../StatistikaAnketa'
},
{
xtype: 'panel',
region: 'center',
autoScroll: true,
layout: 'form',
height: 354,
items: [
{
xtype: 'editorgrid',
title: 'Anketa Hrvatski',
store: 'AnketaHRDB',
height: 331,
border: false,
autoShow: true,
itemId: 'GridHRVAnketa',
ref: '../../GridHRVAnketa',
id: 'GridHRVAnketa',
selModel: new Ext.grid.RowSelectionModel({
singleSelect: true
}),
columns: [
{
xtype: 'numbercolumn',
header: 'ID',
sortable: true,
width: 30,
align: 'right',
dataIndex: 'ID',
format: 0,
id: 'ID'
},
{
xtype: 'gridcolumn',
header: 'Pitanje',
sortable: true,
width: 380,
dataIndex: 'Pitanje',
editor: {
xtype: 'textfield'
}
},
{
xtype: 'datecolumn',
header: 'Datum kreiranja',
sortable: true,
width: 100,
dataIndex: 'DatumADD'
},
{
xtype: 'booleancolumn',
dataIndex: 'SHW',
header: 'Status',
sortable: true,
width: 100,
editor: {
xtype: 'checkbox',
boxLabel: 'Prikaz Ankete'
}
}
],
tbar: {
xtype: 'toolbar',
items: [
{
xtype: 'button',
text: 'Dodaj Anketu',
ref: '../../../../ADDAnketaHR'
},
{
xtype: 'tbseparator'
},
{
xtype: 'button',
text: 'Obriši anketu',
ref: '../../../../DELAnketaHR'
},
{
xtype: 'tbseparator'
},
{
xtype: 'button',
text: 'Odgovori',
ref: '../../../../ODGAnketaHR'
}
]
},
bbar: {
xtype: 'paging',
store: 'AnketaHRDB',
pageSize: 11
}
},
{
xtype: 'editorgrid',
title: 'Anketa Engleski',
store: 'AnketaENDB',
height: 284,
border: false,
autoShow: true,
itemId: 'GridENGAnketa',
ref: '../../GridENGAnketa',
id: 'GridENGAnketa',
selModel: new Ext.grid.RowSelectionModel({
singleSelect: true
}),
columns: [
{
xtype: 'numbercolumn',
header: 'ID',
sortable: true,
width: 30,
align: 'right',
dataIndex: 'ID',
format: 0,
id: 'ID'
},
{
xtype: 'gridcolumn',
header: 'Pitanje',
sortable: true,
width: 380,
dataIndex: 'Pitanje',
editor: {
xtype: 'textfield'
}
},
{
xtype: 'datecolumn',
header: 'Datum kreiranja',
sortable: true,
width: 100,
dataIndex: 'DatumADD'
},
{
xtype: 'booleancolumn',
dataIndex: 'SHW',
header: 'Status',
sortable: true,
width: 100,
editor: {
xtype: 'checkbox',
boxLabel: 'Prikaz Ankete'
}
}
],
tbar: {
xtype: 'toolbar',
items: [
{
xtype: 'button',
text: 'Dodaj Anketu',
ref: '../../../../ADDAnketaEN'
},
{
xtype: 'tbseparator'
},
{
xtype: 'button',
text: 'Obriši anketu',
ref: '../../../../DELAnketaEN'
},
{
xtype: 'tbseparator'
},
{
xtype: 'button',
text: 'Odgovori',
ref: '../../../../ODGAnketaEN'
}
]
},
bbar: {
xtype: 'paging',
store: 'AnketaENDB',
pageSize: 11
}
}
]
}
]
},
{
xtype: 'panel',
title: 'Galerija fotografija',
itemId: 'IzbornikPhoto',
layout: 'absolute',
ref: 'IzbornikPhoto',
id: 'IzbornikPhoto',
items: [
{
xtype: 'editorgrid',
title: 'Photogrid',
store: 'PhotoBazaHR',
height: 600,
itemId: 'Photogrid',
autoShow: true,
enableColumnMove: false,
trackMouseOver: true,
stateId: 'Photogrid',
stateful: true,
style: 'margin:10px;',
width: 760,
region: 'center',
x: -3,
y: 0,
ref: '../Photogrid',
id: 'Photogrid',
selModel: new Ext.grid.RowSelectionModel({
singleSelect: true
}),
columns: [
{
xtype: 'numbercolumn',
header: 'ID',
sortable: true,
width: 40,
align: 'Center',
format: 0,
dataIndex: 'ID',
editable: false,
id: 'ID'
},
{
xtype: 'gridcolumn',
dataIndex: 'NazivHR',
header: 'Ime dokumenta',
sortable: true,
width: 120,
editor: {
xtype: 'textfield'
}
},
{
xtype: 'gridcolumn',
header: 'Dokument',
sortable: true,
width: 150,
editable: false,
dataIndex: 'DocHR'
},
{
xtype: 'gridcolumn',
header: 'Ektenzija',
sortable: true,
width: 60,
dataIndex: 'Ekt',
editable: false
},
{
xtype: 'datecolumn',
header: 'Datum dodavanja',
sortable: true,
width: 100,
dataIndex: 'DateAdd',
editable: false,
format: 'd.m.Y',
id: 'DateAdd'
},
{
xtype: 'datecolumn',
header: 'Datum promjene',
sortable: true,
width: 100,
dataIndex: 'DateChange',
editable: false,
format: 'd.m.Y',
id: 'DateChange'
},
{
xtype: 'gridcolumn',
dataIndex: 'Name_user',
header: 'User',
sortable: true,
width: 100
},
{
xtype: 'booleancolumn',
dataIndex: 'Status',
header: 'Status',
sortable: true,
width: 80,
falseText: 'Nektivan',
trueText: 'Aktivan',
editor: {
xtype: 'checkbox',
boxLabel: 'Promjena'
}
}
],
tbar: {
xtype: 'toolbar',
width: 830,
items: [
{
xtype: 'button',
text: 'Dodaj fotografiju',
itemId: 'AddDocHR',
ref: '../../../AddPhotoHR',
id: 'AddPhotoHR'
},
{
xtype: 'tbseparator'
},
{
xtype: 'button',
text: 'Obriši fotografiju',
ref: '../../../DelPhotoHR'
},
{
xtype: 'tbseparator'
},
{
xtype: 'button',
text: 'Promjeni fotografiju',
itemId: 'ChgPhotoHR',
ref: '../../../ChgPhotoHR',
id: 'ChgPhotoHR'
}
]
},
bbar: {
xtype: 'paging',
store: 'PhotoBazaHR',
disabled: true,
displayInfo: true,
pageSize: 30,
height: 30
}
},
{
xtype: 'panel',
title: 'Prikaz ',
width: 190,
height: 600,
region: 'east',
x: 770,
y: 10,
tpl: '<a href="_upload/_images/{DocHR}" target="_blank"><img src="_upload/_images/{DocHR}" width="170" border="0" style="padding:10px;"></a>',
itemId: 'prikaz',
ref: '../prikaz',
id: 'prikaz'
}
]
},
{
xtype: 'panel',
title: 'Kalendar',
itemId: 'IzbornikCustom',
layout: 'border',
autoScroll: true,
ref: 'IzbornikCustom',
id: 'IzbornikCustom',
items: [
{
xtype: 'form',
title: 'Prvi box naslovna',
height: 327,
region: 'center',
width: 480,
bodyStyle: 'padding:10px;',
ref: '../prviboxnaslovnaform',
id: 'prviboxnaslovnaform',
items: [
{
xtype: 'textfield',
fieldLabel: 'Naslov hrvatski',
anchor: '100%',
itemId: 'PrviBoxNaslovHR',
ref: '../../PrviBoxNaslovHR',
id: 'PrviBoxNaslovHR'
},
{
xtype: 'textfield',
fieldLabel: 'Naslov engleski',
anchor: '100%',
itemId: 'PrviBoxNaslovEN',
ref: '../../PrviBoxNaslovEN',
id: 'PrviBoxNaslovEN'
},
{
xtype: 'htmleditor',
anchor: '100%',
height: 200,
fieldLabel: 'Tekst hrvatski',
enableAlignments: false,
enableColors: false,
enableFont: false,
enableFontSize: false,
enableLists: false,
itemId: 'PrviBoxTextHR',
ref: '../../PrviBoxTextHR',
id: 'PrviBoxTextHR'
},
{
xtype: 'htmleditor',
anchor: '100%',
height: 200,
fieldLabel: 'Tekst engleski',
enableAlignments: false,
enableColors: false,
enableFont: false,
enableFontSize: false,
enableLists: false,
itemId: 'PrviBoxTextEN',
ref: '../../PrviBoxTextEN',
id: 'PrviBoxTextEN'
},
{
xtype: 'textfield',
fieldLabel: 'Link hrvatski',
anchor: '100%',
itemId: 'PrviBoxLinkHR',
ref: '../../PrviBoxLinkHR',
id: 'PrviBoxLinkHR'
},
{
xtype: 'textfield',
fieldLabel: 'Link engleski',
anchor: '100%',
itemId: 'PrviBoxLinkEN',
ref: '../../PrviBoxLinkEN',
id: 'PrviBoxLinkEN'
}
],
bbar: {
xtype: 'toolbar',
buttonAlign: 'right',
items: [
{
xtype: 'button',
text: 'Promjeni prvi box',
ref: '../../../promjenibox1'
}
]
}
},
{
xtype: 'form',
title: 'Drugi box naslovna',
height: 327,
region: 'east',
width: 480,
bodyStyle: 'padding:10px;',
ref: '../drugiboxnaslovnaform',
id: 'drugiboxnaslovnaform',
items: [
{
xtype: 'textfield',
fieldLabel: 'Naslov hrvatski',
anchor: '100%',
itemId: 'DrugiBoxNaslovHR',
ref: '../../DrugiBoxNaslovHR',
id: 'DrugiBoxNaslovHR'
},
{
xtype: 'textfield',
fieldLabel: 'Naslov engleski',
anchor: '100%',
itemId: 'DrugiBoxNaslovEN',
ref: '../../DrugiBoxNaslovEN',
id: 'DrugiBoxNaslovEN'
},
{
xtype: 'htmleditor',
anchor: '100%',
height: 200,
fieldLabel: 'Tekst hrvatski',
enableAlignments: false,
enableColors: false,
enableFont: false,
enableFontSize: false,
enableLists: false,
itemId: 'DrugiBoxTextHR',
ref: '../../DrugiBoxTextHR',
id: 'DrugiBoxTextHR'
},
{
xtype: 'htmleditor',
anchor: '100%',
height: 200,
fieldLabel: 'Tekst engleski',
enableFont: false,
enableFontSize: false,
enableColors: false,
enableAlignments: false,
enableLists: false,
itemId: 'DrugiBoxTextEN',
id: 'DrugiBoxTextEN'
},
{
xtype: 'textfield',
fieldLabel: 'Link hrvatski',
anchor: '100%',
itemId: 'DrugiBoxLinkHR',
id: 'DrugiBoxLinkHR'
},
{
xtype: 'textfield',
fieldLabel: 'Link engleski',
anchor: '100%',
itemId: 'DrugiBoxLinkEN',
ref: '../../DrugiBoxLinkEN',
id: 'DrugiBoxLinkEN'
}
],
bbar: {
xtype: 'toolbar',
buttonAlign: 'right',
items: [
{
xtype: 'button',
text: 'Promjeni drugi box',
ref: '../../../promjenibox2'
}
]
}
}
]
},
{
xtype: 'panel',
title: 'Rje?nik pojmova',
itemId: 'IzbornikSimpleHTML',
maskDisabled: false,
ref: 'IzbornikSimpleHTML',
id: 'IzbornikSimpleHTML',
items: [
{
xtype: 'form',
title: 'Rje?nik pojmova',
ref: '../RjecnikForm',
items: [
{
xtype: 'htmleditor',
height: 251,
name: 'RjecnikHTMLHR',
itemId: 'RjecnikHTMLHR',
fieldLabel: 'Rje?nik HR',
autoWidth: true,
ref: '../../RjecnikHTMLHR',
id: 'RjecnikHTMLHR'
},
{
xtype: 'htmleditor',
height: 285,
name: 'RjecnikHTMLEN',
itemId: 'RjecnikHTMLEN',
fieldLabel: 'Rje?nik EN',
autoWidth: true,
ref: '../../RjecnikHTMLEN',
id: 'RjecnikHTMLEN'
}
],
fbar: {
xtype: 'toolbar',
items: [
{
xtype: 'button',
text: 'Spremi',
style: 'padding:10px;',
itemId: 'SpremiCustomHTML',
ref: '../../../SpremiCustomHTML',
id: 'SpremiCustomHTML'
}
]
}
}
]
}
];
MyTabPanelUi.superclass.initComponent.call(this);
}
});this.tabizbornikwindow.hideTabStripItem('IzbornikSimpleHTML');

Animal
24 Oct 2010, 1:16 PM
Debug it. Step into that call.

intro
24 Oct 2010, 1:39 PM
Sori for dum question, how.. with firebug i know but how. i dont know the metod to check - why he is not hiding the tab.


Thanks for fast repy.

intro
24 Oct 2010, 2:57 PM
i found out that i have to make function on click and then tabizbornikwindow.hideTabStripItem('IzbornikSimpleHTML');
and then is working.
But how can i make to hide automaticly

intro
24 Oct 2010, 4:41 PM
Thanks i made it..
I put hideTabStripItem strate after showing window and it is working thanks.

Thanks for having time to help me...