fx-compat: Start to update feed settings dialog

This commit is contained in:
Dan Stillman 2022-05-11 06:15:38 -04:00
parent 909d68eac3
commit 516c76a4ab
3 changed files with 13 additions and 9 deletions

View file

@ -48,6 +48,9 @@ var Zotero_Feed_Settings = new function() {
};
this.init = Zotero.Promise.coroutine(function* () {
document.addEventListener('dialogaccept', this.accept.bind(this));
document.addEventListener('dialogcancel', this.cancel.bind(this));
this.toggleAdvancedOptions(false);
data = window.arguments[0];
@ -99,7 +102,7 @@ var Zotero_Feed_Settings = new function() {
document.getElementById('feed-ttl').disabled = true;
document.getElementById('feed-cleanupReadAfter').disabled = true;
document.getElementById('feed-cleanupUnreadAfter').disabled = true;
document.documentElement.getButton('accept').disabled = true;
document.querySelector('dialog').getButton('accept').disabled = true;
};
this.validateURL = Zotero.Promise.coroutine(function* () {
@ -137,7 +140,7 @@ var Zotero_Feed_Settings = new function() {
ttl.disabled = false;
document.getElementById('feed-cleanupReadAfter').disabled = false;
document.getElementById('feed-cleanupUnreadAfter').disabled = false;
document.documentElement.getButton('accept').disabled = false;
document.querySelector('dialog').getButton('accept').disabled = false;
}
catch (e) {
Zotero.debug(e);

View file

@ -5,16 +5,16 @@
<!DOCTYPE window [
<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd" > %zoteroDTD;
]>
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
<window type="child"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
title="&zotero.feedSettings.title;" buttons="cancel,accept"
buttonlabelaccept="&zotero.feedSettings.saveButton.label;"
ondialogaccept="return Zotero_Feed_Settings.accept()"
ondialogcancel="return Zotero_Feed_Settings.cancel()"
id="zotero-feed-settings"
onload="Zotero_Feed_Settings.init()">
<dialog>
<script src="include.js"/>
<script src="chrome://global/content/customElements.js"/>
<script src="feedSettings.js"/>
<grid>
@ -66,4 +66,5 @@
</hbox>
</vbox>
</vbox>
</dialog>
</dialog>
</window>

View file

@ -1086,7 +1086,7 @@ var ZoteroPane = new function()
this.newFeedFromURL = Zotero.Promise.coroutine(function* () {
let data = {};
window.openDialog('chrome://zotero/content/feedSettings.xul',
window.openDialog('chrome://zotero/content/feedSettings.xhtml',
null, 'centerscreen, modal', data);
if (!data.cancelled) {
let feed = new Zotero.Feed();
@ -2203,7 +2203,7 @@ var ZoteroPane = new function()
cleanupUnreadAfter: feed.cleanupUnreadAfter
};
window.openDialog('chrome://zotero/content/feedSettings.xul',
window.openDialog('chrome://zotero/content/feedSettings.xhtml',
null, 'centerscreen, modal', data);
if (data.cancelled) return;