You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(104) |
Dec
(17) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(38) |
Feb
(203) |
Mar
(127) |
Apr
(194) |
May
(139) |
Jun
(237) |
Jul
(241) |
Aug
(213) |
Sep
(105) |
Oct
(227) |
Nov
(221) |
Dec
(76) |
2005 |
Jan
(228) |
Feb
(318) |
Mar
(154) |
Apr
(128) |
May
(184) |
Jun
(78) |
Jul
(150) |
Aug
(125) |
Sep
(95) |
Oct
(103) |
Nov
(153) |
Dec
(131) |
2006 |
Jan
(42) |
Feb
(138) |
Mar
(134) |
Apr
(119) |
May
(455) |
Jun
(137) |
Jul
(164) |
Aug
(146) |
Sep
(85) |
Oct
(65) |
Nov
(68) |
Dec
(60) |
2007 |
Jan
(41) |
Feb
(40) |
Mar
(62) |
Apr
(70) |
May
(85) |
Jun
(23) |
Jul
(4) |
Aug
(8) |
Sep
(19) |
Oct
(15) |
Nov
(3) |
Dec
(6) |
2008 |
Jan
(22) |
Feb
(29) |
Mar
(16) |
Apr
|
May
(9) |
Jun
(25) |
Jul
|
Aug
(9) |
Sep
(12) |
Oct
(15) |
Nov
(18) |
Dec
(7) |
2009 |
Jan
(25) |
Feb
(25) |
Mar
(21) |
Apr
(26) |
May
(18) |
Jun
(5) |
Jul
(18) |
Aug
(8) |
Sep
(8) |
Oct
(5) |
Nov
|
Dec
|
From: <max...@us...> - 2009-10-06 13:32:38
|
Revision: 3886 http://uni-d.svn.sourceforge.net/uni-d/?rev=3886&view=rev Author: max_brod Date: 2009-10-06 13:32:28 +0000 (Tue, 06 Oct 2009) Log Message: ----------- [UNI-479] Use the printer defined in the report, not always the default printer. Modified Paths: -------------- trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java Modified: trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java =================================================================== --- trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java 2009-10-06 07:23:08 UTC (rev 3885) +++ trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java 2009-10-06 13:32:28 UTC (rev 3886) @@ -255,13 +255,10 @@ is.close(); file.close(); Executable ex = new Executable(); - ex.printDocumentSilent( pdfTempFile, true ); - - /*PrintService printService=getPrintService( info.getPrinterName() ); - if (printService==null) printService= PrintServiceLookup.lookupDefaultPrintService(); - DocPrintJob printerJob = printService.createPrintJob(); - SimpleDoc simpleDoc = new SimpleDoc( new File( "C:/test.pdf" ).toURL(), DocFlavor.URL.PDF, null ); - printerJob.print( simpleDoc, null ); */ + String printerName = ""; + if ( info.getPrinterName() != null ) { printerName = " \"" + info.getPrinterName() + "\"";} + Runtime.getRuntime().exec( + "cmd /c start acrord32 /p /h /t" + " \"" + pdfTempFile + "\"" + printerName ); } return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-10-06 07:23:21
|
Revision: 3885 http://uni-d.svn.sourceforge.net/uni-d/?rev=3885&view=rev Author: max_brod Date: 2009-10-06 07:23:08 +0000 (Tue, 06 Oct 2009) Log Message: ----------- [UNI-479] Added config setting: "pdfReports" (a list of report names separated by commas) - for these reports, the report will be requested and printed as pdf. Modified Paths: -------------- trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java trunk/Uni-d/tool/src/main/java/be/unid/tool/print/configuration/PrintSectionSettings.java Modified: trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java =================================================================== --- trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java 2009-10-05 14:54:38 UTC (rev 3884) +++ trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java 2009-10-06 07:23:08 UTC (rev 3885) @@ -38,16 +38,16 @@ import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.methods.PostMethod; -import javax.print.PrintService; +import javax.print.*; import java.awt.print.PrinterJob; -import java.io.IOException; -import java.io.InputStream; -import java.io.ObjectInputStream; +import java.io.*; import java.net.URL; import java.util.ArrayList; import java.util.Enumeration; import java.util.Hashtable; +import com.lowagie.tools.Executable; + /** * Class that provides the logic of the print application * @@ -58,8 +58,10 @@ extends Worker<PrintConfiguration> { public static final String REPORT_TYPE_PRINT = "print"; + public static final String REPORT_TYPE_PDF = "pdf"; private static final int NO_RETRIES_FIND_PRINTER = 3; private static final int SLEEP_FIND_PRINTER = 10000; + private static final String DEFAULT_PDF_TEMP_FILE = "c:/tmp.pdf"; private URL reportURL; private ArrayList<String> classes; @@ -68,6 +70,8 @@ private PrintService printService; private String forcedPortraitReports[]; private String forcedLandscapeReports[]; + private String pdfReports[]; + private String pdfTempFile; public PrintWorker( PrintConfiguration cfg, Id id ) { @@ -79,6 +83,13 @@ printService = getPrintService( cfg.getPrintSectionSettings().getPrinter() ); forcedPortraitReports = cfg.getPrintSectionSettings().getForcedPortraitReports(); forcedLandscapeReports = cfg.getPrintSectionSettings().getForcedLandscapeReports(); + pdfReports = cfg.getPrintSectionSettings().getPdfReports(); + pdfTempFile = cfg.getPrintSectionSettings().getPdfTempFile(); + if ( pdfTempFile == null || pdfTempFile.length() == 0 ) + { + pdfTempFile = DEFAULT_PDF_TEMP_FILE; + if ( log.isDebugEnabled() ) log.debug( "pdfTempFile is blank. Using default." ); + } if ( log.isDebugEnabled() ) { log.debug( "Listing all existing printers:" ); @@ -161,6 +172,18 @@ { try { + boolean pdfReport = false; + if ( pdfReports != null ) + { + for ( String reportName : pdfReports ) + { + if ( reportName.equals( info.getReportName() ) ) + { + pdfReport = true; + break; + } + } + } if ( log.isDebugEnabled() ) { log.debug( "found report for printing " + info.getReportName() + " : " + info ); @@ -172,7 +195,7 @@ PostMethod post = new PostMethod( reportURL.toString() ); post.setParameter( "file", info.getReportName() ); - post.setParameter( "type", REPORT_TYPE_PRINT ); + post.setParameter( "type", ( pdfReport ) ? REPORT_TYPE_PDF : REPORT_TYPE_PRINT ); post.setParameter( "username", username ); post.setParameter( "password", password ); post.setParameter( "language", info.getReportLanguage() ); @@ -190,31 +213,56 @@ httpConn.executeMethod( post ); InputStream in = post.getResponseBodyAsStream(); - JasperPrint print = (JasperPrint) ( new ObjectInputStream( in ) ).readObject(); + if ( !pdfReport ) + { + JasperPrint print = (JasperPrint) ( new ObjectInputStream( in ) ).readObject(); - if ( print.getPages().size() == 0 ) + if ( print.getPages().size() == 0 ) + { + if ( log.isDebugEnabled() ) + { + log.debug( + "Report " + info.getReportName() + " has no pages. Report creation date: " + + info.getTime() ); + } + listener.notifyInfo( ToolListener.STATUS_ENDED, className, + i18n.txt( "nopages", workerId ) ); + listener.notifyPersistentMessage( + i18n.txt( "finished", workerId ) + " " + className + " " + + i18n.txt( "nopages", workerId ) ); + return false; + } + listener.notifyInfo( ToolListener.STATUS_ENDED, className, i18n.txt( "ok", workerId ) ); + listener + .notifyPersistentMessage( i18n.txt( "finished", workerId ) + " " + className + " " + + i18n.txt( "ok", workerId ) ); + + if ( log.isDebugEnabled() ) log.debug( "print report " + info.getReportName() + " : " + info ); + PrintService ps = getPrintService( info.getPrinterName() ); + new Printer( print, ps != null ? ps : printService ) + .print( forcedPortraitReports, forcedLandscapeReports ); + } + else { - if ( log.isDebugEnabled() ) + FileOutputStream file = new FileOutputStream( pdfTempFile ); + BufferedInputStream is = new BufferedInputStream( in ); + byte[] buf = new byte[4 * 1024]; + int bytesRead; + while ( ( bytesRead = is.read( buf ) ) != -1 ) { - log.debug( - "Report " + info.getReportName() + " has no pages. Report creation date: " + info.getTime() ); + file.write( buf, 0, bytesRead ); } - listener.notifyInfo( ToolListener.STATUS_ENDED, className, - i18n.txt( "nopages", workerId ) ); - listener.notifyPersistentMessage( - i18n.txt( "finished", workerId ) + " " + className + " " + - i18n.txt( "nopages", workerId ) ); - return false; + is.close(); + file.close(); + Executable ex = new Executable(); + ex.printDocumentSilent( pdfTempFile, true ); + + /*PrintService printService=getPrintService( info.getPrinterName() ); + if (printService==null) printService= PrintServiceLookup.lookupDefaultPrintService(); + DocPrintJob printerJob = printService.createPrintJob(); + SimpleDoc simpleDoc = new SimpleDoc( new File( "C:/test.pdf" ).toURL(), DocFlavor.URL.PDF, null ); + printerJob.print( simpleDoc, null ); */ } - listener.notifyInfo( ToolListener.STATUS_ENDED, className, i18n.txt( "ok", workerId ) ); - listener - .notifyPersistentMessage( i18n.txt( "finished", workerId ) + " " + className + " " + - i18n.txt( "ok", workerId ) ); - - if ( log.isDebugEnabled() ) log.debug( "print report " + info.getReportName() + " : " + info ); - PrintService ps = getPrintService( info.getPrinterName() ); - new Printer( print, ps != null ? ps : printService ) - .print( forcedPortraitReports, forcedLandscapeReports ); return true; } Modified: trunk/Uni-d/tool/src/main/java/be/unid/tool/print/configuration/PrintSectionSettings.java =================================================================== --- trunk/Uni-d/tool/src/main/java/be/unid/tool/print/configuration/PrintSectionSettings.java 2009-10-05 14:54:38 UTC (rev 3884) +++ trunk/Uni-d/tool/src/main/java/be/unid/tool/print/configuration/PrintSectionSettings.java 2009-10-06 07:23:08 UTC (rev 3885) @@ -55,13 +55,16 @@ public static final String INI_SETTINGS_SECTION_ATTRIBUTE_PRINTER = "printer"; public static final String INI_SETTINGS_SECTION_ATTRIBUTE_FORCED_PORTRAIT_REPORTS = "forcedPortraitReports"; public static final String INI_SETTINGS_SECTION_ATTRIBUTE_FORCED_LANDSCAPE_REPORTS = "forcedLandscapeReports"; + public static final String INI_SETTINGS_SECTION_ATTRIBUTE_PDF_REPORTS = "pdfReports"; + public static final String INI_SETTINGS_SECTION_ATTRIBUTE_PDF_TEMP_FILE = "pdfTempFile"; - private long scanPeriod; private String printer; private URL reportURL; private String forcedPortraitReports[]; private String forcedLandscapeReports[]; + private String pdfReports[]; + private String pdfTempFile; public PrintSectionSettings( INIFile ini, String sectionPrefix, SectionGeneral cfg ) throws ToolException @@ -100,13 +103,19 @@ if ( value != null ) printer = value; // forced portrait reports - value=section.get(INI_SETTINGS_SECTION_ATTRIBUTE_FORCED_PORTRAIT_REPORTS); - if (value!=null) forcedPortraitReports=value.split( ","); + value = section.get( INI_SETTINGS_SECTION_ATTRIBUTE_FORCED_PORTRAIT_REPORTS ); + if ( value != null ) forcedPortraitReports = value.split( "," ); // forced portrait reports - value=section.get(INI_SETTINGS_SECTION_ATTRIBUTE_FORCED_LANDSCAPE_REPORTS); - if (value!=null) forcedLandscapeReports=value.split( ","); + value = section.get( INI_SETTINGS_SECTION_ATTRIBUTE_FORCED_LANDSCAPE_REPORTS ); + if ( value != null ) forcedLandscapeReports = value.split( "," ); + // reports to be printed as pdf's + value = section.get( INI_SETTINGS_SECTION_ATTRIBUTE_PDF_REPORTS ); + if ( value != null ) pdfReports = value.split( "," ); + + // path to save pdf file to print + pdfTempFile = section.get( INI_SETTINGS_SECTION_ATTRIBUTE_PDF_TEMP_FILE ); } private void initURL( SectionGeneral cfg, INIFile ini, String resolvedSectionId ) @@ -167,4 +176,14 @@ { return forcedLandscapeReports; } + + public String[] getPdfReports() + { + return pdfReports; + } + + public String getPdfTempFile() + { + return pdfTempFile; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-10-05 14:54:57
|
Revision: 3884 http://uni-d.svn.sourceforge.net/uni-d/?rev=3884&view=rev Author: max_brod Date: 2009-10-05 14:54:38 +0000 (Mon, 05 Oct 2009) Log Message: ----------- Some missing translations. Modified Paths: -------------- trunk/Uni-d/template/src/main/webapp/translations-common.txt Modified: trunk/Uni-d/template/src/main/webapp/translations-common.txt =================================================================== --- trunk/Uni-d/template/src/main/webapp/translations-common.txt 2009-10-02 16:36:50 UTC (rev 3883) +++ trunk/Uni-d/template/src/main/webapp/translations-common.txt 2009-10-05 14:54:38 UTC (rev 3884) @@ -237,7 +237,9 @@ .label.fr Tous .key DeleteUntil/Alerts .label.en Delete until date +.label.nl Verwijder tot datum .label.ro Sterge pana la data +.label.fr Suppression jusqu'à la date .key message.DeleteUntilDate/Alerts .label.en Date (dd/mm/yyyy) .label.ro Data (dd/mm/yyyy) @@ -554,7 +556,9 @@ .label.fr Visualiser cautions et messages .key ShowResolved/Alerts .label.en Show resolved alerts +.label.nl Display opgeloste meldingen .label.ro Arata alertele rezolvate +.label.fr L'affichage des messages résolus .key StartPage/Uni-d-fixed .label.en Start page .label.nl Startpagina This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-10-02 16:38:14
|
Revision: 3883 http://uni-d.svn.sourceforge.net/uni-d/?rev=3883&view=rev Author: max_brod Date: 2009-10-02 16:36:50 +0000 (Fri, 02 Oct 2009) Log Message: ----------- [UNI-477] Improvements in the alerts page: -Make it possible to delete alerts. -Only option to "resolve" is available, not "ignore". Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/alerts/Alerts.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/alerts/AlertsParameters.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/alerts/dataModel/AlertsAdministrationQuery.java trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/alerts/Alerts.html trunk/Uni-d/template/src/main/webapp/translations-common.txt Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/alerts/Alerts.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/alerts/Alerts.java 2009-10-02 14:54:01 UTC (rev 3882) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/alerts/Alerts.java 2009-10-02 16:36:50 UTC (rev 3883) @@ -62,7 +62,6 @@ public abstract class Alerts extends NavigationablePageImpl<AlertsParameters> { - private static String STATUS_ALERT_IGNORED = "I"; private static String STATUS_ALERT_SOLVED = "S"; private static final Logger log = Logger.getLogger( Alerts.class ); @@ -112,10 +111,14 @@ public void setShowWarnings( boolean show ) { getPageParameters().setShowWarnings( show ); } - public String getDateIgnoreUntil() { return getPageParameters().getDateIgnoreUntil(); } + public boolean isShowResolved() { return getPageParameters().isShowResolved(); } - public void setDateIgnoreUntil( String d ) { getPageParameters().setDateIgnoreUntil( d ); } + public void setShowResolved( boolean show ) { getPageParameters().setShowResolved( show ); } + public String getDateDeleteUntil() { return getPageParameters().getDateDeleteUntil(); } + + public void setDateDeleteUntil( String d ) { getPageParameters().setDateDeleteUntil( d ); } + public boolean isUserAdministrator() { return getSessionUserAdmin().isUserAdministrator(); @@ -133,7 +136,8 @@ try { UnidSelector sel = UnidProxyAccessor.getSelector( "UnidAlert" ); - AlertsAdministrationQuery query = new AlertsAdministrationQuery( getPageParameters().isShowWarnings() ); + AlertsAdministrationQuery query = new AlertsAdministrationQuery( getPageParameters().isShowWarnings(), + getPageParameters().isShowResolved() ); if ( max > 0 ) { query.setMaxResults( max ); @@ -179,39 +183,42 @@ setStatus( STATUS_ALERT_SOLVED ); } - public void ignore() + public void delete() { - setStatus( STATUS_ALERT_IGNORED ); + List<AlertFacade> facades = getPageParameters().getResults(); + for ( AlertFacade facade : facades ) + { + if ( facade.isChecked() ) + { + try + { + facade.getProxy().removeEntityBean(); + } + catch ( Exception e ) + { + log.error( e, e ); + setError( getTranslatedExceptionMessage( e ) ); + } + } + } } - public void ignoreUntil() + public void deleteUntil() { DateTimeFormatter dateFormat = DateTimeFormat.forPattern( "dd/MM/yyyy" ); try { Timestamp t = - new Timestamp( dateFormat.parseDateTime( getDateIgnoreUntil() ).getMillis() + 24 * 60 * 60 * 1000 ); + new Timestamp( dateFormat.parseDateTime( getDateDeleteUntil() ).getMillis() + 24 * 60 * 60 * 1000 ); if ( log.isDebugEnabled() ) log.debug( "Ignoring alerts until " + t ); TextBuilder queryString = TextBuilder.newInstance(); UnidQueryImpl query = new UnidQueryImpl(); - queryString.append( "SELECT al FROM DMUnidAlertBean al WHERE (al.time<:time) AND (al.status='A')" ); + queryString.append( "DELETE FROM DMUnidAlertBean al WHERE (al.time<:time)" ); query.addParameter( "time", t ); query.setQueryString( queryString.toString() ); UnidSelector sel = UnidProxyAccessor.getSelector( "UnidAlert" ); - List<UnidProxy> proxies = sel.findUnidProxy( query ); - if ( log.isDebugEnabled() ) log.debug( "Ignoring alerts. Found " + proxies.size() ); - List<UOID> uoids = new ArrayList<UOID>(); - for ( UnidProxy proxy : proxies ) - { - uoids.add( proxy.getUOID() ); - } - for ( UOID uoid : uoids ) - { - UnidProxy proxy = sel.findUOIDProxy( uoid ); - UnidProxyAccessor.setField( proxy, "Status", String.class, STATUS_ALERT_IGNORED ); - proxy.unidUpdate(); - } + sel.unidRunUpdateQuery( query ); sel.remove(); } catch ( Exception e ) @@ -290,9 +297,9 @@ public String getJavaScriptVariables() { - return "<script language=\"JavaScript\">\n<!--\n var messageConfirmIgnoreUntilDate=\"" + - getMessage( "message.ConfirmIgnoreUntilDate" ) + "\"; var messageIgnoreUntilDate=\"" + - getMessage( "message.IgnoreUntilDate" ) + + return "<script language=\"JavaScript\">\n<!--\n var messageConfirmDeleteUntilDate=\"" + + getMessage( "message.ConfirmDeleteUntilDate" ) + "\"; var messageDeleteUntilDate=\"" + + getMessage( "message.DeleteUntilDate" ) + "\"; \n-->\n</script>"; } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/alerts/AlertsParameters.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/alerts/AlertsParameters.java 2009-10-02 14:54:01 UTC (rev 3882) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/alerts/AlertsParameters.java 2009-10-02 16:36:50 UTC (rev 3883) @@ -33,7 +33,6 @@ import org.apache.log4j.Logger; import java.util.List; -import java.sql.Date; /** * PageParameters class for the Alerts management page @@ -48,7 +47,8 @@ List<AlertFacade> results; boolean showWarnings; - String dateIgnoreUntil; + boolean showResolved; + String dateDeleteUntil; public List<AlertFacade> getResults() { @@ -75,16 +75,26 @@ this.showWarnings = showWarnings; } - public String getDateIgnoreUntil() + public String getDateDeleteUntil() { - return dateIgnoreUntil; + return dateDeleteUntil; } - public void setDateIgnoreUntil( String dateIgnoreUntil ) + public void setDateDeleteUntil( String dateDeleteUntil ) { - this.dateIgnoreUntil = dateIgnoreUntil; + this.dateDeleteUntil = dateDeleteUntil; } + public boolean isShowResolved() + { + return showResolved; + } + + public void setShowResolved( boolean showResolved ) + { + this.showResolved = showResolved; + } + @Override public AlertsParameters clone( PageParameters newParams ) { @@ -95,7 +105,8 @@ { clone.setResults( results ); } - clone.setDateIgnoreUntil( dateIgnoreUntil ); + clone.setDateDeleteUntil( dateDeleteUntil ); + clone.setShowResolved( showResolved ); return clone; } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/alerts/dataModel/AlertsAdministrationQuery.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/alerts/dataModel/AlertsAdministrationQuery.java 2009-10-02 14:54:01 UTC (rev 3882) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/alerts/dataModel/AlertsAdministrationQuery.java 2009-10-02 16:36:50 UTC (rev 3883) @@ -37,14 +37,16 @@ public class AlertsAdministrationQuery extends UnidQueryImpl { - boolean showAll; + private boolean showWarnings; + private boolean showResolved; AlertsAdministrationQuery() {/*used by deserialization*/} - public AlertsAdministrationQuery( boolean showAll ) + public AlertsAdministrationQuery( boolean showWarnings, boolean showResolved ) { super(); - this.showAll = showAll; + this.showWarnings = showWarnings; + this.showResolved = showResolved; // build query buildQueryString(); } @@ -53,13 +55,25 @@ { TextBuilder queryString = TextBuilder.newInstance(); - queryString.append( "SELECT al FROM DMUnidAlertBean al WHERE (al.status=\'A\') " ); + queryString.append( "SELECT al FROM DMUnidAlertBean al " ); - if ( !showAll ) + if ( !showWarnings ) { // show only critical alerts - queryString.append( " AND (al.alertType=\'C\') " ); + queryString.append( " WHERE (al.alertType='C') " ); } + if ( !showResolved) + { + if (showWarnings) + { + queryString.append(" WHERE "); + } + else + { + queryString.append(" AND "); + } + queryString.append(" (al.status='A') "); + } queryString.append( " ORDER BY al.unidCreationDate DESCENDING " ); this.setQueryString( queryString.toString() ); Modified: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/alerts/Alerts.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/alerts/Alerts.html 2009-10-02 14:54:01 UTC (rev 3882) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/alerts/Alerts.html 2009-10-02 16:36:50 UTC (rev 3883) @@ -1,49 +1,59 @@ <border jwcid="@Border" internationalizedTitle="message:title"> - <link type="text/css" media="all" href="css/layout.css" rel="stylesheet"></link> +<link type="text/css" media="all" href="css/layout.css" rel="stylesheet"></link> - <span jwcid="keepAlive"/> +<span jwcid="keepAlive"/> - <span class="displayError" jwcid="@Insert" value="prop:error"/> +<span class="displayError" jwcid="@Insert" value="prop:error"/> - <span jwcid="@Insert" raw="true" value="prop:javaScriptVariables"/> +<span jwcid="@Insert" raw="true" value="prop:javaScriptVariables"/> - <form jwcid="@Form" delegate="bean:validationDelegate" enctype="multipart/form-data" - clientValidationEnabled="literal:true"> +<form jwcid="@Form" delegate="bean:validationDelegate" enctype="multipart/form-data" + clientValidationEnabled="literal:true"> <span class="defaultBlock"> <span class="defaultField"> <span class="defaultFieldLabel"> - <span key="ShowWarnings"/> + <span key="ShowWarnings"/> + </span> + <span class="defaultFieldValue"> + <input jwcid="@Checkbox" value="prop:showWarnings" id="CHECKBOX_SHOW_WARNINGS"/> + </span> </span> - <span class="defaultFieldValue"> - <input jwcid="@Checkbox" value="prop:showWarnings" id="CHECKBOX_SHOW_WARNINGS"/> - </span> - </span> + + <span class="defaultField"> + <span class="defaultFieldLabel"> + <span key="ShowResolved"/> + </span> + <span class="defaultFieldValue"> + <input jwcid="@Checkbox" value="prop:showResolved" id="CHECKBOX_SHOW_RESOLVED"/> + </span> + </span> </span> - <input jwcid="@Submit" value="message:Find" action="listener:search" class="submitButton" id="BUTTON_SEARCH"/> + <input jwcid="@Submit" value="message:Find" action="listener:search" class="submitButton" id="BUTTON_SEARCH"/> <span jwcid="@If" condition="prop:userAdministrator"> - <input jwcid="@Any" type="button" value="message:IgnoreUntil" action="listener:ignoreUntil" class="submitButton" id="BUTTON_IGNORE_UNTIL" - onclick=" - var data1=prompt(messageIgnoreUntilDate); - var data2=prompt(messageConfirmIgnoreUntilDate); + <input jwcid="@Any" type="button" value="message:DeleteUntil" class="submitButton" id="BUTTON_DELETE_UNTIL" + onclick=" + var data1=prompt(messageDeleteUntilDate); + var data2=prompt(messageConfirmDeleteUntilDate); if (data1==data2 && data1!=null && data1.length==10) { var dateField=document.getElementById('TEXTFIELD_HIDDEN_DATE'); dateField.value=data1; - var buttonIgnore=document.getElementById('BUTTON_IGNORE_UNTIL_HIDDEN'); - buttonIgnore.click(); + var buttonDelete=document.getElementById('BUTTON_DELETE_UNTIL_HIDDEN'); + buttonDelete.click(); } " - /> - </span> + /> + </span> - <input jwcid="@TextField" value="prop:dateIgnoreUntil" style="display:none" id="TEXTFIELD_HIDDEN_DATE"/> - <input jwcid="@Submit" value="message:Ignore" action="listener:ignoreUntil" id="BUTTON_IGNORE_UNTIL_HIDDEN" style="display:none"/> + <input jwcid="@TextField" value="prop:dateDeleteUntil" style="display:none" id="TEXTFIELD_HIDDEN_DATE"/> + <input jwcid="@Submit" value="delete hidden" action="listener:deleteUntil" id="BUTTON_DELETE_UNTIL_HIDDEN" + style="display:none"/> <span jwcid="@If" condition="ognl:hasResults()"> <input jwcid="@Submit" value="message:Resolve" action="listener:resolve" id="BUTTON_RESOLVE"/> - <input jwcid="@Submit" value="message:Ignore" action="listener:ignore" id="BUTTON_IGNORE"/> + <input jwcid="@Submit" value="message:Delete" action="listener:delete" id="BUTTON_DELETE"/> <table border="0" width="100%"> <tr> @@ -60,7 +70,7 @@ <span jwcid="results@For" source="prop:results" value="prop:currentItem"> <tr> <td width="20%" align="left"> - <a jwcid="@NavigationLink" listener="listener:view" + <a jwcid="@NavigationLink" listener="listener:view" parameters="ognl:currentItem.proxy.UOID" class="result"> <span jwcid="@Insert" value="prop:timestamp"/> @@ -84,33 +94,32 @@ </tr> </span> </table> - <input jwcid="@Submit" value="message:Resolve" action="listener:resolve" class="submitButton" id="BUTTON_RESOLVE_2"/> - <input jwcid="@Submit" value="message:Ignore" action="listener:ignore" class="submitButton" id="BUTTON_IGNORE_2"/> + <!--input jwcid="@Submit" value="message:Resolve" action="listener:resolve" id="BUTTON_RESOLVE2"/> + <input jwcid="@Submit" value="message:Delete" action="listener:delete" id="BUTTON_DELETE2"/--> - </span> <span jwcid="@Else"> <br/> <span jwcid="@Insert" value="message:NoResults"/> </span> - </form> - <script language="JavaScript"> - <!-- - function setAll(checked) - { - parent=document.getElementsByName('alert_checked')[0]; - while(parent.tagName!='TABLE') - { - parent=parent.parentNode; - } - size=parent.getElementsByTagName("TR").length; - document.getElementsByName('alert_checked')[0].checked = checked; - for(i=0; i<size-1; i++) - { - document.getElementsByName('alert_checked_' + i)[0].checked = checked; - } - } +</form> +<script language="JavaScript"> + <!-- + function setAll(checked) + { + parent=document.getElementsByName('alert_checked')[0]; + while(parent.tagName!='TABLE') + { + parent=parent.parentNode; + } + size=parent.getElementsByTagName("TR").length; + document.getElementsByName('alert_checked')[0].checked = checked; + for(i=0; i<size-1; i++) + { + document.getElementsByName('alert_checked_' + i)[0].checked = checked; + } + } - --> - </script> + --> +</script> </border> Modified: trunk/Uni-d/template/src/main/webapp/translations-common.txt =================================================================== --- trunk/Uni-d/template/src/main/webapp/translations-common.txt 2009-10-02 14:54:01 UTC (rev 3882) +++ trunk/Uni-d/template/src/main/webapp/translations-common.txt 2009-10-02 16:36:50 UTC (rev 3883) @@ -235,13 +235,13 @@ .label.nl Alle .label.ro Selecteaza toate .label.fr Tous -.key IgnoreUntil/Alerts -.label.en Ignore until date -.label.ro Ignora pana la data -.key message.IgnoreUntilDate/Alerts +.key DeleteUntil/Alerts +.label.en Delete until date +.label.ro Sterge pana la data +.key message.DeleteUntilDate/Alerts .label.en Date (dd/mm/yyyy) .label.ro Data (dd/mm/yyyy) -.key message.ConfirmIgnoreUntilDate/Alerts +.key message.ConfirmDeleteUntilDate/Alerts .label.en Confirm date (dd/yy/mmmm) .label.ro Confirma data (dd/yy/mmmm) .key ClearAll/Alerts @@ -322,11 +322,11 @@ .key HideInactiveRecords/Uni-d-fixed .label.en Hide inactive records .label.ro Ascunde inregistrarile inactive -.key Ignore/Alerts -.label.en Ignore -.label.nl Negeer -.label.ro Ignora -.label.fr Ignorer +.key Delete/Alerts +.label.en Delete +.label.nl Verwijderen +.label.ro Sterge +.label.fr Supprimer .key Index/Uni-d-fixed .label.en Index .label.nl Index @@ -552,6 +552,9 @@ .label.nl Waarschuwingen en berichten weergeven .label.ro Arata avertismentele si mesajele .label.fr Visualiser cautions et messages +.key ShowResolved/Alerts +.label.en Show resolved alerts +.label.ro Arata alertele rezolvate .key StartPage/Uni-d-fixed .label.en Start page .label.nl Startpagina This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-10-02 14:54:09
|
Revision: 3882 http://uni-d.svn.sourceforge.net/uni-d/?rev=3882&view=rev Author: max_brod Date: 2009-10-02 14:54:01 +0000 (Fri, 02 Oct 2009) Log Message: ----------- When hide-anchors, hide the "select" link, too. Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.html Modified: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.html 2009-09-29 10:43:21 UTC (rev 3881) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.html 2009-10-02 14:54:01 UTC (rev 3882) @@ -101,10 +101,13 @@ </span> </span> - <span jwcid="@If" condition="prop:notEmbedded"> - <span jwcid="runSelect@LinkSubmit" onclick="clearValidation(this);" class="prop:selectCssStyle" - listener="listener:prepareReturnHandler" action="listener:runSelect" id="prop:selectId"> - <span key="Select"/> + + <span jwcid="@If" condition="prop:notHiddenAnchors"> + <span jwcid="@If" condition="prop:notEmbedded"> + <span jwcid="runSelect@LinkSubmit" onclick="clearValidation(this);" class="prop:selectCssStyle" + listener="listener:prepareReturnHandler" action="listener:runSelect" id="prop:selectId"> + <span key="Select"/> + </span> </span> </span> </span> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-09-29 10:43:34
|
Revision: 3881 http://uni-d.svn.sourceforge.net/uni-d/?rev=3881&view=rev Author: max_brod Date: 2009-09-29 10:43:21 +0000 (Tue, 29 Sep 2009) Log Message: ----------- New script extension, daysBetween, to calculate the number of days between 2 dates. Modified Paths: -------------- trunk/Uni-d/util/src/main/java/be/unid/util/script/DateExtension.java Modified: trunk/Uni-d/util/src/main/java/be/unid/util/script/DateExtension.java =================================================================== --- trunk/Uni-d/util/src/main/java/be/unid/util/script/DateExtension.java 2009-09-28 05:57:39 UTC (rev 3880) +++ trunk/Uni-d/util/src/main/java/be/unid/util/script/DateExtension.java 2009-09-29 10:43:21 UTC (rev 3881) @@ -303,5 +303,59 @@ } } } ); + + ext.addFunctionExtension( "daysBetween", new FSFunctionExtension() + { + public Object callFunction( String name, ArrayList params ) + throws FSException + { + if ( params.size() != 2 || !( params.get( 0 ) instanceof String ) || + !( params.get( 1 ) instanceof String ) ) + { + throw new FSException( "daysBetween(string,string) wrong parameter count/type. args=" + params ); + } + try + { + String date = (String) params.get( 0 ); + if ( date.length() != 8 ) + { + throw new FSException( "daysBetween(string,string) failed, first date parameter (" + date + + ") invalid, yyyyMMdd expected" ); + } + DateTime cal = new DateTime( + ISOChronology.getInstance().getDateTimeMillis( Integer.parseInt( date.substring( 0, 4 ) ), + Integer.parseInt( date.substring( 4, 6 ) ), + Integer.parseInt( date.substring( 6, 8 ) ), + 0 ) ); + String date2 = (String) params.get( 1 ); + if ( date2.length() != 8 ) + { + throw new FSException( "daysBetween(string,string) failed, first date parameter (" + date2 + + ") invalid, yyyyMMdd expected" ); + } + DateTime cal2 = new DateTime( + ISOChronology.getInstance().getDateTimeMillis( Integer.parseInt( date2.substring( 0, 4 ) ), + Integer.parseInt( date2.substring( 4, 6 ) ), + Integer.parseInt( date2.substring( 6, 8 ) ), + 0 ) ); + + if ( cal2.getMillis() < cal.getMillis() ) + { + DateTime tmp = cal; + cal = cal2; + cal2 = tmp; + } + + Period p = new Period( cal.getMillis(), cal2.getMillis(), PeriodType.days() ); + return p.getDays(); + } + catch ( Exception ex ) + { + throw new FSException( "monthsBetween(string,string) failed, date invalid?", ex ); + } + } + } ); } + + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-09-28 05:57:47
|
Revision: 3880 http://uni-d.svn.sourceforge.net/uni-d/?rev=3880&view=rev Author: max_brod Date: 2009-09-28 05:57:39 +0000 (Mon, 28 Sep 2009) Log Message: ----------- [UNI-473] Change the print-tool to not stop at first report with an error and display the creation timestamp. Modified Paths: -------------- trunk/Uni-d/tool/src/main/java/be/unid/tool/print/provider/ReportPrintInfo.java Modified: trunk/Uni-d/tool/src/main/java/be/unid/tool/print/provider/ReportPrintInfo.java =================================================================== --- trunk/Uni-d/tool/src/main/java/be/unid/tool/print/provider/ReportPrintInfo.java 2009-09-27 18:14:31 UTC (rev 3879) +++ trunk/Uni-d/tool/src/main/java/be/unid/tool/print/provider/ReportPrintInfo.java 2009-09-28 05:57:39 UTC (rev 3880) @@ -30,6 +30,8 @@ import org.joda.time.format.DateTimeFormatter; import java.util.Hashtable; +import java.sql.Date; +import java.sql.Timestamp; /** * Interface for classes with info needed for printing reports @@ -51,4 +53,6 @@ public Hashtable<String, String> getParameters(); public UOID getUoid(); + + public Timestamp getTime(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-09-27 18:14:46
|
Revision: 3879 http://uni-d.svn.sourceforge.net/uni-d/?rev=3879&view=rev Author: max_brod Date: 2009-09-27 18:14:31 +0000 (Sun, 27 Sep 2009) Log Message: ----------- [UNI-473] Change the print-tool to not stop at first report with an error and display the creation timestamp. Modified Paths: -------------- trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java Modified: trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java =================================================================== --- trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java 2009-09-26 08:19:14 UTC (rev 3878) +++ trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java 2009-09-27 18:14:31 UTC (rev 3879) @@ -119,60 +119,11 @@ if ( log.isDebugEnabled() ) log.debug( "start loop to print reports" ); for ( ReportPrintInfo info : provider.getReports() ) { - if ( log.isDebugEnabled() ) - { - log.debug( "found report for printing " + info.getReportName() + " : " + info ); - } - HttpClient httpConn = new HttpClient(); - // set timeout to 5 min - httpConn.setConnectionTimeout( 5 * 60000 ); - httpConn.setTimeout( 5 * 60000 ); - PostMethod post = new PostMethod( reportURL.toString() ); - post.setParameter( "file", info.getReportName() ); - post.setParameter( "type", REPORT_TYPE_PRINT ); - post.setParameter( "username", username ); - post.setParameter( "password", password ); - post.setParameter( "language", info.getReportLanguage() ); - - Hashtable<String, String> parameters = info.getParameters(); - Enumeration<String> keys = parameters.keys(); - while ( keys.hasMoreElements() ) + if ( !printOneReport( info, classes.get( i ) ) ) { - String param = keys.nextElement(); - String value = parameters.get( param ); - post.setParameter( param, value ); + continue; } - - if ( log.isDebugEnabled() ) log.debug( "fill report " + info.getReportName() + " : " + info ); - httpConn.executeMethod( post ); - InputStream in = post.getResponseBodyAsStream(); - - JasperPrint print = (JasperPrint) ( new ObjectInputStream( in ) ).readObject(); - - if ( print.getPages().size() == 0 ) - { - if ( log.isDebugEnabled() ) - { - log.debug( "report has no pages " + info.getReportName() + " : " + info ); - } - listener.notifyInfo( ToolListener.STATUS_ENDED, classes.get( i ), - i18n.txt( "nopages", workerId ) ); - listener.notifyPersistentMessage( - i18n.txt( "finished", workerId ) + " " + classes.get( i ) + " " + - i18n.txt( "nopages", workerId ) ); - return; - } - listener.notifyInfo( ToolListener.STATUS_ENDED, classes.get( i ), i18n.txt( "ok", workerId ) ); - listener - .notifyPersistentMessage( i18n.txt( "finished", workerId ) + " " + classes.get( i ) + " " + - i18n.txt( "ok", workerId ) ); - - if ( log.isDebugEnabled() ) log.debug( "print report " + info.getReportName() + " : " + info ); - PrintService ps = getPrintService( info.getPrinterName() ); - new Printer( print, ps != null ? ps : printService ) - .print( forcedPortraitReports, forcedLandscapeReports ); - // add report infos in order to perform the postPrint actions(update/delete) printedReports.add( info ); if ( log.isDebugEnabled() ) @@ -187,18 +138,6 @@ listener.notifyInfo( ToolListener.STATUS_ENDED, classes.get( i ), cnfe.toString() ); throw new ToolException( "problems using the class " + classes.get( i ), cnfe ); } - catch ( JRException jre ) - { - if ( log.isDebugEnabled() ) log.debug( jre, jre ); - listener.notifyInfo( ToolListener.STATUS_ENDED, classes.get( i ), jre.toString() ); - throw new ToolException( "problems printing ", jre ); - } - catch ( IOException ioe ) - { - if ( log.isDebugEnabled() ) log.debug( ioe, ioe ); - listener.notifyInfo( ToolListener.STATUS_ENDED, classes.get( i ), ioe.toString() ); - throw new ToolException( "problems reading report", ioe ); - } catch ( Exception e ) { if ( log.isDebugEnabled() ) log.debug( e, e ); @@ -218,6 +157,74 @@ setWorking( false ); } + private boolean printOneReport( ReportPrintInfo info, String className ) + { + try + { + if ( log.isDebugEnabled() ) + { + log.debug( "found report for printing " + info.getReportName() + " : " + info ); + } + HttpClient httpConn = new HttpClient(); + // set timeout to 5 min + httpConn.setConnectionTimeout( 5 * 60000 ); + httpConn.setTimeout( 5 * 60000 ); + PostMethod post = new PostMethod( reportURL.toString() ); + post.setParameter( "file", info.getReportName() ); + + post.setParameter( "type", REPORT_TYPE_PRINT ); + post.setParameter( "username", username ); + post.setParameter( "password", password ); + post.setParameter( "language", info.getReportLanguage() ); + + Hashtable<String, String> parameters = info.getParameters(); + Enumeration<String> keys = parameters.keys(); + while ( keys.hasMoreElements() ) + { + String param = keys.nextElement(); + String value = parameters.get( param ); + post.setParameter( param, value ); + } + + if ( log.isDebugEnabled() ) log.debug( "fill report " + info.getReportName() + " : " + info ); + httpConn.executeMethod( post ); + InputStream in = post.getResponseBodyAsStream(); + + JasperPrint print = (JasperPrint) ( new ObjectInputStream( in ) ).readObject(); + + if ( print.getPages().size() == 0 ) + { + if ( log.isDebugEnabled() ) + { + log.debug( + "Report " + info.getReportName() + " has no pages. Report creation date: " + info.getTime() ); + } + listener.notifyInfo( ToolListener.STATUS_ENDED, className, + i18n.txt( "nopages", workerId ) ); + listener.notifyPersistentMessage( + i18n.txt( "finished", workerId ) + " " + className + " " + + i18n.txt( "nopages", workerId ) ); + return false; + } + listener.notifyInfo( ToolListener.STATUS_ENDED, className, i18n.txt( "ok", workerId ) ); + listener + .notifyPersistentMessage( i18n.txt( "finished", workerId ) + " " + className + " " + + i18n.txt( "ok", workerId ) ); + + if ( log.isDebugEnabled() ) log.debug( "print report " + info.getReportName() + " : " + info ); + PrintService ps = getPrintService( info.getPrinterName() ); + new Printer( print, ps != null ? ps : printService ) + .print( forcedPortraitReports, forcedLandscapeReports ); + return true; + + } + catch ( Exception e ) + { + log.error( "Problem printing report " + info.getReportName() + " from " + info.getTime(), e ); + } + return false; + } + private PrintService getPrintService( String printer ) { if ( log.isDebugEnabled() ) log.debug( "looking for printer: " + printer ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-09-26 08:19:25
|
Revision: 3878 http://uni-d.svn.sourceforge.net/uni-d/?rev=3878&view=rev Author: max_brod Date: 2009-09-26 08:19:14 +0000 (Sat, 26 Sep 2009) Log Message: ----------- The progress info pages shows some "initialization" message if it hasn't start yet to receive message from the main working window. Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.java trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.html trunk/Uni-d/template/src/main/webapp/translations-common.txt Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.java 2009-09-25 15:57:23 UTC (rev 3877) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.java 2009-09-26 08:19:14 UTC (rev 3878) @@ -95,7 +95,7 @@ { if ( ( session.getAttribute( actionStatusName ) ).equals( ACTION_STATUS_WORKING ) ) { - setActionInfo( (String) session.getAttribute( actionInfoName ) ); + setActionInfo( (String) session.getAttribute( actionInfoName ) ); } else if ( ( session.getAttribute( actionStatusName ) ).equals( ACTION_STATUS_DONE ) ) { @@ -104,4 +104,9 @@ } } + + public String getActionInfo2() + { + return ( getActionInfo() != null ) ? getActionInfo() : getMessages().getMessage( "Initialization" ); + } } Modified: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.html 2009-09-25 15:57:23 UTC (rev 3877) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.html 2009-09-26 08:19:14 UTC (rev 3878) @@ -61,7 +61,7 @@ <form jwcid="@Form" delegate="bean:validationDelegate" enctype="multipart/form-data"> <span jwcid="ACTION_ID@TextField" value="prop:actionId" style="display:none"/> <span jwcid="ACTION_FINISHED@Checkbox" value="prop:actionFinished" style="display:none"/> - <span jwcid="@Insert" value="prop:actionInfo" raw="true"/> + <span jwcid="@Insert" value="prop:actionInfo2" raw="true"/> <span jwcid="BUTTON_SUBMIT@Submit" style="display:none" action="listener:restart"/> </form> </center> Modified: trunk/Uni-d/template/src/main/webapp/translations-common.txt =================================================================== --- trunk/Uni-d/template/src/main/webapp/translations-common.txt 2009-09-25 15:57:23 UTC (rev 3877) +++ trunk/Uni-d/template/src/main/webapp/translations-common.txt 2009-09-26 08:19:14 UTC (rev 3878) @@ -1099,5 +1099,10 @@ .label.nl Scannen .label.ro Scaneaza .label.fr Scannez +.key Initialization/ProgressInfoPage +.label.en Initialization... +.label.nl Initialisering... +.label.ro Initializare... +.label.fr initialisation... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-09-25 15:57:41
|
Revision: 3877 http://uni-d.svn.sourceforge.net/uni-d/?rev=3877&view=rev Author: max_brod Date: 2009-09-25 15:57:23 +0000 (Fri, 25 Sep 2009) Log Message: ----------- Other attempt to prevent the history text area from shrinking. Modified Paths: -------------- trunk/Uni-d/tool/src/main/java/be/unid/tool/shared/ui/ToolClientDisplay.java Modified: trunk/Uni-d/tool/src/main/java/be/unid/tool/shared/ui/ToolClientDisplay.java =================================================================== --- trunk/Uni-d/tool/src/main/java/be/unid/tool/shared/ui/ToolClientDisplay.java 2009-09-25 15:50:44 UTC (rev 3876) +++ trunk/Uni-d/tool/src/main/java/be/unid/tool/shared/ui/ToolClientDisplay.java 2009-09-25 15:57:23 UTC (rev 3877) @@ -127,19 +127,13 @@ constr.insets = new Insets( 10, 0, 10, 0 ); infoPanel.add( info, constr ); - JPanel historyPanel = new JPanel( new GridBagLayout() ); - historyPanel.setBorder( new EtchedBorder() ); - historyPanel.add( new JLabel( i18n.txt( "history", appId ) ) ); - constr.gridy = 1; - constr.insets = new Insets( 10, 0, 10, 0 ); JScrollPane historyScrollPane=new JScrollPane(history); historyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); historyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); - historyPanel.add( historyScrollPane, constr ); - + getContentPane().add( statusPanel );//, BorderLayout.NORTH ); getContentPane().add( infoPanel );//, BorderLayout.CENTER ); - getContentPane().add( historyPanel );//, BorderLayout.SOUTH ); + getContentPane().add( historyScrollPane );//, BorderLayout.SOUTH ); pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-09-25 15:50:58
|
Revision: 3876 http://uni-d.svn.sourceforge.net/uni-d/?rev=3876&view=rev Author: max_brod Date: 2009-09-25 15:50:44 +0000 (Fri, 25 Sep 2009) Log Message: ----------- In the Tool window, show the scrollbars for the history panel from the begining (with vert. scrollbar appearing when it's needed, the textarea shrinked). Modified Paths: -------------- trunk/Uni-d/tool/src/main/java/be/unid/tool/shared/ui/ToolClientDisplay.java Modified: trunk/Uni-d/tool/src/main/java/be/unid/tool/shared/ui/ToolClientDisplay.java =================================================================== --- trunk/Uni-d/tool/src/main/java/be/unid/tool/shared/ui/ToolClientDisplay.java 2009-09-25 08:18:05 UTC (rev 3875) +++ trunk/Uni-d/tool/src/main/java/be/unid/tool/shared/ui/ToolClientDisplay.java 2009-09-25 15:50:44 UTC (rev 3876) @@ -132,7 +132,10 @@ historyPanel.add( new JLabel( i18n.txt( "history", appId ) ) ); constr.gridy = 1; constr.insets = new Insets( 10, 0, 10, 0 ); - historyPanel.add( new JScrollPane( history ), constr ); + JScrollPane historyScrollPane=new JScrollPane(history); + historyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); + historyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); + historyPanel.add( historyScrollPane, constr ); getContentPane().add( statusPanel );//, BorderLayout.NORTH ); getContentPane().add( infoPanel );//, BorderLayout.CENTER ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-09-25 08:18:20
|
Revision: 3875 http://uni-d.svn.sourceforge.net/uni-d/?rev=3875&view=rev Author: max_brod Date: 2009-09-25 08:18:05 +0000 (Fri, 25 Sep 2009) Log Message: ----------- List all existing printers in Tool-Print, useful especially at instalation. Modified Paths: -------------- trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java Modified: trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java =================================================================== --- trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java 2009-09-24 14:59:15 UTC (rev 3874) +++ trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java 2009-09-25 08:18:05 UTC (rev 3875) @@ -79,6 +79,15 @@ printService = getPrintService( cfg.getPrintSectionSettings().getPrinter() ); forcedPortraitReports = cfg.getPrintSectionSettings().getForcedPortraitReports(); forcedLandscapeReports = cfg.getPrintSectionSettings().getForcedLandscapeReports(); + if ( log.isDebugEnabled() ) + { + log.debug( "Listing all existing printers:" ); + for ( PrintService service : PrinterJob.lookupPrintServices() ) + { + log.debug( service.getName() ); + } + log.debug( "Done, these were all printers." ); + } } public void doTheWork() @@ -90,7 +99,7 @@ if ( stopRequested ) return; listener.notifyStatus( ToolListener.STATUS_STARTED, classes.get( i ) ); - listener.notifyPersistentMessage( i18n.txt( "started", workerId )+" " + classes.get( i ) ); + listener.notifyPersistentMessage( i18n.txt( "started", workerId ) + " " + classes.get( i ) ); ReportProvider provider; ArrayList<ReportPrintInfo> printedReports = new ArrayList<ReportPrintInfo>(); @@ -150,12 +159,14 @@ listener.notifyInfo( ToolListener.STATUS_ENDED, classes.get( i ), i18n.txt( "nopages", workerId ) ); listener.notifyPersistentMessage( - i18n.txt( "finished", workerId ) + " "+classes.get( i ) + " " + i18n.txt( "nopages", workerId ) ); + i18n.txt( "finished", workerId ) + " " + classes.get( i ) + " " + + i18n.txt( "nopages", workerId ) ); return; } listener.notifyInfo( ToolListener.STATUS_ENDED, classes.get( i ), i18n.txt( "ok", workerId ) ); listener - .notifyPersistentMessage( i18n.txt( "finished", workerId )+" " + classes.get( i ) + " " + i18n.txt( "ok", workerId ) ); + .notifyPersistentMessage( i18n.txt( "finished", workerId ) + " " + classes.get( i ) + " " + + i18n.txt( "ok", workerId ) ); if ( log.isDebugEnabled() ) log.debug( "print report " + info.getReportName() + " : " + info ); PrintService ps = getPrintService( info.getPrinterName() ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-09-24 14:59:42
|
Revision: 3874 http://uni-d.svn.sourceforge.net/uni-d/?rev=3874&view=rev Author: max_brod Date: 2009-09-24 14:59:15 +0000 (Thu, 24 Sep 2009) Log Message: ----------- New page, to show progress of a long-working page in a popup. Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/resources/Uni-d-tapestry.library Added Paths: ----------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/progressInfo/ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.java trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/progressInfo/ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.html Added: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.java (rev 0) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.java 2009-09-24 14:59:15 UTC (rev 3874) @@ -0,0 +1,107 @@ +/** + * This file is part of the Uni-d project. + * $Id$ + * + * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF + * ANY KIND, either express or implied. See the License for the specific language governing rights and + * limitations under the License. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + */ +package be.unid.tapestry.pages.progressInfo; + +import be.unid.tapestry.pages.actionResult.ActionResultPageParams; +import be.unid.tapestry.navigation.NavigationablePageImpl; +import be.unid.tapestry.util.UnidFormValidator; +import org.apache.tapestry.event.PageBeginRenderListener; +import org.apache.tapestry.event.PageEvent; +import org.apache.tapestry.annotations.Bean; +import org.apache.tapestry.valid.ValidationDelegate; +import org.apache.log4j.Logger; + +import javax.servlet.http.HttpSession; + +/** + * A page to be used like a popup, to give some progress info, while something is running + * in the background + * + * @author Florin + * @version $Revision$ + */ +public abstract class ProgressInfoPage + extends NavigationablePageImpl + implements PageBeginRenderListener +{ + private static final Logger log = Logger.getLogger( ProgressInfoPage.class ); + + public static final java.lang.String ACTION_STATUS_NAME_PREFIX = "action_status"; + public static final java.lang.String ACTION_INFO_NAME_PREFIX = "action_info"; + public static final java.lang.String ACTION_STATUS_WORKING = "working"; + public static final java.lang.String ACTION_STATUS_DONE = "done"; + + @Bean( UnidFormValidator.class ) + public abstract ValidationDelegate getValidationDelegate(); + + public abstract String getActionId(); + + public abstract void setActionId( String actionId ); + + public abstract boolean isActionFinished(); + + public abstract void setActionFinished( boolean finished ); + + public abstract String getActionInfo(); + + public abstract void setActionInfo( String info ); + + public void pageBeginRender( PageEvent pageEvent ) + { + String actionId = getRequestCycle().getParameter( "actionId" ); + if ( actionId != null ) + { + setActionId( actionId ); + } + super.pageBeginRender( + pageEvent ); //To change body of overridden methods use File | Settings | File Templates. + } + + public void restart() + { + HttpSession session = getHttpServletRequest().getSession(); + + String actionStatusName = ACTION_STATUS_NAME_PREFIX + getActionId(); + String actionInfoName = ACTION_INFO_NAME_PREFIX + getActionId(); + + if ( session.getAttribute( actionStatusName ) == null ) + { + setActionFinished( true ); + log.error( "Internal error: session.getAttribute(" + actionStatusName + ")==null" ); + } + else + { + if ( ( session.getAttribute( actionStatusName ) ).equals( ACTION_STATUS_WORKING ) ) + { + setActionInfo( (String) session.getAttribute( actionInfoName ) ); + } + else if ( ( session.getAttribute( actionStatusName ) ).equals( ACTION_STATUS_DONE ) ) + { + setActionFinished( true ); + } + + } + } +} Property changes on: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/Uni-d/tapestry/src/main/resources/Uni-d-tapestry.library =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/Uni-d-tapestry.library 2009-08-31 07:05:30 UTC (rev 3873) +++ trunk/Uni-d/tapestry/src/main/resources/Uni-d-tapestry.library 2009-09-24 14:59:15 UTC (rev 3874) @@ -33,6 +33,7 @@ be.unid.tapestry.pages.tableManager, be.unid.tapestry.pages.tablesIndex, be.unid.tapestry.pages.tablesCategoryIndex, + be.unid.tapestry.pages.progressInfo, be.unid.tapestry.pages.reportsCategoryIndex, be.unid.tapestry.pages.view, be.unid.tapestry.pages.userAdmin.adminMenu, Added: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.html (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/pages/progressInfo/ProgressInfoPage.html 2009-09-24 14:59:15 UTC (rev 3874) @@ -0,0 +1,71 @@ +<span jwcid="$remove$"> +This file is part of the Uni-d project. +$Id: ActionResultPage.html 3444 2007-05-11 13:51:31Z pushkutza $ + +The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at http://www.mozilla.org/MPL/ + +Code generated by applying this template can be freely used. + +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF +ANY KIND, either express or implied. See the License for the specific language governing rights and +limitations under the License. + +Alternatively, the contents of this file may be used under the terms of +either the GNU General Public License Version 2 or later (the "GPL"), or +the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +in which case the provisions of the GPL or the LGPL are applicable instead +of those above. If you wish to allow use of your version of this file only +under the terms of either the GPL or the LGPL, and not to allow others to +use your version of this file under the terms of the MPL, indicate your +decision by deleting the provisions above and replace them with the notice +and other provisions required by the GPL or the LGPL. If you do not delete +the provisions above, a recipient may use your version of this file under +the terms of any one of the MPL, the GPL or the LGPL. + +A page to be used like a popup, to give some progress info, while something is running + in the background + +Contributor(s): +@author Florin + +@version $Revision: 3444 $ +</span> + +<html> +<script> + window.onload = function() + { + var actionFinished = document.getElementById("ACTION_FINISHED"); + if ( actionFinished.checked ) + { + window.close(); + } + else + { + setTimeout("go_now()", 1000); + } + } + + function go_now() + { + document.getElementById("BUTTON_SUBMIT").click(); + } +</script> + +<body jwcid="@Body"> +<span jwcid="keepAlive"/> + +<center> + <form jwcid="@Form" delegate="bean:validationDelegate" enctype="multipart/form-data"> + <span jwcid="ACTION_ID@TextField" value="prop:actionId" style="display:none"/> + <span jwcid="ACTION_FINISHED@Checkbox" value="prop:actionFinished" style="display:none"/> + <span jwcid="@Insert" value="prop:actionInfo" raw="true"/> + <span jwcid="BUTTON_SUBMIT@Submit" style="display:none" action="listener:restart"/> + </form> +</center> + + +</body> +</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-08-31 08:54:22
|
Revision: 3873 http://uni-d.svn.sourceforge.net/uni-d/?rev=3873&view=rev Author: max_brod Date: 2009-08-31 07:05:30 +0000 (Mon, 31 Aug 2009) Log Message: ----------- Rename the file where exceptions are saved, from errors.txt to exceptions.txt. Modified Paths: -------------- trunk/Uni-d/util/src/main/java/be/unid/util/ExceptionGroup.java trunk/Uni-d/util/src/main/java/be/unid/util/SaveException.java Modified: trunk/Uni-d/util/src/main/java/be/unid/util/ExceptionGroup.java =================================================================== --- trunk/Uni-d/util/src/main/java/be/unid/util/ExceptionGroup.java 2009-08-27 08:52:13 UTC (rev 3872) +++ trunk/Uni-d/util/src/main/java/be/unid/util/ExceptionGroup.java 2009-08-31 07:05:30 UTC (rev 3873) @@ -26,7 +26,7 @@ package be.unid.util; /** - * A ThreadGroup which logs all unrecoverable excetions using SaveException in an "errors.txt" log file. + * A ThreadGroup which logs all unrecoverable excetions using SaveException in an "exceptions.txt" log file. * * Usage : * <code> Modified: trunk/Uni-d/util/src/main/java/be/unid/util/SaveException.java =================================================================== --- trunk/Uni-d/util/src/main/java/be/unid/util/SaveException.java 2009-08-27 08:52:13 UTC (rev 3872) +++ trunk/Uni-d/util/src/main/java/be/unid/util/SaveException.java 2009-08-31 07:05:30 UTC (rev 3873) @@ -63,7 +63,7 @@ public static void saveException( Throwable exc, String message ) { - File errorFile = new File( "errors.txt" ); + File errorFile = new File( "exceptions.txt" ); try { PrintWriter out = new PrintWriter( new FileOutputStream( errorFile.getAbsolutePath(), true ) ); @@ -92,7 +92,7 @@ public static void saveWarning( Throwable exc, String message ) { - File errorFile = new File( "errors.txt" ); + File errorFile = new File( "exceptions.txt" ); try { PrintWriter out = new PrintWriter( new FileOutputStream( errorFile.getAbsolutePath(), true ) ); @@ -117,7 +117,7 @@ public static void error( String error ) { - File errorFile = new File( "errors.txt" ); + File errorFile = new File( "exceptions.txt" ); try { PrintWriter out = new PrintWriter( new FileOutputStream( errorFile.getAbsolutePath(), true ) ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-08-27 08:52:31
|
Revision: 3872 http://uni-d.svn.sourceforge.net/uni-d/?rev=3872&view=rev Author: max_brod Date: 2009-08-27 08:52:13 +0000 (Thu, 27 Aug 2009) Log Message: ----------- [UNI-472] Use CTRL-INS, CTRL-DEL. Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailComponent.script Modified: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailComponent.script =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailComponent.script 2009-08-26 14:21:29 UTC (rev 3871) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailComponent.script 2009-08-27 08:52:13 UTC (rev 3872) @@ -155,7 +155,7 @@ gotoDetailLine(null, event.target.form); } } - if (event.keyCode==46) + if (event.ctrlKey==1 && event.keyCode==46) { //delete var mdParent=getMasterDetailParent(event.target); @@ -177,7 +177,7 @@ } } - if (event.keyCode==45) + if (event.ctrlKey==1 && event.keyCode==45) { //insert var mdParent=getMasterDetailParent(event.target); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-08-26 14:21:56
|
Revision: 3871 http://uni-d.svn.sourceforge.net/uni-d/?rev=3871&view=rev Author: max_brod Date: 2009-08-26 14:21:29 +0000 (Wed, 26 Aug 2009) Log Message: ----------- [UNI-472] Changes for MasterDetail components: instead of the buttons Insert and Delete, keys INS and DEL will work on the currently focused line. Other small improvements. Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/masterDetail/main/MasterDetailBaseComponent.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/masterDetail/main/MasterDetailMainComponentContainer.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/masterDetail/MasterDetailBasePage.java trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailBaseComponent.html trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailComponent.script Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/masterDetail/main/MasterDetailBaseComponent.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/masterDetail/main/MasterDetailBaseComponent.java 2009-08-26 10:14:33 UTC (rev 3870) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/masterDetail/main/MasterDetailBaseComponent.java 2009-08-26 14:21:29 UTC (rev 3871) @@ -67,8 +67,8 @@ @Parameter( name = "showAddLines", defaultValue = "true" ) public abstract boolean isShowAddLines(); - @Parameter( name = "showLinesSelector", defaultValue = "false" ) - public abstract boolean isShowLinesSelector(); + @Parameter( name = "showDetailLinesIndices", defaultValue = "false" ) + public abstract boolean isShowDetailLinesIndices(); @Parameter( name = "showBaseButtons", defaultValue = "true" ) public abstract boolean isShowBaseButtons(); @@ -196,7 +196,7 @@ public int noOfDetailLines() { return getDetailParameters().size(); } - public boolean isShowSelectedLines() { return isEditMode() && isShowLinesSelector() && noOfDetailLines() > 0; } + public boolean isShowLinesIndices() { return isEditMode() && isShowDetailLinesIndices() && noOfDetailLines() > 0; } public boolean isShowSaveButton() { return isEditMode() && isShowBaseButtons(); } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/masterDetail/main/MasterDetailMainComponentContainer.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/masterDetail/main/MasterDetailMainComponentContainer.java 2009-08-26 10:14:33 UTC (rev 3870) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/masterDetail/main/MasterDetailMainComponentContainer.java 2009-08-26 14:21:29 UTC (rev 3871) @@ -34,7 +34,7 @@ "showRemove = isShowRemove()", "showAddLines = isShowAddLines()", "showBaseButtons = isShowBaseButtons()", - "showLinesSelector = isShowLinesSelectors()", + "showDetailLinesIndices = isShowDetailLinesIndices()", "showCreateTemplateFull = isShowCreateTemplateFull()", "deleteEntity = isShowDeleteEntity()" } ) @@ -70,7 +70,7 @@ public abstract boolean isShowCreateTemplateFull(); - public abstract boolean isShowLinesSelectors(); + public abstract boolean isShowDetailLinesIndices(); public abstract boolean isShowDeleteEntity(); } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/masterDetail/MasterDetailBasePage.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/masterDetail/MasterDetailBasePage.java 2009-08-26 10:14:33 UTC (rev 3870) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/masterDetail/MasterDetailBasePage.java 2009-08-26 14:21:29 UTC (rev 3871) @@ -77,7 +77,7 @@ return false; } - public boolean isShowLinesSelectors() + public boolean isShowDetailLinesIndices() { return false; } Modified: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailBaseComponent.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailBaseComponent.html 2009-08-26 10:14:33 UTC (rev 3870) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailBaseComponent.html 2009-08-26 14:21:29 UTC (rev 3871) @@ -54,7 +54,7 @@ <table class="detailTable" name="detailTable" align="center" border="0" cellpadding="0" cellspacing="2" width="100%"> <tr class="detailRow"> - <span jwcid="@If" condition='prop:showSelectedLines'><th class="detailHeaderCell" width="10px"></th></span> + <span jwcid="@If" condition='prop:showLinesIndices'><th class="detailHeaderCell" width="10px"></th></span> <!-- detail header block --> <span jwcid="detailHeaderRenderBlock" width="100%"/> <!-- insert/remove button headers --> @@ -66,7 +66,7 @@ <span jwcid="foreachDetail"> <span jwcid="@Any" id="prop:foreachSpanId"> <tr class="detailRow"> - <span jwcid="@If" condition='prop:showSelectedLines'><td class="detailValueCell" width="10px"> + <span jwcid="@If" condition='prop:showLinesIndices'><td class="detailValueCell" width="10px"> <input jwcid="@Insert" value="prop:incrementedDetailIndex"/>. </td></span> <!-- detail block --> @@ -112,8 +112,9 @@ title="prop:addLinesButtonTitle" /> </span> - <span jwcid="@If" condition='prop:showSelectedLines'> - | <span jwcid="@Insert" value="message:masterDetail.label.selectLineNumber"/> <span jwcid="selectLineNumber" size="1"/> + <span jwcid="@If" condition='prop:editMode'> + <span class="displayNone"> + <span jwcid="selectLineNumber" size="1"/> <input jwcid="insertSelectedLine@Submit" onclick="clearValidation(this)" action="listener:insertSelectedLine" value="prop:insertLineButtonLabel" @@ -124,6 +125,7 @@ value="prop:removeLineButtonLabel" title="prop:removeLineButtonTitle" /> + </span> </span> <span jwcid="addLinesExtraRenderBlock"/> Modified: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailComponent.script =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailComponent.script 2009-08-26 10:14:33 UTC (rev 3870) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailComponent.script 2009-08-26 14:21:29 UTC (rev 3871) @@ -58,7 +58,36 @@ return parent } + function getLineIndex( detailLine, form) + { + var i=0, j=0; + var previousDetailLine=null; + for (i=0; i<form.elements.length; i++) + { + var elem=form.elements[i]; + var mdParent=getMasterDetailParent(elem) + + if (mdParent!=null && mdParent.className=="detailRow" ) + { + if (mdParent==detailLine) + { + return j; + } + else + { + if (mdParent!=previousDetailLine) + { + previousDetailLine=mdParent; + j++; + } + } + } + } + return -1; + } + + function gotoDetailLine (previousDetailLine, form) { var targetTr=null var i=0 @@ -108,6 +137,10 @@ - from anywhere in header to the first field on the first line - from anywhere in a detail line to the begining of the next detail line - from the last detail line to the add button + + pressing del should delete current line + + pressing ins should insert a new line */ if (event.keyCode==35) { @@ -122,6 +155,50 @@ gotoDetailLine(null, event.target.form); } } + if (event.keyCode==46) + { + //delete + var mdParent=getMasterDetailParent(event.target); + if (mdParent==null) return; + if (mdParent.className!="detailRow") return; + var index=getLineIndex(mdParent, event.target.form); + if (index==-1) return; + var selectLineNumber=document.getElementById("selectLineNumber"); + if (selectLineNumber==null) return; + for (i=0;i<selectLineNumber.options.length;i++) + { + if (selectLineNumber.options[i].value*1==index) + { + selectLineNumber.options[i].selected=true; + var button=document.getElementById("deleteSelectedLine"); + button.click(); + return false; + } + } + + } + if (event.keyCode==45) + { + //insert + var mdParent=getMasterDetailParent(event.target); + if (mdParent==null) return; + if (mdParent.className!="detailRow") return; + var index=getLineIndex(mdParent, event.target.form); + if (index==-1) return; + var selectLineNumber=document.getElementById("selectLineNumber"); + if (selectLineNumber==null) return; + for (i=0;i<selectLineNumber.options.length;i++) + { + if (selectLineNumber.options[i].value*1==index) + { + selectLineNumber.options[i].selected=true; + var button=document.getElementById("insertSelectedLine"); + button.click(); + return false; + } + } + } + } document.addEventListener('keypress', shortcutkey_handler_end, true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-08-26 10:14:47
|
Revision: 3870 http://uni-d.svn.sourceforge.net/uni-d/?rev=3870&view=rev Author: max_brod Date: 2009-08-26 10:14:33 +0000 (Wed, 26 Aug 2009) Log Message: ----------- No more using a separate js script file for Master detail components key navigation. Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailComponent.script Removed Paths: ------------- trunk/Uni-d/template/src/main/webapp/MasterDetail.js Modified: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailComponent.script =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailComponent.script 2009-08-25 16:15:34 UTC (rev 3869) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/masterDetail/main/MasterDetailComponent.script 2009-08-26 10:14:33 UTC (rev 3870) @@ -23,4 +23,108 @@ ]]> </unique> </body> + <initialization> + <![CDATA[ + function getMasterDetailParent(elem) + { + var parent=elem + do + { + if (parent.className=="detailRow") + { + return parent; + } + if (parent.className!=null && parent.className.indexOf("tabset_content")==0) + { + return parent; + } + if (parent.tagName=="TR") + { + var trs=parent.parentNode.getElementsByTagName("TR"); + if (trs[0].className=="detailRow") + { + for (i=0; i<trs.length; i++) + { + if (trs[i]==parent && i>0 && trs[i-1].className=="detailRow") + { + return trs[i-1]; + } + } + } + } + parent=parent.parentNode + } + while (parent!=null); + return parent + } + + + function gotoDetailLine (previousDetailLine, form) { + var targetTr=null + var i=0 + var foundPrevious=false + for (i=0; i<form.elements.length; i++) + { + var elem=form.elements[i]; + var mdParent=getMasterDetailParent(elem) + + if (mdParent!=null && mdParent.className=="detailRow" && !foundPrevious ) + { + if (previousDetailLine==null || mdParent==previousDetailLine) + { + foundPrevious=true; + } + } + if (foundPrevious && mdParent!=previousDetailLine) + { + if (mdParent==null) + { + var addButton=document.getElementById("addMoreDetailLines"); + if (addButton!=null) addButton.click() + } + if (((elem.tagName=="INPUT" ) && ((elem.type=="text") || (elem.type=="checkbox"))) || (elem.tagName=="SELECT")) + { + if ((elem.style.display!="none") && (elem.disabled==false) && (elem.className!="displayNone")) + { + td=elem.parentNode; + tr=td.parentNode; + tbody=tr.parentNode; + if ((td.style.display!="none") && (td.className!="displayNone") && (tr.style.display!="none") && (tr.className!="displayNone") && (tbody.style.display!="none") && (tbody.className!="displayNone")) + { + elem.focus(); + if (elem.tagName=="INPUT") elem.select(); + break; + } + } + } + } + } + } + + function shortcutkey_handler_end(event) + { + /* + pressing end should go: + - from anywhere in header to the first field on the first line + - from anywhere in a detail line to the begining of the next detail line + - from the last detail line to the add button + */ + if (event.keyCode==35) + { + var mdParent=getMasterDetailParent(event.target); + if (mdParent==null) return; + if (mdParent.className=="detailRow") + { + gotoDetailLine(mdParent, event.target.form); + } + else + { + gotoDetailLine(null, event.target.form); + } + } + } + + document.addEventListener('keypress', shortcutkey_handler_end, true); + ]]> + </initialization> </script> Deleted: trunk/Uni-d/template/src/main/webapp/MasterDetail.js =================================================================== --- trunk/Uni-d/template/src/main/webapp/MasterDetail.js 2009-08-25 16:15:34 UTC (rev 3869) +++ trunk/Uni-d/template/src/main/webapp/MasterDetail.js 2009-08-26 10:14:33 UTC (rev 3870) @@ -1,103 +0,0 @@ -function getMasterDetailParent(elem) -{ - var parent=elem - do - { - if (parent.className=="detailRow") - { - return parent; - } - if (parent.className!=null && parent.className.indexOf("tabset_content")==0) - { - return parent; - } - if (parent.tagName=="TR") - { - var trs=parent.parentNode.getElementsByTagName("TR"); - if (trs[0].className=="detailRow") - { - for (i=0; i<trs.length; i++) - { - if (trs[i]==parent && i>0 && trs[i-1].className=="detailRow") - { - return trs[i-1]; - } - } - } - } - parent=parent.parentNode - } - while (parent!=null); - return parent - } - - - function gotoDetailLine (previousDetailLine, form) { - var targetTr=null - var i=0 - var foundPrevious=false - for (i=0; i<form.elements.length; i++) - { - var elem=form.elements[i]; - var mdParent=getMasterDetailParent(elem) - - if (mdParent!=null && mdParent.className=="detailRow" && !foundPrevious ) - { - if (previousDetailLine==null || mdParent==previousDetailLine) - { - foundPrevious=true; - } - } - if (foundPrevious && mdParent!=previousDetailLine) - { - if (mdParent==null) - { - var addButton=document.getElementById("addMoreDetailLines"); - if (addButton!=null) addButton.click() - } - if (((elem.tagName=="INPUT" ) && ((elem.type=="text") || (elem.type=="checkbox"))) || (elem.tagName=="SELECT")) - { - if ((elem.style.display!="none") && (elem.disabled==false) && (elem.className!="displayNone")) - { - td=elem.parentNode; - tr=td.parentNode; - tbody=tr.parentNode; - if ((td.style.display!="none") && (td.className!="displayNone") && (tr.style.display!="none") && (tr.className!="displayNone") && (tbody.style.display!="none") && (tbody.className!="displayNone")) - { - elem.focus(); - if (elem.tagName=="INPUT") elem.select(); - break; - } - } - } - } - } - } - - - - function shortcutkey_handler_end(event) - { - /* - pressing end should go: - - from anywhere in header to the first field on the first line - - from anywhere in a detail line to the begining of the next detail line - - from the last detail line to the add button - */ - if (event.keyCode==35) - { - var mdParent=getMasterDetailParent(event.target); - if (mdParent==null) return; - if (mdParent.className=="detailRow") - { - gotoDetailLine(mdParent, event.target.form); - } - else - { - gotoDetailLine(null, event.target.form); - } - } - } - - document.addEventListener('keypress', shortcutkey_handler_end, true); - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-08-25 16:15:44
|
Revision: 3869 http://uni-d.svn.sourceforge.net/uni-d/?rev=3869&view=rev Author: max_brod Date: 2009-08-25 16:15:34 +0000 (Tue, 25 Aug 2009) Log Message: ----------- [PIC-748] Support UK as country (=GB). Modified Paths: -------------- trunk/Uni-d/server/src/main/java/be/unid/validation/ISOCountry2Letter.java trunk/Uni-d/util/src/main/java/be/unid/util/CountryCodesConvertor.java Modified: trunk/Uni-d/server/src/main/java/be/unid/validation/ISOCountry2Letter.java =================================================================== --- trunk/Uni-d/server/src/main/java/be/unid/validation/ISOCountry2Letter.java 2009-08-10 06:58:14 UTC (rev 3868) +++ trunk/Uni-d/server/src/main/java/be/unid/validation/ISOCountry2Letter.java 2009-08-25 16:15:34 UTC (rev 3869) @@ -289,6 +289,8 @@ countries.add( "YE" ); // Yemen countries.add( "ZM" ); // Zambia, Republic of countries.add( "ZW" ); // Zimbabwe + + countries.add("UK"); } public Collection<String> getAllowedStringValues() Modified: trunk/Uni-d/util/src/main/java/be/unid/util/CountryCodesConvertor.java =================================================================== --- trunk/Uni-d/util/src/main/java/be/unid/util/CountryCodesConvertor.java 2009-08-10 06:58:14 UTC (rev 3868) +++ trunk/Uni-d/util/src/main/java/be/unid/util/CountryCodesConvertor.java 2009-08-25 16:15:34 UTC (rev 3869) @@ -267,6 +267,7 @@ countries.add( new CountryInfo( "UA", "UKR", "804" ) ); countries.add( new CountryInfo( "AE", "ARE", "784" ) ); countries.add( new CountryInfo( "GB", "GBR", "826" ) ); + countries.add( new CountryInfo( "UK", "GBR", "826" ) ); countries.add( new CountryInfo( "UM", "UMI", "581" ) ); countries.add( new CountryInfo( "US", "USA", "840" ) ); countries.add( new CountryInfo( "UY", "URY", "858" ) ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-08-10 06:58:26
|
Revision: 3868 http://uni-d.svn.sourceforge.net/uni-d/?rev=3868&view=rev Author: max_brod Date: 2009-08-10 06:58:14 +0000 (Mon, 10 Aug 2009) Log Message: ----------- Translation. Modified Paths: -------------- trunk/Uni-d/template/src/main/webapp/translations-common.txt Modified: trunk/Uni-d/template/src/main/webapp/translations-common.txt =================================================================== --- trunk/Uni-d/template/src/main/webapp/translations-common.txt 2009-08-05 09:22:13 UTC (rev 3867) +++ trunk/Uni-d/template/src/main/webapp/translations-common.txt 2009-08-10 06:58:14 UTC (rev 3868) @@ -1036,6 +1036,11 @@ .label.ro Cauta .caption.ro Cauta .label.fr Cherchez +.key button.create/Uni-d-fixed +.label.en Create +.label.nl Toevoegen +.label.ro Creaza +.label.fr Ajouter .key accesskey.find.button/Uni-d-fixed .label.en F .label.nl Z This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-08-05 09:22:25
|
Revision: 3867 http://uni-d.svn.sourceforge.net/uni-d/?rev=3867&view=rev Author: max_brod Date: 2009-08-05 09:22:13 +0000 (Wed, 05 Aug 2009) Log Message: ----------- Fix for bidirectional links with expected-amount small. Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditPageParameters.java Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditPageParameters.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditPageParameters.java 2009-08-02 07:28:45 UTC (rev 3866) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditPageParameters.java 2009-08-05 09:22:13 UTC (rev 3867) @@ -130,6 +130,27 @@ { notRequiredBiDirFieldName = bidirectionalField; skipUpdate = bidirectionalField != null; + if ( bidirectionalField != null ) + { + GMField gmField = DescriptionFactory.getFieldDescription( tableName, bidirectionalField ); + if ( gmField == null ) + { + log.error( "Field not found: " + tableName + "." + bidirectionalField ); + return; + } + GMField otherSideField = + DescriptionFactory.getFieldDescription( gmField.getLinkTableName(), gmField.getBidirField() ); + if ( otherSideField == null ) + { + log.error( "Field not found: " + gmField.getLinkTableName() + "." + gmField.getBidirField() ); + return; + + } + if ( otherSideField.isLinkGUILookCombobox() ) skipUpdate = false; + // because the link with combobox look use a combobox to store the values and the combobox is only filled in + // with existent records, the record must be updated first + } + } public Boolean skipUpdate() @@ -160,7 +181,7 @@ clone.setProxy( proxy.cloneProxy( true ) ); clone.setCurrentPage( currentPage ); clone.setRefreshNeeded( refreshNeeded ); - clone.setHideMenus( hideMenus); + clone.setHideMenus( hideMenus ); if ( clone.getReturnHandler() != null ) { clone.setShowSelect( showSelect ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-08-02 07:28:54
|
Revision: 3866 http://uni-d.svn.sourceforge.net/uni-d/?rev=3866&view=rev Author: max_brod Date: 2009-08-02 07:28:45 +0000 (Sun, 02 Aug 2009) Log Message: ----------- [ICT-1704] Translations. Modified Paths: -------------- trunk/Uni-d/template/src/main/webapp/translations-common.txt Modified: trunk/Uni-d/template/src/main/webapp/translations-common.txt =================================================================== --- trunk/Uni-d/template/src/main/webapp/translations-common.txt 2009-07-24 13:54:08 UTC (rev 3865) +++ trunk/Uni-d/template/src/main/webapp/translations-common.txt 2009-08-02 07:28:45 UTC (rev 3866) @@ -1089,5 +1089,10 @@ .label.nl Ben je zeker? .label.ro Sunteti sigur? .label.fr Vous êtes sûr? +.key Scan/Uni-d-fixed +.label.en Scan +.label.nl Scannen +.label.ro Scaneaza +.label.fr Scannez This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-07-24 13:54:18
|
Revision: 3865 http://uni-d.svn.sourceforge.net/uni-d/?rev=3865&view=rev Author: max_brod Date: 2009-07-24 13:54:08 +0000 (Fri, 24 Jul 2009) Log Message: ----------- [ICT-1485] Ask confirmation before removing a record. Make the "remove" work in selects with single result - it wasn't working. Some improvements in the Select page. Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditManipulation.java trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.html trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.html trunk/Uni-d/template/src/main/webapp/translations-common.txt Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java 2009-07-22 08:37:23 UTC (rev 3864) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java 2009-07-24 13:54:08 UTC (rev 3865) @@ -38,6 +38,8 @@ import java.util.ArrayList; import java.util.List; +import javolution.lang.TextBuilder; + /** * EntityUsageMenu java class. * @@ -318,4 +320,16 @@ { return getCurrentEvent().getType(); } + + public String getButtonOnClick() + { + TextBuilder text = TextBuilder.newInstance(); + if ( getCurrentEvent() == EntityUsageListener.EntityUsageEvent.EVENT_REMOVE ) + { + text.append( "if (!confirm('" ).append( getMessages().getMessage( "ConfirmationRemove" ) ) + .append( "')) {return;}" ); + } + text.append( "this.parentNode.getElementsByTagName('input')[0].click(); " ); + return text.toString(); + } } \ No newline at end of file Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.java 2009-07-22 08:37:23 UTC (rev 3864) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.java 2009-07-24 13:54:08 UTC (rev 3865) @@ -69,6 +69,8 @@ import java.util.*; import java.util.List; +import javolution.lang.TextBuilder; + /** * Component to display the results of a select (using the selectObject parameter) or from a calculated list (via directValues). * @@ -358,19 +360,21 @@ { if ( isEditing() ) { - UnidProxy proxyToEdit=UnidProxyAccessor.findUoid( getTableName(), uoid ); - if (proxyToEdit==null) + UnidProxy proxyToEdit = UnidProxyAccessor.findUoid( getTableName(), uoid ); + if ( proxyToEdit == null ) { - log.error("Could not find record with uoid "+uoid); + log.error( "Could not find record with uoid " + uoid ); } else { // so far only needed for this case - if (getEditedFieldDescription().isMultiple() ) + if ( getEditedFieldDescription().isMultiple() ) { - Collection currentValues= (Collection)UnidProxyAccessor.getField( proxyToEdit, getEditedFieldDescription().getName()); - currentValues.remove( getEditedFieldValue()); - UnidProxyAccessor.setField( proxyToEdit,getEditedFieldDescription().getName(), Collection.class, currentValues); + Collection currentValues = (Collection) UnidProxyAccessor + .getField( proxyToEdit, getEditedFieldDescription().getName() ); + currentValues.remove( getEditedFieldValue() ); + UnidProxyAccessor.setField( proxyToEdit, getEditedFieldDescription().getName(), + Collection.class, currentValues ); proxyToEdit.unidUpdate(); } } @@ -765,7 +769,8 @@ } if ( accessR != null ) hasPrefsInDB = true; if ( getSessionUserAdmin().hasAccess( field.getId(), AccessRight.EDITABLE_ACCESS_VIEW ) && - ( accessR == AccessRight.TABLE_PREFERENCE_DISPLAY || ( accessR == null && field.isDisplayedInLists() ) ) ) + ( accessR == AccessRight.TABLE_PREFERENCE_DISPLAY || + ( accessR == null && field.isDisplayedInLists() ) ) ) { displayedFields.add( field ); } @@ -832,6 +837,30 @@ { return !isEditing(); } + + public String getRemoveButtonOnClick() + { + TextBuilder text = TextBuilder.newInstance(); + text.append("<script language='JavaScript'>\n<!--\n"); + text.append( "function removeButtonOnClick() { return confirm('" ).append( getMessages().getMessage( "ConfirmationRemove" ) ).append( "'); }" ); + text.append("\n-->\n</script>"); + return text.toString(); + } + + public boolean isHavingNoResults() + { + return getSize()==0; + } + + public boolean isHavingOneResult() + { + return getSize()==1; + } + + public String getRowId() + { + return getRowProxy().getUOID().getId(); + } } class FakeGmField Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditManipulation.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditManipulation.java 2009-07-22 08:37:23 UTC (rev 3864) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditManipulation.java 2009-07-24 13:54:08 UTC (rev 3865) @@ -31,6 +31,7 @@ import be.unid.tapestry.pages.view.ViewPage; import be.unid.tapestry.pages.tableManager.TableManagerPage; import be.unid.tapestry.pages.select.SelectPage; +import be.unid.tapestry.pages.select.SelectPageParams; import be.unid.tapestry.pages.add.AddPage; import be.unid.tapestry.util.UnidProxyAccessor; @@ -261,7 +262,12 @@ page.getPageParameters().setShowSelect( pageParams.isShowSelect() ); nm.forward( page ); } - + if ( navPage.getPageParameters() instanceof SelectPageParams ) + { + SelectPageParams pageParams = (SelectPageParams) navPage.getPageParameters(); + // remove proxy + pageParams.getProxy().removeEntityBean(); + } } public static synchronized void doClone( NavigationablePage navPage, UnidProxy proxy, String tablenName ) Modified: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.html 2009-07-22 08:37:23 UTC (rev 3864) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.html 2009-07-24 13:54:08 UTC (rev 3865) @@ -44,11 +44,9 @@ </span> <span jwcid="@Else"> <span> - <span class="displayNone" jwcid="@NavigationLink" listener="listener:callLinkListener" - parameters="prop:currentEventType"> - <span jwcid="@Insert" value="prop:display"/> - </span> - <input type="button" jwcid="@Any" value="prop:display" onclick="window.location=this.parentNode.getElementsByTagName('A')[0].href; " id="prop:generatedId" accesskey="prop:accessKey" title="prop:title"/> + <span class="displayNone" jwcid="@Submit" listener="listener:callLinkListener" + parameters="prop:currentEventType"/> + <input type="button" jwcid="@Any" value="prop:display" onclick="prop:buttonOnClick" id="prop:generatedId" accesskey="prop:accessKey" title="prop:title"/> </span> </span> Modified: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.html 2009-07-22 08:37:23 UTC (rev 3864) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.html 2009-07-24 13:54:08 UTC (rev 3865) @@ -32,22 +32,23 @@ @version $Revision$ </span> -<span class="displayError" jwcid="@Insert" value="ognl:error"/> +<span class="displayError" jwcid="@Insert" value="prop:error"/> <span jwcid="@If" condition="prop:autoRunSelect"> - <span jwcid="@If" condition="ognl:size == 0"> + <span jwcid="@If" condition="prop:havingNoResults"> <span key="NoResults"/> </span> <span jwcid="@Else"> - <span jwcid="@If" condition="ognl:size == 1"> + <span jwcid="@If" condition="prop:havingOneResult"> <span jwcid="unidView"/> </span> <span jwcid="@Else"> + <span jwcid="@Insert" value="prop:removeButtonOnClick" raw="true"/> <fieldset> <span jwcid="@If" condition="prop:previous"> <a href="#" jwcid="@NavigationLink" listener="listener:changePage" - parameters="ognl:{0}"><<</a> + parameters="literal:0"><<</a> </span> <span jwcid="@If" condition="prop:previous"> @@ -97,30 +98,30 @@ <span jwcid="@If" condition="prop:fakeColumn"> <span jwcid="@If" condition="prop:viewColumn"> <a jwcid="@NavigationLink" listener="listener:view" - parameters="ognl:{RowProxy.getUOID().getId()}"> + parameters="prop:rowId"> <img jwcid="@Any" src="asset:imageView" border="0"/> </a> </span> <span jwcid="@If" condition="prop:editColumn"> <a jwcid="@NavigationLink" listener="listener:edit" - parameters="ognl:{RowProxy.getUOID().getId()}"> + parameters="prop:rowId"> <img jwcid="@Any" src="asset:imageEdit" border="0"/> </a> </span> <span jwcid="@If" condition="prop:removeColumn"> <a jwcid="@NavigationLink" listener="listener:remove" - parameters="ognl:{RowProxy.getUOID().getId()}"> + parameters="prop:rowId" onclick="return removeButtonOnClick();"> <img jwcid="@Any" src="asset:imageRemove" border="0"/> </a> </span> <span jwcid="@If" condition="prop:selectColumn"> <a jwcid="@NavigationLink" listener="listener:select" - parameters="ognl:{RowProxy.getUOID().getId()}"> + parameters="prop:rowId"> <img jwcid="@Any" src="asset:imageSelect" border="0"/> </a> </span> <span jwcid="@If" condition="prop:uoidColumn"> - <span jwcid="@Insert" value="ognl:getRowProxy().getUOID().getId()"/> + <span jwcid="@Insert" value="prop:rowId"/> </span> </span> <span jwcid="@Else"> Modified: trunk/Uni-d/template/src/main/webapp/translations-common.txt =================================================================== --- trunk/Uni-d/template/src/main/webapp/translations-common.txt 2009-07-22 08:37:23 UTC (rev 3864) +++ trunk/Uni-d/template/src/main/webapp/translations-common.txt 2009-07-24 13:54:08 UTC (rev 3865) @@ -1084,5 +1084,10 @@ .label.nl Record is niet actief .label.ro Inregistrarea e inactiva .label.fr Cet record n'est pas actif +.key ConfirmationRemove/Uni-d-fixed +.label.en Are you sure? +.label.nl Ben je zeker? +.label.ro Sunteti sigur? +.label.fr Vous êtes sûr? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-07-22 08:37:31
|
Revision: 3864 http://uni-d.svn.sourceforge.net/uni-d/?rev=3864&view=rev Author: max_brod Date: 2009-07-22 08:37:23 +0000 (Wed, 22 Jul 2009) Log Message: ----------- [UNI-470] Fixes in ddltool: - Don't try to create indices for huge description fields. - Create proper indices for multiple fields which are "full-text-searchable". Modified Paths: -------------- trunk/Uni-d/generate/src/main/velocity/ddltool/Map.java.vm Modified: trunk/Uni-d/generate/src/main/velocity/ddltool/Map.java.vm =================================================================== --- trunk/Uni-d/generate/src/main/velocity/ddltool/Map.java.vm 2009-07-19 08:52:02 UTC (rev 3863) +++ trunk/Uni-d/generate/src/main/velocity/ddltool/Map.java.vm 2009-07-22 08:37:23 UTC (rev 3864) @@ -76,7 +76,7 @@ #if( $field.isUnique() || $field.isIndexed() ) indexedFields.add( "$fieldName" ); #end - #if( $field.isString() ) + #if( $field.isString() && !$field.isMultiple() && $field.FieldLength<252 ) #if( $field.isDescription() || $field.getName().toUpperCase().equals( "DESCRIPTION" ) || $field.getName().toUpperCase().equals( "NAME" ) || $field.isFullTextSearchable() ) upperCaseIndexedFields.add("$fieldName"); #end @@ -103,12 +103,18 @@ #foreach( $table in $tables ) #foreach( $field in $table.Fields ) #if( !$field.isLink() && $field.isMultiple() ) + upperCaseIndexedFields = new ArrayList<String>(); #set( $fieldDef="" ) #set( $default="" ) #getFieldDefinition($field) tablesForMultiple.add(new String[]{ "$dbtype.convertTable("M_${table.Name}_${field.Name}")", "$dbtype.convertField("f_${field.Name}")", "$fieldDef" }); - #set( $tableName = $dbtype.convertTable("T_${table.Name}") ) - tables.add( "$tableName" ); + #set( $tableName = $dbtype.convertTable("M_${table.Name}_${field.Name}") ) + #if( $field.isString() && $field.isFullTextSearchable() && $field.FieldLength<252 ) + #set( $fieldName = $dbtype.convertField("f_${field.Name}") ) + upperCaseIndexedFields.add("$fieldName"); + #end + upperCaseIndexedFieldsMap.put( "$tableName", upperCaseIndexedFields ); + // tables.add( "$tableName" ); // ???? That's not useful. #end #end #end @@ -143,7 +149,7 @@ public Collection<String> getTables() { return tables; } public Collection<String[]> getTablesForMultiples() { return tablesForMultiple; } - + public Collection<String[]> getTablesForLinks() { return tablesForLinks; } public Hashtable<String, Collection<String>> getDbFields() { return dbFields; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-07-19 08:52:06
|
Revision: 3863 http://uni-d.svn.sourceforge.net/uni-d/?rev=3863&view=rev Author: max_brod Date: 2009-07-19 08:52:02 +0000 (Sun, 19 Jul 2009) Log Message: ----------- Have the text "View" translated (it appears near the link fields). Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.html trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.script Modified: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.html 2009-07-18 14:26:46 UTC (rev 3862) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.html 2009-07-19 08:52:02 UTC (rev 3863) @@ -33,7 +33,7 @@ @version $Revision$ </span> -<span jwcid="@Script" scriptAsset="asset:linkInputScript" onchange="prop:onChange"/> +<span jwcid="@Script" scriptAsset="asset:linkInputScript" onchange="prop:onChange" resolver="prop:page"/> <span jwcid="@If" condition="prop:disabled"> <span jwcid="@If" condition="prop:valueSet"> Modified: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.script =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.script 2009-07-18 14:26:46 UTC (rev 3862) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.script 2009-07-19 08:52:02 UTC (rev 3863) @@ -4,8 +4,11 @@ "http://jakarta.apache.org/tapestry/dtd/Script_3_0.dtd"> <script> <input-symbol key="onchange" class="java.lang.String"/> + <input-symbol key="resolver" class="java.lang.Object" required="yes"/> + <body> <unique> + <![CDATA[ function findForm(elem) { @@ -40,7 +43,7 @@ } else { - if (display!=null) display.innerHTML = "View"; + if (display!=null) display.innerHTML = "${resolver.getMessage('View')}"; if ( isFake ) input.value = sel; } var toeval = 'onChangeCombobox${onchange}(element, fieldName, isFake )'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2009-07-18 14:26:53
|
Revision: 3862 http://uni-d.svn.sourceforge.net/uni-d/?rev=3862&view=rev Author: max_brod Date: 2009-07-18 14:26:46 +0000 (Sat, 18 Jul 2009) Log Message: ----------- The hidden "select" anchor is needed for combobox links (for when you press "..."). Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.html Modified: trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.html 2009-07-16 16:32:45 UTC (rev 3861) +++ trunk/Uni-d/tapestry/src/main/resources/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.html 2009-07-18 14:26:46 UTC (rev 3862) @@ -100,12 +100,11 @@ </span> </span> - - <span jwcid="@If" condition="prop:notEmbedded"> - <span jwcid="runSelect@LinkSubmit" onclick="clearValidation(this);" class="prop:selectCssStyle" + </span> + <span jwcid="@If" condition="prop:notEmbedded"> + <span jwcid="runSelect@LinkSubmit" onclick="clearValidation(this);" class="prop:selectCssStyle" listener="listener:prepareReturnHandler" action="listener:runSelect" id="prop:selectId"> - <span key="Select"/> - </span> + <span key="Select"/> </span> </span> </span> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |