Modified: openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_TW.properties.xml URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_TW.properties.xml?rev=1772141&r1=1772140&r2=1772141&view=diff ============================================================================== --- openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_TW.properties.xml (original) +++ openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_TW.properties.xml Thu Dec 1 04:09:12 2016 @@ -1616,25 +1616,6 @@ <entry key="install.wizard.welcome.panel"><![CDATA[ <ol> <li><h4> - <a id="Enabling_Image_Upload_and_import_to_whiteboard"></a>Enabling - Image Upload and import to whiteboard<a - href="#Enabling_Image_Upload_and_import_to_whiteboard" - class="section_anchor"></a> - </h4> - <ul> - <li>Install <strong>ImageMagick</strong> on the server, you can - get more information on <a target="_blank" - href="http://www.imagemagick.org" rel="nofollow">http://www.imagemagick.org</a> - regarding installation. The instructions for installation can be - found there <a target="_blank" - href="http://www.imagemagick.org/script/binary-releases.php" - rel="nofollow">http://www.imagemagick.org/script/binary-releases.php</a>, - however on most linux systems you can get it via your favorite - package managers (apt-get it) - </li> - </ul> - </li> - <li><h4> <a id="Enabling_import_of_PDFs_into_whiteboard"></a>Enabling import of PDFs into whiteboard<a href="#Enabling_import_of_PDFs_into_whiteboard" @@ -1659,43 +1640,6 @@ version have a bug that does lead to wrong object dimensions in the Whiteboard </li> - </ul> - </li> - <li><h4> - <a - id="Enabling_import_of_.doc,_.docx,_.ppt,_.pptx,_..._all_Office_Docu"></a>Enabling - import of .doc, .docx, .ppt, .pptx, ... all Office Documents into - whitebaord<a - href="#Enabling_import_of_.doc,_.docx,_.ppt,_.pptx,_..._all_Office_Docu" - class="section_anchor"></a> - </h4> - <ul> - <li><strong>OpenOffice-Service</strong> started and listening on - port 8100, see <a target="_blank" - href="http://openmeetings.apache.org/OpenOfficeConverter.html">OpenOfficeConverter</a> - for details</li> - </ul> - </li> - <li><h4> - <a - id="Enabling_Recording_and_import_of_.avi,_.flv,_.mov_and_.mp4_into"></a>Enabling - Recording and import of .avi, .flv, .mov and .mp4 into whiteboard<a - href="#Enabling_Recording_and_import_of_.avi,_.flv,_.mov_and_.mp4_into" - class="section_anchor"></a> - </h4> - <ul> - <li>Install <strong>FFMpeg</strong>. You should get FFMPEG in an - up to date copy! For Windows you can download a Build for example - from <a target="_blank" href="http://ffmpeg.arrozcru.org/builds/" - rel="nofollow">http://ffmpeg.arrozcru.org/builds/</a> Linux or OSx - Users should be able to use one of the various Installation - Instructions on the Web. You need to enable libmp3lame! - </li> - <li>Install <strong>SoX</strong> <a - href="http://sox.sourceforge.net/" target="_BLANK">http://sox.sourceforge.net/</a>. - You should install SoX in a up to date copy! SoX 12.xx will NOT - work! - </li> </ul> </li> </ol> @@ -1714,7 +1658,6 @@ target="_blank">Mailing lists</a></span> <br /> <br /> - <b> <span style="font-size: 1.2em">Commercial-Support:</span></b> <br /> <br /> @@ -1769,9 +1712,9 @@ <entry key="install.wizard.params.step1.email">EMail</entry> <entry key="install.wizard.params.step1.email.title">Enter a EMail</entry> <entry key="install.wizard.params.step1.tz">User Time Zone</entry> - <entry key="install.wizard.params.step1.groupdata">Organisation(Domains)</entry> + <entry key="install.wizard.params.step1.groupdata">Group(Domains)</entry> <entry key="install.wizard.params.step1.group">Name</entry> - <entry key="install.wizard.params.step1.group.title">Enter a default Organisation</entry> + <entry key="install.wizard.params.step1.group.title">Enter a default Group</entry> <entry key="install.wizard.params.step2.configuration">Configuration</entry> <entry key="install.wizard.params.step2.allowFrontendRegister">Allow self-registering (allow_frontend_register)</entry> @@ -1802,31 +1745,22 @@ <entry key="install.wizard.params.step3.swfZoom.text">DPI that swftools will use for PDF to SWF conversion (default is 100)</entry> <entry key="install.wizard.params.step3.swfJpegQuality">SWFTools JPEG Quality</entry> <entry key="install.wizard.params.step3.swfJpegQuality.title">Enter the quality of embedded jpeg pictures to quality. 0 is worst (small), 100 is best (big). (default:85)</entry> - <entry key="install.wizard.params.step3.swfJpegQuality.text">Enter the quality of embedded jpeg pictures to quality. 0 is worst (small), - 100 is best (big). (default:85)</entry> + <entry key="install.wizard.params.step3.swfJpegQuality.text">Enter the quality of embedded jpeg pictures to quality. 0 is worst (small), 100 is best (big). (default:85)</entry> <entry key="install.wizard.params.step3.swfPath">SWFTools Path</entry> <entry key="install.wizard.params.step3.swfPath.title">Enter the path to swftools for example C:/swftools (Windows) or leave blank if swftools is a known to your system path</entry> - <entry key="install.wizard.params.step3.swfPath.text"> - You can test if swftools is installed into system path by - opening a shell or cmd-prompt and type pdf2swf If this shows - a list of options leave this field blank otherwise you have to - specify the path to pdf2swf on your system - </entry> + <entry key="install.wizard.params.step3.swfPath.text">You can test if swftools is installed into system path by opening a shell or cmd-prompt and type pdf2swf If this shows a list of options leave this field blank otherwise you have to specify the path to pdf2swf on your system</entry> <entry key="install.wizard.params.step3.imageMagicPath">ImageMagick Path</entry> <entry key="install.wizard.params.step3.imageMagicPath.title">Enter the path to ImageMagick, leave blank if ImageMagick is successfully installed to system-path</entry> - <entry key="install.wizard.params.step3.imageMagicPath.text"></entry> + <entry key="install.wizard.params.step3.imageMagicPath.text"><![CDATA[Install ImageMagick on the server, you can get more information on http://www.imagemagick.org regarding installation. The instructions for installation can be found there http://www.imagemagick.org/script/binary-releases.php, however on most linux systems you can get it via your favorite package managers (apt-get it)]]></entry> <entry key="install.wizard.params.step3.ffmpegPath">FFMPEG Path</entry> <entry key="install.wizard.params.step3.ffmpegPath.title">Enter the path to FFMPEG, leave blank if FFMPEG is successfully installed to system-path</entry> - <entry key="install.wizard.params.step3.ffmpegPath.text"></entry> + <entry key="install.wizard.params.step3.ffmpegPath.text"><![CDATA[Install FFMpeg. You should get FFMPEG in an up to date copy! For Windows you can download a Build for example from http://ffmpeg.arrozcru.org/builds/ Linux or OSx Users should be able to use one of the various Installation Instructions on the Web. You need to enable libmp3lame!]]></entry> <entry key="install.wizard.params.step3.soxPath">SoX Path</entry> <entry key="install.wizard.params.step3.soxPath.title">Enter the path to SoX, leave blank if SoX is successfully installed to system-path</entry> - <entry key="install.wizard.params.step3.soxPath.text"></entry> + <entry key="install.wizard.params.step3.soxPath.text"><![CDATA[Install SoX http://sox.sourceforge.net/ You should install SoX in a up to date copy! SoX 12.xx will NOT work!]]></entry> <entry key="install.wizard.params.step3.officePath">OpenOffice/LibreOffice Path for jodconverter</entry> <entry key="install.wizard.params.step3.officePath.title">The path to OpenOffice/LibreOffice (optional) please set this to the real path in case jodconverter is unable to find OpenOffice/LibreOffice installation automatically</entry> - <entry key="install.wizard.params.step3.officePath.text">The path to OpenOffice/LibreOffice (optional) please set this - to the real path in case jodconverter is unable to find - OpenOffice/LibreOffice installation - </entry> + <entry key="install.wizard.params.step3.officePath.text">The path to OpenOffice/LibreOffice (optional) please set this to the real path in case jodconverter is unable to find OpenOffice/LibreOffice installation</entry> <entry key="install.wizard.params.step4.crypt">Crypt Type</entry> <entry key="install.wizard.params.step4.cryptClassName">Crypt Class</entry>
Modified: openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard$ParamsStep3.html URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard%24ParamsStep3.html?rev=1772141&r1=1772140&r2=1772141&view=diff ============================================================================== --- openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard$ParamsStep3.html (original) +++ openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard$ParamsStep3.html Thu Dec 1 04:09:12 2016 @@ -9,7 +9,7 @@ with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -24,64 +24,44 @@ <legend class="ui-widget-header"><wicket:message key="install.wizard.params.step3.converters"/></legend> <ul class="paramList"> <li><label wicket:for="swfZoom"><wicket:message key="install.wizard.params.step3.swfZoom"/> - <span class="info-title" wicket:message="title:install.wizard.params.step3.swfZoom.text"/> + <span class="info-title" wicket:message="title:install.wizard.params.step3.swfZoom.text,alt:install.wizard.params.step3.swfZoom.text"></span> </label> - <input wicket:id="swfZoom" wicket:message="title:install.wizard.params.step3.swfZoom.title" - type="text" /> + <input wicket:id="swfZoom" wicket:message="title:install.wizard.params.step3.swfZoom.title" type="text" /> </li> <li><label wicket:for="swfJpegQuality"><wicket:message key="install.wizard.params.step3.swfJpegQuality"/> - <span class="info-title" wicket:message="title:install.wizard.params.step3.swfJpegQuality.text"/> + <span class="info-title" wicket:message="title:install.wizard.params.step3.swfJpegQuality.text,alt:install.wizard.params.step3.swfJpegQuality.text"></span> </label> - <input wicket:id="swfJpegQuality" - wicket:message="title:install.wizard.params.step3.swfJpegQuality.title" - type="text" /> + <input wicket:id="swfJpegQuality" wicket:message="title:install.wizard.params.step3.swfJpegQuality.title" type="text" /> </li> <li> <label wicket:for="swfPath"><wicket:message key="install.wizard.params.step3.swfPath"/> - <span class="info-title" wicket:message="title:install.wizard.params.step3.swfPath.text"/> + <span class="info-title" wicket:message="title:install.wizard.params.step3.swfPath.text,alt:install.wizard.params.step3.swfPath.text"></span> </label> - <input wicket:id="swfPath" - type="text" /> + <input wicket:id="swfPath" type="text" /> <button class="formelement" wicket:id="validateSwf"><wicket:message key="install.wizard.db.step.check"/></button> </li> - <li><label wicket:for="imageMagicPath"><wicket:message key="install.wizard.params.step3.imageMagicPath"/></label> - <input wicket:id="imageMagicPath" - wicket:message="title:install.wizard.params.step3.imageMagicPath.title" - type="text" /> + <li><label wicket:for="imageMagicPath"><wicket:message key="install.wizard.params.step3.imageMagicPath"/> + <span class="info-title" wicket:message="title:install.wizard.params.step3.imageMagicPath.text,alt:install.wizard.params.step3.imageMagicPath.text"></span> + </label> + <input wicket:id="imageMagicPath" wicket:message="title:install.wizard.params.step3.imageMagicPath.title" type="text" /> <button class="formelement" wicket:id="validateImageMagic"><wicket:message key="install.wizard.db.step.check"/></button> - <p> - <i> - <wicket:message key="install.wizard.params.step3.imageMagicPath.text"/> - </i> - </p> - </li> - <li><label wicket:for="ffmpegPath"><wicket:message key="install.wizard.params.step3.ffmpegPath"/></label> - <input wicket:id="ffmpegPath" - wicket:message="title:install.wizard.params.step3.ffmpegPath.title" type="text" /> + </li> + <li><label wicket:for="ffmpegPath"><wicket:message key="install.wizard.params.step3.ffmpegPath"/> + <span class="info-title" wicket:message="title:install.wizard.params.step3.ffmpegPath.text,alt:install.wizard.params.step3.ffmpegPath.text"></span> + </label> + <input wicket:id="ffmpegPath" wicket:message="title:install.wizard.params.step3.ffmpegPath.title" type="text" /> <button class="formelement" wicket:id="validateFfmpeg"><wicket:message key="install.wizard.db.step.check"/></button> - <p> - <i> - <wicket:message key="install.wizard.params.step3.ffmpegPath.text"/> - </i> - </p> - </li> - <li><label wicket:for="soxPath"><wicket:message key="install.wizard.params.step3.soxPath"/></label> - <input wicket:id="soxPath" - wicket:message="title:install.wizard.params.step3.soxPath.title" - type="text" /> + </li> + <li><label wicket:for="soxPath"><wicket:message key="install.wizard.params.step3.soxPath"/> + <span class="info-title" wicket:message="title:install.wizard.params.step3.soxPath.text,alt:install.wizard.params.step3.soxPath.text"></span> + </label> + <input wicket:id="soxPath" wicket:message="title:install.wizard.params.step3.soxPath.title" type="text" /> <button class="formelement" wicket:id="validateSox"><wicket:message key="install.wizard.db.step.check"/></button> - <p> - <i> - <wicket:message key="install.wizard.params.step3.soxPath.text"/> - </i> - </p> </li> <li><label wicket:for="officePath"><wicket:message key="install.wizard.params.step3.officePath"/> - <span class="info-title" wicket:message="title:install.wizard.params.step3.officePath.text"/> + <span class="info-title" wicket:message="title:install.wizard.params.step3.officePath.text,alt:install.wizard.params.step3.officePath.text"></span> </label> - <input wicket:id="officePath" - wicket:message="title:install.wizard.params.step3.officePath.title" - type="text" /> + <input wicket:id="officePath" wicket:message="title:install.wizard.params.step3.officePath.title" type="text" /> <button class="formelement" wicket:id="validateOffice"><wicket:message key="install.wizard.db.step.check"/></button> </li> <li> Modified: openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard.java URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard.java?rev=1772141&r1=1772140&r2=1772141&view=diff ============================================================================== --- openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard.java (original) +++ openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard.java Thu Dec 1 04:09:12 2016 @@ -108,11 +108,11 @@ public class InstallWizard extends Abstr private Throwable th = null; private DbType initDbType = null; private DbType dbType = null; - + public void initTzDropDown() { paramsStep1.tzDropDown.setOption(); } - + //onInit, applyState public InstallWizard(String id, String title) { super(id, title, new CompoundPropertyModel<InstallationConfig>(new InstallationConfig()), true); @@ -130,7 +130,7 @@ public class InstallWizard extends Abstr wmodel.setLastVisible(true); init(wmodel); } - + @Override public void onConfigure(JQueryBehavior behavior) { super.onConfigure(behavior); @@ -150,7 +150,7 @@ public class InstallWizard extends Abstr public int getWidth() { return 1000; } - + @Override protected boolean closeOnFinish() { return false; @@ -163,7 +163,7 @@ public class InstallWizard extends Abstr path += app; return path; } - + private abstract class BaseStep extends DynamicWizardStep { private static final long serialVersionUID = 1L; @@ -178,7 +178,7 @@ public class InstallWizard extends Abstr InstallWizard.this.setTitle(Model.of(getModelObject().appName + " - " + getString("install.wizard.install.header"))); } } - + private final class WelcomeStep extends BaseStep { private static final long serialVersionUID = 1L; @@ -191,7 +191,7 @@ public class InstallWizard extends Abstr super.onInitialize(); add(new Label("step", getString("install.wizard.welcome.panel")).setEscapeModelStrings(false)); } - + @Override public boolean isLastStep() { return false; @@ -214,22 +214,21 @@ public class InstallWizard extends Abstr private static final long serialVersionUID = 1L; private final DropDownChoice<DbType> db = new DropDownChoice<DbType>("dbType", Arrays.asList(DbType.values()), new ChoiceRenderer<DbType>() { private static final long serialVersionUID = 1L; - + + @Override + public Object getDisplayValue(DbType object) { + return getString(String.format("install.wizard.db.step.%s.name", object.name())); + } + @Override - public Object getDisplayValue(DbType object) { - return getString(String.format("install.wizard.db.step.%s.name", object.name())); - } - - @Override - public String getIdValue(DbType object, int index) { - return object.name(); - } - }); + public String getIdValue(DbType object, int index) { + return object.name(); + } + }); private final RequiredTextField<String> user = new RequiredTextField<String>("login"); private final TextField<String> pass = new TextField<String>("password"); - - { - add(db.add(new OnChangeAjaxBehavior() { + { + add(db.add(new OnChangeAjaxBehavior() { private static final long serialVersionUID = 1L; @Override @@ -238,25 +237,25 @@ public class InstallWizard extends Abstr initForm(true, target); } })); - add(hostelem.add(host), portelem.add(port)); - add(dbname, user, pass); - add(new IndicatingAjaxButton("check") { + add(hostelem.add(host), portelem.add(port)); + add(dbname, user, pass); + add(new IndicatingAjaxButton("check") { private static final long serialVersionUID = 1L; - + @Override protected void onSubmit(AjaxRequestTarget target, Form<?> form) { target.add(getFeedbackPanel()); } - + @Override protected void onError(AjaxRequestTarget target, Form<?> form) { target.add(getFeedbackPanel()); } - }); - } - - @Override - protected void onValidateModelObjects() { + }); + } + + @Override + protected void onValidateModelObjects() { ConnectionProperties props = getModelObject(); try { Class.forName(props.getDriver()); @@ -299,7 +298,7 @@ public class InstallWizard extends Abstr form.success(getString("install.wizard.db.step.valid")); } } - + @Override protected void onSubmit() { try { @@ -319,63 +318,63 @@ public class InstallWizard extends Abstr } } }; - + private ConnectionProperties getProps(DbType type) { - ConnectionProperties props = new ConnectionProperties(); - try { - File conf = OmFileHelper.getPersistence(type); - props = ConnectionPropertiesPatcher.getConnectionProperties(conf); - } catch (Exception e) { - form.warn(getString("install.wizard.db.step.errorprops")); - } + ConnectionProperties props = new ConnectionProperties(); + try { + File conf = OmFileHelper.getPersistence(type); + props = ConnectionPropertiesPatcher.getConnectionProperties(conf); + } catch (Exception e) { + form.warn(getString("install.wizard.db.step.errorprops")); + } return props; } - - private void initForm(boolean getProps, AjaxRequestTarget target) { - ConnectionProperties props = getProps ? getProps(form.getModelObject().getDbType()) : form.getModelObject(); - form.setModelObject(props); - hostelem.setVisible(props.getDbType() != DbType.derby); - portelem.setVisible(props.getDbType() != DbType.derby); - try { - switch (props.getDbType()) { - case mssql: { - String url = props.getURL().substring("jdbc:sqlserver://".length()); - String[] parts = url.split(";"); - String[] hp = parts[0].split(":"); - host.setModelObject(hp[0]); - port.setModelObject(Integer.parseInt(hp[1])); - dbname.setModelObject(parts[1].substring(parts[1].indexOf('=') + 1)); - } - break; - case oracle: { - String[] parts = props.getURL().split(":"); - host.setModelObject(parts[3].substring(1)); - port.setModelObject(Integer.parseInt(parts[4])); - dbname.setModelObject(parts[5]); - } - break; - case derby: { - host.setModelObject(""); - port.setModelObject(0); - String[] parts = props.getURL().split(";"); - String[] hp = parts[0].split(":"); - dbname.setModelObject(hp[2]); - } - break; - default: - URI uri = URI.create(props.getURL().substring(5)); - host.setModelObject(uri.getHost()); - port.setModelObject(uri.getPort()); - dbname.setModelObject(uri.getPath().substring(1)); - break; - } - } catch (Exception e) { - form.warn(getString("install.wizard.db.step.errorprops")); - } - if (target != null) { - target.add(form); + + private void initForm(boolean getProps, AjaxRequestTarget target) { + ConnectionProperties props = getProps ? getProps(form.getModelObject().getDbType()) : form.getModelObject(); + form.setModelObject(props); + hostelem.setVisible(props.getDbType() != DbType.derby); + portelem.setVisible(props.getDbType() != DbType.derby); + try { + switch (props.getDbType()) { + case mssql: { + String url = props.getURL().substring("jdbc:sqlserver://".length()); + String[] parts = url.split(";"); + String[] hp = parts[0].split(":"); + host.setModelObject(hp[0]); + port.setModelObject(Integer.parseInt(hp[1])); + dbname.setModelObject(parts[1].substring(parts[1].indexOf('=') + 1)); + } + break; + case oracle: { + String[] parts = props.getURL().split(":"); + host.setModelObject(parts[3].substring(1)); + port.setModelObject(Integer.parseInt(parts[4])); + dbname.setModelObject(parts[5]); + } + break; + case derby: { + host.setModelObject(""); + port.setModelObject(0); + String[] parts = props.getURL().split(";"); + String[] hp = parts[0].split(":"); + dbname.setModelObject(hp[2]); + } + break; + default: + URI uri = URI.create(props.getURL().substring(5)); + host.setModelObject(uri.getHost()); + port.setModelObject(uri.getPort()); + dbname.setModelObject(uri.getPath().substring(1)); + break; } + } catch (Exception e) { + form.warn(getString("install.wizard.db.step.errorprops")); } + if (target != null) { + target.add(form); + } + } public DbStep() { super(welcomeStep); @@ -432,18 +431,13 @@ public class InstallWizard extends Abstr public IDynamicWizardStep next() { return paramsStep2; } - - @Override - public boolean isLastAvailable() { - return true; - } - + @Override public IDynamicWizardStep last() { return installStep; } } - + private final class ParamsStep2 extends BaseStep { private static final long serialVersionUID = 1L; @@ -476,18 +470,13 @@ public class InstallWizard extends Abstr public IDynamicWizardStep next() { return paramsStep3; } - - @Override - public boolean isLastAvailable() { - return true; - } - + @Override public IDynamicWizardStep last() { return installStep; } } - + private final class ParamsStep3 extends BaseStep { private static final long serialVersionUID = 1L; private final TextField<String> ffmpegPath; @@ -499,7 +488,7 @@ public class InstallWizard extends Abstr private boolean isAllChecked = false; public ParamsStep3() { super(paramsStep2); - + add(new TextField<Integer>("swfZoom").setRequired(true).add(range(50, 600))); add(new TextField<Integer>("swfJpegQuality").setRequired(true).add(range(1, 100))); add(swfPath = new TextField<String>("swfPath")); @@ -546,9 +535,9 @@ public class InstallWizard extends Abstr checkOfficePath(); target.add(getFeedbackPanel()); } - }); + }); } - + private boolean checkToolPath(TextField<String> path, String[] args) { ConverterProcessResult result = ProcessHelper.executeScript(path.getInputName() + " path:: '" + path.getValue() + "'", args); if (!result.isOk()) { @@ -556,7 +545,7 @@ public class InstallWizard extends Abstr } return result.isOk(); } - + private boolean checkOfficePath() { String err = ""; try { @@ -590,8 +579,7 @@ public class InstallWizard extends Abstr isAllChecked = true; return result; } - - + @Override public boolean isLastStep() { return false; @@ -606,18 +594,18 @@ public class InstallWizard extends Abstr } return paramsStep4; } - + @Override public boolean isLastAvailable() { return isAllChecked; } - + @Override public IDynamicWizardStep last() { return installStep; } } - + private final class ParamsStep4 extends BaseStep { private static final long serialVersionUID = 1L; @@ -640,18 +628,18 @@ public class InstallWizard extends Abstr public IDynamicWizardStep next() { return installStep; } - + @Override public boolean isLastAvailable() { return true; } - + @Override public IDynamicWizardStep last() { return installStep; } -} - + } + private final class InstallStep extends BaseStep { private static final long serialVersionUID = 1L; private final CongratulationsPanel congrat; @@ -660,7 +648,7 @@ public class InstallWizard extends Abstr private final ProgressBar progressBar; private final Label desc = new Label("desc", ""); private boolean started = false; - + public void startInstallation(AjaxRequestTarget target) { started = true; timer.restart(target); @@ -670,10 +658,10 @@ public class InstallWizard extends Abstr desc.setDefaultModelObject(getString("install.wizard.install.started")); target.add(desc, container); } - + public InstallStep() { super(paramsStep4); - + // Timer // container.add(timer = new AbstractAjaxTimerBehavior(Duration.ONE_SECOND) { private static final long serialVersionUID = 1L; @@ -713,10 +701,10 @@ public class InstallWizard extends Abstr //TODO uncomment later progressBar.add(value = new Label("value", progressBar.getModel())); //TODO uncomment later value.setOutputMarkupId(true); //progressBar.setVisible(false); - + container.add(congrat = new CongratulationsPanel("status")); congrat.setVisible(false); - + add(container.setOutputMarkupId(true)); } @@ -726,7 +714,7 @@ public class InstallWizard extends Abstr desc.setDefaultModelObject(getString("install.wizard.install.desc")); add(desc.setOutputMarkupId(true)); } - + @Override public boolean isLastStep() { return true; @@ -737,15 +725,15 @@ public class InstallWizard extends Abstr return null; } } - + private class InstallProcess implements Runnable { private ImportInitvalues installer; - + public InstallProcess(ImportInitvalues installer) { this.installer = installer; th = null; } - + @Override public void run() { try { @@ -755,7 +743,7 @@ public class InstallWizard extends Abstr } } } - + private static class SelectOption implements Serializable { private static final long serialVersionUID = 1L; private static SelectOption NO = new SelectOption("0", "No"); @@ -776,20 +764,20 @@ public class InstallWizard extends Abstr private static final long serialVersionUID = 1L; T option; IModel<Object> propModel; - + WizardDropDown(String id) { super(id); propModel = ((CompoundPropertyModel<InstallationConfig>)InstallWizard.this.getModel()).bind(id); setModel(new PropertyModel<T>(this, "option")); } - + @Override protected void onDetach() { propModel.detach(); super.onDetach(); } } - + private final class TzDropDown extends WizardDropDown<String> { private static final long serialVersionUID = 1L; @@ -797,24 +785,25 @@ public class InstallWizard extends Abstr String tzId = WebSession.get().getClientTZCode(); option = AVAILABLE_TIMEZONE_SET.contains(tzId) ? tzId : AVAILABLE_TIMEZONES.get(0); } - + public TzDropDown(String id) { super(id); setChoices(AVAILABLE_TIMEZONES); setChoiceRenderer(new ChoiceRenderer<String>() { private static final long serialVersionUID = 1L; - + @Override public Object getDisplayValue(String object) { - return object.toString(); - } + return object.toString(); + } + @Override public String getIdValue(String object, int index) { return object.toString(); } }); } - + @Override protected void onModelChanged() { if (propModel != null && option != null) { @@ -822,7 +811,7 @@ public class InstallWizard extends Abstr } } } - + private class SelectOptionDropDown extends WizardDropDown<SelectOption> { private static final long serialVersionUID = 1L; @@ -830,19 +819,18 @@ public class InstallWizard extends Abstr super(id); setChoiceRenderer(new ChoiceRenderer<SelectOption>("value", "key")); } - + @Override protected void onModelChanged() { if (propModel != null && option != null) { propModel.setObject(option.key); } } - } - + private final class YesNoDropDown extends SelectOptionDropDown { private static final long serialVersionUID = 1L; - + YesNoDropDown(String id) { super(id); setChoices(yesNoList); @@ -850,10 +838,10 @@ public class InstallWizard extends Abstr SelectOption.NO : SelectOption.YES; } } - + private final class YesNoTextDropDown extends SelectOptionDropDown { private static final long serialVersionUID = 1L; - + YesNoTextDropDown(String id) { super(id); setChoices(yesNoTextList); @@ -861,20 +849,22 @@ public class InstallWizard extends Abstr SelectOption.NO_TEXT : SelectOption.YES_TEXT; } } - + private final class LangDropDown extends SelectOptionDropDown { private static final long serialVersionUID = 1L; public LangDropDown(String id) { super(id); - + List<SelectOption> list = new ArrayList<SelectOption>(); - for (Map.Entry<Long, Locale> me : LabelDao.languages.entrySet()) { SelectOption op = new SelectOption(me.getKey().toString(), me.getValue().getDisplayName()); if (getSession().getLocale().equals(me.getValue())) { option = op; } + if (option == null && getSession().getLocale().getLanguage().equals(me.getValue().getLanguage())) { + option = op; + } list.add(op); if (option == null && me.getKey().toString().equals(InstallWizard.this.getModelObject().defaultLangId)) { option = op;