Cloess #221, Add status line in preferences pane to indicate if preferences don't take effect immediately

This commit is contained in:
Dan Stillman 2006-09-23 00:22:29 +00:00
parent 8303028a85
commit 9bc5c4435e
3 changed files with 20 additions and 3 deletions

View file

@ -11,6 +11,7 @@ var openURLMenu;
var openURLResolvers;
var openURLServerField;
var openURLVersionMenu;
var scholarPaneOnTopInitial;
/*
To add a new preference:
@ -28,7 +29,7 @@ var openURLVersionMenu;
function init()
{
autoUpdateBox = document.getElementById('autoUpdateBox');
autoUpdateBox.checked = Scholar.Prefs.get('automaticScraperUpdates');
autoUpdateBox.checked = scholarPaneOnTopInitial = Scholar.Prefs.get('automaticScraperUpdates');
positionMenu = document.getElementById('positionMenu');
positionMenu.selectedIndex = Scholar.Prefs.get('scholarPaneOnTop') ? 0 : 1;
@ -83,4 +84,17 @@ function onOpenURLSelected()
function onOpenURLCustomized()
{
openURLMenu.value = "custom";
}
function onPositionChange()
{
var statusLine = document.getElementById('statusLine');
if ((positionMenu.selectedIndex == 0) != scholarPaneOnTopInitial)
{
statusLine.value = Scholar.getString('scholar.preferences.status.positionChange');
}
else
{
statusLine.value = '';
}
}

View file

@ -19,7 +19,7 @@
<hbox align="center">
<label value="&scholar.preferences.position.label;" control="positionMenu"/>
<menulist id="positionMenu">
<menulist id="positionMenu" oncommand="onPositionChange()">
<menupopup>
<menuitem label="&scholar.preferences.position.above;"/>
<menuitem label="&scholar.preferences.position.below;"/>
@ -58,4 +58,6 @@
</hbox>
</groupbox>
<label id="statusLine" value="" style="color:red"/>
</dialog>

View file

@ -69,7 +69,6 @@ itemFields.journalAbbreviation = Journal Abbr
itemFields.DOI = DOI
itemFields.accessDate = Accessed
itemTypes.note = Note
itemTypes.book = Book
itemTypes.bookSection = Book Section
@ -99,6 +98,8 @@ db.dbCorruptedNoBackup = The Zotero database appears to have become corrupted,
db.dbRestored = The Zotero database appears to have become corrupted.\n\nYour data was restored from the last automatic backup made on %1 at %2. The damaged file was saved in your Zotero directory.
db.dbRestoreFailed = The Zotero database appears to have become corrupted, and an attempt to restore from the last automatic backup failed.\n\nA new database file has been created. The damaged file was saved in your Zotero directory.
scholar.preferences.status.positionChange = Position change will take effect in new windows only
fileInterface.itemsImported = Importing items...
fileInterface.itemsExported = Exporting items...
fileInterface.import = Import