unedited citations should not have a "custom" attribute

This commit is contained in:
Simon Kornblith 2010-06-05 17:58:20 +00:00
parent f0f22009c4
commit 35e097b664

View file

@ -132,7 +132,7 @@ var Zotero_Citation_Dialog = new function () {
// show user-editable edited citation // show user-editable edited citation
if(io.citation.properties.custom) { if(io.citation.properties.custom) {
toggleEditor(io.citation.properties.custom); toggleEditor(io.citation.properties.custom);
io.citation.properties.custom = undefined; delete io.citation.properties.custom;
} }
_updateAccept(); _updateAccept();
@ -370,7 +370,7 @@ var Zotero_Citation_Dialog = new function () {
&& document.getElementById('editor').value != _originalHTML // and citation has been edited && document.getElementById('editor').value != _originalHTML // and citation has been edited
if(isCustom) { if(isCustom) {
var citation = document.getElementById('editor').value var citation = document.getElementById('editor').value;
} else { } else {
var citation = (io.citation.citationItems.length ? io.previewFunction() : ""); var citation = (io.citation.citationItems.length ? io.previewFunction() : "");
} }
@ -407,7 +407,8 @@ var Zotero_Citation_Dialog = new function () {
_getCitation(); _getCitation();
editor.readonly = !io.citation.citationItems.length; editor.readonly = !io.citation.citationItems.length;
editor.value = _originalHTML = (io.citation.citationItems.length ? io.previewFunction() : ""); editor.value = (io.citation.citationItems.length ? io.previewFunction() : "");
_originalHTML = editor.value;
} }
} }