add option for changing task order by drag-and-drop
This commit is contained in:
parent
5f718894aa
commit
220df6ca49
|
@ -175,6 +175,7 @@ Add New RPC Setting=添加新 RPC 设置
|
|||
Are you sure you want to remove rpc setting "{{rpcName}}"?=您是否要删除 RPC 设置 "{{rpcName}}"?
|
||||
Updating Global Stat Interval=全局状态更新间隔
|
||||
Updating Task Information Interval=任务信息更新间隔
|
||||
Change Tasks Order by Drag-and-drop=拖拽任务排序
|
||||
Action After Creating New Tasks=创建新任务后执行操作
|
||||
Navigate to Task List Page=转到任务列表页面
|
||||
Navigate to Task Detail Page=转到任务详情页面
|
||||
|
|
|
@ -175,6 +175,7 @@ Add New RPC Setting=加入新 RPC 設定
|
|||
Are you sure you want to remove rpc setting "{{rpcName}}"?=您是否要刪除 RPC 設定 "{{rpcName}}"?
|
||||
Updating Global Stat Interval=全域狀態更新間隔
|
||||
Updating Task Information Interval=工作資訊更新間隔
|
||||
Change Tasks Order by Drag-and-drop=拖拽工作排序
|
||||
Action After Creating New Tasks=建立新工作後執行操作
|
||||
Navigate to Task List Page=轉到工作清單頁面
|
||||
Navigate to Task Detail Page=轉到工作詳情頁面
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
extendRpcServers: [],
|
||||
globalStatRefreshInterval: 1000,
|
||||
downloadTaskRefreshInterval: 1000,
|
||||
dragAndDropTasks: true,
|
||||
rpcListDisplayOrder: 'recentlyUsed',
|
||||
afterCreatingNewTask: 'task-list',
|
||||
removeOldTaskAfterRetrying: false,
|
||||
|
|
|
@ -179,6 +179,7 @@
|
|||
'Are you sure you want to remove rpc setting "{{rpcName}}"?': 'Are you sure you want to remove rpc setting "{{rpcName}}"?',
|
||||
'Updating Global Stat Interval': 'Updating Global Stat Interval',
|
||||
'Updating Task Information Interval': 'Updating Task Information Interval',
|
||||
'Change Tasks Order by Drag-and-drop': 'Change Tasks Order by Drag-and-drop',
|
||||
'Action After Creating New Tasks': 'Action After Creating New Tasks',
|
||||
'Navigate to Task List Page': 'Navigate to Task List Page',
|
||||
'Navigate to Task Detail Page': 'Navigate to Task Detail Page',
|
||||
|
|
|
@ -79,6 +79,10 @@
|
|||
};
|
||||
|
||||
$scope.isSupportDragTask = function () {
|
||||
if (!ariaNgSettingService.getDragAndDropTasks()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var displayOrder = ariaNgCommonService.parseOrderType(ariaNgSettingService.getDisplayOrder());
|
||||
|
||||
return location === 'waiting' && displayOrder.type === 'default';
|
||||
|
|
|
@ -185,6 +185,10 @@
|
|||
ariaNgSettingService.setRPCListDisplayOrder(value);
|
||||
};
|
||||
|
||||
$scope.setDragAndDropTasks = function (value) {
|
||||
ariaNgSettingService.setDragAndDropTasks(value);
|
||||
};
|
||||
|
||||
$scope.setAfterCreatingNewTask = function (value) {
|
||||
ariaNgSettingService.setAfterCreatingNewTask(value);
|
||||
};
|
||||
|
|
|
@ -391,6 +391,12 @@
|
|||
setDownloadTaskRefreshInterval: function (value) {
|
||||
setOption('downloadTaskRefreshInterval', Math.max(parseInt(value), 0));
|
||||
},
|
||||
getDragAndDropTasks: function () {
|
||||
return getOption('dragAndDropTasks');
|
||||
},
|
||||
setDragAndDropTasks: function (value) {
|
||||
setOption('dragAndDropTasks', value);
|
||||
},
|
||||
getRPCListDisplayOrder: function () {
|
||||
return getOption('rpcListDisplayOrder');
|
||||
},
|
||||
|
|
|
@ -135,6 +135,17 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="setting-key setting-key-without-desc col-sm-4">
|
||||
<span translate>Change Tasks Order by Drag-and-drop</span>
|
||||
</div>
|
||||
<div class="setting-value col-sm-8">
|
||||
<select class="form-control" style="width: 100%;" ng-model="context.settings.dragAndDropTasks"
|
||||
ng-change="setDragAndDropTasks(context.settings.dragAndDropTasks)"
|
||||
ng-options="option.value as (option.name | translate) for option in context.trueFalseOptions">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="setting-key setting-key-without-desc col-sm-4">
|
||||
<span translate>RPC List Display Order</span>
|
||||
|
|
Reference in a new issue