mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure browser toolbar buttons are always shown.
This commit is contained in:
parent
9a3047c89c
commit
851c0cfff3
@ -41,7 +41,11 @@ let _otherToolbarButtons = [];
|
|||||||
|
|
||||||
// This function is used to add button into the browser panel.
|
// This function is used to add button into the browser panel.
|
||||||
function registerToolBarButton(btn) {
|
function registerToolBarButton(btn) {
|
||||||
if (!(btn.label in _toolbarButtons)) {
|
/* Sometimes the panel onCreate is called two times.
|
||||||
|
* Add buttons if not present in the panel also.
|
||||||
|
*/
|
||||||
|
if (!(btn.label in _toolbarButtons)
|
||||||
|
|| (_.findIndex(_browserPanel._buttonList,{name:btn.label}) < 0)) {
|
||||||
_browserPanel.addButton(
|
_browserPanel.addButton(
|
||||||
btn.label, btn.btnClass, btn.text, btn.label, btn.toggled,
|
btn.label, btn.btnClass, btn.text, btn.label, btn.toggled,
|
||||||
btn.toggleClass, btn.parentClass, btn.enabled
|
btn.toggleClass, btn.parentClass, btn.enabled
|
||||||
|
Loading…
Reference in New Issue
Block a user