Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the icons for the tilePanes configurable #663

Merged
merged 1 commit into from
Jan 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 3 additions & 42 deletions viewer/css/cmv-theme-overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
11 changes: 11 additions & 0 deletions viewer/js/config/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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: {
Expand All @@ -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: {
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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: {
Expand All @@ -474,6 +480,7 @@ define([
canFloat: true,
path: 'gis/dijit/Measurement',
title: i18n.viewer.widgets.measure,
iconClass: 'fa-expand',
open: false,
position: 5,
options: {
Expand All @@ -490,6 +497,7 @@ define([
canFloat: true,
path: 'gis/dijit/Print',
title: i18n.viewer.widgets.print,
iconClass: 'fa-print',
open: false,
position: 6,
options: {
Expand All @@ -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: {
Expand All @@ -529,6 +538,7 @@ define([
type: 'titlePane',
path: 'gis/dijit/Editor',
title: i18n.viewer.widgets.editor,
iconClass: 'fa-pencil',
open: false,
position: 8,
options: {
Expand Down Expand Up @@ -558,6 +568,7 @@ define([
position: 9,
path: 'gis/dijit/StreetView',
title: i18n.viewer.widgets.streetview,
iconClass: 'fa-street-view',
paneOptions: {
resizable: true,
resizeOptions: {
Expand Down
5 changes: 5 additions & 0 deletions viewer/js/gis/dijit/FloatingTitlePane.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions viewer/js/viewer/_WidgetsMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down