diff --git a/viewer/css/cmv-theme-overrides.css b/viewer/css/cmv-theme-overrides.css index f5f20c4a6..3f118cb1e 100644 --- a/viewer/css/cmv-theme-overrides.css +++ b/viewer/css/cmv-theme-overrides.css @@ -26,48 +26,9 @@ } /* icons for the sidebar */ - -.cmv .dijitTitlePane .dijitTitlePaneTextNode:before, -.cmv .dijitDialogTitleBar:before { - font-family:'FontAwesome'; - margin-right: 8px; -} - -.cmv #bookmarks_parent .dijitTitlePaneTextNode:before { - content: '\f02e' -} -.cmv #directions_parent .dijitTitlePaneTextNode:before { - content: '\f277' -} -.cmv #draw_parent .dijitTitlePaneTextNode:before { - content: '\f1fc' -} -.cmv #editor_parent .dijitTitlePaneTextNode:before { - content: '\f040' -} -.cmv #find_parent .dijitTitlePaneTextNode:before { - content: '\f002'; -} -.cmv #help_parent .dijitTitlePaneTextNode:before { - content: '\f059' -} -.cmv #identify_parent .dijitTitlePaneTextNode:before { - content: '\f05a' -} -.cmv #layerControl_parent .dijitTitlePaneTextNode:before{ - content: '\f00b'; -} -.cmv #legend_parent .dijitTitlePaneTextNode:before { - content: '\f03e' -} -.cmv #measurement_parent .dijitTitlePaneTextNode:before { - content: '\f065' -} -.cmv #print_parent .dijitTitlePaneTextNode:before { - content: '\f02f'; -} -.cmv #streetview_parent .dijitTitlePaneTextNode:before { - content: '\f21d'; +.cmv .dijitTitlePane .dijitTitlePaneTitle .titlePaneIcon { + margin: 0 0 0 8px; + padding-top: 2px; } /* end custom icons */ diff --git a/viewer/js/config/viewer.js b/viewer/js/config/viewer.js index 1ea172b9f..f7c7a8c34 100644 --- a/viewer/js/config/viewer.js +++ b/viewer/js/config/viewer.js @@ -308,6 +308,7 @@ define([ type: 'titlePane', path: 'gis/dijit/Identify', title: i18n.viewer.widgets.identify, + iconClass: 'fa-info-circle', open: false, position: 3, options: 'config/identify' @@ -399,6 +400,7 @@ define([ type: 'titlePane', path: 'gis/dijit/Legend', title: i18n.viewer.widgets.legend, + iconClass: 'fa-picture-o', open: false, position: 1, options: { @@ -412,6 +414,7 @@ define([ type: 'titlePane', path: 'gis/dijit/LayerControl', title: i18n.viewer.widgets.layerControl, + iconClass: 'fa-th-list', open: false, position: 0, options: { @@ -438,6 +441,7 @@ define([ type: 'titlePane', path: 'gis/dijit/Bookmarks', title: i18n.viewer.widgets.bookmarks, + iconClass: 'fa-bookmark', open: false, position: 2, options: 'config/bookmarks' @@ -449,6 +453,7 @@ define([ canFloat: true, path: 'gis/dijit/Find', title: i18n.viewer.widgets.find, + iconClass: 'fa-search', open: false, position: 3, options: 'config/find' @@ -460,6 +465,7 @@ define([ canFloat: true, path: 'gis/dijit/Draw', title: i18n.viewer.widgets.draw, + iconClass: 'fa-paint-brush', open: false, position: 4, options: { @@ -474,6 +480,7 @@ define([ canFloat: true, path: 'gis/dijit/Measurement', title: i18n.viewer.widgets.measure, + iconClass: 'fa-expand', open: false, position: 5, options: { @@ -490,6 +497,7 @@ define([ canFloat: true, path: 'gis/dijit/Print', title: i18n.viewer.widgets.print, + iconClass: 'fa-print', open: false, position: 6, options: { @@ -508,6 +516,7 @@ define([ type: 'titlePane', path: 'gis/dijit/Directions', title: i18n.viewer.widgets.directions, + iconClass: 'fa-map-signs', open: false, position: 7, options: { @@ -529,6 +538,7 @@ define([ type: 'titlePane', path: 'gis/dijit/Editor', title: i18n.viewer.widgets.editor, + iconClass: 'fa-pencil', open: false, position: 8, options: { @@ -558,6 +568,7 @@ define([ position: 9, path: 'gis/dijit/StreetView', title: i18n.viewer.widgets.streetview, + iconClass: 'fa-street-view', paneOptions: { resizable: true, resizeOptions: { diff --git a/viewer/js/gis/dijit/FloatingTitlePane.js b/viewer/js/gis/dijit/FloatingTitlePane.js index 82b70a5bb..6c9e05c16 100644 --- a/viewer/js/gis/dijit/FloatingTitlePane.js +++ b/viewer/js/gis/dijit/FloatingTitlePane.js @@ -36,6 +36,11 @@ define([ this.createDomNodes(); this.own(on(window, 'resize', lang.hitch(this, '_endDrag'))); } + if (this.iconClass) { + this.iconNode = domConstruct.create('span', { + 'class': 'titlePaneIcon fa fa-fw ' + this.iconClass + }, this.titleNode, 'before'); + } this.own(topic.subscribe('titlePane/event', lang.hitch(this, '_updateWidgetSidebarPosition'))); this.own(aspect.after(this, 'toggle', lang.hitch(this, '_afterToggle'))); this.inherited(arguments); diff --git a/viewer/js/viewer/_WidgetsMixin.js b/viewer/js/viewer/_WidgetsMixin.js index 76bf85de1..9d300b577 100644 --- a/viewer/js/viewer/_WidgetsMixin.js +++ b/viewer/js/viewer/_WidgetsMixin.js @@ -212,6 +212,7 @@ define([ var tp, options = lang.mixin({ title: widgetConfig.title || 'Widget', + iconClass: widgetConfig.iconClass, open: widgetConfig.open || false, canFloat: widgetConfig.canFloat || false, resizable: widgetConfig.resizable || false