var df = <datafield tag="" ind1="" ind2="" xmlns="http://www.loc.gov/MARC21/slim"><subfield code="" /></datafield>;
- index.parent().insertChildAfter( index, df );
+ if (event.shiftKey) { // ctrl+shift+enter
+ index.parent().insertChildBefore( index, df );
+ } else {
+ index.parent().insertChildAfter( index, df );
+ }
var new_df = marcDatafield(df);
if (row.parentNode.lastChild === row) {
row.parentNode.appendChild( new_df );
} else {
- row.parentNode.insertBefore( new_df, row.nextSibling );
+ if (event.shiftKey) { // ctrl+shift+enter
+ row.parentNode.insertBefore( new_df, row );
+ } else {
+ row.parentNode.insertBefore( new_df, row.nextSibling );
+ }
}
new_df.firstChild.focus();
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xhtml="http://www.w3.org/1999/xhtml" onload="my_init()">
+<script src="/xul/server/util/sprintf.js" type="application/x-javascript; e4x=1"/>
<script src="marcedit.js" type="application/x-javascript; e4x=1"/>
<script src="/opac/common/js/CGI.js" type="application/x-javascript; e4x=1"/>
<checkbox persist="checked" accesskey='s' label="Stack subfields" onclick="stackSubfields(this);" checked="false" id="stackSubfields"/>
<button label="Validate" oncommand="validateAuthority(this);"/>
<button id="save-button"/>
- <button label="Help" oncommand="alert('Add Row: CTRL+Enter\nAdd Subfield: CTRL+D\nRemove Row: CTRL+Del\nRemove Subfield: SHIFT+Del\nCreate/Replace 006: CTRL+F6\nCreate/Replace 007: CTRL+F7\nCreate/Replace 008: CTRL+F8\n');"/>
+ <button label="Help" oncommand="alert('Add Row: CTRL+Enter\nInsert Row: CTRL+Shift+Enter\nAdd Subfield: CTRL+D\nRemove Row: CTRL+Del\nRemove Subfield: SHIFT+Del\nCreate/Replace 006: CTRL+F6\nCreate/Replace 007: CTRL+F7\nCreate/Replace 008: CTRL+F8\n');"/>
</hbox>
</groupbox>