code refactor
This commit is contained in:
parent
a7e1d3a1f0
commit
62b678c914
|
@ -1,7 +1,7 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular.module('ariaNg').run(['$rootScope', '$location', '$document', 'SweetAlert', 'ariaNgNotificationService', 'ariaNgSettingService', 'ariaNgLogService', 'aria2TaskService', function ($rootScope, $location, $document, SweetAlert, ariaNgNotificationService, ariaNgSettingService, ariaNgLogService, aria2TaskService) {
|
||||
angular.module('ariaNg').run(['$rootScope', '$location', '$document', 'ariaNgCommonService', 'ariaNgNotificationService', 'ariaNgSettingService', 'ariaNgLogService', 'aria2TaskService', function ($rootScope, $location, $document, ariaNgCommonService, ariaNgNotificationService, ariaNgSettingService, ariaNgLogService, aria2TaskService) {
|
||||
var isUrlMatchUrl2 = function (url, url2) {
|
||||
if (url === url2) {
|
||||
return true;
|
||||
|
@ -219,7 +219,7 @@
|
|||
});
|
||||
|
||||
$rootScope.$on('$locationChangeStart', function (event) {
|
||||
SweetAlert.close();
|
||||
ariaNgCommonService.closeAllDialogs();
|
||||
|
||||
$rootScope.loadPromise = null;
|
||||
|
||||
|
|
|
@ -55,6 +55,9 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
closeAllDialogs: function () {
|
||||
SweetAlert.close();
|
||||
},
|
||||
getFileExtension: function (filePath) {
|
||||
if (!filePath || filePath.lastIndexOf('.') < 0) {
|
||||
return filePath;
|
||||
|
|
Reference in a new issue