dojo.byId('acq-invoice-summary-toggle-on').onclick = function() {
openils.Util.show(dojo.byId('acq-invoice-summary'));
+
+ // Set the focus to the Vendor Invoice ID field. Might be a bit brittle since the
+ // element ID is generated dynamically by a dojo widget. It should be ok since it
+ // sets the focus to the first element which seems to be the logical place.
+ // This sets the focus when the invoice brief is displayed by the toggle button.
+ // It is also set a few line down for the initial page load.
+ document.getElementById('dijit_form_ValidationTextBox_0').focus();
openils.Util.hide(dojo.byId('acq-invoice-summary-small'));
}
parentNode : dojo.byId('acq-invoice-extra-copies-fund')
});
extraCopiesFund.build();
+
+ // Set the initial focus field. See comment above for additional notes
+ document.getElementById('dijit_form_ValidationTextBox_0').focus();
}
function renderInvoice() {