From ddcbb47538097cf0014a6c7f011b96efd9dc4c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Tue, 24 Nov 2020 14:50:22 +0200 Subject: [PATCH] Fix number inputs and adjust linux styling for feed settings --- chrome/content/zotero-platform/unix/zotero.css | 8 ++++++++ chrome/content/zotero/feedSettings.js | 9 ++++++--- chrome/content/zotero/feedSettings.xul | 7 ++++--- chrome/skin/default/zotero/zotero.css | 10 ++++++++++ 4 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 chrome/content/zotero-platform/unix/zotero.css diff --git a/chrome/content/zotero-platform/unix/zotero.css b/chrome/content/zotero-platform/unix/zotero.css new file mode 100644 index 0000000000..159529b0c7 --- /dev/null +++ b/chrome/content/zotero-platform/unix/zotero.css @@ -0,0 +1,8 @@ +#zotero-feed-settings dropmarker{ + width: 20px; + margin-left: 5px; +} + +#zotero-feed-settings .html-input { + padding: 2px 2px 3px; +} diff --git a/chrome/content/zotero/feedSettings.js b/chrome/content/zotero/feedSettings.js index 9261049c74..6b223d638f 100644 --- a/chrome/content/zotero/feedSettings.js +++ b/chrome/content/zotero/feedSettings.js @@ -150,9 +150,12 @@ var Zotero_Feed_Settings = new function() { this.accept = function() { data.url = document.getElementById('feed-url').value; data.title = document.getElementById('feed-title').value; - data.ttl = document.getElementById('feed-ttl').value * 60; - data.cleanupReadAfter = document.getElementById('feed-cleanupReadAfter').value * 1; - data.cleanupUnreadAfter = document.getElementById('feed-cleanupUnreadAfter').value * 1; + data.ttl = parseInt(document.getElementById('feed-ttl').value); + data.ttl = (isNaN(data.ttl) ? Zotero.Prefs.get('feeds.defaultTTL') : data.ttl) * 60; + data.cleanupReadAfter = parseInt(document.getElementById('feed-cleanupReadAfter').value); + data.cleanupReadAfter = isNaN(data.cleanupReadAfter) ? Zotero.Prefs.get('feeds.defaultCleanupReadAfter') : data.cleanupReadAfter; + data.cleanupUnreadAfter = parseInt(document.getElementById('feed-cleanupUnreadAfter').value); + data.cleanupUnreadAfter = isNaN(data.cleanupUnreadAfter) ? Zotero.Prefs.get('feeds.defaultCleanupUnreadAfter') : data.cleanupUnreadAfter; return true; }; diff --git a/chrome/content/zotero/feedSettings.xul b/chrome/content/zotero/feedSettings.xul index 3db65d8a4d..27a8ab36ed 100644 --- a/chrome/content/zotero/feedSettings.xul +++ b/chrome/content/zotero/feedSettings.xul @@ -6,6 +6,7 @@ %zoteroDTD; ]> diff --git a/chrome/skin/default/zotero/zotero.css b/chrome/skin/default/zotero/zotero.css index c4de96c7ed..38344fc8fd 100644 --- a/chrome/skin/default/zotero/zotero.css +++ b/chrome/skin/default/zotero/zotero.css @@ -333,6 +333,16 @@ zoterosearch .menulist-icon { -moz-box-pack: end; } +#zotero-feed-settings .html-input { + width: 50px; + text-align: right; +} + +#zotero-feed-settings #advanced-options-togglable hbox { + display: flex; + align-items: center; +} + .zotero-spinner-14 { list-style-image: url(chrome://zotero/skin/spinner-14px.png); height: 14px;