Преглед изворни кода

Updated to support INITH[HEX] file

yeungalan пре 6 година
родитељ
комит
504456b617
1 измењених фајлова са 12 додато и 2 уклоњено
  1. 12 2
      7-Zip File Manager/MainUI.php

+ 12 - 2
7-Zip File Manager/MainUI.php

@@ -198,10 +198,10 @@ function load(htmlelement){
 					            var tdicon = '<i class="file outline icon"></i>';
 					        }
 					        var tdpath = value[key].replace(new RegExp($(htmlelement).attr("path") + "/"),"");
-					        if(tdpath.includes("?")){
+							if(tdpath.includes("?")){
 					            var tdicon = '<i class="exclamation triangle icon"></i>';
 					        }
-					        tmp = tmp + "<td>" + tdicon + tdpath + "</td>";
+							tmp = tmp + "<td>" + tdicon + tdpath + "</td>";					        
 					    }else{
 					        tmp = tmp + "<td>" + value[key] + "</td>";
 					    }
@@ -212,6 +212,16 @@ function load(htmlelement){
 				$("#tbody").append(tmp + "</tr>");
 			});
 			
+			//Little patch for HEX file name (PATCH)
+			$( "tr td:first-child" ).each( function( index, element ){
+				var tpath = $(this);
+				if(/^inith[0-9a-fA-F]*\..*$|^[0-9a-fA-F]*$/.test($(tpath).text())){
+					$.get( '../SystemAOB/functions/file_system/um_filename_decoder.php?filename=' + $(tpath).text(), function( decodedfilename ) {
+						$(tpath).text(decodedfilename);
+					});
+				}
+			});
+			
 			//process for Prev button 
 			var path = $(htmlelement).attr("path").split("/");
 			var previousPath = $(htmlelement).attr("path").replace(/([^\/]+)$/, '').slice(0, -1);