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({
text : TRANSLATIONS.ID_SHOW_DIRS,
id: 'showOrHiDirs',
enableToggle : true,
pressed : false,
handler : function(btn, e) {
if (btn.pressed) {
datastore.sendWhat = 'both';
loadDir();
} else {
datastore.sendWhat = 'files';
loadDir();
}
if (btn.pressed) {
datastore.sendWhat = 'both';
loadDir();
} else {
datastore.sendWhat = 'files';
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({
name : "filterValue",