Refactoring
authorbsinou <bsinou@argeo.org>
Mon, 20 Feb 2017 14:36:36 +0000 (15:36 +0100)
committerbsinou <bsinou@argeo.org>
Mon, 20 Feb 2017 14:36:36 +0000 (15:36 +0100)
org.argeo.suite.workbench.rap/META-INF/spring/osgi.xml
org.argeo.suite.workbench.rap/META-INF/spring/parts.xml
org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/parts/AbstractSuiteDashboard.java
org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/parts/DefaultDashboardEditor.java
org.argeo.suite.workbench.rap/theme/argeo-classic/icons/actions/deleteSmall.gif [moved from org.argeo.suite.workbench.rap/theme/argeo-classic/icons/actions/delete_small.gif with 100% similarity]
org.argeo.suite.workbench.rap/theme/argeo-classic/icons/actions/openCalendar.gif [new file with mode: 0644]
org.argeo.suite.workbench.rap/theme/argeo-classic/workbench-ext.css

index f026adbb186d6072818c6d50e7bc227edf590674..8f1400f1921265e87b969a721279d5780dc919d2 100644 (file)
@@ -9,12 +9,13 @@
        <!-- REFERENCES -->\r
        <reference id="repository" interface="javax.jcr.Repository"\r
                filter="(cn=home)" />\r
-       <reference id="nodeFileSystemProvider" interface="java.nio.file.spi.FileSystemProvider"\r
-               filter="(service.pid=org.argeo.node.fsProvider)" />\r
-       <reference id="appWorkbenchService"\r
-               interface="org.argeo.connect.ui.workbench.AppWorkbenchService" />\r
-\r
+       <reference id="resourcesService" interface="org.argeo.connect.resources.ResourcesService" />\r
+       <reference id="activitiesService"\r
+               interface="org.argeo.connect.activities.ActivitiesService" />\r
        <reference id="peopleService" interface="org.argeo.connect.people.PeopleService" />\r
        <reference id="documentsService" interface="org.argeo.connect.documents.DocumentsService" />\r
-\r
+       <reference id="appWorkbenchService"\r
+               interface="org.argeo.connect.ui.workbench.AppWorkbenchService" />\r
+       <reference id="nodeFileSystemProvider" interface="java.nio.file.spi.FileSystemProvider"\r
+               filter="(service.pid=org.argeo.node.fsProvider)" />\r
 </beans:beans>\r
index 78b54a8cc7b895171395a7e43bff9ac012dfdae5..ee418dd9ab4da53573589028e109e8a8c1a77ca7 100644 (file)
        </bean>
 
        <!-- VIEWS -->
-       <bean id="testView" class="org.argeo.suite.workbench.parts.TestView"
-               scope="prototype">
-               <property name="repository" ref="repository" />
-       </bean>
-
+       
        <!-- EDITORS -->
        <bean id="defaultDashboardEditor" class="org.argeo.suite.workbench.parts.DefaultDashboardEditor"
                scope="prototype">
                <property name="repository" ref="repository" />
-               <property name="appWorkbenchService" ref="appWorkbenchService" />
+               <property name="resourcesService" ref="resourcesService" />
+               <property name="activitiesService" ref="activitiesService" />
                <property name="peopleService" ref="peopleService" />
                <property name="documentsService" ref="documentsService" />
+               <property name="appWorkbenchService" ref="appWorkbenchService" />
        </bean>
 </beans>
index f356ca23a3f1b7fbe12be53214987b975c3b0576..48053da45ba7bc5f6841d4a94b18f396f8d4206f 100644 (file)
@@ -40,8 +40,8 @@ public abstract class AbstractSuiteDashboard extends EditorPart {
 
        // DEPENDENCY INJECTION
        private Repository repository;
-       private ResourcesService resourceService;
-       private ActivitiesService activityService;
+       private ResourcesService resourcesService;
+       private ActivitiesService activitiesService;
        private PeopleService peopleService;
        private DocumentsService documentsService;
        private AppWorkbenchService appWorkbenchService;
@@ -187,11 +187,11 @@ public abstract class AbstractSuiteDashboard extends EditorPart {
        }
 
        public ResourcesService getResourceService() {
-               return resourceService;
+               return resourcesService;
        }
 
        protected ActivitiesService getActivityService() {
-               return activityService;
+               return activitiesService;
        }
 
        protected PeopleService getPeopleService() {
@@ -219,12 +219,12 @@ public abstract class AbstractSuiteDashboard extends EditorPart {
                this.repository = repository;
        }
 
-       public void setResourceService(ResourcesService resourceService) {
-               this.resourceService = resourceService;
+       public void setResourcesService(ResourcesService resourcesService) {
+               this.resourcesService = resourcesService;
        }
 
-       public void setActivityService(ActivitiesService activityService) {
-               this.activityService = activityService;
+       public void setActivitiesService(ActivitiesService activitiesService) {
+               this.activitiesService = activitiesService;
        }
 
        public void setDocumentsService(DocumentsService documentsService) {
@@ -238,5 +238,4 @@ public abstract class AbstractSuiteDashboard extends EditorPart {
        public void setAppWorkbenchService(AppWorkbenchService appWorkbenchService) {
                this.appWorkbenchService = appWorkbenchService;
        }
-
 }
index a9dd0e5e969b4c3d3e78514d7c2d592f4e6b1e4a..db04a738ac2481673823bcb637db892bc1b3cd19 100644 (file)
@@ -5,7 +5,6 @@ import javax.jcr.NodeIterator;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.argeo.connect.ConnectConstants;
 import org.argeo.connect.activities.ActivitiesTypes;
 import org.argeo.connect.people.PeopleTypes;
 import org.argeo.connect.resources.ResourcesTypes;
@@ -82,23 +81,15 @@ public class DefaultDashboardEditor extends AbstractSuiteDashboard implements Re
                parent.setLayout(EclipseUiUtils.noSpaceGridLayout());
                createGadgetTitleCmp(parent, "Contacts");
                Composite bodyCmp = createGadgetBodyCmp(parent);
-
                ConnectWorkbenchUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Persons",
-                               PeopleTypes.PEOPLE_PERSON, getPeopleService().getBasePath(PeopleTypes.PEOPLE_PERSON));
-
+                               PeopleTypes.PEOPLE_PERSON);
                ConnectWorkbenchUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Organisations",
-                               PeopleTypes.PEOPLE_ORG, getPeopleService().getBasePath(PeopleTypes.PEOPLE_ORG));
-
-               Node tagParent = getResourceService().getTagLikeResourceParent(getSession(), PeopleTypes.PEOPLE_MAILING_LIST);
+                               PeopleTypes.PEOPLE_ORG);
                ConnectWorkbenchUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Mailing lists",
-                               PeopleTypes.PEOPLE_MAILING_LIST, ConnectJcrUtils.getPath(tagParent));
+                               PeopleTypes.PEOPLE_MAILING_LIST);
                ConnectWorkbenchUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Tasks",
-                               ActivitiesTypes.ACTIVITIES_TASK, getPeopleService().getBasePath(null));
-
-               tagParent = getResourceService().getTagLikeResourceParent(getSession(), ConnectConstants.RESOURCE_TAG);
-
+                               ActivitiesTypes.ACTIVITIES_TASK);
                ConnectWorkbenchUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Tags",
-                               ResourcesTypes.RESOURCES_TAG_INSTANCE, ConnectJcrUtils.getPath(tagParent));
-
+                               ResourcesTypes.RESOURCES_TAG_INSTANCE);
        }
 }
diff --git a/org.argeo.suite.workbench.rap/theme/argeo-classic/icons/actions/openCalendar.gif b/org.argeo.suite.workbench.rap/theme/argeo-classic/icons/actions/openCalendar.gif
new file mode 100644 (file)
index 0000000..5a89e33
Binary files /dev/null and b/org.argeo.suite.workbench.rap/theme/argeo-classic/icons/actions/openCalendar.gif differ
index 0f41a28f03b2360beae86647514ea71b3adcde18..0c902ebefdc59e19e183fba3b7399b2b5a477466 100644 (file)
@@ -87,6 +87,19 @@ Button.flat_btn, Button[PUSH][FLAT].flat_btn, Button.flat_btn:default,
        cursor: pointer;
 }
 
+
+Button[FLAT].open_calendar_btn {
+       background-image: url( theme/argeo-classic/icons/actions/openCalendar.gif);
+       background-color: transparent;
+       background-repeat: no-repeat;
+       border: 0px solid white;
+       border-radius: 0px;
+       padding: 0px 0px;
+       animation: hoverOut 500ms ease-out;
+       cursor: pointer;
+}
+
+
 /* Links */
 Link, Link-Hyperlink, Link-Hyperlink:link, Link-Hyperlink:visited,
        Link-Hyperlink:active {
@@ -142,6 +155,7 @@ Text.workbench_form_text:focused {
 }
 
 
+
 /****** DASHBOARD  *********/
 
 /** Gadgets  **/
@@ -288,7 +302,7 @@ Button[PUSH][FLAT].markAsDone_btn:pressed {
 }
 
 Button[PUSH][FLAT].small_delete_btn{
-       background-image: url( theme/argeo-classic/icons/actions/delete_small.gif);
+       background-image: url( theme/argeo-classic/icons/actions/deleteSmall.gif);
        border: 0px solid white;
        border-radius: 0px;
        padding: 0px 0px;