diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index 174e6ef80..37b3030a9 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -176,6 +176,10 @@ var ZoteroOverlay = new function() */ if(makeVisible) { + if (!this.show5UpgradeMessage()) { + return false; + } + if (Zotero.locked) { var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); @@ -287,6 +291,23 @@ var ZoteroOverlay = new function() this.loadZoteroTab(); } } + + this.show5UpgradeMessage = function () { + if (Zotero.Prefs.get('skipUpgradeWarning')) { + return true; + } + var io = {}; + var win = window.openDialog( + "chrome://zotero/content/zotero5upgrade.xul", + "zotero5-upgrade", + "centerscreen,modal,width=620,height=570", + io + ); + if (io.dontShowAgain) { + Zotero.Prefs.set('skipUpgradeWarning', true); + } + return io.ok; + }; } window.addEventListener("load", function(e) { ZoteroOverlay.onLoad(e); }, false); diff --git a/chrome/content/zotero/zotero5Upgrade.xul b/chrome/content/zotero/zotero5Upgrade.xul new file mode 100644 index 000000000..bded547a8 --- /dev/null +++ b/chrome/content/zotero/zotero5Upgrade.xul @@ -0,0 +1,46 @@ + + + + + + + + + diff --git a/chrome/skin/default/zotero/zotero5upgrade.css b/chrome/skin/default/zotero/zotero5upgrade.css new file mode 100644 index 000000000..17de59817 --- /dev/null +++ b/chrome/skin/default/zotero/zotero5upgrade.css @@ -0,0 +1,23 @@ +.dialog-content-box { + overflow-y: auto; + background: white; +} + +div { + padding-left: 15px; + padding-right: 15px; +} + +h1 { + font-size: 24px; +} + +p { + font-size: 14px; + line-height: 1.5; +} + +a { + color: blue; + text-decoration: underline; +}