Commit Graph
16 Commits
Author SHA1 Message Date
Nicolas Malin 4a511be1cc Implemented: Homogenize displaying number with multiple format
(OFBIZ-7532)

To display a number we had different possibilities :
 * on ftl use the template <@ofbizAmount and <@ofbizCurrency
 * by java call a function UtilFormatOut.formatAmount, UtilFormatOut.formatPrice, UtilFormatOut.formatQuantity, etc..
 * by form widget, use <display type=accounting-number for accounting but nothing for other

To simplify and homogenize all, I implemented a number type purpose :
   * default: display a number by default, use when no purpose is present
   * quantity: display a number as a quantity
   * amount: display a number as an amount (like price without currency)
   * spelled: litteral displaying for a number (use on <@ofbizAmount ftl only before)
   * percentage: display a number as a percentage
   * accounting: diplay a number for accounting specific

Each purpose can be associate to a number for displaying it :
   * on ftl <@ofbizNumber number=value format=purpose/>
   * on java UtilFormatOut.formatNumber(value, purpose, delegator, locale)
   * on form widget <display type=number format=purpose/>

The format use by a purpose is define on framework/common/config/number.properties with the template
    .displaying.format = ##0.00

With this, you can surchage a configuration, create your own purpose or surchage only one through entity SystemProperty.

Concerning the backware compatibility: 
 * For the ftl the template <@ofbizAmount is now a link to '<@ofbizNumber format=amount'
 * For java all previous function call UtilFormatOut.formatNumber with the matching purpose
 * For form xml accounting-number is managed as an exection

Last point, display a currency is different that a number, so I didn't refactoring some code for this case (only move properties from general to number for centralize de configuration on the same file)

Thanks Charles Steltzlen to start the refactoring

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1864832 13f79535-47bb-0310-9956-ffa450edef68
2019-08-09 20:37:11 +00:00
Nicolas Malin a697277bbf Fixed: no functional change, correct empty body on xml element hyperlink
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803538 13f79535-47bb-0310-9956-ffa450edef68
2017-07-31 13:38:10 +00:00
Deepak Dixit d09255c0b7 Reverted: Minilang code readability and consistency improvements done at r#1768222, this commit reversed key and description of drop-down in the code.
(OFBIZ-9114)

Thanks  Wei Zhang for reporting the issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1772880 13f79535-47bb-0310-9956-ffa450edef68
2016-12-06 12:37:42 +00:00
Divesh Dutta 70eb7ff508 Improvement: Minilang code readability and consistency improvements.
(OFBIZ-8929) (OFBIZ-8930) (OFBIZ-8953) (OFBIZ-8965) (OFBIZ-8972) (OFBIZ-8986) (OFBIZ-8991) 

Thanks: Ankush Upadhyay, Anuj Jain, Abhijeet for your patches. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768222 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 14:34:00 +00:00
Divesh Dutta 738a12bec1 Improvement: Miniland code readability and consistency improvements
(OFBIZ-8744) (OFBIZ-8745) (OFBIZ-8746) (OFBIZ-8748) (OFBIZ-8829) (OFBIZ-8830) (OFBIZ-8907) (OFBIZ-8908) (OFBIZ-8924) (OFBIZ-8925) 

Thanks: Ankush Upadhyay , Sega patidar , Abhijeet Ashapure for your patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768219 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 14:14:04 +00:00
Jacques Le Roux c8ba932772 Fixes a "typo" in last commit for "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
We used targetNamespace (should only be used in schema) instead of xsi:schemaLocation



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749634 13f79535-47bb-0310-9956-ffa450edef68
2016-06-22 05:58:26 +00:00
Jacques Le Roux 89212904bd Completes and finish "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
This is the 2nd step: puts back the original names, so it will be transparent for remaining references in xml catalogs, Java code, etc.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749489 13f79535-47bb-0310-9956-ffa450edef68
2016-06-21 11:37:47 +00:00
Jacques Le Roux 4931db1ed9 Completes and finish "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061 by replacing xsd files references in xml files by -ns.xsd files and removing the concerned xsd files
This is a 1st step, in a 2nd I will put back the original names, so it will be transparent for remaining reference in xml catalogs, Java code, etc.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749488 13f79535-47bb-0310-9956-ffa450edef68
2016-06-21 11:14:16 +00:00
Jacques Le Roux 901b1a4a06 Removes tooltip="${uiLabelMap.CommonRequired}" from fields, https://issues.apache.org/jira/browse/OFBIZ-6691
Instead of a quiet S/R action, this was an unexpected pain in the ass. A considerable number of forms:
    EmployeeForms.xml
    EmploymentForms.xml
    EmplPositionForms.xml
    GlobalHRSettingForms.xml
    RecruitmentForms.xml
    QuoteForms.xml
    PartyForms.xml
    StoreForms.xml
    ContactForms.xml
    FixedAssetForms.xml
    TaskForms.xml
    scrumForms.xml
    TaskForms.xml
contained a large number of fields with 
  tooltip="${uiLabelMap.CommonRequired}"
but no 
  required-field="true"


Of course display and display-entity should not be concerned, I spotted a number of them in the lot.

I also removed a bunch of harcoded * at end of labels (those followed by required-field="true"* and spotted a number of others }*"  who still need to be carefully reviewed to see if required=true is not missing there :/

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709882 13f79535-47bb-0310-9956-ffa450edef68
2015-10-21 16:57:25 +00:00
Jacques Le Roux 7dc24b6902 A slightly modified patch from Taher Alkhateeb for <<replace widget-style="required" with required-field="true">> https://issues.apache.org/jira/browse/OFBIZ-6690
jleroux: after a cursory review, I simply did the chunk related to exampleName by hand, it needed more work. I also removed some trailing blanks.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709872 13f79535-47bb-0310-9956-ffa450edef68
2015-10-21 16:00:02 +00:00
Hans Bakker 7be06f2f43 small improvements of the programmable database export
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1520954 13f79535-47bb-0310-9956-ffa450edef68
2013-09-09 03:10:00 +00:00
Hans Bakker 2908317017 added a new menu item in webtools: 'programmable export' where interactively a groovy program can be entered to export specifc records from the database. In order to apply some global changes for re-import
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1520505 13f79535-47bb-0310-9956-ffa450edef68
2013-09-06 08:03:34 +00:00
Adrian Crum 21f9c859d7 Removed the XSD-to-Java feature. Tools to make OFBiz development easier are outside the scope of the project.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1500424 13f79535-47bb-0310-9956-ffa450edef68
2013-07-07 13:05:14 +00:00
Adrian Crum e5eb503602 New feature: Convert an XSD file to Java source code. The feature creates immutable Java object models that represent the XML file defined by the schema. It supports an optional Visitor implementation.
The feature can be accessed in Web Tools by clicking on the XSD to Java link.

The Java source code is displayed in a text area - where it can be copied-and-pasted to your IDE. The source code is fairly complete, but you will have to fill in some missing bits.

If anyone wants to adapt the feature to make it a command-line utility, then that would be welcome.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489362 13f79535-47bb-0310-9956-ffa450edef68
2013-06-04 09:52:10 +00:00
Jacques Le Roux 028b8497d8 Replaces title="${uiLabelMap.CommonEmptyHeader}" by title=" " where it's known to not be a problem. Here with links styled by widget-style="smallSubmit"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340374 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 08:48:24 +00:00
Adrian Crum 4c01ad9512 Moved new layout demo page to Webtools component. After thinking about it, Webtools seemed to be a more logical place to put it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1060219 13f79535-47bb-0310-9956-ffa450edef68
2011-01-18 07:25:06 +00:00