From 1db9e2d352c7dcda530157c54967344c85c4f36c Mon Sep 17 00:00:00 2001 From: MaysWind Date: Wed, 1 Jun 2016 22:05:36 +0800 Subject: [PATCH] change file name --- app/index.html | 2 +- app/scripts/controllers/list.js | 8 ++++---- app/scripts/controllers/main.js | 6 +++--- app/scripts/controllers/task-detail.js | 10 +++++----- .../{ariaNgTaskService.js => aria2TaskService.js} | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) rename app/scripts/services/{ariaNgTaskService.js => aria2TaskService.js} (98%) diff --git a/app/index.html b/app/index.html index be8576c..b99f7ac 100644 --- a/app/index.html +++ b/app/index.html @@ -284,7 +284,7 @@ - + diff --git a/app/scripts/controllers/list.js b/app/scripts/controllers/list.js index 6334dd5..76b785c 100644 --- a/app/scripts/controllers/list.js +++ b/app/scripts/controllers/list.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - angular.module('ariaNg').controller('DownloadListController', ['$rootScope', '$scope', '$window', '$location', '$route', '$interval', 'dragulaService', 'ariaNgCommonService', 'ariaNgSettingService', 'ariaNgTaskService', function ($rootScope, $scope, $window, $location, $route, $interval, dragulaService, ariaNgCommonService, ariaNgSettingService, ariaNgTaskService) { + angular.module('ariaNg').controller('DownloadListController', ['$rootScope', '$scope', '$window', '$location', '$route', '$interval', 'dragulaService', 'ariaNgCommonService', 'ariaNgSettingService', 'aria2TaskService', function ($rootScope, $scope, $window, $location, $route, $interval, dragulaService, ariaNgCommonService, ariaNgSettingService, aria2TaskService) { var location = $location.path().substring(1); var downloadTaskRefreshPromise = null; var pauseDownloadTaskRefresh = false; @@ -12,7 +12,7 @@ return; } - return ariaNgTaskService.getTaskList(location, needRequestWholeInfo, function (result) { + return aria2TaskService.getTaskList(location, needRequestWholeInfo, function (result) { if (!ariaNgCommonService.extendArray(result, $rootScope.taskContext.list, 'gid')) { if (needRequestWholeInfo) { $rootScope.taskContext.list = result; @@ -25,7 +25,7 @@ } if ($rootScope.taskContext.list) { - ariaNgTaskService.processDownloadTasks($rootScope.taskContext.list); + aria2TaskService.processDownloadTasks($rootScope.taskContext.list); $rootScope.taskContext.enableSelectAll = $rootScope.taskContext.list.length > 1; } }); @@ -73,7 +73,7 @@ pauseDownloadTaskRefresh = true; - ariaNgTaskService.changeTaskPosition(gid, index, function (result) { + aria2TaskService.changeTaskPosition(gid, index, function (result) { pauseDownloadTaskRefresh = false; }); }); diff --git a/app/scripts/controllers/main.js b/app/scripts/controllers/main.js index 1546eb9..d6b6b7d 100644 --- a/app/scripts/controllers/main.js +++ b/app/scripts/controllers/main.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - angular.module('ariaNg').controller('MainController', ['$rootScope', '$scope', '$route', '$interval', 'aria2SettingService', 'ariaNgCommonService', 'ariaNgTaskService', 'ariaNgSettingService', function ($rootScope, $scope, $route, $interval, aria2SettingService, ariaNgCommonService, ariaNgTaskService, ariaNgSettingService) { + angular.module('ariaNg').controller('MainController', ['$rootScope', '$scope', '$route', '$interval', 'ariaNgCommonService', 'ariaNgSettingService', 'aria2TaskService', 'aria2SettingService', function ($rootScope, $scope, $route, $interval, ariaNgCommonService, ariaNgSettingService, aria2TaskService, aria2SettingService) { var globalStatRefreshPromise = null; var refreshGlobalStat = function () { @@ -40,9 +40,9 @@ var invoke = null; if (state == 'start') { - invoke = ariaNgTaskService.startTasks; + invoke = aria2TaskService.startTasks; } else if (state == 'pause') { - invoke = ariaNgTaskService.pauseTasks; + invoke = aria2TaskService.pauseTasks; } else { return; } diff --git a/app/scripts/controllers/task-detail.js b/app/scripts/controllers/task-detail.js index e15b854..8f3faf6 100644 --- a/app/scripts/controllers/task-detail.js +++ b/app/scripts/controllers/task-detail.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - angular.module('ariaNg').controller('TaskDetailController', ['$rootScope', '$scope', '$routeParams', '$interval', 'ariaNgCommonService', 'ariaNgSettingService', 'ariaNgTaskService', function ($rootScope, $scope, $routeParams, $interval, ariaNgCommonService, ariaNgSettingService, ariaNgTaskService) { + angular.module('ariaNg').controller('TaskDetailController', ['$rootScope', '$scope', '$routeParams', '$interval', 'ariaNgCommonService', 'ariaNgSettingService', 'aria2TaskService', function ($rootScope, $scope, $routeParams, $interval, ariaNgCommonService, ariaNgSettingService, aria2TaskService) { var tabOrders = ['overview', 'blocks', 'filelist', 'btpeers']; var downloadTaskRefreshPromise = null; @@ -12,17 +12,17 @@ $scope.healthPercent = 0; var refreshBtPeers = function (task) { - return ariaNgTaskService.getBtTaskPeers(task.gid, function (result) { + return aria2TaskService.getBtTaskPeers(task.gid, function (result) { if (!ariaNgCommonService.extendArray(result, $scope.peers, 'peerId')) { $scope.peers = result; } - $scope.healthPercent = ariaNgTaskService.estimateHealthPercentFromPeers(task, $scope.peers); + $scope.healthPercent = aria2TaskService.estimateHealthPercentFromPeers(task, $scope.peers); }); }; var refreshDownloadTask = function () { - return ariaNgTaskService.getTaskStatus($routeParams.gid, function (result) { + return aria2TaskService.getTaskStatus($routeParams.gid, function (result) { if (result.status == 'active' && result.bittorrent) { refreshBtPeers(result); } else { @@ -62,7 +62,7 @@ }; $scope.loadTaskOption = function (task) { - $rootScope.loadPromise = ariaNgTaskService.getTaskOption(task.gid, function (result) { + $rootScope.loadPromise = aria2TaskService.getTaskOption(task.gid, function (result) { $scope.options = result; }); }; diff --git a/app/scripts/services/ariaNgTaskService.js b/app/scripts/services/aria2TaskService.js similarity index 98% rename from app/scripts/services/ariaNgTaskService.js rename to app/scripts/services/aria2TaskService.js index 23a8228..1fd1d2d 100644 --- a/app/scripts/services/ariaNgTaskService.js +++ b/app/scripts/services/aria2TaskService.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - angular.module('ariaNg').factory('ariaNgTaskService', ['$translate', 'aria2RpcService', function ($translate, aria2RpcService) { + angular.module('ariaNg').factory('aria2TaskService', ['$translate', 'aria2RpcService', function ($translate, aria2RpcService) { var getFileNameFromPath = function (path) { if (!path) { return path;