Commit Graph
1181 Commits
Author SHA1 Message Date
Jacques Le Roux 067df90ae1 After r1695126, I found that most of the Java files have svn:eol-style=native. So only 116 Java files were missing svn:eol-style=native. I guess those have been added by committers who are not using the OFBiz svn config file on their machines. So rather than removing svn:eol-style=native, this commits add the property to the files which miss it. Here 116+89=205 files have their svn:eol-style property changed to native.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1695129 13f79535-47bb-0310-9956-ffa450edef68
2015-08-10 16:33:23 +00:00
Jacques Le Roux 1310a182cc Document to makes the changes for OFBIZ-6504 more clear
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693400 13f79535-47bb-0310-9956-ffa450edef68
2015-07-30 09:26:20 +00:00
Jacques Le Roux 9f00d68173 Fixes an issue crossed while checking OFBIZ-6504 - how to Create PDF with password Protected in Ofbiz
There was still an issue in normal (not PDF) mode, I thought I had just to replace \' by void, but I got fooled, because \' already transformed in Unicode characters (\') at this stage. So I replaced "\'" by "'"

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693258 13f79535-47bb-0310-9956-ffa450edef68
2015-07-29 13:33:12 +00:00
Shi Jinghai 8f3c4a1bda OFBIZ-6504.
In ScreenFopViewHandler.java, removed a line:
            pdfEncryptionParams.setEncryptionLengthInBits(256);
it's redundant to the line
            pdfEncryptionParams.setEncryptionLengthInBits(encryptionLength);


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693243 13f79535-47bb-0310-9956-ffa450edef68
2015-07-29 11:58:48 +00:00
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
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 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
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
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
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
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
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
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
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
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
Nicolas Malin 70cffbfb2c Form widget hyperlink.id attribute isn't supported by MacroFormRenderer.java (OFBIZ-6403) thanks christian carlow for this issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1683642 13f79535-47bb-0310-9956-ffa450edef68
2015-06-04 20:55:59 +00:00
Taher A. Alkhateeb 62b0f73212 Translate the framework to Arabic
Another part of the translation of OFBiz to Arabic 
project found in JIRA OFBIZ-6432.

The commit translates the following files :
- framework/base/config/DateTimeLabels.xml
- framework/widget/config/conditional.xml

refs https://issues.apache.org/jira/browse/OFBIZ-6432


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682699 13f79535-47bb-0310-9956-ffa450edef68
2015-05-31 08:49:43 +00:00
Nicolas Malin e3dcdf5098 Apply patch from OFBIZ-6417 renderDateFindField doesn't reselect operation by Christian Carlow
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682462 13f79535-47bb-0310-9956-ffa450edef68
2015-05-29 13:39:53 +00:00
Jacques Le Roux 34fe4d09b6 Better documentation for <<Lookup fields break when used with a form having skip-start="true">> https://issues.apache.org/jira/browse/OFBIZ-6139
I also improved the description of the Jira. Thanks to Pierre Smits's questions who tried the feature.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682414 13f79535-47bb-0310-9956-ffa450edef68
2015-05-29 10:25:00 +00:00
Nicolas Malin 1e015b79ba Apply patch from OFBIZ-6415 renderTextFindField doesn't reselect operation dropdown or ignoreCase checkbox by christian carlow
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682342 13f79535-47bb-0310-9956-ffa450edef68
2015-05-28 21:41:52 +00:00
Michael Brohl 358a7486c5 Applied patch from jira issue OFBIZ-6414: drop-down widget field with allow-multiple="true" does not display current value.
ModelFormField.getEntry returns the string representation of the value corresponding to the field in either the context map or parameters map but when the value is returned as a list [X, Y, Z], the opening and closing brackets are encoded [X, Y, Z]
This prevents the FormRenderer (atleast MacroFormRenderer) from detecting a list object from the string and converting it back to a list
eg - currentValueList = StringUtil.toList(currentValue).

The solution detects a collection value and handles the proper encoding.

Thanks Gareth Carter for reporting the issue and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682234 13f79535-47bb-0310-9956-ffa450edef68
2015-05-28 12:58:31 +00:00
Michael Brohl 6e499d7655 Code cleanup, no functional changes (https://issues.apache.org/jira/browse/OFBIZ-6420)
Removed unnecessary double checks and corrected exception handling where the catched exception was too broad.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682214 13f79535-47bb-0310-9956-ffa450edef68
2015-05-28 11:33:52 +00:00
Michael Brohl 1613bbee07 Manually applied and modified the changes of the patch from jira issue OFBIZ-6312: Catalog Manager's EditProduct screen HTML should place a limit on the size of text that can be entered in the Product Description box.
Introduces a new maxlength attribute to the textarea element in forms, applies the maxlength (255 chars) value in several FTL files, when the DB is limiting the length.

Thanks Forrest Rae for reporting the issue and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682132 13f79535-47bb-0310-9956-ffa450edef68
2015-05-27 22:18:29 +00:00
Jacques Le Roux 6c637a7b7d Implements "The lookup and text-area have a read-only attribute but not the text input field" at https://issues.apache.org/jira/browse/OFBIZ-6395
Adds a read-only attribute to the text input field. Using the display type is not enough, because it's uneasy to assign values through Javascript as using the lookup description-field-name shows OOTB. And the disabled option is not good when you want to still show the submitted values on return.

Also 
* improves widget-form.xsd documentation about read-only attribute for lookup
* completes the foFormMacroLibrary.ftl where placeholder tabindex  were missing (if this even ever makes sense)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680921 13f79535-47bb-0310-9956-ffa450edef68
2015-05-21 16:29:49 +00:00
Jacques Le Roux 8d3e2f88cb A patch from Youssef Khaye updated by Wei Zhang for "Adding a new attribute ignore-when (verry similar to use-when) that enable rendering or not a field in list or multi form." https://issues.apache.org/jira/browse/OFBIZ-4481
Or on a form of type list or multi, it is not possible to completely ignore a field via use-when attribute. Instead it hides the title and the column header became shifted from the table content.
For example I want to hide the description column from my form when exampleName is choosen as sort-field.

This also modifies
    example/widget/example/ExampleForms.xml#ListExamples
to illustrate this functionality


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680865 13f79535-47bb-0310-9956-ffa450edef68
2015-05-21 13:09:01 +00:00
Adrian Crum 75aefbb887 Remove DCL pattern from MenuFactory.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680329 13f79535-47bb-0310-9956-ffa450edef68
2015-05-19 16:05:13 +00:00
Jacques Le Roux 8b7cda5012 Small change for "Improves dialog boxes generated by ajax-window link parameter" https://issues.apache.org/jira/browse/OFBIZ-6359
Adds closeOnEscape

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1679172 13f79535-47bb-0310-9956-ffa450edef68
2015-05-13 10:09:27 +00:00
Ashish Vijaywargiya d604e748d5 Applied patch from jira issue - OFBIZ-6260 - foScreenMacroLibrary.ftl renderLabel doesn't apply style parameter.
Thanks Christian for creating the issue and contributing the patch for the same. Thanks Aditya for reviewing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1674513 13f79535-47bb-0310-9956-ffa450edef68
2015-04-18 14:11:37 +00:00
Adrian Crum a1bb4ff6bc Fix warnings in trunk in Java source code - https://issues.apache.org/jira/browse/OFBIZ-6217.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1674064 13f79535-47bb-0310-9956-ffa450edef68
2015-04-16 13:05:55 +00:00
Jacques Le Roux 1788b6a224 Removes useless sentences according to Scott, after Adrian suggested to remove the HTML references.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1672081 13f79535-47bb-0310-9956-ffa450edef68
2015-04-08 12:50:15 +00:00
Jacques Le Roux 5f0ea0a387 Completes r1671519 for https://issues.apache.org/jira/browse/OFBIZ-6232 "Adds HTML tabindex into widget form fields"
There was still an issue when rendering renderLookupField from FTL templates

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1671847 13f79535-47bb-0310-9956-ffa450edef68
2015-04-07 13:49:53 +00:00
Jacques Le Roux e5066b2ce5 No functional changes, just a bit of refactoring/cleaning
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1671758 13f79535-47bb-0310-9956-ffa450edef68
2015-04-07 08:21:49 +00:00
Jacques Le Roux eb67d60fc3 Completes r1671519 for https://issues.apache.org/jira/browse/OFBIZ-6232 "Adds HTML tabindex into widget form fields"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1671756 13f79535-47bb-0310-9956-ffa450edef68
2015-04-07 08:20:39 +00:00
Jacques Le Roux fc90936482 Forgot to commit these changes at r1671519, I will complete the rest later today...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1671524 13f79535-47bb-0310-9956-ffa450edef68
2015-04-06 12:24:06 +00:00
Jacques Le Roux f903bdc355 Fixes a bug related to renderDateTimeField reported by Adrian's aon dev ML (when used from FTL templates)
Fixes also a bug related to renderLookupField when used from FTL templates with lookupField macro

I also spotted a number of other misc. trivial tabindex missing in other *FormMacroLibrary.ftl which should have not (or minor) effects on rendering. I will fix them later today...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1671519 13f79535-47bb-0310-9956-ffa450edef68
2015-04-06 12:11:18 +00:00
Jacques Le Roux 8e0222e137 Adds HTML tabindex into widget form fields. It allows to set the tab order of elements (when the "tab" button is used for navigating). For instance by column when columns are used with the position attribute.
Normally it's implemented for all concerned fields.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1671500 13f79535-47bb-0310-9956-ffa450edef68
2015-04-06 09:34:54 +00:00
Deepak Dixit 6f30b5de01 Fixed NPE while rendering content using screen widget, if content.dataResouceId is null then ModelScreenWidget throwing NPW.
Applied patch from jira issue OFBIZ-6219

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1669588 13f79535-47bb-0310-9956-ffa450edef68
2015-03-27 13:44:45 +00:00
Adrian Crum f315f0d5be Fix warnings in trunk in Java source code - https://issues.apache.org/jira/browse/OFBIZ-6217.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1669537 13f79535-47bb-0310-9956-ffa450edef68
2015-03-27 10:04:14 +00:00
Jacques Le Roux 4e2d290f69 Fixes <<You can't rely on Lookup field description-field-name attribute in a form having skip-start="true">> https://issues.apache.org/jira/browse/OFBIZ-6170
Instead of adding a form-name attribute only in lookup sub-element, I added it a the field level and removed the one at the lookup level.So the form-name field attribute can be used in the field of both the lookup and if needed the field set in the lookup description-field-name attribute. I only tested it in a version more near 13.07 but I believe it's ok here

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1667774 13f79535-47bb-0310-9956-ffa450edef68
2015-03-19 14:38:37 +00:00
Adrian Crum 9158c3af82 Fixed a bug in screenlet widget: If there is no Screenlet's preferenceKey in requestParameters, the initially-collapsed always be false. https://issues.apache.org/jira/browse/OFBIZ-6172
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1667492 13f79535-47bb-0310-9956-ffa450edef68
2015-03-18 10:53:48 +00:00