www

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

commit 27b5505661cd450636bc5eb563fa548c3c73c22f
parent 328bc96da775a2b1dda93a8cfab8b750a2f421f5
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon,  3 Oct 2011 04:44:40 +0000

First run guidance for save icon


Diffstat:
Achrome/content/zotero/bindings/guidancepanel.xml | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mchrome/content/zotero/browser.js | 4++++
Mchrome/content/zotero/overlay.xul | 1+
Mchrome/locale/en-US/zotero/zotero.properties | 6++++--
Achrome/skin/default/zotero/zotero-new-z-48px.png | 0
Mchrome/skin/default/zotero/zotero.css | 5+++++
6 files changed, 78 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/bindings/guidancepanel.xml b/chrome/content/zotero/bindings/guidancepanel.xml @@ -0,0 +1,64 @@ +<?xml version="1.0"?> +<!-- + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2011 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 <http://www.gnu.org/licenses/>. + + ***** END LICENSE BLOCK ***** +--> + +<bindings xmlns="http://www.mozilla.org/xbl" + xmlns:xbl="http://www.mozilla.org/xbl" + xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + + <binding id="guidancepanel"> + <implementation> + <method name="show"> + <body> + <![CDATA[ + var about = this.getAttribute("about"); + var pref = "firstRunGuidanceShown."+about; + + var shown = false; + try { + shown = Zotero.Prefs.get(pref); + } catch(e) {}; + if(shown) return; + + var panel = document.getAnonymousNodes(this)[0], + forEl = this.getAttribute("for"); + panel.lastChild.textContent = Zotero.getString("firstRunGuidance."+about); + panel.openPopup(document.getElementById(forEl), + "after_start", 0, 0, false, true, null); + + Zotero.Prefs.set(pref, true); + ]]> + </body> + </method> + </implementation> + + <content> + <xul:panel orient="horizontal" style="max-width: 400px" type="arrow" align="top"> + <xul:image src="chrome://zotero/skin/zotero-new-z-48px.png" style="margin-right: 10px; width: 48px; height: 48px;"/> + <xul:description flex="1"></xul:description> + </xul:panel> + </content> + </binding> +</bindings> diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js @@ -421,6 +421,10 @@ var Zotero_Browser = new function() { Zotero_Browser.statusImage.src = captureIcon; Zotero_Browser.statusImage.tooltipText = tab.getCaptureTooltip(); Zotero_Browser.statusImage.hidden = false; + + Zotero_Browser.statusImage.addEventListener("load", function() { + document.getElementById("zotero-status-image-guidance").show(); + }, false); } else { Zotero_Browser.statusImage.hidden = true; } diff --git a/chrome/content/zotero/overlay.xul b/chrome/content/zotero/overlay.xul @@ -77,6 +77,7 @@ <image src="chrome://zotero/skin/treeitem-book.png" id="zotero-status-image" onclick="if(event.button === 0) Zotero_Browser.scrapeThisPage()" context="zotero-status-image-context" position="1" hidden="true"/> + <zoteroguidancepanel id="zotero-status-image-guidance" about="saveIcon" for="zotero-status-image"/> </hbox> <menupopup id="menu_ToolsPopup"> diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties @@ -747,4 +747,6 @@ standalone.addonInstallationFailed.title = Add-on Installation Failed standalone.addonInstallationFailed.body = The add-on "%S" could not be installed. It may be incompatible with this version of Zotero Standalone. connector.error.title = Zotero Connector Error -connector.standaloneOpen = Your database cannot be accessed because Zotero Standalone is currently open. Please view your items in Zotero Standalone. -\ No newline at end of file +connector.standaloneOpen = Your database cannot be accessed because Zotero Standalone is currently open. Please view your items in Zotero Standalone. + +firstRunGuidance.saveIcon = Zotero can recognize a reference on this page. Click this icon in the address bar to save this reference to your Zotero library. +\ No newline at end of file diff --git a/chrome/skin/default/zotero/zotero-new-z-48px.png b/chrome/skin/default/zotero/zotero-new-z-48px.png Binary files differ. diff --git a/chrome/skin/default/zotero/zotero.css b/chrome/skin/default/zotero/zotero.css @@ -143,6 +143,11 @@ dialog[resizable="true"] -moz-binding: url('chrome://zotero/content/bindings/resizabledialog.xml#resizabledialog'); } +zoteroguidancepanel +{ + -moz-binding: url('chrome://zotero/content/bindings/guidancepanel.xml#guidancepanel'); +} + label.zotero-text-link { -moz-binding: url('chrome://zotero/content/bindings/text-link.xml#text-link'); -moz-user-focus: normal;