initial ui for entry filtering

This commit is contained in:
Athou
2014-11-04 16:01:37 +01:00
parent 5ce2823d0b
commit 8f2ba5e186
7 changed files with 49 additions and 4 deletions

View File

@@ -322,17 +322,21 @@ module.controller('FeedDetailsCtrl', ['$scope', '$state', '$stateParams', 'FeedS
$scope.save = function() {
var sub = $scope.sub;
$scope.error = null;
FeedService.modify({
id : sub.id,
name : sub.name,
position : sub.position,
categoryId : sub.categoryId
categoryId : sub.categoryId,
filter : sub.filter
}, function() {
CategoryService.init();
$state.transitionTo('feeds.view', {
_id : 'all',
_type : 'category'
});
}, function(e) {
$scope.error = e.data;
});
};
}]);
@@ -489,7 +493,7 @@ module.controller('ToolbarCtrl', [
type : $stateParams._type,
id : $stateParams._id,
olderThan : olderThan,
keywords: $location.search().q,
keywords : $location.search().q,
read : true
});
};
@@ -882,7 +886,7 @@ module.controller('FeedListCtrl', [
service.mark({
id : $scope.selectedId,
olderThan : olderThan || $scope.timestamp,
keywords: $location.search().q,
keywords : $location.search().q,
read : true
}, function() {
CategoryService.refresh(function() {

View File

@@ -3,6 +3,7 @@
<h3>{{ 'details.feed_details' | translate }}</h3>
</div>
<form name="form" class="form-horizontal" ng-submit="save()">
<div class="alert alert-danger" ng-if="error">{{ error }}</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ 'details.url' | translate }}</label>
<div class="col-sm-10 checkbox">
@@ -69,6 +70,13 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Filtering expression</label>
<div class="col-sm-10 checkbox">
<input type="text" name="filter" ng-model="sub.filter" class="form-control"></input>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary">{{ 'global.save' | translate }}</button>