- Use default background for Zotero pane and get along with custom styles a bit more
- Reduce padding in tag selector
- Reduce margins around trees, reducing space between panes a bit
- Hide splitter below collections pane when tag selector is hidden
I can't find any way to detect if the value is actually cropped with an ellipsis, so the best we can do is not display the ellipsis if the value is blank--if the value is shorter than the crop width but not empty, the ellipsis will still display.
Abstract displays in metadata pane as a cropped one-line field by default; clicking the 'Abstract' label toggles between the cropped field and an expanded view
Some problems with import/export: https://www.zotero.org/trac/ticket/537
Refs #537
Add font size support in external windows
Windows can use the font size pref by including a line like the following in their init script:
Zotero.setFontSize(rootElement);
rootElement should be a XUL element that surrounds all content (but not a <window> or <dialog> or anything that doesn't have a 'style' property)
Windows with treeviews also need to include zotero.css:
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
Utilities should also do this for any GUIs they create.
URL label is now clickable -- has cursor feedback on hover but still needs a visual indicator of some sort
Other changes:
- Can now load snapshots and pages in new tab/window by using the standard Firefox modifier keys while clicking the View button or the URL field
- View button in metadata pane now displays "View" or "View Snapshot" as appropriate
- Better detection of invalid snapshots when deciding whether to use "View" or "View Snapshot"
- Non-HTML snapshots viewed via the View button are loaded using the standard attachment logic rather than just window.loadURI()
- Added green Go arrows to standalone attachment view/show buttons
Method changes:
- ZoteroPane.loadURI(uri, event, data) - (new) Load URI with standard Firefox mod key support; passing an object with 'attachmentID' property triggers annotation mode
- ZoteroPane.viewAttachment(attachmentID, event) - (new)
- ZoteroPane.viewSelectedAttachment(event) - Now takes event param
- Zotero_Browser.annotateThisPage(id) changed to annotatePage(id, [browser]) to handle background tab loading
Addresss #352, Make sure data layer doesn't allow bad data via the API
Access date field is now human-friendly. Also enforcing SQL date form for the field in the DB and discarding bad data passed via setField().
Closes#453, Check if any fields will actually be discarded on item type change before giving warning
Refs #530, Add base field conversion to translation level
Added mechanism for linking item type fields via base fields, e.g. publisher => label in audioRecording
New methods:
Item.getFieldsNotInType(itemTypeID, allowBaseConversion)
ItemFields.getLocalizedString(itemTypeID, field)
ItemFields.isBaseField(fieldID)
ItemFields.getFieldIDFromTypeAndBase(itemType, baseField)
ItemFields.getBaseIDFromTypeAndField(itemType, typeField)
ItemFields.getTypeFieldsFromBase(baseField)
Currently only the publisher fields are mapped -- I need more feedback on #346 before I implement the others (specifically on whether or not all these sorts of fields should be done as distinct fields or whether some should just be localized strings (in which case they'll autocomplete but not show up separately as search conditions))
Also added 'university' as distinct publisher field for thesis
Values of equivalent fields are now preserved when switching between item types (e.g. the 'studio' value becomes the 'label' value when switching between videoRecording and audioRecording), and the pop-up is much smarter--it will only prompt you if fields will in fact be lost, and it will list the fields that would be deleted.
Not finished:
- Searching for base fields doesn't yet search the type-specific fields, as Elena requested
- import/export/bib should be updated to use the ItemFields base conversion methods where appropriate -- data coming from the 'publisher' field from translators, for example, should be put into the appropriate type-specific field.
Switched all private calls of privileged methods to use 'this.' instead
No substantive changes
- This line, and those below, will be ignored--
M overlay.xul
M overlay.js
All the former Zotero.DB methods are now part of an instantiable Zotero.DBConnection object, and Zotero.DB is just one instance of it. Utilities can create and access a new SQLite database within the Zotero data folder by instantiating the DBConnection object:
this.DB = new Zotero.DBConnection('myutility');
Utilities have access to everything the DB layer provides, including automatic backup and restore of databases. Utility writers are on their own for schema management, at least for now.
Also:
- Cleared non-English DB restore localized strings after change.
- Disabled shutdown observer in Zotero object after moving DB backup code to DB layer
Closes#450, encyclopedia article and dictionary entry types
Language might want some special properties (Dublin Core recommends "en" or "en-us"-style values as a best practice)
Also reordered some fields
Sent as a fourth parameter to notify() -- parameter is an array of objects (in the same order as the ids) that currently contain a single property, 'old', which holds the toArray() object
Copies are not sent with 'modify' when it's only meant to refresh the UI and there's another trigger that covers the data change (e.g. removing a tag from an item sends both an item modify and an item-tag add, but the modify doesn't get a pre-change copy of the item since any consumers that care should just monitor item-tag)
Also:
- Removed Notifier.enable()/disable()
- Notifier no longer sends modify() if item already deleted
- New methods: Collection.toArray(), Zotero.Tags.toArray(tagID)
- Removed a few extraneous triggers
Simon, reopen if this doesn't fix the problem you were referring to.
(Also removes Notifier.enable()/disable() from its use in Item.erase() while we're at it.)
Also:
- Changed default Zotero pane min-height to 32px, which lets you shrink it to just the controls -- it would be better if we had a notification popup for the various non-translator save functions, since this way there's no feedback when you click the buttons, but at least it's possible. A dedicated mode with a keyboard shortcut would probably be better.
- Fixed bug (I think) whereby resizing the Z pane downward after resizing the tag selector up and then down sometimes caused the Z pane to stay at a fixed size and get pushed below the bottom
references #502, Special handling for automatic tags (support is now enabled, but not tag type is not maintained during RDF export)
references #517, ScienceDirect translator fails (I fixed the issue I had translating this page, but I think the reported error may be different)
closes#376, Bibliography export order jumbled
closes#482, Tag selector does not refresh on import/delete
closes#499, zotero RDF import of attachments has a flaw
closes#500, Improve COinS handling of other item types
- fixes an issue with importing directory hierarchy
- fixes an issue where the SpringerLink translator could fail to recognize a scrapable resource
- fixes an issue where the Nature translator could fail to retrieve an associated PDF
feel free to push the updates to the SpringerLink and Nature translators to the repository; theoretically, the RDF translator should be backwards-compatible too, but I'd like to test it with b3 before potentially breaking functionality.
And they said it would never happen.
Doesn't yet support dragging items to other windows, etc., but you can double-click to focus the item in the most recent Zotero pane. You can also save the search as...a saved search, which means that theoretically we could get rid of the now-redundant "New Saved Search" icon.
== Other/related changes ==
Search dialog:
- Better keyboard handling (focus condition menu by default, Enter to trigger command (e.g. search in the Advanced Search window), Shift-Enter to add new row)
Zotero.Search:
- Zotero.Search.clone() -- return copy of search
- Zotero.Search.getSearchConditions() now returns copy of conditions
itemTreeView:
- Always sort by the first column if no sort column set; removed isSorted() logic, since isSorted() now always returns true
- Made itemsTreeView.refresh() call rowCountChanged, since there were cases in which the tree could end up looking for nonexistent rows after they'd been removed
- selectItem() now takes a second parameter, expand, to open the selected item if it's a container
- selectItem() now tries to get the selected item at least slightly away from the bottom (since ensureRowIsVisible does only the bare minimum) and also tries to get the parent item in view when scrolling upwards to make a child item visible
- Moved getSelectedItems() logic into the treeview instead of overlay.js
Closes ##399, provide ability to view columns in middle pane for any field that shows up in all item types
Added Publisher and Date column options
Note that new columns will be out of order until Restore Natural Order is selected
Also:
- Switched around column XUL ids to make things easier
- Automatic tags now appear in orange; tooltip says either "User-added tag" or "Automatically added tag"
- New menu in tag selector to toggle automatic tags
- User and automatic tags are combined in tag selector, so renaming/deleting a tag will affect both user and automatic, regardless of view mode
- Editing a tag makes it a user tag, as does adding an identical user tag to an item (rather than creating a second one)
- ingester/export will need to be adjusted to add automatic tags
Changed:
Item.addTag(tag) => addTag(tag, type)
Item.getTags() - now returns 'id', 'tag', 'type'
Item.toArray() - tags now include 'type' property (from Item.getTags())
Tags.getID(tag) => getID(tag, type)
Tags.getAll() => getAll([types]) - types is an optional array of tagTypes to fetch; now returns objects with 'tag' and 'type' properties
Tags.getAllWithinSearch(search) => Tags.getAllWithinSearch(search, [types]) - now returns object with 'tag'/'type'
Added:
Tags.get(tagID) - returns object with 'tag' and 'type' properties
Tags.getIDs(tag) - returns all tagIDs for this tag (of all types)
Tags.getType(tag) - returns array of tag types matching given tag
For type property, 0 == user, 1 == automatic
It ain't pretty, but (I think) it works.
Also:
- Fulltext content search should handle ANY/ALL modes better, but that needs some more testing.
- Tag selector now properly takes fulltext content search conditions into account when filtering to scope.
- Added Zotero.Search.hasPostSearchFilter(), since getSQL() isn't sufficient with post-search filters.
Also:
- Clicking OK on rename dialog with "Rename associated file" checked but without changing the filename would delete the original file.
- Add "Show File" button for snapshots
- Added a wrapper around nsIMIMEService.getPrimaryExtension() that works a bit more sanely (doesn't throw an error on failure, enforce a couple hard-coded extensions (PDF and HTML) even on Linux (where the MIME service one isn't implemented))
- Use the extension we got back from our improved getPrimaryExtension(), even if the filename already had one
- If no filename, use last part of path before restorting to hostname
unfortunately, EBSCO exports still aren't working for me, but it doesn't seem to be Zotero's fault; i'm just not getting any RIS output to begin with. i'll give this another glance later today.
New methods, Item.renameAttachmentFile(newName, force) -- _force_ forces overwrite of an existing file
For the moment, implemented in the UI via a checkbox in the attachment title rename dialog (accessible by clicking on the title in the right pane) to rename the associated file as well -- this might be replaced by the upcoming keep-filenames-in-sync-with-attachment-titles feature, but it's probably fine for Beta 3.
Also new:
- Zotero.Attachments.getPath(file, linkMode) to get a relative or persistent path as appropriate given the link mode
New methods:
Item.removeAllRelated()
Item.removeAllTags()
Also:
- Tag selector didn't initialize properly if it was closed when Firefox was started
- Items pane would lose open state of items and current scroll position when an item was edited while the tag selector was open -- added save/rememberOpenState() and save/rememberFirstRow() to fix this, and these could also fairly easily be used to remember the open state while switching between collections
closes#441, In-page annotations of snapshots
testers: please check pages containing both annotations and highlights to make sure everything works correctly
This makes the quicksearch considerably more useful, as you can search for a child item in the library, select it, and then clear the search to view the item in context. (Works for multiple items as well, even of different parents.)
Add Document item type. Just the type -- no magical properties for now.
Fields: title, publisher, date, and the globals (callNumber, archiveLocation, repository, rights, url, accessDate, extra).
Creator types: author, contributor, editor, translator, reviewedAuthor (should these all be here?)
(Moved redundant string manipulation out of the sort() callback. I put it there by mistake in r831 when namespacing all the XUL ids right before b2.r2.)
There might be some regressions from this, but it seems to work fine.
Also:
- Fixed JS strict warnings in popup note window
- Use Zotero.Notes.add() when using toolbar button instead of a two-stage save with ZP.newItem('note')