fix timing issues with the digest loop, remove .only from tests

This commit is contained in:
Joe Fleming 2014-08-12 10:36:45 -05:00
parent 05a27e714c
commit b5c8693b4c
5 changed files with 23 additions and 27 deletions

View file

@ -7,26 +7,26 @@
<form name="queryInput"
class="fill inline-form"
ng-submit="filterResults()"
kbn-typeahead="history">
ng-submit="filterResults()">
<div class="input-group"
ng-class="queryInput.$invalid ? 'has-error' : ''">
<div class="typeahead" kbn-typeahead="history">
<div class="input-group"
ng-class="queryInput.$invalid ? 'has-error' : ''">
<input type="text"
placeholder="Filter..."
class="form-control"
ng-model="state.query"
kbn-typeahead-input
query-input>
<button type="submit" class="btn btn-default" ng-disabled="queryInput.$invalid">
<span class="fa fa-search"></span>
</button>
<input type="text"
placeholder="Filter..."
class="form-control"
ng-model="state.query"
kbn-typeahead-input
query-input>
<button type="submit" class="btn btn-default" ng-disabled="queryInput.$invalid">
<span class="fa fa-search"></span>
</button>
</div>
<kbn-typeahead-items></kbn-typeahead-items>
</div>
<kbn-typeahead-items></kbn-typeahead-items>
</form>
<div class="button-group">

View file

@ -1,5 +0,0 @@
<div class="typeahead" ng-class="{visible: typeahead.isVisible()}">
<div ng-transclude></div>
<kbnTypeaheadItems></kbnTypeaheadItems>
</div>

View file

@ -1,7 +1,6 @@
define(function (require) {
var _ = require('lodash');
var typeahead = require('modules').get('kibana/typeahead');
var template = require('text!components/typeahead/partials/typeahead.html');
require('components/typeahead/_input');
require('components/typeahead/_items');
@ -17,8 +16,6 @@ define(function (require) {
return {
restrict: 'A',
transclude: true,
template: template,
scope: {
items: '=kbnTypeahead',
itemKey: '@kbnTypeaheadKey'
@ -205,6 +202,10 @@ define(function (require) {
if (!$scope.inputModel) {
throw new Error('kbn-typeahead-input must be defined');
}
$scope.$watch('typeahead.isVisible()', function (vis) {
$el.toggleClass('visible', vis);
});
}
};
});

View file

@ -24,12 +24,12 @@
}
}
.typeahead.visible .button-group,
.typeahead.visible .inline-form {
.button-group .typeahead.visible .input-group,
.inline-form .typeahead.visible .input-group {
> :first-child {
.border-bottom-radius(0);
}
> :last-child {
.border-bottom-radius(0);
}
}
}

View file

@ -32,7 +32,7 @@ define(function (require) {
});
}
describe.only('PersistedLog', function () {
describe('PersistedLog', function () {
beforeEach(function () {
init();
});