Skip to content
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
12 changes: 11 additions & 1 deletion js/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,15 @@ angular.module('kibana.directives', [])
});
}
};
});
})
.directive('ngBlur', ['$parse', function($parse) {
return function(scope, element, attr) {
var fn = $parse(attr['ngBlur']);
element.bind('blur', function(event) {
scope.$apply(function() {
fn(scope, {$event:event});
});
});
}
}]);

6 changes: 3 additions & 3 deletions panels/filtering/module.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
<strong>{{filterSrv.list[id].type}}</strong>
<span ng-show="!filterSrv.list[id].editing" class="filter-mandate" ng-click="filterSrv.list[id].editing = true">{{filterSrv.list[id].mandate}}</span>

<span class="small" ng-show="filterSrv.list[id].editing">
<select class="input-small" ng-model="filterSrv.list[id].mandate" ng-options="f for f in ['must','mustNot','either']" ng-change='filterSrv.list[id].editing=undefined;refresh()'></select>
<i class="pointer icon-remove" bs-tooltip="'Cancel '" ng-click="filterSrv.list[id].editing=undefined"></i>
<span ng-show="filterSrv.list[id].editing">
<select class="input-small" ng-model="filterSrv.list[id].mandate" ng-options="f for f in ['must','mustNot','either']" ng-change='filterSrv.list[id].editing=undefined;refresh()' ng-blur="filterSrv.list[id].editing=undefined"></select>
<i class="pointer icon-remove" bs-tooltip="'Cancel '" ng-click="filterSrv.list[id].editing=undefined"></i>
</span>

<i class="filter-action pointer icon-remove" bs-tooltip="'Remove'" ng-click="remove(id)"></i>
Expand Down
2 changes: 1 addition & 1 deletion panels/table/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ angular.module('kibana.table', [])
var query;
// This needs to be abstracted somewhere
if(_.isArray(value)) {
query = field+":(" + _.map(value,function(v){return "\""+v+"\""}).join(",") + ")";
query = field+":(" + _.map(value,function(v){return angular.toJson("\""+v+"\"")}).join(",") + ")";
} else {
query = field+":"+angular.toJson(value);
}
Expand Down