Skip to content

Commit 2abffce

Browse files
Merge pull request #150 from erundle/tooltips
Adding tooltips for sort and filter fields
2 parents f318e7c + dcd5d12 commit 2abffce

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

dist/angular-patternfly.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ angular.module('patternfly.charts', ['patternfly.utils', 'ui.bootstrap', 'ngSani
2222
* Filters module for patternfly.
2323
*
2424
*/
25-
angular.module('patternfly.filters', ['patternfly.select']);
25+
angular.module('patternfly.filters', ['patternfly.select', 'ui.bootstrap']);
2626
;/**
2727
* @name patternfly.form
2828
*
@@ -56,7 +56,7 @@ angular.module('patternfly', [
5656
* Sort module for patternfly.
5757
*
5858
*/
59-
angular.module('patternfly.sort', []);
59+
angular.module('patternfly.sort', ['ui.bootstrap']);
6060
;
6161
angular.module( 'patternfly.utils', [] );
6262
;/**
@@ -3205,6 +3205,7 @@ angular.module('patternfly.sort').directive('pfSimpleSort', function () {
32053205
},
32063206
templateUrl: 'sort/simple-sort.html',
32073207
controller: ["$scope", function ($scope) {
3208+
32083209
$scope.setupConfig = function () {
32093210
var updated = false;
32103211

@@ -4960,7 +4961,7 @@ angular.module('patternfly.views').directive('pfDataToolbar', function () {
49604961
'use strict';
49614962

49624963
$templateCache.put('filters/simple-filter-fields.html',
4963-
"<div class=\"simple-filter filter-fields\"><form><div class=\"form-group toolbar-pf-filter\"><div class=input-group><div dropdown class=input-group-btn><button dropdown-toggle type=button class=\"btn btn-default dropdown-toggle filter-fields\" data-toggle=dropdown aria-haspopup=true aria-expanded=false>{{currentField.title}} <span class=caret></span></button><ul class=dropdown-menu><li ng-repeat=\"item in config.fields\"><a class=filter-field role=menuitem tabindex=-1 ng-click=selectField(item)>{{item.title}}</a></li></ul></div><input class=form-control type={{currentField.filterType}} ng-model=config.currentValue placeholder={{currentField.placeholder}} ng-keypress=onValueKeyPress($event) ng-if=\"currentField.filterType !== 'select'\"><select pf-select class=\"form-control filter-select\" id=currentValue ng-model=config.currentValue ng-options=\"filterValue for filterValue in currentField.filterValues\" ng-if=\"currentField.filterType === 'select'\" ng-change=selectValue(config.currentValue)><option value=\"\">{{currentField.placeholder}}</option></select></div></div></form></div>"
4964+
"<div class=\"simple-filter filter-fields\"><form><div class=\"form-group toolbar-pf-filter\"><div class=input-group><div dropdown class=input-group-btn><button dropdown-toggle type=button class=\"btn btn-default dropdown-toggle filter-fields\" data-toggle=dropdown aria-haspopup=true aria-expanded=false tooltip=\"Filter by\" tooltip-placement=bottom>{{currentField.title}} <span class=caret></span></button><ul class=dropdown-menu><li ng-repeat=\"item in config.fields\"><a class=filter-field role=menuitem tabindex=-1 ng-click=selectField(item)>{{item.title}}</a></li></ul></div><input class=form-control type={{currentField.filterType}} ng-model=config.currentValue placeholder={{currentField.placeholder}} ng-keypress=onValueKeyPress($event) ng-if=\"currentField.filterType !== 'select'\"><select pf-select class=\"form-control filter-select\" id=currentValue ng-model=config.currentValue ng-options=\"filterValue for filterValue in currentField.filterValues\" ng-if=\"currentField.filterType === 'select'\" ng-change=selectValue(config.currentValue)><option value=\"\">{{currentField.placeholder}}</option></select></div></div></form></div>"
49644965
);
49654966

49664967

@@ -5009,7 +5010,7 @@ angular.module('patternfly.views').directive('pfDataToolbar', function () {
50095010
'use strict';
50105011

50115012
$templateCache.put('sort/simple-sort.html',
5012-
"<div class=simple-sort><form><div class=form-group><div class=\"dropdown btn-group\"><button type=button class=\"btn btn-default dropdown-toggle\" data-toggle=dropdown aria-haspopup=true aria-expanded=false>{{config.currentField.title}} <span class=caret></span></button><ul class=dropdown-menu><li ng-repeat=\"item in config.fields\" ng-class=\"{'selected': item === config.currentField}\"><a class=sort-field role=menuitem tabindex=-1 ng-click=selectField(item)>{{item.title}}</a></li></ul></div><button class=\"btn btn-link\" type=button ng-click=changeDirection()><span class=sort-direction ng-class=getSortIconClass()></span></button></div></form></div>"
5013+
"<div class=simple-sort><form><div class=form-group><div class=\"dropdown btn-group\"><button type=button class=\"btn btn-default dropdown-toggle\" data-toggle=dropdown aria-haspopup=true aria-expanded=false tooltip=\"Sort by\" tooltip-placement=bottom>{{config.currentField.title}} <span class=caret></span></button><ul class=dropdown-menu><li ng-repeat=\"item in config.fields\" ng-class=\"{'selected': item === config.currentField}\"><a class=sort-field role=menuitem tabindex=-1 ng-click=selectField(item)>{{item.title}}</a></li></ul></div><button class=\"btn btn-link\" type=button ng-click=changeDirection()><span class=sort-direction ng-class=getSortIconClass()></span></button></div></form></div>"
50135014
);
50145015

50155016
}]);

dist/angular-patternfly.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/filters/filters.module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* Filters module for patternfly.
66
*
77
*/
8-
angular.module('patternfly.filters', ['patternfly.select']);
8+
angular.module('patternfly.filters', ['patternfly.select', 'ui.bootstrap']);

src/filters/simple-filter-fields.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="form-group toolbar-pf-filter">
44
<div class="input-group">
55
<div dropdown class="input-group-btn">
6-
<button dropdown-toggle type="button" class="btn btn-default dropdown-toggle filter-fields" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
6+
<button dropdown-toggle type="button" class="btn btn-default dropdown-toggle filter-fields" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" tooltip="Filter by" tooltip-placement="bottom">
77
{{currentField.title}}
88
<span class="caret"></span>
99
</button>

src/sort/simple-sort-directive.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ angular.module('patternfly.sort').directive('pfSimpleSort', function () {
154154
},
155155
templateUrl: 'sort/simple-sort.html',
156156
controller: function ($scope) {
157+
157158
$scope.setupConfig = function () {
158159
var updated = false;
159160

src/sort/simple-sort.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<form>
33
<div class="form-group">
44
<div class="dropdown btn-group">
5-
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
5+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" tooltip="Sort by" tooltip-placement="bottom">
66
{{config.currentField.title}}
77
<span class="caret"></span>
88
</button>

src/sort/sort.module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* Sort module for patternfly.
66
*
77
*/
8-
angular.module('patternfly.sort', []);
8+
angular.module('patternfly.sort', ['ui.bootstrap']);

0 commit comments

Comments
 (0)