Commit Graph
10472 Commits
Author SHA1 Message Date
Jacques Le Roux 06a06feb14 Fixes an issue crossed while checking OFBIZ-6504 - how to Create PDF with password Protected in Ofbiz
When a description used in a drop-down comes from a localised label in CommonEntityLabels.xml and contains a single quote (') this single quote must be escaped to allow the rendering. Else it's a single quote inside 2 single quotes for the option like:
{'key':'EXST_CANCELLED','description':'Annuler l'exemple (En projet)'}
with he percent encoding there is no issue:
{'key':'EXST_CANCELLED','description':'Annuler l%27exemple (En projet)'}

We noted, with Jinghai, that using html entities does not work. I guess due to another encoding further in the chain. I also tried to percent encoding but was unable to find how to replace a % in Freemarker. Thanks to Gareth's suggestion I finally escaped the quote. Also to escape the quote with replaceAll() in Java you have to put 5 \,  small but weird issues ;) I hope nothing else somewhere already escape the quote, we will see anyway...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693242 13f79535-47bb-0310-9956-ffa450edef68
2015-07-29 11:50:41 +00:00
Shi Jinghai 89f0ba788b OFBIZ-6552 - Error when changing language after using the product jump from the left part of the main product screen
Add a check on whether viewName is empty to view-last branch. If it's empty, try to use the value in the response config if it exists.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693231 13f79535-47bb-0310-9956-ffa450edef68
2015-07-29 09:55:24 +00:00
Jacques Le Roux 11c4af1c2c OFBIZ-6545 - Replace webtools/control/EntitySQLProcessor FTL with widgets
Damned, forgot to save a change after undoing a try for an issue I will create soon. This was not in Gil's patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1692726 13f79535-47bb-0310-9956-ffa450edef68
2015-07-26 15:16:20 +00:00
Jacques Le Roux 7c79d1e6f3 A patch from Gil Portenseigne for OFBIZ-6545 - Replace webtools/control/EntitySQLProcessor FTL with widgets
And while at it set ofbiz.org as default selGroup when none exist. This will prevent the unobvious error message
  <<Unable to esablish a connection with the database. (Unable to acquire a new connection from the pool)>>
in most cases!

This patch replaces EntitySQLCommand ftl to widget. List screen couldn't be migrated to widget due to dynamic column rendering.
To get the default group, a little trick is used, constructing the list of map for drop-down list-option widget.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1692725 13f79535-47bb-0310-9956-ffa450edef68
2015-07-26 15:12:49 +00:00
Jacques Le Roux 6f514d81fb The description attribute of the display-entity element is now escaped to prevent the risk of an XSS attack.
[CVE-2015-3268] Stored Cross-Site Scripting Vulnerability affecting the description attribute of the display-entity element because it was not escaped.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1692357 13f79535-47bb-0310-9956-ffa450edef68
2015-07-23 08:36:36 +00:00
Shi Jinghai a575165ce4 OFBIZ-6504 - Create password protected PDF in OFBiz
1. Changed to use FOP 2.0 native encryption, jars are updated.

2. Now the Embeded options are request parameters supported in ScreenFopViewHandler.java, the options are:
http://xmlgraphics.apache.org/fop/2.0/pdfencryption.html#embedded
the default values of the options can be configured in framework/webapp/config/fop.properties.

3. The demo page is https://localhost:8443/example/control/ExampleReportPdfOptions?exampleId=EX01

4. Barcode is tested.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1691852 13f79535-47bb-0310-9956-ffa450edef68
2015-07-19 20:41:32 +00:00
Jacques Le Roux 1d9f55c71f A patch from Francis Douet for "streamContentToBrowser fails when the file name contains a comma, only with Chrome." https://issues.apache.org/jira/browse/OFBIZ-6554
streamContentToBrowser fails when the file name contains a comma, happens only with Google Chrome.
Can easily be reproduced for example by uploading the Logo Image URL of the default organization in the party manager, that includes a comma of course.
Fixed in my patch by wrapping the file name in quotes.
Error on the browser console:
GET https://localhost:8443/content/control/stream?contentId=10020 net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION

jleroux: at 1935.1 section of http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html I read this example << Content-Disposition: attachment; filename="fname.ext">> So Francis's solution is the right one

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1690086 13f79535-47bb-0310-9956-ffa450edef68
2015-07-09 12:30:22 +00:00
Shi Jinghai 7e30e504c8 OFBIZ-6542 as Gan Hong-Wai suggested, added EntityCondition.makeCondition("geoTypeId", "TERRITORY") in CommonWorkers.java of trunk.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1689266 13f79535-47bb-0310-9956-ffa450edef68
2015-07-05 17:20:46 +00:00
Jacques Le Roux 6ceb90c8fa Puts the focus on the 1st field of the scheduleForm in the setServiceParameterSync.ftl if it exists
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1688773 13f79535-47bb-0310-9956-ffa450edef68
2015-07-02 07:40:15 +00:00
Jacques Le Roux bc3d048a3f OFBIZ-6544 - The focus-field-name form widget feature is broken
This fixes it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1688772 13f79535-47bb-0310-9956-ffa450edef68
2015-07-02 07:38:02 +00:00
Nicolas Malin 07fdc51217 correct compilation error, missing delegatorBaseName parameter for function GenericDelegator.getEntityNamesByGroup. Issue OFBIZ-6533, thanks Wei Zhang for this alert
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687679 13f79535-47bb-0310-9956-ffa450edef68
2015-06-26 07:04:55 +00:00
Jacques Le Roux a41d4ac771 OFBIZ-6532 - Adding a new entity-group but no corresponding delegator/group-map is hard to debug
Adds an error message in log just before crash, so it's easy to debug

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687589 13f79535-47bb-0310-9956-ffa450edef68
2015-06-25 17:24:55 +00:00
Deepak Dixit 43ed056525 OFBIZ-6530: Removed async=false from lookupDescriptionLoaded , getJSONuiLabels and getJSONuiLabel js method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687427 13f79535-47bb-0310-9956-ffa450edef68
2015-06-25 08:13:32 +00:00
Adrian Crum 4fc6618abe Removed DCL code from TreeFactory.java, small code cleanup.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687348 13f79535-47bb-0310-9956-ffa450edef68
2015-06-24 19:18:16 +00:00
Jacques Le Roux b0ba66e6d7 Fixes a typo
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687299 13f79535-47bb-0310-9956-ffa450edef68
2015-06-24 14:37:03 +00:00
Jacques Le Roux 4d2a942aa4 A patch from Gil Portenseigne for "Add a mean to untie geo associations" https://issues.apache.org/jira/browse/OFBIZ-6528
In the Webtools we can asociate Geos but we have yet no means to untie them

This patch adds a new grid in EditGeoScreen to see/delete GeoAssoc and CommonEntityLabels default-resource-name on GeoAssocType for translation purpose.

jleroux: On Pierre's Smits suggestion Gil also added a clickable link to open the associated Geo and a column to show the geoTypeId of the associated Geo.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687259 13f79535-47bb-0310-9956-ffa450edef68
2015-06-24 13:10:00 +00:00
Adrian Crum 73e5b3af04 JavaDoc fixes, no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687141 13f79535-47bb-0310-9956-ffa450edef68
2015-06-23 22:02:33 +00:00
Adrian Crum 6bd65c4b2f Fixed some C&P errors in ModelFieldVisitor.java. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687093 13f79535-47bb-0310-9956-ffa450edef68
2015-06-23 16:46:06 +00:00
Shi Jinghai 85bed69778 Refs #6518.
Translated new labels in trunk version into zh locale (Simplified Chinese).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686778 13f79535-47bb-0310-9956-ffa450edef68
2015-06-22 07:10:41 +00:00
Nicolas Malin 895c9856b3 Cleaning forms code is needed after setting default-value in list-options and entity-options, patch related to OFBIZ-6524 and follows the resolution of OFBIZ-6490 and OFBIZ-6489. Thanks Gil Portenseigne for this effort
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686674 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 21:58:05 +00:00
Nicolas Malin 7382855c7b Use as default on <entity-option> and <list-option> description attribute like <display-entity> element. Related issues OFBIZ-6489 and OFBIZ-6490. Thanks to Christian Carlow for this and Gil Portenseigne for the review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686673 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 21:28:12 +00:00
Adrian Crum e2f875de2d Restored the 'request-confirmation' and 'confirmation-message' menu item attributes that were removed in the recent widget refactoring - https://issues.apache.org/jira/browse/OFBIZ-6334.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686666 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 19:41:05 +00:00
Adrian Crum 220270f628 Move theme-specific js & css references from CommonDecorator(s) to themes - https://issues.apache.org/jira/browse/OFBIZ-6362.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686655 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 17:02:22 +00:00
Nicolas Malin bdce756456 use better french translation CommonApply -> Appliquer
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686622 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 13:53:49 +00:00
Nicolas Malin e424ded590 Replace FTL at webtools/control/entitymaint with widgets. Remove multi column and convert links as include-menu. By default the entityName is link on Find and receive the anchor. This patch is related to OFBIZ-6402, thanks Christian Carlow for this issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686621 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 13:50:13 +00:00
Arun Patidar 3f36969de4 [OFBIZ-6237] Applied patch from the task. Fixed the issue of deleting existing GeoAssocs records while addind new GeoAssocs. Thanks Himanil Gupta for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686616 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 13:28:30 +00:00
Nicolas Malin 6aab83641f error in parsing array in ajaxUpdateAreas, use a regexp tp split all parameters separate by comma and support this string a,{b,c,d},e as three parameters and not five. Patch related to OFBIZ-6496. Thanks Pierre Gaudin for this issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686593 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 12:13:13 +00:00
Michael Brohl 8568760a60 Applied changes for OFBIZ-6300: Compiler-Error with JDK 1.8 and source compatibility 1.8.
This reintroduces type safety for getFieldentryIterator.

Thanks Martin Becker for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686570 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 11:43:30 +00:00
Nicolas Malin 484124f581 Improve widget-form with four elements : include-form, include-grid, include-menu, include-screen to offert more flexibility to define complex display. The main purpose is to complete the screen widget capacity to replace ftl screen.
With these elements, example component have a new FindExample search screen to select the display list type with a example of :
   * include-form : list examples with their features
   * include-screen : list examples with their items
   * include-grid : list examples with their status history
The element include-menu is present on FindUtilCache screen. Also a new CommonInlineBarMenu menu type to display menu with specific purpose (in-line) is now present and with this logic adding in-line-bar css class on themes thomawak and flatgrey.

This patch is combinate Issues : 
 * OFBIZ-6502 Add support for form/grid embedding within grids
 * OFBIZ-6501 Add support for screen embedding inside grids
 * OFBIZ-6404 Allow form/grid widget hyperlinks to be grouped into a single column
sub-tasks of master issue OFBIZ-6314 Widget Refactoring - Placeholder issue

Thanks to Christian and Adrian for their time

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686116 13f79535-47bb-0310-9956-ffa450edef68
2015-06-17 21:50:27 +00:00
Nicolas Malin 34f0f48f08 correct renderLink macro on foScreenMacroLibrary.ftl to avoid a freemarker stacktrace, related to OFBIZ-6461
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685176 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 21:28:11 +00:00
Nicolas Malin c6e5d7e695 fix previous commit : tika has been commented, isn't needed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685133 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 16:52:28 +00:00
Nicolas Malin 68522eb09b Second pass due to local problem :/ . Resynchronise template macro form xml, text, csv and fo from html related to issue OFBIZ-6461.
adding unit test that call webtools/control/WebtoolsLayoutDemo with html, text, csv, xml and fop render and detect on the stream if an FTl stacktrace is present.
The fop test is currently commented because the screenfop failed to generate WebtoolsLayoutDemo page.
To support the unit case, the screen engine has been extend to manage platform-specific : <text> and <csv>

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685132 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 16:48:55 +00:00
Nicolas Malin ae1af54128 revert previous commit, bad repo use my apologies
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685130 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 16:46:08 +00:00
Nicolas Malin d3e95bb938 Resynchronise template macro form xml, text, csv and fo from html related to issue OFBIZ-6461.
adding unit test that call webtools/control/WebtoolsLayoutDemo with html, text, csv, xml and fop render and detect on the stream if an FTl stacktrace is present.
The fop test is currently commented because the screenfop failed to generate WebtoolsLayoutDemo page.
To support the unit case, the screen engine has been extend to manage platform-specific : <text> and <csv>

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685124 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 16:25:30 +00:00
Jacopo Cappellato eb6d01b066 New implementation of the two-way cryptographic services of OFBiz based on Apache Shiro:
* two-way encryption is now delegated to Apache Shiro, with stronger initialization vectors
* the mechanism is backward compatible
* new tools to update the encryption of private keys, useful to upgrade older versions of OFBiz and most of all to replace old keys with new ones (this is critical to implement stronger security practices as requested by PCI) 
* unit tests



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684608 13f79535-47bb-0310-9956-ffa450edef68
2015-06-10 09:01:30 +00:00
Christian Carlow aece17ee2f Adding support for styles for foFormMacroLibrary.ftl renderFormatListWrapperOpen
https://issues.apache.org/jira/browse/OFBIZ-6483

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684232 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 17:56:47 +00:00
Adrian Crum ed1d93be59 Revert rev 1684133 and fix the compiler error properly.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684217 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 16:14:45 +00:00
Adrian Crum a73c51bb49 Fix a thread-safety issue. Trivial unit test changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684216 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 16:12:30 +00:00
Christian Carlow 78b42f0763 Adding support for foFormMacroLibrary.ftl renderFormOpen styles
https://issues.apache.org/jira/browse/OFBIZ-6481

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684176 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 13:19:55 +00:00
Christian Carlow e4b2284e49 Adding support for foFormMacroLibrary.ftl renderFieldTitle style parameter.
https://issues.apache.org/jira/browse/OFBIZ-6479

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684142 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 10:52:06 +00:00
Jacques Le Roux 08e14fc292 A patch from Taher Alkhateeb "Upgrade OFBiz to Java JDK 8" https://issues.apache.org/jira/browse/OFBIZ-6458
2nd step: allows Eclipse EJC to compile, fixes a problem with compilation error in eclipse only, it works okay in javac but not in Eclipse EJC

jleroux: this introduces a small "regression" in the code syntax but to allow users to compile with Eclipse EJC.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684133 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 09:58:50 +00:00
Jacques Le Roux b863051dfd Implements "Geo Data Set for Chile" https://issues.apache.org/jira/browse/OFBIZ-6476
Follow discussion on user ML. 

I did not see Pierre Smits's patch at OFBIZ-6476, so I committed the date Peter provided, plus the Chile CountryAddressFormat I added

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684105 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 07:39:39 +00:00
Jacques Le Roux 2b879e4dfb Completes French CountryAddressFormat
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684104 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 07:37:37 +00:00
Christian Carlow ce084046ad Adding support for renderImage in framework/widget/templates/foScreenMacroLibrary.ftl
https://issues.apache.org/jira/browse/OFBIZ-6475

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684067 13f79535-47bb-0310-9956-ffa450edef68
2015-06-07 19:47:17 +00:00
Christian Carlow e48310e533 Fixing this error caused by id parameter not being assigned to default value for OFBIZ-6403:
FreeMarker template error: When calling macro "makeHyperlinkString", required parameter "id" (parameter #12) was not specified.

https://issues.apache.org/jira/browse/OFBIZ-6403

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684066 13f79535-47bb-0310-9956-ffa450edef68
2015-06-07 19:41:47 +00:00
Jacques Le Roux af9ccf0c17 A patch from Taher Alkhateeb "Upgrade OFBiz to Java JDK 8" https://issues.apache.org/jira/browse/OFBIZ-6458
1st step: fixes a test which was not passing 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684042 13f79535-47bb-0310-9956-ffa450edef68
2015-06-07 16:03:04 +00:00
Christian Carlow f9b4e93a42 Added another ModelFormField.TextField constructor to allow subclass RangeFindField constructor to override the TextField default fieldType of FieldInfo.TEXT with FieldInfo.RANGEQBE
https://issues.apache.org/jira/browse/OFBIZ-6459

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1683832 13f79535-47bb-0310-9956-ffa450edef68
2015-06-05 18:35:13 +00:00
Jacques Le Roux 0acd4839a0 Comment out Greek, no labels yet...
https://issues.apache.org/jira/browse/OFBIZ-5177 "Cleanup UI Labels for languages which aren't well supported"

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1683774 13f79535-47bb-0310-9956-ffa450edef68
2015-06-05 14:48:11 +00:00
Jacques Le Roux 68e64e188c Sorry Frisian we decided you have to go
https://issues.apache.org/jira/browse/OFBIZ-5177 "Cleanup UI Labels for languages which aren't well supported"

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1683761 13f79535-47bb-0310-9956-ffa450edef68
2015-06-05 14:20:18 +00:00
Jacques Le Roux 8497a6d908 Fixes a typo Sharan spotted and Pierre Smits told me
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1683749 13f79535-47bb-0310-9956-ffa450edef68
2015-06-05 13:30:10 +00:00