mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-10 15:26:13 +01:00
feature: ref https://github.com/usmannasir/cyberpanel/issues/189 create file via enter
This commit is contained in:
@@ -25,6 +25,10 @@ fileManager.config(['$interpolateProvider', function ($interpolateProvider) {
|
||||
|
||||
fileManager.controller('fileManagerCtrl', function ($scope, $http, FileUploader, $window) {
|
||||
|
||||
$('form').submit(function(e){
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$(document.body).click(function () {
|
||||
rightClickNode.style.display = "none";
|
||||
});
|
||||
@@ -921,6 +925,15 @@ fileManager.controller('fileManagerCtrl', function ($scope, $http, FileUploader,
|
||||
$('#showCreateFile').modal('show');
|
||||
};
|
||||
|
||||
$scope.createFileEnter = function($event){
|
||||
var keyCode = $event.which || $event.keyCode;
|
||||
if (keyCode === 13) {
|
||||
$scope.htmlEditorLoading = false;
|
||||
$scope.createNewFile();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$scope.createNewFile = function () {
|
||||
|
||||
var completePathForFile = $scope.currentPath + "/" + $scope.newFileName;
|
||||
|
||||
Reference in New Issue
Block a user