Skip to content

Commit 5fa2925

Browse files
Fixes for filter input, date picker, and validate example layout
1 parent e5f70af commit 5fa2925

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

Gruntfile.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ module.exports = function (grunt) {
191191
src: ['charts/**/*.html'],
192192
dest: 'templates/charts.js'
193193
},
194+
'patternfly.jquery': {
195+
cwd: 'src/',
196+
src: ['form/datepicker/*.html'],
197+
dest: 'templates/jquery.js'
198+
},
194199
'patternfly.filters': {
195200
cwd: 'src/',
196201
src: ['filters/**/*.html'],

src/filters/filter-fields-directive.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ angular.module('patternfly.filters').directive('pfFilterFields', function () {
5757
scope.selectValue = function (filterValue) {
5858
scope.addFilterFn(scope.currentField, filterValue);
5959
};
60+
61+
scope.onValueKeyPress = function (keyEvent) {
62+
if (keyEvent.which === 13 && scope.config.currentValue && scope.config.currentValue !== '') {
63+
scope.addFilterFn(scope.currentField, scope.config.currentValue);
64+
scope.config.currentValue = undefined;
65+
}
66+
};
6067
}
6168
};
6269
});

src/form/datepicker/datepicker.directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @param {string} options the configuration options for the date picker
1010
*
1111
* @example
12-
<example module="patternfly.datepicker">
12+
<example module="patternfly.jquery">
1313
<file name="index.html">
1414
<form class="form-horizontal" ng-controller="FormDemoCtrl">
1515
<div>

src/validation/validation.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,10 @@
4242
</div>
4343
4444
<div class="form-group">
45-
<label class="col-sm-2 control-label" for="message">Validation disabled:</label>
46-
<div class="col-sm-10">
47-
<input class="form-control" type="checkbox" ng-model="isValidationDisabled"/>
48-
</div>
49-
</div>
50-
</form>
45+
<label class="col-sm-offset-1 col-sm-2 control-label checkbox-inline">
46+
<input type="checkbox" ng-model="isValidationDisabled">Validation disabled</input>
47+
</label>
48+
</form>
5149
</div>
5250
</file>
5351

0 commit comments

Comments
 (0)