projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up for MKWS-352 work.
[mkws-moved-to-github.git]
/
src
/
mkws-team.js
diff --git
a/src/mkws-team.js
b/src/mkws-team.js
index
e4645b2
..
d5f8bc0
100644
(file)
--- a/
src/mkws-team.js
+++ b/
src/mkws-team.js
@@
-33,6
+33,7
@@
mkws.makeTeam = function($, teamName) {
var m_template = {}; // compiled templates, from any source
var m_widgets = {}; // Maps widget-type to array of widget objects
var m_gotRecords = false;
var m_template = {}; // compiled templates, from any source
var m_widgets = {}; // Maps widget-type to array of widget objects
var m_gotRecords = false;
+ var m_targetMap = {}; // Maps target ID to human-readable name
var config = mkws.objectInheritingFrom(mkws.config);
that.config = config;
var config = mkws.objectInheritingFrom(mkws.config);
that.config = config;
@@
-306,7
+307,6
@@
mkws.makeTeam = function($, teamName) {
function triggerSearch(query, sortOrder, maxrecs, perpage, limit, targets, torusquery) {
resetPage();
function triggerSearch(query, sortOrder, maxrecs, perpage, limit, targets, torusquery) {
resetPage();
- queue("navi").publish();
// Continue to use previous query/sort-order unless new ones are specified
if (query) m_query = query;
// Continue to use previous query/sort-order unless new ones are specified
if (query) m_query = query;
@@
-334,6
+334,7
@@
mkws.makeTeam = function($, teamName) {
"pp2filter = " + pp2filter + ", params = " + $.toJSON(params));
m_paz.search(m_query, m_perpage, m_sortOrder, pp2filter, undefined, params);
"pp2filter = " + pp2filter + ", params = " + $.toJSON(params));
m_paz.search(m_query, m_perpage, m_sortOrder, pp2filter, undefined, params);
+ queue("searchtriggered").publish();
}
// fetch record details to be retrieved from the record queue
}
// fetch record details to be retrieved from the record queue
@@
-499,8
+500,19
@@
mkws.makeTeam = function($, teamName) {
}
}
return undefined;
}
}
return undefined;
- }
+ };
+
+ that.mapTarget = function(id, name) {
+ var old = m_targetMap[id];
+ m_targetMap[id] = name;
+ if (old && name !== old) {
+ that.warn("targetMap for id '" + id + "' changed from '" + old + "' to '" + name + "'");
+ }
+ };
+ that.targetName = function(id) {
+ return m_targetMap[id] || id;
+ }
return that;
};
return that;
};