diff --git a/pom.xml b/pom.xml index 2065442..9de93eb 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.englishtown stash-hook-mirror - 2.2.0 + 2.3.0 Englishtown @@ -30,7 +30,7 @@ 1.8 1.8 - 5.0.2 + 5.5.0 ${bitbucket.version} 3.1.0 6.3.7 @@ -131,7 +131,7 @@ scm:git:git@github.com:ef-labs/stash-hook-mirror.git scm:git:git@github.com:ef-labs/stash-hook-mirror.git https://github.com/ef-labs/stash-hook-mirror - 2.2.0 + 2.3.0 diff --git a/src/main/resources/static/mirror-repository-hook.js b/src/main/resources/static/mirror-repository-hook.js index 1853e16..67c030d 100644 --- a/src/main/resources/static/mirror-repository-hook.js +++ b/src/main/resources/static/mirror-repository-hook.js @@ -6,7 +6,7 @@ define('et/hook/mirror', ['jquery', 'exports'], function ($, exports) { var currIndex, index = 0, name, html; // Determine the current index from the last password input - name = $('div.hook-config-contents input:password').last().attr("name"); + name = $('div.et-mirror-contents input:password').last().attr("name"); if (name && name.length >= 8) { currIndex = parseInt(name.substring(8)); diff --git a/src/main/resources/static/mirror-repository-hook.soy b/src/main/resources/static/mirror-repository-hook.soy index 6dd03b8..ea832a2 100644 --- a/src/main/resources/static/mirror-repository-hook.soy +++ b/src/main/resources/static/mirror-repository-hook.soy @@ -6,31 +6,33 @@ */ {template .view} - // Always add one subview - {call .subview data="all"} - {param index: 0 /} - {/call} +
+ // Always add one subview + {call .subview data="all"} + {param index: 0 /} + {/call} - // Add additional mirrors, up to 10 total - {foreach $index in [1, 2, 3, 4, 5, 6, 7, 8, 9]} - {if $config['mirrorRepoUrl' + $index] or $config['username' + $index]} - {call .subview data="all"} - {param index: $index /} - {/call} - {/if} - {/foreach} + // Add additional mirrors, up to 10 total + {foreach $index in [1, 2, 3, 4, 5, 6, 7, 8, 9]} + {if $config['mirrorRepoUrl' + $index] or $config['username' + $index]} + {call .subview data="all"} + {param index: $index /} + {/call} + {/if} + {/foreach} - // Button to add additional mirrors - {call aui.buttons.button} - {param id: 'et-add-button' /} - {param text: 'Add Mirror' /} - {param extraAttributes: 'type=button' /} - {/call} + // Button to add additional mirrors + {call aui.buttons.button} + {param id: 'et-add-button' /} + {param text: 'Add Mirror' /} + {param extraAttributes: 'type=button' /} + {/call} - // Call init method with subview callback - + // Call init method with subview callback + +
{/template} /**