// when search button pressed
- // ### This is closure, so can always just operate on its own team
function onFormSubmitEventHandler()
{
- mkws.handle_node_with_team(this, function (tname) {
- var val = findnode('.mkwsQuery').val();
- mkws.teams[tname].newSearch(val);
- });
-
+ var val = findnode('.mkwsQuery').val();
+ newSearch(val);
return false;
}
// ### won't need to be externally visible once onFormSubmitEventHandler() is fixed.
// ### doesn't need windowid
- that.newSearch = function(query, sort, targets, windowid)
+ function newSearch(query, sort, targets, windowid)
{
debug("newSearch: " + query);
resetPage();
loadSelect();
triggerSearch(query, sort, targets, windowid);
- that.switchView('records'); // In case it's configured to start off as hidden
+ switchView('records'); // In case it's configured to start off as hidden
m_submitted = true;
}
// switching view between targets and records
- that.switchView = function(view) {
+ function switchView(view) {
var targets = findnode('.mkwsTargets');
var results = findnode('.mkwsResults,.mkwsRecords');
var blanket = findnode('.mkwsBlanket');
}
+ that.switchView = switchView;
+
+
// detailed record drawing
that.showDetails = function (prefixRecId) {
var recId = prefixRecId.replace('mkwsRec_', '');
if (targets) s += " in targets '" + targets + "'";
debug(s);
- this.newSearch(query, sort, targets, m_teamName);
+ newSearch(query, sort, targets, m_teamName);
}