mirror of https://github.com/apache/archiva.git
update old legacy path code for new version of Struts
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-1.3.x@1570823 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
32278f16b1
commit
83139afe2b
|
@ -42,13 +42,13 @@
|
|||
var group = path.indexOf( "/" );
|
||||
if ( group > 0 )
|
||||
{
|
||||
document.getElementById( "addLegacyArtifactPath_groupId" ).value
|
||||
document.getElementById( "addLegacyArtifactPath_commit_groupId" ).value
|
||||
= path.substring( 0, group );
|
||||
group += 1;
|
||||
var type = path.indexOf( "/", group );
|
||||
if ( type > 0 )
|
||||
{
|
||||
document.getElementById( "addLegacyArtifactPath_type" ).value
|
||||
document.getElementById( "addLegacyArtifactPath_commit_type" ).value
|
||||
= path.substring( group, type - 1 );
|
||||
}
|
||||
type += 1;
|
||||
|
@ -56,9 +56,9 @@
|
|||
var ext = path.lastIndexOf( "." );
|
||||
if ( version > 0 )
|
||||
{
|
||||
document.getElementById( "addLegacyArtifactPath_artifactId" ).value
|
||||
document.getElementById( "addLegacyArtifactPath_commit_artifactId" ).value
|
||||
= path.substring( type, version );
|
||||
document.getElementById( "addLegacyArtifactPath_version" ).value
|
||||
document.getElementById( "addLegacyArtifactPath_commit_version" ).value
|
||||
= path.substring( version + 1, ext );
|
||||
}
|
||||
|
||||
|
@ -92,23 +92,6 @@
|
|||
<s:submit value="Add Legacy Artifact Path"/>
|
||||
</s:form>
|
||||
|
||||
<script type="text/javascript">
|
||||
var ref = document.getElementById("addLegacyArtifactPath_legacyArtifactPath_artifact").value;
|
||||
var i = ref.indexOf( ":" );
|
||||
document.getElementById("addLegacyArtifactPath_groupId").value = ref.substring( 0, i );
|
||||
var j = i + 1;
|
||||
var i = ref.indexOf( ":", j );
|
||||
document.getElementById("addLegacyArtifactPath_artifactId").value = ref.substring( j, i );
|
||||
var j = i + 1;
|
||||
var i = ref.indexOf( ":", j );
|
||||
document.getElementById("addLegacyArtifactPath_version").value = ref.substring( j, i );
|
||||
var j = i + 1;
|
||||
var i = ref.indexOf( ":", j );
|
||||
document.getElementById("addLegacyArtifactPath_classifier").value = ref.substring( j, i );
|
||||
|
||||
document.getElementById("addLegacyArtifactPath_legacyArtifactPath_path").focus();
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue