hg merge 898f0d769f78

This commit is contained in:
Carlos Ruiz 2012-10-02 12:52:44 -05:00
commit 3a9d0ef571
4 changed files with 26 additions and 9 deletions

View File

@ -1464,13 +1464,13 @@ public class Login
}
else
{
boolean foundLockedAccount = false;
for (MUser user : users)
{
if (user.isLocked())
{
// User account ({0}) is locked, please contact the system administrator
loginErrMsg = Msg.getMsg(m_ctx, "UserAccountLocked", new Object[] {app_user});
break;
foundLockedAccount = true;
continue;
}
int count = user.getFailedLoginCount() + 1;
@ -1500,6 +1500,12 @@ public class Login
if (!user.save())
log.severe("Failed to update user record with increase failed login count");
}
if (loginErrMsg == null && foundLockedAccount)
{
// User account ({0}) is locked, please contact the system administrator
loginErrMsg = Msg.getMsg(m_ctx, "UserAccountLocked", new Object[] {app_user});
}
}
return retValue;
}

View File

@ -2535,11 +2535,8 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
gridFieldIds.add(fields[i].getAD_Field_ID());
}
if (CustomizeGridViewDialog.showCustomize(0, curTab.getAD_Tab_ID(), columnsWidth,gridFieldIds)) {
CustomizeGridViewDialog.showCustomize(0, curTab.getAD_Tab_ID(), columnsWidth,gridFieldIds,tabPanel.getGridView());
if (tabPanel.getGridView() != null) {
tabPanel.getGridView().reInit();
}
}
}
}

View File

@ -29,6 +29,7 @@ import java.util.logging.Level;
import org.adempiere.model.MTabCustomization;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Checkbox;
import org.adempiere.webui.component.GridPanel;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.ListHead;
import org.adempiere.webui.component.ListHeader;
@ -67,6 +68,7 @@ public class CustomizeGridViewPanel extends Panel
private static final long serialVersionUID = 4289328613547509587L;
private Map<Integer, String> m_columnsWidth;
ArrayList<Integer> tableSeqs;
GridPanel gridPanel = null;
/**
* Sort Tab Constructor
*
@ -562,6 +564,9 @@ public class CustomizeGridViewPanel extends Panel
m_saved = true;
FDialog.info(m_WindowNo, null, "Saved");
getParent().detach();
if(gridPanel!=null){
gridPanel.reInit();
}
} else {
FDialog.error(m_WindowNo, null, "SaveError", custom.toString());
}
@ -760,5 +765,8 @@ public class CustomizeGridViewPanel extends Panel
public boolean isSaved() {
return m_saved;
}
public void setGridPanel(GridPanel gridPanel){
this.gridPanel = gridPanel;
}
} //ADSortTab

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.Map;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.GridPanel;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.panel.CustomizeGridViewPanel;
import org.compiere.util.Env;
@ -49,6 +50,10 @@ public class CustomizeGridViewDialog extends Window {
public boolean isSaved() {
return customizePanel.isSaved();
}
public void setGridPanel(GridPanel gridPanel){
customizePanel.setGridPanel(gridPanel);
}
/**
* Show User customize (modal)
@ -56,9 +61,10 @@ public class CustomizeGridViewDialog extends Window {
* @param AD_Tab_ID
* @param columnsWidth
*/
public static boolean showCustomize (int WindowNo, int AD_Tab_ID, Map<Integer, String> columnsWidth,ArrayList<Integer> gridFieldIds)
public static boolean showCustomize (int WindowNo, int AD_Tab_ID, Map<Integer, String> columnsWidth,ArrayList<Integer> gridFieldIds,GridPanel gridPanel)
{
CustomizeGridViewDialog customizeWindow = new CustomizeGridViewDialog(WindowNo, AD_Tab_ID, Env.getAD_User_ID(Env.getCtx()), columnsWidth,gridFieldIds);
customizeWindow.setGridPanel(gridPanel);
AEnv.showWindow(customizeWindow);
return customizeWindow.isSaved();
} // showProduct