Pārlūkot izejas kodu

Rename to runTar, runUntar, displayFilesAsHTML

toby 8 gadi atpakaļ
vecāks
revīzija
6f077a9c50

+ 2 - 2
src/js/config/OperationConfig.js

@@ -2996,7 +2996,7 @@ var OperationConfig = {
     },
     "Tar": {
         description: "Packs the input into a tarball.<br><br>No support for multiple files at this time.",
-        run: Compress.tar,
+        run: Compress.runTar,
         inputType: "byteArray",
         outputType: "byteArray",
         args: [
@@ -3009,7 +3009,7 @@ var OperationConfig = {
     },
     "Untar": {
         description: "Unpacks a tarball and displays it per file.",
-        run: Compress.untar,
+        run: Compress.runUntar,
         inputType: "byteArray",
         outputType: "html",
         args: [

+ 1 - 1
src/js/core/Utils.js

@@ -935,7 +935,7 @@ var Utils = {
      * @param {File[]} files
      * @returns {html}
      */
-    HTMLFiles: function(files){
+    displayFilesAsHTML: function(files){
         var formatDirectory = function(file) {
             var html = "<div class='panel panel-default'>" +
                    "<div class='panel-heading' role='tab'>" +

+ 3 - 4
src/js/operations/Compress.js

@@ -361,7 +361,7 @@ var Compress = {
      * @param {Object[]} args
      * @returns {byteArray}
      */
-    tar: function(input, args) {
+    runTar: function(input, args) {
         // Not implemented yet
         return input;
     },
@@ -374,7 +374,7 @@ var Compress = {
      * @param {Object[]} args
      * @returns {html}
      */
-    untar: function(input, args) {
+    runUntar: function(input, args) {
         var Stream = function(input) {
             this.bytes = input;
             this.position = 0;
@@ -451,7 +451,6 @@ var Compress = {
             }
         }
 
-        var output = Utils.HTMLFiles(files);
-        return output;
+        return Utils.displayFilesAsHTML(files);
     },
 };