diff --git a/Gemfile b/Gemfile index f49c97cfe..19ec6595c 100644 --- a/Gemfile +++ b/Gemfile @@ -115,8 +115,6 @@ source "https://rails-assets.org" do gem "rails-assets-autosize", "3.0.6" end -gem "facebox-rails", "0.2.0" - # Localization gem "http_accept_language", "2.0.5" diff --git a/Gemfile.lock b/Gemfile.lock index 6b6b45921..e1ff1e9fc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -186,9 +186,6 @@ GEM sigar (~> 0.7.2) state_machine thor - facebox-rails (0.2.0) - railties (>= 3.0, < 5.0) - thor (>= 0.14, < 2.0) factory_girl (4.5.0) activesupport (>= 3.0.0) factory_girl_rails (4.5.0) @@ -769,7 +766,6 @@ DEPENDENCIES diaspora-vines (~> 0.1.27) entypo-rails (= 2.2.3) eye (= 0.7.pre) - facebox-rails (= 0.2.0) factory_girl_rails (= 4.5.0) faraday (= 0.9.1) faraday-cookie_jar (= 0.0.6) diff --git a/app/assets/javascripts/app/app.js b/app/assets/javascripts/app/app.js index ef9321ab7..d623e2eda 100644 --- a/app/assets/javascripts/app/app.js +++ b/app/assets/javascripts/app/app.js @@ -46,7 +46,6 @@ var app = { app.router = new app.Router(); this.setupDummyPreloads(); - this.setupFacebox(); this.setupUser(); this.setupHeader(); this.setupBackboneLinks(); @@ -90,12 +89,6 @@ var app = { } }, - setupFacebox: function() { - $.facebox.settings.closeImage = ImagePaths.get('facebox/closelabel.png'); - $.facebox.settings.loadingImage = ImagePaths.get('facebox/loading.gif'); - $.facebox.settings.opacity = 0.75; - }, - setupBackboneLinks: function() { Backbone.history.start({pushState: true}); diff --git a/app/assets/javascripts/app/views/contact_view.js b/app/assets/javascripts/app/views/contact_view.js index 840edfe46..87422ed32 100644 --- a/app/assets/javascripts/app/views/contact_view.js +++ b/app/assets/javascripts/app/views/contact_view.js @@ -31,9 +31,6 @@ app.views.Contact = app.views.Base.extend({ $.get(href, function(resp) { dropdownEl.html(resp); new app.views.AspectMembership({el: $('.aspect_dropdown',dropdownEl)}); - - // UGLY (re-)attach the facebox - self.$('a[rel*=facebox]').facebox(); }); }, diff --git a/app/assets/javascripts/app/views/profile_header_view.js b/app/assets/javascripts/app/views/profile_header_view.js index 322f81bf8..bbc07d474 100644 --- a/app/assets/javascripts/app/views/profile_header_view.js +++ b/app/assets/javascripts/app/views/profile_header_view.js @@ -66,9 +66,6 @@ app.views.ProfileHeader = app.views.Base.extend({ $.get(href, function(resp) { dropdownEl.html(resp); new app.views.AspectMembership({el: $('.aspect_dropdown',dropdownEl)}); - - // UGLY (re-)attach the facebox - self.$('a[rel*=facebox]').facebox(); }); } }); diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index 9c7346c0b..48a07f568 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -12,7 +12,6 @@ //= require jquery.charcount //= require jquery-placeholder //= require rails-timeago -//= require jquery.facebox //= require browser_detection //= require jquery.events.input //= require jakobmattsson-jquery-elastic diff --git a/app/assets/javascripts/view.js b/app/assets/javascripts/view.js index 32c14d325..5f43ad4dd 100644 --- a/app/assets/javascripts/view.js +++ b/app/assets/javascripts/view.js @@ -32,19 +32,10 @@ var View = { $(document.body).click(this.dropdowns.removeFocus); - $('a[rel*=facebox]').facebox(); - $(document).bind('reveal.facebox', function() { - Diaspora.page.directionDetector.updateBinds(); - }); - - $("a.new_aspect").click(function(){ $("input#aspect_name").focus(); }); - /* facebox 'done' buttons */ - $(document).on('click', "*[rel*=close]", function(){ $.facebox.close(); }); - /* notification routing */ $("#notification").delegate('.hard_object_link', 'click', function(evt){ var post = $("#"+ $(this).attr('data-ref')), diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss index 13e67f3d2..f913a9131 100644 --- a/app/assets/stylesheets/_application.scss +++ b/app/assets/stylesheets/_application.scss @@ -45,8 +45,6 @@ /* conversations */ @import 'conversations'; -@import 'jquery.facebox'; -@import 'facebox'; /* publisher */ @import 'publisher'; diff --git a/app/assets/stylesheets/facebox.scss b/app/assets/stylesheets/facebox.scss deleted file mode 100644 index 43440b475..000000000 --- a/app/assets/stylesheets/facebox.scss +++ /dev/null @@ -1,32 +0,0 @@ -.facebox_content { display: none; } - -#facebox { - input[type='text'], input.text { width: 98%; } -} - -#facebox_header { - position: relative; - padding-bottom: 10px; - - .right { - z-index: 3; - right: 1em; - top: 14px; - color: #ccc; - - img { - vertical-align: top; - position: relative; - top: 0px; - } - } - - h3, h4 { - .description { margin-top: 0px; } - } - - .tiny_text { - font-size: $font-size-small; - font-weight: normal; - } -} diff --git a/app/assets/stylesheets/rtl.scss b/app/assets/stylesheets/rtl.scss index b46cf4d8b..95392bea5 100644 --- a/app/assets/stylesheets/rtl.scss +++ b/app/assets/stylesheets/rtl.scss @@ -82,7 +82,7 @@ footer ul#footer_nav { left: auto; } -#publisher_textarea_wrapper #file-upload, #publisher_textarea_wrapper #hide_publisher, #facebox .close { +#publisher_textarea_wrapper #file-upload, #publisher_textarea_wrapper #hide_publisher { right: auto; left: 0; margin-left: 3px; @@ -202,10 +202,6 @@ form p.checkbox_select label { margin-right: 10px; } -#facebox_header h3, #facebox_header h4 { - text-align: right; -} - textarea.comment_box { left: auto; right: -9999px; @@ -281,10 +277,6 @@ ul.comments li form p, ul.show_comments li form p, div.likes li form p, div.disl padding-left: 0; } -#facebox { - text-align: right; -} - .stream_element.conversation .message_count { right: auto; left: 10px; diff --git a/app/views/conversations/create.js.erb b/app/views/conversations/create.js.erb index 21912cebc..95ffa52ca 100644 --- a/app/views/conversations/create.js.erb +++ b/app/views/conversations/create.js.erb @@ -5,7 +5,6 @@ var response = <%= raw @response.to_json %>; Diaspora.page.flashMessages.render({ 'success':response.success, 'notice':response.message }); if(response.success){ $("#new_conversation").removeClass('form_do_not_clear').clearForm(); - $.facebox.close(); window.location.href = "<%= conversations_path(conversation_id: @conversation.id) %>"; } -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/conversations/new.mobile.haml b/app/views/conversations/new.mobile.haml index b99070f8a..d7c6fe94e 100644 --- a/app/views/conversations/new.mobile.haml +++ b/app/views/conversations/new.mobile.haml @@ -25,7 +25,7 @@ }); .col-md-6#new_conversation_pane - #facebox_header.container-fluid.row + .container-fluid.row %h3 = t('conversations.index.new_conversation') diff --git a/app/views/publisher/_publisher.html.haml b/app/views/publisher/_publisher.html.haml index 4d24f4191..ed136c40f 100644 --- a/app/views/publisher/_publisher.html.haml +++ b/app/views/publisher/_publisher.html.haml @@ -60,7 +60,9 @@ - if current_user.services - for service in current_user.services = service_button(service) - %a.btn.btn-link{ href: "#question_mark_pane", class: 'question_mark', rel: 'facebox', title: t('shared.public_explain.manage') } + .btn.btn-link{ class: "question_mark", + title: t("shared.public_explain.manage"), + data: {toggle: "modal", target: "#publicExplainModal"}} %i.entypo.cog = render partial: "publisher/aspect_dropdown", locals: { :selected_aspects => selected_aspects } @@ -73,10 +75,8 @@ %span.text = t('shared.publisher.share') - .facebox_content - #question_mark_pane - = render 'shared/public_explain' = link_to '', contacts_path(:aspect_ids => aspect_ids), class: 'selected_contacts_link hidden' - #publisher_photo_upload + += render 'shared/public_explain' diff --git a/app/views/shared/_public_explain.haml b/app/views/shared/_public_explain.haml index 4b181e5c0..249de1105 100644 --- a/app/views/shared/_public_explain.haml +++ b/app/views/shared/_public_explain.haml @@ -2,22 +2,25 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -.span-12.last - .modal_title_bar - %h4=t('.title') - %p - =t('.outside') - %br - %br - = link_to t('.atom_feed'), "#{current_user.public_url}.atom" - %br - - if current_user.services - - for service in current_user.services - = t('.logged_in', :service => service.provider) - %br - - = link_to t('.manage'), services_path - - %br - %br - = link_to t('ok'), '#', :class => "button", :onClick => '$.facebox.close();' +.modal.fade{"id" => "publicExplainModal", + "tabindex" => "-1", + "role" => "dialog", + "aria-labelledby" => "publicExplainModalLabel", + "aria-hidden" => "true"} + .modal-dialog + .modal-content + .modal-header + %button.close{"type" => "button", "data-dismiss" => "modal", "aria-hidden" => "true"} + × + %h3.modal-title{id: "publicExplainModalLabel"} + = t(".title") + .modal-body + %p=t('.outside') + %p= link_to t('.atom_feed'), "#{current_user.public_url}.atom" + - if current_user.services + - for service in current_user.services + %p= t('.logged_in', :service => service.provider) + %p= link_to t('.manage'), services_path + .modal-footer + .btn.btn-default{type: "button", data: {dismiss: "modal"}, aria: {hidden: "true"}} + = t("ok") diff --git a/config/application.rb b/config/application.rb index e4b6ec47d..47d39fcad 100644 --- a/config/application.rb +++ b/config/application.rb @@ -87,9 +87,6 @@ module Diaspora home.css color_themes/*/desktop.css color_themes/*/mobile.css - - # images from facebox gem - facebox/* } # Version of your assets, change this if you want to expire all your assets diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index 3fafbb68c..a5510c84e 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -127,12 +127,6 @@ And /^I reject the alert$/ do page.driver.browser.switch_to.alert.dismiss end -When /^(.*) in the modal window$/ do |action| - within('#facebox') do - step action - end -end - When /^(.*) in the mention modal$/ do |action| within('#mentionModal') do step action