diff --git a/CyberCP/settings.py b/CyberCP/settings.py index 0c1b28e39..f3ae163cb 100755 --- a/CyberCP/settings.py +++ b/CyberCP/settings.py @@ -24,7 +24,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'xr%j*p!*$0d%(-(e%@-*hyoz4$f%y77coq0u)6pwmjg4)q&19f' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False ALLOWED_HOSTS = ['*'] @@ -111,7 +111,7 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'cyberpanel', - 'USER': 'root', + 'USER': 'cyberpanel', 'PASSWORD': 'VY7ZbcQREu6mSC', 'HOST': 'localhost', 'PORT': '' diff --git a/filemanager/static/filemanager/js/fileManager.js b/filemanager/static/filemanager/js/fileManager.js index a7f9447c0..37c2f47ed 100755 --- a/filemanager/static/filemanager/js/fileManager.js +++ b/filemanager/static/filemanager/js/fileManager.js @@ -61,13 +61,12 @@ fileManager.controller('fileManagerCtrl', function ($scope, $http, FileUploader, $('#uploadBox').modal('show'); }; - $scope.showHTMLEditorModal = function () { + $scope.showHTMLEditorModal = function (MainFM= 0) { $scope.htmlEditorLoading = false; $scope.errorMessageEditor = true; $('#showHTMLEditor').modal('show'); $scope.fileInEditor = allFilesAndFolders[0]; - $scope.getFileContents(); - + $scope.getFileContents(MainFM); }; @@ -636,7 +635,6 @@ fileManager.controller('fileManagerCtrl', function ($scope, $http, FileUploader, if (functionName === "startPoint") { completePathToFile = $scope.currentRPath; } else if (functionName === "doubleClick") { - completePathToFile = $scope.currentRPath + "/" + node.innerHTML; } else if (functionName === "homeFetch") { completePathToFile = homeRPathBack; @@ -756,13 +754,16 @@ fileManager.controller('fileManagerCtrl', function ($scope, $http, FileUploader, // html editor - $scope.getFileContents = function () { + $scope.getFileContents = function (MainFM = 0) { // console.log("selectedfile"+ allFilesAndFolders) // console.log("currentpath"+ $scope.currentRPath) - var completePathForFile = $scope.currentRPath + "/" + allFilesAndFolders[0]; - + if(MainFM === 1){ + var completePathForFile = $scope.currentPath + "/" + allFilesAndFolders[0]; + }else { + var completePathForFile = $scope.currentRPath + "/" + allFilesAndFolders[0]; + } var data = { fileName: completePathForFile, @@ -862,7 +863,7 @@ fileManager.controller('fileManagerCtrl', function ($scope, $http, FileUploader, $scope.errorMessage = true; var uploader; - if (domainName == "") { + if (domainName === "") { uploader = $scope.uploader = new FileUploader({ url: "/filemanager/upload", headers: { @@ -884,7 +885,6 @@ fileManager.controller('fileManagerCtrl', function ($scope, $http, FileUploader, "home": homePathBack }] }); - } diff --git a/filemanager/templates/filemanager/index.html b/filemanager/templates/filemanager/index.html index 8fc1643a8..367db5bb9 100755 --- a/filemanager/templates/filemanager/index.html +++ b/filemanager/templates/filemanager/index.html @@ -73,7 +73,7 @@ {% trans "Rename" %}