c92faace52
Fixed a number of creator-editing-related issues (mostly interface-side, with a little help from the data layer): - New row no longer disappears when clicking "+" and then clicking the existing or new creator (removed onselect="ScholarItemPane.loadPane(this.selectedIndex)" on the <deck> (from r371, with changelog "Individual tabs don't load their content unless selected"), which doesn't seem to be necessary as far as I can tell) - New row no longer disappears when changing creator before editing names (setting the creator type now triggers an Item.save() with an otherwise blank creator (now allowed by the data layer), which isn't entirely ideal but is probably OK for now) - Clicking the minus button on an unsaved row (i.e. one just created with the plus button) no longer throws an error (new method Item.hasCreatorAt(pos), and ScholarItemPane.removeCreator() just deletes the label directly, since it doesn't get a notify() event to reload the pane) - The plus button is disabled on unsaved rows, since allowing the user to create multiple unsaved rows and then edit one in the middle is problematic (and the other alternatives have their own problems); the minus button is also disabled on the default row that shows when there are no creators - Creator type is no longer reset when editing a name field - Name field is no longer erased when clicking directly on creator type popup and changing creator type without blurring textbox - Comma is appended to last name when switching from <textbox> to <label> without saving changes (before it was just appended to labels when the pane was loaded)
85 lines
No EOL
3.4 KiB
XML
85 lines
No EOL
3.4 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
Scholar
|
|
Copyright (C) 2006 Center for History and New Media, George Mason University, Fairfax, VA
|
|
http://chnm.gmu.edu/
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program 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 General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
-->
|
|
<!DOCTYPE window SYSTEM "chrome://scholar/locale/scholar.dtd">
|
|
|
|
<overlay
|
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
|
|
|
<script src="itemPane.js"/>
|
|
<deck id="scholar-view-item" flex="1">
|
|
<vbox id="scholar-info" flex="1">
|
|
<popupset>
|
|
<popup id="creatorTypeMenu" position="after_start"
|
|
oncommand="var otherFields = ScholarItemPane.getCreatorFields(document.popupNode.parentNode);
|
|
ScholarItemPane.modifyCreator(document.popupNode.getAttribute('fieldname').split('-')[1],
|
|
'typeID', event.explicitOriginalTarget.getAttribute('typeid'), otherFields)"/>
|
|
</popupset>
|
|
<hbox align="center">
|
|
<menulist id="editpane-type-menu" oncommand="ScholarItemPane.changeTypeTo(this.value)" flex="1">
|
|
<menupopup/>
|
|
</menulist>
|
|
<toolbarbutton id="tb-openurl" tooltiptext="&toolbar.openurl.label;" oncommand="ScholarItemPane.onOpenURLClick();"/>
|
|
</hbox>
|
|
<grid flex="1">
|
|
<columns>
|
|
<column/>
|
|
<column flex="1"/>
|
|
</columns>
|
|
<rows id="editpane-dynamic-fields" flex="1"/>
|
|
</grid>
|
|
</vbox>
|
|
<vbox flex="1">
|
|
<hbox align="center">
|
|
<label id="editpane-notes-label"/>
|
|
<button label="&item.add;" oncommand="ScholarItemPane.addNote();"/>
|
|
</hbox>
|
|
<grid flex="1">
|
|
<columns>
|
|
<column flex="1"/>
|
|
<column/>
|
|
</columns>
|
|
<rows id="editpane-dynamic-notes" flex="1"/>
|
|
</grid>
|
|
</vbox>
|
|
<vbox flex="1">
|
|
<hbox align="center">
|
|
<label id="editpane-attachments-label"/>
|
|
<button id="tb-item-attachments-add" type="menu" label="&item.add;">
|
|
<menupopup>
|
|
<menuitem class="menuitem-iconic" id="tb-item-attachments-link" label="&toolbar.attachment.linked;" oncommand="ScholarItemPane.addAttachmentFromDialog(true);"/>
|
|
<menuitem class="menuitem-iconic" id="tb-item-attachments-file" label="&toolbar.attachment.add;" oncommand="ScholarItemPane.addAttachmentFromDialog();"/>
|
|
<menuitem class="menuitem-iconic" id="tb-item-attachments-web-link" label="&toolbar.attachment.weblink;" oncommand="ScholarItemPane.addAttachmentFromPage(true);"/>
|
|
<menuitem class="menuitem-iconic" id="tb-item-attachments-snapshot" label="&toolbar.attachment.snapshot;" oncommand="ScholarItemPane.addAttachmentFromPage();"/>
|
|
</menupopup>
|
|
</button>
|
|
</hbox>
|
|
<grid flex="1">
|
|
<columns>
|
|
<column flex="1"/>
|
|
<column/>
|
|
</columns>
|
|
<rows id="editpane-dynamic-attachments" flex="1"/>
|
|
</grid>
|
|
</vbox>
|
|
<tagsbox id="editpane-tags" flex="1"/>
|
|
<seealsobox id="editpane-related" flex="1"/>
|
|
</deck>
|
|
</overlay> |