Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge branch 'integration/master' into RefactorDocumentStatusCache
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Aug 7, 2013
2 parents 4b541b8 + cf3faa3 commit 75af08a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 20 deletions.
5 changes: 2 additions & 3 deletions CHANGELOG.md
@@ -1,13 +1,12 @@
# Zanata change log summary

## zanata-3.1.0
* Add descriptions on project type selectors

## zanata-3.0.0
* Add descriptions on project type selectors
* Allow adapter parameters to be set on source document upload
* Add attention key shortcut: Alt+X
* Add attention shortcut to copy from source: Alt+X,G
* Move raw document storage to file system
* Implement virus scanning using ClamAV (clamdscan)

## zanata-2.3.1
* Bug fixes:
Expand Down
1 change: 1 addition & 0 deletions zanata-war/src/main/resources/messages.properties
Expand Up @@ -316,6 +316,7 @@ jsf.iteration.files.DocumentDeleted=Document succesfully deleted.
jsf.iteration.files.ProcessDlgTitle=Processing project files...

jsf.iteration.files.UploadDocument=Upload Document
jsf.iteration.files.FilenameWithSemicolonNotSupported=Zanata does not support filenames that contain a semicolon.
jsf.SupportedUploadFormats=Supported types: .pot .dtd .txt .odt .fodt .odp .fodp .ods .fods .odg .fodg .odb .odf
jsf.SourceLanguage=Source Language
jsf.iteration.files.DocumentPath=Document Path
Expand Down
51 changes: 34 additions & 17 deletions zanata-war/src/main/webapp/iteration/source_files.xhtml
Expand Up @@ -51,8 +51,18 @@
}

function checkIfGeneralFileSelected() {
checkIfFileSelected(#{rich:element('generalDocFileUpload')},
#{rich:element('generalDocSubmitUploadButton')});
var fileInput = #{rich:element('generalDocFileUpload')};
var submitButton = #{rich:element('generalDocSubmitUploadButton')};
var errorMessage = document.getElementById('invalidFilenameError');
checkIfFileSelected(fileInput, submitButton);
var fileName = fileInput.value;
var hasSemicolon = fileName !== undefined && fileName.lastIndexOf(';') !== -1;
if (hasSemicolon) {
errorMessage.style.display = '';
submitButton.disabled = true;
} else {
errorMessage.style.display = 'none';
}
}

</script>
Expand Down Expand Up @@ -300,21 +310,28 @@
onchange="checkIfGeneralFileSelected();"
data="#{projectIterationFilesAction.documentFileUpload.fileContents}"
fileName="#{projectIterationFilesAction.documentFileUpload.fileName}"/>
<br/>
<h:outputLabel for="docPath" value="#{messages['jsf.iteration.files.DocumentPath']}"/>
<h:inputText id="docPath"
value="#{projectIterationFilesAction.documentFileUpload.documentPath}">
</h:inputText>
<br/>
<h:selectOneMenu value="#{projectIterationFilesAction.documentFileUpload.sourceLang}">
<s:selectItems value="#{projectIterationFilesAction.availableSourceLocales}"
var="locale"
label="#{locale.retrieveNativeName()}"
itemValue="#{locale.localeId.toString()}"
escape="true"/>
<h:outputLabel value="#{messages['jsf.SourceLanguage']}"/>
</h:selectOneMenu>
<br/>
<div id="invalidFilenameError" style="display: none;
color: red;
padding: 5px;
margin-bottom: 5px;">
#{messages['jsf.iteration.files.FilenameWithSemicolonNotSupported']}
</div>
<div>
<h:outputLabel for="docPath" value="#{messages['jsf.iteration.files.DocumentPath']}"/>
<h:inputText id="docPath"
value="#{projectIterationFilesAction.documentFileUpload.documentPath}">
</h:inputText>
</div>
<div>
<h:selectOneMenu value="#{projectIterationFilesAction.documentFileUpload.sourceLang}">
<s:selectItems value="#{projectIterationFilesAction.availableSourceLocales}"
var="locale"
label="#{locale.retrieveNativeName()}"
itemValue="#{locale.localeId.toString()}"
escape="true"/>
<h:outputLabel value="#{messages['jsf.SourceLanguage']}"/>
</h:selectOneMenu>
</div>
<rich:collapsiblePanel header="#{messages['jsf.iteration.files.CustomParams']}"
switchType="client"
expanded="false">
Expand Down

0 comments on commit 75af08a

Please sign in to comment.