mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
wro4j update
This commit is contained in:
6
pom.xml
6
pom.xml
@@ -334,7 +334,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ro.isdc.wro4j</groupId>
|
<groupId>ro.isdc.wro4j</groupId>
|
||||||
<artifactId>wro4j-extensions</artifactId>
|
<artifactId>wro4j-extensions</artifactId>
|
||||||
<version>1.6.3</version>
|
<version>1.7.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -380,7 +380,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>ro.isdc.wro4j</groupId>
|
<groupId>ro.isdc.wro4j</groupId>
|
||||||
<artifactId>wro4j-maven-plugin</artifactId>
|
<artifactId>wro4j-maven-plugin</artifactId>
|
||||||
<version>1.6.3</version>
|
<version>1.7.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>js</id>
|
<id>js</id>
|
||||||
@@ -517,7 +517,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>ro.isdc.wro4j</groupId>
|
<groupId>ro.isdc.wro4j</groupId>
|
||||||
<artifactId>wro4j-maven-plugin</artifactId>
|
<artifactId>wro4j-maven-plugin</artifactId>
|
||||||
<version>1.6.3</version>
|
<version>1.7.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
|||||||
@@ -614,8 +614,7 @@ function($scope, $state, $filter, $timeout, CategoryService) {
|
|||||||
$state.transitionTo('feeds.view', {
|
$state.transitionTo('feeds.view', {
|
||||||
_type : 'feed',
|
_type : 'feed',
|
||||||
_id : id
|
_id : id
|
||||||
}
|
});
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.open = function() {
|
$scope.open = function() {
|
||||||
|
|||||||
@@ -225,98 +225,99 @@ module.directive('category', [ function() {
|
|||||||
replace : true,
|
replace : true,
|
||||||
templateUrl : 'templates/_category.html',
|
templateUrl : 'templates/_category.html',
|
||||||
controller : [
|
controller : [
|
||||||
'$scope',
|
'$scope',
|
||||||
'$state',
|
'$state',
|
||||||
'$dialog',
|
'$dialog',
|
||||||
'FeedService',
|
'FeedService',
|
||||||
'CategoryService',
|
'CategoryService',
|
||||||
'SettingsService',
|
'SettingsService',
|
||||||
'MobileService',
|
'MobileService',
|
||||||
function($scope, $state, $dialog, FeedService, CategoryService,
|
function($scope, $state, $dialog, FeedService, CategoryService,
|
||||||
SettingsService, MobileService) {
|
SettingsService, MobileService) {
|
||||||
$scope.settingsService = SettingsService;
|
$scope.settingsService = SettingsService;
|
||||||
|
|
||||||
$scope.getClass = function(level) {
|
$scope.getClass = function(level) {
|
||||||
if ($scope.showLabel) {
|
if ($scope.showLabel) {
|
||||||
return 'indent' + level;
|
return 'indent' + level;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.categoryLabel = function(category) {
|
$scope.categoryLabel = function(category) {
|
||||||
return $scope.showLabel !== true ? $scope.showLabel
|
return $scope.showLabel !== true ? $scope.showLabel
|
||||||
: category.name;
|
: category.name;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.categoryCountLabel = function(category) {
|
$scope.categoryCountLabel = function(category) {
|
||||||
var count = $scope.unreadCount({
|
var count = $scope.unreadCount({
|
||||||
category : category
|
category : category
|
||||||
|
});
|
||||||
|
var label = '';
|
||||||
|
if (count > 0) {
|
||||||
|
label = '(' + count + ')';
|
||||||
|
}
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.feedCountLabel = function(feed) {
|
||||||
|
var label = '';
|
||||||
|
if (feed.unread > 0) {
|
||||||
|
label = '(' + feed.unread + ')';
|
||||||
|
}
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.feedClicked = function(id) {
|
||||||
|
MobileService.toggleLeftMenu();
|
||||||
|
if ($scope.selectedType == 'feed'
|
||||||
|
&& id == $scope.selectedId) {
|
||||||
|
$scope.$emit('emitReload');
|
||||||
|
} else {
|
||||||
|
$state.transitionTo('feeds.view', {
|
||||||
|
_type : 'feed',
|
||||||
|
_id : id
|
||||||
});
|
});
|
||||||
var label = '';
|
}
|
||||||
if (count > 0) {
|
};
|
||||||
label = '(' + count + ')';
|
|
||||||
}
|
|
||||||
return label;
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.feedCountLabel = function(feed) {
|
$scope.categoryClicked = function(id) {
|
||||||
var label = '';
|
MobileService.toggleLeftMenu();
|
||||||
if (feed.unread > 0) {
|
if ($scope.selectedType == 'category'
|
||||||
label = '(' + feed.unread + ')';
|
&& id == $scope.selectedId) {
|
||||||
}
|
$scope.$emit('emitReload');
|
||||||
return label;
|
} else {
|
||||||
};
|
$state.transitionTo('feeds.view', {
|
||||||
|
_type : 'category',
|
||||||
$scope.feedClicked = function(id) {
|
_id : id
|
||||||
MobileService.toggleLeftMenu();
|
|
||||||
if ($scope.selectedType == 'feed'
|
|
||||||
&& id == $scope.selectedId) {
|
|
||||||
$scope.$emit('emitReload');
|
|
||||||
} else {
|
|
||||||
$state.transitionTo('feeds.view', {
|
|
||||||
_type : 'feed',
|
|
||||||
_id : id
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.categoryClicked = function(id) {
|
|
||||||
MobileService.toggleLeftMenu();
|
|
||||||
if ($scope.selectedType == 'category'
|
|
||||||
&& id == $scope.selectedId) {
|
|
||||||
$scope.$emit('emitReload');
|
|
||||||
} else {
|
|
||||||
$state.transitionTo('feeds.view', {
|
|
||||||
_type : 'category',
|
|
||||||
_id : id
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.showFeedDetails = function(feed) {
|
|
||||||
$state.transitionTo('feeds.feed_details', {
|
|
||||||
_id : feed.id
|
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
};
|
||||||
|
|
||||||
$scope.showCategoryDetails = function(category) {
|
$scope.showFeedDetails = function(feed) {
|
||||||
$state.transitionTo('feeds.category_details', {
|
$state.transitionTo('feeds.feed_details', {
|
||||||
_id : category.id
|
_id : feed.id
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.toggleCategory = function(category, event) {
|
$scope.showCategoryDetails = function(category) {
|
||||||
event.preventDefault();
|
$state.transitionTo('feeds.category_details', {
|
||||||
event.stopPropagation();
|
_id : category.id
|
||||||
category.expanded = !category.expanded;
|
});
|
||||||
if (category.id == 'all') {
|
};
|
||||||
return;
|
|
||||||
}
|
$scope.toggleCategory = function(category, event) {
|
||||||
CategoryService.collapse({
|
event.preventDefault();
|
||||||
id : category.id,
|
event.stopPropagation();
|
||||||
collapse : !category.expanded
|
category.expanded = !category.expanded;
|
||||||
});
|
if (category.id == 'all') {
|
||||||
};
|
return;
|
||||||
} ]
|
}
|
||||||
|
CategoryService.collapse({
|
||||||
|
id : category.id,
|
||||||
|
collapse : !category.expanded
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
} ]);
|
} ]);
|
||||||
|
|
||||||
@@ -373,70 +374,54 @@ module.directive('draggable', function() {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
module.directive('droppable', [ 'CategoryService', 'FeedService', function(CategoryService, FeedService) {
|
module.directive('droppable', [ 'CategoryService', 'FeedService',
|
||||||
return {
|
function(CategoryService, FeedService) {
|
||||||
restrict : 'A',
|
return {
|
||||||
link : function(scope, element, attrs) {
|
restrict : 'A',
|
||||||
element.droppable({
|
link : function(scope, element, attrs) {
|
||||||
tolerance: 'pointer',
|
element.droppable({
|
||||||
over: function(event, ui) {
|
tolerance : 'pointer',
|
||||||
|
over : function(event, ui) {
|
||||||
},
|
|
||||||
drop : function(event, ui) {
|
},
|
||||||
var draggable = angular.element(ui.draggable);
|
drop : function(event, ui) {
|
||||||
|
var draggable = angular.element(ui.draggable);
|
||||||
var source = draggable.data('source');
|
|
||||||
var target = scope.$eval(attrs.droppable);
|
var source = draggable.data('source');
|
||||||
|
var target = scope.$eval(attrs.droppable);
|
||||||
if (angular.equals(source, target)) {
|
|
||||||
return;
|
if (angular.equals(source, target)) {
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
var data = {
|
|
||||||
id: source.id,
|
var data = {
|
||||||
name: source.name
|
id : source.id,
|
||||||
};
|
name : source.name
|
||||||
|
};
|
||||||
if (source.children) {
|
|
||||||
// source is a category
|
if (source.children) {
|
||||||
|
// source is a category
|
||||||
/*
|
|
||||||
* TODO better handling of category dragging
|
} else {
|
||||||
*
|
// source is a feed
|
||||||
if (target.children) {
|
|
||||||
// target is a category
|
if (target.children) {
|
||||||
data.parentId = target.id;
|
// target is a category
|
||||||
data.position = 0;
|
data.categoryId = target.id;
|
||||||
} else {
|
data.position = 0;
|
||||||
// target is a feed
|
} else {
|
||||||
data.parentId = target.categoryId;
|
// target is a feed
|
||||||
|
data.categoryId = target.categoryId;
|
||||||
|
data.position = target.position;
|
||||||
|
}
|
||||||
|
|
||||||
|
FeedService.modify(data, function() {
|
||||||
|
CategoryService.init();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
scope.$apply();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
CategoryService.modify(data, function() {
|
|
||||||
CategoryService.init();
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
} else {
|
|
||||||
// source is a feed
|
|
||||||
|
|
||||||
if (target.children) {
|
|
||||||
// target is a category
|
|
||||||
data.categoryId = target.id;
|
|
||||||
data.position = 0;
|
|
||||||
} else {
|
|
||||||
// target is a feed
|
|
||||||
data.categoryId = target.categoryId;
|
|
||||||
data.position = target.position;
|
|
||||||
}
|
|
||||||
|
|
||||||
FeedService.modify(data, function() {
|
|
||||||
CategoryService.init();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
scope.$apply();
|
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
}
|
} ]);
|
||||||
};
|
|
||||||
}]);
|
|
||||||
Reference in New Issue
Block a user