Skip to content

Commit 8ddf70a

Browse files
committed
Introducing the fonticon picker component
1 parent a07e0db commit 8ddf70a

File tree

20 files changed

+244
-5
lines changed

20 files changed

+244
-5
lines changed

application-settings.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ module.exports = {
1111
common: '/common',
1212
dialogEditor: '/dialog-editor',
1313
gtl: '/gtl',
14-
siteSwitcher: '/site-switcher'
14+
siteSwitcher: '/site-switcher',
15+
fonticonPicker: '/fonticon-picker'
1516
},
1617
nodePackages: 'node_modules/',
1718
get stylesheetPath() {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export default class FonticonPickerController {
2+
}

demo/controllers/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import AvailableComponentsController from './availableComponentsController';
22
import ToolbarMenuController from './toolbarMenuController';
33
import DataTableController from './dataTableController';
44
import SiteSwitcherController from './siteSwitcherController';
5+
import FonticonPickerController from './fonticonPickerController';
56
import * as ng from 'angular';
67

78
export default (module: ng.IModule) => {
89
module.controller('demoAvailableComponents', AvailableComponentsController);
910
module.controller('demoToolbarMenu', ToolbarMenuController);
1011
module.controller('demoDataTable', DataTableController);
1112
module.controller('demoSiteSwitcher', SiteSwitcherController);
13+
module.controller('demoFonticonPicker', FonticonPickerController);
1214
};

demo/services/availableComponentsService.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ export default class AvailableComponentsService {
7171
'Site switcher',
7272
'/basic',
7373
require('./../views/site-switcher/basic.html'), 'demoSiteSwitcher as vm')
74+
]),
75+
new AvailableGroup('fonticon-picker', 'Fonticon Picker Components', '/fonticon-picker', [
76+
new AvailableComponent('basic',
77+
'Fonticon picker',
78+
'/basic',
79+
require('./../views/fonticon-picker/basic.html'), 'demoFonticonPicker as vm')
7480
])
7581
];
7682
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<miq-fonticon-picker input-name="fonticon">
2+
<miq-fonticon-family selector="ff" title="Font Fabulous"></miq-fonticon-family>
3+
<miq-fonticon-family selector="pficon" title="PatternFly"></miq-fonticon-family>
4+
<miq-fonticon-family selector="fa" title="Font Awesome"></miq-fonticon-family>
5+
<miq-fonticon-family selector="glyphicon" title="Glyphicons"></miq-fonticon-family>
6+
</miq-fonticon-picker>

dist/css/ui-components.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/ui-components.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/ui-components.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { FonticonPickerController } from '../fonticon-picker/fonticonPickerComponent';
2+
3+
class FonticonFamilyController {
4+
public FonticonPickerCtrl : FonticonPickerController;
5+
private title : string;
6+
private selector : string;
7+
8+
public $onInit() {
9+
this.FonticonPickerCtrl.addFamily({
10+
title: this.title,
11+
selector: this.selector
12+
});
13+
}
14+
}
15+
16+
export default class FonticonPicker implements ng.IComponentOptions {
17+
public controller = FonticonFamilyController;
18+
public require = {
19+
FonticonPickerCtrl: '^miqFonticonPicker'
20+
};
21+
public bindings = {
22+
title: '@',
23+
selector: '@'
24+
};
25+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import FonticonFamily from './fonticonFamilyComponent';
2+
3+
export default (module: ng.IModule) => {
4+
module.component('miqFonticonFamily', new FonticonFamily);
5+
};

0 commit comments

Comments
 (0)