[
http://jira.magnolia-cms.com/browse/MAGNOLIA-4488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jan Haderka reopened MAGNOLIA-4488:
-----------------------------------
{code}
boolean proceed = true;
if(process) {
{code}
Since you use the {{proceed}} only inside of the {{if(){} }} block you should
define the variable only inside. No need to create object and allocate memory
when you will not use it.
Also since all the execution code is wrapped in the {{if}} block, it might be
more readable to turn the code around and have at the top check
{code}
if (!process) {
return;
}
{code}
to make it clear that if the flag is not set, method is not executed and not to
have all other code deep in the loops.
Unrelated to the fix, but still related to the code:
Why is {{process}} defined as {{public}}?
{code}
// In case we're in preview mode, we will stop processing the document, after
the pagebar has been injected.
111 public static boolean process = true;
{code}
> When navigations are moved in an area their links are no more clickable in
> edit mode, we must switch to the preview mode if we want to navigate.
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MAGNOLIA-4488
> URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-4488
> Project: Magnolia
> Issue Type: Improvement
> Security Level: Public
> Components: page editor
> Affects Versions: 4.5
> Reporter: Samuel Schmitt
> Assignee: Ondřej Chytil
> Fix For: 4.5.5
>
> Attachments: pageeditor.patch
>
>
> It's a pain to always switch to the preview mode when we want to click on a
> navigation item.
> It be great if all the links wrapped in an element with an attribute
> {{role="navigation"}} stay clickable in the edit mode.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------