[MRM-351] revisiting, added another configuration option for turning off the applet itself but still enabling the findArtifact functionality. switched defaults to true by popular demand as well.

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@541350 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jesse McConnell 2007-05-24 16:27:31 +00:00
parent e5d26bf107
commit 4b0ebdca08
5 changed files with 18 additions and 5 deletions

View File

@ -714,7 +714,14 @@
<description>true if find artifacts should be enabled</description> <description>true if find artifacts should be enabled</description>
<version>1.0.0+</version> <version>1.0.0+</version>
<type>boolean</type> <type>boolean</type>
<defaultValue>false</defaultValue> <defaultValue>true</defaultValue>
</field>
<field>
<name>appletFindEnabled</name>
<description>true if applet behavior for find artifacts should be enabled</description>
<version>1.0.0+</version>
<type>boolean</type>
<defaultValue>true</defaultValue>
</field> </field>
</fields> </fields>
</class> </class>

View File

@ -169,7 +169,8 @@
<webapp> <webapp>
<ui> <ui>
<showFindArtifacts>false</showFindArtifacts> <showFindArtifacts>true</showFindArtifacts>
<appletFindEnabled>true</appletFindEnabled>
</ui> </ui>
</webapp> </webapp>

View File

@ -181,7 +181,8 @@
<webapp> <webapp>
<ui> <ui>
<showFindArtifacts>false</showFindArtifacts> <showFindArtifacts>true</showFindArtifacts>
<appletFindEnabled>true</appletFindEnabled>
</ui> </ui>
</webapp> </webapp>

View File

@ -87,7 +87,8 @@ public class ArchivaConfigurationTest extends PlexusTestCase
UserInterfaceOptions ui = (UserInterfaceOptions) webapp.getUi(); UserInterfaceOptions ui = (UserInterfaceOptions) webapp.getUi();
assertNotNull( "check webapp ui", ui ); assertNotNull( "check webapp ui", ui );
assertFalse( "check showFindArtifacts", ui.isShowFindArtifacts() ); assertTrue( "check showFindArtifacts", ui.isShowFindArtifacts() );
assertTrue( "check appletFindEnabled", ui.isAppletFindEnabled() );
} }
public void testGetConfigurationSystemOverride() throws Exception public void testGetConfigurationSystemOverride() throws Exception

View File

@ -56,16 +56,19 @@
<ww:form method="POST" action="checksumSearch" namespace="/" <ww:form method="POST" action="checksumSearch" namespace="/"
onsubmit="this.md5.value = generateMd5(this.file.value,this.md5.value); this.file.disabled = true"> onsubmit="this.md5.value = generateMd5(this.file.value,this.md5.value); this.file.disabled = true">
<ww:if test="${sessionScope.uiOptions.appletFindEnabled}">
<tr> <tr>
<td class="tdLabel"><label for="checksumSearch_file" class="label">Search for:</label></td> <td class="tdLabel"><label for="checksumSearch_file" class="label">Search for:</label></td>
<td> <td>
<input type="file" name="file" size="50" value="" id="checksumSearch_file"/> <input type="file" name="file" size="50" value="" id="checksumSearch_file"/>
</td> </td>
</tr> </tr>
</ww:if>
<ww:textfield label="Checksum" size="50" name="md5"/> <ww:textfield label="Checksum" size="50" name="md5"/>
<ww:submit value="Go!"/> <ww:submit value="Go!"/>
</ww:form> </ww:form>
<ww:if test="${sessionScope.uiOptions.appletFindEnabled}">
<p> <p>
Select the file you would like to locate in the remote repository. Select the file you would like to locate in the remote repository.
The entire file will The entire file will
@ -81,7 +84,7 @@
width="400" height="20" name="ChecksumApplet"> width="400" height="20" name="ChecksumApplet">
</applet> </applet>
</p> </p>
</ww:if>
</div> </div>
</div> </div>