Browse Source

Merge pull request #13006 from SeproDE/webui-rss-fixes

Fix issues regarding WebUI RSS implementation
adaptive-webui-19844
Mike Tzou 5 years ago committed by GitHub
parent
commit
59f365b343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/webui/www/private/download.html
  2. 4
      src/webui/www/private/newcategory.html
  3. 2
      src/webui/www/private/newfeed.html
  4. 2
      src/webui/www/private/newfolder.html
  5. 2
      src/webui/www/private/newrule.html
  6. 2
      src/webui/www/private/newtag.html
  7. 2
      src/webui/www/private/rename.html
  8. 2
      src/webui/www/private/rename_feed.html
  9. 2
      src/webui/www/private/rename_file.html
  10. 2
      src/webui/www/private/rename_rule.html
  11. 2
      src/webui/www/private/setlocation.html
  12. 2
      src/webui/www/private/upload.html
  13. 69
      src/webui/www/private/views/rssDownloader.html

2
src/webui/www/private/download.html

@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
<select id="categorySelect" onchange="qBittorrent.Download.changeCategorySelect(this)">
<option selected value="\other"></option>
</select>
<input name="category" type="text" value="" />
<input name="category" type="text" />
</div>
</td>
</tr>

4
src/webui/www/private/newcategory.html

@ -132,9 +132,9 @@ @@ -132,9 +132,9 @@
<body>
<div style="padding: 10px 10px 0px 10px;">
<p style="font-weight: bold;">QBT_TR(Category)QBT_TR[CONTEXT=TransferListWidget]:</p>
<input type="text" id="categoryName" value="" maxlength="100" style="width: 220px;" />
<input type="text" id="categoryName" maxlength="100" style="width: 220px;" />
<p style="font-weight: bold;">QBT_TR(Save path)QBT_TR[CONTEXT=TransferListWidget]:</p>
<input type="text" id="savePath" value="" style="width: 220px;" />
<input type="text" id="savePath" style="width: 220px;" />
<div style="text-align: center; padding-top: 10px;">
<input type="button" value="QBT_TR(Add)QBT_TR[CONTEXT=HttpServer]" id="categoryNameButton" />
</div>

2
src/webui/www/private/newfeed.html

@ -68,7 +68,7 @@ @@ -68,7 +68,7 @@
<body>
<div style="padding: 10px 10px 0px 10px;">
<p style="font-weight: bold;">QBT_TR(Feed URL:)QBT_TR[CONTEXT=RSSWidget]</p>
<input type="text" id="feedURL" value="" maxlength="100" style="width: 320px;" />
<input type="text" id="feedURL" style="width: 320px;" />
<div style="text-align: center; padding-top: 10px;">
<input type="button" value="QBT_TR(OK)QBT_TR[CONTEXT=HttpServer]" id="submitButton" />
</div>

2
src/webui/www/private/newfolder.html

@ -67,7 +67,7 @@ @@ -67,7 +67,7 @@
<body>
<div style="padding: 10px 10px 0px 10px;">
<p style="font-weight: bold;">QBT_TR(Folder name:)QBT_TR[CONTEXT=RSSWidget]</p>
<input type="text" id="folderName" value="" maxlength="100" style="width: 320px;" />
<input type="text" id="folderName" style="width: 320px;" />
<div style="text-align: center; padding-top: 10px;">
<input type="button" value="QBT_TR(OK)QBT_TR[CONTEXT=HttpServer]" id="submitButton" />
</div>

2
src/webui/www/private/newrule.html

@ -60,7 +60,7 @@ @@ -60,7 +60,7 @@
<body>
<div style="padding: 10px 10px 0px 10px;">
<p>QBT_TR(Please type the name of the new download rule.)QBT_TR[CONTEXT=AutomatedRssDownloader]</p>
<input type="text" id="name" value="" maxlength="100" style="width: 320px;" />
<input type="text" id="name" maxlength="100" style="width: 320px;" />
<div style="text-align: center; padding-top: 10px;">
<input type="button" value="QBT_TR(OK)QBT_TR[CONTEXT=HttpServer]" id="submitButton" />
</div>

2
src/webui/www/private/newtag.html

@ -95,7 +95,7 @@ @@ -95,7 +95,7 @@
<body>
<div style="padding: 10px 10px 0px 10px;">
<p id="legendText" style="font-weight: bold;">QBT_TR(Comma-separated tags:)QBT_TR[CONTEXT=TransferListWidget]</p>
<input type="text" id="tagName" value="" maxlength="100" style="width: 220px;" />
<input type="text" id="tagName" maxlength="100" style="width: 220px;" />
<div style="text-align: center; padding-top: 10px;">
<input type="button" value="QBT_TR(Add)QBT_TR[CONTEXT=HttpServer]" id="tagNameButton" />
</div>

2
src/webui/www/private/rename.html

@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
<body>
<div style="padding: 10px 10px 0px 10px;">
<p style="font-weight: bold;">QBT_TR(New name)QBT_TR[CONTEXT=TransferListWidget]:</p>
<input type="text" id="rename" value="" maxlength="100" style="width: 220px;" />
<input type="text" id="rename" maxlength="100" style="width: 220px;" />
<div style="text-align: center; padding-top: 10px;">
<input type="button" value="QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" id="renameButton" />
</div>

2
src/webui/www/private/rename_feed.html

@ -78,7 +78,7 @@ @@ -78,7 +78,7 @@
<body>
<div style="padding: 10px 10px 0px 10px;">
<p style="font-weight: bold;">QBT_TR(New feed name:)QBT_TR[CONTEXT=RSSWidget]</p>
<input type="text" id="rename" value="" maxlength="100" style="width: 320px;" />
<input type="text" id="rename" style="width: 320px;" />
<div style="text-align: center; padding-top: 10px;">
<input type="button" value="QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" id="renameButton" />
</div>

2
src/webui/www/private/rename_file.html

@ -80,7 +80,7 @@ @@ -80,7 +80,7 @@
<body>
<div style="padding: 10px 10px 0px 10px;">
<p style="font-weight: bold;">QBT_TR(New name:)QBT_TR[CONTEXT=TorrentContentTreeView]</p>
<input type="text" id="rename" value="" maxlength="100" style="width: 220px;" />
<input type="text" id="rename" maxlength="100" style="width: 220px;" />
<div style="text-align: center; padding-top: 10px;">
<input type="button" value="QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" id="renameButton" />
</div>

2
src/webui/www/private/rename_rule.html

@ -71,7 +71,7 @@ @@ -71,7 +71,7 @@
<body>
<div style="padding: 10px 10px 0px 10px;">
<p>QBT_TR(Please type the new rule name)QBT_TR[CONTEXT=AutomatedRssDownloader]</p>
<input type="text" id="rename" value="" maxlength="100" style="width: 320px;" />
<input type="text" id="rename" maxlength="100" style="width: 320px;" />
<div style="text-align: center; padding-top: 10px;">
<input type="button" value="QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" id="renameButton" />
</div>

2
src/webui/www/private/setlocation.html

@ -68,7 +68,7 @@ @@ -68,7 +68,7 @@
<body>
<div style="padding: 10px 10px 0px 10px;">
<p style="font-weight: bold;">QBT_TR(Location)QBT_TR[CONTEXT=TransferListWidget]:</p>
<input type="text" id="setLocation" value="" autocorrect="off" autocapitalize="none" style="width: 370px;" />
<input type="text" id="setLocation" autocorrect="off" autocapitalize="none" style="width: 370px;" />
<div style="float: none; width: 370px;" id="error_div">&nbsp;</div>
<div style="text-align: center; padding-top: 10px;">
<input type="button" value="QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" id="setLocationButton" />

2
src/webui/www/private/upload.html

@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
<select id="categorySelect" onchange="qBittorrent.Download.changeCategorySelect(this)">
<option selected value="\other"></option>
</select>
<input name="category" type="text" value="" />
<input name="category" type="text" />
</div>
</td>
</tr>

69
src/webui/www/private/views/rssDownloader.html

@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
.fullWidth {
width: 100%;
max-width: none;
box-sizing: border-box;
}
.noWrap {
@ -78,6 +79,50 @@ @@ -78,6 +79,50 @@
#lastMatchDiv {
float: right;
}
#ruleSettings {
padding: 4px 10px 4px 10px
}
#topMenuBar {
height: 26px;
}
#rulesTableDesc {
vertical-align: middle;
}
.imageButton {
height: 22px;
width: 24px;
margin: 1px 2px 1px 2px;
border: 1px solid;
border-radius: 2px;
background-color: #efefef;
border-color: #767676;
background-position: center center;
vertical-align: middle;
}
.imageButton:hover {
background-color: #e5e5e5;
border-color: #4f4f4f;
}
.imageButton:active {
background-color: #f5f5f5;
border-color: #8d8d8d;
}
#newRuleButton {
float: right;
background-image: url('icons/document-new.svg');
}
#deleteRuleButton {
float: right;
background-image: url('icons/list-remove.svg');
}
</style>
<div id="RssDownloader" class="RssDownloader">
@ -85,7 +130,11 @@ @@ -85,7 +130,11 @@
QBT_TR(Auto downloading of RSS torrents is disabled now! You can enable it in application settings.)QBT_TR[CONTEXT=AutomatedRssDownloader]
</div>
<div id="leftRssDownloaderColumn">
<b id="rulesTableDesc">QBT_TR(Download Rules)QBT_TR[CONTEXT=AutomatedRssDownloader]</b>
<div id="topMenuBar">
<b id="rulesTableDesc">QBT_TR(Download Rules)QBT_TR[CONTEXT=AutomatedRssDownloader]</b>
<button id="newRuleButton" class="imageButton" onclick="qBittorrent.RssDownloader.addRule()"></button>
<button id="deleteRuleButton" class="imageButton" onclick="qBittorrent.RssDownloader.removeSelectedRule()"></button>
</div>
<div id="rulesTable">
<div id="rulesSelectionCheckBoxList">
<div id="rssDownloaderRuleFixedHeaderDiv" class="dynamicTableFixedHeaderDiv invisible">
@ -281,7 +330,9 @@ Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also @@ -281,7 +330,9 @@ Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also
saveSettings: saveSettings,
rssDownloaderRulesTable: rssDownloaderRulesTable,
rssDownloaderFeedSelectionTable: rssDownloaderFeedSelectionTable,
setElementTitles: setElementTitles
setElementTitles: setElementTitles,
addRule: addRule,
removeSelectedRule: removeSelectedRule
};
};
@ -335,10 +386,7 @@ Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also @@ -335,10 +386,7 @@ Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also
menu: 'rssDownloaderRuleMenu',
actions: {
addRule: addRule,
deleteRule: (el) => {
removeRule(rssDownloaderRulesTable.selectedRows
.map((sRow) => rssDownloaderRulesTable.rows[sRow].full_data.name));
},
deleteRule: removeSelectedRule,
renameRule: (el) => {
renameRule(rssDownloaderRulesTable.rows[rssDownloaderRulesTable.selectedRows[0]].full_data.name);
},
@ -478,7 +526,14 @@ Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also @@ -478,7 +526,14 @@ Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also
});
};
const removeRule = (rules) => {
const removeSelectedRule = () => {
if (rssDownloaderRulesTable.selectedRows.length === 0)
return;
removeRules(rssDownloaderRulesTable.selectedRows.map((sRow) =>
rssDownloaderRulesTable.rows[sRow].full_data.name));
};
const removeRules = (rules) => {
new MochaUI.Window({
id: 'removeRulePage',
title: 'QBT_TR(Rule deletion confirmation)QBT_TR[CONTEXT=AutomatedRssDownloader]',

Loading…
Cancel
Save