zotero/chrome/chromeFiles/content/scholar/itemPane.xul

76 lines
3 KiB
Text
Raw Normal View History

<?xml version="1.0"?>
<!--
Zotero
Copyright (C) 2006 Center for History and New Media, George Mason University, Fairfax, VA
http://chnm.gmu.edu/
-->
<!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" onselect="if (this.selectedIndex!==''){ ScholarItemPane.loadPane(this.selectedIndex) }">
<vbox id="scholar-info" flex="1">
<popupset>
Fixes #179, adding a new creator then clicking an existing creator makes the creator field disappear 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)
2006-08-14 10:02:00 +00:00
<popup id="creatorTypeMenu" position="after_start"
oncommand="var otherFields = ScholarItemPane.getCreatorFields(document.popupNode.parentNode);
var typeID = event.explicitOriginalTarget.getAttribute('typeid');
document.popupNode.setAttribute('value',
Scholar.getString('creatorTypes.' + Scholar.CreatorTypes.getName(typeID)) + ':');
Fixes #179, adding a new creator then clicking an existing creator makes the creator field disappear 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)
2006-08-14 10:02:00 +00:00
ScholarItemPane.modifyCreator(document.popupNode.getAttribute('fieldname').split('-')[1],
'typeID', typeID, otherFields)"/>
</popupset>
Cross-posting to BC for discussion: http://chnm.grouphub.com/projects/310105/msg/cat/2114872/3538662/comments Changes as per my discussions with Dan: - Separated snapshot functionality into two individual buttons, Create New Item From Current Page and Take Snapshot of Current page - Updated schema to support primary, secondary and hidden item types (and future user customizations) - Reorganized New Item menu, moving secondary items into sub-menu - Removed ability to create link attachments, since it never really made much sense -- will simply use the webpage item type instead. Underlying functionality still exists for the time being, as people have existing links in their libraries--I think we're gonna have to just warn beta testers and delete them in a transition step, as converting nested links really wouldn't be worth the effort. - Moved file link/add functions into new item menu and removed attachment drop-down - Large, prominent View and Locate buttons in edit pane for going to an associated URL and looking up in OpenURL, respectively -- buttons gray out as appropriate - New Item from Page stores the URL and access date (Item.save() checks for the string "CURRENT_TIMESTAMP" for accessDate and doesn't bind it as a string) - "Website" to "Web Page" (do we prefer "Webpage"? they both look a bit funky in uppercase) More coming. Bugs/Known Issues: - Since snapshots from the toolbar are now top-level in the current collection, there needs to be a way to drag them into items - The camera icon for adding snapshots, despite being a famfamfam icon, really doesn't read too well (or perhaps just clashes with the rest of our icons). Anybody have a better one? (It also may be able to just be lightened up a bit.) - Trying the large View/Locate buttons after discussions with Dan, but this approach may not work -- 1) a large View button for the URL makes a lot less sense when you have a parent item with a child snapshot, since people will end up clicking it all the time when they really want to view the snapshot, and 2) the Locate button is awfully big for something that only applies to certain types of items, may not get used very often when it does, and probably won't work when it is - The access date is stored in UTC and displayed with toLocaleString() like Date Added and Date Modified, but, unlike those two, it's also user-editable. This is clearly a problem. Probably need to parse to Date on blur() with strToDate() and insert as UTC, discarding anything left over. - Item type itself is still "website" -- should probably change that while we still can Closes #253, OpenURL arrow should provide visual feedback on mouseover and/or look more button-like Addresses #304, change references to "website" to "web page" Addresses #207, openurl arrow functionality
2006-09-27 08:12:09 +00:00
<hbox align="center">
<button id="tb-go-to-url" label="&toolbar.goToURL.label;" tooltiptext="&toolbar.goToURL.tooltip;" flex="1" oncommand="ScholarItemPane.onGoToURLClick();" disabled="false"/>
<button id="tb-openurl" label="&toolbar.openURL.label;" tooltiptext="&toolbar.openURL.tooltip;" flex="1" oncommand="ScholarItemPane.onOpenURLClick();"/>
</hbox>
<hbox align="center">
<menulist id="editpane-type-menu" oncommand="ScholarItemPane.changeTypeTo(this.value)" flex="1">
<menupopup/>
</menulist>
</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"/>
2006-08-02 17:57:16 +00:00
<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-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>