Skip to content
Browse files

Download Button integriert

  • Loading branch information...
1 parent c1eef82 commit 452961d35e04d2ff63dde69c241faf005ace4598 Stephan committed Nov 30, 2012
Showing with 16 additions and 1 deletion.
  1. +11 −0 app/modules/localeEdit/localeEdit.js
  2. +4 −0 app/styles/style.css
  3. +1 −1 localeEditFileManager.js
View
11 app/modules/localeEdit/localeEdit.js
@@ -126,6 +126,17 @@ function(app, jquery, Views ) {
}).appendTo($fileWrapper);
$text.html('Größe: ' + value.size);
+ var $btnDownlaod = $('<button>', {
+ type : "button",
+ 'class' : "pull-right btn btn-primary",
+ 'data-loading-text' : "downloading"
+ }).appendTo($fileWrapper);
+ $btnDownlaod.html('Download');
+
+ $btnDownlaod.click(function(){
+ window.open(value.url, 'Download ' + value.name);
+ });
+
var $btnDelete = $('<button>', {
type : "button",
'class' : "pull-right btn btn-primary",
View
4 app/styles/style.css
@@ -51,4 +51,8 @@ li.edititem {
.file-list-wrapper span{
margin: 0 50px 0 0;
+}
+
+.file-list-wrapper button{
+ margin: 0 20px 0 0;
}
View
2 localeEditFileManager.js
@@ -61,7 +61,7 @@ exports.GetUserFiles = function(req, res) {
res.write(JSON.stringify(
jsOnlyFilesWithMetaInfo.map(function (file)
{
- return { url: '/files/' + file.Name,
+ return { url: '/files/user_' + req.session.passport.user + '/' + file.Name,
name: file.Name,
lastChange: file.mtime,
size: file.size,

0 comments on commit 452961d

Please sign in to comment.
Something went wrong with that request. Please try again.