]> git.pld-linux.org Git - packages/jquery-uploadify.git/commitdiff
fix units display master auto/th/jquery-uploadify-3.2.1-1
authorElan Ruusamäe <glen@delfi.ee>
Tue, 6 Aug 2013 11:43:14 +0000 (14:43 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 6 Aug 2013 11:43:14 +0000 (14:43 +0300)
jquery-uploadify.spec
units.patch [new file with mode: 0644]

index fd049f385d6090be379e65219d3d69ccff427787..deb3c74dab462744b5b464b3c3c0cd99b288e554 100644 (file)
@@ -16,6 +16,7 @@ Source0:      http://www.uploadify.com/wp-content/uploads/files/uploadify.zip
 Patch0:                css-path.patch
 Patch1:                jquery-ns.patch
 Patch2:                var-leaks.patch
+Patch3:                units.patch
 URL:           http://www.uploadify.com/
 BuildRequires: closure-compiler
 BuildRequires: js
@@ -36,14 +37,6 @@ jQuery Multiple File Upload Plugin - Uploadify.
 %prep
 %setup -qc
 %undos -f php,txt,css,js
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-
-mv "Change Log.txt" "ChangeLog.txt"
-
-install -d examples
-mv *.php examples
 
 # keep original for reference
 cp -p jquery.uploadify.js{,.bak}
@@ -54,6 +47,16 @@ cp -p jquery.uploadify.js{,.bak}
 # unmmodified SWFUpload 2.2.0.1
 %{__sed} -i -e 1,14d jquery.uploadify.js
 
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+mv "Change Log.txt" "ChangeLog.txt"
+
+install -d examples
+mv *.php examples
+
 %build
 # version check
 grep 'Uploadify v%{version}' jquery.uploadify.js
diff --git a/units.patch b/units.patch
new file mode 100644 (file)
index 0000000..58be3a1
--- /dev/null
@@ -0,0 +1,39 @@
+--- jquery-uploadify-3.2.1/jquery.uploadify.js 2013-08-06 14:18:16.302874877 +0300
++++ jquery-uploadify-3.2.1/jquery.uploadify.js 2013-08-06 14:16:55.990812689 +0300
+@@ -554,10 +554,10 @@
+                       // Get the size of the file
+                       var fileSize = Math.round(file.size / 1024);
+-                      var suffix   = 'KB';
+-                      if (fileSize > 1000) {
+-                              fileSize = Math.round(fileSize / 1000);
+-                              suffix   = 'MB';
++                      var suffix   = 'KiB';
++                      if (fileSize > 1024) {
++                              fileSize = Math.round(fileSize / 1024);
++                              suffix   = 'MiB';
+                       }
+                       var fileSizeParts = fileSize.toString().split('.');
+                       fileSize = fileSizeParts[0];
+@@ -810,7 +810,7 @@
+                       var percentage       = Math.round(fileBytesLoaded / fileTotalBytes * 100);
+                       
+                       // Calculate the average speed
+-                      var suffix = 'KB/s';
++                      var suffix = 'KiB/s';
+                       var mbs = 0;
+                       var kbs = (lapsedBytes / 1024) / (lapsedTime / 1000);
+                           kbs = Math.floor(kbs * 10) / 10;
+@@ -819,10 +819,10 @@
+                       } else {
+                               this.queueData.averageSpeed = Math.floor(kbs);
+                       }
+-                      if (kbs > 1000) {
++                      if (kbs > 1024) {
+                               mbs = (kbs * .001);
+                               this.queueData.averageSpeed = Math.floor(mbs);
+-                              suffix = 'MB/s';
++                              suffix = 'MiB/s';
+                       }
+                       
+                       // Call the default event handler
This page took 0.098487 seconds and 4 git commands to generate.