summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-07-08 03:32:01 (EDT)
committer Stephan Born2013-08-29 05:03:45 (EDT)
commit84af612a421e9e82e1162cd2b70cf7717a386c0a (patch)
tree216bb378d1298a4a371b1d115aefbf4dbfeb7bd8
parent9a06ea5c4c05829c17641a648809c221c98dcd56 (diff)
downloadorg.eclipse.stardust.ui.web-84af612a421e9e82e1162cd2b70cf7717a386c0a.zip
org.eclipse.stardust.ui.web-84af612a421e9e82e1162cd2b70cf7717a386c0a.tar.gz
org.eclipse.stardust.ui.web-84af612a421e9e82e1162cd2b70cf7717a386c0a.tar.bz2
Jira-ID: CRNT-28362
Added method updateViewIconClass , updateViewTitle in PortalApplication Added icon classes for all view icons in views-common-icons.css Added method call to updateViewIconClass and updateViewTitle when view.icon or view.title changes git-svn-id: https://svn.csa.sungard.com/repos/ipp2/product/trunk/stardust/ui.web@65867 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b Signed-off-by: Sidharth Singh <sidharth.singh@sungard.com>
-rw-r--r--portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplication.java26
-rw-r--r--process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/ActivityDetailsBean.java2
-rw-r--r--process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/NotesBean.java12
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/document/DocumentHandlerBean.java4
-rw-r--r--views-common/src/main/resources/META-INF/xhtml/css/views-common-icons.css172
5 files changed, 210 insertions, 6 deletions
diff --git a/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplication.java b/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplication.java
index 7bb7173..59ba655 100644
--- a/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplication.java
+++ b/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplication.java
@@ -1182,6 +1182,32 @@ public class PortalApplication
}
/**
+ *
+ * @param view
+ */
+ public void updateViewIconClass(View view)
+ {
+ String iconClass = deriveIconClass(view.getIcon());
+ // FOR PANAMA
+ String popupScript = "parent.BridgeUtils.View.setIcon('" + iconClass + "');";
+ JavascriptContext.addJavascriptCall(FacesContext.getCurrentInstance(), popupScript);
+ addEventScript(popupScript);
+ }
+
+ /**
+ *
+ * @param view
+ */
+ public void updateViewTitle(View view)
+ {
+ String title = view.getLabel();
+ // FOR PANAMA
+ String popupScript = "parent.BridgeUtils.View.setTitle('" + title + "');";
+ JavascriptContext.addJavascriptCall(FacesContext.getCurrentInstance(), popupScript);
+ addEventScript(popupScript);
+ }
+
+ /**
* @param view
*/
private void handleViewClosePanama(View view)
diff --git a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/ActivityDetailsBean.java b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/ActivityDetailsBean.java
index a307245..1f565ee 100644
--- a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/ActivityDetailsBean.java
+++ b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/ActivityDetailsBean.java
@@ -401,6 +401,8 @@ public class ActivityDetailsBean extends UIComponentBean
if (StringUtils.isNotEmpty(iconPath))
{
thisView.setIcon(iconPath);
+ // FOR PANAMA
+ PortalApplication.getInstance().updateViewIconClass(thisView);
}
hasCreateCasePermission = AuthorizationUtils.canCreateCase();
diff --git a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/NotesBean.java b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/NotesBean.java
index 3fe97fa..a88f0c8 100644
--- a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/NotesBean.java
+++ b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/NotesBean.java
@@ -30,6 +30,7 @@ import org.eclipse.stardust.engine.api.dto.Note;
import org.eclipse.stardust.engine.api.dto.ProcessInstanceAttributes;
import org.eclipse.stardust.engine.api.runtime.ProcessInstance;
import org.eclipse.stardust.ui.web.common.UIComponentBean;
+import org.eclipse.stardust.ui.web.common.app.PortalApplication;
import org.eclipse.stardust.ui.web.common.app.View;
import org.eclipse.stardust.ui.web.common.column.ColumnPreference;
import org.eclipse.stardust.ui.web.common.column.DefaultColumnModel;
@@ -145,10 +146,13 @@ public class NotesBean extends UIComponentBean implements IUserObjectBuilder<Not
List<Note> noteList = attributes.getNotes();
setNotes(noteList);
if (noteList != null && noteList.size() > 0)
- thisView.setIcon("/plugins/views-common/images/icons/mime-types/notes-filled.png");
- else
- thisView.setIcon("/plugins/views-common/images/icons/notes-blank.png");
-
+ thisView.setIcon("/plugins/views-common/images/icons/mime-types/notes-filled.png");
+ else
+ thisView.setIcon("/plugins/views-common/images/icons/notes-blank.png");
+
+ // FOR PANAMA
+ PortalApplication.getInstance().updateViewIconClass(thisView);
+
Date noteTimestamp = (Date) getParamValue("noteTimestamp");
Integer noteIndex = (Integer) getParamValue("noteIndex");
if (null != noteTimestamp)
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/document/DocumentHandlerBean.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/document/DocumentHandlerBean.java
index cd473bf..e615708 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/document/DocumentHandlerBean.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/document/DocumentHandlerBean.java
@@ -390,8 +390,12 @@ public class DocumentHandlerBean extends UIComponentBean implements ViewEventHan
thisView.getViewParams().put("documentVersion", documentVersion);
thisView.setIcon(documentContentInfo.getIcon());
+ // FOR PANAMA
+ PortalApplication.getInstance().updateViewIconClass(thisView);
+
thisView.getViewParams().put("documentName", documentContentInfo.getName());
thisView.resolveLabelAndDescription();
+ PortalApplication.getInstance().updateViewTitle(thisView);
// update popup content if it is already in open state
ExternalDocumentViewerBean externalDocumentViewer = ExternalDocumentViewerBean.getInstance();
diff --git a/views-common/src/main/resources/META-INF/xhtml/css/views-common-icons.css b/views-common/src/main/resources/META-INF/xhtml/css/views-common-icons.css
index f48758b..b8d8fd2 100644
--- a/views-common/src/main/resources/META-INF/xhtml/css/views-common-icons.css
+++ b/views-common/src/main/resources/META-INF/xhtml/css/views-common-icons.css
@@ -3,5 +3,173 @@
}
.activity {
- background: url("../images/icons/process-history/activity.png") no-repeat;
-} \ No newline at end of file
+ background: url("../images/icons/process-history/activity.png")
+ no-repeat;
+}
+
+.process {
+ background: url("../images/icons/process.png") no-repeat;
+}
+
+.page_white_find {
+ background: url("../images/icons/page_white_find.png") no-repeat;
+}
+
+.envelope {
+ background: url("../images/icons/envelope.png") no-repeat;
+}
+
+.chart-pie {
+ background: url("../images/icons/chart-pie.png") no-repeat;
+}
+
+.user-silhouette {
+ background: url("../images/icons/user-silhouette.png") no-repeat;
+}
+
+.process_manager {
+ background: url("../images/icons/process_manager.png") no-repeat;
+}
+
+.cog_search {
+ background: url("../images/icons/cog_search.png") no-repeat;
+}
+
+.pending_activities {
+ background: url("../images/icons/pending_activities.png") no-repeat;
+}
+
+.activity_completed {
+ background:
+ url("../images/icons/process-history/activity_completed.png")
+ no-repeat;
+}
+
+.activity_postponed {
+ background: url("../images/icons/activity_postponed.png") no-repeat;
+}
+
+.activity_stranded {
+ background: url("../images/icons/activity_stranded.png") no-repeat;
+}
+
+.group {
+ background: url("../images/icons/group.png") no-repeat;
+}
+
+.role {
+ background: url("../images/icons/role.png") no-repeat;
+}
+
+.group_key {
+ background: url("../images/icons/group_key.png") no-repeat;
+}
+
+.chart-up {
+ background: url("../images/icons/chart-up.png") no-repeat;
+}
+
+.chart-up-color {
+ background: url("../images/icons/chart-up-color.png") no-repeat;
+}
+
+.traffic_light {
+ background: url("../images/icons/traffic_light.png") no-repeat;
+}
+
+.money-coin {
+ background: url("../images/icons/money-coin.png") no-repeat;
+}
+
+.criticality_manager {
+ background: url("../images/icons/criticality_manager.png") no-repeat;
+}
+
+.criticality_manager {
+ background: url("../images/icons/criticality_manager.png") no-repeat;
+}
+
+.notes-filled {
+ background: url("../images/icons/mime-types/notes-filled.png") no-repeat;
+}
+
+.notes-blank {
+ background: url("../images/icons/notes-blank.png") no-repeat;
+}
+
+.activity_qa_passed {
+ background: url("../images/icons/activity_qa_passed.png") no-repeat;
+}
+
+.activity_qa_failed {
+ background: url("../images/icons/activity_qa_failed.png") no-repeat;
+}
+
+.activity_qa_await {
+ background: url("../images/icons/activity_qa_await.png") no-repeat;
+}
+
+.html {
+ background: url("../images/icons/mime-types/html.png") no-repeat;
+}
+
+.document-image {
+ background: url("../images/icons/mime-types/document-image.png") no-repeat;
+}
+
+.images {
+ background: url("../images/icons/mime-types/images.png") no-repeat;
+}
+
+.document-pdf-text {
+ background: url("../images/icons/mime-types/document-pdf-text.png") no-repeat;
+}
+
+.document-word-text {
+ background: url("../images/icons/mime-types/document-word-text.png") no-repeat;
+}
+
+.document-film {
+ background: url("../images/icons/mime-types/document-film.png") no-repeat;
+}
+
+.document-flash-movie {
+ background: url("../images/icons/mime-types/document-flash-movie.png") no-repeat;
+}
+
+.document-music {
+ background: url("../images/icons/mime-types/document-music.png") no-repeat;
+}
+
+.document-zipper {
+ background: url("../images/icons/mime-types/document-zipper.png") no-repeat;
+}
+
+.document-text {
+ background: url("../images/icons/mime-types/document-text.png") no-repeat;
+}
+
+.document-code {
+ background: url("../images/icons/mime-types/document-code.png") no-repeat;
+}
+
+.document-powerpoint {
+ background: url("../images/icons/mime-types/document-powerpoint.png") no-repeat;
+}
+
+.document-excel {
+ background: url("../images/icons/mime-types/document-excel.png") no-repeat;
+}
+
+.tree_document {
+ background: url("../images/icons/mime-types/tree_document.gif") no-repeat;
+}
+
+.report {
+ background: url("../images/icons/mime-types/report.png") no-repeat;
+}
+
+.document-excel-csv {
+ background: url("../images/icons/mime-types/document-excel-csv.png") no-repeat;
+}
+