You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/06/03 21:19:27 UTC
[28/38] git commit: [#6307] do exact match instead of substring match
on search bin & milestone names
[#6307] do exact match instead of substring match on search bin & milestone names
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/dafd0e9c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/dafd0e9c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/dafd0e9c
Branch: refs/heads/cj/6218
Commit: dafd0e9c3d257ef8f3f9a3bf6bc1218940dc37ec
Parents: 73f84ed
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu May 30 19:19:11 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Mon Jun 3 16:47:16 2013 +0000
----------------------------------------------------------------------
ForgeTracker/forgetracker/tracker_main.py | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dafd0e9c/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index 7fbbe9c..223911b 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -311,11 +311,13 @@ class ForgeTrackerApp(Application):
$.ajax({
url:'%(app_url)sbin_counts',
success: function(data) {
+ var $spans = $('.search_bin > span');
$.each(data.bin_counts, function(i, item) {
- var $span = $('.search_bin span:contains("' + item.label + '")');
- if ($span) {
- $span.after('<small>' + item.count + '</small>').fadeIn('fast');
- }
+ $spans.each(function(){
+ if ($(this).text() == item.label) {
+ $(this).after('<small>' + item.count + '</small>').fadeIn('fast');
+ }
+ });
});
}
});
@@ -323,11 +325,13 @@ class ForgeTrackerApp(Application):
$.ajax({
url: '%(app_url)smilestone_counts',
success: function(data) {
+ var $spans = $('.milestones > span');
$.each(data.milestone_counts, function(i, item) {
- var $span = $('.milestones span:contains("' + item.name + '")');
- if ($span) {
- $span.after('<small>' + item.count + '</small>').fadeIn('fast');
- }
+ $spans.each(function(){
+ if ($(this)) {
+ $(this).after('<small>' + item.count + '</small>').fadeIn('fast');
+ }
+ });
});
}
});