diff options
author | Augier <contact@c-henry.fr> | 2016-09-24 17:15:38 +0300 |
---|---|---|
committer | Dennis Schubert <mail@dennis-schubert.de> | 2016-09-25 04:12:31 +0300 |
commit | a37d9d532b7cbb6b1dea6fdc13a0570abde30487 (patch) | |
tree | a5a06a5aace74d2532eeea7c0bb29b4b846231fb /app/assets | |
parent | 523f1e848ec3373313fc781200b0ea3ba0cad1ee (diff) |
Fix some pronto remarks
closes #7119
Diffstat (limited to 'app/assets')
4 files changed, 18 insertions, 18 deletions
diff --git a/app/assets/javascripts/app/views/notifications_view.js b/app/assets/javascripts/app/views/notifications_view.js index 69ac3cd01..08400742e 100644 --- a/app/assets/javascripts/app/views/notifications_view.js +++ b/app/assets/javascripts/app/views/notifications_view.js @@ -20,7 +20,7 @@ app.views.Notifications = Backbone.View.extend({ else { this.setUnread(guid); } }, - getAllUnread: function(){ return $(".media.stream-element.unread"); }, + getAllUnread: function() { return $(".media.stream-element.unread"); }, setRead: function(guid) { this.setUnreadStatus(guid, false); }, diff --git a/app/assets/javascripts/app/views/stream/shortcuts.js b/app/assets/javascripts/app/views/stream/shortcuts.js index 0be50ca26..56d9df05d 100644 --- a/app/assets/javascripts/app/views/stream/shortcuts.js +++ b/app/assets/javascripts/app/views/stream/shortcuts.js @@ -90,23 +90,27 @@ app.views.StreamShortcuts = Backbone.View.extend({ }, commentSelected: function() { - $('a.focus_comment_textarea',this.$('div.stream-element.loaded.shortcut_selected')).click(); + this.shortcutSelected().find("a.focus_comment_textarea").click(); }, likeSelected: function() { - $('a.like:first',this.$('div.stream-element.loaded.shortcut_selected')).click(); + this.shortcutSelected().find("a.like:first").click(); }, reshareSelected: function() { - $('a.reshare:first',this.$('div.stream-element.loaded.shortcut_selected')).click(); + this.shortcutSelected().find("a.reshare:first").click(); }, expandSelected: function() { - $('div.expander:first',this.$('div.stream-element.loaded.shortcut_selected')).click(); + this.shortcutSelected().find("div.expander:first").click(); + }, + + shortcutSelected: function() { + return this.$("div.stream-element.loaded.shortcut_selected"); }, openFirstLinkSelected: function() { - var link = $('div.collapsible a[target="_blank"]:first',this.$('div.stream-element.loaded.shortcut_selected')); + var link = $("div.collapsible a[target='_blank']:first"); if(link.length > 0) { // click does only work with vanilla javascript link[0].click(); @@ -115,12 +119,11 @@ app.views.StreamShortcuts = Backbone.View.extend({ selectPost: function(element){ //remove the selection and selected-class from all posts - var selected=this.$('div.stream-element.loaded.shortcut_selected'); - selected.removeClass('shortcut_selected').removeClass('highlighted'); + this.shortcutSelected().removeClass("shortcut_selected").removeClass("highlighted"); //move to new post window.scrollTo(window.pageXOffset, Math.round($(element).offset().top - this._headerSize)); //add the selection and selected-class to new post element.className+=" shortcut_selected highlighted"; - }, + } }); // @license-end diff --git a/app/assets/javascripts/app/views/stream_post_views.js b/app/assets/javascripts/app/views/stream_post_views.js index 4e4f4f307..31746783c 100644 --- a/app/assets/javascripts/app/views/stream_post_views.js +++ b/app/assets/javascripts/app/views/stream_post_views.js @@ -2,7 +2,7 @@ app.views.StreamPost = app.views.Post.extend({ templateName: "stream-element", - className : "stream-element loaded", + className: "stream-element loaded", subviews : { ".feedback": "feedbackView", diff --git a/app/assets/stylesheets/mobile/mobile.scss b/app/assets/stylesheets/mobile/mobile.scss index 87f6ca9bb..588ce26b8 100644 --- a/app/assets/stylesheets/mobile/mobile.scss +++ b/app/assets/stylesheets/mobile/mobile.scss @@ -108,14 +108,6 @@ textarea { resize: vertical; } width: 100%; } -.stream-element:not(.shield-active) .shield{ - display: none; -} - -.stream-element.shield-active .nsfw-hidden{ - display: none; -} - .login_error, .login_alert { color: #DF0101; @@ -195,6 +187,11 @@ footer { padding: 0; } margin-top: 0; } + + &.shield-active .nsfw-hidden, + &:not(.shield-active) .shield { + display: none; + } } .photo_attachments { |