2016-06-18 18:11:19 +02:00
|
|
|
<section class="content no-padding">
|
2016-07-31 16:26:25 +02:00
|
|
|
<form name="newTaskForm" ng-submit="startDownload()" novalidate>
|
|
|
|
<div class="nav-tabs-custom">
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
<li ng-class="{'active': context.currentTab == 'links'}">
|
2017-03-28 02:35:24 +02:00
|
|
|
<a class="pointer-cursor" ng-click="changeTab('links')" ng-bind="(context.taskType === 'torrent' ? 'Torrent File' : (context.taskType === 'metalink' ? 'Metalink File' : 'Links') | translate)">Links</a>
|
2016-07-31 16:26:25 +02:00
|
|
|
</li>
|
|
|
|
<li ng-class="{'active': context.currentTab == 'options'}">
|
|
|
|
<a class="pointer-cursor" ng-click="changeTab('options')" translate>Options</a>
|
|
|
|
</li>
|
|
|
|
<li class="divider"></li>
|
|
|
|
<li class="nav-toolbar">
|
|
|
|
<div class="btn-group">
|
|
|
|
<button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
|
|
|
|
<i class="fa fa-folder-open-o fa-1_1x"></i>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu right-align">
|
|
|
|
<li><a class="pointer-cursor" ng-click="openTorrent()" translate>Open Torrent File</a></li>
|
|
|
|
<li><a class="pointer-cursor" ng-click="openMetalink()" translate>Open Metalink File</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group">
|
|
|
|
<button type="submit" class="btn btn-sm"
|
2017-03-28 02:35:24 +02:00
|
|
|
ng-class="{'btn-default': !context.uploadFile && newTaskForm.$invalid, 'btn-success': context.uploadFile || !newTaskForm.$invalid}"
|
|
|
|
ng-disabled="!context.uploadFile && newTaskForm.$invalid" translate>Start Download
|
2016-12-24 18:07:16 +01:00
|
|
|
</button>
|
2016-07-31 16:26:25 +02:00
|
|
|
<button type="button" class="btn btn-sm dropdown-toggle"
|
2017-03-28 02:35:24 +02:00
|
|
|
ng-class="{'btn-default': !context.uploadFile && newTaskForm.$invalid, 'btn-success': context.uploadFile || !newTaskForm.$invalid}"
|
|
|
|
ng-disabled="!context.uploadFile && newTaskForm.$invalid" data-toggle="dropdown">
|
2016-07-31 16:26:25 +02:00
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu right-align">
|
|
|
|
<li><a class="pointer-cursor" ng-click="startDownload(true)" translate>Manual Download</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2016-06-19 17:10:26 +02:00
|
|
|
|
2016-07-31 16:26:25 +02:00
|
|
|
<div class="tab-content no-padding">
|
|
|
|
<div class="tab-pane" ng-class="{'active': context.currentTab == 'links'}">
|
2017-03-28 02:35:24 +02:00
|
|
|
<div class="new-task-table" ng-if="context.taskType === 'urls'">
|
2016-06-19 17:10:26 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<p translate>Download Links:</p>
|
|
|
|
<div class="form-group has-feedback no-margin" ng-class="{ 'has-error' : newTaskForm.urls.$invalid && newTaskForm.urls.$dirty, 'has-success' : newTaskForm.urls.$valid && newTaskForm.urls.$dirty }">
|
2017-03-28 02:35:24 +02:00
|
|
|
<textarea name="urls" class="form-control" rows="10" autofocus="autofocus" ng-auto-focus
|
|
|
|
ng-model="context.urls" ng-required="true" ng-keydown="urlTextboxKeyDown($event)"
|
|
|
|
ng-placeholder="'Support multiple URLs, one URL per line.' | translate"
|
2017-08-27 16:07:02 +02:00
|
|
|
ng-pattern="/^(\n?(((http|https|ftp|sftp):\/\/.+)|(magnet:\?.+)))*$/i"></textarea>
|
2016-06-19 17:10:26 +02:00
|
|
|
<div class="form-control-icon" ng-if="newTaskForm.urls.$dirty">
|
|
|
|
<i class="fa form-control-feedback" ng-class="{'fa-check':newTaskForm.urls.$valid, 'fa-times':newTaskForm.urls.$invalid}"></i>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-28 02:35:24 +02:00
|
|
|
<div class="new-task-table" ng-if="context.taskType === 'torrent' || context.taskType === 'metalink'">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<p translate>File Name:</p>
|
2017-05-14 07:39:22 +02:00
|
|
|
<input class="form-control" ng-value="context.uploadFile ? context.uploadFile.fileName : ''" readonly="readonly"/>
|
2017-03-28 02:35:24 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-07-31 16:26:25 +02:00
|
|
|
</div>
|
|
|
|
<div class="tab-pane" ng-class="{'active': context.currentTab == 'options'}">
|
|
|
|
<div class="settings-table striped hoverable">
|
2016-12-24 18:07:16 +01:00
|
|
|
<div class="settings-table-title new-task-filter-title">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
2016-12-25 03:07:02 +01:00
|
|
|
<span translate>Filters</span><span>: </span>
|
2016-12-24 18:07:16 +01:00
|
|
|
<div class="checkbox checkbox-inline checkbox-primary">
|
|
|
|
<input id="optionFilterGlobal" type="checkbox" ng-model="context.optionFilter['global']"/>
|
|
|
|
<label for="optionFilterGlobal" translate>Global</label>
|
|
|
|
</div>
|
|
|
|
<div class="checkbox checkbox-inline checkbox-primary">
|
|
|
|
<input id="optionFilterHttp" type="checkbox" ng-model="context.optionFilter['http']"/>
|
|
|
|
<label for="optionFilterHttp" translate>Http</label>
|
|
|
|
</div>
|
|
|
|
<div class="checkbox checkbox-inline checkbox-primary">
|
|
|
|
<input id="optionFilterBittorrent" type="checkbox" ng-model="context.optionFilter['bittorrent']"/>
|
|
|
|
<label for="optionFilterBittorrent" translate>BitTorrent</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<ng-setting ng-repeat="option in context.availableOptions" ng-if="context.optionFilter[option.category]"
|
|
|
|
option="option" lazy-save-timeout="0" default-value="context.globalOptions[option.key]"
|
2016-07-31 16:26:25 +02:00
|
|
|
on-change-value="setOption(key, value, optionStatus)"></ng-setting>
|
|
|
|
</div>
|
2016-06-18 18:11:19 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-07-31 16:26:25 +02:00
|
|
|
</form>
|
2016-06-18 18:11:19 +02:00
|
|
|
</section>
|