added possibility to import OPML file via URL
This commit is contained in:
parent
aa91965541
commit
77baac7ca6
2 changed files with 17 additions and 2 deletions
|
@ -236,6 +236,14 @@ function DevCtrl($scope, downloader, updateFeedsAlarmManager, opml, downloaderBa
|
|||
var url = 'https://raw.github.com/colinfrei/Podcast/master/podcasts.xml';
|
||||
var xmlPromise = downloaderBackend.downloadXml(url);
|
||||
|
||||
xmlPromise.then(function(xml) {
|
||||
opml.import(xml);
|
||||
});
|
||||
}
|
||||
$scope.importOpmlFromUrl = function() {
|
||||
var url = document.getElementById("importOpmlFromUrlInput").value;
|
||||
var xmlPromise = downloaderBackend.downloadXml(url);
|
||||
|
||||
xmlPromise.then(function(xml) {
|
||||
opml.import(xml);
|
||||
});
|
||||
|
|
|
@ -1,15 +1,22 @@
|
|||
<button ng-click="downloadFiles()">Download Files</button>
|
||||
<button ng-click="setAlarmTmp()">Set Alarm in 10 Seconds</button>
|
||||
<button ng-click="checkForPendingMessage()">Check for pending Messages</button>
|
||||
|
||||
<hr>
|
||||
<div>
|
||||
Import OPML File<br />
|
||||
<label>Import OPML from URL</label>
|
||||
<input id="importOpmlFromUrlInput" placeholder="http://example.com/podcasts.opml" size="30" />
|
||||
<button ng-click="importOpmlFromUrl()">Import</button>
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
Import Colin's OPML File<br />
|
||||
<button ng-click="importColinsOpml()">Import Colin's OPML File</button>
|
||||
<!--
|
||||
File input fields don't work yet on FirefoxOS, see https://bugzilla.mozilla.org/show_bug.cgi?id=832923
|
||||
<input type="file" onchange="angular.element(this).scope().importOpmlFile(this)" />
|
||||
-->
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<br />
|
||||
List of ALarms
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue