[ASYNCUP-19] upload doesn't work in synchronous mode, default text is
confusing in async mode Created: 15/Mar/16 Updated: 08/Aug/16 Resolved: 08/Aug/16
Status:
Resolved
Project:
Plugin Asynchronous Upload
Component/s:
None
Affects
Version/s:
1.0.3
Fix Version/s:
1.0.5
Type:
Bug
Priority:
Major
Reporter:
Jon Harper
Assignee:
Jon Harper
Resolution:
Fixed
Votes:
0
Labels:
None
Remaining
Estimate:
Not Specified
Time Spent:
Not Specified
Original
Estimate:
Not Specified
Issue Links:
Connected
is connected
with
ASYNCUP-
14
change css class for overiding
upload...
Description
The synchronous (no javascript) mode doesn't work.
the asynchronous mode (javascript) uses the word "Send" instead of "Browse"
Comments
Comment by Jon Harper [ 15/Mar/16 ]
The following patch fixes this. I'm refraining from committing because some people have a demo on thursday and may be using
SNAPSHOTS... Will apply later
commit 20dcfa65f2757102c2f2f42eefc68362473d515e
Author: Jon Harper <[email protected]>
Date: Tue Mar 15 18:10:01 2016 +0100
ASYNCUP-19: fix synchronous upload, use clearer text in async upload
diff --git
a/src/java/fr/paris/lutece/plugins/asynchronousupload/resources/asynchronousupload_messages.properties
b/src/java/fr/paris/lutece/plugins/asynchronousupload/resources/asynchronousupload_messages.properties
index 0096640..e352bdf 100644
---
a/src/java/fr/paris/lutece/plugins/asynchronousupload/resources/asynchronousupload_messages.properties
+++
b/src/java/fr/paris/lutece/plugins/asynchronousupload/resources/asynchronousupload_messages.properties
@@ -9,5 +9,6 @@ plugin.provider=Mairie de Paris
error.fileTooLarge=The selected file is too large
action.send.name=Send
+action.browse.name=Browse
file.uploadedFile=File(s) sent
action.delete.name=Delete
\ No newline at end of file
diff --git
a/src/java/fr/paris/lutece/plugins/asynchronousupload/resources/asynchronousupload_messages_fr.properties
b/src/java/fr/paris/lutece/plugins/asynchronousupload/resources/asynchronousupload_messages_fr.properties
index bd195f9..37781a9 100644
---
a/src/java/fr/paris/lutece/plugins/asynchronousupload/resources/asynchronousupload_messages_fr.properties
+++
b/src/java/fr/paris/lutece/plugins/asynchronousupload/resources/asynchronousupload_messages_fr.properties
@@ -9,5 +9,6 @@ plugin.provider=Mairie de Paris
error.fileTooLarge=Le fichier s\u00E9lectionn\u00E9 est trop gros.
action.send.name=Transmettre
+action.browse.name=S\u00e9lectionner
file.uploadedFile=Fichier(s) envoy\u00E9(s)
action.delete.name=Supprimer
\ No newline at end of file
diff --git a/webapp/WEB-INF/templates/skin/plugins/asynchronousupload/main.js b/webapp/WEB-
INF/templates/skin/plugins/asynchronousupload/main.js
index 68d1e40..fdca94d 100644
--- a/webapp/WEB-INF/templates/skin/plugins/asynchronousupload/main.js
+++ b/webapp/WEB-INF/templates/skin/plugins/asynchronousupload/main.js
@@ -35,6 +35,8 @@ $(function () {
// Initialize the jQuery File Upload widget:
$(document).on('click','.${handler_name}${fieldname}', {} ,function() {
+ $(this).parent().find(".file-input-text-noscript").hide();
+ $(this).parent().find(".file-input-text-js").show();
$(this).fileupload({
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
diff --git a/webapp/WEB-INF/templates/skin/plugins/asynchronousupload/upload_commons.html b/webapp/WEB-
INF/templates/skin/plugins/asynchronousupload/upload_commons.html
index 2362878..8a57be9 100644
--- a/webapp/WEB-INF/templates/skin/plugins/asynchronousupload/upload_commons.html
+++ b/webapp/WEB-INF/templates/skin/plugins/asynchronousupload/upload_commons.html
@@ -26,11 +26,13 @@
<#macro addFileInput fieldName handler cssClass multiple=false>
- <span class="file-input btn btn-primary btn-file">
- <input type="file" name="${fieldName}" id="${fieldName}" <#if
multiple>multiple="multiple"</#if> class="${cssClass!} ${handler.handlerName}" />
- <!-- <button class="btn btn-primary btn-sm"
name="${handler.uploadSubmitPrefix}${fieldName}" id="${handler.uploadSubmitPrefix}${fieldName}"
value="${handler.uploadSubmitPrefix}${fieldName}" type="submit" >
- #i18n{asynchronousupload.action.send.name}
- </button>-->
+ <span class="form-inline file-input">
+ <input type="file" style="display:inline-block;" name="${fieldName}" id="${fieldName}"
<#if multiple>multiple="multiple"</#if> class="${cssClass!} ${handler.handlerName}" />
+ <button class="btn btn-primary btn-sm" name="${handler.uploadSubmitPrefix}${fieldName}"
id="${handler.uploadSubmitPrefix}${fieldName}" value="${handler.uploadSubmitPrefix}${fieldName}"
type="submit" >
+ <i class="fa fa-upload"></i>
+ <span class="file-input-text-
noscript">#i18n{asynchronousupload.action.send.name}</span>
+ <span class="file-input-text-js"
style="display:none;">#i18n{asynchronousupload.action.browse.name}</span>
+ </button>
</span>
<input type="hidden" name="asynchronousupload.handler" value="${handler.handlerName}" />
<div id="progress_${fieldName}" class="progress" style="display:none;">
@@ -38,11 +40,13 @@
</div>
</#macro>
<#macro addFileInputImage fieldName handler cssClass multiple=false>
- <span class="file-input btn btn-primary btn-file">
- <input type="file" name="${fieldName}" id="${fieldName}" <#if
multiple>multiple="multiple"</#if> class="${cssClass!} ${handler.handlerName}${fieldName}" />
- <!-- <button class="btn btn-primary btn-sm"
name="${handler.uploadSubmitPrefix}${fieldName}" id="${handler.uploadSubmitPrefix}${fieldName}"
value="${handler.uploadSubmitPrefix}${fieldName}" type="submit" >
- #i18n{asynchronousupload.action.send.name}
- </button>-->
+ <span class="form-inline file-input">
+ <input type="file" style="display:inline-block;" name="${fieldName}" id="${fieldName}"
<#if multiple>multiple="multiple"</#if> class="${cssClass!} ${handler.handlerName}" />
+ <button class="btn btn-primary btn-sm" name="${handler.uploadSubmitPrefix}${fieldName}"
id="${handler.uploadSubmitPrefix}${fieldName}" value="${handler.uploadSubmitPrefix}${fieldName}"
type="submit" >
+ <i class="fa fa-upload"></i>
+ <span class="file-input-text-
noscript">#i18n{asynchronousupload.action.send.name}</span>
+ <span class="file-input-text-js"
style="display:none;">#i18n{asynchronousupload.action.browse.name}</span>
+ </button>
</span>
<input type="hidden" name="asynchronousupload.handler" value="${handler.handlerName}" />
<div id="progress_${fieldName}" class="progress" style="display: none;">
Generated at Sun Apr 16 01:24:13 CEST 2017 using JIRA 6.2.7#6265-
sha1:91604a8de81892a3e362e0afee505432f29579b0.
1 / 3 100%
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans linterface ou les textes ? Ou savez-vous comment améliorer linterface utilisateur de StudyLib ? Nhésitez pas à envoyer vos suggestions. Cest très important pour nous !