Сохранение настроек фильтра при нажатии на ...
This commit is contained in:
@ -1510,7 +1510,7 @@ public class DBMSRecords implements ServletContextAware {
|
||||
|
||||
//Filter options for display in the header Excel(XLS) document.
|
||||
/*
|
||||
String filter="<b>"+__("Filter_options",user)+":</b><br>";
|
||||
String filter="<b>"+trt("Filter_options",user)+":</b><br>";
|
||||
expr = xpath.compile("objects-list/filter/column");
|
||||
exprResult = expr.evaluate(nTypeR, XPathConstants.NODESET);
|
||||
nodeList = (NodeList) exprResult;
|
||||
@ -1588,8 +1588,8 @@ public class DBMSRecords implements ServletContextAware {
|
||||
writer.write(" </head>\n");
|
||||
writer.write(" <body>\n");
|
||||
|
||||
writer.write("<b>" + __(conn,"Time_and_date_of_generation",user) + ": </b><i>" + (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date())) + "</i><br>");
|
||||
writer.write("<b>" + __(conn,"Creator",user) + ": </b>" + uName);
|
||||
writer.write("<b>" + trt(conn,"Time_and_date_of_generation",user) + ": </b><i>" + (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date())) + "</i><br>");
|
||||
writer.write("<b>" + trt(conn,"Creator",user) + ": </b>" + uName);
|
||||
|
||||
//writer.write(filter);
|
||||
|
||||
@ -2156,7 +2156,7 @@ public class DBMSRecords implements ServletContextAware {
|
||||
}
|
||||
|
||||
//Перевести слово по идентификатору из базы
|
||||
public String __(Connection conn,String key,User user)
|
||||
public String trt(Connection conn,String key,User user)
|
||||
{
|
||||
String result="";
|
||||
ResultSet rs=null;
|
||||
@ -2178,26 +2178,6 @@ public class DBMSRecords implements ServletContextAware {
|
||||
if(rs!=null) try{rs.close();}catch(SQLException ex) {}
|
||||
}
|
||||
|
||||
/* закоментил так как теперь цифровые id и всё перенесено в базу
|
||||
if(result.equals(""))
|
||||
{
|
||||
if(m_props==null || !user.language_id.equals(m_props_loc))
|
||||
{
|
||||
m_props_loc = user.language_id;
|
||||
|
||||
InputStream utf8in = getClass().getClassLoader().getResourceAsStream("messages_"+m_props_loc+".properties");
|
||||
Reader reader;
|
||||
try {
|
||||
reader = new InputStreamReader(utf8in, "UTF-8");
|
||||
m_props = new Properties();
|
||||
m_props.load(reader);
|
||||
} catch (IOException ex) {
|
||||
logger.info(ex.getMessage());
|
||||
}
|
||||
}
|
||||
result = m_props.getProperty(key,"");
|
||||
}*/
|
||||
|
||||
if(result.equals(""))
|
||||
{
|
||||
result = Tools.replaceAll(key,"_", " ");
|
||||
@ -2209,14 +2189,14 @@ public class DBMSRecords implements ServletContextAware {
|
||||
public String getText(Connection conn,String text,User user) {
|
||||
int pos1 = 0;
|
||||
while (true) {
|
||||
pos1 = text.indexOf("_('", pos1);
|
||||
pos1 = text.indexOf("trt('", pos1);
|
||||
if (pos1 == -1)
|
||||
break;
|
||||
int pos2 = text.indexOf("')", pos1);
|
||||
if (pos2 == -1)
|
||||
break;
|
||||
|
||||
text = text.substring(0, pos1) + __(conn,text.substring(pos1 + 3, pos2),user) + text.substring(pos2 + 2);
|
||||
text = text.substring(0, pos1) + trt(conn,text.substring(pos1 + 5, pos2),user) + text.substring(pos2 + 2);
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user