Merge lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1394723 into lp:ubuntu-docviewer-app/trunk

Proposed by Stefano Verzegnassi
Status: Merged
Approved by: Stefano Verzegnassi
Approved revision: 44
Merged at revision: 44
Proposed branch: lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1394723
Merge into: lp:ubuntu-docviewer-app/trunk
Diff against target: 35 lines (+5/-8)
1 file modified
src/app/qml/utils.js (+5/-8)
To merge this branch: bzr merge lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1394723
Reviewer Review Type Date Requested Status
Bartosz Kosiorek (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+243627@code.launchpad.net

Commit message

Fixed document size format

Description of the change

Fixed document size format

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

Looks ok for me.

Revision history for this message
Bartosz Kosiorek (gang65) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/qml/utils.js'
2--- src/app/qml/utils.js 2014-10-20 18:45:09 +0000
3+++ src/app/qml/utils.js 2014-12-04 08:10:20 +0000
4@@ -4,26 +4,23 @@
5 {
6 if (size >= 1073741824)
7 {
8- return parseInt(size/1073741824) + "," + size%1073741824 + " Gio";
9+ return (size / 1073741824).toFixed(2) + " GiB";
10 }
11
12 if (size >= 1048576)
13 {
14- return parseInt(size/1048576) + "," + size%1048576 + " Mio";
15+ return (size / 1048576).toFixed(2) + " MiB";
16 }
17
18 if (size >= 1024)
19 {
20- return parseInt(size/1024) + "," + size%1024 + " Kio";
21+ return parseInt(size / 1024) + " KiB";
22 }
23
24- return size + " o";
25+ return size + " byte";
26 }
27
28 function getNameOfFile(path)
29 {
30- var name = String(path);
31-
32- return name.substring(name.lastIndexOf('/')+1);
33-
34+ return path.toString().substring(path.lastIndexOf('/') + 1);
35 }

Subscribers

People subscribed via source and target branches