- Fix error saving attachments

- Increase default separate note window height
This commit is contained in:
Dan Stillman 2008-10-15 05:30:59 +00:00
parent 1d6dea45ec
commit ad5ac7ba64
2 changed files with 16 additions and 14 deletions

View file

@ -8,7 +8,7 @@
id="zotero-note-window" id="zotero-note-window"
orient="vertical" orient="vertical"
width="400" width="400"
height="250" height="350"
title="&zotero.items.menu.attach.note;" title="&zotero.items.menu.attach.note;"
persist="screenX screenY width height" persist="screenX screenY width height"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

View file

@ -1996,6 +1996,7 @@ Zotero.Item.prototype.getNote = function() {
var note = Zotero.DB.valueQuery(sql, this.id); var note = Zotero.DB.valueQuery(sql, this.id);
// Convert non-HTML notes on-the-fly // Convert non-HTML notes on-the-fly
if (note) {
if (!note.match(/^<div class="zotero-note znv[0-9]+">[\s\S]*<\/div>$/)) { if (!note.match(/^<div class="zotero-note znv[0-9]+">[\s\S]*<\/div>$/)) {
note = Zotero.Utilities.prototype.htmlSpecialChars(note); note = Zotero.Utilities.prototype.htmlSpecialChars(note);
note = '<p>' note = '<p>'
@ -2010,6 +2011,7 @@ Zotero.Item.prototype.getNote = function() {
// Don't include <div> wrapper when returning value // Don't include <div> wrapper when returning value
note = note.replace(/^<div class="zotero-note znv[0-9]+">([\s\S]*)<\/div>$/, '$1'); note = note.replace(/^<div class="zotero-note znv[0-9]+">([\s\S]*)<\/div>$/, '$1');
}
this._noteText = note ? note : ''; this._noteText = note ? note : '';