Use zotero-text-link instead of text-link, so that we can attach a custom binding that handles text links externally, which we need so that we can make links in docShells work in Standalone.

This commit is contained in:
Simon Kornblith 2011-08-25 06:16:15 +00:00
parent 0a71d9219b
commit 59d7050bba
6 changed files with 23 additions and 13 deletions

View file

@ -201,7 +201,7 @@
urlField.onclick = function (event) {
ZoteroPane_Local.loadURI(this.value, event)
};
urlField.className = 'text-link';
urlField.className = 'zotero-text-link';
}
else {
urlField.className = '';

View file

@ -821,7 +821,7 @@ function updatePDFToolsStatus() {
else if (part.type == 'link') {
var elem = document.createElement('label');
elem.setAttribute('value', part.text);
elem.setAttribute('class', 'text-link');
elem.setAttribute('class', 'zotero-text-link');
for (var key in part.attributes) {
elem.setAttribute(key, part.attributes[key]);
@ -851,7 +851,7 @@ function updatePDFToolsStatus() {
else if (part.type == 'link') {
var elem = document.createElement('label');
elem.setAttribute('value', part.text);
elem.setAttribute('class', 'text-link');
elem.setAttribute('class', 'zotero-text-link');
for (var key in part.attributes) {
elem.setAttribute(key, part.attributes[key]);

View file

@ -28,6 +28,7 @@
<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
<?xml-stylesheet href="chrome://zotero/skin/preferences.css"?>
<?xml-stylesheet href="chrome://zotero/skin/zotero.css"?>
<!--
@ -210,9 +211,9 @@ To add a new preference:
<hbox style="width:2em"/>
<vbox>
<label class="text-link" value="&zotero.preferences.sync.createAccount;" href="http://zotero.org/user/register"/>
<label class="zotero-text-link" value="&zotero.preferences.sync.createAccount;" href="http://zotero.org/user/register"/>
<separator class="thin"/>
<label class="text-link" value="&zotero.preferences.sync.lostPassword;" href="http://zotero.org/user/lostpassword"/>
<label class="zotero-text-link" value="&zotero.preferences.sync.lostPassword;" href="http://zotero.org/user/lostpassword"/>
</vbox>
</hbox>
@ -222,7 +223,7 @@ To add a new preference:
<checkbox label="&zotero.preferences.sync.syncAutomatically;" preference="pref-sync-autosync"/>
</hbox>
<label class="text-link" style="margin-top:.7em; margin-left: 0" value="&zotero.preferences.sync.about;" href="http://www.zotero.org/support/sync"/>
<label class="zotero-text-link" style="margin-top:.7em; margin-left: 0" value="&zotero.preferences.sync.about;" href="http://www.zotero.org/support/sync"/>
</groupbox>
@ -314,10 +315,10 @@ To add a new preference:
<separator class="thin"/>
<vbox>
<label class="text-link" style="margin-top:.3em; margin-left: 0" value="&zotero.preferences.sync.fileSyncing.about;" href="http://zotero.org/support/file_sync"/>
<label class="zotero-text-link" style="margin-top:.3em; margin-left: 0" value="&zotero.preferences.sync.fileSyncing.about;" href="http://zotero.org/support/file_sync"/>
<hbox id="storage-terms" style="margin-top: .4em" align="center">
<label>&zotero.preferences.sync.fileSyncing.tos1;</label>
<label class="text-link" href="http://www.digitalscholar.org/z_terms" value="&zotero.preferences.sync.fileSyncing.tos2;"/>
<label class="zotero-text-link" href="http://www.digitalscholar.org/z_terms" value="&zotero.preferences.sync.fileSyncing.tos2;"/>
<label>&zotero.preferences.period;</label>
</hbox>
</vbox>
@ -329,7 +330,7 @@ To add a new preference:
<!-- This doesn't wrap without an explicit width, for some reason -->
<description width="45em">The following operations are for use only in rare, specific situations and should not be used for general troubleshooting.
In many cases, resetting will cause additional problems.
See <label style="margin-left: 0; margin-right: 0" class="text-link" href="http://zotero.org/support/kb/sync_reset_options">Sync Reset Options</label> for more information.</description>
See <label style="margin-left: 0; margin-right: 0" class="zotero-text-link" href="http://zotero.org/support/kb/sync_reset_options">Sync Reset Options</label> for more information.</description>
<radiogroup id="zotero-reset-sync-group" oncommand="handleSyncResetSelect(this)">
<groupbox>
@ -573,7 +574,7 @@ To add a new preference:
&zotero.preferences.cite.wordProcessors.noWordProcessorPluginsInstalled;
</label>
<checkbox label="&zotero.preferences.cite.wordProcessors.useClassicAddCitationDialog;" preference="pref-cite-useClassicAddCitationDialog"/>
<label id="wordProcessors-getWordProcessorPlugins" class="text-link" href="&zotero.preferences.cite.wordProcessors.getPlugins.url;" value="&zotero.preferences.cite.wordProcessors.getPlugins;"/>
<label id="wordProcessors-getWordProcessorPlugins" class="zotero-text-link" href="&zotero.preferences.cite.wordProcessors.getPlugins.url;" value="&zotero.preferences.cite.wordProcessors.getPlugins;"/>
</tabpanel>
<tabpanel orient="vertical" id="styles">
<groupbox flex="1">
@ -591,7 +592,7 @@ To add a new preference:
</tree>
<separator class="thin"/>
<hbox align="center" flex="1" height="40">
<label class="text-link" href="http://www.zotero.org/styles/" value="&zotero.preferences.export.getAdditionalStyles;" flex="1"/>
<label class="zotero-text-link" href="http://www.zotero.org/styles/" value="&zotero.preferences.export.getAdditionalStyles;" flex="1"/>
<button disabled="true" id="styleManager-delete" label="-" onclick="deleteStyle()"/>
<button label="+" onclick="addStyle()"/>
</hbox>

View file

@ -81,7 +81,7 @@ To add a new preference:
image="chrome://zotero/skin/prefs-proxies.png" position="6">
<description width="45em" style="font-size: 12px">
&zotero.preferences.proxies.desc_before_link;
<label class="text-link" href="http://www.zotero.org/support/proxies"
<label class="zotero-text-link" href="http://www.zotero.org/support/proxies"
value="&zotero.preferences.proxies.desc_link;"/>
&zotero.preferences.proxies.desc_after_link;
</description>

View file

@ -220,7 +220,7 @@ Zotero.ProgressWindow = function(_window){
else if (part.type == 'link') {
var elem = _progressWindow.document.createElement('label');
elem.setAttribute('value', part.text);
elem.setAttribute('class', 'text-link');
elem.setAttribute('class', 'zotero-text-link');
for (var i in part.attributes) {
elem.setAttribute(i, part.attributes[i]);
}

View file

@ -143,6 +143,15 @@ dialog[resizable="true"]
-moz-binding: url('chrome://zotero/content/bindings/resizabledialog.xml#resizabledialog');
}
label.zotero-text-link {
-moz-binding: url('chrome://zotero/content/bindings/text-link.xml#text-link');
-moz-user-focus: normal;
color: -moz-nativehyperlinktext;
text-decoration: underline;
border: 1px solid transparent;
cursor: pointer;
}
.zotero-clicky
{
-moz-border-radius: 6px;