Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0027065 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
feature request | [Openbravo ERP] A. Platform | minor | always | 2014-07-14 14:40 | 2014-08-08 18:53 | |||
Reporter | dbaz | View Status | public | |||||
Assigned To | dbaz | |||||||
Priority | high | Resolution | fixed | Fixed in Version | 3.0PR14Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | a0de2cc4d7b5 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | alostale | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0027065: new Function('return isc.' ...)() could be simplified | |||||||
Description | There are so many times where we want the Smartclient property of a canvas item, but we don't have the canvas object but the string of its name. In these cases things like this: new Function('return isc.' + this.editorType + '.getPrototype().showTime')() or new Function('return isc.' + this.editorType + '.getInstanceProperty("showTime")')() are performed to obtain a particular attribute value. This is done to avoid the "eval" function. It is not intended to use the new function in all places where getProperty or getInstanceProperty be called, just in those places where the "new Function(...)()" is needed. | |||||||
Steps To Reproduce | . | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0068619) dbaz (viewer) 2014-07-14 14:42 |
OB.Utilities.getCanvasProp(this.editorType, 'showTime'); will be the new function. It also will check that the canvas exists before trying to obtain the attribute value. |
(0068620) hgbot (developer) 2014-07-14 14:53 |
Repository: erp/devel/pi Changeset: a0de2cc4d7b50e4e5f4f737751358fd2f1e3e9d9 Author: David Baz Fayos <david.baz <at> openbravo.com> Date: Mon Jul 14 14:53:07 2014 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/a0de2cc4d7b50e4e5f4f737751358fd2f1e3e9d9 [^] Fixed issue 27065: Added 'OB.Utilities.getCanvasProp' function to avoid new Function('return isc....getPrototype()....')() solutions --- M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-tree-grid.js 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/utilities/ob-utilities.js --- |
(0068766) alostale (viewer) 2014-07-21 15:03 |
code reviewed + tested |
(0069156) hudsonbot (viewer) 2014-08-08 18:53 |
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/4450016dee64 [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2014-07-14 14:40 | dbaz | New Issue | |
2014-07-14 14:40 | dbaz | Assigned To | => dbaz |
2014-07-14 14:40 | dbaz | OBNetwork customer | => No |
2014-07-14 14:40 | dbaz | Modules | => Core |
2014-07-14 14:40 | dbaz | Triggers an Emergency Pack | => No |
2014-07-14 14:41 | dbaz | Review Assigned To | => alostale |
2014-07-14 14:42 | dbaz | Note Added: 0068619 | |
2014-07-14 14:53 | hgbot | Checkin | |
2014-07-14 14:53 | hgbot | Note Added: 0068620 | |
2014-07-14 14:53 | hgbot | Status | new => resolved |
2014-07-14 14:53 | hgbot | Resolution | open => fixed |
2014-07-14 14:53 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/a0de2cc4d7b50e4e5f4f737751358fd2f1e3e9d9 [^] |
2014-07-21 15:03 | alostale | Note Added: 0068766 | |
2014-07-21 15:03 | alostale | Status | resolved => closed |
2014-07-21 15:03 | alostale | Fixed in Version | => 3.0PR14Q4 |
2014-08-08 18:53 | hudsonbot | Checkin | |
2014-08-08 18:53 | hudsonbot | Note Added: 0069156 |
Copyright © 2000 - 2009 MantisBT Group |