Merge pull request #201 from miladj/master
change the order in the queue
This commit is contained in:
commit
b9363d5eac
155
index.html
155
index.html
|
@ -1,4 +1,4 @@
|
||||||
<!doctype>
|
<!doctype>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<!-- {{{ head -->
|
<!-- {{{ head -->
|
||||||
|
@ -149,7 +149,11 @@
|
||||||
href="#"
|
href="#"
|
||||||
ng-click="purgeDownloadResult()"><span class="fa fa-fw fa-times-circle"> </span> {{ 'Purge Completed' | translate }}</a>
|
ng-click="purgeDownloadResult()"><span class="fa fa-fw fa-times-circle"> </span> {{ 'Purge Completed' | translate }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
ng-click="shutDownServer()"><span class="fa fa-fw fa-power-off"> </span> {{ 'Shutdown Server' | translate }}</a>
|
||||||
|
</li>
|
||||||
<!-- not adding remove all as requires many rpc syscalls to finish
|
<!-- not adding remove all as requires many rpc syscalls to finish
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
|
@ -400,86 +404,97 @@
|
||||||
ng-repeat="download in getDownloads()"
|
ng-repeat="download in getDownloads()"
|
||||||
class="row-fluid download well" data-gid="{{download.gid}}"
|
class="row-fluid download well" data-gid="{{download.gid}}"
|
||||||
ng-click="toggleCollapsed(download)">
|
ng-click="toggleCollapsed(download)">
|
||||||
<div class="download-name download-item download-controls">
|
<div class="download-name download-item download-controls">
|
||||||
<!-- {{{ download control buttons -->
|
<!-- {{{ download control buttons -->
|
||||||
<div class="btn-group" role="group" ng-click="$event.stopPropagation()">
|
<div class="btn-group" role="group" ng-click="$event.stopPropagation()">
|
||||||
<button
|
<button
|
||||||
ng-if="hasStatus(download, ['active', 'waiting'])"
|
ng-if="hasStatus(download, ['active', 'waiting'])"
|
||||||
class="btn btn-default"
|
class="btn btn-default"
|
||||||
ng-click="pause(download)">
|
ng-click="pause(download)">
|
||||||
<span class="fa fa-fw fa-pause"></span>
|
<span class="fa fa-fw fa-pause"></span>
|
||||||
</button>
|
|
||||||
|
|
||||||
<button
|
|
||||||
ng-if="hasStatus(download, 'paused')"
|
|
||||||
class="btn btn-default"
|
|
||||||
ng-click="resume(download)">
|
|
||||||
<span class="fa fa-fw fa-play"></span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button
|
|
||||||
ng-if="canRestart(download)"
|
|
||||||
class="btn btn-default"
|
|
||||||
ng-click="restart(download)">
|
|
||||||
<span class="fa fa-fw fa-repeat"></span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button
|
|
||||||
class="btn btn-default hidden-phone"
|
|
||||||
ng-click="remove(download)">
|
|
||||||
<span class="fa fa-fw fa-stop"></span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button
|
|
||||||
ng-if="hasStatus(download, 'paused')"
|
|
||||||
class="btn btn-default"
|
|
||||||
ng-click="selectFiles(download)">
|
|
||||||
<span class="fa fa-fw fa-list"></span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button
|
|
||||||
class="btn btn-default hidden-phone"
|
|
||||||
ng-if="['waiting', 'active'].indexOf( getType(download) )!= -1"
|
|
||||||
ng-click="showSettings(download)">
|
|
||||||
<span class="fa fa-fw fa-cog"></span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div class="btn-group" dropdown>
|
|
||||||
<button class="btn btn-default dropdown-toggle" dropdown-toggle>
|
|
||||||
<span class="caret"></span>
|
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu pull-right">
|
|
||||||
|
|
||||||
<li class="visible-phone">
|
<button
|
||||||
<a
|
ng-if="hasStatus(download, 'paused')"
|
||||||
ng-click="showSettings(download)"
|
class="btn btn-default"
|
||||||
ng-show="['waiting', 'active'].indexOf( getType(download) )!= -1"
|
ng-click="resume(download)">
|
||||||
href="#"><span class="fa fa-fw fa-cog"> </span> {{ 'Settings' | translate }}</a>
|
<span class="fa fa-fw fa-play"></span>
|
||||||
</li>
|
</button>
|
||||||
|
|
||||||
<li ng-show="download.bittorrent && false">
|
<button
|
||||||
<a href="#"><span class="fa fa-fw fa-list-alt"> </span> {{ 'Peers' | translate }}</a>
|
ng-if="canRestart(download)"
|
||||||
</li>
|
class="btn btn-default"
|
||||||
|
ng-click="restart(download)">
|
||||||
|
<span class="fa fa-fw fa-repeat"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
<li>
|
<button
|
||||||
<a ng-click="toggleCollapsed(download)"
|
class="btn btn-default hidden-phone"
|
||||||
href="#"><span class="fa fa-fw fa-info-circle"> </span> {{ 'More Info' | translate }}</a>
|
ng-click="remove(download)">
|
||||||
</li>
|
<span class="fa fa-fw fa-stop"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
<li class="visible-phone">
|
<button
|
||||||
<a ng-click="remove(download)"
|
ng-if="hasStatus(download, 'paused')"
|
||||||
href="#"><span class="fa fa-fw fa-times"> </span> {{ 'Remove' | translate }}</a>
|
class="btn btn-default"
|
||||||
</li>
|
ng-click="selectFiles(download)">
|
||||||
</ul>
|
<span class="fa fa-fw fa-list"></span>
|
||||||
</div>
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="btn btn-default hidden-phone"
|
||||||
|
ng-if="['waiting', 'active'].indexOf( getType(download) )!= -1"
|
||||||
|
ng-click="showSettings(download)">
|
||||||
|
<span class="fa fa-fw fa-cog"></span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
ng-if="hasStatus(download, 'waiting')"
|
||||||
|
class="btn btn-default hidden-phone"
|
||||||
|
ng-click="moveDown(download)">
|
||||||
|
<span class="fa fa-fw fa-arrow-circle-o-down"></span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
ng-if="hasStatus(download, 'waiting')"
|
||||||
|
class="btn btn-default hidden-phone"
|
||||||
|
ng-click="moveUp(download)">
|
||||||
|
<span class="fa fa-fw fa-arrow-circle-o-up"></span>
|
||||||
|
</button>
|
||||||
|
<div class="btn-group" dropdown>
|
||||||
|
<button class="btn btn-default dropdown-toggle" dropdown-toggle>
|
||||||
|
<span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu pull-right">
|
||||||
|
|
||||||
|
<li class="visible-phone">
|
||||||
|
<a
|
||||||
|
ng-click="showSettings(download)"
|
||||||
|
ng-show="['waiting', 'active'].indexOf( getType(download) )!= -1"
|
||||||
|
href="#"><span class="fa fa-fw fa-cog"> </span> {{ 'Settings' | translate }}</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li ng-show="download.bittorrent && false">
|
||||||
|
<a href="#"><span class="fa fa-fw fa-list-alt"> </span> {{ 'Peers' | translate }}</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a ng-click="toggleCollapsed(download)"
|
||||||
|
href="#"><span class="fa fa-fw fa-info-circle"> </span> {{ 'More Info' | translate }}</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="visible-phone">
|
||||||
|
<a ng-click="remove(download)"
|
||||||
|
href="#"><span class="fa fa-fw fa-times"> </span> {{ 'Remove' | translate }}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- }}} -->
|
<!-- }}} -->
|
||||||
|
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="fa fa-fw fa-magnet" style="color: red;" ng-show="download.metadata"></span>
|
<span class="fa fa-fw fa-magnet" style="color: red;" ng-show="download.metadata"></span>
|
||||||
{{download.name}}
|
{{download.name}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="download-overview download-item" ng-switch="download.status">
|
<div class="download-overview download-item" ng-switch="download.status">
|
||||||
<!-- {{{ statistics -->
|
<!-- {{{ statistics -->
|
||||||
<ul class="stats pull-left" ng-switch-when="active">
|
<ul class="stats pull-left" ng-switch-when="active">
|
||||||
|
|
|
@ -400,6 +400,8 @@ function(
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if (ctx.gid !== d.gid)
|
||||||
|
ctx.files = [];
|
||||||
ctx.dir = d.dir;
|
ctx.dir = d.dir;
|
||||||
ctx.status = d.status;
|
ctx.status = d.status;
|
||||||
ctx.errorCode = d.errorCode;
|
ctx.errorCode = d.errorCode;
|
||||||
|
@ -588,5 +590,11 @@ function(
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
scope.moveDown = function (d) {
|
||||||
|
rpc.once('changePosition', [d.gid, 1, 'POS_CUR']);
|
||||||
|
};
|
||||||
|
scope.moveUp = function (d) {
|
||||||
|
rpc.once('changePosition', [d.gid, -1, 'POS_CUR']);
|
||||||
|
};
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
|
|
|
@ -137,4 +137,7 @@ angular
|
||||||
translate.use(langkey);
|
translate.use(langkey);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
scope.shutDownServer = function () {
|
||||||
|
rpc.once('shutdown', []);
|
||||||
|
};
|
||||||
}]);
|
}]);
|
||||||
|
|
|
@ -132,5 +132,6 @@ translations.en_US = {
|
||||||
'Uploaded':'Uploaded',
|
'Uploaded':'Uploaded',
|
||||||
'Download GID':'Download GID',
|
'Download GID':'Download GID',
|
||||||
'Number of Pieces':'Number of Pieces',
|
'Number of Pieces':'Number of Pieces',
|
||||||
'Piece Length':'Piece Length'
|
'Piece Length': 'Piece Length',
|
||||||
|
'Shutdown Server': 'Shutdown Server'
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user