Commit Graph
241 Commits
Author SHA1 Message Date
Adrian Crum 6e88a24bcb Fixed some bugs in the form widget column sorting code:
1. URL parameters were being mangled by clunky string manipulation code.
2. The sort column logic was piggy-backed on the pagination event. I created a new choice for the form widget <on-event-update-area> element - "sort-column" - so column sort events can update their own areas.
3. The parameter name for the sort column was hard-coded, so column sorting in multiple lists on the same screen would not work. I added a new <form> attribute - "sort-field-parameter-name" - so each list can be sorted separately.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488315 13f79535-47bb-0310-9956-ffa450edef68
2013-05-31 17:07:00 +00:00
Adrian Crum 9b0094f191 Small fix for screen widget <container> element - allow expressions in the auto-update-interval attribute.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1487966 13f79535-47bb-0310-9956-ffa450edef68
2013-05-30 18:48:28 +00:00
Adrian Crum 7d7407caba New feature - Column screen widgets. This enables easy layout of multi-column screens/reports. The columns are rendered as <table> elements - so no more broken layouts caused by unpredictable floats, etc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1487587 13f79535-47bb-0310-9956-ffa450edef68
2013-05-29 18:17:46 +00:00
Adrian Crum 417a8c1d4e Screen widget XML schema cleanup first pass: remove unnecessary attribute groups.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1407843 13f79535-47bb-0310-9956-ffa450edef68
2012-11-10 16:07:58 +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
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
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
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 eec5799ce9 A patch from BJ Freeman "update tree widget xsd" https://issues.apache.org/jira/browse/OFBIZ-4329
The example were out of date and there are plenty of examples in code.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1147410 13f79535-47bb-0310-9956-ffa450edef68
2011-07-16 11:54:58 +00:00
Ashish Vijaywargiya 17f4cac6a0 Applied patch from jira issue OFBIZ-4267. Disabled attribute for lookup field should be readonly.
Lookup tag has a attribute "disabled" that is used to set disabled="disabled" property for lookup input element and it create also a clear button just after lookup field to clear the field value.
But if we set disabled="disabled" for any input field then that field does not passes as parameter and we can't accesses it from parameters or request parameters , so it should be "readonly". 
If we set readonly-"readonly" then user can't change the field value directly, and this field passes as parameters.
Only difference between readonly and disabled is that in case of disabled field does not passes as parameter buy in case of readonly field passes as a parameter.
Thanks Deepak for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1098082 13f79535-47bb-0310-9956-ffa450edef68
2011-04-30 09:05:20 +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
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 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 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
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
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
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
Jacques Le Roux 3e845d742a Fix a typo (missed a white space)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1054582 13f79535-47bb-0310-9956-ffa450edef68
2011-01-03 10:59:53 +00:00
Erwan de Ferrieres 38b593c652 OK, this one was a bad move. Reverting 1045337, until a better solution is found
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1049540 13f79535-47bb-0310-9956-ffa450edef68
2010-12-15 13:23:18 +00:00
Erwan de Ferrieres b2eafb444a Adding enumerations for the conf-mode and use-private elements. Those are used for include-portal-page. This way we can use the parameters and the file is still valid
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1045337 13f79535-47bb-0310-9956-ffa450edef68
2010-12-13 19:44:54 +00:00
Jacques Le Roux 24fe5ff37e Merges the jQuery branch back to the trunk
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1044503 13f79535-47bb-0310-9956-ffa450edef68
2010-12-10 20:40:08 +00:00
David E. Jones b720b413a1 Added new group-columns attribute to form element to not group input/other columns if not desired, defaults to true which is the old/original behavior
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1037146 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 09:32:30 +00:00
Bruno Busco 79d86ffa14 Improved include-portal-page widget.
- Changed edit-mode attribute to conf-mode
- Added a use-private attribute. This is "true" by default but can be set to "fasle" if the include-portal-page must render a specific PortalPage without checking if a derived private PortalPage copy exists (i.e. in PortalPageAdmin screens)
- Fixed Portlet attributes retrieval. After each portlet rendering the attributes are removed from the context so that another instance of the same portlet in the same PortalPage that has no attribute value specified falls back to default values and not to the values of the previous portlet.
- The up/down/left/right portlet icons use the same service used for the Portlet Drag and Drop. (This is not working yet. Needs a next commit)
- Few portlet style and labels updates


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1023197 13f79535-47bb-0310-9956-ffa450edef68
2010-10-16 06:58:25 +00:00
Bruno Busco 3bbd2d8598 Added the <include-portal-page> widget. OFBIZ-3625 https://issues.apache.org/jira/browse/OFBIZ-3625
Using this widget, a PortalPage can now be easily rendered in any screen.
At the bottom of the page an "Edit ON/OFF" button can be used to switch the PortalPage edit mode ON and OFF so that the Portal Page can be edited "in place".
All the portlet editing requests are handled using the "save-last-view" request attribute so that a dedicated screen can be shown to set the Portlet attributes and the column width and, when submitted, the user is taken back to the portal page he was editing.

Those new requests will be used in a later commit to eliminate all the duplicated ****Adm requests that have been introduced when the Webtools portal admin screen has been created.
A simple use of the widget has been added in the Example application.

TODO:
- At the moment the portal page editing is performed on the portal page itself and no portal derivation from the "main" one is performed. This will be done in a later commit.
- The portlet moving controls both manually and by drag and drop have not been implemented yet.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@998570 13f79535-47bb-0310-9956-ffa450edef68
2010-09-19 00:09:39 +00:00
Bruno Busco 9f557eae9e Added the "default-value" attribute to the "display" tag.
This allows to specify a string to be shown in a display field when it is empty.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@992441 13f79535-47bb-0310-9956-ffa450edef68
2010-09-03 19:55:08 +00:00
Erwan de Ferrieres 6d59cc8f25 reverting 989475 as it is generating too much backward compatibility issues
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@989772 13f79535-47bb-0310-9956-ffa450edef68
2010-08-26 15:41:49 +00:00
Erwan de Ferrieres d6564a8188 when using an entity-condition, the object's attribute name used in condition object parameter was not taken into account
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@989475 13f79535-47bb-0310-9956-ffa450edef68
2010-08-26 07:07:12 +00:00
Erwan de Ferrieres 063d57711c new option for fields : display-size. If a field size is longer than the specified value, then length will be cut and ... will be added. The full text will be displayed as a hint. This way, a form will not be deformed by too long fields.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@987127 13f79535-47bb-0310-9956-ffa450edef68
2010-08-19 11:12:55 +00:00
David E. Jones 5835ddaa77 Added support for parameters-map for menu widget link elements
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@966123 13f79535-47bb-0310-9956-ffa450edef68
2010-07-21 07:30:37 +00:00
Erwan de Ferrieres f8eac652a7 Allowing parameters in on-event-update-area via parameter child element
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@958228 13f79535-47bb-0310-9956-ffa450edef68
2010-06-26 14:06:39 +00:00
Jacques Le Roux 4dbc07a799 A patch from Ankit Jain "Missing "not-in" operator in condtion-expr tag." (https://issues.apache.org/jira/browse/OFBIZ-3819) - OFBIZ-3819
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@953671 13f79535-47bb-0310-9956-ffa450edef68
2010-06-11 11:44:34 +00:00
Jacques Le Roux f2297ffa9e Improves target-parameter documentation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@951672 13f79535-47bb-0310-9956-ffa450edef68
2010-06-05 08:21:14 +00:00
Jacques Le Roux 36e3342cd7 Accurate documentation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950683 13f79535-47bb-0310-9956-ffa450edef68
2010-06-02 17:37:36 +00:00
Jacques Le Roux d75fbce90a Allows to initially collapse the search screenlet of a layered lookup, default to false.
It was harder than I though because of the async nature of Ajax. So I had to use a setTimeout with a 400 ms timeout. Hopefully it will work in any environments. I chose 400 because I found it worked well on my machine, 300 also but to be sure I picked 400, 200 was too low it seems.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950481 13f79535-47bb-0310-9956-ffa450edef68
2010-06-02 10:44:16 +00:00
David E. Jones 60fb1968f8 Changed the screenlet -> initially-collapsed attribute to support string expansion, includes xsd change; this allows custom logic to determine if the screenlet should appear collapsed or not
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949880 13f79535-47bb-0310-9956-ffa450edef68
2010-05-31 22:40:19 +00:00
Jacques Le Roux 32c8b8fb72 Better documentation on client-autocomplete-field
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949839 13f79535-47bb-0310-9956-ffa450edef68
2010-05-31 19:33:55 +00:00
Jacques Le Roux 1105653227 Add documentation to description-field-name attribute in lookup
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@947005 13f79535-47bb-0310-9956-ffa450edef68
2010-05-21 13:44:41 +00:00
Jacques Le Roux 25f33ca608 Try to keep things clean (well formatted)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@942702 13f79535-47bb-0310-9956-ffa450edef68
2010-05-10 10:12:18 +00:00
Jacques Le Roux b2b396cee1 Makes things clear: documentation never hurt (when accurate)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@942668 13f79535-47bb-0310-9956-ffa450edef68
2010-05-10 06:42:28 +00:00
David E. Jones 168b7fce65 Refactored the various link getParameterList methods to return a Map and expand with the context like most of the other get methods that are used during rendering; that is the biggest change but was part of adding a parameters-map attribute to the form widget hyperlink element to be able to use a script to prepare part or all of the parameters map used in the hidden form instead of having to manually declare all parameters
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@938816 13f79535-47bb-0310-9956-ffa450edef68
2010-04-28 08:33:37 +00:00
Erwan de Ferrieres 0996aaac34 Modifying the description for accounting-number, adding the mention that it's configurable
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@938019 13f79535-47bb-0310-9956-ffa450edef68
2010-04-26 12:34:33 +00:00
Erwan de Ferrieres e268db4a97 Adding a new display type "accouting-number", which allows to display negatives in parentheses
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@937964 13f79535-47bb-0310-9956-ffa450edef68
2010-04-26 08:51:25 +00:00
Jacques Le Roux e714f96c66 Closes "Replace popup lookups by layer lookups" (https://issues.apache.org/jira/browse/OFBIZ-3442) - OFBIZ-3442
Not all cases have been resolved but this patch takes this into account and should not introduce any not known issues. These issues are identified at "Layer popup umbrella main task" (https://issues.apache.org/jira/browse/OFBIZ-3445). They will be resolved later and are actually bugs so will be committed later when fixed. They are
* "Allow to open a layer lookup from a layer lookup" (https://issues.apache.org/jira/browse/OFBIZ-3446) and its specific case "Allow to open a layer lookup from a layer lookup recursively" (https://issues.apache.org/jira/browse/OFBIZ-3693)
* "The minimize/enlarge buttons (+ -) blocks the layer" (https://issues.apache.org/jira/browse/OFBIZ-3692)
* "When you get disconnected (time out) from a layered lookup, you then get afterward ugly screens" (https://issues.apache.org/jira/browse/OFBIZ-3450)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@937852 13f79535-47bb-0310-9956-ffa450edef68
2010-04-25 18:49:01 +00:00
Andrew Zeneski d581e1f823 text-find can also include 'numeric' fields; added lessThan, greaterThan options to the schema (code support was already there)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@935687 13f79535-47bb-0310-9956-ffa450edef68
2010-04-19 18:00:24 +00:00
Scott Gray 7263531123 I can never remember if the timeout is seconds or milli-seconds, so I've added documentation to remind me.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@931774 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 04:08:47 +00:00
Erwan de Ferrieres ddc80e3cb6 Adding title for images in hyperlink field or in a field displaying an image. Use the description if exists otherwise takes the title.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929157 13f79535-47bb-0310-9956-ffa450edef68
2010-03-30 14:45:45 +00:00
Erwan de Ferrieres 14ca433955 Adding alternate tag when using hyperlink in forms. If the image is not found, then the alternate text will be displayed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926006 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 09:10:24 +00:00
Erwan de Ferrieres 245534d516 Adding description and alternate text on a field type="image"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@920770 13f79535-47bb-0310-9956-ffa450edef68
2010-03-09 10:18:54 +00:00
Jacques Le Roux 9014106755 A modified patch from Sascha Rodekamp "Some improvements for the layer lookup" (https://issues.apache.org/jira/browse/OFBIZ-3524) - OFBIZ-3524
A little fix for the faded background and make fading as default.
I have also refactored a bit the lookups examples fields

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@920061 13f79535-47bb-0310-9956-ffa450edef68
2010-03-07 19:23:42 +00:00