added filter for global settings, translation for 'Filter'

This commit is contained in:
Andrii Pastushenko 2017-06-24 21:54:27 +03:00
parent 3e70c3a48a
commit 23ec546535
17 changed files with 49 additions and 3 deletions

View File

@ -112,3 +112,15 @@ input[type=checkbox], input[type=radio] {
padding: 10px 20px 20px; padding: 10px 20px 20px;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12);
} }
.filter-input-group {
position: relative;
margin-bottom: 30px;
}
.filter-input-group > .clear-button {
position: absolute;
right: 25px;
top: 6px;
cursor: pointer;
}

View File

@ -1069,9 +1069,15 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="row">
<div class="col-md-12 form-group filter-input-group">
<input type="text" class="form-control input-xlarge" ng-model="propFilter" placeholder="{{ 'Filter' | translate }}"/>
<span class="clear-button" ng-show="propFilter" ng-click="propFilter = ''">X</span>
</div>
</div>
<form class="form-horizontal"> <form class="form-horizontal">
<fieldset> <fieldset>
<div class="form-group" ng-repeat="(name, set) in settings.settings"> <div class="form-group" ng-repeat="(name, set) in settings.settings | objFilter:propFilter">
<label class="col-sm-3 control-label">{{name}}</label> <label class="col-sm-3 control-label">{{name}}</label>
<div class="col-sm-9 controls"> <div class="col-sm-9 controls">

View File

@ -26,6 +26,7 @@ function(
scope.active = [], scope.waiting = [], scope.stopped = []; scope.active = [], scope.waiting = [], scope.stopped = [];
scope.gstats = {}; scope.gstats = {};
scope.hideLinkedMetadata = true; scope.hideLinkedMetadata = true;
scope.propFilter = "";
// pause the download // pause the download
// d: the download ctx // d: the download ctx
@ -636,5 +637,18 @@ function(
scope.moveUp = function (d) { scope.moveUp = function (d) {
rpc.once('changePosition', [d.gid, -1, 'POS_CUR']); rpc.once('changePosition', [d.gid, -1, 'POS_CUR']);
}; };
}])
.filter('objFilter', function(){
return function(input, filter) {
input = input || {};
var out = {};
}]); for(key in input) {
if (key.startsWith(filter)){
out[key] = input[key];
}
}
return out;
};
});

View File

@ -111,6 +111,7 @@ translations.cs_CZ = {
'Jestliže je nastaveno, je možné stáhnout soubor přímo z Aria2 serveru.', 'Jestliže je nastaveno, je možné stáhnout soubor přímo z Aria2 serveru.',
'(Requires appropriate webserver to be configured.)': '(Je třeba udělat patřičnou konfiguraci webserveru)', '(Requires appropriate webserver to be configured.)': '(Je třeba udělat patřičnou konfiguraci webserveru)',
'Save Connection configuration': 'Uložit nastavení', 'Save Connection configuration': 'Uložit nastavení',
'Filter': 'Filtr',
// server info modal // server info modal
'Aria2 server info': 'Informace o Aria2 serveru', 'Aria2 server info': 'Informace o Aria2 serveru',
'Aria2 Version': 'Verze Aria2', 'Aria2 Version': 'Verze Aria2',

View File

@ -106,6 +106,7 @@ translations.de_DE = {
'Falls angegeben, werden Links erstellt um einen direkten Download vom Aria2 Server zu ermöglichen', 'Falls angegeben, werden Links erstellt um einen direkten Download vom Aria2 Server zu ermöglichen',
'(Requires appropriate webserver to be configured.)': '(Es wird ein entsprechend konfigurierter WebServer benötigt.)', '(Requires appropriate webserver to be configured.)': '(Es wird ein entsprechend konfigurierter WebServer benötigt.)',
'Save Connection configuration': 'Speichern der Verbindungseinstellung', 'Save Connection configuration': 'Speichern der Verbindungseinstellung',
'Filter': 'Filter',
// server info modal // server info modal
'Aria2 server info': 'Aria2 Server Info', 'Aria2 server info': 'Aria2 Server Info',
'Aria2 Version': 'Aria2 Version', 'Aria2 Version': 'Aria2 Version',

View File

@ -110,6 +110,7 @@ translations.en_US = {
'If supplied, links will be created to enable direct download from the Aria2 server.', 'If supplied, links will be created to enable direct download from the Aria2 server.',
'(Requires appropriate webserver to be configured.)': '(Requires appropriate webserver to be configured.)', '(Requires appropriate webserver to be configured.)': '(Requires appropriate webserver to be configured.)',
'Save Connection configuration': 'Save Connection configuration', 'Save Connection configuration': 'Save Connection configuration',
'Filter': 'Filter',
// server info modal // server info modal
'Aria2 server info': 'Aria2 server info', 'Aria2 server info': 'Aria2 server info',
'Aria2 Version': 'Aria2 Version', 'Aria2 Version': 'Aria2 Version',

View File

@ -125,6 +125,7 @@ translations.es_ES = { // replace en_US to ll_CC, examples: zh_CN, de_AT.
'Esto permite crear enlaces de descarga de los archivos desde el servidor Aria2', 'Esto permite crear enlaces de descarga de los archivos desde el servidor Aria2',
'(Requires appropriate webserver to be configured.)': '(Requiere configuración apropiada del servidor web)', '(Requires appropriate webserver to be configured.)': '(Requiere configuración apropiada del servidor web)',
'Save Connection configuration': 'Guardar Configuración', 'Save Connection configuration': 'Guardar Configuración',
'Filter': 'Filrar',
// server info modal // server info modal
'Aria2 server info': 'Información de servidor Aria2', 'Aria2 server info': 'Información de servidor Aria2',
'Aria2 Version': 'Aria2 versión', 'Aria2 Version': 'Aria2 versión',

View File

@ -106,6 +106,7 @@ translations.fr_FR = {
'S\'ils sont fournis, les liens seront créés pour activer le téléchargement direct depuis le serveur Aria2', 'S\'ils sont fournis, les liens seront créés pour activer le téléchargement direct depuis le serveur Aria2',
'(Requires appropriate webserver to be configured.)': '(Nécessite un serveur web approprié pour être configuré)', '(Requires appropriate webserver to be configured.)': '(Nécessite un serveur web approprié pour être configuré)',
'Save Connection configuration': 'Sauvegarder la configuration de connexion', 'Save Connection configuration': 'Sauvegarder la configuration de connexion',
'Filter': 'Filtre',
// server info modal // server info modal
'Aria2 server info': 'Infos serveur Aria2', 'Aria2 server info': 'Infos serveur Aria2',
'Aria2 Version': 'Version Aria2', 'Aria2 Version': 'Version Aria2',

View File

@ -106,6 +106,7 @@ translations.it_IT = {
'Se inserito, verrano creati dei link per scaricare direttamente i file dal server Aria2.', 'Se inserito, verrano creati dei link per scaricare direttamente i file dal server Aria2.',
'(Requires appropriate webserver to be configured.)': '(Richiede un webserver correttamente configurato)', '(Requires appropriate webserver to be configured.)': '(Richiede un webserver correttamente configurato)',
'Save Connection configuration': 'Salva la configurazione di connessione', 'Save Connection configuration': 'Salva la configurazione di connessione',
'Filter': 'Filtro',
// server info modal // server info modal
'Aria2 server info': 'Informazioni sul server Aria2', 'Aria2 server info': 'Informazioni sul server Aria2',
'Aria2 Version': 'Versione di Aria2', 'Aria2 Version': 'Versione di Aria2',

View File

@ -106,6 +106,7 @@ translations.nl_NL = {
'Als ingevoerd dan worden links aangemaakt die het direct downloaden van de Aria2 server toestaan.', 'Als ingevoerd dan worden links aangemaakt die het direct downloaden van de Aria2 server toestaan.',
'(Requires appropriate webserver to be configurured.)': 'Hiervoor moet een geschikte webserver worden ingericht.)', '(Requires appropriate webserver to be configurured.)': 'Hiervoor moet een geschikte webserver worden ingericht.)',
'Save Connection configuration': 'Verbindingsconfiguratie opslaan', 'Save Connection configuration': 'Verbindingsconfiguratie opslaan',
'Filter': 'Filter',
// server info modal // server info modal
'Aria2 server info': 'Aria2 server informatie', 'Aria2 server info': 'Aria2 server informatie',
'Aria2 Version': 'Aria2 versie', 'Aria2 Version': 'Aria2 versie',

View File

@ -99,6 +99,7 @@ translations.pl_PL = {
'If supplied, links will be created to enable direct download from the Aria2 server.': 'Jeżeli zaznaczone, linki mogą być utworzone do włączenia bezpośredniego pobierania z serwera Aria2', 'If supplied, links will be created to enable direct download from the Aria2 server.': 'Jeżeli zaznaczone, linki mogą być utworzone do włączenia bezpośredniego pobierania z serwera Aria2',
'(Requires appropriate webserver to be configured.)': '(Wymaga właściwej konfiguracji serwera WWW)', '(Requires appropriate webserver to be configured.)': '(Wymaga właściwej konfiguracji serwera WWW)',
'Save Connection configuration': 'Zapisz konfigurację połączenia', 'Save Connection configuration': 'Zapisz konfigurację połączenia',
'Filter': 'Filtr',
// server info modal // server info modal
'Aria2 server info': 'Info o serwerze Aria2', 'Aria2 server info': 'Info o serwerze Aria2',
'Aria2 Version': 'Wersja Aria2', 'Aria2 Version': 'Wersja Aria2',

View File

@ -106,6 +106,7 @@ translations.ru_RU = {
'Ссылки (при наличии) будут созданы для загрузки непосредственно с сервера Aria2.', 'Ссылки (при наличии) будут созданы для загрузки непосредственно с сервера Aria2.',
'(Requires appropriate webserver to be configured.)': '(Требуется соответствующий веб-сервер для настройки.)', '(Requires appropriate webserver to be configured.)': '(Требуется соответствующий веб-сервер для настройки.)',
'Save Connection configuration': 'Сохранить настройки соединения', 'Save Connection configuration': 'Сохранить настройки соединения',
'Filter': 'Фильтр',
// server info modal // server info modal
'Aria2 server info': 'Информация о сервере Aria2', 'Aria2 server info': 'Информация о сервере Aria2',
'Aria2 Version': 'Версия Aria2', 'Aria2 Version': 'Версия Aria2',

View File

@ -125,6 +125,7 @@ translations.en_US = { // replace en_US to ll_CC, examples: zh_CN, de_AT.
'', '',
'(Requires appropriate webserver to be configured.)': '', '(Requires appropriate webserver to be configured.)': '',
'Save Connection configuration': '', 'Save Connection configuration': '',
'Filter': '',
// server info modal // server info modal
'Aria2 server info': '', 'Aria2 server info': '',
'Aria2 Version': '', 'Aria2 Version': '',

View File

@ -106,6 +106,7 @@ translations.th_TH = {
'', '',
'(Requires appropriate webserver to be configured.)': '', '(Requires appropriate webserver to be configured.)': '',
'Save Connection configuration': 'บันทึกการตั้งค่าการเชื่อมต่อ', 'Save Connection configuration': 'บันทึกการตั้งค่าการเชื่อมต่อ',
'Filter': 'กรอง',
// server info modal // server info modal
'Aria2 server info': 'ข้อมูลเซอร์เวอร์ Aria2', 'Aria2 server info': 'ข้อมูลเซอร์เวอร์ Aria2',
'Aria2 Version': 'รุ่น Aria2', 'Aria2 Version': 'รุ่น Aria2',

View File

@ -106,6 +106,7 @@ translations.tr_TR = {
'Verilen, bağlantıları aria2 sunucudan doğrudan indirmeyi etkinleştirmek için oluşturulur.', 'Verilen, bağlantıları aria2 sunucudan doğrudan indirmeyi etkinleştirmek için oluşturulur.',
'(Requires appropriate webserver to be configured.)': '(Uygun web sunucusunun yapılandırılmasını gerektirir.)', '(Requires appropriate webserver to be configured.)': '(Uygun web sunucusunun yapılandırılmasını gerektirir.)',
'Save Connection configuration': 'Bağlantı yapılandırmasını kaydedin', 'Save Connection configuration': 'Bağlantı yapılandırmasını kaydedin',
'Filter':'Filtre',
// server info modal // server info modal
'Aria2 server info': 'Aria2 sunucu bilgisi', 'Aria2 server info': 'Aria2 sunucu bilgisi',
'Aria2 Version': 'Aria2 Sürümü', 'Aria2 Version': 'Aria2 Sürümü',

View File

@ -111,6 +111,7 @@ translations.zh_CN = {
'如果指定该选项,将会创建可以直接从 Aria2 服务器上下载文件的链接。', '如果指定该选项,将会创建可以直接从 Aria2 服务器上下载文件的链接。',
'(Requires appropriate webserver to be configured.)': '(需要 WEB 服务器配置正确)', '(Requires appropriate webserver to be configured.)': '(需要 WEB 服务器配置正确)',
'Save Connection configuration': '保存连接配置', 'Save Connection configuration': '保存连接配置',
'Filter':'过滤',
// server info modal // server info modal
'Aria2 server info': 'Aria2 服务器信息', 'Aria2 server info': 'Aria2 服务器信息',
'Aria2 Version': 'Aria2 版本', 'Aria2 Version': 'Aria2 版本',

View File

@ -111,6 +111,7 @@ translations.zh_TW = {
'如果指定該選項,將會建立可以直接從 Aria2 伺服器上下載檔案的連結。', '如果指定該選項,將會建立可以直接從 Aria2 伺服器上下載檔案的連結。',
'(Requires appropriate webserver to be configured.)': '(需要 WEB 伺服器配置正確)', '(Requires appropriate webserver to be configured.)': '(需要 WEB 伺服器配置正確)',
'Save Connection configuration': '儲存連線配置', 'Save Connection configuration': '儲存連線配置',
'Filter':'過濾',
// server info modal // server info modal
'Aria2 server info': 'Aria2 伺服器資訊', 'Aria2 server info': 'Aria2 伺服器資訊',
'Aria2 Version': 'Aria2 版本', 'Aria2 Version': 'Aria2 版本',