summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2016-05-11 17:12:52 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2016-05-11 17:12:52 +0200
commita557394c5c6ce2c5b433148baac200cbc17f3e64 (patch)
tree6ef771e10db0786b533416eb5c6df5a7f0cc28ee
parent351ffd868ad61156bae09a7fde1e802d74128d08 (diff)
remove pull to refresh
-rw-r--r--CHANGELOG.md4
-rw-r--r--controller/apicontroller.php2
-rw-r--r--js/gui/KeyboardShortcuts.js16
-rw-r--r--templates/part.content.php7
4 files changed, 5 insertions, 24 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b791675ad..afd7c7760 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+owncloud-news (8.8.0)
+* **Enhancement**: Remove current pull to refresh implementation since it is more annoying than helpful.
+* **Enhancement**: Add API route for supported API levels
+
owncloud-news (8.7.5)
* **Security (High)**: Fix security bug that would allow websites to access your DOM document when using keyboard shortcuts to open an article in a new tab, downloading audio files, opening links on the explore page or opening links to the ownCloud documentation or issue tracker (News app versions prior to 5.0.0 are also vulnerable when clicking on any link in the title or article body). This gives any attacker access to all data on the DOM and allows them to make arbitrary requests to the ownCloud server on the user's behalf, bypassing CSRF protection and gaining full access to their account by stealing their login cookies. For a more detailed explanation [visit this website](https://medium.com/@jitbit/target-blank-the-most-underestimated-vulnerability-ever-96e328301f4c#.h55ny7ef0)
diff --git a/controller/apicontroller.php b/controller/apicontroller.php
index be4f36a63..f3b77b379 100644
--- a/controller/apicontroller.php
+++ b/controller/apicontroller.php
@@ -30,7 +30,7 @@ class ApiController extends BaseApiController {
*/
public function index() {
return [
- 'apiLevels' => ['v1-2', 'v2']
+ 'apiLevels' => ['v1-2']
];
}
diff --git a/js/gui/KeyboardShortcuts.js b/js/gui/KeyboardShortcuts.js
index 9e32a15b3..5b7a411b4 100644
--- a/js/gui/KeyboardShortcuts.js
+++ b/js/gui/KeyboardShortcuts.js
@@ -70,17 +70,6 @@
navigationArea.find('.active > a:visible').trigger('click');
};
- var tryReload = function (navigationArea, scrollArea) {
- if (scrollArea.scrollTop() === 0) {
- var pullToRefresh = scrollArea.find('.pull-to-refresh');
- if (!pullToRefresh.hasClass('show-pull-to-refresh')) {
- pullToRefresh.addClass('show-pull-to-refresh');
- } else if (pullToRefresh.hasClass('done')) {
- reloadFeed(navigationArea);
- }
- }
- };
-
var activateNavigationEntry = function (element, navigationArea) {
element.children('a:visible').trigger('click');
scrollToNavigationElement(element, navigationArea.children('ul'));
@@ -319,7 +308,6 @@
} else if (previousElement.length > 0) {
scrollToItem(scrollArea, previousElement, expandItemInCompact);
} else {
- tryReload(navigationArea, scrollArea);
scrollArea.scrollTop(0);
}
};
@@ -437,10 +425,6 @@
$('#searchbox').focus();
// page up
- } else if ([33].indexOf(keyCode) >= 0) {
-
- tryReload(navigationArea, scrollArea);
-
}
// everything with shift
diff --git a/templates/part.content.php b/templates/part.content.php
index 4da7cbf8d..0c0222190 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -7,13 +7,6 @@
'feed-view': Content.isFeed()
}"
news-compact-expand="{{ Content.isCompactExpand() }}">
- <div class="pull-to-refresh" ng-class="{
- 'show-pull-to-refresh': showPullToRefresh
- }" news-finished-transition="done">
- <button ng-click="Content.refresh()">
- <?php p($l->t('Refresh')) ?> (r)
- </button>
- </div>
<div ng-show="Content.getItems().length == 0" class="no-feeds-available">
<p ng-show="Content.isShowAll()"><?php p($l->t('No articles available')) ?></p>
<p ng-show="!Content.isShowAll()"><?php p($l->t('No unread articles available')) ?></p>