Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0023597
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] A. Platformminoralways2013-04-19 18:092013-04-23 16:57
ReporterdbazView Statuspublic 
Assigned Todbaz 
PriorityhighResolutionfixedFixed in Version3.0MP23
StatusclosedFix in branchFixed in SCM revisionc09f69635bed
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0023597: Add capabilities to overwritte a particular existing button of the toolbar

DescriptionAdd capabilities to overwritte a particular existing button of the toolbar.

The fix should not force to update any existing module, so the function 'registerButton' should behave as before with the new property 'overwriteIfExists' as null
Steps To ReproduceTo test the new functionality, you can just write this into the Firebug console. After it, open a tab, modify any record and press "Save" button.


NEW_SAVE_BUTTON = {
  action: function () {
    alert('Hello, this is the new save button functionality');
  },
  disabled: true,
  buttonType: 'save',
  prompt: OB.I18N.getLabel('OBUIAPP_SaveRow'),
  updateState: function () {
    var view = this.view,
        form = view.viewForm,
        hasErrors = false,
        editRow;
    if (view.isShowingForm) {
      this.setDisabled(!(form.isNew && form.allRequiredFieldsSet()) && (form.isSaving || form.readOnly || !view.hasValidState() || form.hasErrors() || !form.hasChanged || !form.allRequiredFieldsSet()));
    } else if (view.isEditingGrid) {
      form = view.viewGrid.getEditForm();
      editRow = view.viewGrid.getEditRow();
      hasErrors = view.viewGrid.rowHasErrors(editRow);
      this.setDisabled(!(form.isNew && form.allRequiredFieldsSet()) && !hasErrors && (form.isSaving || form.readOnly || !view.hasValidState() || form.hasErrors() || !form.hasChanged || !form.allRequiredFieldsSet()));
    } else {
      this.setDisabled(true);
    }
  },
  keyboardShortcutId: 'ToolBar_Save'
},

OB.ToolbarRegistry.registerButton(NEW_SAVE_BUTTON.buttonType, isc.OBToolbarIconButton, NEW_SAVE_BUTTON, 30, null, true);
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0058062)
hgbot (developer)
2013-04-19 18:17

Repository: erp/devel/pi
Changeset: c09f69635bed61fe9ef335345ac8ae534a966d18
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Fri Apr 19 18:16:45 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c09f69635bed61fe9ef335345ac8ae534a966d18 [^]

Fixed issue 23597: Added 'overwriteIfExists' capabilities to 'registerButton' function

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-manage-views-toolbar.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalize-form-toolbar-button.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0058064)
dbaz (developer)
2013-04-19 18:19

Added new parameter 'overwriteIfExists' to 'OB.ToolbarRegistry.registerButton' function.
False/Null by default, so previous existing code will behave as before.
(0058106)
hudsonbot (developer)
2013-04-22 16:36

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f78aa78542fa [^]

Maturity status: Test
(0058140)
AugustoMauch (manager)
2013-04-23 16:57

Code reviewed and verified in pi@d4a9088f6a09

- Issue History
Date Modified Username Field Change
2013-04-19 18:09 dbaz New Issue
2013-04-19 18:09 dbaz Assigned To => dbaz
2013-04-19 18:09 dbaz Modules => Core
2013-04-19 18:09 dbaz Triggers an Emergency Pack => No
2013-04-19 18:13 dbaz Review Assigned To => AugustoMauch
2013-04-19 18:13 dbaz Issue Monitored: AugustoMauch
2013-04-19 18:17 hgbot Checkin
2013-04-19 18:17 hgbot Note Added: 0058062
2013-04-19 18:17 hgbot Status new => resolved
2013-04-19 18:17 hgbot Resolution open => fixed
2013-04-19 18:17 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c09f69635bed61fe9ef335345ac8ae534a966d18 [^]
2013-04-19 18:19 dbaz Note Added: 0058064
2013-04-22 16:36 hudsonbot Checkin
2013-04-22 16:36 hudsonbot Note Added: 0058106
2013-04-23 16:57 AugustoMauch Note Added: 0058140
2013-04-23 16:57 AugustoMauch Status resolved => closed
2013-04-23 16:57 AugustoMauch Fixed in Version => 3.0MP23


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker