Browse Source

CP Files manager, block action buttons on new folder, folder remove and file remove

Vova Tkach 5 years ago
parent
commit
7e79a4aaf5
2 changed files with 9 additions and 0 deletions
  1. 9 0
      engine/assets/cp.scripts.js
  2. 0 0
      engine/assets/cp.scripts.js.go

+ 9 - 0
engine/assets/cp.scripts.js

@@ -7808,6 +7808,7 @@
 				if(!confirm(msg)) {
 				if(!confirm(msg)) {
 					return;
 					return;
 				}
 				}
+				fave.FilesManagerEnableDisableButtons(true);
 				$.ajax({
 				$.ajax({
 					type: "POST",
 					type: "POST",
 					url: '/cp/',
 					url: '/cp/',
@@ -7825,6 +7826,8 @@
 						if(IsDebugMode()) console.log('fail', xhr, status, error);
 						if(IsDebugMode()) console.log('fail', xhr, status, error);
 						AjaxFail(xhr.responseText, status, error);
 						AjaxFail(xhr.responseText, status, error);
 					}
 					}
+				}).always(function() {
+					fave.FilesManagerEnableDisableButtons(false);
 				});
 				});
 			},
 			},
 
 
@@ -7832,6 +7835,7 @@
 				if(!confirm(msg)) {
 				if(!confirm(msg)) {
 					return;
 					return;
 				}
 				}
+				fave.FilesManagerEnableDisableButtons(true);
 				$.ajax({
 				$.ajax({
 					type: "POST",
 					type: "POST",
 					url: '/cp/',
 					url: '/cp/',
@@ -7849,6 +7853,8 @@
 						if(IsDebugMode()) console.log('fail', xhr, status, error);
 						if(IsDebugMode()) console.log('fail', xhr, status, error);
 						AjaxFail(xhr.responseText, status, error);
 						AjaxFail(xhr.responseText, status, error);
 					}
 					}
+				}).always(function() {
+					fave.FilesManagerEnableDisableButtons(false);
 				});
 				});
 			},
 			},
 
 
@@ -7930,6 +7936,7 @@
 				var folderName = prompt('Please enter new folder name', '');
 				var folderName = prompt('Please enter new folder name', '');
 				if(folderName != null) {
 				if(folderName != null) {
 					path = fave.FilesManagerGetPath();
 					path = fave.FilesManagerGetPath();
+					fave.FilesManagerEnableDisableButtons(true);
 					$.ajax({
 					$.ajax({
 						type: "POST",
 						type: "POST",
 						url: '/cp/',
 						url: '/cp/',
@@ -7948,6 +7955,8 @@
 							if(IsDebugMode()) console.log('fail', xhr, status, error);
 							if(IsDebugMode()) console.log('fail', xhr, status, error);
 							AjaxFail(xhr.responseText, status, error);
 							AjaxFail(xhr.responseText, status, error);
 						}
 						}
+					}).always(function() {
+						fave.FilesManagerEnableDisableButtons(false);
 					});
 					});
 				}
 				}
 			},
 			},

File diff suppressed because it is too large
+ 0 - 0
engine/assets/cp.scripts.js.go


Some files were not shown because too many files changed in this diff