www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 718d613cdcc5ce778c0ad398692c583a32af2680
parent 27025befef9333bc49c0f7235e9a08d715bed53a
Author: David Norton <david@nortoncrew.com>
Date:   Wed, 21 Jun 2006 23:22:37 +0000

Command-shift-S should now work as soon as you start Firefox.
Lots of localization, moving style out of XUL and into overlay.css

Diffstat:
Mchrome/chromeFiles/content/scholar/itemPane.js | 10+++++-----
Mchrome/chromeFiles/content/scholar/itemPane.xul | 16++++++++--------
Mchrome/chromeFiles/content/scholar/overlay.js | 8++++----
Mchrome/chromeFiles/content/scholar/overlay.xul | 15++++++++-------
Mchrome/chromeFiles/content/scholar/preferences.xul | 2+-
Mchrome/chromeFiles/locale/en-US/scholar/preferences.dtd | 4++--
Mchrome/chromeFiles/locale/en-US/scholar/scholar.dtd | 24++++++++++--------------
Mchrome/chromeFiles/locale/en-US/scholar/scholar.properties | 20++++++++++++++------
Mchrome/chromeFiles/skin/default/scholar/overlay.css | 72++++++++++++++++++++++++++++++++++++++++++++----------------------------
9 files changed, 96 insertions(+), 75 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/itemPane.js b/chrome/chromeFiles/content/scholar/itemPane.js @@ -129,7 +129,7 @@ ScholarItemPane = new function() function changeTypeTo(id) { - if(id != _itemBeingEdited.getType() && confirm('Are you sure you want to change the item type? Certain fields may be lost.')) + if(id != _itemBeingEdited.getType() && confirm(Scholar.getString('pane.item.changeType'))) { _itemBeingEdited.setType(id); _itemBeingEdited.save(); @@ -321,7 +321,7 @@ ScholarItemPane = new function() function removeSelectedNote() { if(_notesField.value != "") - if(!confirm("Are you sure you want to delete the selected note?")) + if(!confirm(Scholar.getString('pane.item.notes.delete.confirm'))) return; var id = _selectedNoteID(); @@ -348,7 +348,7 @@ ScholarItemPane = new function() function addNote() { modifySelectedNote(); - _notesMenu.appendItem('Untitled Note',null); + _notesMenu.appendItem(Scholar.getString('pane.item.notes.untitled'),null); _notesMenu.selectedIndex = _notesMenu.firstChild.childNodes.length-1; onNoteSelected(); @@ -380,7 +380,7 @@ ScholarItemPane = new function() if(t == "") { - return "Untitled Note"; + return Scholar.getString('pane.item.notes.untitled'); } else { @@ -392,7 +392,7 @@ ScholarItemPane = new function() { var c = _notesMenu.firstChild.childNodes.length; - _notesLabel.value = c + " note" + (c != 1 ? "s" : "") + ":"; + _notesLabel.value = Scholar.getString('pane.item.notes.count.'+(c != 1 ? "plural" : "singular")).replace('%1',c) + ":"; } function _selectedNoteID() diff --git a/chrome/chromeFiles/content/scholar/itemPane.xul b/chrome/chromeFiles/content/scholar/itemPane.xul @@ -5,12 +5,12 @@ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="itemPane.js"/> - <tabbox id="scholar-view-item" height="1000" style="margin-left: 5px;"> + <tabbox id="scholar-view-item" height="1000"> <tabs> - <tab label="Notes"/> - <tab label="Info"/> - <tab label="Tags"/> - <tab label="Files"/> + <tab label="&tabs.notes.label;"/> + <tab label="&tabs.info.label;"/> + <tab label="&tabs.tags.label;"/> + <tab label="&tabs.files.label;"/> </tabs> <tabpanels flex="1"> <vbox> @@ -19,15 +19,15 @@ <menulist flex="1" id="scholar-notes-menu" oncommand="ScholarItemPane.onNoteSelected();"> <menupopup/> </menulist> - <label value="-" class="clicky" onclick="ScholarItemPane.removeSelectedNote();"/> - <label value="+" class="clicky" onclick="ScholarItemPane.addNote();"/> + <label value="&scholar.minus;" class="clicky" onclick="ScholarItemPane.removeSelectedNote();"/> + <label value="&scholar.plus;" class="clicky" onclick="ScholarItemPane.addNote();"/> </hbox> <textbox id="scholar-notes-field" type="timed" timeout="1000" oncommand="ScholarItemPane.modifySelectedNote();" multiline="true" flex="1" onblur="ScholarItemPane.modifySelectedNote();"/> </vbox> - <vbox id="scholar-metadata" flex="1"> + <vbox id="scholar-info" flex="1"> <popupset> <popup id="creatorTypeMenu" position="after_start" oncommand="ScholarItemPane.modifyCreator(document.popupNode.getAttribute('fieldname').split('-')[1],'typeID',event.explicitOriginalTarget.getAttribute('typeid'));"/> </popupset> diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js @@ -136,9 +136,9 @@ var ScholarPane = new function() label.hidden = false; if(itemsView && itemsView.selection.count) - label.value = itemsView.selection.count + " items selected"; + label.value = Scholar.getString('pane.item.selected.multiple').replace('%1', itemsView.selection.count); else - label.value = "No items selected"; + label.value = Scholar.getString('pane.item.selected.zero'); } } @@ -218,9 +218,9 @@ var ScholarPane = new function() menu.childNodes[2].setAttribute('disabled', true); if(itemsView && itemsView.selection.count > 1) - menu.childNodes[2].setAttribute('label', 'Remove Selected Items...'); + menu.childNodes[2].setAttribute('label', Scholar.getString('pane.items.menu.remove.multiple')); else - menu.childNodes[2].setAttribute('label', 'Remove Selected Item...'); + menu.childNodes[2].setAttribute('label', Scholar.getString('pane.items.menu.remove')); } } diff --git a/chrome/chromeFiles/content/scholar/overlay.xul b/chrome/chromeFiles/content/scholar/overlay.xul @@ -26,22 +26,22 @@ <menuitem label="&toolbar.newCollection.label;" command="cmd_scholar_newCollection"/> <menuseparator/> <menuitem label="&toolbar.renameCollection.label;" oncommand="ScholarPane.renameSelectedCollection();"/> - <menuitem label="Remove Project..." oncommand="ScholarPane.deleteSelectedCollection();"/> + <menuitem label="&toolbar.removeCollection.label;" oncommand="ScholarPane.deleteSelectedCollection();"/> </popup> <popup id="scholar-itemmenu" onpopupshowing="ScholarPane.buildItemContextMenu();"> <menuitem label="&toolbar.newItem.label;" command="cmd_scholar_newItem"/> <menuseparator/> - <menuitem label="Remove Item..." oncommand="ScholarPane.deleteSelectedItem();"/> + <menuitem oncommand="ScholarPane.deleteSelectedItem();"/> </popup> </popupset> <toolbar align="end"> - <label value="Scholar" style="font-size: larger;"/> + <label value="Scholar" id="scholar-toolbar-name"/> <label value="1.0 Alpha"/> <spacer flex="1"/> <toolbarbutton class="tabs-closebutton" oncommand="ScholarPane.toggleDisplay()"/> </toolbar> <hbox flex="1"> - <vbox persist="width" width="200" style="min-width: 150px;"> + <vbox id="collections-pane" persist="width"> <toolbar> <toolbarbutton id="tb-collection-add" tooltiptext="&toolbar.newCollection.label;" command="cmd_scholar_newCollection"/> <toolbarbutton id="tb-collection-rename" tooltiptext="&toolbar.renameCollection.label;" oncommand="ScholarPane.renameSelectedCollection();" disabled="true"/> @@ -63,7 +63,7 @@ </tree> </vbox> <splitter id="scholar-tree-splitter" resizebefore="closest" resizeafter="closest"/> - <vbox persist="width" flex="1" style="min-width: 300px;"> + <vbox id="items-pane" persist="width" flex="1"> <toolbar align="center"> <toolbarbutton id="tb-add" tooltiptext="&toolbar.newItem.label;" type="menu"> <menupopup/> @@ -81,7 +81,7 @@ </hbox> <spacer flex="1"/> <toolbarbutton label="Save"/> - <toolbarbutton label="+"/> + <toolbarbutton label="&scholar.plus;"/> </hbox> <tree id="items-tree" context="scholar-itemmenu" @@ -137,7 +137,7 @@ </tree> </vbox> <splitter id="scholar-view-splitter" collapse="after" persist="state"><grippy/></splitter> - <box width="300" style="min-width: 300px;" pack="center" align="center"> + <box id="item-pane" pack="center" align="center"> <label id="scholar-view-selected-label"/> <tabbox id="scholar-view-item" hidden="true" flex="1"/> </box> @@ -168,6 +168,7 @@ <keyset id="mainKeyset"> <key id="key_openScholar" key="S" + oncommand="ScholarPane.toggleDisplay();" modifiers="shift accel" /> </keyset> </overlay> \ No newline at end of file diff --git a/chrome/chromeFiles/content/scholar/preferences.xul b/chrome/chromeFiles/content/scholar/preferences.xul @@ -12,7 +12,7 @@ <dialogheader id="header" title="&scholar.name;" description="&scholar.preferences.title;"/> -<checkbox id="autoUpdateBox" label="Automatically check for updated scrapers"/> +<checkbox id="autoUpdateBox" label="&scholar.preferences.autoUpdate.label;"/> </dialog> \ No newline at end of file diff --git a/chrome/chromeFiles/locale/en-US/scholar/preferences.dtd b/chrome/chromeFiles/locale/en-US/scholar/preferences.dtd @@ -1,2 +1,3 @@ <!ENTITY scholar.name "Scholar"> -<!ENTITY scholar.preferences.title "Scholar Preferences"> -\ No newline at end of file +<!ENTITY scholar.preferences.title "Scholar Preferences"> +<!ENTITY scholar.preferences.autoUpdate.label "Automatically check for updated scrapers"> diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd b/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd @@ -1,12 +1,12 @@ <!ENTITY scholar.name "Scholar"> -<!ENTITY metadata.label "Metadata"> -<!ENTITY notes.label "Notes"> +<!ENTITY tabs.info.label "Info"> +<!ENTITY tabs.notes.label "Notes"> +<!ENTITY tabs.tags.label "Tags"> +<!ENTITY tabs.files.label "Files"> -<!ENTITY metadata.creators.label "Creators"> -<!ENTITY metadata.edit.label "Edit"> -<!ENTITY metadata.cancel.label "Cancel"> -<!ENTITY metadata.save.label "Save"> +<!ENTITY scholar.minus "-"> +<!ENTITY scholar.plus "+"> <!ENTITY items.type_column "Type"> <!ENTITY items.title_column "Title"> @@ -20,12 +20,8 @@ <!ENTITY collections.name_column "Name"> <!ENTITY toolbar.newItem.label "New Item"> +<!ENTITY toolbar.removeItem.label "Remove Item..."> <!ENTITY toolbar.newCollection.label "New Project"> <!ENTITY toolbar.renameCollection.label "Rename Project..."> -<!ENTITY toolbar.search.label "Search:"> -<!ENTITY toolbar.metadata.label "Metadata"> -<!ENTITY toolbar.notes.label "Notes"> - -<!ENTITY closeCmd.label "Close"> -<!ENTITY closeCmd.accesskey "C"> -<!ENTITY closeCmd.commandkey "W"> -\ No newline at end of file +<!ENTITY toolbar.removeCollection.label "Remove Project..."> +<!ENTITY toolbar.search.label "Search:"> +\ No newline at end of file diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.properties b/chrome/chromeFiles/locale/en-US/scholar/scholar.properties @@ -1,13 +1,22 @@ -pane.items.delete = Are you sure you want to delete the selected item? -pane.items.delete.multiple = Are you sure you want to delete the selected items? pane.collections.delete = Are you sure you want to delete the selected project? pane.collections.delete.multiple = Are you sure you want to delete the selected projects? pane.collections.rename = Rename Project: - -pane.collections.library = Library +pane.collections.library = My Library pane.collections.untitled = Untitled Project -metadata.savechanges = Do you want to save changes to '%1'? +pane.items.delete = Are you sure you want to delete the selected item? +pane.items.delete.multiple = Are you sure you want to delete the selected items? +pane.items.menu.remove = Remove Selected Item... +pane.items.menu.remove.multiple = Remove Selected Items... + +pane.item.selected.zero = No items selected +pane.item.selected.multiple = %1 items selected + +pane.item.changeType = Are you sure you want to change the item type? Certain fields may be lost. +pane.item.notes.untitled = Untitled Note +pane.item.notes.delete.confirm = Are you sure you want to delete the selected note? +pane.item.notes.count.singular = %1 note +pane.item.notes.count.plural = %1 notes itemFields.title = Title itemFields.dateAdded = Date Added @@ -15,7 +24,6 @@ itemFields.dateModified = Modified itemFields.source = Source itemFields.rights = Rights itemFields.notes = Notes - itemFields.series = Series itemFields.volume = Volume itemFields.number = Number diff --git a/chrome/chromeFiles/skin/default/scholar/overlay.css b/chrome/chromeFiles/skin/default/scholar/overlay.css @@ -5,10 +5,11 @@ vbox #scholar-pane padding: 4px; } -tree #collections-tree +#collections-pane { - min-width: 100px; + min-width: 150px; max-width: 200px; + width: 150px; } #collections-tree treechildren::-moz-tree-image @@ -21,63 +22,65 @@ tree #collections-tree background: #f5f5f5; } -tree #items-tree +#items-pane { + min-width: 300px; +} +#item-pane +{ + width: 300px; + min-width: 300px; } -#tb-collection-add +#scholar-pane toolbar { - list-style-image: url('chrome://scholar/skin/toolbar-collection-add.png'); + border-bottom: none; + background: #f5f5f5; + height: 24px; } -#tb-collection-rename +#scholar-pane toolbar toolbarbutton { - list-style-image: url('chrome://scholar/skin/toolbar-collection-edit.png'); + } -#tb-collection-rename[disabled="true"] +#scholar-pane toolbar .toggler { - list-style-image: url('chrome://scholar/skin/toolbar-collection-edit-gray.png'); + margin: 4px; } -#tb-add +#scholar-toolbar-name { - list-style-image: url('chrome://scholar/skin/toolbar-item-add.png'); + font-size: larger; } -#scholar-pane toolbar +#tb-collection-add { - border-bottom: none; - background: #f5f5f5; - height: 24px; + list-style-image: url('chrome://scholar/skin/toolbar-collection-add.png'); } -#scholar-pane toolbar toolbarbutton +#tb-collection-rename { - + list-style-image: url('chrome://scholar/skin/toolbar-collection-edit.png'); } -#scholar-pane toolbar .toggler +#tb-collection-rename[disabled="true"] { - margin: 4px; + list-style-image: url('chrome://scholar/skin/toolbar-collection-edit-gray.png'); } -#tb-search +#tb-add { - width: 150px; + list-style-image: url('chrome://scholar/skin/toolbar-item-add.png'); } -#scholar-splitter +#tb-search { - border-top: none; - border-bottom: 1px solid #A3A3A3; - min-height: 4px; - max-height: 4px; - background: #f5f5f5 !important; + width: 150px; } -#scholar-metadata +#scholar-info { overflow: auto; } @@ -87,6 +90,10 @@ tree #items-tree -moz-user-focus: ignore; } +#scholar-view-item +{ + margin-left: 5px; +} #scholar-view-item tabpanels { padding: 8px 0px 0px 0px; @@ -106,4 +113,13 @@ tree #items-tree textbox[multiline="true"][type="timed"] { -moz-binding: url('chrome://scholar/content/customControls.xml#timed-textarea'); +} + +#scholar-splitter +{ + border-top: none; + border-bottom: 1px solid #A3A3A3; + min-height: 4px; + max-height: 4px; + background: #f5f5f5 !important; } \ No newline at end of file