summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-08-01 16:06:19 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-08-01 16:06:19 +0200
commit01e7467c0b559203e9af38e682af2681ffa0aa46 (patch)
tree4f0363baab6043d2d582781dc4b9673cd86bec59
parentcdf3fd3b91ead90aba37d9a5e0cb3f0c68101f9c (diff)
also scroll correctly to bottom in firefox
-rw-r--r--CHANGELOG1
-rw-r--r--businesslayer/folderbusinesslayer.php1
-rw-r--r--js/app/directives/newsclickscroll.coffee9
-rw-r--r--js/public/app.js13
4 files changed, 14 insertions, 10 deletions
diff --git a/CHANGELOG b/CHANGELOG
index e505925c6..2f658385d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,6 @@
owncloud-news (1.203)
* Decode the title twice to fix special characters in HTML content in the title, author and email
+* Scroll to the bottom once you hit the show all button to prevent tedious scrolling
ownCloud-news (1.202)
* Fixed a bug in the API routes that would request an uneeded id when creating a feed
diff --git a/businesslayer/folderbusinesslayer.php b/businesslayer/folderbusinesslayer.php
index f5afe24ad..b57b0a306 100644
--- a/businesslayer/folderbusinesslayer.php
+++ b/businesslayer/folderbusinesslayer.php
@@ -103,6 +103,7 @@ class FolderBusinessLayer extends BusinessLayer {
* @param string $folderName the new name of the folder
* @param string $userId the name of the user for security reasons
* @throws BusinessLayerExistsException if name exists already
+ * @throws BusinessLayerInvalidParameterException if the foldername is invalid
* @throws BusinessLayerException if the folder does not exist
* @return Folder the updated folder
*/
diff --git a/js/app/directives/newsclickscroll.coffee b/js/app/directives/newsclickscroll.coffee
index 6194d5103..b7ca98757 100644
--- a/js/app/directives/newsclickscroll.coffee
+++ b/js/app/directives/newsclickscroll.coffee
@@ -26,13 +26,14 @@ angular.module('News').directive 'newsClickScroll', ['$timeout', ($timeout) ->
elm.click ->
scrollArea = $(options.scrollArea)
direction = options.direction
- if direction == 'top'
- scrollPosition = 0
- else
- scrollPosition = scrollArea[0].scrollHeight
# do this to execute after rendering
$timeout ->
+ if direction == 'top'
+ scrollPosition = 0
+ else
+ scrollPosition = scrollArea.prop('scrollHeight')
+
scrollArea.scrollTop(scrollPosition)
, 10
] \ No newline at end of file
diff --git a/js/public/app.js b/js/public/app.js
index 79a30e549..7081004fb 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -327,15 +327,16 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
var options;
options = scope.$eval(attr.newsClickScroll);
return elm.click(function() {
- var direction, scrollArea, scrollPosition;
+ var direction, scrollArea;
scrollArea = $(options.scrollArea);
direction = options.direction;
- if (direction === 'top') {
- scrollPosition = 0;
- } else {
- scrollPosition = scrollArea[0].scrollHeight;
- }
return $timeout(function() {
+ var scrollPosition;
+ if (direction === 'top') {
+ scrollPosition = 0;
+ } else {
+ scrollPosition = scrollArea.prop('scrollHeight');
+ }
return scrollArea.scrollTop(scrollPosition);
}, 10);
});