mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-14 12:04:05 +02:00
Fix text file detection, added XML types (like svg). Related to #90
This commit is contained in:
@@ -1565,7 +1565,7 @@ function IFM( params ) {
|
|||||||
icon: "icon icon-archive",
|
icon: "icon icon-archive",
|
||||||
title: "extract"
|
title: "extract"
|
||||||
});
|
});
|
||||||
} else if( self.config.edit && item.mime_type.substr( 0, 4 ) == "text" ) {
|
} else if( self.config.edit && ( item.mime_type.substr( 0, 4 ) == "text" || item.mime_type.indexOf( "xml" ) !== false ) ) {
|
||||||
item.eaction = "edit";
|
item.eaction = "edit";
|
||||||
item.button.push({
|
item.button.push({
|
||||||
action: "edit",
|
action: "edit",
|
||||||
|
2
ifm.php
2
ifm.php
@@ -1565,7 +1565,7 @@ function IFM( params ) {
|
|||||||
icon: "icon icon-archive",
|
icon: "icon icon-archive",
|
||||||
title: "extract"
|
title: "extract"
|
||||||
});
|
});
|
||||||
} else if( self.config.edit && item.mime_type.substr( 0, 4 ) == "text" ) {
|
} else if( self.config.edit && ( item.mime_type.substr( 0, 4 ) == "text" || item.mime_type.indexOf( "xml" ) !== false ) ) {
|
||||||
item.eaction = "edit";
|
item.eaction = "edit";
|
||||||
item.button.push({
|
item.button.push({
|
||||||
action: "edit",
|
action: "edit",
|
||||||
|
@@ -145,7 +145,7 @@ function IFM( params ) {
|
|||||||
icon: "icon icon-archive",
|
icon: "icon icon-archive",
|
||||||
title: "extract"
|
title: "extract"
|
||||||
});
|
});
|
||||||
} else if( self.config.edit && item.mime_type.substr( 0, 4 ) == "text" ) {
|
} else if( self.config.edit && ( item.mime_type.substr( 0, 4 ) == "text" || item.mime_type.indexOf( "xml" ) !== false ) ) {
|
||||||
item.eaction = "edit";
|
item.eaction = "edit";
|
||||||
item.button.push({
|
item.button.push({
|
||||||
action: "edit",
|
action: "edit",
|
||||||
|
Reference in New Issue
Block a user