Commits

Anonymous committed c594ba7

1.1.2dev: Merged [12015] from 1.0-stable (fix for #11027).

  • Participants
  • Parent commits ffe149f

Comments (0)

Files changed (7)

File trac/admin/templates/admin_plugins.html

             return false;
           });
         });
+        // Display the number of installed plugins in the heading
+        var count = $("div.plugin").length;
+        $("h2").addCount(count);
       });
     /*]]>*/</script>
   </head>

File trac/htdocs/js/trac.js

     });
   }
 
+
+  $.fn.addCount = function(count) {
+    this.append(" <span class='trac-count'>(" + count + ")</span>");
+  }
+
+  $.fn.addRowCount = function(table) {
+    var count = $(table).find("tbody tr").length;
+    this.addCount(count);
+  }
+
   $.fn.checked = function(checked) {
     if (checked == undefined) { // getter
       if (!this.length) return false;

File trac/ticket/templates/admin_components.html

   <xi:include href="admin.html" />
   <head>
     <title>Components</title>
+    <script type="text/javascript">/*<![CDATA[*/
+      jQuery(document).ready(function($) {
+        $("h2").addRowCount("table.listing");
+      });
+    /*]]>*/</script>
   </head>
 
   <body>

File trac/ticket/templates/admin_enums.html

   <xi:include href="admin.html" />
   <head>
     <title>$label_plural</title>
+    <script type="text/javascript">/*<![CDATA[*/
+      jQuery(document).ready(function($) {
+        $("h2").addRowCount("table.listing");
+      });
+    /*]]>*/</script>
   </head>
 
   <body>

File trac/ticket/templates/admin_milestones.html

       jQuery(document).ready(function($) {
         $("#duedate").datetimepicker();
         $("#completeddate").datetimepicker();
+        $("h2").addRowCount("table.listing");
       });
     /*]]>*/</script>
   </head>

File trac/ticket/templates/admin_versions.html

     <script type="text/javascript">/*<![CDATA[*/
       jQuery(document).ready(function($) {
         $("#releaseddate").datetimepicker();
+        $("h2").addRowCount("table.listing");
       });
     /*]]>*/</script>
   </head>

File trac/versioncontrol/templates/admin_repositories.html

   <xi:include href="admin.html"/>
   <head>
     <title>Repositories</title>
+    <script type="text/javascript">/*<![CDATA[*/
+      jQuery(document).ready(function($) {
+        $("h2").addRowCount("table.listing");
+      });
+    /*]]>*/</script>
   </head>
 
   <body py:with="sorted_repos = sorted(repositories.iteritems(), key=lambda item: item[0].lower())">