diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-09-16 20:20:23 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-09-16 20:20:23 +0200 |
commit | d9f1aca951fb83d870d8abbcc30244441dd2a442 (patch) | |
tree | 2e502a1e7de92141394563aea9842c4fdc47e146 /js/public/app.js | |
parent | 2937a633de8f54d0f5f20f8ced6e8914da40d312 (diff) |
version bump1.603
Diffstat (limited to 'js/public/app.js')
-rw-r--r-- | js/public/app.js | 19 |
1 files changed, 11 insertions, 8 deletions
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; |