Basic search implemented.
This commit is contained in:
parent
dab9a9ed15
commit
76a919b7bf
@ -1,5 +1,8 @@
|
||||
'use strict'
|
||||
|
||||
angular.module('xoWebApp')
|
||||
.controller 'NavBarCtrl', ($scope) ->
|
||||
.controller 'NavBarCtrl', ($scope, $location) ->
|
||||
$scope.user = ''
|
||||
|
||||
$scope.ensureListView = ->
|
||||
$location.path '/list'
|
||||
|
@ -1,6 +1,8 @@
|
||||
<!-- TODO: print a message when no entries. -->
|
||||
|
||||
<!-- The display depends of the type. -->
|
||||
<ng-switch
|
||||
ng-repeat="object in objects"
|
||||
ng-repeat="object in objects | filter:listFilter"
|
||||
on="object.type"
|
||||
> <!-- | orderBy:['type', 'name_label'] -->
|
||||
|
||||
@ -249,5 +251,5 @@
|
||||
</div>
|
||||
<!-- /SR. -->
|
||||
|
||||
</ng-switch>
|
||||
<!-- /Display depends of the type. -->
|
||||
</ng-switch>
|
||||
<!-- /Display depends of the type. -->
|
||||
|
@ -29,9 +29,17 @@
|
||||
(https://github.com/twbs/bootstrap/issues/9950. -->
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control inverse" placeholder="">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control inverse"
|
||||
placeholder=""
|
||||
ng-model="$root.listFilter"
|
||||
ng-change="ensureListView()"
|
||||
>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-search"><i class="fa fa-search"></i></button>
|
||||
<button type="button" class="btn btn-search" ng-click="ensureListView()">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user