Commit Graph
850 Commits
Author SHA1 Message Date
Erwan de Ferrieres bfc158dc67 A patch from Pierre Gaudin - error in pagination target with on-event-update-area parameters - OFBIZ-4249
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1096871 13f79535-47bb-0310-9956-ffa450edef68
2011-04-26 19:43:01 +00:00
Jacques Le Roux 13e570bcbf A patch from Nicolas Malin "Enhanced way of displaying "missing/incorrect fields"" https://issues.apache.org/jira/browse/OFBIZ-2132
Initial demand by Michael Pätzold
At the moment we concentrate on increasing the usability of the backend application. One thing we recognized is the way form errors are reported to the users. Now it's done by showing a list of entity fields, that are required. A more common approach would be to highlight the form controls, that were not/wrongly filled. Was/Is there any task related to that or something similar?

Nicolas's solution
With integration of JQuery and validate function integrate by Sascha, I extend the Form renderer to apply required class and alert the form when she submitted to pass by JQuery validate function.

JLR: I have added a required field to InternalName field in Edit Product Form. There are maybe other cases like that which should be improved...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1096293 13f79535-47bb-0310-9956-ffa450edef68
2011-04-24 09:48:59 +00:00
Jacques Le Roux 5bb2f3a420 A patch from Nicolas Malin "getImageLocation generates NullPointer" https://issues.apache.org/jira/browse/OFBIZ-4262
When you use auto-field-entity on a form , you get a nullPointer :

java.lang.NullPointerException
org.ofbiz.widget.form.ModelFormField$DisplayField.getImageLocation(ModelFormField.java:2122)
org.ofbiz.widget.form.MacroFormRenderer.renderDisplayField(MacroFormRenderer.java:193)
org.ofbiz.widget.form.ModelFormField$DisplayField.renderFieldString(ModelFormField.java:2104)
org.ofbiz.widget.form.ModelFormField.renderFieldString(ModelFormField.java:600)
org.ofbiz.widget.form.ModelForm.renderItemRow(ModelForm.java:1707)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1096140 13f79535-47bb-0310-9956-ffa450edef68
2011-04-23 13:07:21 +00:00
Jacques Le Roux 3210eea160 Nicolas forgot this in his patch and it did not showed unless you made a clean up before building. Complete r1095984, related to https://issues.apache.org/jira/browse/OFBIZ-4259
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1096083 13f79535-47bb-0310-9956-ffa450edef68
2011-04-22 23:19:38 +00:00
Jacques Le Roux 48c6114143 A patch from Nicolas Malin "Add famfamfam icons has generic and add possibility to surchage" https://issues.apache.org/jira/browse/OFBIZ-4259
Adds the possibility to use famfamfam icons contained in framework/images/webapp/images/famfamfam/icons.
If you want use a specific icon, it's possible to define an attribute VT_ICONS_LOC that contains the location to themes icons directory to use
It improves form rendering to pass a flexible string on image-location attribute and screen and form renderer to display an image with a text.

JLR: I just added à   before menus texts

After Erwan's remark I wondered If I should remove the CSS on buttons. But I finally found that it was complementary. Because when no image is used on a specific button you still have the default CSS style applied (typical for Add buttons as Erwan outlined). And when no default CSS style is applied you can have an image like now shown OTTB on print button when editing an Example. So I see these 2 features as complementary for now. Maybe one day, one will replace the other, but at this stage both are welcome IMO.

BTW the famfamfam (strange name ;o) icons lib is well done and really full of possibilities...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1095984 13f79535-47bb-0310-9956-ffa450edef68
2011-04-22 18:51:10 +00:00
Sascha Rodekamp 4598d690fa Improvement: Enables the jQuery validation plugin for all macro generted forms if min one field has the widget-style required.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1094138 13f79535-47bb-0310-9956-ffa450edef68
2011-04-17 12:52:54 +00:00
Bruno Busco c4b31b4375 Removed the <BR /> tag at the end of the renderNextPrev macro.
This allows the Navigation bar to be rendered closed to the form itself.
It seems very hard to reduce the BR height using the CSS only.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1091487 13f79535-47bb-0310-9956-ffa450edef68
2011-04-12 15:59:22 +00:00
Sascha Rodekamp fb880c80a1 Update - i18n from DateTime display fields (https://issues.apache.org/jira/browse/OFBIZ-4014). Ofbiz can now show and interprete i18n dates and times. The Patch uses the datejs library to i18n the displayd date and time fields from the datepicker this works vice versa.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1090231 13f79535-47bb-0310-9956-ffa450edef68
2011-04-08 13:05:42 +00:00
Hans Bakker 65ccc5ae87 improve error message to indicate where the error happened
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1086096 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 02:11:53 +00:00
Jacques Le Roux b06b847f00 A patch from Deepak Dixit "Lookup target-parameter in form widget is not working." https://issues.apache.org/jira/browse/OFBIZ-4225 - OFBIZ-4225
An improved patch for target-parameter functionality, now paramI indexing start with I=0 instead of 1.

JLR: I have updated the XSD to tell it must begin at 0

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1085671 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 09:17:17 +00:00
David E. Jones 86b9945c01 Screen parameters map no longer includes this catalina-specific variable with the full classpath that makes log messages that print parameters REALLY ugly
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1085332 13f79535-47bb-0310-9956-ffa450edef68
2011-03-25 11:38:53 +00:00
Jacques Le Roux bc7fc69cb3 A patch from Deepak Dixit "Lookup target-parameter in form widget is not working." https://issues.apache.org/jira/browse/OFBIZ-4225 - OFBIZ-4225
There is a target-parameter for lookup, Currently it's not working.
We can test it over at https://localhost:8443/ordermgr/control/request page. 


I have added a small change in the XSD to tell it should begin at one(1)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1084574 13f79535-47bb-0310-9956-ffa450edef68
2011-03-23 13:14:34 +00:00
Erwan de Ferrieres 428f2edc9a Sorting portalPageColumns by columnSeqId when retrieving
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1082868 13f79535-47bb-0310-9956-ffa450edef68
2011-03-18 10:40:34 +00:00
Jacques Le Roux 2c79db1b4e Fixes "Form widget extension of the sort-order block" (https://issues.apache.org/jira/browse/OFBIZ-3542) - OFBIZ-3542
The sort-order block was not extended when you extend a form. So you had to duplicate it in case it was the same.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1082134 13f79535-47bb-0310-9956-ffa450edef68
2011-03-16 12:00:49 +00:00
Ashish Vijaywargiya 76b41ad601 Bug fix. hyperlink field type on form field was not able to put "," (separator ) on csv files. Thanks Amit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1081496 13f79535-47bb-0310-9956-ffa450edef68
2011-03-14 18:07:37 +00:00
Erwan de Ferrieres 1a6323cb3a Corrected a bug due to millis with the input mask, optimizing the jQuery writing for the mask
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1081444 13f79535-47bb-0310-9956-ffa450edef68
2011-03-14 16:23:34 +00:00
Erwan de Ferrieres 299a5eccca Adding input mask for the text fields. You have to create them yourself with mask in the text element
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1081436 13f79535-47bb-0310-9956-ffa450edef68
2011-03-14 16:12:01 +00:00
Erwan de Ferrieres d7ad06b90c Adding a masked input capability to the date fields, use mask=Y and the field type will be taken for it. jQuery pPlugin is from http://digitalbush.com/projects/masked-input-plugin/ and under a MIT license
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1081333 13f79535-47bb-0310-9956-ffa450edef68
2011-03-14 11:15:24 +00:00
Erwan de Ferrieres 56dd7e265b paginateAnchor should be tested for emptyness and not for null
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1080563 13f79535-47bb-0310-9956-ffa450edef68
2011-03-11 13:14:42 +00:00
Marco Risaliti 9d1dab732a Remove some warning in MacroScreenRenderer (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078284 13f79535-47bb-0310-9956-ffa450edef68
2011-03-05 13:05:44 +00:00
Marco Risaliti 4a8d24f4c0 Remove a warning in MacroFormRenderer (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078188 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 22:39:02 +00:00
Marco Risaliti 94b117656f Remove some warning in ModelFormAction (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078184 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 22:34:17 +00:00
Marco Risaliti 782b811142 Remove some warning in MacroFormRenderer (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078183 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 22:32:36 +00:00
Marco Risaliti 005526a201 Remove some warning in ModelTreeRenderer (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078182 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 22:28:42 +00:00
Marco Risaliti faf51e642c Remove some warning in ModelTreeAction (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078181 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 22:26:04 +00:00
Marco Risaliti 8980dda47b Remove some warning in HtmlWidget (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078178 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 22:22:44 +00:00
Marco Risaliti 5178dea183 Remove some warning in ModelScreenWidget (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078177 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 22:21:55 +00:00
Marco Risaliti 0a452ebdb4 Remove some warning in IterateSectionWidget (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078176 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 22:19:09 +00:00
Marco Risaliti 45cfb4727d Remove some warning in ModelForm (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078175 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 22:17:54 +00:00
Scott Gray 98ead46edc Fix bug in the screen widget's content renderer, if a dynamic contentId is supplied then the content's dataResourceId ends up getting stored in the Content widget object and is then used by later calls to the same widget regardless of contentId for certain operations (such as determining the mime type, which can affect rendering).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1076906 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 00:46:09 +00:00
Marco Risaliti c82cc82340 Remove unused variable in HtmlFormRenderer (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075553 13f79535-47bb-0310-9956-ffa450edef68
2011-02-28 21:42:58 +00:00
Marco Risaliti 30c0ef5ed3 Remove unused variable in XmlFormRenderer (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075546 13f79535-47bb-0310-9956-ffa450edef68
2011-02-28 21:41:07 +00:00
Marco Risaliti aa7f00442c Remove unused variable in TextFormRenderer (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075545 13f79535-47bb-0310-9956-ffa450edef68
2011-02-28 21:40:32 +00:00
Marco Risaliti 66ea3fb5df Remove unused variable in FoFormRenderer (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075541 13f79535-47bb-0310-9956-ffa450edef68
2011-02-28 21:31:27 +00:00
Sascha Rodekamp 40f52ad764 Improvement - if-regexp conditions in Minilang and Screens not thread safe (https://issues.apache.org/jira/browse/OFBIZ-4107). I added another getTestPattern Method to support case insensitive tests. The case insensitive testPattern is needed from the UtilHttp.checkURLforSpiders.
Thanks Martin & Dimitri for your effort.

Orig. Msg.:

The Perl5Matcher Perl5Compiler are not thread safe, as mentioned in their documentation: http://jakarta.apache.org/oro/api/org/apache/oro/text/regex/Perl5Compiler.html
A separate instance should be used per thread.

The concrete issue occurred in our system in the createCommContentDataResource service. The service tries to save emails to the database after they have been sent. It failed because of the described issue. This caused the whole email service (sendMailFromScreen) to be rescheduled. So customers got emails twice.

The Perl5Matcher and Perl5Compiler instances are assigned to static fields in the org.ofbiz.minilang.method.ifops.IfRegexp class. So every thread will use the same instance. No synchronization is done currently. Changing the fields to be non-static will not work either, as SimpleMethods are cached. So all calls to the same simple method use the same IfRegexp instance.

We fixed the problem by moving the instantiation of the Perl5Matcher and Perl5Compiler to the exec() method in IfRegexp.

Other classes are most likely affected, too: org.ofbiz.entity.condition.EntityComparisonOperator, org.ofbiz.minilang.method.conditional.RegexpCondition, org.ofbiz.minilang.operation.Regexp, org.ofbiz.widget.menu.ModelMenuCondition$IfRegexp, org.ofbiz.widget.screen.ModelScreenCondition$IfRegexp, org.ofbiz.widget.tree.ModelTreeCondition$IfRegexp


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075322 13f79535-47bb-0310-9956-ffa450edef68
2011-02-28 13:43:23 +00:00
Erwan de Ferrieres cc97cd53cc Make collapsibleAreaId unique so the right screenlet is collapsed when more than one screenlet in a portalPage
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1073398 13f79535-47bb-0310-9956-ffa450edef68
2011-02-22 16:44:30 +00:00
Jacques Le Roux 5a4b5561a7 Provides defaultMinLength default value (=2)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1073163 13f79535-47bb-0310-9956-ffa450edef68
2011-02-21 21:55:49 +00:00
Jacques Le Roux 2d35500cf5 Introduces widget.autocompleter.defaultMinLength in widget.properties and set it to 2: Default minimum number of characters an user has to type before the ajax autocompleter activates (jQuery default is 1).
Note: not to be confused with the the minChars option of the old plugin (not in jQuery UI but the  external plugin from bassistance.de) which allowed this so this page is wrong: http://docs.jquery.com/Plugins/Autocomplete/autocomplete#url_or_dataoptions. Now replaced by minLength, the right page is http://docs.jquery.com/UI/API/1.8/Autocomplete#options

Also adds a css trick (from http://jqueryui.com/demos/autocomplete/maxheight.html) to have a vertical scroolbar when having dozens of items in autocomplete (using widget.autocompleter.defaultViewSize=100 for instance) 



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1072784 13f79535-47bb-0310-9956-ffa450edef68
2011-02-20 22:43:59 +00:00
Erwan de Ferrieres 2fa06cc44c Adding missing DTD attributes for link element when calling an ajax-window
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1072599 13f79535-47bb-0310-9956-ffa450edef68
2011-02-20 14:11:02 +00:00
Erwan de Ferrieres 747137b741 Adding default empty values to step and timeValues, resolving OFBIZ-4188
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1071967 13f79535-47bb-0310-9956-ffa450edef68
2011-02-18 11:25:05 +00:00
Sascha Rodekamp f51f4fdff2 Feature - Screen Link Ajax Windows (https://issues.apache.org/jira/browse/OFBIZ-4183)
I created a new Screen <link feature. Similar to the Form Lookups a link can be opened in a layered JS Box (see Screenshot in Jira Task). It looks nice and is helpful in some cases.

You can add any screen u want. It's expected that you create a certain screen for the layered link which only contains the information you need.

The layered box doesn't contain any logic it's just a container for the screen which should be opened. So the screen it self can decide what to show. i.e  if you load a form, the form itself implement the way how it react on a submit (either reload the site or perform the submit as Ajax request in the background).

There is also an example in the example section. Try to create a new Example on the mainpage.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1071698 13f79535-47bb-0310-9956-ffa450edef68
2011-02-17 17:01:07 +00:00
Sascha Rodekamp a33a59873b Bug Fix "DateTimePicker shows wrong current time" (https://issues.apache.org/jira/browse/OFBIZ-4169) - When changing the plugin configuration the dtp shows the correct time - Thanks Nikkel K for reporting.
Orig. Msg:
The DateTimePicker calculates nearly always in 5m steps and rounds up or down, depending on the nearest result. This means, that you have at 14:11:10 and at 14:12:10 a time of 14:10:10 in the DTP and at 14:13:10 and 14:14:10 already 14:15:10 (so on the one hand you have a "current" time that shows in the future and on the other hand the same time 5 times in the DTP (while the mins. dont increase, the seconds do).

comment to the nearly always: i had exactly one case, where i had xx:01:xx, and i cant recreate it...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1071328 13f79535-47bb-0310-9956-ffa450edef68
2011-02-16 17:55:52 +00:00
Erwan de Ferrieres 80d2dc710d Adding a new feature for date-time fields: step, which will format the minutes drop-down with or a 1, 5, 10, 15 or 30 step-size
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1070570 13f79535-47bb-0310-9956-ffa450edef68
2011-02-14 16:57:31 +00:00
Marco Risaliti cc33513cce Remove some unused import in ModelMenuItem (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068573 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 20:48:46 +00:00
Marco Risaliti d67e3a92fa Remove an unused import in ModelFormAction (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068571 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 20:47:50 +00:00
Marco Risaliti 5c8186724e Remove some unused import in PortalPageWorker (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068570 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 20:46:06 +00:00
David E. Jones 6e7bbc9976 Added a use-transaction attribute to the screen definition, defaults to true (which is what the screen widget did before), and allows avoiding the overhead of a transaction in a screen by setting it to false
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1066355 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 07:28:57 +00:00
Erwan de Ferrieres 4a8cf3cde3 When using on-event-update-area, parameters should not be duplicated in the map if already existing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1064180 13f79535-47bb-0310-9956-ffa450edef68
2011-01-27 16:20:31 +00:00
Jacques Le Roux c26dbdd713 A line move asked by Leon about OFBIZ-4136 (In layer mode, the attribute "target-parameter" of a lookup field is not used)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1063630 13f79535-47bb-0310-9956-ffa450edef68
2011-01-26 08:42:53 +00:00
Jacques Le Roux 746ba1e9b1 A patch from Leon "In layer mode, the attribute "target-parameter" of a lookup field is not used" (https://issues.apache.org/jira/browse/OFBIZ-4136) - OFBIZ-4136
As xsd describes, "target-parameter" of a lookup field can be used to transfer extra parameters to lookup something. But if we choose "layer" mode (the default mode of lookup), this attribute does nothing. It works before jQuery introduced. I guess this feature is forgot by mistake during migration.

JLR: Nice catch! Actually IIRW it's because this has been introduced in trunk after we migrated this part in the jQuery branch and it passed "hidden" when I merged the trunk in branch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1062709 13f79535-47bb-0310-9956-ffa450edef68
2011-01-24 09:55:17 +00:00