manually set position

This commit is contained in:
Athou
2013-06-04 10:11:16 +02:00
parent dade3c4d08
commit 075c3b6b61
6 changed files with 19 additions and 0 deletions

View File

@@ -72,6 +72,7 @@ public class FeedSubscriptionService {
newSubscription = true; newSubscription = true;
} }
sub.setCategory(category); sub.setCategory(category);
sub.setPosition(0);
sub.setTitle(FeedUtils.truncate(title, 128)); sub.setTitle(FeedUtils.truncate(title, 128));
feedSubscriptionDAO.saveOrUpdate(sub); feedSubscriptionDAO.saveOrUpdate(sub);

View File

@@ -201,6 +201,7 @@ public class CategoryREST extends AbstractResourceREST {
FeedCategory cat = new FeedCategory(); FeedCategory cat = new FeedCategory();
cat.setName(req.getName()); cat.setName(req.getName());
cat.setUser(getUser()); cat.setUser(getUser());
cat.setPosition(0);
String parentId = req.getParentId(); String parentId = req.getParentId();
if (parentId != null && !ALL.equals(parentId)) { if (parentId != null && !ALL.equals(parentId)) {
FeedCategory parent = new FeedCategory(); FeedCategory parent = new FeedCategory();

View File

@@ -68,6 +68,7 @@ details.feed_details=Feed details
details.url=URL details.url=URL
details.name=Name details.name=Name
details.category=Category details.category=Category
details.position=Position
details.last_refresh=Last refresh details.last_refresh=Last refresh
details.next_refresh=Next refresh details.next_refresh=Next refresh
details.queued_for_refresh=Queued for refresh details.queued_for_refresh=Queued for refresh

View File

@@ -337,6 +337,7 @@ module.controller('FeedDetailsCtrl', ['$scope', '$state', '$stateParams', 'FeedS
FeedService.modify({ FeedService.modify({
id : sub.id, id : sub.id,
name : sub.name, name : sub.name,
position: sub.position,
categoryId : sub.categoryId categoryId : sub.categoryId
}, function() { }, function() {
CategoryService.init(); CategoryService.init();
@@ -427,6 +428,7 @@ module.controller('CategoryDetailsCtrl', ['$scope', '$state', '$stateParams', 'F
CategoryService.modify({ CategoryService.modify({
id : cat.id, id : cat.id,
name : cat.name, name : cat.name,
position: cat.position,
parentId : cat.parentId parentId : cat.parentId
}, function() { }, function() {
CategoryService.init(); CategoryService.init();

View File

@@ -20,6 +20,13 @@
<span class="help-block" ng-show="!form.category.$valid">${global.required}</span> <span class="help-block" ng-show="!form.category.$valid">${global.required}</span>
</div> </div>
</div> </div>
<div class="control-group">
<label class="control-label">${details.position}</label>
<div class="controls">
<input type="number" min="0" ng-model="category.position" />
</div>
</div>
<div class="control-group"> <div class="control-group">
<label class="control-label">${details.feed_url}</label> <label class="control-label">${details.feed_url}</label>

View File

@@ -27,6 +27,13 @@
</div> </div>
</div> </div>
<div class="control-group">
<label class="control-label">${details.position}</label>
<div class="controls">
<input type="number" min="0" ng-model="sub.position" />
</div>
</div>
<div class="control-group"> <div class="control-group">
<label class="control-label">${details.last_refresh}</label> <label class="control-label">${details.last_refresh}</label>
<div class="controls horizontal-align"> <div class="controls horizontal-align">