mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-11 10:34:00 +02:00
Fixed some logging issues
Signed-off-by: Marco Dickert <marco@misterunknown.de>
This commit is contained in:
11
src/ifm.js
11
src/ifm.js
@@ -52,7 +52,7 @@ function IFM( params ) {
|
|||||||
$(modal)
|
$(modal)
|
||||||
.on( 'hide.bs.modal', function( e ) {
|
.on( 'hide.bs.modal', function( e ) {
|
||||||
if( document.forms.formFile && self.fileChanged && !self.isModalClosedByButton ) {
|
if( document.forms.formFile && self.fileChanged && !self.isModalClosedByButton ) {
|
||||||
console.log( "Prevented closing modal because the file was changed and no button was clicked." );
|
self.log( "Prevented closing modal because the file was changed and no button was clicked." );
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
} else
|
} else
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
@@ -327,7 +327,6 @@ function IFM( params ) {
|
|||||||
copylink: {
|
copylink: {
|
||||||
name: self.i18n.copylink,
|
name: self.i18n.copylink,
|
||||||
onClick: function( data ) {
|
onClick: function( data ) {
|
||||||
console.log( "CopyLink-Function: This was the original link: "+data.clicked.link );
|
|
||||||
if( data.clicked.link.toLowerCase().substr(0,4) == "http" )
|
if( data.clicked.link.toLowerCase().substr(0,4) == "http" )
|
||||||
self.copyToClipboard( data.clicked.link );
|
self.copyToClipboard( data.clicked.link );
|
||||||
else
|
else
|
||||||
@@ -1197,7 +1196,7 @@ function IFM( params ) {
|
|||||||
},
|
},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
console.log( data );
|
self.log( data );
|
||||||
if( data.status == "OK" ) {
|
if( data.status == "OK" ) {
|
||||||
self.showMessage( data.message, "s" );
|
self.showMessage( data.message, "s" );
|
||||||
self.refreshFileTable();
|
self.refreshFileTable();
|
||||||
@@ -1243,21 +1242,17 @@ function IFM( params ) {
|
|||||||
|
|
||||||
if( args.length == 0 )
|
if( args.length == 0 )
|
||||||
return "";
|
return "";
|
||||||
console.log( args.length );
|
|
||||||
|
|
||||||
first = "";
|
first = "";
|
||||||
while( first.length < 1 )
|
while( first.length < 1 )
|
||||||
first = args.shift();
|
first = args.shift();
|
||||||
|
|
||||||
console.log("First: "+first);
|
|
||||||
|
|
||||||
first = first.replace( /\/+$/g, '' );
|
first = first.replace( /\/+$/g, '' );
|
||||||
if( !args.length )
|
if( !args.length )
|
||||||
return first;
|
return first;
|
||||||
|
|
||||||
args.forEach( (v, i) => args[i] = v.replace( /^\/*|\/*$/g, '' ) ); // */
|
args.forEach( (v, i) => args[i] = v.replace( /^\/*|\/*$/g, '' ) ); // */
|
||||||
args.unshift( first );
|
args.unshift( first );
|
||||||
console.log( args.join('/'));
|
|
||||||
return args.join( '/' );
|
return args.join( '/' );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1889,7 +1884,7 @@ function IFM( params ) {
|
|||||||
else
|
else
|
||||||
self.copyMove( source, destination.name, "move" );
|
self.copyMove( source, destination.name, "move" );
|
||||||
} catch( e ) {
|
} catch( e ) {
|
||||||
console.log( e );
|
self.log( e );
|
||||||
} finally {
|
} finally {
|
||||||
[].slice.call( document.getElementsByClassName( 'highlightedItem' ) ).forEach( function( e ) {
|
[].slice.call( document.getElementsByClassName( 'highlightedItem' ) ).forEach( function( e ) {
|
||||||
e.classList.remove( 'highlightedItem' );
|
e.classList.remove( 'highlightedItem' );
|
||||||
|
Reference in New Issue
Block a user