[ 1684142 ] Form and Viewer windows shows Info windows over role
This commit is contained in:
parent
5a688755b5
commit
8da50e3567
|
@ -45,6 +45,8 @@ import org.compiere.util.*;
|
||||||
*
|
*
|
||||||
* @author Jorg Janke
|
* @author Jorg Janke
|
||||||
* @version $Id: APanel.java,v 1.4 2006/07/30 00:51:27 jjanke Exp $
|
* @version $Id: APanel.java,v 1.4 2006/07/30 00:51:27 jjanke Exp $
|
||||||
|
*
|
||||||
|
* Colin Rooney 2007/03/20 RFE#1670185 & related BUG#1684142 - Extend Sec to Info Queries
|
||||||
*/
|
*/
|
||||||
public final class APanel extends CPanel
|
public final class APanel extends CPanel
|
||||||
implements DataStatusListener, ChangeListener, ActionListener, ASyncProcess
|
implements DataStatusListener, ChangeListener, ActionListener, ASyncProcess
|
||||||
|
@ -208,19 +210,52 @@ public final class APanel extends CPanel
|
||||||
// View
|
// View
|
||||||
JMenu mView = AEnv.getMenu("View");
|
JMenu mView = AEnv.getMenu("View");
|
||||||
menuBar.add(mView);
|
menuBar.add(mView);
|
||||||
aProduct = addAction("InfoProduct", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), false);
|
if (MRole.getDefault().isAllow_Info_Product())
|
||||||
aBPartner = addAction("InfoBPartner", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.SHIFT_MASK+Event.ALT_MASK), false);
|
{
|
||||||
if (MRole.getDefault().isShowAcct())
|
aProduct = addAction("InfoProduct", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), false);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_BPartner())
|
||||||
|
{
|
||||||
|
aBPartner = addAction("InfoBPartner", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.SHIFT_MASK+Event.ALT_MASK), false);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account())
|
||||||
|
{
|
||||||
aAccount = addAction("InfoAccount",mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), false);
|
aAccount = addAction("InfoAccount",mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), false);
|
||||||
AEnv.addMenuItem("InfoSchedule", null, null, mView, this);
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Schedule())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoSchedule", null, null, mView, this);
|
||||||
|
}
|
||||||
mView.addSeparator();
|
mView.addSeparator();
|
||||||
AEnv.addMenuItem("InfoOrder", "Info", null, mView, this);
|
if (MRole.getDefault().isAllow_Info_Order())
|
||||||
AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this);
|
{
|
||||||
AEnv.addMenuItem("InfoInOut", "Info", null, mView, this);
|
AEnv.addMenuItem("InfoOrder", "Info", null, mView, this);
|
||||||
AEnv.addMenuItem("InfoPayment", "Info", null, mView, this);
|
}
|
||||||
AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this);
|
if (MRole.getDefault().isAllow_Info_Invoice())
|
||||||
AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this);
|
{
|
||||||
AEnv.addMenuItem("InfoAsset", "Info", null, mView, this);
|
AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_InOut())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoInOut", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Payment())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoPayment", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_CashJournal())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Resource())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Asset())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoAsset", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
|
||||||
mView.addSeparator();
|
mView.addSeparator();
|
||||||
aAttachment = addAction("Attachment", mView, KeyStroke.getKeyStroke(KeyEvent.VK_F7, 0), true); // toggle
|
aAttachment = addAction("Attachment", mView, KeyStroke.getKeyStroke(KeyEvent.VK_F7, 0), true); // toggle
|
||||||
aChat = addAction("Chat", mView, null, true); // toggle
|
aChat = addAction("Chat", mView, null, true); // toggle
|
||||||
|
@ -309,7 +344,10 @@ public final class APanel extends CPanel
|
||||||
if (aWorkflow != null)
|
if (aWorkflow != null)
|
||||||
toolBar.add(aWorkflow.getButton());
|
toolBar.add(aWorkflow.getButton());
|
||||||
toolBar.add(aRequest.getButton());
|
toolBar.add(aRequest.getButton());
|
||||||
toolBar.add(aProduct.getButton());
|
if (MRole.getDefault().isAllow_Info_Product())
|
||||||
|
{
|
||||||
|
toolBar.add(aProduct.getButton());
|
||||||
|
}
|
||||||
toolBar.addSeparator();
|
toolBar.addSeparator();
|
||||||
toolBar.add(aEnd.getButton());
|
toolBar.add(aEnd.getButton());
|
||||||
//
|
//
|
||||||
|
|
|
@ -33,6 +33,9 @@ import org.compiere.util.*;
|
||||||
*
|
*
|
||||||
* @author Jorg Janke
|
* @author Jorg Janke
|
||||||
* @version $Id: FormFrame.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $
|
* @version $Id: FormFrame.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $
|
||||||
|
*
|
||||||
|
* Colin Rooney 2007/03/20 RFE#1670185 & BUG#1684142
|
||||||
|
* Extend security to Info Queries
|
||||||
*/
|
*/
|
||||||
public class FormFrame extends CFrame
|
public class FormFrame extends CFrame
|
||||||
implements ActionListener
|
implements ActionListener
|
||||||
|
@ -114,16 +117,52 @@ public class FormFrame extends CFrame
|
||||||
// View
|
// View
|
||||||
JMenu mView = AEnv.getMenu("View");
|
JMenu mView = AEnv.getMenu("View");
|
||||||
menuBar.add(mView);
|
menuBar.add(mView);
|
||||||
AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.CTRL_MASK), mView, this);
|
|
||||||
AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.SHIFT_MASK+Event.CTRL_MASK), mView, this);
|
|
||||||
AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this);
|
|
||||||
mView.addSeparator();
|
|
||||||
AEnv.addMenuItem("InfoOrder", "Info", null, mView, this);
|
|
||||||
AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this);
|
|
||||||
AEnv.addMenuItem("InfoInOut", "Info", null, mView, this);
|
|
||||||
AEnv.addMenuItem("InfoPayment", "Info", null, mView, this);
|
|
||||||
AEnv.addMenuItem("InfoSchedule", "Info", null, mView, this);
|
|
||||||
|
|
||||||
|
if (MRole.getDefault().isAllow_Info_Product())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_BPartner())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Schedule())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoSchedule", null, null, mView, this);
|
||||||
|
}
|
||||||
|
mView.addSeparator();
|
||||||
|
if (MRole.getDefault().isAllow_Info_Order())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoOrder", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Invoice())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_InOut())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoInOut", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Payment())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoPayment", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_CashJournal())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Resource())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Asset())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoAsset", "Info", null, mView, this);
|
||||||
|
}
|
||||||
// Tools
|
// Tools
|
||||||
JMenu mTools = AEnv.getMenu("Tools");
|
JMenu mTools = AEnv.getMenu("Tools");
|
||||||
menuBar.add(mTools);
|
menuBar.add(mTools);
|
||||||
|
|
|
@ -41,6 +41,8 @@ import org.adempiere.pdf.*;
|
||||||
* globalqss: integrate phib contribution from
|
* globalqss: integrate phib contribution from
|
||||||
* http://sourceforge.net/tracker/index.php?func=detail&aid=1566335&group_id=176962&atid=879334
|
* http://sourceforge.net/tracker/index.php?func=detail&aid=1566335&group_id=176962&atid=879334
|
||||||
* globalqss: integrate Teo Sarca bug fixing
|
* globalqss: integrate Teo Sarca bug fixing
|
||||||
|
* Colin Rooney 2007/03/20 RFE#1670185 & BUG#1684142
|
||||||
|
* Extend security to Info queries
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Viewer extends CFrame
|
public class Viewer extends CFrame
|
||||||
|
@ -389,16 +391,52 @@ public class Viewer extends CFrame
|
||||||
// View
|
// View
|
||||||
JMenu mView = AEnv.getMenu("View");
|
JMenu mView = AEnv.getMenu("View");
|
||||||
menuBar.add(mView);
|
menuBar.add(mView);
|
||||||
AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.CTRL_MASK), mView, this);
|
|
||||||
AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.SHIFT_MASK+Event.CTRL_MASK), mView, this);
|
|
||||||
AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this);
|
|
||||||
AEnv.addMenuItem("InfoSchedule", null, null, mView, this);
|
|
||||||
mView.addSeparator();
|
|
||||||
AEnv.addMenuItem("InfoOrder", "Info", null, mView, this);
|
|
||||||
AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this);
|
|
||||||
AEnv.addMenuItem("InfoInOut", "Info", null, mView, this);
|
|
||||||
AEnv.addMenuItem("InfoPayment", "Info", null, mView, this);
|
|
||||||
|
|
||||||
|
if (MRole.getDefault().isAllow_Info_Product())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_BPartner())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Schedule())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoSchedule", null, null, mView, this);
|
||||||
|
}
|
||||||
|
mView.addSeparator();
|
||||||
|
if (MRole.getDefault().isAllow_Info_Order())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoOrder", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Invoice())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_InOut())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoInOut", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Payment())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoPayment", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_CashJournal())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Resource())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this);
|
||||||
|
}
|
||||||
|
if (MRole.getDefault().isAllow_Info_Asset())
|
||||||
|
{
|
||||||
|
AEnv.addMenuItem("InfoAsset", "Info", null, mView, this);
|
||||||
|
}
|
||||||
// Go
|
// Go
|
||||||
JMenu mGo = AEnv.getMenu("Go");
|
JMenu mGo = AEnv.getMenu("Go");
|
||||||
menuBar.add(mGo);
|
menuBar.add(mGo);
|
||||||
|
|
Loading…
Reference in New Issue