Back, Delete and Save Buttons in Admin Panels not appearing on first click

The 'Back', 'Delete' and 'Save' buttons on the Admin panel don't appear if you go straight into a DataObject item,

You needed to click 'Search' first, this added an extra item to the history array, have changed the condition for the number of items in this array before the buttons appear, now only 1 item needs to be in the Array
This commit is contained in:
oilee80 2013-10-14 17:33:39 +01:00 committed by Ingo Schommer
parent c8fe8f793e
commit 4ec85a412f
1 changed files with 2 additions and 2 deletions

View File

@ -364,7 +364,7 @@ $(document).ready(function() {
if(!this.future || !this.future.length) {
$('#Form_EditForm_action_goForward, #Form_ResultsForm_action_goForward').hide();
}
if(!this.history || this.history.length <= 1) {
if(!this.history || this.history.length < 1) {
$('#Form_EditForm_action_goBack, #Form_ResultsForm_action_goBack').hide();
// we don't need save and delete button on result form
@ -472,4 +472,4 @@ function prepareAjaxActions(actions, formName, tabName) {
// @todo HACK Overwrites LeftAndMain.js version of this method to avoid double form actions
// (by new jQuery and legacy prototype)
return false;
}
}