From 77296354852e9ee50b9a44659f68ad8ca728903f Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Wed, 30 Aug 2017 11:47:50 +0200 Subject: [PATCH] Replace publisher_textarea_wrapper with publisher-textarea-wrapper --- app/assets/javascripts/app/views/publisher_view.js | 4 ++-- .../javascripts/mobile/mobile_file_uploader.js | 6 +++--- .../color_themes/_color_theme_override.scss | 2 +- .../color_themes/_color_theme_override_dark.scss | 2 +- app/assets/stylesheets/mobile/mobile.scss | 2 +- app/assets/stylesheets/publisher.scss | 4 ++-- app/views/publisher/_publisher.html.haml | 2 +- app/views/publisher/_publisher.mobile.haml | 2 +- features/step_definitions/custom_web_steps.rb | 2 +- features/support/publishing_cuke_helpers.rb | 2 +- spec/integration/profile_spec.rb | 14 +++++++------- spec/javascripts/app/views/publisher_view_spec.js | 2 +- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/app/assets/javascripts/app/views/publisher_view.js b/app/assets/javascripts/app/views/publisher_view.js index 25e156c60..b61a27301 100644 --- a/app/assets/javascripts/app/views/publisher_view.js +++ b/app/assets/javascripts/app/views/publisher_view.js @@ -36,7 +36,7 @@ app.views.Publisher = Backbone.View.extend({ // init shortcut references to the various elements this.inputEl = this.$("#status_message_text"); - this.wrapperEl = this.$("#publisher_textarea_wrapper"); + this.wrapperEl = this.$("#publisher-textarea-wrapper"); this.submitEl = this.$("input[type=submit], button#submit"); this.photozoneEl = this.$("#photodropzone"); @@ -87,7 +87,7 @@ app.views.Publisher = Backbone.View.extend({ }, initSubviews: function() { - this.mention = new app.views.PublisherMention({ el: this.$("#publisher_textarea_wrapper") }); + this.mention = new app.views.PublisherMention({ el: this.$("#publisher-textarea-wrapper") }); if(this.prefillMention) { this.mention.prefillMention([this.prefillMention]); } diff --git a/app/assets/javascripts/mobile/mobile_file_uploader.js b/app/assets/javascripts/mobile/mobile_file_uploader.js index 567015c14..e7750babd 100644 --- a/app/assets/javascripts/mobile/mobile_file_uploader.js +++ b/app/assets/javascripts/mobile/mobile_file_uploader.js @@ -33,7 +33,7 @@ function createUploader(){ $("#fileInfo-publisher").text(fileName + " " + progress + "%"); }, onSubmit: function() { - $("#publisher_textarea_wrapper").addClass("with_attachments"); + $("#publisher-textarea-wrapper").addClass("with_attachments"); $("#photodropzone").append( "
  • " + "Ajax-loader2" + @@ -50,7 +50,7 @@ function createUploader(){ url = responseJSON.data.photo.unprocessed_image.url, currentPlaceholder = $("li.loading").first(); - $("#publisher_textarea_wrapper").addClass("with_attachments"); + $("#publisher-textarea-wrapper").addClass("with_attachments"); $("#new_status_message").append(""); // replace image placeholders @@ -76,7 +76,7 @@ function createUploader(){ photo.fadeOut(400, function() { photo.remove(); if ($(".publisher_photo").length === 0) { - $("#publisher_textarea_wrapper").removeClass("with_attachments"); + $("#publisher-textarea-wrapper").removeClass("with_attachments"); } }); } diff --git a/app/assets/stylesheets/color_themes/_color_theme_override.scss b/app/assets/stylesheets/color_themes/_color_theme_override.scss index 37ec7066b..6f0bc62e3 100644 --- a/app/assets/stylesheets/color_themes/_color_theme_override.scss +++ b/app/assets/stylesheets/color_themes/_color_theme_override.scss @@ -1,6 +1,6 @@ /* Raw CSS */ body { - #publisher_textarea_wrapper > #button_container > span.markdownIndications > a { + #publisher-textarea-wrapper > #button_container > span.markdownIndications > a { color: fade-out($link-color, 0.4); } diff --git a/app/assets/stylesheets/color_themes/_color_theme_override_dark.scss b/app/assets/stylesheets/color_themes/_color_theme_override_dark.scss index 42e4b3257..924ccf0c7 100644 --- a/app/assets/stylesheets/color_themes/_color_theme_override_dark.scss +++ b/app/assets/stylesheets/color_themes/_color_theme_override_dark.scss @@ -3,7 +3,7 @@ body { .publisher { form { - #publisher_textarea_wrapper { background-color: $gray; } + #publisher-textarea-wrapper { background-color: $gray; } .btn.btn-link.question_mark:hover .entypo-cog { color: $gray-light; } } .publisher-buttonbar .btn.btn-link:hover i { color: $gray-light; } diff --git a/app/assets/stylesheets/mobile/mobile.scss b/app/assets/stylesheets/mobile/mobile.scss index 791fb9417..3361f188a 100644 --- a/app/assets/stylesheets/mobile/mobile.scss +++ b/app/assets/stylesheets/mobile/mobile.scss @@ -694,7 +694,7 @@ select#aspect_ids_ { .entypo-camera { margin-right: 0; } } -#publisher_textarea_wrapper { +#publisher-textarea-wrapper { border-radius: 2px; margin: 12px 0px; background: $framed-background; diff --git a/app/assets/stylesheets/publisher.scss b/app/assets/stylesheets/publisher.scss index b570a388b..6db248519 100644 --- a/app/assets/stylesheets/publisher.scss +++ b/app/assets/stylesheets/publisher.scss @@ -14,7 +14,7 @@ display: none !important; } - #publisher_textarea_wrapper { border: 1px solid $border-grey !important; } + #publisher-textarea-wrapper { border: 1px solid $border-grey !important; } } .container-fluid{ padding: 0; } @@ -64,7 +64,7 @@ } } - #publisher_textarea_wrapper { + #publisher-textarea-wrapper { background-color: white; border-radius: 3px; border: 1px solid $border-dark-grey; diff --git a/app/views/publisher/_publisher.html.haml b/app/views/publisher/_publisher.html.haml index be5826469..74ae6c82c 100644 --- a/app/views/publisher/_publisher.html.haml +++ b/app/views/publisher/_publisher.html.haml @@ -3,7 +3,7 @@ = form_for(StatusMessage.new) do |status| = status.error_messages %params - .publisher-textarea-wrapper#publisher_textarea_wrapper + .publisher-textarea-wrapper#publisher-textarea-wrapper - if current_user.getting_started? = status.text_area :text, :rows => 2, :value => h(publisher_formatted_text), :tabindex => 1, :placeholder => "#{t('contacts.index.start_a_conversation')}...", diff --git a/app/views/publisher/_publisher.mobile.haml b/app/views/publisher/_publisher.mobile.haml index dd6bcf2b7..68681213b 100644 --- a/app/views/publisher/_publisher.mobile.haml +++ b/app/views/publisher/_publisher.mobile.haml @@ -27,7 +27,7 @@ = "ยท #{aspect.name}" .clear - #publisher_textarea_wrapper + #publisher-textarea-wrapper %ul#photodropzone #fileInfo-publisher diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index 812a66f34..d28ccdfed 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -73,7 +73,7 @@ Then /^the publisher should be expanded$/ do end Then /^the text area wrapper mobile should be with attachments$/ do - find("#publisher_textarea_wrapper")["class"].should include("with_attachments") + find("#publisher-textarea-wrapper")["class"].should include("with_attachments") end And /^I want to mention (?:him|her) from the profile$/ do diff --git a/features/support/publishing_cuke_helpers.rb b/features/support/publishing_cuke_helpers.rb index 9b3dfe222..e4963b221 100644 --- a/features/support/publishing_cuke_helpers.rb +++ b/features/support/publishing_cuke_helpers.rb @@ -12,7 +12,7 @@ module PublishingCukeHelpers def upload_file_with_publisher(path) page.execute_script(%q{$("input[name='qqfile']").css("opacity", '1');}) - with_scope("#publisher_textarea_wrapper") do + with_scope("#publisher-textarea-wrapper") do attach_file("qqfile", Rails.root.join(path).to_s) # wait for the image to be ready page.assert_selector(".publisher_photo.loading", count: 0) diff --git a/spec/integration/profile_spec.rb b/spec/integration/profile_spec.rb index 36be045d6..e756bbfc4 100644 --- a/spec/integration/profile_spec.rb +++ b/spec/integration/profile_spec.rb @@ -10,7 +10,7 @@ describe PeopleController, type: :request do expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) - expect(response.body).to match(/div class='publisher-textarea-wrapper' id='publisher_textarea_wrapper'/) + expect(response.body).to match(/div class='publisher-textarea-wrapper' id='publisher-textarea-wrapper'/) end it "displays the publisher for people path" do @@ -19,7 +19,7 @@ describe PeopleController, type: :request do expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) - expect(response.body).to match(/div class='publisher-textarea-wrapper' id='publisher_textarea_wrapper'/) + expect(response.body).to match(/div class='publisher-textarea-wrapper' id='publisher-textarea-wrapper'/) end it "doesn't display the publisher for people photos path" do @@ -28,7 +28,7 @@ describe PeopleController, type: :request do expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) - expect(response.body).not_to match(/div class='publisher-textarea-wrapper' id='publisher_textarea_wrapper'/) + expect(response.body).not_to match(/div class='publisher-textarea-wrapper' id='publisher-textarea-wrapper'/) end end @@ -43,7 +43,7 @@ describe PeopleController, type: :request do expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) - expect(response.body).not_to match(/div class='publisher-textarea-wrapper' id='publisher_textarea_wrapper'/) + expect(response.body).not_to match(/div class='publisher-textarea-wrapper' id='publisher-textarea-wrapper'/) end it "doesn't display the publisher for people path" do @@ -52,7 +52,7 @@ describe PeopleController, type: :request do expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) - expect(response.body).not_to match(/div class='publisher-textarea-wrapper' id='publisher_textarea_wrapper'/) + expect(response.body).not_to match(/div class='publisher-textarea-wrapper' id='publisher-textarea-wrapper'/) end end @@ -63,7 +63,7 @@ describe PeopleController, type: :request do expect(response.status).to eq(200) # make sure we aren't signed in expect(response.body).to match(/a class="login"/) - expect(response.body).not_to match(/div class='publisher-textarea-wrapper' id='publisher_textarea_wrapper'/) + expect(response.body).not_to match(/div class='publisher-textarea-wrapper' id='publisher-textarea-wrapper'/) end it "doesn't display the publisher for people path" do @@ -72,7 +72,7 @@ describe PeopleController, type: :request do expect(response.status).to eq(200) # make sure we aren't signed in expect(response.body).to match(/a class="login"/) - expect(response.body).not_to match(/div class='publisher-textarea-wrapper' id='publisher_textarea_wrapper'/) + expect(response.body).not_to match(/div class='publisher-textarea-wrapper' id='publisher-textarea-wrapper'/) end end end diff --git a/spec/javascripts/app/views/publisher_view_spec.js b/spec/javascripts/app/views/publisher_view_spec.js index 9b9540feb..a43d12a76 100644 --- a/spec/javascripts/app/views/publisher_view_spec.js +++ b/spec/javascripts/app/views/publisher_view_spec.js @@ -519,7 +519,7 @@ describe("app.views.Publisher", function() { setFixtures( '
    '+ '
    '+ - '
    '+ + '
    '+ '
    '+ ' '+ '
    '+