Author: hoang_to
Date: 2009-11-09 01:30:49 -0500 (Mon, 09 Nov 2009)
New Revision: 520
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
Log:
GTNPORTAL-29: Remove descriptive step from page creation wizard
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2009-11-09
04:21:23 UTC (rev 519)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2009-11-09
06:30:49 UTC (rev 520)
@@ -1063,13 +1063,6 @@
UIFormUploadInput.msg.limit=The file must be less than {0} MB.
###############################################################################
- # org.exoplatform.portal.webui.component.UIWizardWelcome #
- ###############################################################################
-
-UIWizardWelcome.WelcomeLabel=Welcome to the Page Creation Wizard .
-UIWizardWelcome.WelcomeText=This Wizard will guide you through the creation of a new
page. When you have finished entering the required information, you will be asked to save.
Click on the "Back" and "Next" buttons or select a step number in
order to navigate between the steps.
-
- ###############################################################################
# org.exoplatform.portal.webui.component.customization.UIPageNodeSelector #
###############################################################################
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties 2009-11-09
04:21:23 UTC (rev 519)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties 2009-11-09
06:30:49 UTC (rev 520)
@@ -1047,12 +1047,6 @@
UIFormUploadInput.label.Cancel=#{word.cancel}
UIFormUploadInput.msg.limit=The file must be less than {0} MB.
- ###############################################################################
- # org.exoplatform.portal.webui.component.UIWizardWelcome #
- ###############################################################################
-
-UIWizardWelcome.WelcomeLabel=Bienvenue dans l'assistant de création de page !
-UIWizardWelcome.WelcomeText=Cet assistant vous accompagnera dans le processus de création
d'une nouvelle page de portail. Il vous guidera dans la saisie des différentes
informations nécessaires pour créer cette page. Une fois l'ensemble des informations
saisies, vous serez invité à sauver votre nouvelle page. Il est très facile, en cliquant
sur les boutons « Précédent » et « Suivant » ou sur le numéro d'une étape
particulière, de se déplacer dans les différentes étapes.
###############################################################################
# org.exoplatform.portal.webui.component.customization.UIPageNodeSelector #
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties 2009-11-09
04:21:23 UTC (rev 519)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties 2009-11-09
06:30:49 UTC (rev 520)
@@ -1052,12 +1052,6 @@
UIFormUploadInput.label.Cancel=Отменить
UIFormUploadInput.msg.limit=Максимальный размер файла {0} MiB.
- ###############################################################################
- # org.exoplatform.portal.webui.component.UIWizardWelcome #
- ###############################################################################
-
-UIWizardWelcome.WelcomeLabel=Добро пожаловать в мастер создания страниц.
-UIWizardWelcome.WelcomeText=С помощью этого мастера Вы сможете создать новую страницу.
После заполнения необходимых полей вы сможете сохранить страницу. Перейдите далее или
нажмите "назад", что б вернуться к предыдущему шагу.
###############################################################################
# org.exoplatform.portal.webui.component.customization.UIPageNodeSelector #
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties 2009-11-09
04:21:23 UTC (rev 519)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties 2009-11-09
06:30:49 UTC (rev 520)
@@ -1043,12 +1043,6 @@
UIFormUploadInput.label.Cancel=Скасувати
UIFormUploadInput.msg.limit=Файл повинен бути меншим, ніж {0} MB.
- ###############################################################################
- # org.exoplatform.portal.webui.component.UIWizardWelcome #
- ###############################################################################
-
-UIWizardWelcome.WelcomeLabel=Вітаємо у eXo Wizard-створювачі сторінок.
-UIWizardWelcome.WelcomeText=Wizard покроково допоможе створити нову сторінку. Коли ви
закінчите вводити всю необхідну інформацію, будь ласка, потім збережіть її. Натисніть на
кнопку "Далі" або "Назад", або виберіть номер кроку.
###############################################################################
# org.exoplatform.portal.webui.component.customization.UIPageNodeSelector #
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2009-11-09
04:21:23 UTC (rev 519)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2009-11-09
06:30:49 UTC (rev 520)
@@ -1042,13 +1042,6 @@
UIFormUploadInput.msg.limit=Dung lượng tệp tin không được lớn hơn {0} MB.
###############################################################################
- # org.exoplatform.portal.webui.component.UIWizardWelcome #
- ###############################################################################
-
-UIWizardWelcome.WelcomeLabel=Chào mừng bạn đến với eXo Page Creation Wizard !
-UIWizardWelcome.WelcomeText=Wizard này sẽ giúp bạn tạo một trang mới qua những bước đơn
giản, bạn chỉ cần nhập những thông tin cần thiết cho trang của bạn rồi tự sắp xếp trang
theo ý muốn của bạn. Khi bạn hoàn thành việc đó chỉ cần nhấp chuột để lưu lại những gì bạn
đã tạo. Và, nó thực sự dễ dàng để chuyển hướng các bước bằng việc nhấp lên nút "Trở
lại" and "Tiếp theo" hay nhấp chuột lên số của các bước của Wizard.
-
- ###############################################################################
# org.exoplatform.portal.webui.component.customization.UIPageNodeSelector #
###############################################################################
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2009-11-09
04:21:23 UTC (rev 519)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2009-11-09
06:30:49 UTC (rev 520)
@@ -55,26 +55,31 @@
* Created by The eXo Platform SARL Author : Dang Van Minh minhdv81(a)yahoo.com
* Jun 23, 2006
*/
-@ComponentConfigs({
- @ComponentConfig(template = "system:/groovy/webui/core/UIWizard.gtmpl",
events = {
- @EventConfig(listeners = UIPageCreationWizard.ViewStep1ActionListener.class),
- @EventConfig(listeners = UIPageCreationWizard.ViewStep2ActionListener.class),
- @EventConfig(listeners = UIPageCreationWizard.ViewStep3ActionListener.class),
- @EventConfig(listeners = UIPageCreationWizard.ViewStep4ActionListener.class),
- @EventConfig(listeners = UIPageCreationWizard.ViewStep5ActionListener.class),
- @EventConfig(listeners = UIPageWizard.AbortActionListener.class)}),
- @ComponentConfig(id = "ViewStep1", type = UIContainer.class, template =
"system:/groovy/portal/webui/page/UIWizardPageWelcome.gtmpl")})
+@ComponentConfigs(@ComponentConfig(template =
"system:/groovy/webui/core/UIWizard.gtmpl", events = {
+ @EventConfig(listeners = UIPageCreationWizard.ViewStep1ActionListener.class),
+ @EventConfig(listeners = UIPageCreationWizard.ViewStep2ActionListener.class),
+ @EventConfig(listeners = UIPageCreationWizard.ViewStep3ActionListener.class),
+ @EventConfig(listeners = UIPageCreationWizard.ViewStep4ActionListener.class),
+ @EventConfig(listeners = UIPageWizard.AbortActionListener.class)}))
public class UIPageCreationWizard extends UIPageWizard
{
+ final public static int FIRST_STEP = 1;
+
+ final public static int SECONDE_STEP = 2;
+
+ final public static int THIRD_STEP = 3;
+
+ final public static int NUMBER_OF_STEPs = 3;
+
public UIPageCreationWizard() throws Exception
{
- addChild(UIContainer.class, "ViewStep1", null);
addChild(UIWizardPageSetInfo.class, null, null).setRendered(false);
addChild(UIWizardPageSelectLayoutForm.class, null, null).setRendered(false);
addChild(UIPagePreview.class, null, null).setRendered(false);
- setNumberSteps(4);
- setShowWelcomeComponent(true);
+ setNumberSteps(NUMBER_OF_STEPs);
+ viewStep(FIRST_STEP);
+ setShowWelcomeComponent(false);
}
private void saveData() throws Exception
@@ -165,36 +170,22 @@
return false;
}
- // TODO: Review this listener after remove UIExoStart
- static public class ViewStep1ActionListener extends
EventListener<UIPageCreationWizard>
+ static public class ViewStep1ActionListener extends EventListener<UIPageWizard>
{
- public void execute(Event<UIPageCreationWizard> event) throws Exception
- {
- UIPageCreationWizard uiWizard = event.getSource();
- uiWizard.setDescriptionWizard(1);
- uiWizard.updateWizardComponent();
- uiWizard.viewStep(1);
- UIWorkingWorkspace uiWorkingWS =
uiWizard.getAncestorOfType(UIWorkingWorkspace.class);
-
uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(false);
- }
- }
-
- static public class ViewStep2ActionListener extends EventListener<UIPageWizard>
- {
public void execute(Event<UIPageWizard> event) throws Exception
{
UIPageWizard uiWizard = event.getSource();
- uiWizard.setDescriptionWizard(2);
+ uiWizard.setDescriptionWizard(FIRST_STEP);
uiWizard.updateWizardComponent();
- uiWizard.viewStep(2);
+ uiWizard.viewStep(FIRST_STEP);
UIWorkingWorkspace uiWorkingWS =
uiWizard.getAncestorOfType(UIWorkingWorkspace.class);
uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(false);
}
}
- static public class ViewStep3ActionListener extends
EventListener<UIPageCreationWizard>
+ static public class ViewStep2ActionListener extends
EventListener<UIPageCreationWizard>
{
public void execute(Event<UIPageCreationWizard> event) throws Exception
{
@@ -202,13 +193,13 @@
UIPortalApplication uiPortalApp =
uiWizard.getAncestorOfType(UIPortalApplication.class);
UIWorkingWorkspace uiWorkingWS =
uiWizard.getAncestorOfType(UIWorkingWorkspace.class);
uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(false);
- uiWizard.viewStep(3);
+ uiWizard.viewStep(SECONDE_STEP);
- if (uiWizard.getSelectedStep() < 3)
+ if (uiWizard.getSelectedStep() < SECONDE_STEP)
{
uiPortalApp.addMessage(new
ApplicationMessage("UIPageCreationWizard.msg.StepByStep", null));
- uiWizard.setDescriptionWizard(2);
- uiWizard.viewStep(2);
+ uiWizard.setDescriptionWizard(FIRST_STEP);
+ uiWizard.viewStep(FIRST_STEP);
uiWizard.updateWizardComponent();
return;
}
@@ -216,21 +207,21 @@
if (uiWizard.isSelectedNodeExist())
{
uiPortalApp.addMessage(new
ApplicationMessage("UIPageCreationWizard.msg.NameNotSame", null));
- uiWizard.viewStep(2);
+ uiWizard.viewStep(FIRST_STEP);
uiWizard.updateWizardComponent();
return;
}
UIWizardPageSetInfo uiPageSetInfo =
uiWizard.getChild(UIWizardPageSetInfo.class);
UIPageNodeSelector uiNodeSelector =
uiPageSetInfo.getChild(UIPageNodeSelector.class);
- uiWizard.setDescriptionWizard(3);
+ uiWizard.setDescriptionWizard(SECONDE_STEP);
uiWizard.updateWizardComponent();
PageNavigation navigation = uiNodeSelector.getSelectedNavigation();
if (navigation == null)
{
uiPortalApp.addMessage(new
ApplicationMessage("UIPageCreationWizard.msg.notSelectedPageNavigation",
new String[]{}));;
- uiWizard.viewStep(2);
+ uiWizard.viewStep(FIRST_STEP);
return;
}
@@ -245,7 +236,7 @@
if (startDate.after(endDate))
{
uiPortalApp.addMessage(new
ApplicationMessage("UIPageNodeForm2.msg.startDateBeforeEndDate", null));
- uiWizard.viewStep(2);
+ uiWizard.viewStep(FIRST_STEP);
return;
}
}
@@ -253,7 +244,7 @@
}
}
- static public class ViewStep4ActionListener extends
EventListener<UIPageCreationWizard>
+ static public class ViewStep3ActionListener extends
EventListener<UIPageCreationWizard>
{
private void setDefaultPermission(Page page, String ownerType, String ownerId)
@@ -280,14 +271,14 @@
if (uiWizard.isSelectedNodeExist())
{
uiPortalApp.addMessage(new
ApplicationMessage("UIPageCreationWizard.msg.NameNotSame", null));
- uiWizard.setDescriptionWizard(2);
- uiWizard.viewStep(2);
+ uiWizard.setDescriptionWizard(FIRST_STEP);
+ uiWizard.viewStep(FIRST_STEP);
uiWizard.updateWizardComponent();
return;
}
- uiWizard.viewStep(4);
+ uiWizard.viewStep(THIRD_STEP);
- if (uiWizard.getSelectedStep() < 4)
+ if (uiWizard.getSelectedStep() < THIRD_STEP)
{
uiWizard.setDescriptionWizard(uiWizard.getSelectedStep());
uiWizard.updateWizardComponent();
@@ -314,13 +305,13 @@
if (storage.getPage(pageId) != null)
{
uiPortalApp.addMessage(new
ApplicationMessage("UIPageCreationWizard.msg.NameNotSame", null));
- uiWizard.setDescriptionWizard(2);
- uiWizard.viewStep(2);
+ uiWizard.setDescriptionWizard(FIRST_STEP);
+ uiWizard.viewStep(FIRST_STEP);
uiWizard.updateWizardComponent();
}
page.setModifiable(true);
- //Set default permissions on the page
+ // Set default permissions on the page
setDefaultPermission(page, ownerType, ownerId);
if (page.getTitle() == null || page.getTitle().trim().length() == 0)
@@ -356,7 +347,7 @@
}
}
- static public class ViewStep5ActionListener extends
EventListener<UIPageCreationWizard>
+ static public class ViewStep4ActionListener extends
EventListener<UIPageCreationWizard>
{
public void execute(Event<UIPageCreationWizard> event) throws Exception
{
@@ -367,8 +358,8 @@
if (uiWizard.isSelectedNodeExist())
{
uiPortalApp.addMessage(new
ApplicationMessage("UIPageCreationWizard.msg.NameNotSame", null));
- uiWizard.setDescriptionWizard(2);
- uiWizard.viewStep(2);
+ uiWizard.setDescriptionWizard(FIRST_STEP);
+ uiWizard.viewStep(FIRST_STEP);
uiWizard.updateWizardComponent();
return;
}