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 openURLResolvers;
var openURLServerField; var openURLServerField;
var openURLVersionMenu; var openURLVersionMenu;
var scholarPaneOnTopInitial;
/* /*
To add a new preference: To add a new preference:
@ -28,7 +29,7 @@ var openURLVersionMenu;
function init() function init()
{ {
autoUpdateBox = document.getElementById('autoUpdateBox'); autoUpdateBox = document.getElementById('autoUpdateBox');
autoUpdateBox.checked = Scholar.Prefs.get('automaticScraperUpdates'); autoUpdateBox.checked = scholarPaneOnTopInitial = Scholar.Prefs.get('automaticScraperUpdates');
positionMenu = document.getElementById('positionMenu'); positionMenu = document.getElementById('positionMenu');
positionMenu.selectedIndex = Scholar.Prefs.get('scholarPaneOnTop') ? 0 : 1; positionMenu.selectedIndex = Scholar.Prefs.get('scholarPaneOnTop') ? 0 : 1;
@ -84,3 +85,16 @@ function onOpenURLCustomized()
{ {
openURLMenu.value = "custom"; 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"> <hbox align="center">
<label value="&scholar.preferences.position.label;" control="positionMenu"/> <label value="&scholar.preferences.position.label;" control="positionMenu"/>
<menulist id="positionMenu"> <menulist id="positionMenu" oncommand="onPositionChange()">
<menupopup> <menupopup>
<menuitem label="&scholar.preferences.position.above;"/> <menuitem label="&scholar.preferences.position.above;"/>
<menuitem label="&scholar.preferences.position.below;"/> <menuitem label="&scholar.preferences.position.below;"/>
@ -58,4 +58,6 @@
</hbox> </hbox>
</groupbox> </groupbox>
<label id="statusLine" value="" style="color:red"/>
</dialog> </dialog>

View File

@ -69,7 +69,6 @@ itemFields.journalAbbreviation = Journal Abbr
itemFields.DOI = DOI itemFields.DOI = DOI
itemFields.accessDate = Accessed itemFields.accessDate = Accessed
itemTypes.note = Note itemTypes.note = Note
itemTypes.book = Book itemTypes.book = Book
itemTypes.bookSection = Book Section 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.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. 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.itemsImported = Importing items...
fileInterface.itemsExported = Exporting items... fileInterface.itemsExported = Exporting items...
fileInterface.import = Import fileInterface.import = Import