closes #218, Windows support for Word integration. this solution seems to work with both Word 2003 and Word 2007. i have not tested with earlier versions. Zotero.dot is the Windows verison; Zotero.dot.dmg is the Mac version. the only difference is the function call used to perform SOAP requests.

to get this to work right, you'll need the SOAP toolkit from http://www.microsoft.com/downloads/details.aspx?FamilyID=ba611554-5943-444c-b53c-c0a450b7013c&DisplayLang=en
I may replace the SOAP object with a simple XMLHTTP object, since that page says that the SOAP toolkit is deprecated.
This commit is contained in:
Simon Kornblith 2006-09-04 08:06:04 +00:00
parent 10f4b28c63
commit ed6650c4e7
6 changed files with 20 additions and 5 deletions

BIN
Zotero.dot Executable file

Binary file not shown.

View File

@ -43,6 +43,13 @@ var Scholar_File_Interface_Bibliography = new function() {
if(Scholar.isMac && document.getElementById("copy-to-clipboard")) { if(Scholar.isMac && document.getElementById("copy-to-clipboard")) {
document.getElementById("copy-to-clipboard").hidden = "true"; document.getElementById("copy-to-clipboard").hidden = "true";
} }
// move to center of screen
window.sizeToContent();
window.moveTo(
(self.screen.width-window.innerWidth)/2,
(self.screen.height-window.innerHeight)/2
);
} }
function acceptSelection() { function acceptSelection() {

View File

@ -458,7 +458,7 @@ Scholar_Ingester_Interface.Progress = new function() {
_progressWindow.sizeToContent(); _progressWindow.sizeToContent();
_progressWindow.moveTo( _progressWindow.moveTo(
window.screenX + window.outerWidth - _progressWindow.outerWidth - 30, window.screenX + window.outerWidth - _progressWindow.outerWidth - 30,
window.screenY + window.outerHeight - _progressWindow.outerHeight window.screenY + window.outerHeight - _progressWindow.outerHeight - 10
); );
} }

View File

@ -14,6 +14,13 @@ function doLoad()
collectionsView = new Scholar.CollectionTreeView(); collectionsView = new Scholar.CollectionTreeView();
document.getElementById('collections-tree').view = collectionsView; document.getElementById('collections-tree').view = collectionsView;
// move to center of screen
window.sizeToContent()
window.moveTo(
(self.screen.width-window.innerWidth)/2,
(self.screen.height-window.innerHeight)/2
);
} }
function doUnload() function doUnload()

View File

@ -337,7 +337,7 @@ Scholar.Integration.SOAP = new function() {
// get items // get items
var io = {dataIn: null, dataOut: null}; var io = {dataIn: null, dataOut: null};
window.openDialog('chrome://scholar/content/selectItemsDialog.xul','', window.openDialog('chrome://scholar/content/selectItemsDialog.xul','',
'chrome,popup,modal,centerscreen',io); 'chrome,popup,modal',io);
if(io.dataOut) { // cancel was not pressed if(io.dataOut) { // cancel was not pressed
var field = (io.dataOut.join(","))+"_"+Scholar.randomString(); var field = (io.dataOut.join(","))+"_"+Scholar.randomString();
@ -451,20 +451,21 @@ Scholar.Integration.SOAP = new function() {
function setDocPrefs(vars) { function setDocPrefs(vars) {
var io = new Object(); var io = new Object();
if(!vars || vars[0] == "!") { if(!vars || !vars[0] || vars[0] == "!") {
// no session ID; generate a new one // no session ID; generate a new one
var sessionID = Scholar.randomString(); var sessionID = Scholar.randomString();
var session = _generateSession(sessionID); var session = _generateSession(sessionID);
} else { } else {
// session ID exists // session ID exists
var sessionID = vars[0]; var sessionID = vars[0];
Scholar.debug(vars.toSource());
var session = _sessions[sessionID]; var session = _sessions[sessionID];
var originalStyle = session.styleID; var originalStyle = session.styleID;
io.style = originalStyle; io.style = originalStyle;
} }
window.openDialog('chrome://scholar/content/integrationDocPrefs.xul','', window.openDialog('chrome://scholar/content/integrationDocPrefs.xul','',
'chrome,popup,modal,centerscreen',io); 'chrome,popup,modal',io);
session.styleID = io.style; session.styleID = io.style;
var style = Scholar.Cite.getStyle(io.style); var style = Scholar.Cite.getStyle(io.style);

View File

@ -1,4 +1,4 @@
-- 71 -- 72
-- Set the following timestamp to the most recent scraper update date -- Set the following timestamp to the most recent scraper update date
REPLACE INTO "version" VALUES ('repository', STRFTIME('%s', '2006-08-31 22:44:00')); REPLACE INTO "version" VALUES ('repository', STRFTIME('%s', '2006-08-31 22:44:00'));