Commit 8bbc0a5c authored by Piotr Gawron's avatar Piotr Gawron
Browse files

old implementation of search panel removed

parent d1bbab2f
......@@ -2,7 +2,6 @@
var logger = require('./logger');
var SearchPanel = require('./SearchPanel');
var TabNavi = require('./TabNavi');
/**
......@@ -91,12 +90,6 @@ GuiConnector.init = function() {
tabSize : 1,
top : "5px"
});
GuiConnector.searchPanel = new SearchPanel(document.getElementById('tabView:mainForm:searchText_input'), document
.getElementById('tabView:mainForm:searchButton'), function() {
_tabViewVar.select(0);
});
};
/**
......@@ -277,10 +270,6 @@ GuiConnector.referenceToHtml = function(reference) {
}
};
GuiConnector.openSearchPanel = function() {
$('a[href$="#tabView:searchTab"]').click();
};
/**
* Opens window that informs user data data is being loaded from server.
*/
......
"use strict";
/**
* Class used for javascript operations on SearchPanel
*
* @param searchInput
* HTML input where search query is placed
*
* @param searchButton
* HTML button used to send query to the server
*
*/
function SearchPanel(searchInput, searchButton, focusSearchResultMethod) {
this.searchInput = searchInput;
this.searchButton = searchButton;
if (focusSearchResultMethod === "undefined") {
this.focusSearchResults = function() {
};
} else {
this.focusSearchResults = focusSearchResultMethod;
}
}
/**
* Executes query search.
*
* @param query
* that we wants to perform
*
*/
SearchPanel.prototype.search = function(query) {
if (query !== "undefined") {
this.searchInput.value = query;
}
this.searchButton.click();
this.focusSearchResults();
};
module.exports = SearchPanel;
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