Skip to content

Commit 4ab67f9

Browse files
author
Joshua Sprey
authored
Merge pull request #5 from cwolfes/parsing_html
implements html parsing
2 parents 806789c + f001c75 commit 4ab67f9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/adf-widget-news.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function RegisterWidget(dashboardProvider){
5959
RegisterWidget.$inject = ["dashboardProvider"];
6060

6161
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>");
62-
$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>");}]);
62+
$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>");}]);
6363
/*
6464
* The MIT License
6565
*

dist/adf-widget-news.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h4 class="media-heading">
1616
{{entry.title}}
1717
</a>
1818
</h4>
19-
<p>{{entry.contentSnippet}}</p>
19+
<div ng-bind-html="entry.contentSnippet"></div>
2020
<small>{{ (entry.author) ? entry.author + ',' : '' }} {{entry.pubDate | toDate | date: 'yyyy-MM-dd HH:mm'}}</small>
2121
</div>
2222
</div>

0 commit comments

Comments
 (0)