BUG-15022 "ShowDirs" button should change to "HideDirs" once we click SOLVED

- It don't have the functionality
- The label and funtionality was added.
This commit is contained in:
Marco Antonio Nina
2014-05-23 11:35:27 -04:00
parent 34f4c65f98
commit bcd8aefe89

View File

@@ -1122,16 +1122,24 @@ var gridtb = new Ext.Toolbar(
'-', '-',
new Ext.Toolbar.Button({ new Ext.Toolbar.Button({
text : TRANSLATIONS.ID_SHOW_DIRS, text : TRANSLATIONS.ID_SHOW_DIRS,
id: 'showOrHiDirs',
enableToggle : true, enableToggle : true,
pressed : false, pressed : false,
handler : function(btn, e) { handler : function(btn, e) {
if (btn.pressed) { if (btn.pressed) {
datastore.sendWhat = 'both'; datastore.sendWhat = 'both';
loadDir(); loadDir();
} else { } else {
datastore.sendWhat = 'files'; datastore.sendWhat = 'files';
loadDir(); loadDir();
} }
if (showDirs) {
Ext.getCmp("showOrHiDirs").setText(TRANSLATIONS.ID_SHOW_DIRS);
showDirs = false;
} else {
Ext.getCmp("showOrHiDirs").setText(TRANSLATIONS.ID_HIDE_DIRS);
showDirs = true;
}
} }
}), '-', new Ext.form.TextField({ }), '-', new Ext.form.TextField({
name : "filterValue", name : "filterValue",