aboutsummaryrefslogtreecommitdiffstats
path: root/addon/js_upload
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-02 16:51:55 -0800
committerFriendika <info@friendika.com>2011-02-02 16:51:55 -0800
commit46c37fc7796ea80a3613d927e471cf8ebba0f2ba (patch)
tree0630804894ad4e1fec4631d3c868aa7e1ba53f93 /addon/js_upload
parentee45dee9324be48cd87a883405bdd9e11e3f39f5 (diff)
downloadvolse-hubzilla-46c37fc7796ea80a3613d927e471cf8ebba0f2ba.tar.gz
volse-hubzilla-46c37fc7796ea80a3613d927e471cf8ebba0f2ba.tar.bz2
volse-hubzilla-46c37fc7796ea80a3613d927e471cf8ebba0f2ba.zip
string update, allow js_upload file selection text to be localised
Diffstat (limited to 'addon/js_upload')
-rw-r--r--addon/js_upload/js_upload.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/addon/js_upload/js_upload.php b/addon/js_upload/js_upload.php
index dc2dc37dc..9f3fa9600 100644
--- a/addon/js_upload/js_upload.php
+++ b/addon/js_upload/js_upload.php
@@ -36,6 +36,11 @@ function js_upload_form(&$a,&$b) {
$b['addon_text'] .= '<link href="' . $a->get_baseurl() . '/addon/js_upload/file-uploader/client/fileuploader.css" rel="stylesheet" type="text/css">';
$b['addon_text'] .= '<script src="' . $a->get_baseurl() . '/addon/js_upload/file-uploader/client/fileuploader.js" type="text/javascript"></script>';
+ $upload_msg = t('Upload a file');
+ $drop_msg = t('Drop files here to upload');
+ $cancel = t('Cancel');
+ $failed = t('Failed');
+
$b['addon_text'] .= <<< EOT
<div id="file-uploader-demo1">
@@ -65,6 +70,22 @@ function createUploader() {
uploader = new qq.FileUploader({
element: document.getElementById('file-uploader-demo1'),
action: '{$b['post_url']}',
+
+ template: '<div class="qq-uploader">' +
+ '<div class="qq-upload-drop-area"><span>$drop_msg</span></div>' +
+ '<div class="qq-upload-button">$upload_msg</div>' +
+ '<ul class="qq-upload-list"></ul>' +
+ '</div>',
+
+ // template for one item in file list
+ fileTemplate: '<li>' +
+ '<span class="qq-upload-file"></span>' +
+ '<span class="qq-upload-spinner"></span>' +
+ '<span class="qq-upload-size"></span>' +
+ '<a class="qq-upload-cancel" href="#">$cancel</a>' +
+ '<span class="qq-upload-failed-text">$failed</span>' +
+ '</li>',
+
debug: true,
onSubmit: function(id,filename) {