Permalink
Browse files

jquery to write the summary page to include our competency info

  • Loading branch information...
1 parent 3468119 commit 3cd2a13fd350e5d7805e3c85635802603392811d @schelcj committed Oct 23, 2012
Showing with 23 additions and 0 deletions.
  1. +23 −0 competencies.js
View
@@ -0,0 +1,23 @@
+if (typeof(jQuery) != 'undefined') { (function($) {
+ $(document).ready(function() {
+ var competency_map = competencies.competency_map;
+ var categories = competencies.categories;
+ var summary_table_path = 'blockquote > table > tbody tr';
+
+ $(summary_table_path).each(function() {
+ var last_td = $(this).find('td').last();
+ var page = $(this).find('td > a').text();
+ var comps = new Array();
+
+ $(this).find('td + td').first().removeAttr('width');
+
+ $(competency_map[page]).each(function() {
+ comps.push(categories[this]);
+ });
+
+ $(last_td).before($('<td />', {text: comps.join(' / ')}));
+ });
+
+ $(summary_table_path).first().css('font-weight', 'bold');
+ });
+})(jQuery)};

0 comments on commit 3cd2a13

Please sign in to comment.