diff --git a/chrome/content/zotero-platform/mac/overlay.css b/chrome/content/zotero-platform/mac/overlay.css index 001ef8be24..6d0d9eeeef 100644 --- a/chrome/content/zotero-platform/mac/overlay.css +++ b/chrome/content/zotero-platform/mac/overlay.css @@ -47,6 +47,54 @@ padding: 5px 1px 5px 11px; } + +/* + * The searchbox focus ring is incorrect in Yosemite pre-Fx34, so use the old searchbox shape + * (with code borrowed from the Fx Add-ons window and icons borrowed from the Fx searchbar). + * These styles, the 'oldsearchfield' assignment in zoteroPane.js, and the Search.png icons + * can be removed after Fx31 ESR. + * + * Note: This uses navigator.oscpu in zoteroPane.js to test for Yosemite instead of + * -moz-mac-yosemite-theme here because the latter isn't defined in Fx31. + */ +#zotero-pane-stack[oldsearchfield] textbox[type=search] { + margin: 0; + -moz-appearance: none; + padding: 3px 5px 2px; + border: 1px solid rgba(60,73,97,0.5); + border-radius: 10000px; + box-shadow: inset 0 1px 1px rgba(0,0,0,0.15), 0 1px rgba(255,255,255,0.25); + background-clip: padding-box; +} + +#zotero-pane-stack[oldsearchfield] textbox[type=search][focused] { + box-shadow: 0 0 1px -moz-mac-focusring inset, 0 0 4px 1px -moz-mac-focusring, 0 0 1.5px 1px -moz-mac-focusring, inset 0 1px 1px rgba(0,0,0,0.15); + border-color: -moz-mac-focusring; +} + +#zotero-pane-stack[oldsearchfield] textbox[type=search] > .textbox-input-box { + -moz-padding-start: 15px; + background: url("chrome://zotero/skin/mac/moz/Search.png") left no-repeat; + background-size: 14px; +} + +@media (min-resolution: 2dppx) { + #zotero-pane-stack[oldsearchfield] textbox[type=search] > .textbox-input-box { + background: url("chrome://zotero/skin/mac/moz/Search@2x.png") left no-repeat; + background-size: 14px; + } +} + +#zotero-pane-stack[oldsearchfield] textbox[type=search] > .textbox-input-box:-moz-locale-dir(rtl) { + background-position: right; +} + +#zotero-pane-stack[oldsearchfield] textbox[type=search] > .textbox-input-box > html|*.textbox-input::-moz-placeholder { + opacity: 1.0; +} +/* End searchbox focus fix */ + + #zotero-tb-search-menu-button { margin: -6px -2px -6px -16px; @@ -207,7 +255,7 @@ background-color: #8b8b8b !important; } -#zotero-collections-splitter[state=collapsed] +#zotero-collections-splitter[state=collapsed], #zotero-items-splitter[state=collapsed] { border-right: 1px; border-color: #A5A5A5; @@ -219,7 +267,7 @@ padding: 0; } -#zotero-collections-splitter[state=collapsed] > grippy +#zotero-collections-splitter[state=collapsed] > grippy, #zotero-items-splitter[state=collapsed] > grippy { -moz-appearance: none; background-image: url("chrome://zotero/skin/mac/vgrippy.png"); @@ -249,7 +297,7 @@ height: 8px; } -#zotero-tags-splitter > grippy:hover, #zotero-collections-splitter > grippy:hover +#zotero-tags-splitter > grippy:hover, #zotero-collections-splitter > grippy:hover, #zotero-items-splitter > grippy:hover { background-color:transparent; } diff --git a/chrome/content/zotero/advancedSearch.js b/chrome/content/zotero/advancedSearch.js index 00ae023c26..28317cc9fc 100644 --- a/chrome/content/zotero/advancedSearch.js +++ b/chrome/content/zotero/advancedSearch.js @@ -34,6 +34,7 @@ var ZoteroAdvancedSearch = new function() { this.itemsView = false; var _searchBox; + var _libraryID; function onLoad() { _searchBox = document.getElementById('zotero-search-box'); @@ -145,6 +146,7 @@ var ZoteroAdvancedSearch = new function() { this.onLibraryChange = function (libraryID) { + _libraryID = libraryID; document.getElementById('zotero-search-save').disabled = !Zotero.Libraries.isEditable(libraryID); } diff --git a/chrome/content/zotero/attachLink.js b/chrome/content/zotero/attachLink.js new file mode 100644 index 0000000000..c6fe5a3e56 --- /dev/null +++ b/chrome/content/zotero/attachLink.js @@ -0,0 +1,60 @@ +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2014 Center for History and New Media + George Mason University, Fairfax, Virginia, USA + http://zotero.org + + This file is part of Zotero. + + Zotero is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Zotero is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with Zotero. If not, see . + + ***** END LICENSE BLOCK ***** +*/ + +var Zotero_AttachLink = new function() { + function getAttachFileLabel() { + return window.opener.document + .getElementById('zotero-tb-attachment-add-file-link') + .label; + }; + + this.submit = function() { + var link = document.getElementById('zotero-attach-uri-input').value; + var message = document.getElementById('zotero-attach-uri-message'); + var cleanURI = Zotero.Attachments.cleanAttachmentURI(link, true); + + if (!cleanURI) { + message.textContent = Zotero.getString('pane.items.attach.link.uri.unrecognized'); + window.sizeToContent(); + document.getElementById('zotero-attach-uri-input').select(); + return false; + } + // Don't allow "file:" links, because using "Attach link to file" is the right way + else if (cleanURI.toLowerCase().indexOf('file:') == 0) { + message.textContent = Zotero.getString('pane.items.attach.link.uri.file', + [getAttachFileLabel()]); + window.sizeToContent(); + document.getElementById('zotero-attach-uri-input').select(); + return false; + } + else { + window.arguments[0].out = { + link: cleanURI, + title: document.getElementById('zotero-attach-uri-title').value + }; + return true; + } + }; +} \ No newline at end of file diff --git a/chrome/content/zotero/attachLink.xul b/chrome/content/zotero/attachLink.xul new file mode 100644 index 0000000000..fd899a8bd1 --- /dev/null +++ b/chrome/content/zotero/attachLink.xul @@ -0,0 +1,32 @@ + + + + + + + + + @@ -144,18 +126,20 @@