Skip to content

Commit

Permalink
it's uploading images
Browse files Browse the repository at this point in the history
  • Loading branch information
santiago committed Nov 21, 2012
1 parent 31efbc2 commit 6bb5422
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 476 deletions.
2 changes: 1 addition & 1 deletion domain/Talleres.js
Expand Up @@ -371,7 +371,7 @@ function Service(app) {
})

var upload = require('../lib/Upload')();
app.post('/taller/:taller_id/media', filtros.getSesion, upload, function(req, res) {
app.post('/taller/:taller_id/media', upload, function(req, res) {
res.send({ ok: true })
});

Expand Down
15 changes: 7 additions & 8 deletions public/javascripts/app.js
Expand Up @@ -395,7 +395,7 @@ jQuery(document).ready(function($) {
function go() {
var w = view.__progress + '%';
if (/*view.__progress == 100 || */!view.__uploading) { return }
console.log
console.log(w)
$(".meter > span").animate({
width: w
}, 100, go);
Expand Down Expand Up @@ -430,8 +430,8 @@ jQuery(document).ready(function($) {
if (check) {
$('.image-upload').find('.control p span.index').text(' 1');
$('.image-upload').find('.control p span.total').text(total);
$('#addphoto').fadeOut(function() {
$('.image-upload').slideDown();
$('button#upload-btn').fadeOut(function() {
$('.image-upload').fadeIn();
});
}
return check;
Expand All @@ -449,19 +449,18 @@ jQuery(document).ready(function($) {

$('.meter > span').removeClass('stop');
$('.image-upload').find('.control p span.index').text(' ' + (number + 1));
// startProgressBar.call(view);
startProgressBar.call(view);
return true;
},
onProgress: function(event, progress, name, number, total) {
view.__progress = parseFloat((progress*100).toString().slice(0,5));
// console.log(view.__progress)
},
onFinish: function(event, response, name, number, total) {
$('#addphoto').fadeIn();
//$('.image-upload').slideUp(function() {
// view.refresh()
//});
view.__uploading = false;
setTimeout(function() {
location.reload()
}, 100);
},
onError: function(event, name, error) {
alert('error while uploading file ' + name);
Expand Down
98 changes: 0 additions & 98 deletions public/javascripts/app.js.haexu71h.tmp

This file was deleted.

0 comments on commit 6bb5422

Please sign in to comment.