diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-05-26 09:24:19 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-05-26 09:24:19 +0200 |
commit | a7dad44267756967328160cb8e6cdfc41c8de137 (patch) | |
tree | 88dcba7fcd74e34f631fe0b334a5ed34b94e0cc5 /program/js/app.js | |
parent | ccf5a4f18de31c2839959f7f0b079e5b029ef307 (diff) |
Skip setting button state (css classes, etc.) if the state didn't change
- this fixes disappearing listmode selection after clicking search reset button
Diffstat (limited to 'program/js/app.js')
-rw-r--r-- | program/js/app.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js index b85edae59..670a8e0f5 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -6231,7 +6231,7 @@ function rcube_webmail() button = a_buttons[n]; obj = document.getElementById(button.id); - if (!obj) + if (!obj || button.status === state) continue; // get default/passive setting of the button @@ -6244,19 +6244,18 @@ function rcube_webmail() else if (!button.status) button.pas = String(obj.className); + button.status = state; + // set image according to button state if (button.type == 'image' && button[state]) { - button.status = state; obj.src = button[state]; } // set class name according to button state else if (button[state] !== undefined) { - button.status = state; obj.className = button[state]; } // disable/enable input buttons if (button.type == 'input') { - button.status = state; obj.disabled = state == 'pas'; } else if (button.type == 'uibutton') { |