Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Commit

Permalink
Update the latest changes of MyCollab
Browse files Browse the repository at this point in the history
  • Loading branch information
Hai Nguyen committed Apr 19, 2016
1 parent e0b0b6f commit e29efb7
Show file tree
Hide file tree
Showing 37 changed files with 264 additions and 184 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Free, open source CRM, Document and Project Management software
[![License](http://img.shields.io/badge/License-GPLv3-orange.svg)](http://www.gnu.org/copyleft/gpl.html) [![Project Stats](https://www.openhub.net/p/mycollab/widgets/project_thin_badge.gif)](https://www.openhub.net/p/mycollab) [![Build](https://travis-ci.org/MyCollab/mycollab.svg)](https://travis-ci.org/MyCollab/mycollab)
[![Version](https://img.shields.io/badge/Version-5.2.11-brightgreen.svg)](https://community.mycollab.com/)
[![Version](https://img.shields.io/badge/Version-5.2.12-brightgreen.svg)](https://community.mycollab.com/)
[![SourceForge](https://img.shields.io/sourceforge/dt/mycollab.svg)](https://community.mycollab.com/download)


Expand All @@ -13,48 +13,48 @@ MyCollab does work well on both desktop and mobile devices.
<table>
<tr>
<td align="center">
<a href="https://c2.staticflickr.com/2/1547/26078765951_aa7c3ed56e_o.png" target="_blank" title="Project Dashboard">
<img src="https://c2.staticflickr.com/2/1547/26078765951_a69471cbb8.jpg" alt="Project Dashboard">
<a href="https://c2.staticflickr.com/2/1668/25912423433_a9d652f375_o.png" target="_blank" title="Project Dashboard">
<img src="https://c2.staticflickr.com/2/1668/25912423433_710952b8f2.jpg" alt="Project Dashboard">
</a>
<br />
<em>Project Dashboard</em>
</td>
<td align="center">
<a href="https://c2.staticflickr.com/2/1665/25872246050_4a4be3146a_o.png" target="_blank" title="Bug Dashboard">
<img src="https://c2.staticflickr.com/2/1665/25872246050_eecef7d96b.jpg" alt="Bug Dashboard">
<a href="https://c2.staticflickr.com/2/1599/25912415863_9df3386e77_o.png" target="_blank" title="Bug Dashboard">
<img src="https://c2.staticflickr.com/2/1599/25912415863_c93075e925.jpg" alt="Bug Dashboard">
</a>
<br />
<em>Bug Dashboard</em>
</td>
<td align="center">
<a href="https://c2.staticflickr.com/2/1483/25542468143_b2a978f3af_o.png" target="_blank" title="Task Dashboard">
<img src="https://c2.staticflickr.com/2/1483/25542468143_bb1517cef6.jpg" alt="Task Dashboard">
<a href="https://c2.staticflickr.com/2/1622/26489354656_7f312aa807_o.png" target="_blank" title="Task Dashboard">
<img src="https://c2.staticflickr.com/2/1622/26489354656_0a8d987faa.jpg" alt="Task Dashboard">
</a>
<br />
<em>Task Dashboard</em>
</td>
</tr>
<tr>
<td align="center">
<a href="https://c2.staticflickr.com/2/1565/26119159756_1d02cee079_o.png" target="_blank" title="Kanban Board">
<img src="https://c2.staticflickr.com/2/1565/26119159756_53e4873e8a.jpg" alt="Kanban Board">
<a href="https://c2.staticflickr.com/2/1483/25912422783_391a2209e4_o.png" target="_blank" title="Kanban Board">
<img src="https://c2.staticflickr.com/2/1483/25912422783_614dba0c9b.jpg" alt="Kanban Board">
</a>
<br />
<em>Kanban Board</em>
</td>
<td align="center">
<a href="https://c2.staticflickr.com/2/1476/25542466323_219d1c7c31_o.png" target="_blank" title="Gantt Chart">
<img src="https://c2.staticflickr.com/2/1476/25542466323_dd87ae4984.jpg" alt="Gantt Chart">
<a href="https://c2.staticflickr.com/2/1696/26422968362_46842d4320_o.png" target="_blank" title="Roadmap">
<img src="https://c2.staticflickr.com/2/1696/26422968362_12ea2e82f0.jpg" alt="Roadmap">
</a>
<br />
<em>Gantt Chart</em>
<em>Roadmap</em>
</td>
<td align="center">
<a href="https://c2.staticflickr.com/2/1648/26078766341_4d622dc741_o.png" target="_blank" title="Roadmap">
<img src="https://c2.staticflickr.com/2/1648/26078766341_a324066d17.jpg" alt="Roadmap">
<a href="https://c2.staticflickr.com/2/1474/26489353536_bc387724fd_o.png" target="_blank" title="Gantt Chart">
<img src="https://c2.staticflickr.com/2/1474/26489353536_2547ec4e50.jpg" alt="Gantt Chart">
</a>
<br />
<em>Roadmap</em>
<em>Project Members</em>
</td>
</tr>
</table>
Expand Down Expand Up @@ -96,7 +96,7 @@ MyCollab requires a running Java Runtime Environment (7 or greater), Java comman

## Installation

The current MyCollab version is 5.2.10 released on 30th March, 2016. This branch focuses in mobile devices, reporting and customize options for on-demand edition.
The current MyCollab version is 5.2.12 released on 19th April, 2016. This branch focuses in mobile devices, reporting and customize options for on-demand edition.

1. Download MyCollab binary - https://www.mycollab.com/self-hosted/
2. Follow installation guideline at https://community.mycollab.com/installing-mycollab/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Version 5.2.12
* Allow to upload project logo
* Can adjust the parent-child relationship of tasks
* New Project list view
* Adjust the java memory settings
* Other minor improvements

**Bug Fixes**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public String getLogoPath(Integer accountId, String logoName, int size) {
logoName, size);
}

public static String getEntityLogoPath(Integer accountId, String id, Integer size) {
return String.format("%s%d/.assets/%s_%d.png", SiteConfiguration.getResourceDownloadUrl(), accountId,
id, size);
}

public String getFavIconPath(Integer sAccountId, String favIconName) {
if (favIconName == null || "".equals(favIconName)) {
return MyCollabAssets.newAssetLink("favicon.ico");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public static String getProjectLogoPath(Integer accountId, Integer projectId) {
return String.format("%d/project/%d/.attachments", accountId, projectId);
}

public static String getEntityLogoPath(Integer accountId) {
return String.format("%d/.assets", accountId);
}

public static String buildLogoPath(Integer sAccountId, String logoFileName, Integer logoSize) {
return String.format("%d/.assets/%s_%d.png", sAccountId, logoFileName, logoSize);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public class SimpleProject extends Project {

private String clientName;

private String clientAvatarId;

@NotBindable
private ProjectCustomizeView customizeView;

Expand Down Expand Up @@ -213,6 +215,14 @@ public void setClientName(String clientName) {
this.clientName = clientName;
}

public String getClientAvatarId() {
return clientAvatarId;
}

public void setClientAvatarId(String clientAvatarId) {
this.clientAvatarId = clientAvatarId;
}

public enum Field {
leadFullName, totalBillableHours, totalNonBillableHours, clientName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
m_crm_account.shippingCountry, m_crm_account.shippingState, m_crm_account.numemployees, m_crm_account.createdTime,
m_crm_account.lastUpdatedTime,
m_crm_account.createdUser, m_crm_account.sAccountId, m_crm_account.assignUser, m_crm_account.type, m_crm_account.industry,
m_crm_account.avatarId,
s_user.avatarId AS assignUserAvatarId,
LTRIM(concat(s_user.firstname, ' ', LTRIM(concat(IFNULL(s_user.middlename, ''), ' ')), s_user.lastname)) as assignUserFullName,
createdUserTabl.avatarId AS createdUserAvatarId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<result column="leadFullName" jdbcType="VARCHAR" property="leadFullName" />
<result column="leadAvatarId" jdbcType="VARCHAR" property="leadAvatarId" />
<result column="clientName" jdbcType="VARCHAR" property="clientName" />
<result column="clientAvatarId" jdbcType="VARCHAR" property="clientAvatarId" />
<association property="currency"
resultMap="com.esofthead.mycollab.common.dao.CurrencyMapper.BaseResultMap"
columnPrefix="curr_"/>
Expand Down Expand Up @@ -138,7 +139,7 @@
concat(s_user.firstname, ' ', LTRIM(concat(IFNULL(s_user.middlename, ''), ' ')), s_user.lastname) AS createUserFullName,
concat(leadUser.firstname, ' ', LTRIM(concat(IFNULL(leadUser.middlename, ''), ' ')), leadUser.lastname) AS leadFullName,
leadUser.avatarId AS leadAvatarId, m_prj_project.accountId,
m_crm_account.accountName AS clientName, m_prj_project.currencyid, m_prj_project.progress,
m_crm_account.accountName AS clientName, m_crm_account.avatarId AS clientAvatarId, m_prj_project.currencyid, m_prj_project.progress,
(SELECT COUNT(*) FROM m_tracker_bug WHERE m_tracker_bug.projectId=m_prj_project.id) AS numBugs,
(SELECT COUNT(*) FROM m_tracker_bug WHERE m_tracker_bug.projectId=m_prj_project.id AND m_tracker_bug.status NOT IN ('Resolved', 'Verified')) AS numOpenBugs,
(SELECT COUNT(*) FROM m_prj_task WHERE m_prj_task.projectId=m_prj_project.id) AS numTasks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public void buttonClick(ClickEvent event) {
});
moveBtn.setIcon(FontAwesome.ARROWS);
moveBtn.addStyleName(UIConstants.BUTTON_ACTION);
controlGroupBtnLayout.addComponent(moveBtn);

Button cancelBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CANCEL), new ClickListener() {
private static final long serialVersionUID = 1L;

Expand All @@ -226,9 +226,9 @@ public void buttonClick(ClickEvent event) {
}
});
cancelBtn.addStyleName(UIConstants.BUTTON_OPTION);
controlGroupBtnLayout.addComponent(cancelBtn);
controlGroupBtnLayout.with(cancelBtn, moveBtn);

contentLayout.with(controlGroupBtnLayout).withAlign(controlGroupBtnLayout, Alignment.MIDDLE_CENTER);
contentLayout.with(controlGroupBtnLayout).withAlign(controlGroupBtnLayout, Alignment.MIDDLE_RIGHT);
}

public abstract void displayAfterMoveSuccess(Folder folder, boolean checking);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,9 @@ public void buttonClick(final ClickEvent event) {
}
});
cancelBtn.addStyleName(UIConstants.BUTTON_OPTION);
controlButtons.with(saveBtn, cancelBtn).alignAll(Alignment.MIDDLE_CENTER);
controlButtons.with(cancelBtn, saveBtn);
contentLayout.addComponent(controlButtons);
contentLayout.setComponentAlignment(controlButtons, Alignment.MIDDLE_CENTER);
contentLayout.setComponentAlignment(controlButtons, Alignment.MIDDLE_RIGHT);

this.setContent(contentLayout);
}
Expand All @@ -557,7 +557,8 @@ public AddNewFolderWindow() {
this.setCaption("New Folder");
this.center();

MVerticalLayout contentLayout = new MVerticalLayout().withSpacing(false).withMargin(new MarginInfo(false, false, true, false));
MVerticalLayout contentLayout = new MVerticalLayout().withSpacing(false).withMargin(new MarginInfo(false,
true, true, false));
this.setContent(contentLayout);

GridFormLayoutHelper layoutHelper = GridFormLayoutHelper.defaultFormLayoutHelper(1, 1);
Expand Down Expand Up @@ -590,7 +591,6 @@ public void buttonClick(final ClickEvent event) {
});
saveBtn.addStyleName(UIConstants.BUTTON_ACTION);
saveBtn.setIcon(FontAwesome.SAVE);
controlsLayout.addComponent(saveBtn);

Button cancelBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CANCEL), new Button.ClickListener() {
private static final long serialVersionUID = 1L;
Expand All @@ -601,10 +601,9 @@ public void buttonClick(final ClickEvent event) {
}
});
cancelBtn.addStyleName(UIConstants.BUTTON_OPTION);
controlsLayout.addComponent(cancelBtn);
controlsLayout.setComponentAlignment(cancelBtn, Alignment.MIDDLE_RIGHT);
controlsLayout.with(cancelBtn, saveBtn);

contentLayout.with(controlsLayout).withAlign(controlsLayout, Alignment.MIDDLE_CENTER);
contentLayout.with(controlsLayout).withAlign(controlsLayout, Alignment.MIDDLE_RIGHT);
}
}

Expand Down Expand Up @@ -635,7 +634,8 @@ public MultiUploadContentWindow() {
this.layoutHelper.addComponent(multiFileUploadExt, "File", 0, 0);
contentLayout.addComponent(this.layoutHelper.getLayout());

MHorizontalLayout controlsLayout = new MHorizontalLayout().withMargin(new MarginInfo(true, false, false, false));
MHorizontalLayout controlsLayout = new MHorizontalLayout().withMargin(new MarginInfo(true, true, false,
false));

final Button uploadBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_UPLOAD), new Button.ClickListener() {
private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -675,7 +675,6 @@ public void buttonClick(final ClickEvent event) {
});
uploadBtn.addStyleName(UIConstants.BUTTON_ACTION);
uploadBtn.setIcon(FontAwesome.UPLOAD);
controlsLayout.addComponent(uploadBtn);

Button cancelBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CANCEL), new Button.ClickListener() {
private static final long serialVersionUID = 1L;
Expand All @@ -686,11 +685,10 @@ public void buttonClick(final ClickEvent event) {
}
});
cancelBtn.addStyleName(UIConstants.BUTTON_OPTION);
controlsLayout.addComponent(cancelBtn);
controlsLayout.setComponentAlignment(cancelBtn, Alignment.MIDDLE_RIGHT);
controlsLayout.with(cancelBtn, uploadBtn);

contentLayout.addComponent(controlsLayout);
contentLayout.setComponentAlignment(controlsLayout, Alignment.MIDDLE_CENTER);
contentLayout.setComponentAlignment(controlsLayout, Alignment.MIDDLE_RIGHT);
}
}

Expand All @@ -709,7 +707,7 @@ public void displayAfterMoveSuccess(Folder folder, boolean checking) {
NotificationUtil.showNotification("Congrats", "Moved asset(s) successfully.");
} else {
NotificationUtil.showWarningNotification("Moving assets is finished, some items can't move to destination. Please " +
"check duplicated file-name and try again.");
"check duplicated file-name and try again.");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.esofthead.mycollab.configuration.StorageFactory;
import com.esofthead.mycollab.core.utils.StringUtils;
import com.esofthead.mycollab.module.crm.domain.SimpleAccount;
import com.esofthead.mycollab.module.file.PathUtils;
import com.esofthead.mycollab.module.project.domain.Project;
import com.esofthead.mycollab.module.project.i18n.OptionI18nEnum;
Expand All @@ -28,7 +29,6 @@
import com.vaadin.server.FontAwesome;
import com.vaadin.server.Sizeable;
import com.vaadin.ui.*;
import org.vaadin.jouni.restrain.Restrain;

/**
* @author MyCollab Ltd.
Expand Down Expand Up @@ -65,4 +65,24 @@ public static final Component buildProjectLogo(Project project, int size) {
"new project logo");
return wrapper;
}

public static final Component buildClientLogo(SimpleAccount account, int size) {
AbstractComponent wrapper;
if (!StringUtils.isBlank(account.getAvatarid())) {
wrapper = new Image(null, new ExternalResource(StorageFactory.getInstance().getEntityLogoPath(AppContext
.getAccountId(), account.getAvatarid(), 100)));
} else {
String accountName = account.getAccountname();
accountName = (accountName.length() > 3) ? accountName.substring(0, 3) : accountName;
ELabel projectIcon = new ELabel(accountName).withStyleName(UIConstants.TEXT_ELLIPSIS, "center");
wrapper = new VerticalLayout();
((VerticalLayout) wrapper).addComponent(projectIcon);
((VerticalLayout) wrapper).setComponentAlignment(projectIcon, Alignment.MIDDLE_CENTER);
}
wrapper.setWidth(size, Sizeable.Unit.PIXELS);
wrapper.setHeight(size, Sizeable.Unit.PIXELS);
wrapper.addStyleName(UIConstants.CIRCLE_BOX);
wrapper.setDescription("To change the client logo, select 'Edit client' and upload the new client logo");
return wrapper;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package com.esofthead.mycollab.module.project.view;

import com.esofthead.mycollab.module.project.view.parameters.ProjectScreenData;
import com.esofthead.mycollab.vaadin.AppContext;
import com.esofthead.mycollab.vaadin.mvp.LoadPolicy;
import com.esofthead.mycollab.vaadin.mvp.ScreenData;
Expand All @@ -41,7 +42,11 @@ protected void onGo(ComponentContainer container, ScreenData<?> data) {
ProjectModule prjContainer = (ProjectModule) container;
prjContainer.removeAllComponents();
prjContainer.addComponent(view);
view.lazyLoadView();
if (data instanceof ProjectScreenData.GotoList) {
view.showProjectList();
} else {
view.showDashboard();
}
AppContext.addFragment("project", "Project");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
*/
package com.esofthead.mycollab.module.project.view;

import com.esofthead.mycollab.vaadin.mvp.LazyPageView;
import com.esofthead.mycollab.vaadin.mvp.PageView;

import java.util.List;

/**
* @author MyCollab Ltd.
* @since 1.0
*/
public interface UserDashboardView extends LazyPageView {
String DASHBOARD = "dashboard";
String FOLLOWING_ITEMS = "following";
String TIME = "time";
String SETTING = "setting";
public interface UserDashboardView extends PageView {

List<Integer> getInvoledProjKeys();
void showDashboard();

void showProjectList();

List<Integer> getInvolvedProjectKeys();
}
Loading

0 comments on commit e29efb7

Please sign in to comment.