Chrome feed-details permissions
* Displays a confirmation dialog for deleting the feed.
*/
this.confirmDeleteFeed = function() {
+ if(self.allowAdmin) {
// Verify there are no dependent feeds
if (angular.isArray(self.model.usedByFeeds) && self.model.usedByFeeds.length > 0) {
var list = "<ul>";
.ariaLabel("feed is referenced")
.ok("Got it!");
$mdDialog.show(alert);
+
return;
}
scope: $dialogScope,
templateUrl: "js/feed-details/feed-details-delete-dialog.html"
});
+ }
};
/**
* Enables this feed.
*/
this.enableFeed = function() {
+ if(!self.enabling && self.allowEdit) {
self.enabling = true;
$http.post(RestUrlService.ENABLE_FEED_URL(self.feedId)).then(function (response) {
self.model.state = response.data.state;
);
self.enabling = false;
});
+ }
};
/**
* Disables this feed.
*/
this.disableFeed = function() {
+ if(!self.disabling && self.allowEdit) {
self.disabling = true;
$http.post(RestUrlService.DISABLE_FEED_URL(self.feedId)).then(function (response) {
self.model.state = response.data.state;
);
self.disabling = false;
});
+ }
};
function mergeTemplateProperties(feed) {
