[Testbot] Plone 5.0 - Python 2.7 - Build # 1340 - Improvement! - 1 failure(s)
jenkins at plone.org
jenkins at plone.org
Fri Jan 31 06:07:47 UTC 2014
-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 1340 - Still Failing!
-------------------------------------------------------------------------------
http://jenkins.plone.org/job/plone-5.0-python-2.7/1340/
-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------
Repository: mockup
Branch: refs/heads/master
Date: 2014-01-30T20:36:54-08:00
Author: Nathan Van Gheem (vangheem) <vangheem at gmail.com>
Commit: https://github.com/plone/mockup/commit/21e6402dc7f7919ab3644ba4813e195efd61010b
better upload status when tus is installed
Files changed:
M js/patterns/dropzone.js
M less/pattern.dropzone.less
diff --git a/js/patterns/dropzone.js b/js/patterns/dropzone.js
index ab7ccbe..a485c5d 100644
--- a/js/patterns/dropzone.js
+++ b/js/patterns/dropzone.js
@@ -208,6 +208,8 @@ define([
var percentage = (bytesUploaded / bytesTotal * 100);
$progress.css('width', percentage + '%');
$progress.parent().css('display', 'block');
+ var $size = $preview.find('.dz-size');
+ $size.html('uploading...<br />' + self.formatBytes(bytesUploaded) + ' / ' + self.formatBytes(bytesTotal));
}).done(function(url, file){
file.status = Dropzone.SUCCESS;
self.dropzone.emit('success', file);
@@ -231,6 +233,17 @@ define([
}
}, 100);
});
+ },
+ formatBytes: function(bytes){
+ var kb = Math.round(bytes / 1024);
+ if(kb < 1024){
+ return kb + ' KiB';
+ }
+ var mb = Math.round(kb / 1024);
+ if(mb < 1024){
+ return mb + ' MB';
+ }
+ return Math.round(mb / 1024) + ' GB';
}
});
diff --git a/less/pattern.dropzone.less b/less/pattern.dropzone.less
index f8c49a8..548ebb5 100644
--- a/less/pattern.dropzone.less
+++ b/less/pattern.dropzone.less
@@ -17,4 +17,14 @@
min-height: 150px;
// maybe a width: 400px; coould be an idea ?
}
+.dropzone .dz-preview .dz-details .dz-size,
+.dropzone-previews .dz-preview .dz-details .dz-size{
+ font-size: 11px;
+ height: 50px;
+ line-height: 16px;
+ bottom: -56px;
+}
+.dropzone .dz-preview .dz-details, .dropzone-previews .dz-preview .dz-details{
+ margin-bottom: 42px;
+}
Repository: mockup
Branch: refs/heads/master
Date: 2014-01-30T21:18:20-08:00
Author: Nathan Van Gheem (vangheem) <vangheem at gmail.com>
Commit: https://github.com/plone/mockup/commit/ea6885a1bb74b7d4d1e0ff09d063118a3172f0ad
Merge pull request #265 from plone/vangheem-tus
better upload status when tus is installed
Files changed:
M js/patterns/dropzone.js
M less/pattern.dropzone.less
diff --git a/js/patterns/dropzone.js b/js/patterns/dropzone.js
index ab7ccbe..a485c5d 100644
--- a/js/patterns/dropzone.js
+++ b/js/patterns/dropzone.js
@@ -208,6 +208,8 @@ define([
var percentage = (bytesUploaded / bytesTotal * 100);
$progress.css('width', percentage + '%');
$progress.parent().css('display', 'block');
+ var $size = $preview.find('.dz-size');
+ $size.html('uploading...<br />' + self.formatBytes(bytesUploaded) + ' / ' + self.formatBytes(bytesTotal));
}).done(function(url, file){
file.status = Dropzone.SUCCESS;
self.dropzone.emit('success', file);
@@ -231,6 +233,17 @@ define([
}
}, 100);
});
+ },
+ formatBytes: function(bytes){
+ var kb = Math.round(bytes / 1024);
+ if(kb < 1024){
+ return kb + ' KiB';
+ }
+ var mb = Math.round(kb / 1024);
+ if(mb < 1024){
+ return mb + ' MB';
+ }
+ return Math.round(mb / 1024) + ' GB';
}
});
diff --git a/less/pattern.dropzone.less b/less/pattern.dropzone.less
index f8c49a8..548ebb5 100644
--- a/less/pattern.dropzone.less
+++ b/less/pattern.dropzone.less
@@ -17,4 +17,14 @@
min-height: 150px;
// maybe a width: 400px; coould be an idea ?
}
+.dropzone .dz-preview .dz-details .dz-size,
+.dropzone-previews .dz-preview .dz-details .dz-size{
+ font-size: 11px;
+ height: 50px;
+ line-height: 16px;
+ bottom: -56px;
+}
+.dropzone .dz-preview .dz-details, .dropzone-previews .dz-preview .dz-details{
+ margin-bottom: 42px;
+}
-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 3967 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140131/47972857/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 131105 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140131/47972857/attachment-0003.obj>
More information about the Testbot
mailing list