5 <meta charset=
"UTF-8" />
6 <title>QBT_TR(Rename)QBT_TR[CONTEXT=TransferListWidget]
</title>
7 <link rel=
"stylesheet" href=
"css/style.css?v=${CACHEID}" type=
"text/css" />
8 <script src=
"scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
9 <script src=
"scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
10 <script src=
"scripts/misc.js?locale=${LANG}&v=${CACHEID}"></script>
15 defaultEventType
: 'keydown',
17 'Enter': function(event
) {
18 $('renameButton').click();
19 event
.preventDefault();
21 'Escape': function(event
) {
22 window
.parent
.closeWindows();
23 event
.preventDefault();
25 'Esc': function(event
) {
26 window
.parent
.closeWindows();
27 event
.preventDefault();
32 window
.addEvent('domready', function() {
33 const name
= new URI().getData('name');
34 // set text field to current value
36 $('rename').value
= name
;
39 $('renameButton').addEvent('click', function(e
) {
42 const name
= $('rename').value
.trim();
43 if (name
=== null || name
=== "")
46 const hash
= new URI().getData('hash');
49 url
: 'api/v2/torrents/rename',
55 onComplete: function() {
56 window
.parent
.closeWindows();
66 <div style=
"padding: 10px 10px 0px 10px;">
67 <p style=
"font-weight: bold;">QBT_TR(New name)QBT_TR[CONTEXT=TransferListWidget]:
</p>
68 <input type=
"text" id=
"rename" style=
"width: 99%;" />
69 <div style=
"text-align: center; padding-top: 10px;">
70 <input type=
"button" value=
"QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" id=
"renameButton" />