Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 64a8e9ba authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update panel with selector in order to uniformize interface.

parent 5590a00a
......@@ -162,6 +162,11 @@ Ext.define("Dbui.panel.BaseWithSelector", {
*/
selectorPanel: null,
// private key map
keyMap: {
ENTER: "onEnterKey"
},
// Private attribute for internationalization
textGo: "Go",
textReset: "Reset",
......@@ -227,7 +232,22 @@ Ext.define("Dbui.panel.BaseWithSelector", {
toolbar = me.selectorPanel.getDockedItems()[0];
me.goButton = toolbar.getComponent("goButton");
me.resetButton = toolbar.getComponent("resetButton");
}
},
// jshint strict: true
/**
* Handler to click on the Go button when the ENTER key is pressed
*
*/
onEnterKey: function () {
"use strict";
var me = this;
// do it only when the panel is expanded but not collpased
if (!me.selectorPanel.getCollapsed()) {
me.goButton.click();
}
}
});
\ No newline at end of file
......@@ -26,11 +26,6 @@ Ext.define("Dbui.panel.GridWithFilter", {
filter: null,
grid: null,
// private key map
keyMap: {
ENTER: "onEnterKey"
},
// Private properties for internationalization
textLoad: "Loading...",
......@@ -49,7 +44,7 @@ Ext.define("Dbui.panel.GridWithFilter", {
me.grid = me.mainPanel.child("xgrid");
me.filter.bind(me.grid, me.filterOnChange);
// connect buttons
// handling events
if (me.filterOnChange) {
me.keyMapEnabled = false;
me.goButton.hide();
......@@ -59,10 +54,10 @@ Ext.define("Dbui.panel.GridWithFilter", {
}
me.resetButton.on("click", me.filter.onReset, me.filter);
me.selectorPanel.on("expand", me.onSelectorExpand, me);
// collapse the selectorPanel
me.selectorPanel.collapsed = true;
me.selectorPanel.on("expand", me.onSelectorExpand, me);
// Mask the GridFilter during loading
me.grid.getView().loadMask = Ext.create("Ext.LoadMask", {
......@@ -81,28 +76,14 @@ Ext.define("Dbui.panel.GridWithFilter", {
me.goButton.un("click", me.filter.onGo, me.filter);
}
me.selectorPanel.un("expand", me.onSelectorExpand, me);
me.resetButton.un("click", me.filter.onReset, me.filter);
me.selectorPanel.un("expand", me.onSelectorExpand, me);
me.callParent(arguments);
},
// jshint strict: true
/**
* Handler to click on the Go button when the ENTER key is pressed
*
*/
onEnterKey: function () {
"use strict";
var me = this;
// do it only when the panel is expanded but not collpased
if (!me.selectorPanel.getCollapsed()) {
me.goButton.click();
}
},
/**
* Handler to focus on the first field of the filter
* when the selector is expand
......
......@@ -96,7 +96,7 @@ Ext.define("Dbui.panel.WithUrlSelector", {
me.mainPanel.loader.baseParams = me.baseParams;
}
// handlers for button
// handling events
me.goButton.on("click", me.onGo, me);
me.resetButton.on("click", me.onReset, me);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment