Skip to content

Commit

Permalink
Merge pull request #5 from cwolfes/parsing_html
Browse files Browse the repository at this point in the history
implements html parsing
  • Loading branch information
Joshua Sprey authored Dec 10, 2020
2 parents 806789c + f001c75 commit 4ab67f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/adf-widget-news.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function RegisterWidget(dashboardProvider){
RegisterWidget.$inject = ["dashboardProvider"];

angular.module("adf.widget.news").run(["$templateCache", function($templateCache) {$templateCache.put("{widgetsPath}/news/src/edit.html","<form role=form><div class=form-group><label for=url>Feed url</label> <input type=url class=form-control id=url ng-model=config.url placeholder=\"Enter feed url\"></div><div class=form-group><label for=num>Number of Entries</label> <input type=number class=form-control id=num ng-model=config.num></div><div class=form-group><label for=showTitle>Show Feed Title</label> <input type=checkbox class=form-control id=showTitle ng-model=config.showTitle></div><div class=form-group><label for=showTitle>Show Feed Description</label> <input type=checkbox class=form-control id=showDescription ng-model=config.showDescription></div></form>");
$templateCache.put("{widgetsPath}/news/src/view.html","<div class=news><div class=\"alert alert-info\" ng-if=!vm.feed>Please insert a feed url in the widget configuration</div><div ng-if=vm.feed><h3 ng-if=config.showTitle><a ng-href={{vm.feed.link}} target=_blank>{{vm.feed.title}}</a></h3><p ng-if=config.showDescription>{{vm.feed.description}}</p><div class=media ng-repeat=\"entry in vm.feed.entries\"><div class=media-body><h4 class=media-heading><a ng-href={{entry.link}} target=_blank>{{entry.title}}</a></h4><p>{{entry.contentSnippet}}</p><small>{{ (entry.author) ? entry.author + \',\' : \'\' }} {{entry.pubDate | toDate | date: \'yyyy-MM-dd HH:mm\'}}</small></div></div></div></div>");}]);
$templateCache.put("{widgetsPath}/news/src/view.html","<div class=news><div class=\"alert alert-info\" ng-if=!vm.feed>Please insert a feed url in the widget configuration</div><div ng-if=vm.feed><h3 ng-if=config.showTitle><a ng-href={{vm.feed.link}} target=_blank>{{vm.feed.title}}</a></h3><p ng-if=config.showDescription>{{vm.feed.description}}</p><div class=media ng-repeat=\"entry in vm.feed.entries\"><div class=media-body><h4 class=media-heading><a ng-href={{entry.link}} target=_blank>{{entry.title}}</a></h4><div ng-bind-html=entry.contentSnippet></div><small>{{ (entry.author) ? entry.author + \',\' : \'\' }} {{entry.pubDate | toDate | date: \'yyyy-MM-dd HH:mm\'}}</small></div></div></div></div>");}]);
/*
* The MIT License
*
Expand Down
2 changes: 1 addition & 1 deletion dist/adf-widget-news.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h4 class="media-heading">
{{entry.title}}
</a>
</h4>
<p>{{entry.contentSnippet}}</p>
<div ng-bind-html="entry.contentSnippet"></div>
<small>{{ (entry.author) ? entry.author + ',' : '' }} {{entry.pubDate | toDate | date: 'yyyy-MM-dd HH:mm'}}</small>
</div>
</div>
Expand Down

0 comments on commit 4ab67f9

Please sign in to comment.