mirror of
https://github.com/ronggang/transmission-web-control.git
synced 2025-05-19 17:37:04 +00:00
* 添加“法语”语言包,感谢Amaury Aubry
* Add "French" language pack === 移动UI === * 修复种子列表操作完成时,不能取消选择的BUG; * 修复当前语言包中未翻译的内容不能显示的BUG; * 添加种子列表删除功能; * 添加显示种子列表已选中的种子数量; === Mobile UI === * Add "Remove torrent" feature * Add shows the number of torrent has been selected * Fix some bug
This commit is contained in:
parent
c811c4eb70
commit
14326bfc74
26
index.html
26
index.html
@ -8,25 +8,25 @@
|
||||
<meta http-equiv="Cache-Control" content="no-cache">
|
||||
<title>Transmission Web Control</title>
|
||||
<!-- 样式表 -->
|
||||
<link rel="stylesheet" type="text/css" href="style/base.css?v=20130906.4" />
|
||||
<link rel="stylesheet" type="text/css" href="script/easyui/themes/default/easyui.css?v=20130906.4"/>
|
||||
<link rel="stylesheet" type="text/css" href="script/easyui/themes/icon.css?v=20130906.4"/>
|
||||
<link rel="stylesheet" type="text/css" href="style/base.css?v=20130913" />
|
||||
<link rel="stylesheet" type="text/css" href="script/easyui/themes/default/easyui.css?v=20130913"/>
|
||||
<link rel="stylesheet" type="text/css" href="script/easyui/themes/icon.css?v=20130913"/>
|
||||
<!-- 基础类库 -->
|
||||
<script type="text/javascript" src="script/jquery/jquery-1.8.3.min.js"></script>
|
||||
<script type="text/javascript" src="script/jquery/jquery.form.js"></script>
|
||||
<script type="text/javascript" src="script/jquery/json2.min.js"></script>
|
||||
<script type="text/javascript" src="script/jquery/Base64.js"></script>
|
||||
<script type="text/javascript" src="script/easyui/jquery.easyui.min.js?v=20130906.4"></script>
|
||||
<script type="text/javascript" src="script/easyui/jquery.easyui.min.js?v=20130913"></script>
|
||||
<!-- -->
|
||||
<!-- 系统类库 -->
|
||||
<script type="text/javascript" src="script/min/public.js?v=20130906.4"></script>
|
||||
<script type="text/javascript" src="script/min/cookies.js?v=20130906.4"></script>
|
||||
<script type="text/javascript" src="script/min/clientDevice.js?v=20130906.4"></script>
|
||||
<script type="text/javascript" src="script/min/transmission.js?v=20130906.4"></script>
|
||||
<script type="text/javascript" src="script/min/transmission.torrents.js?v=20130906.4"></script>
|
||||
<script type="text/javascript" src="script/min/system.js?v=20130906.4"></script>
|
||||
<script type="text/javascript" src="config.js?v=20130906.4"></script>
|
||||
<script type="text/javascript" src="plugin.js?v=20130906.4"></script>
|
||||
<script type="text/javascript" src="script/min/public.js?v=20130913"></script>
|
||||
<script type="text/javascript" src="script/min/cookies.js?v=20130913"></script>
|
||||
<script type="text/javascript" src="script/min/clientDevice.js?v=20130913"></script>
|
||||
<script type="text/javascript" src="script/min/transmission.js?v=20130913"></script>
|
||||
<script type="text/javascript" src="script/min/transmission.torrents.js?v=20130913"></script>
|
||||
<script type="text/javascript" src="script/min/system.js?v=20130913"></script>
|
||||
<script type="text/javascript" src="config.js?v=20130913"></script>
|
||||
<script type="text/javascript" src="plugin.js?v=20130913"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main" class="easyui-layout">
|
||||
@ -131,7 +131,7 @@
|
||||
<div id="menu-queue-move-bottom" data-options="iconCls:'icon-queue-move-bottom'" onclick="system.changeSelectedTorrentStatus('',null,'queue-move-bottom');" system-tip-lang="menus.queue['move-bottom']"><span system-lang="menus.queue['move-bottom']"></span></div>
|
||||
</div>
|
||||
<!-- 扩展功能/插件 -->
|
||||
<div id="menu-plugin" style="width:180px;">
|
||||
<div id="menu-plugin" style="width:260px;">
|
||||
<div id="menu-plugin-tracker-replace" data-options="iconCls:'icon-tracker-replace'" system-tip-lang="toolbar.tip['tracker-replace']" onclick="system.plugin.exec('replace-tracker');"><span system-lang="toolbar['tracker-replace']"></span></div>
|
||||
<div id="menu-plugin-auto-match-data-folder" data-options="iconCls:'icon-target'" system-tip-lang="menus.plugin['auto-match-data-folder']" onclick="system.plugin.exec('auto-match-data-folder');"><span system-lang="menus.plugin['auto-match-data-folder']"></span></div>
|
||||
</div>
|
||||
|
@ -9,21 +9,21 @@
|
||||
<meta http-equiv="Cache-Control" content="no-cache">
|
||||
<title>Transmission Web Control Mobile</title>
|
||||
<!-- 样式表 -->
|
||||
<link rel="stylesheet" type="text/css" href="style/base.mobile.css?v=20130909" />
|
||||
<link rel="stylesheet" type="text/css" href="script/jquery/mobile/jquery.mobile-1.3.2.min.css?v=20130909"/>
|
||||
<link rel="stylesheet" type="text/css" href="style/base.mobile.css?v=20130913" />
|
||||
<link rel="stylesheet" type="text/css" href="script/jquery/mobile/jquery.mobile-1.3.2.min.css?v=20130913"/>
|
||||
<!-- 基础类库 -->
|
||||
<script type="text/javascript" src="script/jquery/jquery-1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="script/jquery/jquery.form.js"></script>
|
||||
<script type="text/javascript" src="script/jquery/json2.min.js"></script>
|
||||
<script type="text/javascript" src="script/jquery/Base64.js"></script>
|
||||
<script type="text/javascript" src="script/jquery/mobile/jquery.mobile-1.3.2.min.js?v=20130909"></script>
|
||||
<script type="text/javascript" src="script/jquery/mobile/jquery.mobile-1.3.2.min.js?v=20130913"></script>
|
||||
<!-- -->
|
||||
<!-- 系统类库 -->
|
||||
<script type="text/javascript" src="script/min/public.js?v=20130909"></script>
|
||||
<script type="text/javascript" src="script/min/cookies.js?v=20130909"></script>
|
||||
<script type="text/javascript" src="script/min/transmission.js?v=20130909"></script>
|
||||
<script type="text/javascript" src="script/min/transmission.torrents.js?v=20130909"></script>
|
||||
<script type="text/javascript" src="script/min/system.mobile.js?v=20130909"></script>
|
||||
<script type="text/javascript" src="script/min/public.js?v=20130913"></script>
|
||||
<script type="text/javascript" src="script/min/cookies.js?v=20130913"></script>
|
||||
<script type="text/javascript" src="script/min/transmission.js?v=20130913"></script>
|
||||
<script type="text/javascript" src="script/min/transmission.torrents.js?v=20130913"></script>
|
||||
<script type="text/javascript" src="script/min/system.mobile.js?v=20130913"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Home -->
|
||||
@ -114,11 +114,25 @@
|
||||
</div>
|
||||
</div>
|
||||
<div data-theme="c" data-role="footer" data-position="fixed" data-tap-toggle="false">
|
||||
<div id="torrent-toolbar" data-role="footer" class="ui-bar" style="display:none;">
|
||||
<a id="toolbar_start" href="javascript:void(0);" onclick="system.changeSelectedTorrentStatus('start',this);" system-lang="toolbar.start"></a>
|
||||
<a id="toolbar_pause" href="javascript:void(0);" onclick="system.changeSelectedTorrentStatus('stop',this);" system-lang="toolbar.pause"></a>
|
||||
<!-- <a id="toolbar_remove" href="javascript:void(0);" onclick="system.changeSelectedTorrentStatus('remove',this);" system-lang="toolbar.remove"></a> -->
|
||||
<a id="toolbar_recheck" href="javascript:void(0);" onclick="system.changeSelectedTorrentStatus('verify',this);" system-lang="toolbar.recheck"></a>
|
||||
<!-- 种子操作工具栏 -->
|
||||
<div id="torrent-toolbar" data-role="content" style="display:none;padding:0px 10px;" data-theme="a">
|
||||
<div data-role="controlgroup" data-type="horizontal">
|
||||
<a id="torrent-check-all" data-role="button" data-inline="true" href="#" data-icon="check" data-theme="b">
|
||||
<span id="torrent-checked-count"></span>
|
||||
</a>
|
||||
<a data-role="button" data-inline="true" id="toolbar_start" href="#" onclick="system.changeSelectedTorrentStatus('start',this);">
|
||||
<span system-lang="toolbar.start"></span>
|
||||
</a>
|
||||
<a data-role="button" data-inline="true" id="toolbar_pause" href="#" onclick="system.changeSelectedTorrentStatus('stop',this);">
|
||||
<span system-lang="toolbar.pause"></span>
|
||||
</a>
|
||||
<a data-role="button" data-inline="true" id="toolbar_recheck" href="#" onclick="system.changeSelectedTorrentStatus('verify',this);">
|
||||
<span system-lang="toolbar.recheck"></span>
|
||||
</a>
|
||||
<a data-role="button" data-inline="true" id="toolbar_remove" href="#dialog-torrent-remove-confirm" data-icon="delete" data-iconpos="right">
|
||||
<span system-lang="toolbar.remove"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="m_statusbar">
|
||||
<span id="status_alt_speed" style="display:none;"> </span>
|
||||
@ -128,6 +142,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 删除种子确认 -->
|
||||
<div data-role="popup" id="dialog-torrent-remove-confirm" data-overlay-theme="a" data-theme="c" data-dismissible="false" style="max-width:400px;" class="ui-corner-all">
|
||||
<div data-role="header" data-theme="a" class="ui-corner-top">
|
||||
<h1 system-lang="dialog['torrent-remove']['title']"></h1>
|
||||
</div>
|
||||
<div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
|
||||
<h3 class="ui-title" system-lang="dialog['torrent-remove']['confirm-text']"></h3>
|
||||
<div data-role="fieldcontain">
|
||||
<label for="remove-data" system-lang="dialog['torrent-remove']['remove-data']"></label>
|
||||
<select name="remove-data" id="remove-data" data-role="slider" data-mini="true">
|
||||
<option value="false"></option>
|
||||
<option value="true"></option>
|
||||
</select>
|
||||
</div>
|
||||
<a href="#" data-role="button" data-inline="true" data-rel="back" data-theme="c" system-lang="dialog.public['button-cancel']"></a>
|
||||
<a href="#" onclick="system.changeSelectedTorrentStatus('remove',this,{removeData:$('#remove-data').val()});" data-role="button" data-inline="true" data-rel="back" data-transition="flow" data-theme="b" system-lang="dialog.public['button-ok']"></a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
function showAddTorrent()
|
||||
@ -179,6 +211,21 @@
|
||||
saveConfig();
|
||||
});
|
||||
|
||||
$("#torrent-check-all").click(function(){
|
||||
var checked = $(this).data("checked");
|
||||
if (checked==true)
|
||||
{
|
||||
checked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
checked = true;
|
||||
}
|
||||
$(this).data("checked",checked);
|
||||
system.control.torrentlist.find("input[type='checkbox']").prop("checked",checked).checkboxradio("refresh");
|
||||
system.changeTorrentToolbar();
|
||||
});
|
||||
|
||||
function saveConfig()
|
||||
{
|
||||
system.config.autoReload = ($("#autoreload").val()=="true"?true:false);
|
||||
|
@ -11,4 +11,5 @@ system.languages = {
|
||||
,"it":"Italiano(Italian)"
|
||||
,"pt-BR":"Brazilian Portuguese"
|
||||
,"nl":"Dutch"
|
||||
,"fr":"French"
|
||||
};
|
375
lang/fr.js
Normal file
375
lang/fr.js
Normal file
@ -0,0 +1,375 @@
|
||||
// lang file
|
||||
system.lang = {
|
||||
"name":"fr"
|
||||
,"system":{
|
||||
"title":"Interface Web Transmission"
|
||||
,"status":{
|
||||
"connect":"Connexion..."
|
||||
,"connected":"Connecté"
|
||||
,"queue":"File d'attente:"
|
||||
,"queuefinish":"La file d'attente est terminée."
|
||||
,"notfinal":"Not final"
|
||||
}
|
||||
}
|
||||
,"error":{
|
||||
"data-error":"Erreur de données."
|
||||
,"data-post-error":"Erreur de données Post."
|
||||
}
|
||||
,"config":{
|
||||
"save-path":"Dossier de téléchargement"
|
||||
}
|
||||
,"toolbar":{
|
||||
"start":"Démarrer"
|
||||
,"pause":"Pause"
|
||||
,"recheck":"Recheck"
|
||||
,"start-all":"Start all"
|
||||
,"pause-all":"Pause all"
|
||||
,"remove":"Supprimer"
|
||||
,"remove-all":"Supprimer tout"
|
||||
,"remove-data":"Supprimer les données"
|
||||
,"add-torrent":"Ajouter Torrent"
|
||||
,"attribute":"Attributs"
|
||||
,"alt-speed":"Vitesse alternative"
|
||||
,"system-config":"Configuration"
|
||||
,"system-reload":"Recharger"
|
||||
,"about":"à propos"
|
||||
,"reload-time":"Rafraîchissement auto:"
|
||||
,"reload-time-unit":"/s"
|
||||
,"autoreload-disabled":"Désactivé"
|
||||
,"autoreload-enabled":"Activé"
|
||||
,"search-prompt":"Chercher torrents"
|
||||
,"tracker-replace":"Changer tracker"
|
||||
,"queue":"File d'attente"
|
||||
,"ui-mobile":"Interface Mobile"
|
||||
,"ui-original":"Interface originale"
|
||||
,"ui-computer":"Interface bureau"
|
||||
,"plugin":"Extensions/plugins"
|
||||
,"tip":{
|
||||
"start":"Démarre les torrents sélectionnés"
|
||||
,"pause":"Met en pause les torrents sélectionnés"
|
||||
,"recheck":"Vérifie les torrents sélectionnés"
|
||||
,"recheck-confirm":"Etes-vous sûr de vouloir vérifier les torrents sélectionnés? Cela peut être long!"
|
||||
,"start-all":"Tout démarrer"
|
||||
,"pause-all":"Tout mettre en pause"
|
||||
,"remove":"Supprimer"
|
||||
,"delete-all":"Tout supprimer"
|
||||
,"delete-data":"Supprimer les données"
|
||||
,"add-torrent":"Ajouter torrent(s)"
|
||||
,"attribute":"Attributs"
|
||||
,"alt-speed":"Vitesse alternative"
|
||||
,"system-config":"Configuration"
|
||||
,"system-reload":"Recharger"
|
||||
,"about":"A propos de cette app"
|
||||
,"autoreload-disabled":"Désactiver rafraîchissement auto"
|
||||
,"autoreload-enabled":"Activer rafraîchissement auto"
|
||||
,"tracker-replace":"Changer de trackers"
|
||||
,"change-download-dir":"Définir dossier de téléchargement"
|
||||
,"ui-mobile":"Interface Mobile"
|
||||
,"ui-original":"Interface originale"
|
||||
,"more-peers":"Interroger tracker pour plus de peers"
|
||||
}
|
||||
}
|
||||
,"menus":{
|
||||
"queue":{
|
||||
"move-top":"Placer en haut"
|
||||
,"move-up":"Remonter"
|
||||
,"move-down":"Reculer d'un cran"
|
||||
,"move-bottom":"Placer en bas"
|
||||
}
|
||||
,"plugin": {
|
||||
"auto-match-data-folder": "Correspondance auto des dossiers de données"
|
||||
}
|
||||
}
|
||||
,"title":{
|
||||
"left":"Navigation"
|
||||
,"list":"Torrents"
|
||||
,"attribute":"Attributs"
|
||||
,"status":"Statut"
|
||||
}
|
||||
,"tree":{
|
||||
"all":"Tous"
|
||||
,"active":"Actifs"
|
||||
,"paused":"Mis en pause"
|
||||
,"downloading":"Téléchargement"
|
||||
,"sending":"Envoi"
|
||||
,"error":"Erreur"
|
||||
,"warning":"Attention"
|
||||
,"actively":"Actifs"
|
||||
,"check":"Vérification"
|
||||
,"wait":"En attente"
|
||||
,"search-result":"Résultats de recherche"
|
||||
,"status":{
|
||||
"loading":"Chargement..."
|
||||
}
|
||||
,"statistics":"Statistiques"
|
||||
,"statistics":{
|
||||
"title":"Statistiques"
|
||||
,"cumulative":"Cumulatives"
|
||||
,"current":"Actuelles"
|
||||
,"uploadedBytes":"Envoyé: "
|
||||
,"downloadedBytes":"Téléchargé: "
|
||||
,"filesAdded":"FichiersAjoutés: "
|
||||
,"sessionCount":"NombreDeSessions: "
|
||||
,"secondsActive":"ActifDepuis: "
|
||||
}
|
||||
,"servers":"Trackers"
|
||||
,"folders":"Dossiers"
|
||||
,"toolbar":{
|
||||
"nav":{
|
||||
"folders":"Dossiers"
|
||||
}
|
||||
}
|
||||
}
|
||||
,"statusbar":{
|
||||
"downloadspeed":"Vitesse de téléchargement:"
|
||||
,"uploadspeed":"Vitesse d'envoi:"
|
||||
,"version":"Version:"
|
||||
}
|
||||
,"dialog":{
|
||||
"torrent-add":{
|
||||
"download-dir":"Dossier de téléchargement:"
|
||||
,"torrent-url":"URL du torrent:"
|
||||
,"tip-torrent-url":"Astuce:Séparer les URLs avec une virgule \",\""
|
||||
,"autostart":"Démarrage auto:"
|
||||
,"tip-autostart":""
|
||||
,"set-default-download-dir":"Définir comme dossier de téléchargement par défaut"
|
||||
,"upload-file":"Fichier(s) torrents:"
|
||||
,"nosource":"Aucun torrent ou URL."
|
||||
,"tip-title":"Le fichier torrent a la priorité sur les URLs si les deux sont présents"
|
||||
}
|
||||
,"system-config":{
|
||||
"title":"Configuration serveur"
|
||||
,"tabs":{
|
||||
"base":"Base"
|
||||
,"network":"Réseau"
|
||||
,"limit":"Limites"
|
||||
,"alt-speed":"Plannificateur"
|
||||
,"dictionary-folders":"Dictionnaire de dossiers"
|
||||
}
|
||||
,"config-dir":"Emplacement du dossier de configuration de transmission:"
|
||||
,"download-dir":"Chemin par défaut de téléchargement:"
|
||||
,"download-dir-free-space":"Espace libre:"
|
||||
,"incomplete-dir-enabled":"Utiliser le dossier \"incomplete\""
|
||||
,"cache-size-mb":"Taille du cache de disque:"
|
||||
,"rename-partial-files":"Ajouter '.part' aux fichiers incomplets"
|
||||
,"start-added-torrents":"Démarrage automatique du torrent"
|
||||
,"download-queue-enabled":"Activer la file d'attente, nombre max de fichiers en file d'attente:"
|
||||
,"seed-queue-enabled":"Activer la file d'attente \"seed\", nombre max de fichiers en file d'attente:"
|
||||
,"peer-port-random-on-start":"Utiliser un port aléatoire au démarrage"
|
||||
,"port-forwarding-enabled":"Activer la redirection de port"
|
||||
,"test-port":"Tester le port"
|
||||
,"port-is-open-true":"Le port est ouvert"
|
||||
,"port-is-open-false":"Le port est fermé"
|
||||
,"testing":"En test..."
|
||||
,"encryption":"Cryptage:"
|
||||
,"encryption-type":{
|
||||
"required":"Requis"
|
||||
,"preferred":"Préféré"
|
||||
,"tolerated":"Toléré"
|
||||
}
|
||||
,"utp-enabled":"Activer uTP(UPnP)"
|
||||
,"dht-enabled":"Activer DHT"
|
||||
,"lpd-enabled":"Activer LPD"
|
||||
,"pex-enabled":"Activer PEX"
|
||||
,"peer-limit-global":"Nombre maximum de peers global:"
|
||||
,"peer-limit-per-torrent":"Nombre maximum de peers par torrent:"
|
||||
,"speed-limit-down-enabled":"Limiter la vitesse de téléchargement:"
|
||||
,"speed-limit-up-enabled":"Limiter la vitesse d'envoi:"
|
||||
,"alt-speed-enabled":"Utiliser les vitesses alternatives"
|
||||
,"alt-speed-down":"Limiter la vitesse de téléchargement:"
|
||||
,"alt-speed-up":"Limiter la vitesse d'envoi:"
|
||||
,"alt-speed-time-enabled":"Utiliser plannificateur"
|
||||
,"alt-speed-time":"Horaires:"
|
||||
,"weekday":{
|
||||
"1":"Lundi"
|
||||
,"2":"Mardi"
|
||||
,"3":"Mercredi"
|
||||
,"4":"Jeudi"
|
||||
,"5":"Vendredi"
|
||||
,"6":"Samedi"
|
||||
,"0":"Dimanche"
|
||||
}
|
||||
,"blocklist-enabled":"Utiliser la liste de blocage"
|
||||
,"blocklist-size":"La liste de blocage possède %n règles."
|
||||
,"seedRatioLimited":"Le ratio de partage des torrents par défaut:"
|
||||
,"queue-stalled-enabled":"Durée d'inactivité après laquelle le torrent est considéré comme bloqué:"
|
||||
,"idle-seeding-limit-enabled":"Durée d'inactivité après laquelle le torrent en seed est stoppé :"
|
||||
,"minuets":"Minutes"
|
||||
,"nochange":"Pas de changement"
|
||||
,"saveing":"Sauvegarde..."
|
||||
}
|
||||
,"public":{
|
||||
"button-ok":"OK"
|
||||
,"button-cancel":"Annuler"
|
||||
,"button-reload":"Recharger"
|
||||
,"button-save":"Sauvegarder"
|
||||
,"button-close":"Fermer"
|
||||
,"button-update":"Mise à jour"
|
||||
,"button-config":"Configuration"
|
||||
}
|
||||
,"about":{
|
||||
"infos":"Auteur:culturist<br/>Statement:La plupart des icônes utilisées proviennent d'internet, toutefois, si vous constatez une violation de vos droits, contactez moi !"
|
||||
,"check-update":"Rechercher mise à jour"
|
||||
}
|
||||
,"torrent-remove":{
|
||||
"title":"Confirmer la suppression"
|
||||
,"confirm-text":"Etes-vous sûr de vouloir supprimer ce(s) torrent(s)?"
|
||||
,"remove-data":"Supprimer les données"
|
||||
,"remove-error":"Echec de la suppression!"
|
||||
}
|
||||
,"torrent-changeDownloadDir":{
|
||||
"title":"Définir nouveau dossier"
|
||||
,"old-download-dir":"Ancien dossier:"
|
||||
,"new-download-dir":"Nouveau dossier:"
|
||||
,"move-data":"Si coché, déplace les données vers le nouveau dossier. Sinon, scan du nouveau dossier pour de nouveaux fichiers."
|
||||
,"set-error":"Erreur!"
|
||||
,"recheck-data":"Vérifier les données."
|
||||
}
|
||||
,"system-replaceTracker":{
|
||||
"title":"Changer de Trackers"
|
||||
,"old-tracker":"Ancientracker:"
|
||||
,"new-tracker":"Nouveau tracker:"
|
||||
,"tip":"Cette fonction trouvera <b>tous les torrents</b> Tracker."
|
||||
,"not-found":"Le tracker n'a pas été trouvé."
|
||||
}
|
||||
,"auto-match-data-folder":{
|
||||
"title":"Correspondance auto des dossiers de données"
|
||||
,"torrent-count":"Nombre de torrents:"
|
||||
,"folder-count":"Nombre de dossiers:"
|
||||
,"dictionary":"Dictionnaire de dossiers"
|
||||
,"time-begin":"Heure de début:"
|
||||
,"time-now":"Maintenant:"
|
||||
,"status":"Statut:"
|
||||
,"ignore":"Ignorer"
|
||||
,"working-close-confirm":"Est en fonctionnement, êtes-vous sûr de vouloir fermer?"
|
||||
,"time-interval":"Intervalle (secondes):"
|
||||
,"work-mode-title":"Mode:"
|
||||
,"work-mode":{
|
||||
"1":"Correspondance par torrent"
|
||||
,"2":"Correspondance par dossier"
|
||||
}
|
||||
}
|
||||
}
|
||||
,"torrent":{
|
||||
"fields":{
|
||||
"id":"#"
|
||||
,"name":"Nom"
|
||||
,"hashString":"HASH"
|
||||
,"downloadDir":"Dossier de téléchargement"
|
||||
,"totalSize":"Taille totale"
|
||||
,"status":"Statut"
|
||||
,"percentDone":"Pourcentage effectué"
|
||||
,"remainingTime":"Temps restant"
|
||||
,"addedDate":"Date d'ajour"
|
||||
,"completeSize":"Taille complétée"
|
||||
,"rateDownload":"Vitesse de téléchargement"
|
||||
,"rateUpload":"Vitesse d'envoi"
|
||||
,"leecherCount":"Leecher"
|
||||
,"seederCount":"Seeder"
|
||||
,"uploadedEver":"Envoyé"
|
||||
,"uploadRatio":"Ratio"
|
||||
}
|
||||
,"status-text":{
|
||||
"0":"En pause"
|
||||
,"1":"En attente de vérification"
|
||||
,"2":"Vérification"
|
||||
,"3":"En attente de téléchargement"
|
||||
,"4":"Téléchargment"
|
||||
,"5":"En attende d'envoi"
|
||||
,"6":"Envoie"
|
||||
}
|
||||
,"attribute":{
|
||||
"tabs":{
|
||||
"base":"Base"
|
||||
,"servers":"Trackers"
|
||||
,"files":"Fichiers"
|
||||
,"users":"Peers"
|
||||
,"config":"Configuration"
|
||||
}
|
||||
,"files-fields":{
|
||||
"name":"Nom"
|
||||
,"length":"Taille"
|
||||
,"percentDone":"Pourcentage effectué"
|
||||
,"bytesCompleted":"Taille totale"
|
||||
,"wanted":"Wanted"
|
||||
,"priority":"Priorité"
|
||||
}
|
||||
,"servers-fields":{
|
||||
"announce":"Annonce"
|
||||
,"announceState":"Statut"
|
||||
,"lastAnnounceResult":"Infos"
|
||||
,"lastAnnounceSucceeded":"Réussie"
|
||||
,"lastAnnounceTime":"Temps d'annonce"
|
||||
,"lastAnnounceTimedOut":"Durée dépassée"
|
||||
,"downloadCount":"Nombre de téléchargement"
|
||||
,"nextAnnounceTime":"Prochaine annonce"
|
||||
}
|
||||
,"peers-fields":{
|
||||
"address":"Adresse IP"
|
||||
,"clientName":"Client"
|
||||
,"flagStr":"Drapeau"
|
||||
,"progress":"Progression"
|
||||
,"rateToClient":"Taux client"
|
||||
,"rateToPeer":"Taux peer"
|
||||
}
|
||||
,"status":{
|
||||
"true":"Vrai"
|
||||
,"false":"Faux"
|
||||
}
|
||||
,"priority":{
|
||||
"0":"Normale"
|
||||
,"1":"Haute"
|
||||
,"-1":"Basse"
|
||||
}
|
||||
,"label":{
|
||||
"name":"Nom:"
|
||||
,"addedDate":"Date d'ajout:"
|
||||
,"totalSize":"Taille totale:"
|
||||
,"completeSize":"Taille complétée:"
|
||||
,"leftUntilDone":"Restant:"
|
||||
,"hashString":"HASH:"
|
||||
,"downloadDir":"Dossier de téléchargement:"
|
||||
,"status":"Statut:"
|
||||
,"rateDownload":"Taux de téléchargement:"
|
||||
,"rateUpload":"Taux d'envoi:"
|
||||
,"leecherCount":"Leecher:"
|
||||
,"seederCount":"Seeder:"
|
||||
,"uploadedEver":"Envoyé:"
|
||||
,"uploadRatio":"Ratio d'envoi:"
|
||||
,"creator":"Créateur:"
|
||||
,"dateCreated":"Date de création:"
|
||||
,"comment":"Commentaire:"
|
||||
,"errorString":"Error string:"
|
||||
,"downloadLimited":"Vitesse limite de téléchargement:"
|
||||
,"uploadLimited":"Vitesse limite d'envoie:"
|
||||
,"peer-limit":"Nombre de peers maximum:"
|
||||
,"seedRatioMode":"Ratio de seed:"
|
||||
,"seedIdleMode":"Stopper le torrent après une période d'inactivité de:"
|
||||
}
|
||||
,"tip":{
|
||||
"button-allow":"Télécharger le(s) fichier(s) sélectionné(s)"
|
||||
,"button-deny":"Passer le(s) fichier(s) sélectionné(s)"
|
||||
,"button-priority":"Définir la priorité"
|
||||
}
|
||||
,"other":{
|
||||
"tracker-remove-confim":"Etes-vous sûr de vouloir supprimer ce tracker?"
|
||||
}
|
||||
}
|
||||
}
|
||||
,"torrent-head":{
|
||||
"buttons":{
|
||||
"autoExpandAttribute":"Affichage infos torrents"
|
||||
}
|
||||
}
|
||||
,"public":{
|
||||
"text-unknown":"Inconnu"
|
||||
,"text-drop-title":"Glisser déposer le fichier dans la zone pour l'ajouter à Transmission."
|
||||
,"text-saved":"Sauvegardé"
|
||||
,"text-nochange":"Pas de changement"
|
||||
,"text-info":"Infos"
|
||||
,"text-confirm":"Etes-vous sûr?"
|
||||
,"text-browsers-not-support-features":"Votre navigateur ne supporte pas cette fonctionnalité!"
|
||||
,"text-download-update":"Télécharger cette mise à jour"
|
||||
,"text-have-update":"Une mise à jour est disponible"
|
||||
}
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
var system={version:"0.6 Beta",codeupdate:"20130909",config:{autoReload:true,reloadStep:5E3,pageSize:30,defaultSelectNode:null,autoExpandAttribute:false,defaultLang:""},storageKeys:{dictionary:{folders:"dictionary.folders"}},dictionary:{folders:null},checkUpdateScript:"https://transmission-control.googlecode.com/svn/resouces/checkupdate.js",contextMenus:{},panel:null,lang:null,reloading:false,autoReloadTimer:null,downloadDir:"",islocal:false,B64:new Base64,currentTorrentId:0,control:{tree:null,torrentlist:null},
|
||||
var system={version:"0.6 Beta",codeupdate:"20130913",config:{autoReload:true,reloadStep:5E3,pageSize:30,defaultSelectNode:null,autoExpandAttribute:false,defaultLang:""},storageKeys:{dictionary:{folders:"dictionary.folders"}},dictionary:{folders:null},checkUpdateScript:"https://transmission-control.googlecode.com/svn/resouces/checkupdate.js",contextMenus:{},panel:null,lang:null,reloading:false,autoReloadTimer:null,downloadDir:"",islocal:false,B64:new Base64,currentTorrentId:0,control:{tree:null,torrentlist:null},
|
||||
serverConfig:null,serverSessionStats:null,templates:{},setlang:function(a,b){a||(a=this.config.defaultLang?this.config.defaultLang:navigator.language||navigator.browserLanguage);a||(a="zh-CN");if(a.indexOf("-")!=-1)a=a.split("-")[0].toLocaleLowerCase()+"-"+a.split("-")[1].toLocaleUpperCase();this.languages[a]||(a="en");$.getScript("lang/"+a+".js",function(){system.lang=$.extend(true,system.defaultLang,system.lang);system.resetLangText();$.getScript("script/easyui/locale/easyui-lang-"+a.replace("-",
|
||||
"_")+".js").done(function(){b&&b()}).fail(function(){$.getScript("script/easyui/locale/easyui-lang-en.js",function(){b&&b()})})})},init:function(a,b){this.readConfig();this.islocal=b==1?true:false;this.panel={main:$("#main"),top:$("#m_top"),toolbar:$("#m_toolbar"),left_layout:$("#m_left_layout"),left:$("#m_left"),body:$("#m_body"),layout_body:$("#layout_body"),list:$("#m_list"),attribute:$("#m_attribute"),bottom:$("#m_bottom"),title:$("#m_title"),status:$("#m_status"),statusbar:$("#m_statusbar"),
|
||||
status_text:$("#status_text"),droparea:$("#dropArea")};this.lang==null?this.setlang(a,function(){system.initdata()}):this.initdata()},resetLangText:function(a){a||(a=$);var b=a.find("*[system-lang]");$.each(b,function(c,e){var d=$(e).attr("system-lang");$(e).html(eval("system.lang."+d))});b=a.find("*[system-tip-lang]");$.each(b,function(c,e){var d=$(e).attr("system-tip-lang");$(e).attr("title",eval("system.lang."+d))})},initdata:function(){$(document).attr("title",this.lang.system.title+" "+this.version);
|
||||
|
@ -1,4 +1,4 @@
|
||||
var system={version:"0.5 Beta",codeupdate:"20130909",config:{autoReload:true,reloadStep:5E3,pageSize:30,defaultSelectNode:null},lang:null,reloading:false,autoReloadTimer:null,downloadDir:"",islocal:false,B64:new Base64,currentTorrentId:0,currentContentPage:"home",currentContentConfig:null,control:{tree:null,torrentlist:null},serverConfig:null,serverSessionStats:null,torrentListChecked:false,debug:function(a,b){window.console&&window.console.log&&window.console.log(a,b)},setlang:function(a,b){a||(a=
|
||||
var system={version:"0.6 Beta",codeupdate:"20130913",config:{autoReload:true,reloadStep:5E3,pageSize:30,defaultSelectNode:null},lang:null,reloading:false,autoReloadTimer:null,downloadDir:"",islocal:false,B64:new Base64,currentTorrentId:0,currentContentPage:"home",currentContentConfig:null,control:{tree:null,torrentlist:null},serverConfig:null,serverSessionStats:null,torrentListChecked:false,debug:function(a,b){window.console&&window.console.log&&window.console.log(a,b)},setlang:function(a,b){a||(a=
|
||||
this.config.defaultLang?this.config.defaultLang:navigator.language||navigator.browserLanguage);a||(a="zh-CN");if(a.indexOf("-")!=-1)a=a.split("-")[0].toLocaleLowerCase()+"-"+a.split("-")[1].toLocaleUpperCase();this.languages[a]||(a="en");$.getScript("lang/"+a+".js",function(){system.lang=$.extend(true,system.defaultLang,system.lang);system.resetLangText();b&&b()})},resetLangText:function(){var a=$("*[system-lang]");$.each(a,function(b,c){var d=$(c).attr("system-lang");$(c).html(eval("system.lang."+
|
||||
d))})},init:function(a){this.readConfig();transmission.options.getFolders=false;this.lang==null?this.setlang(a,function(){system.initdata()}):this.initdata()},initdata:function(){$(document).attr("title",this.lang.system.title+" "+this.version);this.control.torrentlist=$("#torrent-list");this.connect()},readConfig:function(){var a=cookies.get("transmission-web-control");if($.isPlainObject(a))this.config=$.extend(this.config,a)},saveConfig:function(){cookies.set("transmission-web-control",this.config,
|
||||
100)},connect:function(){transmission.on.torrentCountChange=function(){system.reloadTorrentBaseInfos()};transmission.on.postError=function(){};transmission.init({islocal:true},function(){system.reloadSession(true);system.getServerStatus()})},reloadSession:function(){transmission.getSession(function(a){system.serverConfig=a;a["alt-speed-enabled"]==true?$("#status_alt_speed").show():$("#status_alt_speed").hide();system.downloadDir=a["download-dir"];parseInt(system.serverConfig["rpc-version"])>=15?transmission.getFreeSpace(system.downloadDir,
|
||||
@ -7,19 +7,19 @@ false,"speed"));$("#status_uploadspeed").html(formatSize(a.uploadSpeed,false,"sp
|
||||
c):system.resetTorrentInfos(b)},a)}},resetTorrentInfos:function(){transmission.torrents.status[transmission._status.stopped]?this.updateCount("paused",transmission.torrents.status[transmission._status.stopped].length):this.updateCount("paused",0);transmission.torrents.status[transmission._status.seed]?this.updateCount("sending",transmission.torrents.status[transmission._status.seed].length):this.updateCount("sending",0);transmission.torrents.status[transmission._status.check]?this.updateCount("check",
|
||||
transmission.torrents.status[transmission._status.check].length):this.updateCount("check",0);transmission.torrents.status[transmission._status.download]?this.updateCount("downloading",transmission.torrents.status[transmission._status.download].length):this.updateCount("downloading",0);this.updateCount("actively",transmission.torrents.actively.length);this.updateCount("error",transmission.torrents.error.length);this.updateCount("warning",transmission.torrents.warning.length);system.reloading=false;
|
||||
if(system.config.autoReload)system.autoReloadTimer=setTimeout(function(){system.reloadData()},system.config.reloadStep);this.updateCount("all",transmission.torrents.count);if(this.currentContentPage=="torrent-list"){var a=this.currentContentConfig;a.reload=true;this.showContent(a)}},updateCount:function(a,b){var c=$("#count-"+a);c.text(b);b==0?c.hide():c.show()},reloadData:function(){this.reloadSession();this.reloading=false;this.getServerStatus();this.reloading=false;this.reloadTorrentBaseInfos()},
|
||||
showContent:function(a){var b={page:"",type:"",data:"",title:this.lang.system.title,reload:false,callback:null},c=null;if(typeof a=="string"){b.page=a;c=b}else c=jQuery.extend(b,a);if(!(c.page==this.currentContentPage&&!c.reload)){$("#content-"+c.page).show();c.page!=this.currentContentPage&&$("#content-"+this.currentContentPage).hide();$("#torrent-page-bar").hide();this.torrentListChecked||$("#torrent-toolbar").hide();this.currentContentPage=c.page;switch(c.type){case "torrent-list":c.title=this.lang.tree[c.data];
|
||||
this.loadTorrentToList({target:c.data})}$("#page-title").text(c.title);c.reload=false;this.currentContentConfig=c;c.callback&&c.callback()}},getTorrentFromType:function(a){var b=null;switch(a){case "torrent-all":case "all":case "servers":b=transmission.torrents.all;break;case "paused":b=transmission.torrents.status[transmission._status.stopped];break;case "sending":b=transmission.torrents.status[transmission._status.seed];break;case "seedwait":b=transmission.torrents.status[transmission._status.seedwait];
|
||||
break;case "check":b=transmission.torrents.status[transmission._status.check];break;case "checkwait":b=transmission.torrents.status[transmission._status.checkwait];break;case "downloading":b=transmission.torrents.status[transmission._status.download];break;case "downloadwait":b=transmission.torrents.status[transmission._status.downloadwait];break;case "actively":b=transmission.torrents.actively;break;case "error":b=transmission.torrents.error;break;case "warning":b=transmission.torrents.warning;break;
|
||||
case "search-result":b=transmission.torrents.searchResult}return b},loadTorrentToList:function(a){if(!this.torrentListChecked)if(transmission.torrents.all){jQuery.extend({node:null,page:1,target:"all"},a);if(a.target){var b=this.getTorrentFromType(a.target);this.config.defaultSelectNode=a.target;this.saveConfig();var c=[];this.control.torrentlist.empty();for(var d in b)if(b[d]){var e=parseFloat(b[d].percentDone*100).toFixed(2),f=this.lang.torrent["status-text"][b[d].status];if(b[d].error!=0)f="<span class='text-status-error'>"+
|
||||
f+"</span>";else if(b[d].warning)f="<span class='text-status-warning' title='"+b[d].warning+"'>"+f+"</span>";e={id:b[d].id,name:this.getTorrentNameBar(b[d]),totalSize:b[d].totalSize,percentDone:this.getTorrentProgressBar(e,b[d]),percentDoneNumber:e,status:f,addedDate:formatLongTime(b[d].addedDate),completeSize:b[d].totalSize-b[d].leftUntilDone,rateDownload:b[d].rateDownload,rateUpload:b[d].rateUpload,leecherCount:b[d].leecher,seederCount:b[d].seeder,uploadRatio:b[d].uploadRatio,uploadedEver:b[d].uploadedEver};
|
||||
c.push(e)}if(c.length==0)setTimeout(function(){system.showContent("home")},100);else{if(this.torrentPager.onGotoPage==null)this.torrentPager.onGotoPage=function(g){system.control.torrentlist.empty();$("#torrent-toolbar").hide();for(var h in g)system.appendTorrentToList(g[h])};this.torrentPager.setDatas(c,a.target)}}}},appendTorrentToList:function(a){var b=$("<input id='torrent-"+a.id+"' type='checkbox'/>").attr("inited",0),c=$("<label for='torrent-"+a.id+"'>"+a.name+a.percentDone+"<span class='torrent-list-infos'>↓"+
|
||||
formatSize(a.rateDownload,false,"speed")+" ↑"+formatSize(a.rateUpload,false,"speed")+"|"+formatSize(a.completeSize)+"/"+formatSize(a.totalSize)+"</span></label>");b.click(function(){system.changeTorrentToolbar(this,a)});c.appendTo(b);b.appendTo(this.control.torrentlist);b.checkboxradio({theme:"c"})},getTorrentNameBar:function(a){var b="",c=a.name;switch(a.status){case transmission._status.stopped:b="iconlabel icon-pause-small";break;case transmission._status.check:b="iconlabel icon-checking";break;
|
||||
case transmission._status.download:b="iconlabel icon-down";break;case transmission._status.seed:b="iconlabel icon-up";break;case transmission._status.seedwait:case transmission._status.downloadwait:case transmission._status.checkwait:b="iconlabel icon-wait"}if(a.warning){b="iconlabel icon-warning-type1";c+="\n\n"+this.lang["public"]["text-info"]+": "+a.warning}if(a.error!=0){b="iconlabel icon-exclamation";c+="\n\n"+this.lang["public"]["text-info"]+": "+a.errorString}return'<span class="'+b+'" title="'+
|
||||
c+'">'+a.name+"</span>"},getTorrentProgressBar:function(a,b){a+="%";var c="";switch(b.status){case transmission._status.stopped:c="torrent-progress-stop";break;case transmission._status.checkwait:case transmission._status.check:c="torrent-progress-check";break;case transmission._status.downloadwait:case transmission._status.download:c="torrent-progress-download";break;case transmission._status.seedwait:case transmission._status.seed:c="torrent-progress-seed"}if(b.warning)c="torrent-progress-warning";
|
||||
if(b.error!=0)c="torrent-progress-error";return'<div class="torrent-progress" title="'+a+'"><div class="torrent-progress-text">'+a+'</div><div class="torrent-progress-bar '+c+'" style="width:'+a+';"></div></div>'},changeTorrentToolbar:function(a,b){if(this.control.torrentlist.find("input:checked").length>0){this.torrentListChecked=true;$("#torrent-toolbar").show()}else{this.torrentListChecked=false;$("#torrent-toolbar").hide()}this.currentTorrentId=b.id},torrentPager:{datas:null,pageSize:30,pageNumber:0,
|
||||
pageCount:0,count:0,onGotoPage:null,currentDatas:null,pageBar:null,controls:{prev:null,next:null,number:null},head:"",init:function(a){this.pageBar=$("#torrent-page-bar");this.controls.next=this.pageBar.find("#page-next");this.controls.next.click(function(){system.torrentPager.gotoPage("next")});this.controls.prev=this.pageBar.find("#page-prev");this.controls.prev.click(function(){system.torrentPager.gotoPage("prev")});this.controls.number=this.pageBar.find("#page-number");a&&this.setDatas(a)},setDatas:function(a,
|
||||
b){this.datas||this.init();this.datas=a;this.pageBar.show();this.count=this.datas.length;this.pageCount=parseInt(this.count/this.pageSize);this.count%this.pageSize>0&&this.pageCount++;this.pageCount==1&&this.pageBar.hide();this.head==b?this.gotoPage():this.gotoPage(1);this.head=b},gotoPage:function(a){if(typeof a=="number")this.pageNumber=a;else switch(a){case "next":this.pageNumber++;break;case "prev":this.pageNumber--}if(this.pageNumber>this.pageCount)this.pageNumber=this.pageCount;if(this.pageNumber<
|
||||
1)this.pageNumber=1;a=(this.pageNumber-1)*parseInt(this.pageSize);var b=a+parseInt(this.pageSize);this.currentDatas=this.datas.slice(a,b);this.controls.number.text(this.pageNumber+"/"+this.pageCount);this.pageNumber>1?this.controls.prev.show():this.controls.prev.hide();this.pageNumber<this.pageCount?this.controls.next.show():this.controls.next.hide();this.onGotoPage&&this.onGotoPage(this.currentDatas)}},changeSelectedTorrentStatus:function(a,b){var c=this.control.torrentlist.find("input:checked"),
|
||||
d=[];a||(a="start");for(var e=0;e<c.length;e++)d.push(parseInt(c[e].id.replace("torrent-","")));if(d.length>0){switch(a){case "remove":return;case "verify":if(rows.length==1){if(transmission.torrents.all[d[0].id].percentDone>0)if(confirm(system.lang.toolbar.tip["recheck-confirm"])==false)return}else if(confirm(system.lang.toolbar.tip["recheck-confirm"])==false)return}b=$(b);b.attr("disabled",true);transmission.exec({method:"torrent-"+a,arguments:{ids:d}},function(){b.attr("disabled",false);system.reloadTorrentBaseInfos()})}},
|
||||
addTorrentsToServer:function(a,b,c,d,e){var f=b-a.length,g=a.shift();if(g){this.showStatus(this.lang.system.status.queue,b-f+1);transmission.addTorrentFromUrl(g,d,c,function(){system.addTorrentsToServer(a,b,c,d,e)})}else{this.showStatus(this.lang.system.status.queuefinish);this.getServerStatus();e&&e()}},showStatus:function(a,b){if(a){$("#status").show();$("#status-msg").html(a);$.isNumeric(b)?$("#status-count").html(b).show():$("#status-count").hide()}else $("#status").hide()}};
|
||||
$(document).ready(function(){$.getScript("lang/_languages.js",function(){system.init(location.search.getQueryString("lang"))})});
|
||||
showContent:function(a){var b={page:"",type:"",data:"",title:this.lang.system.title,reload:false,callback:null},c=null;if(typeof a=="string"){b.page=a;c=b}else c=jQuery.extend(b,a);if(!(c.page==this.currentContentPage&&!c.reload)){$("#content-"+c.page).show();if(c.page!=this.currentContentPage){$("#content-"+this.currentContentPage).hide();this.control.torrentlist.find("input:checked").prop("checked",false).checkboxradio("refresh");this.torrentListChecked=false}$("#torrent-page-bar").hide();$("#torrent-toolbar").hide();
|
||||
this.currentContentPage=c.page;switch(c.type){case "torrent-list":c.title=this.lang.tree[c.data];this.loadTorrentToList({target:c.data})}$("#page-title").text(c.title);c.reload=false;this.currentContentConfig=c;c.callback&&c.callback()}},getTorrentFromType:function(a){var b=null;switch(a){case "torrent-all":case "all":case "servers":b=transmission.torrents.all;break;case "paused":b=transmission.torrents.status[transmission._status.stopped];break;case "sending":b=transmission.torrents.status[transmission._status.seed];
|
||||
break;case "seedwait":b=transmission.torrents.status[transmission._status.seedwait];break;case "check":b=transmission.torrents.status[transmission._status.check];break;case "checkwait":b=transmission.torrents.status[transmission._status.checkwait];break;case "downloading":b=transmission.torrents.status[transmission._status.download];break;case "downloadwait":b=transmission.torrents.status[transmission._status.downloadwait];break;case "actively":b=transmission.torrents.actively;break;case "error":b=
|
||||
transmission.torrents.error;break;case "warning":b=transmission.torrents.warning;break;case "search-result":b=transmission.torrents.searchResult}return b},loadTorrentToList:function(a){if(!this.torrentListChecked)if(transmission.torrents.all){jQuery.extend({node:null,page:1,target:"all"},a);if(a.target){var b=this.getTorrentFromType(a.target);this.config.defaultSelectNode=a.target;this.saveConfig();var c=[];this.control.torrentlist.empty();for(var d in b)if(b[d]){var e=parseFloat(b[d].percentDone*
|
||||
100).toFixed(2),f=this.lang.torrent["status-text"][b[d].status];if(b[d].error!=0)f="<span class='text-status-error'>"+f+"</span>";else if(b[d].warning)f="<span class='text-status-warning' title='"+b[d].warning+"'>"+f+"</span>";e={id:b[d].id,name:this.getTorrentNameBar(b[d]),totalSize:b[d].totalSize,percentDone:this.getTorrentProgressBar(e,b[d]),percentDoneNumber:e,status:f,addedDate:formatLongTime(b[d].addedDate),completeSize:b[d].totalSize-b[d].leftUntilDone,rateDownload:b[d].rateDownload,rateUpload:b[d].rateUpload,
|
||||
leecherCount:b[d].leecher,seederCount:b[d].seeder,uploadRatio:b[d].uploadRatio,uploadedEver:b[d].uploadedEver};c.push(e)}if(c.length==0)setTimeout(function(){system.showContent("home")},100);else{if(this.torrentPager.onGotoPage==null)this.torrentPager.onGotoPage=function(g){system.control.torrentlist.empty();$("#torrent-toolbar").hide();for(var h in g)system.appendTorrentToList(g[h])};this.torrentPager.setDatas(c,a.target)}}}},appendTorrentToList:function(a){var b=$("<input id='torrent-"+a.id+"' type='checkbox'/>").attr("inited",
|
||||
0),c=$("<label for='torrent-"+a.id+"'>"+a.name+a.percentDone+"<span class='torrent-list-infos'>↓"+formatSize(a.rateDownload,false,"speed")+" ↑"+formatSize(a.rateUpload,false,"speed")+"|"+formatSize(a.completeSize)+"/"+formatSize(a.totalSize)+"</span></label>");b.click(function(){system.changeTorrentToolbar(this,a)});c.appendTo(b);b.appendTo(this.control.torrentlist);b.checkboxradio({theme:"c"})},getTorrentNameBar:function(a){var b="",c=a.name;switch(a.status){case transmission._status.stopped:b="iconlabel icon-pause-small";
|
||||
break;case transmission._status.check:b="iconlabel icon-checking";break;case transmission._status.download:b="iconlabel icon-down";break;case transmission._status.seed:b="iconlabel icon-up";break;case transmission._status.seedwait:case transmission._status.downloadwait:case transmission._status.checkwait:b="iconlabel icon-wait"}if(a.warning){b="iconlabel icon-warning-type1";c+="\n\n"+this.lang["public"]["text-info"]+": "+a.warning}if(a.error!=0){b="iconlabel icon-exclamation";c+="\n\n"+this.lang["public"]["text-info"]+
|
||||
": "+a.errorString}return'<span class="'+b+'" title="'+c+'">'+a.name+"</span>"},getTorrentProgressBar:function(a,b){a+="%";var c="";switch(b.status){case transmission._status.stopped:c="torrent-progress-stop";break;case transmission._status.checkwait:case transmission._status.check:c="torrent-progress-check";break;case transmission._status.downloadwait:case transmission._status.download:c="torrent-progress-download";break;case transmission._status.seedwait:case transmission._status.seed:c="torrent-progress-seed"}if(b.warning)c=
|
||||
"torrent-progress-warning";if(b.error!=0)c="torrent-progress-error";return'<div class="torrent-progress" title="'+a+'"><div class="torrent-progress-text">'+a+'</div><div class="torrent-progress-bar '+c+'" style="width:'+a+';"></div></div>'},changeTorrentToolbar:function(a,b){var c=this.control.torrentlist.find("input:checked");$("#torrent-checked-count").html(c.length);if(c.length>0){this.torrentListChecked=true;$("#torrent-toolbar").show()}else{this.torrentListChecked=false;$("#torrent-toolbar").hide()}if(b)this.currentTorrentId=
|
||||
b.id},torrentPager:{datas:null,pageSize:30,pageNumber:0,pageCount:0,count:0,onGotoPage:null,currentDatas:null,pageBar:null,controls:{prev:null,next:null,number:null},head:"",init:function(a){this.pageBar=$("#torrent-page-bar");this.controls.next=this.pageBar.find("#page-next");this.controls.next.click(function(){system.torrentPager.gotoPage("next")});this.controls.prev=this.pageBar.find("#page-prev");this.controls.prev.click(function(){system.torrentPager.gotoPage("prev")});this.controls.number=this.pageBar.find("#page-number");
|
||||
a&&this.setDatas(a)},setDatas:function(a,b){this.datas||this.init();this.datas=a;this.pageBar.show();this.count=this.datas.length;this.pageCount=parseInt(this.count/this.pageSize);this.count%this.pageSize>0&&this.pageCount++;this.pageCount==1&&this.pageBar.hide();this.head==b?this.gotoPage():this.gotoPage(1);this.head=b},gotoPage:function(a){if(typeof a=="number")this.pageNumber=a;else switch(a){case "next":this.pageNumber++;break;case "prev":this.pageNumber--}if(this.pageNumber>this.pageCount)this.pageNumber=
|
||||
this.pageCount;if(this.pageNumber<1)this.pageNumber=1;a=(this.pageNumber-1)*parseInt(this.pageSize);var b=a+parseInt(this.pageSize);this.currentDatas=this.datas.slice(a,b);this.controls.number.text(this.pageNumber+"/"+this.pageCount);this.pageNumber>1?this.controls.prev.show():this.controls.prev.hide();this.pageNumber<this.pageCount?this.controls.next.show():this.controls.next.hide();this.onGotoPage&&this.onGotoPage(this.currentDatas)}},changeSelectedTorrentStatus:function(a,b,c){var d=this.control.torrentlist.find("input:checked"),
|
||||
e=[];a||(a="start");for(var f=0;f<d.length;f++)e.push(parseInt(d[f].id.replace("torrent-","")));if(e.length>0){arguments={ids:e};switch(a){case "remove":arguments["delete-local-data"]=c.removeData;break;case "verify":if(e.length==1){if(transmission.torrents.all[e[0]].percentDone>0)if(confirm(system.lang.toolbar.tip["recheck-confirm"])==false)return}else if(confirm(system.lang.toolbar.tip["recheck-confirm"])==false)return}b=$(b);b.attr("disabled",true);transmission.exec({method:"torrent-"+a,arguments:arguments},
|
||||
function(){b.attr("disabled",false);system.reloadTorrentBaseInfos()});this.torrentListChecked=false}},addTorrentsToServer:function(a,b,c,d,e){var f=b-a.length,g=a.shift();if(g){this.showStatus(this.lang.system.status.queue,b-f+1);transmission.addTorrentFromUrl(g,d,c,function(){system.addTorrentsToServer(a,b,c,d,e)})}else{this.showStatus(this.lang.system.status.queuefinish);this.getServerStatus();e&&e()}},showStatus:function(a,b){if(a){$("#status").show();$("#status-msg").html(a);$.isNumeric(b)?$("#status-count").html(b).show():
|
||||
$("#status-count").hide()}else $("#status").hide()}};$(document).ready(function(){$.getScript("lang/default.js");$.getScript("lang/_languages.js",function(){system.init(location.search.getQueryString("lang"))})});
|
||||
|
@ -1,7 +1,7 @@
|
||||
// 当前系统全局对象
|
||||
var system = {
|
||||
version:"0.6 Beta"
|
||||
,codeupdate:"20130909"
|
||||
,codeupdate:"20130913"
|
||||
,config:{
|
||||
autoReload: true
|
||||
,reloadStep: 5000
|
||||
|
@ -2,8 +2,8 @@
|
||||
移动版
|
||||
*/
|
||||
var system = {
|
||||
version:"0.5 Beta"
|
||||
,codeupdate:"20130909"
|
||||
version:"0.6 Beta"
|
||||
,codeupdate:"20130913"
|
||||
,config:{
|
||||
autoReload: true
|
||||
,reloadStep: 5000
|
||||
@ -350,14 +350,17 @@ var system = {
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$("#content-"+config.page).show();
|
||||
if (config.page!=this.currentContentPage)
|
||||
{
|
||||
$("#content-"+this.currentContentPage).hide();
|
||||
this.control.torrentlist.find("input:checked").prop("checked",false).checkboxradio("refresh");
|
||||
this.torrentListChecked = false;
|
||||
}
|
||||
$("#torrent-page-bar").hide();
|
||||
if (!this.torrentListChecked)
|
||||
$("#torrent-toolbar").hide();
|
||||
$("#torrent-toolbar").hide();
|
||||
|
||||
this.currentContentPage = config.page;
|
||||
switch (config.type)
|
||||
{
|
||||
@ -611,7 +614,7 @@ var system = {
|
||||
,changeTorrentToolbar:function(source,item)
|
||||
{
|
||||
var checked = this.control.torrentlist.find("input:checked");
|
||||
|
||||
$("#torrent-checked-count").html(checked.length);
|
||||
if (checked.length>0)
|
||||
{
|
||||
this.torrentListChecked = true;
|
||||
@ -622,7 +625,8 @@ var system = {
|
||||
this.torrentListChecked = false;
|
||||
$("#torrent-toolbar").hide();
|
||||
}
|
||||
this.currentTorrentId = item.id;
|
||||
if (item)
|
||||
this.currentTorrentId = item.id;
|
||||
}
|
||||
// 种子列表分页处理
|
||||
,torrentPager:{
|
||||
@ -740,7 +744,7 @@ var system = {
|
||||
}
|
||||
}
|
||||
// 开始/暂停已选择的种子
|
||||
,changeSelectedTorrentStatus:function(status,button)
|
||||
,changeSelectedTorrentStatus:function(status,button,options)
|
||||
{
|
||||
var items = this.control.torrentlist.find("input:checked");
|
||||
var ids = new Array();
|
||||
@ -755,15 +759,18 @@ var system = {
|
||||
|
||||
if (ids.length>0)
|
||||
{
|
||||
var arguments = {
|
||||
ids:ids
|
||||
};
|
||||
switch (status)
|
||||
{
|
||||
case "remove":
|
||||
return;
|
||||
arguments["delete-local-data"] = options.removeData;
|
||||
break;
|
||||
case "verify":
|
||||
if (rows.length==1)
|
||||
if (ids.length==1)
|
||||
{
|
||||
var torrent = transmission.torrents.all[ids[0].id];
|
||||
var torrent = transmission.torrents.all[ids[0]];
|
||||
if (torrent.percentDone>0)
|
||||
{
|
||||
if (confirm(system.lang.toolbar.tip["recheck-confirm"])==false)
|
||||
@ -783,15 +790,15 @@ var system = {
|
||||
button.attr("disabled",true);
|
||||
transmission.exec({
|
||||
method:"torrent-"+status
|
||||
,arguments:{
|
||||
ids:ids
|
||||
}
|
||||
,arguments:arguments
|
||||
}
|
||||
,function(data){
|
||||
button.attr("disabled",false);
|
||||
system.reloadTorrentBaseInfos();
|
||||
}
|
||||
);
|
||||
// 操作完成后,取消所有已选择的项
|
||||
this.torrentListChecked = false;
|
||||
}
|
||||
}
|
||||
// 增加种子
|
||||
@ -831,6 +838,8 @@ var system = {
|
||||
};
|
||||
|
||||
$(document).ready(function(){
|
||||
// 加载默认语言内容
|
||||
$.getScript("lang/default.js");
|
||||
// 加载可用的语言列表
|
||||
$.getScript("lang/_languages.js",function(){
|
||||
system.init(location.search.getQueryString("lang"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user