Commit Graph
1568 Commits
Author SHA1 Message Date
Jacques Le Roux ba28208c2f A patch from simon maskell for "Paginate in screen fails" https://issues.apache.org/jira/browse/OFBIZ-5574
When you use the paginate = true in a screen and the total number of rows returned is greater than 999 the string is formatted with a coma and an exception is thrown when trying to convert it to an Integer.

jleroux: this depends on language (French would be space) but Simon's fix works for all (we are only dealing with integers there)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1577268 13f79535-47bb-0310-9956-ffa450edef68
2014-03-13 18:23:47 +00:00
Jacques Le Roux bd6c3c7dad A slightly modified patch from Rong Nguyen for "Render multiMenu problem when linktype="hidden-form"" https://issues.apache.org/jira/browse/OFBIZ-5557
Scenario:
1. Go to Content webapp
2. Go to CompDoc menuitem
3. Search
4. Go to 'Tree' view
5. We can not use 'Up' and 'Down' function

When menu with linktype="hidden-form" was render for each menu, they has the same name for form element, so it cause error.
My solution is add extra attribute(extra-index) for Menu, and then in menu definition we provide this attribute and the forms with different name will be rendered.
My implement was tested in this bug for Content webapp

jleroux: I have simply amended the up and down labels to have them more legible. I'd have preferred to not have all uppercased, but ran out of time for such a trivial change


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1576891 13f79535-47bb-0310-9956-ffa450edef68
2014-03-12 20:37:56 +00:00
Jacques Le Roux c74c991639 Thanks to Jacopo's comment on dev ML, reverts r1576331 to avoid injecting the web world in the form model, rather calls MacroFormRenderer.renderDateTimeField() method.
In my opinion a better solution would be to rewrite EditCalendarExceptionWeek and EditCalendarExceptionDay screens to replace the call to EditCalendarExceptionWeek.ftl by direct accesses to the form widgets called by it. 
But this means a lot more analysis and delicate work (here the replacement is safe), so this will be it for now.

This is for "View Calendar broken in Manufacturing" https://issues.apache.org/jira/browse/OFBIZ-5558 reported by Rong Nguyen 
Url: https://demo-trunk.ofbiz.apache.org:8443/manufacturing/control/EditCalendarExceptionDay?calendarId=SUPPLIER Calendar broken
And is related with https://issues.apache.org/jira/browse/OFBIZ-4739 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1576506 13f79535-47bb-0310-9956-ffa450edef68
2014-03-11 21:25:25 +00:00
Jacques Le Roux e762ad9e0e A slightly modified patch from Rong Nguyen for "View Calendar broken in Manufacturing" https://issues.apache.org/jira/browse/OFBIZ-5558
Url: https://demo-trunk.ofbiz.apache.org:8443/manufacturing/control/EditCalendarExceptionDay?calendarId=SUPPLIER
Calendar broken

Related with https://issues.apache.org/jira/browse/OFBIZ-4739

jleroux: formatting and some other slight issues fixed in patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1576331 13f79535-47bb-0310-9956-ffa450edef68
2014-03-11 13:26:10 +00:00
Jacques Le Roux d16055c9cc With https://issues.apache.org/jira/browse/OFBIZ-64 the default option for text-find fields was like (aka begins with, don't ask why)
Then with https://issues.apache.org/jira/browse/OFBIZ-3128 contains became the default
But this was working only when defining a text-field. When auto-fields-entity (and I guess auto-fields-service, not tested) was used then like/begins-with was still the default.

This commit changes that and makes things consistent: contains is now always used and set as default everywhere (no longer need to specify the text-field when using auto-fields-* to have contains as default)

Note: I'm not quite sure why like/begins-with was still used as default, since it was no longer the default in widget-form.xsd, but anyway making contains default there works. Also in ModelFormField.java to have things consistent

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1576276 13f79535-47bb-0310-9956-ffa450edef68
2014-03-11 10:49:31 +00:00
Jacques Le Roux 4d71caff21 Fixes a bug reported by Rong Nguyen "Error when first login and change password" https://issues.apache.org/jira/browse/OFBIZ-5564
Scenario:
 1. Load-seed
 2. Create-admin-user
 3. Access: /catalog/control/main
 4. Login
 5. Change password for the first use
 
After password change, web browser redirect user to /catalog/control/main with an error

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1575508 13f79535-47bb-0310-9956-ffa450edef68
2014-03-08 10:55:39 +00:00
Jacques Le Roux 0f80353735 A patch from Leila Mekika for "Problems in single form when use-when and position are used together" https://issues.apache.org/jira/browse/OFBIZ-5552
The service "renderSingleFormString" check the previous field position to see if the current field must be displayed after the previous field or on a new line. 

When the previous field has a use-when condition that is not valid, it remains as the currentFormField and the next field is compared with this "not rendered" field. If the position of this previous field is the same as the current field, the current is displayed on the next line.


To reproduce, add in a single form the three fields below :

<field position="1" name="first"><display description="first"/></field>
<field position="2" name="second" use-when="true"><display description="second"/></field>
<field position="2" name="second" use-when="false"><display description="second"/></field>

The field second is rendered on a new line

jleroux: this second version works correctly

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1574019 13f79535-47bb-0310-9956-ffa450edef68
2014-03-04 10:37:01 +00:00
Jacques Le Roux e28ab6bda6 Revert r1573161 (A patch from Leila Mekika for "Problems in single form when use-when and position are used together" https://issues.apache.org/jira/browse/OFBIZ-5552)
This had some side effects, like hiding the top part of the product edit screen

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1573498 13f79535-47bb-0310-9956-ffa450edef68
2014-03-03 09:49:34 +00:00
Jacques Le Roux d79ae78453 A patch from Leila Mekika for "Problems in single form when use-when and position are used together" https://issues.apache.org/jira/browse/OFBIZ-5552
The service "renderSingleFormString" check the previous field position to see if the current field must be displayed after the previous field or on a new line. 

When the previous field has a use-when condition that is not valid, it remains as the currentFormField and the next field is compared with this "not rendered" field. If the position of this previous field is the same as the current field, the current is displayed on the next line.


To reproduce, add in a single form the three fields below :

<field position="1" name="first"><display description="first"/></field>
<field position="2" name="second" use-when="true"><display description="second"/></field>
<field position="2" name="second" use-when="false"><display description="second"/></field>

The field second is rendered on a new line

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1573161 13f79535-47bb-0310-9956-ffa450edef68
2014-03-01 12:15:33 +00:00
Jacques Le Roux 0757ed8a24 A patch from Gareth Carter for "last index for paging is not calculated correctly" https://issues.apache.org/jira/browse/OFBIZ-5497
The last index (used on the last button) is not calculated correctly in ftl or the renderer classes. It currently users floor which works only for list sizes that are not multiples of the view size. When you have a list size which is a multiple of the view size, it does not subtract 1 for zero based index and therefore the last button goes to the last page + 1

Examples

listSize = 1
viewSize = 10
listSize / viewSize = 0.1
floor(0.1) = 0
This one produces the correct value

listSize = 20
viewSize = 10
listSize / viewSize = 2
floor(2) = 2
Last index should be 1 because of zero based index but never occurs

To reproduce, enter a view with a list and paging functionality, the list size must be a multiple of the view size


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1560176 13f79535-47bb-0310-9956-ffa450edef68
2014-01-21 20:53:29 +00:00
Jacques Le Roux 747a4a3154 This is a major update of jQuery and related, it contains:
jquery-1.8.2 to jquery-1.10.2 which implies using jquery-migrate-1.2.1 for plugins compatiblities
    jquery-ui-timepicker-addon-1.0.5 to jquery-ui-timepicker-addon-1.4.3 (using min now, better i18n)
    jquery-ui-1.9.0 to jquery-ui-1.10.3
    removes jquery.ui.datepicker.js now integrated in jquery.ui
    jquery.hotkeys-0.7.9 to jquery.hotkeys-0.8
    jquery.maskedinput-1.2.2 to jquery.maskedinput-1.3.1
    jquery.validate 1.10.0 to 1.11.1 
        I never realised how much efforts have been put in this plugin!  
        I fixed an issue in JsLanguageFilesMapping generation
        I removed the messages_ptbr.js and messages_ptpt.js files and the related conundrum in JsLanguageFileMappingCreator.java
        untested, found not use cases OOTB
    jquery.jcarousel ?(2006) to 0.3.0 (2013)
        untested, found not use cases OOTB
    jquery.flot 0.7 to 0.8.2 (lot of changes, still works)
        removes useless flotpie.ftl 
        removes empty flotr folder
    jquery.mobile-1.1.0-rc.1 to jquery.mobile-1.4.0
        untested, found not use cases OOTB
    jquery.cookie to jquery.cookie-1.4.0    


Removes all useless/redundant js files (not only jQuery unused old versions)
    notably removes all under images/jquery/ui/development-bundle/ui
    removes now useless GooglemapMarkers.js and GooglemapSimple.js

Flat Grey application.js
    moves jQuery(document).ready(function() at bottom (spotted in Chrome console) 
    
css
    I did not find much issues, I spotted the title bar of the lookups, but got it fixed after some efforts.    

Issues:
    Imagemanagement:  I got issues while testing, actually I'm not quite qure how it works, even in stable demo. It should be validated again. I commit nevertheless my changes:
        moves js part from product to images component
        removes useless calls to js files (mostly in imagemanagement, but not only)
        renames jquery.min.js to sizzle.min.js. 
        Inside sizzle.min.js, updates the Dojo part to v1.10.17-pre and removes the jQuery part
        changes to use ofbizContentUrl macro for generating js calls
        jquery.rotate.js NOT! It's jQueryRotateCompressed.js http://markmail.org/message/dit3dlh3ph4jnenp
        Got ERROR 22001: A truncation error was encountered trying to shrink VARCHAR 'D:\projectsASF\ofbizClean\framework\images\webapp\images\pro&' to length 100.  I opened OFBIZ-5501 for that
    I tried to update jstree  to jstree 3 but gave up. I let the jquery.jstree-3.0.0-beta3 files in place in case someone would give it a chance...
    
Not related but while a it:
    removes <!--flot example requests--> from birt controller (moved recently to example component)
    
    

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1559769 13f79535-47bb-0310-9956-ffa450edef68
2014-01-20 16:27:09 +00:00
Jacques Le Roux 3334d1b3ca A patch from Leon for "Form pagination fails if total length of search condition is more than about 2~3k bytes" https://issues.apache.org/jira/browse/OFBIZ-5478
Since it uses "GET" method to submit the pagination request, it's restricted by the URL max length limitation.
The patch attached changes the submit way from GET to "POST" if total length of URL > 2k.


jleroux: I also sort of (found after it was due to it) reverted r1204170, I don't see the reason for this now, and it was uselessly duplicating the current entry in the page size dropdown


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1559338 13f79535-47bb-0310-9956-ffa450edef68
2014-01-18 10:19:44 +00:00
Jacques Le Roux 92b42b5aef A completing patch from Olivier for "NPE thrown out while rendering disabled menu item" https://issues.apache.org/jira/browse/OFBIZ-5451
Last typo correction was'nt complete.

jleroux: this incidentally and fortunately fixes also "The Orders sub-menus don't work in Catalog and Party Profile" https://issues.apache.org/jira/browse/OFBIZ-5477

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1559328 13f79535-47bb-0310-9956-ffa450edef68
2014-01-18 08:37:58 +00:00
Jacques Le Roux c06bd63860 This fixes "Set field in (at least) widget screen does not take into account a locale for (at least) the Float type" https://issues.apache.org/jira/browse/OFBIZ-5453
It actually does more than that. It follows Adrian's proposition of improving the GeoPoint data model. 
I did not applies all of Adrian's proposition (see our conversation in the Jira issue). Feel free to apply it completely if you are inclined so. 

I will also add an entry in wiki page "Revisions Requiring Data Migration (upgrade ofbiz)" at https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=7045166

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1557447 13f79535-47bb-0310-9956-ffa450edef68
2014-01-11 19:39:23 +00:00
Jacques Le Roux 344a93d20a Fixes a typo introduced at r1553887 for "NPE thrown out while rendering disabled menu item" https://issues.apache.org/jira/browse/OFBIZ-5451
Spotted by Olivier

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1557185 13f79535-47bb-0310-9956-ffa450edef68
2014-01-10 16:43:39 +00:00
Jacques Le Roux 22cdda72c4 This closes "Set field in (at least) widget screen does not take into account a locale for (at least) the Float type" https://issues.apache.org/jira/browse/OFBIZ-5453
And definitively fixes issues with i18n of geolocation 

It introduces a "locale" attribute to the "set" operation in widget (I only tested screen, form is quite similar, should be ok) and minilang.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554681 13f79535-47bb-0310-9956-ffa450edef68
2014-01-01 21:30:12 +00:00
Jacques Le Roux ede1994465 A patch from Leon for "NPE thrown out while rendering disabled menu item" https://issues.apache.org/jira/browse/OFBIZ-5451
The method "renderLink" of new class MacroMenuRenderer calls the WidgetWorker.determineAutoLinkType. When menuItem.getDisabled() is true, the link target will be set to null and NPE occurs.

jleroux: This was related with r1517353 and r1537833. The Leon's patch fixes r1517353 and this commits also reverts r1537833


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553887 13f79535-47bb-0310-9956-ffa450edef68
2013-12-28 18:55:53 +00:00
Jacques Le Roux 4c3e9b7ec8 No functional changes:
Removes all remaining unchecked warnings
Automatically adds some @Override

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1551207 13f79535-47bb-0310-9956-ffa450edef68
2013-12-16 13:30:46 +00:00
Jacques Le Roux 576a213948 No functional changes, code improvements
Fixes some dead code entries
Automatically adds some override annotations


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1550429 13f79535-47bb-0310-9956-ffa450edef68
2013-12-12 14:53:38 +00:00
Jacques Le Roux f477c73ae7 A patch from Gareth Carter for "htmlFormMacroLibrary.ftl renderNextPrev does not calculate number of pages correctly" https://issues.apache.org/jira/browse/OFBIZ-5422
There are 2 issues with the existing code.
1 - floor is applied to viewSize only not the computed value
2 - if the listSize divides with viewSize evenly, you'll get one extra
eg
24/2=12 - no of pages = 13
24/5=4.8 - no of pages = 5

Change to correctly calculate the number of pages using ceiling rather than floor

To repoduce this I went into find party screen, search for all and manually set the view size (I had to click next and change the VIEW_SIZE parameter in the url).

In my description I mention 24/2=12 and 24/5=4.8,
24 is number of parties I had
2/5 is the view size

It does not matter what the item size is (as long as its more than 0), you just have to make sure listSize divides by viewSize evenly. In my case 24/2 divided evenly and which should have have given 12 pages but gave 13.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1550201 13f79535-47bb-0310-9956-ffa450edef68
2013-12-11 17:48:37 +00:00
Jacques Le Roux a38a21fc0a This closes "Introduce Tomcat's JreMemoryLeakPreventionListener and why" https://issues.apache.org/jira/browse/OFBIZ-5395
The idea is to avoid ThreadLocal with custom classes, this can lead to memory leaks when an external application server is used.
Reverts r1075322 (commit for OFBIZ-4107) hence removes CompilerMatcher 
Uses PatternFactory instead of CompilerMatcher class (from CompilerMatcher keeps the compiled patterns cache idea)
In UtilHttp.java
  Removes dead code
  Removes useless "UtilHttp." for class methods and constants calls (moot point, have we conventions on this?).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542960 13f79535-47bb-0310-9956-ffa450edef68
2013-11-18 09:46:35 +00:00
Adrian Crum 2a48bf829d Fixed a bug in htmlMenuMacroLibrary.ftl - menu title threw an exception.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1536217 13f79535-47bb-0310-9956-ffa450edef68
2013-10-27 23:03:54 +00:00
Adrian Crum af23fe0b35 Refactored ConfigXMLReader.java - added exception handling. The class swallowed exceptions like controller.xml file is missing or invalid - making debugging difficult. This commit introduces a WebAppConfigurationException and it propagates that exception farther up the stack.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534517 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 06:50:05 +00:00
Adrian Crum 27f77678ef New feature - add placeholder to form widget. Patch contributed by Sumit Pandit.
https://issues.apache.org/jira/browse/OFBIZ-5341


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530656 13f79535-47bb-0310-9956-ffa450edef68
2013-10-09 14:54:40 +00:00
Adrian Crum 452b13f2a3 Fixed a bug in the menu widget rendering.
https://issues.apache.org/jira/browse/OFBIZ-5326


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1525605 13f79535-47bb-0310-9956-ffa450edef68
2013-09-23 14:32:32 +00:00
Adrian Crum 252de4230f Fixed a bug in menu rendering, reported by Jacques on the dev mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524143 13f79535-47bb-0310-9956-ffa450edef68
2013-09-17 17:58:13 +00:00
Jacques Le Roux c70c41921d "Fix online help issues" https://issues.apache.org/jira/browse/OFBIZ-5320
This fixes most of the issues but some are remaining, I report them in OFBIZ-5320

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1523423 13f79535-47bb-0310-9956-ffa450edef68
2013-09-15 09:41:28 +00:00
Adrian Crum 67225263bb Refactored MacroScreenViewHandler.java so it doesn't require empty "do nothing" templates.
https://issues.apache.org/jira/browse/OFBIZ-5310


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1522002 13f79535-47bb-0310-9956-ffa450edef68
2013-09-11 19:31:14 +00:00
Adrian Crum 1395b2a431 Fixed a bug in MacroMenuRenderer.java - reported by Hans on the dev mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1517880 13f79535-47bb-0310-9956-ffa450edef68
2013-08-27 16:56:14 +00:00
Adrian Crum 1f9a6fe029 Restored rev 1517353 and fixed a trivial markup error.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1517611 13f79535-47bb-0310-9956-ffa450edef68
2013-08-26 17:09:41 +00:00
Hans Bakker 4ade9fd696 revert r1517353: it makes the tomahawk theme unusable
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1517434 13f79535-47bb-0310-9956-ffa450edef68
2013-08-26 06:28:00 +00:00
Adrian Crum 93e9949545 Converted menu widget HTML renderer to a macro renderer.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1517353 13f79535-47bb-0310-9956-ffa450edef68
2013-08-25 18:00:43 +00:00
Adrian Crum f5d21055f0 Removed unused and nonsensical method from MenuStringRenderer.java. The MenuStringRenderer instance lifecycle is a single request, so it is unlikely the user login will change in the middle of a request.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1516530 13f79535-47bb-0310-9956-ffa450edef68
2013-08-22 18:19:56 +00:00
Jacques Le Roux 1956e731a3 No functional changes, only formatting.
While looking for other cases like r1459222 and r1509164 introduced by r1300812 and r1305309. I noticed there were a lot of wrong for loops formatting (miss a white space after for), this changes it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1511742 13f79535-47bb-0310-9956-ffa450edef68
2013-08-08 12:28:01 +00:00
Jacques Le Roux 89c5b3e373 A patch from Leon for "slight patch to "other-field-size" of drop-down form element"" https://issues.apache.org/jira/browse/OFBIZ-5285
"other-field-size" of drop-down form element is a very nice feature, but it's crippled in current version.
attached a patch to make it works and added an example section for that into FormWidgetExample.

jleroux: Interesting, I did not know this feature existed, it was committed long ago by David (before ASF era) 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1511279 13f79535-47bb-0310-9956-ffa450edef68
2013-08-07 12:24:10 +00:00
Jacques Le Roux 26e2c7744a A slightly modified patch from Niclas Malin for "New elements auto-parameters-[entity/service] for link/hyperlink" https://issues.apache.org/jira/browse/OFBIZ-4472
When you want edit/remove an entity from link call it's needed to give all pk on parameter element as like :
{quote}         <field name="deleteLink">
            <hyperlink target="example_deleteExampleFeatureAppl">
                <parameter param-name="exampleId"/>
                <parameter param-name="exampleFeatureId"/>
                <parameter param-name="fromDate"/>
            <hyperlink/>
         </field>
{quote}

To simplify, I introduce auto-parameters-entity like this :
{quote}
         <field name="deleteLink">
            <hyperlink target="example_deleteExampleFeatureAppl">
                <auto-parameters-entity entity-name="ExampleFeatureAppl"/>
            <hyperlink/>
         </field>
{quote}
or 
{quote}
         <form name="ListExampleFeatureAppls" type="list" default-entity-name="ExampleFeatureAppl">
         <field name="deleteLink">
            <hyperlink target="example_deleteExampleFeatureAppl">
                <auto-parameters-entity/>
            <hyperlink/>
         </field>
{quote}
This method is inspired from auto-fields-entity and I homogenized on widget renderer screen (link), menu (link) and form (hyperlink, sub-link)

jleroux: I simply put returns in case of no dispatcher or delegator



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1506835 13f79535-47bb-0310-9956-ffa450edef68
2013-07-25 07:52:45 +00:00
Vikas Mayur 2d6b821a45 Removed redundant comment.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1504500 13f79535-47bb-0310-9956-ffa450edef68
2013-07-18 15:39:38 +00:00
Jacques Le Roux 1922c31b56 A patch from Petr Pytelka for "Czech localization (conditional.xml)" https://issues.apache.org/jira/browse/OFBIZ-5247
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1497341 13f79535-47bb-0310-9956-ffa450edef68
2013-06-27 13:13:18 +00:00
Adrian Crum b23cbb323e Fix for NPE introduced in rev 1494057, reported by Ankit Jain on the dev mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1494668 13f79535-47bb-0310-9956-ffa450edef68
2013-06-19 15:52:27 +00:00
Adrian Crum 129144e2bc Form widget sort field improvement - add the ability to specify help text on column headers.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1494057 13f79535-47bb-0310-9956-ffa450edef68
2013-06-18 07:58:25 +00:00
Jacques Le Roux 1c557fb0f7 Useless and possibly confusing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1493479 13f79535-47bb-0310-9956-ffa450edef68
2013-06-16 09:23:04 +00:00
Jacques Le Roux a07f94c3a6 A patch from Olivier Heintz for "Portal page personalization is not working" https://issues.apache.org/jira/browse/OFBIZ-5189
Two simples errors after last change from FastList to standard java List :
1) go to example component / Dasboard 
1.1) click on edit for one page
Screen is blocked
reason : 
{code}
                    for (GenericValue portalPage : portalPages) {
                        cond = EntityCondition.makeCondition(UtilMisc.toList(
                                EntityCondition.makeCondition("ownerUserLoginId", EntityOperator.EQUALS, userLoginId),
                                EntityCondition.makeCondition("originalPortalPageId", EntityOperator.EQUALS, portalPage.getString("portalPageId"))),
                                EntityOperator.AND);
                        List <GenericValue> privatePortalPages = delegator.findList("PortalPage", cond, null, null, null, false);
                        if (UtilValidate.isNotEmpty(privatePortalPages)) {
                            portalPages.remove(portalPage);
                            portalPages.add(privatePortalPages.get(0));
                        }
                    }
{code}
code iterate on a list and modify it, I don't know how it could work before ;-)
I propose to use an other list on iterate 

2) on appbarclose.ftl for tomawak theme there is
{code}
    <#assign portalPage = delegator.findOne("PortalPage", findMap, true)>
{code}
when you click to "revert to original" in dasboard screen
{code}
Error on line 45, column 5 in component://tomahawk/includes/appbarClose.ftl delegator.findOne("PortalPage", findMap, true) is undefined. It cannot be assigned to portalPage The problematic instruction: ---------- ==> assignment: portalPage=delegator.findOne("PortalPage", findMap, true) [on line 45, column 5 in component://tomahawk/includes/appbarClose.ftl] -
{code}
2.1) to see the error, modify ExampleMenus.xml and change menu-item name from "Dasboard" to "Dasboard1" 
2.2) go to example / dashboard and edit one page
2.3) click to "revert to original"
I propose to add ?if_exists 

One other bug in portal page personalization.
When trying to delete portlet or column in portal page, there is an error because in delete service, cache is used to read data before remove.

Correction proposed is to remove use-cache="true"

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1493352 13f79535-47bb-0310-9956-ffa450edef68
2013-06-15 13:40:42 +00:00
Adrian Crum e6f6163b85 Fixed a bug in MacroFormRenderer.java where UEL expressions were not evaluated in Ajax elements.
https://issues.apache.org/jira/browse/OFBIZ-5227


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1493325 13f79535-47bb-0310-9956-ffa450edef68
2013-06-15 07:56:22 +00:00
Adrian Crum d26546e774 Fixed a bug introduced in revisions 1480407 and 1481287 - form widget fields were not translated.
https://issues.apache.org/jira/browse/OFBIZ-5219


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1492112 13f79535-47bb-0310-9956-ffa450edef68
2013-06-12 08:29:41 +00:00
Jacques Le Roux d46e6023a7 Better formatting for lookup documentation while at it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1491945 13f79535-47bb-0310-9956-ffa450edef68
2013-06-11 20:30:19 +00:00
Jacques Le Roux f668e3f671 A slightly modified patch from Leon for <<Make "showDescription" of <lookup> filed configurable individually>> https://issues.apache.org/jira/browse/OFBIZ-5211
For now, It's configured globally through "widget.lookup.showDescription" in widget.properties. 
In some case, we want to disable this feature for particular <lookup> filed. So we try to make it enabled.

1. update the widget-form.xsd to add new attribute "show-description" to <lookup> filed
  * if set this attribute explicitly to true or false, then showDescription feature is enabled or disabled respectively
  * if this attribute is not set (default), then showDescription or not depends on the "widget.lookup.showDescription" setting
2. modify ModelFormField and MacroFormRenderer to make it works
3. Since we introduce individual "showDescription" configuration, the global "SHOW_DESCRIPTION" was unable to work properly. It has been replaced by dynamic values
4. Show description function depends on ajax-autocompleter, but not vice versa. That's why the condition [options.showDescription != ""] was removed from _createAjaxAutoComplete function.

jleroux: I formatted the XSD documentation and used 

showDescription = "Y".equals(UtilProperties.getPropertyValue("widget", "widget.lookup.showDescription", "Y"));
instead of
showDescription = "Y".equals(UtilProperties.getPropertyValue("widget", "widget.lookup.showDescription", "N"));

Because, in widget.properties, widget.lookup.showDescription is Y by default (and I know that well, since I made this description working correctly in all cases)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1491936 13f79535-47bb-0310-9956-ffa450edef68
2013-06-11 20:12:37 +00:00
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 c1cc2308b0 Updated the HTML DOCTYPE declaration - paving the way for HTML5.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1486831 13f79535-47bb-0310-9956-ffa450edef68
2013-05-28 09:21:36 +00:00