From b885b8583d70571e888d425b686dc6bde4fb989b Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Wed, 8 Apr 2015 12:35:02 +0200 Subject: [PATCH] Remove 'manage services' link in standalone mode --- app/assets/javascripts/app/views/publisher_view.js | 6 ++++-- app/assets/stylesheets/publisher.scss | 10 ++++++---- spec/javascripts/app/views/publisher_view_spec.js | 8 ++++++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/app/views/publisher_view.js b/app/assets/javascripts/app/views/publisher_view.js index 5a928f102..fece5dd08 100644 --- a/app/assets/javascripts/app/views/publisher_view.js +++ b/app/assets/javascripts/app/views/publisher_view.js @@ -59,11 +59,13 @@ app.views.Publisher = Backbone.View.extend({ this.el_input.val( this.el_hiddenInput.val() ); } - // hide close and preview buttons, in case publisher is standalone + // hide close and preview buttons and manage services link + // in case publisher is standalone // (e.g. bookmarklet, mentions popup) if( this.standalone ) { - this.$('#hide_publisher').hide(); + this.$("#hide_publisher").hide(); this.el_preview.hide(); + this.$(".question_mark").hide(); } // this has to be here, otherwise for some reason the callback for the diff --git a/app/assets/stylesheets/publisher.scss b/app/assets/stylesheets/publisher.scss index 462a13080..8df3350b3 100644 --- a/app/assets/stylesheets/publisher.scss +++ b/app/assets/stylesheets/publisher.scss @@ -30,13 +30,15 @@ .options_and_submit { #publisher_service_icons { - .btn-link { text-decoration: none; } - .btn-link.question_mark .entypo { color: $text-grey; } - .btn-link.question_mark:hover .entypo { color: $black; } - .btn-link.service_icon { + margin-right: 10px; + .btn-link { padding-left: 5px; padding-right: 5px; + text-decoration: none; } + .btn-link.question_mark { margin-left: 5px; } + .btn-link.question_mark .entypo { color: $text-grey; } + .btn-link.question_mark:hover .entypo { color: $black; } .dim { opacity: 0.3; } .social_media_logos-wordpress-16x16 { display: inline-block; diff --git a/spec/javascripts/app/views/publisher_view_spec.js b/spec/javascripts/app/views/publisher_view_spec.js index 8390f6b83..428fc7efa 100644 --- a/spec/javascripts/app/views/publisher_view_spec.js +++ b/spec/javascripts/app/views/publisher_view_spec.js @@ -16,11 +16,15 @@ describe("app.views.Publisher", function() { }); it("hides the close button in standalone mode", function() { - expect(this.view.$('#hide_publisher').is(':visible')).toBeFalsy(); + expect(this.view.$("#hide_publisher").is(":visible")).toBeFalsy(); }); it("hides the post preview button in standalone mode", function() { - expect(this.view.$('.post_preview_button').is(':visible')).toBeFalsy(); + expect(this.view.$(".post_preview_button").is(":visible")).toBeFalsy(); + }); + + it("hides the manage services link in standalone mode", function() { + expect(this.view.$(".question_mark").is(":visible")).toBeFalsy(); }); describe("createStatusMessage", function(){