Skip to content

Commit 82b93a9

Browse files
committed
SearchBar on top
1 parent b8592ca commit 82b93a9

File tree

4 files changed

+13
-19
lines changed

4 files changed

+13
-19
lines changed

services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,16 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
230230
throw new Error("Abstract method called!");
231231
},
232232

233-
_createResourcesLayout: function() {
234-
const topBar = this.__createTopBar();
235-
this._addToLayout(topBar);
233+
_createSearchBar: function() {
234+
const searchBarFilter = this._searchBarFilter = new osparc.dashboard.SearchBarFilter(this._resourceType).set({
235+
paddingRight: 22
236+
});
237+
const textField = searchBarFilter.getChildControl("text-field");
238+
osparc.utils.Utils.setIdToWidget(textField, "searchBarFilter-textField-"+this._resourceType);
239+
this._addToLayout(searchBarFilter);
240+
},
236241

242+
_createResourcesLayout: function() {
237243
const toolbar = this._toolbar = new qx.ui.toolbar.ToolBar().set({
238244
backgroundColor: "transparent",
239245
spacing: 10,
@@ -280,22 +286,6 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
280286
this._addToLayout(resourcesContainer);
281287
},
282288

283-
__createTopBar: function() {
284-
const topBar = new qx.ui.container.Composite(new qx.ui.layout.HBox(10)).set({
285-
paddingRight: 22,
286-
alignY: "middle"
287-
});
288-
289-
const searchBarFilter = this._searchBarFilter = new osparc.dashboard.SearchBarFilter(this._resourceType);
290-
const textField = searchBarFilter.getChildControl("text-field");
291-
osparc.utils.Utils.setIdToWidget(textField, "searchBarFilter-textField-"+this._resourceType);
292-
topBar.add(searchBarFilter, {
293-
flex: 1
294-
});
295-
296-
return topBar;
297-
},
298-
299289
_groupByChanged: function(groupBy) {
300290
// if cards are grouped they need to be in grid mode
301291
this._resourcesContainer.setMode("grid");

services/static-webserver/client/source/class/osparc/dashboard/ServiceBrowser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ qx.Class.define("osparc.dashboard.ServiceBrowser", {
145145

146146
// LAYOUT //
147147
_createLayout: function() {
148+
this._createSearchBar();
148149
this._createResourcesLayout();
149150
const list = this._resourcesContainer.getFlatList();
150151
if (list) {

services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,8 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
872872

873873
// LAYOUT //
874874
_createLayout: function() {
875+
this._createSearchBar();
876+
875877
if (osparc.utils.DisabledPlugins.isFoldersEnabled()) {
876878
const workspaceHeader = new osparc.dashboard.WorkspaceHeader();
877879
this.bind("currentWorkspaceId", workspaceHeader, "currentWorkspaceId");

services/static-webserver/client/source/class/osparc/dashboard/TemplateBrowser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ qx.Class.define("osparc.dashboard.TemplateBrowser", {
162162

163163
// LAYOUT //
164164
_createLayout: function() {
165+
this._createSearchBar();
165166
this._createResourcesLayout();
166167
const list = this._resourcesContainer.getFlatList();
167168
if (list) {

0 commit comments

Comments
 (0)