diff mercurial-server/resources/buildServerResources/mercurialSettings.jsp @ 57:99e757f2527b

branches support
author Pavel.Sher
date Sun, 26 Oct 2008 16:23:50 +0300
parents 4059fcc5473e
children b328c6b6526d
line wrap: on
line diff
--- a/mercurial-server/resources/buildServerResources/mercurialSettings.jsp	Fri Oct 24 13:38:59 2008 +0400
+++ b/mercurial-server/resources/buildServerResources/mercurialSettings.jsp	Sun Oct 26 16:23:50 2008 +0300
@@ -1,6 +1,13 @@
 <%@include file="/include.jsp"%>
 <%@ taglib prefix="props" tagdir="/WEB-INF/tags/props" %>
 <jsp:useBean id="propertiesBean" scope="request" type="jetbrains.buildServer.controllers.BasePropertiesBean"/>
+<script type="text/javascript">
+function updateBranchName(repoPath) {
+  if (repoPath.indexOf('#') != -1 && $('branchName').value == '') {
+    $('branchName').value = repoPath.substring(repoPath.indexOf('#')+1);
+  }
+}
+</script>
 <table class="runnerFormTable">
 
   <l:settingsGroup title="General Settings">
@@ -11,9 +18,13 @@
   </tr>
   <tr>
     <th><label for="repositoryPath">Pull changes from: <l:star/></label></th>
-    <td><props:textProperty name="repositoryPath" className="longField" />
+    <td><props:textProperty name="repositoryPath" className="longField" onchange="updateBranchName(this.value)"/>
       <span class="error" id="error_repositoryPath"></span></td>
   </tr>
+  <tr>
+    <th><label for="branchName">Branch name: </label></th>
+    <td><props:textProperty name="branchName" /></td>
+  </tr>
   </l:settingsGroup>
   <l:settingsGroup title="Authorization settings">
   <tr>