lumapps/lumX — pull request #3 by malexandre (2014-11-26 16:28:30+00:00)
Title: feat select: add filter, loader and helpers management

Create a callback to send the filter changes to an external method managing for example ajax calls.
Add loading icon displaying that a request is in progress.
Add helpers indicating that there is no results.
Refactor directive to be manage by only one scope.

Sample code:
```html

{{ $selected.Title }} ({{ $selected.Year }})

{{ $choice.Title }} - {{ $choice.Type }}

```

```js
$scope.ajax = {
list: [],
update: function(newFilter, oldFilter)
{
if (newFilter)
{
$scope.ajax.loading = true;
$http.get('http://www.omdbapi.com/?s=' + escape(newFilter)).
success(function(data)
{
$scope.ajax.list = data.Search;
$scope.ajax.loading = false;
}).
error(function()
{
$scope.ajax.loading = false;
});
}
else
{
$scope.ajax.list = false;
}
},
loading: false
};

$scope.cbSelect = {
exec: function(){
LxNotificationService.notify('Change detected!');
}
};

$scope.selectedMovie = [];
```

Screenshot of the result:
![Search term not long enough](http://i.imgur.com/Wb8WHmq.png)
![No results](http://i.imgur.com/MWzOarX.png)
![Loading in progress](http://i.imgur.com/bUHlhZK.png)