1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-10 10:04:01 +02:00

Merge branch 'development'

- set fileperm input field width dependening on the format
This commit is contained in:
Marco Dickert
2016-12-01 15:58:54 +01:00
5 changed files with 10 additions and 4 deletions

View File

@@ -35,7 +35,7 @@ class IFMConfig {
const showowner = 1; // show file owner?
const showgroup = 1; // show file group?
const showpath = 0; // show real path of directory (not only root)?
const showrights = 1; // show permissions 0 -> not; 1 -> octal, 2 -> human readable
const showrights = 2; // show permissions 0 -> not; 1 -> octal, 2 -> human readable
const showhtdocs = 1; // show .htaccess and .htpasswd
const showhiddenfiles = 1; // show files beginning with a dot (e.g. ".bashrc")
@@ -376,7 +376,8 @@ min-width:200px; right:0; top:0; } #options ul li:before { content: '\2192\00A0'
#filetable tr:hover { background-color: rgba(0, 0, 0, 0.12); }
#filetable tbody tr.selected { border: 1px dashed #777 !important; background-color: #FFE4C4; }
#filetable tbody tr:last-child { border-bottom: 1px solid #EBEBEB; }
#filetable input[type^=text] { width:50px; text-align:center; } .download-link { font-size: 0.9em; } .overlay { z-index:5; } .overlay fieldset { border: 0; background-color: white;}
#filetable input[type^=text] { width:50px; text-align:center; } #filetable input[type^=text].short { width:50px; } #filetable input[type^=text].long { width: 100px; }
.download-link { font-size: 0.9em; } .overlay { z-index:5; } .overlay fieldset { border: 0; background-color: white;}
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; text-align: center; background-color: rgba(0,0,0,0.7);}
.overlay form { width: 80%; margin: 3em auto; text-align: left; } .overlay form fieldset { position:relative; }
.overlay form#showFile { height:80%; } .overlay form#showFile fieldset { height:100%; } .overlay select { float:right; margin-top:10px; padding:10px; }
@@ -525,6 +526,7 @@ if(!ifm) {
newrow += ' onkeypress="ifm.changePermissions(event, \''+data[i].name+'\');"';
else
newrow += " readonly";
newrow += ( data[i].filepermmode.trim() != "" ) ? ' class="' + data[i].filepermmode + '"' : '';
newrow += '></td>';
}
if(data[i].owner) newrow += '<td>'+data[i].owner+'</td>';
@@ -1344,6 +1346,7 @@ $(document).ready(function() {ifm.init()}); // init ifm
if( IFMConfig::showrights == 1 ) $item["fileperms"] = substr( decoct( fileperms( $result ) ), -3 );
elseif( IFMConfig::showrights == 2 ) $item["fileperms"] = $this->filePermsDecode( fileperms( $result ) );
if( $item["fileperms"] == "" ) $item["fileperms"] = " ";
$item["filepermmode"] = ( IFMConfig::showrights == 1 ) ? "short" : "long";
}
if( IFMConfig::showowner == 1 ) {
if ( function_exists( "posix_getpwuid" ) && fileowner($result) !== false ) {

View File

@@ -35,7 +35,7 @@ class IFMConfig {
const showowner = 1; // show file owner?
const showgroup = 1; // show file group?
const showpath = 0; // show real path of directory (not only root)?
const showrights = 1; // show permissions 0 -> not; 1 -> octal, 2 -> human readable
const showrights = 2; // show permissions 0 -> not; 1 -> octal, 2 -> human readable
const showhtdocs = 1; // show .htaccess and .htpasswd
const showhiddenfiles = 1; // show files beginning with a dot (e.g. ".bashrc")

View File

@@ -124,6 +124,7 @@ if(!ifm) {
newrow += ' onkeypress="ifm.changePermissions(event, \''+data[i].name+'\');"';
else
newrow += " readonly";
newrow += ( data[i].filepermmode.trim() != "" ) ? ' class="' + data[i].filepermmode + '"' : '';
newrow += '></td>';
}
if(data[i].owner) newrow += '<td>'+data[i].owner+'</td>';

View File

@@ -213,6 +213,7 @@ class IFM {
if( IFMConfig::showrights == 1 ) $item["fileperms"] = substr( decoct( fileperms( $result ) ), -3 );
elseif( IFMConfig::showrights == 2 ) $item["fileperms"] = $this->filePermsDecode( fileperms( $result ) );
if( $item["fileperms"] == "" ) $item["fileperms"] = " ";
$item["filepermmode"] = ( IFMConfig::showrights == 1 ) ? "short" : "long";
}
if( IFMConfig::showowner == 1 ) {
if ( function_exists( "posix_getpwuid" ) && fileowner($result) !== false ) {

View File

@@ -35,7 +35,8 @@ min-width:200px; right:0; top:0; } #options ul li:before { content: '\2192\00A0'
#filetable tr:hover { background-color: rgba(0, 0, 0, 0.12); }
#filetable tbody tr.selected { border: 1px dashed #777 !important; background-color: #FFE4C4; }
#filetable tbody tr:last-child { border-bottom: 1px solid #EBEBEB; }
#filetable input[type^=text] { width:50px; text-align:center; } .download-link { font-size: 0.9em; } .overlay { z-index:5; } .overlay fieldset { border: 0; background-color: white;}
#filetable input[type^=text] { width:50px; text-align:center; } #filetable input[type^=text].short { width:50px; } #filetable input[type^=text].long { width: 100px; }
.download-link { font-size: 0.9em; } .overlay { z-index:5; } .overlay fieldset { border: 0; background-color: white;}
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; text-align: center; background-color: rgba(0,0,0,0.7);}
.overlay form { width: 80%; margin: 3em auto; text-align: left; } .overlay form fieldset { position:relative; }
.overlay form#showFile { height:80%; } .overlay form#showFile fieldset { height:100%; } .overlay select { float:right; margin-top:10px; padding:10px; }