Chris Doble avatar Chris Doble committed fdaa922

Derp.

Comments (0)

Files changed (4)

src/main/resources/atlassian-plugin.xml

         <vendor name="${project.organization.name}" url="${project.organization.url}" />
     </plugin-info>
 
-    <resource type="i18n" name="com.atlassian.bamboo.plugins language" location="english"/>
-
     <xwork key="viewFailureLeaderboard" name="Failure Leaderboard">
         <package name="viewFailureLeaderboard" extends="chainView">
             <action name="viewFailureLeaderboard" class="com.atlassian.bamboo.plugins.failureleaderboard.ViewFailureLeaderboard">

src/main/resources/english.properties

-com.atlassian.bamboo.plugins.say = Say
-com.atlassian.bamboo.plugins.say.description = What should Bamboo print to the log?
-com.atlassian.bamboo.plugins.say.error = You did not configure Bamboo with anything to say.

src/main/resources/js/scripts.js

-AJS.$("div.failure-leaderboard").delegate("table td.twixie span", "click", function(e) {
-    e.preventDefault();
-    var $twixie = AJS.$(this),
-        $buildsRow = $twixie.closest("tr").next();
+AJS.$(function() {
+    AJS.$("div.failure-leaderboard").delegate("table td.twixie span", "click", function(e) {
+        e.preventDefault();
+        var $twixie = AJS.$(this),
+            $buildsRow = $twixie.closest("tr").next();
 
-    $twixie.toggleClass("icon-collapse");
-    $twixie.toggleClass("icon-expand");
-    $buildsRow.toggleClass("collapsed");
-});
+        $twixie.toggleClass("icon-collapse");
+        $twixie.toggleClass("icon-expand");
+        $buildsRow.toggleClass("collapsed");
+    });
 
-AJS.$("div.failure-leaderboard a.expand-all").click(function(e) {
-    e.preventDefault();
-    AJS.$("div.failure-leaderboard td.twixie span").addClass("icon-collapse").removeClass("icon-expand");
-    AJS.$("div.failure-leaderboard tr.builds").removeClass("collapsed");
-});
+    AJS.$("div.failure-leaderboard a.expand-all").click(function(e) {
+        e.preventDefault();
+        AJS.$("div.failure-leaderboard td.twixie span").addClass("icon-collapse").removeClass("icon-expand");
+        AJS.$("div.failure-leaderboard tr.builds").removeClass("collapsed");
+    });
 
-AJS.$("div.failure-leaderboard a.collapse-all").click(function(e) {
-    e.preventDefault();
-    AJS.$("div.failure-leaderboard td.twixie span").addClass("icon-expand").removeClass("icon-collapse");
-    AJS.$("div.failure-leaderboard tr.builds").addClass("collapsed");
-})
+    AJS.$("div.failure-leaderboard a.collapse-all").click(function(e) {
+        e.preventDefault();
+        AJS.$("div.failure-leaderboard td.twixie span").addClass("icon-expand").removeClass("icon-collapse");
+        AJS.$("div.failure-leaderboard tr.builds").addClass("collapsed");
+    });
+});

src/main/resources/templates/viewFailureLeaderboard.ftl

 <body>
     <!-- AJAX tab changes don't update resources; do it here to make sure we've got everything. -->
     <link rel="stylesheet" type="text/css" href="${req.contextPath}/download/resources/com.atlassian.bamboo.plugins.failure-leaderboard:resources/styles.css"/>
+    <script src="${req.contextPath}/download/resources/com.atlassian.bamboo.plugins.failure-leaderboard:resources/scripts.js" type="text/javascript"></script>
 
     <div class="failure-leaderboard">
         [@cp.filterDropDown filterController=filterController/]
             <p>There are no builds, no tests, or no failures!</p>
         [/#if]
     </div>
-
-    <!-- As above, but we need to include this after the HTML so we've got something to bind events to. -->
-    <script src="${req.contextPath}/download/resources/com.atlassian.bamboo.plugins.failure-leaderboard:resources/scripts.js" type="text/javascript"></script>
 </body>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.