mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-29 18:39:49 +02:00
moved includes to src/includes, added modal input focus
This commit is contained in:
14
ifm.php
14
ifm.php
@@ -454,8 +454,14 @@ function IFM() {
|
||||
modalDialog.append( modalContent );
|
||||
modal.append( modalDialog );
|
||||
$( document.body ).append( modal );
|
||||
modal.modal();
|
||||
modal.on('hide.bs.modal', function () { $(this).remove(); });
|
||||
modal.on('shown.bs.modal', function () {
|
||||
var formElements = $(this).find('input, button');
|
||||
if( formElements.length > 0 ) {
|
||||
formElements.first().focus();
|
||||
}
|
||||
});
|
||||
modal.modal('show');
|
||||
};
|
||||
|
||||
this.hideModal = function() {
|
||||
@@ -1079,6 +1085,12 @@ function IFM() {
|
||||
$("#upload").click(function(){
|
||||
self.uploadFileDialog();
|
||||
});
|
||||
$('#currentDir').on( 'keypress', function (event) {
|
||||
if( event.keyCode == 13 ) {
|
||||
event.preventDefault();
|
||||
self.changeDirectory( $(this).val(), { absolute: true } );
|
||||
}
|
||||
});
|
||||
$(document).on( 'keypress', self.handleKeystrokes );
|
||||
|
||||
// handle history manipulation
|
||||
|
Reference in New Issue
Block a user