(OFBIZ-10601)
To improve theme management and provide better tools for new themes, we implement a method to obtain the main menu of a webapp.
Instead of just managing a menu, we extend the functionality by offering a method to expose a summary of the webapp, to simplify the navigation.
For this we add a new attribute on webapp definition app-shortcut-screen :
<webapp name="mywebapp"
...
app-shortcut-screen="component://mycomponent/widget/CommonScreens.xml#ShortcutApp"
...
/>
The idea is to define a new purpose screen *Shortcut* that contains what defines a webapp when an action or navigation has been requested. With this screen you can load a menu, a search, a complex description and use all screen powerfulness to resolve what displaying and support by theming
<screen name="ShortcutApp">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<decorator-screen name="ShortcutDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="body">
<include-menu name="MyShortcutAppBar" location="component://mycomponent/widget/CommonMenus.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
Each component are self-sufficient to define what shortcuts to display without framework change or knowledge about other component.
Each theme can implement and customize the display rendering at will.
To illustrate an example of implementation we set sub menu for each webapp defined on applications and exploit it on bluelight theme.
Thanks for Dennis Balkir, Jacques Leroux, Leila Mekika and Julien Nicolas for their involvement
(including admin) via "Forget Your Password"
(OFBIZ-4361)
Currently, any user (via ecommerce "Forget Your Password") has the ability to
reset another users password, including "admin" without permission.
By simply entering "admin" and clicking "Email Password", the following is
displayed:
The following occurred:
A new password has been created and sent to you. Please check your Email.
This now forces the user of the ERP to change their password.
It is also possible to generate a dictionary attack against ofbiz because there
is no capta code required. This is serious security risk.
I have modified the patch following comments I made in the Jira, notably
Removed unused Java variables
Removed a check in LoginEvents::forgotPassword which prevented to show error
messages
Changed fr and en SecurityExtPasswordSentToYou
+ SecurityExtThisEmailIsInResponseToYourRequestToHave labels
+ template PasswordEmail.ftl
+ loginservices.token_incorrect labels
Added fr and en SecurityExtIgnoreEmail + SecurityExtLinkOnce labels
Removed changes in general.properties
I did not remove the 2 GetSecurityQuestion.ftl files (webpos one was still in)
There is still room for improvement. I'll discuss them on the Jira and dev
ML. But this version is already strong enough to not wait that the patch is
inapplicable!
Thanks: mz4wheeler (Mike Z) for the Jira, Nicolas Malin for the patch, I guess
with some Gil's help, and all others for comments and ideas
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866478 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9241)
While working on OFBIZ-9206 I remembered how the ecommerce webapp is deeply
entrenched in some applications components. This can at least be tested with
product and catalog webapp.
Get to catalog/control/EditProduct?productId=GZ-1000
Click on the "Product Page" button => ecommerce
There are much more cases (96 occurrences actually) but most of them are not
hard dependencies.
Since the ecommerce component is now a plugin, we need to remove all ecommerce
links from applications, I even wonder if this issue is really an improvement
or should not be now considered a bug...
This is a temporary solution with a FIXME it was waiting for months and I
almost forgot it. There are better ideas in the Jira but nothing have been done
yet.
Thanks: Michael and Deepak for discussion and ideas
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857398 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10515)
Introduce a new feature that allow the impersonation of a login by an authorized user.
Add the documentation with all the details in security-impersonation.adoc.
Big thanks to Leila, Nicolas and Jacques for your contribution to this implementation.
Big thanks to Mathieu, Jacques, Pierre and Taher for your remarks and reviews that
improved this contribution quality.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1842110 13f79535-47bb-0310-9956-ffa450edef68
Five step WARNING these step is separate on many commit break all the UI
#1 Prepare the common screens to retrieve widget.properties, VisualThemeRessources and common screen location from the modelTheme
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806137 13f79535-47bb-0310-9956-ffa450edef68
Third step, move macro ftl libraries and ftl template present on framework common to common theme
At this step, the common-theme is forced like the common component previously.
Main common screens present on CommonScreens.xml, LookupScreens.xml and HelpScreens.xml are moved to common screen with a forced rewrite to common-theme
Warning this commit is going to follow with a other commit for CommonScreens.xml because LookupScreens.xml and HelpScreens.xml are recreated on common-theme, but to keep the history of CommonScreens.xml it was moved entirely, the second commit restore it with redirect call.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806091 13f79535-47bb-0310-9956-ffa450edef68
local browser.
(OFBIZ-9264)
If a time zone is already set for a user, this new feature won't override it.
The user still can set it's own time zone, but if it isn't set,
this avoids the time zone set to the default of the server.
jelroux: the momentjs license is MIT
Thanks: Francis Douet
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1788256 13f79535-47bb-0310-9956-ffa450edef68
1) Removed 'maincss.css' entry from 'allowedPaths' param of from web.xml
Reason: Since, there is no file like 'maincss.css' exist under any includes directory.
2) Removed the unused references of maincss.css from FTLs, code
<link rel="stylesheet" href="${StringUtil.wrapString(baseUrl!)}/images/maincss.css" type="text/css"/>
has been removed.
Reason: This is an interesting thing, these FTLs were using the maincss.css located under the images directory.
When I look the history of these files, following were my findings,
The 'maincss.css' file under the 'images' directory exist in release4.0
http://svn.apache.org/repos/asf/ofbiz/branches/release4.0/framework/images/webapp/images/
after this release, this files no longer exist there.
3) Also, I have updated one file 'InventoryNoticeEmail.ftl' and used the basic HTML code to style, instead of using style defined in 'maincss.css' which were exist in release-4.0
4) Updated some references from 'maincss.css' to style.css in comments.
5) Also removed the entry of including '/images/maincss.css' and '/images/mainrtl.css' in SimpleDecorator
Since, these files no longer exist after release-4.0.
Thanks Wai for reviewing the work and thanks Swapnil M Mane for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758389 13f79535-47bb-0310-9956-ffa450edef68
The TransactionTotalsPdf.pdf currently doesn't show the name of the company it has been generated for.
jleroux: I asked Pierre to check that "Aree we sure that the changes in Simple.fo.ftl are general enough? I mean did you check that they will not appear in inopportune places?"
Pierre's answer: Checked against most occurrences where the SimpleDecorator is used. A few weren't possible to check due to missing demo data.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758091 13f79535-47bb-0310-9956-ffa450edef68
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
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
In addition, add an export example button on FindExample screen and add complete macro ftl renderer unit test. Issue OFBIZ-6931 proposed by Leila Mekika. Thanks to her, jacques and pierre for theirs remarks.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746045 13f79535-47bb-0310-9956-ffa450edef68
VT_CHPWD_TMPLT_LOC for the changePassword
VT_FGPWD_TMPLT_LOC for the forgetPassword
VT_GSQUE_TMPLT_LOC for the getSecurityQuestion
Related issue OFBIZ-6868. The origin requirement came from issue OFBIZ-6843 with proposition to adding new theme with dedicate template for these previous element
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1728026 13f79535-47bb-0310-9956-ffa450edef68
jleroux: the issue description is quite lengthy so I will summarise it here, please refer to the Jira issue for details.
"When a customer creates an account on eCommerce site, s/he will also need to answer a security question. This security question then can be used by the user to reclaim her/his account in case s/he forgets her/his password. If the user correctly answers the required security question while reclaiming her/his account, her/his password will be sent through email notification. This part would work in the same way as the existing functionality of email password (forget password)."
The description was actually more ambitious (several questions, possibility for users to create own questions) but AFAIK these parts have not been implemented.
Apart updating the patch which did not merge, I got 2 majors issues (and few others I will not report here) I bypassed with workarounds.
Unlike Harsha, and as I reported earlier in the issue, I never got the username (userLoginId) back when using hidden parameters in the request body (not in requestParameters, ie UtilHttp.getParameterMap(request)), nor actually any parameters. This is maybe due to my OS (Windows7 was XP before) or my email client (Outlook Express then, now Thunderbird) or even my SMTP configuration (I used my ISP SMTP server) but most probably because I did it all on my sole machine (localhost). I tried to understand what was happening to request body parameters with http://www.telerik.com/fiddler, but finally gave up because it's even more complicated when https is in the picture. So I decided to rather use parameters in the URL (Query string). It's a bit less safe, though the password is OFBiz encrypted, and should be replaced. But it's safe enough because only the user should receive this message and even if the message is sniffed during its journey it should be hard to decrypt the password!
Harsha used the SecurityExtUiLabels.xml (created by ashish at r1618415) in securityext component but there is already a SecurityextUiLabels.xml in common component. Since I use Windows OFBiz was unable to retrieve the labels from SecurityExtUiLabels.xml since I guess it looked into a SecurityextUiLabels.xml. So I renamed a SecurityExtUiLabels.xml to EmailPassword.xml.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1716915 13f79535-47bb-0310-9956-ffa450edef68
I've been working on Jgrowl integration for a project. (https://github.com/stanlemon/jGrowl)
This allowS to display system's messages in a popup at the top of the windows even if you scroll. This is also useful for ajax call because there is no need to scroll to the top of the screen to view message.
Message can stick to the screen until it is intentionally closed by the user or not.
jleroux? as already explained in the Jira: to have it working in trunk HEAD I had to make some changes
I put the jgrowl loading in GlobalActions rather than GlobalDecorator
in showjGrowl() js function
I Added a test for if (contentMessages.length) because of an error in lookups
I did some formatting in function showjGrowl()
I used jQuery instead of $ (same for expandAllP() and expandAll() functions)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709679 13f79535-47bb-0310-9956-ffa450edef68
adding unit test that call webtools/control/WebtoolsLayoutDemo with html, text, csv, xml and fop render and detect on the stream if an FTl stacktrace is present.
The fop test is currently commented because the screenfop failed to generate WebtoolsLayoutDemo page.
To support the unit case, the screen engine has been extend to manage platform-specific : <text> and <csv>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685132 13f79535-47bb-0310-9956-ffa450edef68
adding unit test that call webtools/control/WebtoolsLayoutDemo with html, text, csv, xml and fop render and detect on the stream if an FTl stacktrace is present.
The fop test is currently commented because the screenfop failed to generate WebtoolsLayoutDemo page.
To support the unit case, the screen engine has been extend to manage platform-specific : <text> and <csv>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685124 13f79535-47bb-0310-9956-ffa450edef68
With NotoSans by default, no need to specify the NotoSans "font-family" to write special characters in examples PDF (including content called from example).
This already worked in reports because of "fop.font.family=NotoSans" in fop.properties. It's also the way to use for custom reports.
I also added <auto-embed/> like we have <auto-detect/> but I'm unsure of what it does exactly (I suppose it embeds the fonts glyphs in the PDF) because the FOP documentation is unclear about it (to say the least). If someone knows better please chime in!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1675061 13f79535-47bb-0310-9956-ffa450edef68
jleroux:
I reused Ankit's patch as a basis for this commit
I added an i18n label
Added a way to use alert() in showErrorAlertLoadUiLabel for generalising when no contentarea is present
Replaced $ call by jQuery
Used the <<name*='fromDate'>> and <<name*='thruDate'>> filters to get all cases (228 thruDate cases)
Still used only an alert, so it's only a warning, nothing coercive
There are other date couples like (estimatedStartDate, estimatedCompletionDate) and (actualStartDate, actualCompletionDate) but their values should not be enforced.
If ever someone wants to not let them free, then she just has to add the couples in FromThruDateCheck.js
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1598977 13f79535-47bb-0310-9956-ffa450edef68
Now logo image will be display over order pdf. Default value set in fop decorator not working properly, global set to true, Also added check in company header groovy, if logoImageUrl found in groovy then only set to context else default will be used.
Also set the logo width in company header fo.ftl as if logo image is large then it will throw warning related to content overflow on console.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1589669 13f79535-47bb-0310-9956-ffa450edef68
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
This is rather a defensive patch which secure json response on services calls.
It might need some changes in custom code if (not recommended) an Ajax GET response is used... The util.js scrpt is introduced for that, though normally should not be needed...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1557462 13f79535-47bb-0310-9956-ffa450edef68
What I did:
Upgraded from Google Maps API 2 to 3, which also means removing the keys in general.properties. They are no longer needed in API-3 (at least for our demo and local test uses), one worry less!
Refactored Google Maps code in geolocation.ftl: put more things in common, simplified code (the API-3 is better from this POV).
For OpenLayers, due to most browsers now rejecting mixed content (HTTP vs HTTPS), I had to follow their advice and put OpenLayers-2.13.1.js + images and theme(finally not used) in the framework. Not a big deal in term of size but again one more lib to worry about. Anyway geolocation is not vital for OFBiz. I have also added a zoom and navigation widget in maps. Note that IE warns about mixed content, but you can bypass it.
While working on editGeoLocation (in Party) I noticed it does not update the elevation. I found it was possible http://www.daftlogic.com/sandbox-google-maps-find-altitude.htm but I did not implement it, lack of time...
Also I got once a NPE in CallSimpleMapProcessor (when using editGeoLocation) but was unable to reproduce (w/o changes before and after)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554536 13f79535-47bb-0310-9956-ffa450edef68
Fortunately there is a miraculous script which helps much: date.timezone.js. I have introduced it with a getServerTimeZone service. I tested locally by setting another timezone on another machine and it worked. I will now test it on trunk, I don't expect any issues
I also cleaned the NOTICE for famfamfam
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432577 13f79535-47bb-0310-9956-ffa450edef68
* Now uses real server hour
* Renames getDependentDropdownValues.js into miscAjaxFunctions.js, that it is really
* Introduces a minimized version of date.format: date.format-1.2.3-min.js
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426904 13f79535-47bb-0310-9956-ffa450edef68
As ever, turns it's always more complicated than thought.
For instance jQuery, even with $.datepicker.formatDate, is not able to format a date + time correctly :/
So I added a new js script: date.format-1.2.3.js. It's only 4kb, I tried to compress it online, did not work, gave up.
This is pretty basic, enough for the needs and can be easily extended when more is needed
5 mins later:
Yikes, this was pretty stupid. I completly forgot about what I thought 2 weeks ago: it's from the server I need the date-time, so I need a json service.
Then, today, I completly forgot about it, and thought again: OK, it will consume less ressources w/out a service, if I only use javascript. A senior moment I guess :/
I will rewrite that later, to have the real server hour...
However, the mechanism I quickly built can still be pretty useful in some cases...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426848 13f79535-47bb-0310-9956-ffa450edef68
<set field="layoutSettings.suppressTab" value="ofbizsetup"/><!-- diseable ofbiz setup by default -->
from ApplicationDecorator to GlobalDecorator screen.
This in order to prevent showing the Setup application in all framework components (example, examplext, webtools) when demo data are loaded.
No side effects when loading only extseed data, Setup always shows (logical and tested)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337644 13f79535-47bb-0310-9956-ffa450edef68