List of usage examples for com.vaadin.server FontAwesome ARCHIVE
FontAwesome ARCHIVE
To view the source code for com.vaadin.server FontAwesome ARCHIVE.
Click Source Link
From source file:com.esofthead.mycollab.module.project.view.bug.ComponentReadViewImpl.java
License:Open Source License
@Override protected void onPreviewItem() { commentDisplay.loadComments("" + beanItem.getId()); historyLogList.loadHistory(beanItem.getId()); dateInfoComp.displayEntryDateTime(beanItem); peopleInfoComp.displayEntryPeople(beanItem); if (StatusI18nEnum.Open.name().equals(beanItem.getStatus())) { removeLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE)); quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE); } else {// w w w . j a v a 2s. com addLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN)); quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD); } }
From source file:com.esofthead.mycollab.module.project.view.bug.ComponentReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createButtonControls() { ProjectPreviewFormControlsGenerator<SimpleComponent> componentPreviewForm = new ProjectPreviewFormControlsGenerator<>( previewForm);//from w ww. j a v a 2 s . c om final HorizontalLayout topPanel = componentPreviewForm .createButtonControls(ProjectRolePermissionCollections.COMPONENTS); quickActionStatusBtn = new Button("", new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { if (StatusI18nEnum.Closed.name().equals(beanItem.getStatus())) { beanItem.setStatus(StatusI18nEnum.Open.name()); ComponentReadViewImpl.this.removeLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE)); quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE); } else { beanItem.setStatus(StatusI18nEnum.Closed.name()); ComponentReadViewImpl.this.addLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN)); quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD); } ComponentService service = ApplicationContextUtil.getSpringBean(ComponentService.class); service.updateSelectiveWithSession(beanItem, AppContext.getUsername()); } }); quickActionStatusBtn.setStyleName(UIConstants.THEME_GREEN_LINK); componentPreviewForm.insertToControlBlock(quickActionStatusBtn); if (!CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.COMPONENTS)) { quickActionStatusBtn.setEnabled(false); } return topPanel; }
From source file:com.esofthead.mycollab.module.project.view.bug.VersionReadViewImpl.java
License:Open Source License
@Override protected void onPreviewItem() { commentDisplay.loadComments("" + beanItem.getId()); historyLogList.loadHistory(beanItem.getId()); dateInfoComp.displayEntryDateTime(beanItem); if (StatusI18nEnum.Open.name().equals(beanItem.getStatus())) { removeLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE)); quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE); } else {/* ww w .j a v a 2 s . c o m*/ addLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN)); quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD); } }
From source file:com.esofthead.mycollab.module.project.view.bug.VersionReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createButtonControls() { ProjectPreviewFormControlsGenerator<Version> versionPreviewForm = new ProjectPreviewFormControlsGenerator<>( previewForm);/*from w w w. j a v a 2 s. c om*/ final HorizontalLayout topPanel = versionPreviewForm .createButtonControls(ProjectRolePermissionCollections.VERSIONS); quickActionStatusBtn = new Button("", new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { if (StatusI18nEnum.Closed.name().equals(beanItem.getStatus())) { beanItem.setStatus(StatusI18nEnum.Open.name()); VersionReadViewImpl.this.removeLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE)); quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE); } else { beanItem.setStatus(StatusI18nEnum.Closed.name()); VersionReadViewImpl.this.addLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN)); quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD); } VersionService service = ApplicationContextUtil.getSpringBean(VersionService.class); service.updateSelectiveWithSession(beanItem, AppContext.getUsername()); } }); quickActionStatusBtn.setStyleName(UIConstants.THEME_GREEN_LINK); versionPreviewForm.insertToControlBlock(quickActionStatusBtn); if (!CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.VERSIONS)) { quickActionStatusBtn.setEnabled(false); } return topPanel; }
From source file:com.esofthead.mycollab.module.project.view.ProjectViewImpl.java
License:Open Source License
@Override public void initView(final SimpleProject project) { this.removeAllComponents(); updateVerticalTabsheetFixStatus();// w ww. j a v a 2 s .c om ControllerRegistry.addController(new ProjectController(this)); this.setWidth("100%"); this.addStyleName("main-content-wrapper"); this.addStyleName("projectDashboardView"); myProjectTab = new ProjectVerticalTabsheet(); myProjectTab.setSizeFull(); myProjectTab.setNavigatorWidth("100%"); myProjectTab.setNavigatorStyleName("sidebar-menu"); myProjectTab.setContainerStyleName("tab-content"); myProjectTab.addSelectedTabChangeListener(new SelectedTabChangeListener() { @Override public void selectedTabChange(SelectedTabChangeEvent event) { Tab tab = ((ProjectVerticalTabsheet) event.getSource()).getSelectedTab(); String caption = ((TabImpl) tab).getTabId(); if (ProjectTypeConstants.MESSAGE.equals(caption)) { messagePresenter.go(ProjectViewImpl.this, null); } else if (ProjectTypeConstants.MILESTONE.equals(caption)) { MilestoneSearchCriteria searchCriteria = new MilestoneSearchCriteria(); searchCriteria.setProjectId( new NumberSearchField(SearchField.AND, CurrentProjectVariables.getProjectId())); gotoMilestoneView(new MilestoneScreenData.Search(searchCriteria)); } else if (ProjectTypeConstants.TASK.equals(caption)) { taskPresenter.go(ProjectViewImpl.this, null); } else if (ProjectTypeConstants.BUG.equals(caption)) { gotoBugView(null); } else if (ProjectTypeConstants.RISK.equals(caption)) { RiskSearchCriteria searchCriteria = new RiskSearchCriteria(); searchCriteria.setProjectId( new NumberSearchField(SearchField.AND, CurrentProjectVariables.getProjectId())); gotoRiskView(new RiskScreenData.Search(searchCriteria)); } else if (ProjectTypeConstants.FILE.equals(caption)) { filePresenter.go(ProjectViewImpl.this, new FileScreenData.GotoDashboard()); } else if (ProjectTypeConstants.PAGE.equals(caption)) { pagePresenter.go(ProjectViewImpl.this, new PageScreenData.Search(CurrentProjectVariables.getBasePagePath())); } else if (ProjectTypeConstants.PROBLEM.equals(caption)) { ProblemSearchCriteria searchCriteria = new ProblemSearchCriteria(); searchCriteria.setProjectId( new NumberSearchField(SearchField.AND, CurrentProjectVariables.getProjectId())); problemPresenter.go(ProjectViewImpl.this, new ProblemScreenData.Search(searchCriteria)); } else if (ProjectTypeConstants.DASHBOARD.equals(caption)) { dashboardPresenter.go(ProjectViewImpl.this, null); } else if (ProjectTypeConstants.MEMBER.equals(caption)) { ProjectMemberSearchCriteria criteria = new ProjectMemberSearchCriteria(); criteria.setProjectId(new NumberSearchField(CurrentProjectVariables.getProjectId())); criteria.setStatus(new StringSearchField(ProjectMemberStatusConstants.ACTIVE)); gotoUsersAndGroup(new ProjectMemberScreenData.Search(criteria)); } else if (ProjectTypeConstants.TIME.equals(caption)) { ItemTimeLoggingSearchCriteria searchCriteria = new ItemTimeLoggingSearchCriteria(); searchCriteria.setProjectIds(new SetSearchField<>(CurrentProjectVariables.getProjectId())); searchCriteria .setRangeDate(ItemTimeLoggingSearchCriteria.getCurrentRangeDateOfWeekSearchField()); gotoTimeTrackingView(new TimeTrackingScreenData.Search(searchCriteria)); } else if (ProjectTypeConstants.STANDUP.equals(caption)) { StandupReportSearchCriteria criteria = new StandupReportSearchCriteria(); criteria.setProjectId(new NumberSearchField(CurrentProjectVariables.getProjectId())); criteria.setOnDate(new DateSearchField(SearchField.AND, DateSearchField.EQUAL, new GregorianCalendar().getTime())); standupPresenter.go(ProjectViewImpl.this, new StandupScreenData.Search(criteria)); } } }); VerticalLayout contentWrapper = myProjectTab.getContentWrapper(); contentWrapper.addStyleName("main-content"); MHorizontalLayout topPanel = new MHorizontalLayout().withSpacing(false).withMargin(true).withWidth("100%") .withStyleName("top-panel"); contentWrapper.addComponentAsFirst(topPanel); ProjectListComponent prjList = new ProjectListComponent(); CssLayout navigatorWrapper = myProjectTab.getNavigatorWrapper(); navigatorWrapper.addComponentAsFirst(prjList); navigatorWrapper.setWidth("250px"); buildComponents(); this.addComponent(myProjectTab); ProjectBreadcrumb breadCrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.class); breadCrumb.setProject(project); topPanel.with(breadCrumb).withAlign(breadCrumb, Alignment.MIDDLE_LEFT).expand(breadCrumb); if (project.isProjectArchived()) { Button activeProjectBtn = new Button(AppContext.getMessage(ProjectCommonI18nEnum.BUTTON_ACTIVE_PROJECT), new ClickListener() { @Override public void buttonClick(ClickEvent event) { ProjectService projectService = ApplicationContextUtil .getSpringBean(ProjectService.class); project.setProjectstatus(StatusI18nEnum.Open.name()); projectService.updateSelectiveWithSession(project, AppContext.getUsername()); PageActionChain chain = new PageActionChain( new ProjectScreenData.Goto(CurrentProjectVariables.getProjectId())); EventBusFactory.getInstance().post(new ProjectEvent.GotoMyProject(this, chain)); } }); activeProjectBtn.setStyleName(UIConstants.THEME_GREEN_LINK); topPanel.with(activeProjectBtn).withAlign(activeProjectBtn, Alignment.MIDDLE_RIGHT); } else { final PopupButton controlsBtn = new PopupButton(); controlsBtn.setIcon(FontAwesome.ELLIPSIS_H); controlsBtn.addStyleName(UIConstants.THEME_BLANK_LINK); VerticalLayout popupButtonsControl = new VerticalLayout(); popupButtonsControl.setSpacing(true); popupButtonsControl.setWidth("150px"); Button createPhaseBtn = new Button(AppContext.getMessage(MilestoneI18nEnum.BUTTON_NEW_PHASE), new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { controlsBtn.setPopupVisible(false); EventBusFactory.getInstance() .post(new MilestoneEvent.GotoAdd(ProjectViewImpl.this, null)); } }); createPhaseBtn .setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.MILESTONES)); createPhaseBtn.setIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.MILESTONE)); createPhaseBtn.setStyleName("link"); popupButtonsControl.addComponent(createPhaseBtn); Button createTaskBtn = new Button(AppContext.getMessage(TaskI18nEnum.BUTTON_NEW_TASK), new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { controlsBtn.setPopupVisible(false); EventBusFactory.getInstance().post(new TaskEvent.GotoAdd(ProjectViewImpl.this, null)); } }); createTaskBtn.setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS)); createTaskBtn.setIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.TASK)); createTaskBtn.setStyleName("link"); popupButtonsControl.addComponent(createTaskBtn); Button createBugBtn = new Button(AppContext.getMessage(BugI18nEnum.BUTTON_NEW_BUG), new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { controlsBtn.setPopupVisible(false); EventBusFactory.getInstance().post(new BugEvent.GotoAdd(this, null)); } }); createBugBtn.setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.BUGS)); createBugBtn.setIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.BUG)); createBugBtn.setStyleName("link"); popupButtonsControl.addComponent(createBugBtn); Button createRiskBtn = new Button(AppContext.getMessage(RiskI18nEnum.BUTTON_NEW_RISK), new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { controlsBtn.setPopupVisible(false); EventBusFactory.getInstance().post(new RiskEvent.GotoAdd(this, null)); } }); createRiskBtn.setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.RISKS)); createRiskBtn.setIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.RISK)); createRiskBtn.setStyleName("link"); popupButtonsControl.addComponent(createRiskBtn); Button createProblemBtn = new Button(AppContext.getMessage(ProblemI18nEnum.BUTTON_NEW_PROBLEM), new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { controlsBtn.setPopupVisible(false); EventBusFactory.getInstance().post(new ProblemEvent.GotoAdd(this, null)); } }); createProblemBtn .setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.PROBLEMS)); createProblemBtn.setIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.PROBLEM)); createProblemBtn.setStyleName("link"); popupButtonsControl.addComponent(createProblemBtn); Button editProjectBtn = new Button(AppContext.getMessage(ProjectCommonI18nEnum.BUTTON_EDIT_PROJECT), new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { controlsBtn.setPopupVisible(false); dashboardPresenter.go(ProjectViewImpl.this, new ProjectScreenData.Edit(project)); } }); editProjectBtn.setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.PROJECT)); editProjectBtn.setIcon(FontAwesome.EDIT); editProjectBtn.setStyleName("link"); popupButtonsControl.addComponent(editProjectBtn); Button archieveProjectBtn = new Button( AppContext.getMessage(ProjectCommonI18nEnum.BUTTON_ARCHIVE_PROJECT), new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { controlsBtn.setPopupVisible(false); ConfirmDialogExt.show(UI.getCurrent(), AppContext.getMessage(GenericI18Enum.WINDOW_WARNING_TITLE, SiteConfiguration.getSiteName()), AppContext.getMessage( ProjectCommonI18nEnum.DIALOG_CONFIRM_PROJECT_ARCHIVE_MESSAGE), AppContext.getMessage(GenericI18Enum.BUTTON_YES), AppContext.getMessage(GenericI18Enum.BUTTON_NO), new ConfirmDialog.Listener() { private static final long serialVersionUID = 1L; @Override public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { ProjectService projectService = ApplicationContextUtil .getSpringBean(ProjectService.class); project.setProjectstatus(StatusI18nEnum.Archived.name()); projectService.updateSelectiveWithSession(project, AppContext.getUsername()); PageActionChain chain = new PageActionChain( new ProjectScreenData.Goto( CurrentProjectVariables.getProjectId())); EventBusFactory.getInstance() .post(new ProjectEvent.GotoMyProject(this, chain)); } } }); } }); archieveProjectBtn .setEnabled(CurrentProjectVariables.canAccess(ProjectRolePermissionCollections.PROJECT)); archieveProjectBtn.setIcon(FontAwesome.ARCHIVE); archieveProjectBtn.setStyleName("link"); popupButtonsControl.addComponent(archieveProjectBtn); if (CurrentProjectVariables.canAccess(ProjectRolePermissionCollections.PROJECT)) { Button deleteProjectBtn = new Button( AppContext.getMessage(ProjectCommonI18nEnum.BUTTON_DELETE_PROJECT), new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { controlsBtn.setPopupVisible(false); ConfirmDialogExt.show(UI.getCurrent(), AppContext.getMessage(GenericI18Enum.DIALOG_DELETE_TITLE, SiteConfiguration.getSiteName()), AppContext.getMessage( ProjectCommonI18nEnum.DIALOG_CONFIRM_PROJECT_DELETE_MESSAGE), AppContext.getMessage(GenericI18Enum.BUTTON_YES), AppContext.getMessage(GenericI18Enum.BUTTON_NO), new ConfirmDialog.Listener() { private static final long serialVersionUID = 1L; @Override public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { ProjectService projectService = ApplicationContextUtil .getSpringBean(ProjectService.class); projectService.removeWithSession( CurrentProjectVariables.getProjectId(), AppContext.getUsername(), AppContext.getAccountId()); EventBusFactory.getInstance() .post(new ShellEvent.GotoProjectModule(this, null)); } } }); } }); deleteProjectBtn .setEnabled(CurrentProjectVariables.canAccess(ProjectRolePermissionCollections.PROJECT)); deleteProjectBtn.setIcon(FontAwesome.TRASH_O); deleteProjectBtn.setStyleName("link"); popupButtonsControl.addComponent(deleteProjectBtn); } controlsBtn.setContent(popupButtonsControl); controlsBtn.setWidthUndefined(); topPanel.with(controlsBtn).withAlign(controlsBtn, Alignment.MIDDLE_RIGHT); } prjList.showProjects(); }
From source file:com.esofthead.mycollab.module.project.view.settings.ComponentReadViewImpl.java
License:Open Source License
@Override protected void onPreviewItem() { activityComponent.loadActivities("" + beanItem.getId()); dateInfoComp.displayEntryDateTime(beanItem); peopleInfoComp.displayEntryPeople(beanItem); if (tagViewComponent != null) { tagViewComponent.display(ProjectTypeConstants.BUG_COMPONENT, beanItem.getId()); }/*from w ww .j a v a 2 s. c o m*/ if (componentTimeLogComp != null) { componentTimeLogComp.displayTime(beanItem); } if (StatusI18nEnum.Open.name().equals(beanItem.getStatus())) { removeLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE)); quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE); } else { addLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN)); quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD); } }
From source file:com.esofthead.mycollab.module.project.view.settings.ComponentReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createButtonControls() { ProjectPreviewFormControlsGenerator<SimpleComponent> componentPreviewForm = new ProjectPreviewFormControlsGenerator<>( previewForm);/* w ww. jav a 2 s .co m*/ HorizontalLayout topPanel = componentPreviewForm .createButtonControls(ProjectRolePermissionCollections.COMPONENTS); quickActionStatusBtn = new Button("", new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { if (StatusI18nEnum.Closed.name().equals(beanItem.getStatus())) { beanItem.setStatus(StatusI18nEnum.Open.name()); ComponentReadViewImpl.this.removeLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE)); quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE); } else { beanItem.setStatus(StatusI18nEnum.Closed.name()); ComponentReadViewImpl.this.addLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN)); quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD); } ComponentService service = AppContextUtil.getSpringBean(ComponentService.class); service.updateSelectiveWithSession(beanItem, AppContext.getUsername()); } }); quickActionStatusBtn.setStyleName(UIConstants.BUTTON_ACTION); componentPreviewForm.insertToControlBlock(quickActionStatusBtn); if (!CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.COMPONENTS)) { quickActionStatusBtn.setEnabled(false); } return topPanel; }
From source file:com.esofthead.mycollab.module.project.view.settings.VersionReadViewImpl.java
License:Open Source License
@Override protected void onPreviewItem() { activityComponent.loadActivities("" + beanItem.getId()); dateInfoComp.displayEntryDateTime(beanItem); if (tagViewComponent != null) { tagViewComponent.display(ProjectTypeConstants.BUG_VERSION, beanItem.getId()); }/* www . j ava 2s . co m*/ if (versionTimeLogComp != null) { versionTimeLogComp.displayTime(beanItem); } if (StatusI18nEnum.Open.name().equals(beanItem.getStatus())) { removeLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE)); quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE); } else { addLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN)); quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD); } }
From source file:com.esofthead.mycollab.module.project.view.settings.VersionReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createButtonControls() { ProjectPreviewFormControlsGenerator<Version> versionPreviewForm = new ProjectPreviewFormControlsGenerator<>( previewForm);//from w ww .java2 s. c o m HorizontalLayout topPanel = versionPreviewForm .createButtonControls(ProjectRolePermissionCollections.VERSIONS); quickActionStatusBtn = new Button("", new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { if (StatusI18nEnum.Closed.name().equals(beanItem.getStatus())) { beanItem.setStatus(StatusI18nEnum.Open.name()); VersionReadViewImpl.this.removeLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE)); quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE); } else { beanItem.setStatus(StatusI18nEnum.Closed.name()); VersionReadViewImpl.this.addLayoutStyleName(UIConstants.LINK_COMPLETED); quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN)); quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD); } VersionService service = AppContextUtil.getSpringBean(VersionService.class); service.updateSelectiveWithSession(beanItem, AppContext.getUsername()); } }); quickActionStatusBtn.setStyleName(UIConstants.BUTTON_ACTION); versionPreviewForm.insertToControlBlock(quickActionStatusBtn); if (!CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.VERSIONS)) { quickActionStatusBtn.setEnabled(false); } return topPanel; }
From source file:com.esofthead.mycollab.module.project.view.task.TaskReadViewImpl.java
License:Open Source License
@Override protected void onPreviewItem() { ((TaskPreviewFormLayout) previewLayout).displayTaskHeader(beanItem); if (beanItem.isCompleted()) { addLayoutStyleName(UIConstants.LINK_COMPLETED); } else if (beanItem.isPending()) { addLayoutStyleName(UIConstants.LINK_PENDING); } else if (beanItem.isOverdue()) { addLayoutStyleName("headerNameOverdue"); }/*from ww w . j ava 2s . c o m*/ if (!beanItem.isCompleted()) { quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE)); quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE); } else { quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN)); quickActionStatusBtn.setIcon(FontAwesome.CIRCLE_O_NOTCH); } commentList.loadComments("" + beanItem.getId()); historyList.loadHistory(beanItem.getId()); followerSheet.displayFollowers(beanItem); peopleInfoComp.displayEntryPeople(beanItem); dateInfoComp.displayEntryDateTime(beanItem); timesheetComp.displayTime(beanItem); }