Fix number inputs and adjust linux styling for the prefs pane
This commit is contained in:
parent
7a434df539
commit
5798926093
4 changed files with 32 additions and 8 deletions
|
@ -105,3 +105,7 @@ radio[pane][selected="true"] {
|
||||||
background-color: Highlight;
|
background-color: Highlight;
|
||||||
color: HighlightText;
|
color: HighlightText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sync-reset-library-menu {
|
||||||
|
height: initial !important;
|
||||||
|
}
|
||||||
|
|
|
@ -37,6 +37,18 @@ Zotero_Preferences.Advanced = {
|
||||||
if (Zotero.Prefs.get('debug.memoryInfo')) {
|
if (Zotero.Prefs.get('debug.memoryInfo')) {
|
||||||
document.getElementById('memory-info').hidden = false;
|
document.getElementById('memory-info').hidden = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This might not work for checkboxes if we later need to create them
|
||||||
|
// with html
|
||||||
|
var inputs = document.querySelectorAll('input[data-preference]');
|
||||||
|
for (let input of inputs) {
|
||||||
|
let preferenceName = input.dataset.preference;
|
||||||
|
input.addEventListener('change', function () {
|
||||||
|
let value = input.value;
|
||||||
|
Zotero.Prefs.set(preferenceName, value);
|
||||||
|
});
|
||||||
|
input.value = Zotero.Prefs.get(preferenceName);
|
||||||
|
}
|
||||||
|
|
||||||
this.onDataDirLoad();
|
this.onDataDirLoad();
|
||||||
this.refreshLocale();
|
this.refreshLocale();
|
||||||
|
|
|
@ -31,7 +31,8 @@
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<overlay id="zotero-prefpane-advanced-overlay"
|
<overlay id="zotero-prefpane-advanced-overlay"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
|
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
<prefpane id="zotero-prefpane-advanced"
|
<prefpane id="zotero-prefpane-advanced"
|
||||||
onpaneload="Zotero_Preferences.Advanced.init()"
|
onpaneload="Zotero_Preferences.Advanced.init()"
|
||||||
|
@ -59,9 +60,6 @@
|
||||||
<preference id="pref-keys-copySelectedItemsToClipboard" name="extensions.zotero.keys.copySelectedItemsToClipboard" type="string"/>
|
<preference id="pref-keys-copySelectedItemsToClipboard" name="extensions.zotero.keys.copySelectedItemsToClipboard" type="string"/>
|
||||||
|
|
||||||
<preference id="pref-feeds-sortAscending" name="extensions.zotero.feeds.sortAscending" type="bool"/>
|
<preference id="pref-feeds-sortAscending" name="extensions.zotero.feeds.sortAscending" type="bool"/>
|
||||||
<preference id="pref-feeds-defaultTTL" name="extensions.zotero.feeds.defaultTTL" type="int"/>
|
|
||||||
<preference id="pref-feeds-defaultCleanupUnreadAfter" name="extensions.zotero.feeds.defaultCleanupUnreadAfter" type="int"/>
|
|
||||||
<preference id="pref-feeds-defaultCleanupReadAfter" name="extensions.zotero.feeds.defaultCleanupReadAfter" type="int"/>
|
|
||||||
</preferences>
|
</preferences>
|
||||||
|
|
||||||
<tabbox id="zotero-prefpane-advanced-tabs">
|
<tabbox id="zotero-prefpane-advanced-tabs">
|
||||||
|
@ -307,26 +305,26 @@
|
||||||
</hbox>
|
</hbox>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
<groupbox>
|
<groupbox id="zotero-prefpane-advanced-feeds-feedDefaults">
|
||||||
<caption label="&zotero.preferences.feeds.feedDefaults;"/>
|
<caption label="&zotero.preferences.feeds.feedDefaults;"/>
|
||||||
<hbox>
|
<hbox>
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<label value="&zotero.feedSettings.refresh.label1;"/>
|
<label value="&zotero.feedSettings.refresh.label1;"/>
|
||||||
<textbox type="number" min="1" increment="1" size="3" preference="pref-feeds-defaultTTL"/>
|
<html:input class="html-input" type="number" min="1" step="1" size="3" data-preference="feeds.defaultTTL"/>
|
||||||
<label value="&zotero.feedSettings.refresh.label2;"/>
|
<label value="&zotero.feedSettings.refresh.label2;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox>
|
<hbox>
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<label value="&zotero.feedSettings.cleanupReadAfter.label1;"/>
|
<label value="&zotero.feedSettings.cleanupReadAfter.label1;"/>
|
||||||
<textbox type="number" min="1" increment="1" size="2" preference="pref-feeds-defaultCleanupReadAfter"/>
|
<html:input class="html-input" type="number" min="1" step="1" size="2" data-preference="feeds.defaultCleanupUnreadAfter"/>
|
||||||
<label value="&zotero.feedSettings.cleanupReadAfter.label2;"/>
|
<label value="&zotero.feedSettings.cleanupReadAfter.label2;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox>
|
<hbox>
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<label value="&zotero.feedSettings.cleanupUnreadAfter.label1;"/>
|
<label value="&zotero.feedSettings.cleanupUnreadAfter.label1;"/>
|
||||||
<textbox type="number" min="1" increment="1" size="2" preference="pref-feeds-defaultCleanupUnreadAfter"/>
|
<html:input class="html-input" type="number" min="1" step="1" size="2" data-preference="feeds.defaultCleanupReadAfter"/>
|
||||||
<label value="&zotero.feedSettings.cleanupUnreadAfter.label2;"/>
|
<label value="&zotero.feedSettings.cleanupUnreadAfter.label2;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
|
@ -317,6 +317,16 @@ treechildren::-moz-tree-checkbox(checked){
|
||||||
padding-bottom: .4em;
|
padding-bottom: .4em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#zotero-prefpane-advanced-feeds-feedDefaults .html-input {
|
||||||
|
width: 50px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#zotero-prefpane-advanced-feeds-feedDefaults hbox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* BEGIN 2X BLOCK -- DO NOT EDIT MANUALLY -- USE 2XIZE */
|
/* BEGIN 2X BLOCK -- DO NOT EDIT MANUALLY -- USE 2XIZE */
|
||||||
@media (min-resolution: 1.25dppx) {
|
@media (min-resolution: 1.25dppx) {
|
||||||
|
|
Loading…
Reference in a new issue