summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-09-16 20:20:23 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-09-16 20:20:23 +0200
commitd9f1aca951fb83d870d8abbcc30244441dd2a442 (patch)
tree2e502a1e7de92141394563aea9842c4fdc47e146
parent2937a633de8f54d0f5f20f8ced6e8914da40d312 (diff)
version bump1.603
-rw-r--r--CHANGELOG3
-rw-r--r--appinfo/info.xml2
-rw-r--r--appinfo/version2
-rw-r--r--js/app/controllers/feedcontroller.coffee9
-rw-r--r--js/app/directives/translate.coffee7
-rw-r--r--js/public/app.js19
6 files changed, 26 insertions, 16 deletions
diff --git a/CHANGELOG b/CHANGELOG
index ba4f9df01..04dde23e7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+owncloud-news (1.603)
+* Fix JavaScript errors which prevented the translation elements from being removed
+
owncloud-news (1.602)
* Remove removed class from container
* Go back to allow feeds per url from input
diff --git a/appinfo/info.xml b/appinfo/info.xml
index bea430ab0..d1b69d89a 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -5,6 +5,6 @@
<description>An RSS/Atom feed reader. Requires the App Framework app and backgroundjobs need to be enabled. See the README.rst in the apps top directory</description>
<licence>AGPL</licence>
<author>Alessandro Cosentino, Bernhard Posselt, Jan-Christoph Borchardt. Powered by SimplePie (Ryan Parman, Geoffrey Sneddon, Ryan McCue and contributors).</author>
- <version>1.602</version>
+ <version>1.603</version>
<require>5.0.6</require>
</info>
diff --git a/appinfo/version b/appinfo/version
index 941cb68c0..86def1b20 100644
--- a/appinfo/version
+++ b/appinfo/version
@@ -1 +1 @@
-1.602 \ No newline at end of file
+1.603 \ No newline at end of file
diff --git a/js/app/controllers/feedcontroller.coffee b/js/app/controllers/feedcontroller.coffee
index 07fb22238..6ccc494fa 100644
--- a/js/app/controllers/feedcontroller.coffee
+++ b/js/app/controllers/feedcontroller.coffee
@@ -54,11 +54,16 @@ ActiveFeed, FeedType, $window) ->
# dont do this for other dom elements
# the title is some kind of exception since its always there
# and it has nothing to do with the body structure
+ if @_$scope.translations and @_$scope.translations.appName
+ appName = @_$scope.translations.appName
+ else
+ appName = ''
+
if count > 0
titleCount = @_unreadCountFormatter(count)
- title = @_$scope.translations.appName + ' (' + titleCount + ') | ownCloud'
+ title = appName + ' (' + titleCount + ') | ownCloud'
else
- title = @_$scope.translations.appName + ' | ownCloud'
+ title = appName + ' | ownCloud'
# only update title when it changed to prevent highlighting the
# tab
diff --git a/js/app/directives/translate.coffee b/js/app/directives/translate.coffee
index c3e2dfd47..29cb8153f 100644
--- a/js/app/directives/translate.coffee
+++ b/js/app/directives/translate.coffee
@@ -26,7 +26,6 @@ angular.module('News').directive 'newsTranslate', ->
directive =
restrict: 'E'
link: (scope, element, attributes) ->
- $element = $(element)
- scope.translations or= scope.translations
- scope.translations[attributes.key] = $element.text()
- $element.remove()
+ scope.translations = scope.translations || {}
+ scope.translations[attributes.key] = element.text()
+ element.remove()
diff --git a/js/public/app.js b/js/public/app.js
index 751834832..9ec1a71de 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -508,11 +508,9 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
return directive = {
restrict: 'E',
link: function(scope, element, attributes) {
- var $element;
- $element = $(element);
- scope.translations || (scope.translations = scope.translations);
- scope.translations[attributes.key] = $element.text();
- return $element.remove();
+ scope.translations = scope.translations || {};
+ scope.translations[attributes.key] = element.text();
+ return element.remove();
}
};
});
@@ -682,13 +680,18 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
this._$scope.starredBusinessLayer = this._starredBusinessLayer;
this._$scope.unreadCountFormatter = this._unreadCountFormatter;
this._$scope.getTotalUnreadCount = function() {
- var count, title, titleCount;
+ var appName, count, title, titleCount;
count = _this._subscriptionsBusinessLayer.getUnreadCount(0);
+ if (_this._$scope.translations && _this._$scope.translations.appName) {
+ appName = _this._$scope.translations.appName;
+ } else {
+ appName = '';
+ }
if (count > 0) {
titleCount = _this._unreadCountFormatter(count);
- title = _this._$scope.translations.appName + ' (' + titleCount + ') | ownCloud';
+ title = appName + ' (' + titleCount + ') | ownCloud';
} else {
- title = _this._$scope.translations.appName + ' | ownCloud';
+ title = appName + ' | ownCloud';
}
if (_this._$window.document.title !== title) {
_this._$window.document.title = title;