Add incompatible version message to Firefox
This commit is contained in:
parent
64b4d3fd47
commit
c24aad3af4
3 changed files with 48 additions and 1 deletions
46
chrome/content/zotero/xpcom/connector/connector_firefox.js
Normal file
46
chrome/content/zotero/xpcom/connector/connector_firefox.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
***** 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 *****
|
||||
*/
|
||||
|
||||
Zotero.Connector_Browser = new function() {
|
||||
var _incompatibleVersionMessageShown;
|
||||
|
||||
/**
|
||||
* Called if Zotero version is determined to be incompatible with Standalone
|
||||
*/
|
||||
this.onIncompatibleStandaloneVersion = function(zoteroVersion, standaloneVersion) {
|
||||
if(_incompatibleVersionMessageShown) return;
|
||||
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].
|
||||
createInstance(Components.interfaces.nsIPromptService);
|
||||
ps.alert(null,
|
||||
Zotero.getString("connector.error.title"),
|
||||
'Zotero '+zoteroVersion+' is incompatible with the running '+
|
||||
'version of Zotero Standalone'+(standaloneVersion ? " ("+standaloneVersion+")" : "")+
|
||||
'. Zotero Connector will continue to operate, but functionality that relies upon '+
|
||||
'Zotero Standalone may be unavaliable.\n\n'+
|
||||
'Please ensure that you have installed the latest version of these components. See '+
|
||||
'http://www.zotero.org/support/standalone for more details.');
|
||||
_incompatibleVersionMessageShown = true;
|
||||
}
|
||||
}
|
|
@ -426,7 +426,7 @@ Zotero.Server.Connector.IncompatibleVersion.prototype = {
|
|||
Zotero.Integration.activate();
|
||||
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].
|
||||
createInstance(Components.interfaces.nsIPromptService);
|
||||
ps.confirm(null,
|
||||
ps.alert(null,
|
||||
Zotero.getString("connector.error.title"),
|
||||
Zotero.getString("integration.error.incompatibleVersion2",
|
||||
["Standalone "+Zotero.version, "Connector", "2.1.999"]));
|
||||
|
|
|
@ -110,6 +110,7 @@ const xpcomFilesConnector = [
|
|||
'connector/translate_item',
|
||||
'connector/translator',
|
||||
'connector/connector',
|
||||
'connector/connector_firefox',
|
||||
'connector/cachedTypes',
|
||||
'connector/repo',
|
||||
'connector/typeSchemaData'
|
||||
|
|
Loading…
Add table
Reference in a new issue