From fd8e19788d91b39cf4cb550c805bf5cc05d0349e Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 24 Jan 2014 15:45:44 +0000 Subject: [PATCH] Remove debugging output from Handlebars "translate" helper. (It was too noisy AND had a scoping problem.) Address results are using classed instead of id. (Allows multiple instances of each widget to co-exist.) Auto-generated HTML for #mkwsSearch, #mkwsResults and #mkwsTargets include the necessary classes as well as IDs. (There may be a better way to insert these automatically, but that can wait.) All this means that in a primitive way, we have a version of MKWS-71 ("Enable multiple simultaneous MKWS searches using multiple SP sessions") working! --- tools/htdocs/mkws.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 5a18aa9..e61878d 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -10,7 +10,6 @@ Handlebars.registerHelper('json', function(obj) { Handlebars.registerHelper('translate', function(s) { - debug("translating '" + s + "'"); return mkws.M(s); }); @@ -262,7 +261,7 @@ function _make_mkws_team($, teamName) { } // navi - var results = $("#mkwsRecords"); + var results = $(".mkwsRecords.mkwsTeam_" + m_teamName); var html = []; for (var i = 0; i < data.hits.length; i++) { @@ -866,8 +865,8 @@ function _make_mkws_team($, teamName) { debug("HTML search form"); $("#mkwsSearch").html('\
\ - \ - \ + \ + \
'); debug("HTML records"); @@ -883,19 +882,19 @@ function _make_mkws_team($, teamName) { $("#mkwsResults").html('\ \ \ - \ \ \ \ \ \
\ -
\ +
\ +
\
\ -
\ -
\ -
\ -
\ +
\ +
\ +
\ +
\
\ -
\ +
\
'); @@ -974,7 +973,7 @@ function _make_mkws_team($, teamName) { debug("HTML targets"); $("#mkwsTargets").html('\ -
\ +
\ No information available yet.\
'); $("#mkwsTargets").css("display", "none"); -- 1.7.10.4