Commit Graph
1568 Commits
Author SHA1 Message Date
Sascha Rodekamp 83a3e0f6f4 Revert 1327835: accidently committed file WidgetWorker.java
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327839 13f79535-47bb-0310-9956-ffa450edef68
2012-04-19 06:30:36 +00:00
Sascha Rodekamp 94889bae2d Fix jackrabbit unit testing.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327835 13f79535-47bb-0310-9956-ffa450edef68
2012-04-19 05:58:29 +00:00
Sascha Rodekamp de21687576 Form-Widget : Error in rendering Reset field. (https://issues.apache.org/jira/browse/OFBIZ-4821) A patch from Sumit Pandit. MacroFormRenderer.renderResetField contains a missing entry when appending title to renderResetField's StringWritter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327409 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 07:51:49 +00:00
Jacques Le Roux 93ae3a7fe1 The conditionals are unnecessary - FSE will return the original string if the string is null or empty, said Adrian
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311195 13f79535-47bb-0310-9956-ffa450edef68
2012-04-09 10:44:05 +00:00
Jacques Le Roux 2d30831040 A patch from Nicolas Malin "Use flexibleStringRenderer for alt-target element on form" https://issues.apache.org/jira/browse/OFBIZ-4588
At this time the alt-target element value is only parse on bsh interpreter. To resynchronise with the rest of framework, convert with a flexibleStringRenderer.

jleroux: re-adding after reverting r1311082

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311109 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 21:38:17 +00:00
Hans Bakker 8ce6e56675 comment from jacopo, to revert changes from the freemarker down grade
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309778 13f79535-47bb-0310-9956-ffa450edef68
2012-04-05 11:30:30 +00:00
Jacques Le Roux bf2feb63bd A patch from Nicolas Malin "add possibility to sort field at the end form on widget form" https://issues.apache.org/jira/browse/OFBIZ-4518
When you use sort-field, you reorder only the form begin or you need list all file if you want reordered the end form.

Example

    <form>
    <field name="a"/>
    <field name="b"/>
    <field name="c"/>
    <field name="d"/>
    </form>

If you want put c at the end :

    <form>
    <field name="a"/>
    <field name="b"/>
    <field name="c"/>
    <field name="d"/>
    <sort-order>
    <sort-field name="a"/>
    <sort-field name="b"/>
    <sort-field name="d"/>
    <sort-field name="c"/>
    </sort-order>
    </form>

with the patch

    <form>
    <field name="a"/>
    <field name="b"/>
    <field name="c"/>
    <field name="d"/>
    <sort-order>
    <last-field name="c"/>
    </sort-order>
    </form>

It's really useful for inherited forms when you adding new fields, you just use last-field for instance for submit button.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1307784 13f79535-47bb-0310-9956-ffa450edef68
2012-03-31 12:10:07 +00:00
Jacopo Cappellato dced383147 Added missing argument form macro to fix rendering error in PDF forms
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1303677 13f79535-47bb-0310-9956-ffa450edef68
2012-03-22 07:48:38 +00:00
Scott Gray 1e3d9b9f55 CVE-2012-1621: Ensure that collections (except for maps) are properly encoded for html when rendered using toString() e.g.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1303145 13f79535-47bb-0310-9956-ffa450edef68
2012-03-20 20:54:06 +00:00
Hans Bakker 0d802c0385 OFBIZ-4730 make <property-to-field/> in widget firstly lookup up the SystemProperty entity and then the properties file, contribution of Leon
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1302320 13f79535-47bb-0310-9956-ffa450edef68
2012-03-19 08:25:06 +00:00
Sascha Rodekamp deced8bce4 No Url encoding for get parameters (https://issues.apache.org/jira/browse/OFBIZ-2628) using the URLEncoder to encode and render URLs with special Chars. The encoding is always UTF-8. Fixed Patch without the HTTPS redirect bug.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298454 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 16:15:25 +00:00
Sascha Rodekamp b3e7f4fb32 Revert r1297006 because the encoding makes a problem with redirecting from HTTP to HTTPS
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297443 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 12:24:12 +00:00
Sascha Rodekamp e1b53e3d50 No Url encoding for get parameters (https://issues.apache.org/jira/browse/OFBIZ-2628) using the URLEncoder to encode and render URLs with special Chars. The encoding is always UTF-8
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297006 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 11:13:29 +00:00
Jacques Le Roux c6288f1d46 A patch from Wai "widget <image> tag to use css for resizing" https://issues.apache.org/jira/browse/OFBIZ-4678
Summary: The purpose of this patch is to address the following:
1. Provide a standardized set of image width and height specs for page layout in ofbiz. This gives ofbiz a uniform look throughout as it applies to image display.
2. Preserve the aspect ratio of the image when using these standardized image sizes.
3. One place to make styling modifications (eg. css file).
4. Decouple styling from code (eg. java,ftl,xml,html,jsp,etc).

Regarding including the real image size, the width/height attributes in <img> specifies the boundary of the image when shown on the page. If you need to specify the real size of the image, the server code would have to perform the determination. Afterwards, you can include the actual dimensions of the image in the title attribute of <img>

Details:
Manually specifying the image width and height does help with preserving the layout of a page regardless of the image size to be shown. The challenge with this method is that the image shown on the page in question may be distorted if the aspect ratio of the image differed from that of the width and height attributes of <img>. This basically forces the person uploading the image to be more vigilant about image aspect ratios.
The purpose is to harmonize on the display size of images with a standardized set of width/height constraints in which an image must fit and preserve the aspect ratio of images.

Currently the source files (eg. ftl, xml) either manually specifies the width or height of a displayed image (ie widget <image> and html <img> tag). The problem with specifying only one constraint is that an image can affect the layout of the page if the user uploads an image where the aspect ratio could be large.

Some ftl and xml files specify both the width and the height. The problem with this is that if the aspect ratio of the image in question does not match that of the width and height of the <img> tag, the image would be displayed distorted.

The solution was to create a standardized set of CSS styles that both configure the displayed image size and preserve the image aspect ratio (eg. thumbnail size, medium size and large size). Of course, the developers can further define or modify the styles to suit their need.

By using CSS, one can change the size of displayed images without having to tamper with the ftl and/or xml files. This helps to reduce potential bugs that come with modifying the ftl and xml files. The existing way of doing things is to go through each ftl or xml file in question and manually modify the width and/or height of the <image> and/or <img> tag.

The question about the "border" around images. If you do not wish to have a border around the image, just remove it from the CSS style. It's that easy No need to change anything else. Ie. configuration to the image is done on the CSS style and not on the <image>, <img> tag.

NB: The current patch does not apply to all displayed images. I have only made appropriate modifications to widget <image> and html <img> tags that have either specified the width and/or height. There are numerous <image> and <img> tags spread all over the project that do not specify dimensions. I would have to modify them as I encountered them when I could see where and how they are displayed on the screen. Note that these images would not be affect by this patch.

jleroux: despite my efforts I was not able to check all screens. But I think it's ok

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296782 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 11:54:13 +00:00
Jacopo Cappellato f18d49458f First pass in the direction of the implementation of a more flexible mechanism to plugin different scripting technologies and in the same time being able to get rid of a lot of framework related custom code to support them.
In particular these chenges should make it easier to implement JSR-223 (even if I think that we should still treat Groovy in a special way).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296762 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 07:24:47 +00:00
Jacques Le Roux 0acaefd402 A patch from Nicolas Malin "On extend form, use call-parent-actions element to run the herited form action" https://issues.apache.org/jira/browse/OFBIZ-2889
On widget form at this time the actions on parents form is not executed if child form contains also actions.
A solution is to implement a new element call-parent-actions on <actions> and <row-actions> element.
for more info see : http://markmail.org/message/hy3puy3fhpzqo7fd

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1293565 13f79535-47bb-0310-9956-ffa450edef68
2012-02-25 10:00:43 +00:00
Jacques Le Roux 90c21deb08 A patch from Kiran Gawde "renderFormClose is missing arguments containerId, hasRequiredField" https://issues.apache.org/jira/browse/OFBIZ-4701
In htmlFormMacrolLibrary.ftl, renderFormClose has containerId, hasRequiredField.
But csv, fo, text, xml FormMacroLibary.ftl don't have these fields for this macro.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1245778 13f79535-47bb-0310-9956-ffa450edef68
2012-02-17 21:52:25 +00:00
Erwan de Ferrieres a8ce326075 OFBIZ-4667 At the time of page load unnecessary ajax request executed to get the lookup description. - A patch from Amardeep Singh Jhajj
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1244953 13f79535-47bb-0310-9956-ffa450edef68
2012-02-16 12:13:49 +00:00
Sascha Rodekamp 0b01894ec1 BUGFIX: return value of String.replace(CharSequence, CharSequence) ignored in org.ofbiz.widget.form.[Macro/Html]FormRenderer.appendExternalLoginKey(String) (https://issues.apache.org/jira/browse/OFBIZ-4694): A patch from Michael Brohl Same error in both Classes MacroFormRenderer and HtmlFormRenderer.
Will provide a patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1244401 13f79535-47bb-0310-9956-ffa450edef68
2012-02-15 08:53:07 +00:00
Adrian Crum 7df6bb7216 Spelling correction in UI label file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1234578 13f79535-47bb-0310-9956-ffa450edef68
2012-01-22 18:56:47 +00:00
Erwan de Ferrieres 05c9bae6e5 tabs to spaces, no functional changes - java files
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1230478 13f79535-47bb-0310-9956-ffa450edef68
2012-01-12 10:37:35 +00:00
Ashish Vijaywargiya 04ae57b902 Apply bug fix patch from jira issue OFBIZ-4649 - Some parameters missing in xmlFormMacroLibrary.ftl macros.
Description:
Getting errors on clicking "Export" tab. Steps to regenerate the issue.

1. Go to Facility component.
2. Go to inventory tab. 
3. After that go to "Export" tab, there is an error:

Macro renderFormOpen has no such argument: viewSize
The problematic instruction:
----------
==> macro renderFormOpen [on line 64, column 1 in component://widget/templates/xmlFormMacroLibrary.ftl]
in user-directive renderFormOpen

For reference- please have a look on below given link-

https://demo-trunk.ofbiz.apache.org:8443/facility/control/ViewFacilityInventoryByProduct?facilityId=WebStoreWarehouse

I have done searching and found that there are parameters missing in some xmlFormMacroLibrary.ftl macros for both trunk and release branch 11.04.
Thanks Amardeep for the contribution!!!


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1229090 13f79535-47bb-0310-9956-ffa450edef68
2012-01-09 10:47:33 +00:00
Erwan de Ferrieres c011b5e9cd OFBIZ-4614 - property auto-field-map in services in actions in forms, not working as describe in xsd description, name of map is not used - A patch from Olivier Heintz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1227365 13f79535-47bb-0310-9956-ffa450edef68
2012-01-04 22:34:47 +00:00
Erwan de Ferrieres b41313ca26 OFBIZ-4641 - in Form.xml, special characters are not manage correctly in description if text-size is used in drop-down - a patch from Olivier Heintz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1227340 13f79535-47bb-0310-9956-ffa450edef68
2012-01-04 21:46:53 +00:00
Jacques Le Roux 97d79c74f4 A patch from Leila Mekika "Use-when not working on multi-forms submit button" https://issues.apache.org/jira/browse/OFBIZ-4605
The submit button of a form multi is rendered even if we add a use-when condition

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1221913 13f79535-47bb-0310-9956-ffa450edef68
2011-12-21 22:24:58 +00:00
Erwan de Ferrieres 10f612c5e9 OFBIZ-4487 - enable definition for position on sortfield - patch from Youssef Khaye and Olivier Heintz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1220927 13f79535-47bb-0310-9956-ffa450edef68
2011-12-19 20:16:01 +00:00
Jacques Le Roux 0b790e1661 A patch from Manuela Gruendlinger "renderDateTimeField does not allow to clear input field" https://issues.apache.org/jira/browse/OFBIZ-4595
Input fields rendered with renderDateTimeField cannot be cleared, the old value is always restored.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1209250 13f79535-47bb-0310-9956-ffa450edef68
2011-12-01 21:26:32 +00:00
Adrian Crum a90a7cb45b Changed the behavior of screenlet title bar: Do not hide title bar controls when screenlet is collapsed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1206013 13f79535-47bb-0310-9956-ffa450edef68
2011-11-24 23:01:31 +00:00
Adrian Crum d603c617b8 Fixed bug in htmlFormMacroLibrary.ftl - list navigation page size drop-down was ignoring the current setting.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1204170 13f79535-47bb-0310-9956-ffa450edef68
2011-11-20 13:44:33 +00:00
Hans Bakker 62b4f44ab3 update the form renderer. when a content url starts with http, do not prefix the url with the website url
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1202081 13f79535-47bb-0310-9956-ffa450edef68
2011-11-15 07:41:50 +00:00
Sascha Rodekamp 91ffcbdae6 Update jQuery:
jQuery library to version 1.7
jQuery UI to version 1.8.16
jQuery Validation to version 1.9
jQuery Flot to version 0.7
jQuery datetimepicker to version 0.9.7
and jsTree

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1199218 13f79535-47bb-0310-9956-ffa450edef68
2011-11-08 12:35:33 +00:00
Adrian Crum 68cb7f39d8 Added some comments to broken section of code in MacroFormRenderer.java. No time to fix it right now.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1197028 13f79535-47bb-0310-9956-ffa450edef68
2011-11-03 09:43:43 +00:00
Jacques Le Roux 087262557c * Uses rather minified css for elrte Editor
In last commits (1178141, 1178111) I put wrong paths for:
* elrteEditor for css pathes is now elrte-1.3
* missed js in elrte-1.3/js/i18n for i18n files



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1178166 13f79535-47bb-0310-9956-ffa450edef68
2011-10-02 09:48:05 +00:00
Jacques Le Roux 70902dcb86 Missed a change in HtmlFormRenderer.java
Removes useless/redundant jQuery files
Adds a elrte translation file for Ukraine file which was provided in a patch from Sascha related to 1.2 but is missing in 1.3

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1178151 13f79535-47bb-0310-9956-ffa450edef68
2011-10-02 08:49:58 +00:00
Jacques Le Roux 1a2cc4faf9 In order to try to resolve "i18n for elrte editor" https://issues.apache.org/jira/browse/OFBIZ-4051, 1st update elrte Editor from 1.1 to to 1.3 version
Also removes now useless older jQuery versions I kept so far for a problem nobody cares about anyway

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1178141 13f79535-47bb-0310-9956-ffa450edef68
2011-10-02 08:06:49 +00:00
Erwan de Ferrieres 573f6f401a A patch from Youssef Khaye: Date time field with input method set to time-drop-down is not working correctly OFBIZ-4448
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1175474 13f79535-47bb-0310-9956-ffa450edef68
2011-09-25 18:15:11 +00:00
Adrian Crum e341923a6a Small JavaDoc fixup for my last commit - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1173047 13f79535-47bb-0310-9956-ffa450edef68
2011-09-20 09:26:27 +00:00
Adrian Crum 4b7cd7434a Changed the screen widget boundary comment behavior per a discussion on the dev mailing list. Setting the widget.properties file widget.verbose property to false now acts like a "master switch" to turn off all widget boundary comments - it ignores all other settings. If the property is set to true, then the setting can be overridden in web.xml or in the screen context.
This commit also removes the demonstration widgetVerbose setting in the Example component's web.xml file - which caused some confusion, and it comments out the setting in the web.xml file that is used for creating new components.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1172954 13f79535-47bb-0310-9956-ffa450edef68
2011-09-20 02:55:44 +00:00
Sascha Rodekamp 16607bb1ac UPDATE: Some improvements with Map iterations (https://issues.apache.org/jira/browse/OFBIZ-4415) A patch from Dimitri Unruh which improves some Map Iterations.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170525 13f79535-47bb-0310-9956-ffa450edef68
2011-09-14 10:52:01 +00:00
Sascha Rodekamp c6226ef627 UPDATE: Missing german conditional label (https://issues.apache.org/jira/browse/OFBIZ-4404). One new german conditional label from Dimitri Unruh.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170466 13f79535-47bb-0310-9956-ffa450edef68
2011-09-14 08:00:02 +00:00
Jacques Le Roux 617330e6d5 Continued refactoring (WIP...)
* UtilValidate.is(Not)Empty wherever possible
* Remove useless boiler plate code which makes things harder to read
 * if on one line w/out {}, it avoid future errors: you can't miss the block if you need to add a line
 * else on one line w/out {}, it avoid future errors: you can't miss the block if you need to add a line
 * no else when return in previous if
 The result is a much easier code to read. I'd recommend to use this style everywhere in OFBiz. Of course this suppose a screen with larger width than in 2000 years...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170442 13f79535-47bb-0310-9956-ffa450edef68
2011-09-14 06:18:26 +00:00
Jacques Le Roux e844e0dff1 Revert to r1169754, will see later: FlexibleStringExpander issues: UtilValidate.is(No)tEmpty() can't be used...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170109 13f79535-47bb-0310-9956-ffa450edef68
2011-09-13 10:50:53 +00:00
Jacques Le Roux 065f14810c Related to the recent UtilValidate.is(Not)Empty() effort. I found the reason, you can't safely pass a FlexibleStringExpander to UtilValidate.is(Not)Empty. All other cases were all right. Lesson learned the hard way, I put comments about that...
I also refactored, I prefer if/else with only one short expression to be on the same line, notably when return is used (then else is useless)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169917 13f79535-47bb-0310-9956-ffa450edef68
2011-09-12 20:48:10 +00:00
Jacques Le Roux 0305d6560d Related to the recent UtilValidate.is(Not)Empty() effort. This part is OK and I prefer this style, easier to read and check (sorry not for the 1st review). I will continue on the rest, if I don't read myself blind on it...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169891 13f79535-47bb-0310-9956-ffa450edef68
2011-09-12 19:35:20 +00:00
Jacques Le Roux e497883d62 VCard.java: replaec an UtilValidate.isNotEmpty() by a simple isEmpty()
ShoppingCart.java: a tabs has been automatically replaced by 8 spaces, fixes it
UtilValidate.java: removes useless parentheses
GeneriDao.java: fixes a wrong UtilValidate.isNotEmpty
ModelFormField.java: revert all UtilValidate.is(Not)Empty() changes though I ddid not find an error there, it must be one because https://localhost:8443/humanres/control/EditResponsibilityTypes is not rendered correctly. I will check again

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169754 13f79535-47bb-0310-9956-ffa450edef68
2011-09-12 14:13:17 +00:00
Jacques Le Roux 2b712efb98 No functional changes, simple code refactoring around UtilValidate.is(Not)Empty()
Changes implementation of UtilValidate.isEmpty() for Collection and Map by using isEmpty() instead of c.size() == 0). It's more clear and as efficient. Removes also useless parentheses there.

Makes use of UtilValidate.is(Not)Empty() everywhere it makes senses. This for 2 reasons:
* Make the code more readable by replacing the (!)null/isEmpty pattern.
* Avoid possible NPEs when only isEmpty() was used (after Entity.find... for instance). I found a lot of cases (242 today) where isEmpty() could perhaps be replaced in Framework. But I guess no NPE checks were missing there and anyway it was too much for me to check them all... So I only did the relevant changes in Applications...



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169478 13f79535-47bb-0310-9956-ffa450edef68
2011-09-11 17:06:11 +00:00
Adrian Crum 642c6383e5 Fix NPE I introduced in my previous commit. Reported by Chatree Srichart.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1165233 13f79535-47bb-0310-9956-ffa450edef68
2011-09-05 10:47:32 +00:00
Adrian Crum b891086624 Fixed a ModelFormField bug introduced in rev 1075322 - date and date-time form fields were throwing exceptions because the description Strings were HTML encoded before being converted to other types. I moved the HTML encoding to post-conversion.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1165011 13f79535-47bb-0310-9956-ffa450edef68
2011-09-04 13:26:57 +00:00
Hans Bakker 9b17664d42 add the viewsize and viewindex parameters to the buttons on a list form to remember the paage and pagesize automatically
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1160539 13f79535-47bb-0310-9956-ffa450edef68
2011-08-23 04:26:06 +00:00
Adrian Crum dfb1eac36f Fixed a screen widget bug where non-existent hyperlink parameter values were rendered as "null" - https://issues.apache.org/jira/browse/OFBIZ-4358.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1153752 13f79535-47bb-0310-9956-ffa450edef68
2011-08-04 04:51:19 +00:00