First run guidance for save icon
This commit is contained in:
parent
328bc96da7
commit
27b5505661
64
chrome/content/zotero/bindings/guidancepanel.xml
Normal file
64
chrome/content/zotero/bindings/guidancepanel.xml
Normal file
|
@ -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>
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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.
|
||||
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.
|
BIN
chrome/skin/default/zotero/zotero-new-z-48px.png
Normal file
BIN
chrome/skin/default/zotero/zotero-new-z-48px.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user