diff --git a/app/assets/javascripts/app/views/notifications_view.js b/app/assets/javascripts/app/views/notifications_view.js index 3428a1e1c..583c8ce0f 100644 --- a/app/assets/javascripts/app/views/notifications_view.js +++ b/app/assets/javascripts/app/views/notifications_view.js @@ -15,7 +15,7 @@ app.views.Notifications = Backbone.View.extend({ toggleUnread: function(evt) { var note = $(evt.target).closest(".stream_element"); var unread = note.hasClass("unread"); - var guid = note.data.guid; + var guid = note.data("guid"); if (unread){ this.setRead(guid); } else { this.setUnread(guid); } }, @@ -52,8 +52,8 @@ app.views.Notifications = Backbone.View.extend({ updateView: function(guid, type, unread) { var change = unread ? 1 : -1, - allNotes = $("ul.list-group > a:eq(0) .badge"), - typeNotes = $("ul.list-group > a[data-type=" + type + "] .badge"), + allNotes = $(".list-group > a:eq(0) .badge"), + typeNotes = $(".list-group > a[data-type=" + type + "] .badge"), headerBadge = $("#notification_badge .badge_count"), note = $(".stream_element[data-guid=" + guid + "]"), markAllReadLink = $("a#mark_all_read_link"), diff --git a/app/assets/javascripts/app/views/publisher/uploader_view.js b/app/assets/javascripts/app/views/publisher/uploader_view.js index 8f6690a12..1e99b3177 100644 --- a/app/assets/javascripts/app/views/publisher/uploader_view.js +++ b/app/assets/javascripts/app/views/publisher/uploader_view.js @@ -94,7 +94,7 @@ app.views.PublisherUploader = Backbone.View.extend({ // add form input element publisher.$(".content_creation form").append( - "" + "" ); // replace placeholder diff --git a/app/assets/javascripts/app/views/publisher_view.js b/app/assets/javascripts/app/views/publisher_view.js index 926b9ee05..d4ef03085 100644 --- a/app/assets/javascripts/app/views/publisher_view.js +++ b/app/assets/javascripts/app/views/publisher_view.js @@ -106,8 +106,8 @@ app.views.Publisher = Backbone.View.extend({ var form = this.$(".content_creation form"); this.view_services = new app.views.PublisherServices({ - el: this.$('#publisher_service_icons'), - input: this.el_input, + el: this.$("#publisher_service_icons"), + input: this.inputEl, form: form }); diff --git a/spec/javascripts/app/views/notifications_view_spec.js b/spec/javascripts/app/views/notifications_view_spec.js index fc81403d3..f8a50f20f 100644 --- a/spec/javascripts/app/views/notifications_view_spec.js +++ b/spec/javascripts/app/views/notifications_view_spec.js @@ -40,7 +40,7 @@ describe("app.views.Notifications", function(){ }); it('changes the "all notifications" count', function() { - var badge = $('ul.list-group > a:eq(0) .badge'); + var badge = $(".list-group > a:eq(0) .badge"); var count = parseInt(badge.text()); this.view.updateView(this.guid, this.type, true); @@ -51,7 +51,7 @@ describe("app.views.Notifications", function(){ }); it('changes the notification type count', function() { - var badge = $('ul.list-group > a[data-type=' + this.type + '] .badge'); + var badge = $(".list-group > a[data-type=" + this.type + "] .badge"); var count = parseInt(badge.text()); this.view.updateView(this.guid, this.type, true); diff --git a/spec/javascripts/app/views/publisher_view_spec.js b/spec/javascripts/app/views/publisher_view_spec.js index 62fe357fe..fbf447631 100644 --- a/spec/javascripts/app/views/publisher_view_spec.js +++ b/spec/javascripts/app/views/publisher_view_spec.js @@ -473,7 +473,7 @@ describe("app.views.Publisher", function() { it('shows progress in percent', function() { this.uploader.onProgress(null, 'test.jpg', 20, 100); - var info = this.view.viewUploader.infoEl; + var info = this.view.viewUploader.info; expect(info.text()).toContain('test.jpg'); expect(info.text()).toContain('20%'); }); @@ -509,7 +509,7 @@ describe("app.views.Publisher", function() { }); it('shows it in text form', function() { - var info = this.view.viewUploader.infoEl; + var info = this.view.viewUploader.info; expect(info.text()).toBe(Diaspora.I18n.t('photo_uploader.completed', {file: 'test.jpg'})); }); @@ -547,7 +547,7 @@ describe("app.views.Publisher", function() { }); it('shows error message', function() { - var info = this.view.viewUploader.infoEl; + var info = this.view.viewUploader.info; expect(info.text()).toBe(Diaspora.I18n.t('photo_uploader.error', {file: 'test.jpg'})); }); });