diff --git a/Changelog.md b/Changelog.md index ae9acdcb9..922bfa4ea 100644 --- a/Changelog.md +++ b/Changelog.md @@ -103,6 +103,7 @@ diaspora.yml file**. The existing settings from 0.4.x and before will not work a * Move registration form to a partial [#5764](https://github.com/diaspora/diaspora/pull/5764) * Add tests for liking and unliking posts [#5741](https://github.com/diaspora/diaspora/pull/5741) * Rewrite slide effect in conversations as css transition for better performance [#5776](https://github.com/diaspora/diaspora/pull/5776) +* Various cleanups and improvements in the frontend code [#5781](https://github.com/diaspora/diaspora/pull/5781) [#5769](https://github.com/diaspora/diaspora/pull/5769) [#5763](https://github.com/diaspora/diaspora/pull/5763) [#5762](https://github.com/diaspora/diaspora/pull/5762) [#5758](https://github.com/diaspora/diaspora/pull/5758) [#5755](https://github.com/diaspora/diaspora/pull/5755) [#5747](https://github.com/diaspora/diaspora/pull/5747) [#5734](https://github.com/diaspora/diaspora/pull/5734) ## Bug fixes * orca cannot see 'Add Contact' button [#5158](https://github.com/diaspora/diaspora/pull/5158) diff --git a/app/assets/images/close_label.png b/app/assets/images/close_label.png deleted file mode 100644 index 53aa1d3ce..000000000 Binary files a/app/assets/images/close_label.png and /dev/null differ diff --git a/app/assets/javascripts/app/views/location_view.js b/app/assets/javascripts/app/views/location_view.js index bf7ff3811..0fe6be15d 100644 --- a/app/assets/javascripts/app/views/location_view.js +++ b/app/assets/javascripts/app/views/location_view.js @@ -10,7 +10,7 @@ app.views.Location = Backbone.View.extend({ }, render: function(){ - $(this.el).append('delete location'); + $(this.el).append('ajax-loader'); }, getLocation: function(){ @@ -20,7 +20,6 @@ app.views.Location = Backbone.View.extend({ locator.getAddress(function(address, latlng){ $(element).html(''); $('#location_coords').val(latlng.latitude + "," + latlng.longitude); - $(element).append('delete location'); }); }, }); diff --git a/app/assets/stylesheets/bootstrap-fix.scss b/app/assets/stylesheets/bootstrap-fix.scss index e54676eb8..47b6c0c4d 100644 --- a/app/assets/stylesheets/bootstrap-fix.scss +++ b/app/assets/stylesheets/bootstrap-fix.scss @@ -11,12 +11,6 @@ textarea::input-placeholder { } -// A popover hack -.popover h3 { - margin-bottom: 0; - font-weight: bold; -} - // A temporary fix for mention modal #5329 #new_status_message_pane .modal { diff --git a/app/assets/stylesheets/getting-started.scss b/app/assets/stylesheets/getting-started.scss index abce0a804..eaaaf1317 100644 --- a/app/assets/stylesheets/getting-started.scss +++ b/app/assets/stylesheets/getting-started.scss @@ -39,3 +39,39 @@ } } } + +.popover h3 { + font-weight: bold; + .close { line-height: 18px; } +} + +#welcome-to-diaspora { + background: orange; + box-shadow: inset 0 -2px 10px rgba(0,0,0,0.35); + margin-bottom: 20px; + margin-top: -40px; + padding-bottom: 30px; + padding-top: 60px; + + h1,h3 { + color: $white; + margin: 0; + text-overflow: ellipsis; + white-space: nowrap; + } + + #gs-skip-x { + font-size: 40px; + } + + &:hover { + #gs-skip-x { + opacity: .4; + @include transition(opacity, 0.25s); + + &:hover { + opacity: 1; + } + } + } +} diff --git a/app/assets/stylesheets/new_styles/_registration.scss b/app/assets/stylesheets/new_styles/_registration.scss index e3db7b530..0e013fcb4 100644 --- a/app/assets/stylesheets/new_styles/_registration.scss +++ b/app/assets/stylesheets/new_styles/_registration.scss @@ -54,34 +54,3 @@ } } } - -#welcome-to-diaspora { - -webkit-box-shadow: inset 0 -2px 10px rgba(0,0,0,0.35); - -moz-box-shadow: inset 0 -2px 10px rgba(0,0,0,0.35); - position: relative; - width: 100%; - left: 0; - top: 0; - padding: 10px; - .right { - position: absolute; - right: 0; - top: 10px; - } - h1,h3 { - color: #fff; - text-overflow: ellipsis; - white-space: nowrap; - } - background: orange; - &:hover { - #gs-skip-x { - opacity: .4; - @include transition(opacity, 0.25s); - - &:hover { - opacity: 1; - } - } - } -} diff --git a/app/assets/stylesheets/publisher.scss b/app/assets/stylesheets/publisher.scss index ceb40b995..462a13080 100644 --- a/app/assets/stylesheets/publisher.scss +++ b/app/assets/stylesheets/publisher.scss @@ -104,7 +104,6 @@ &.with_location .row-fluid#location_container { height: 30px; - #hide_location { display: none !important; } border-top: 1px dashed $border-grey; input[type='text'] { margin-bottom: 0; diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 80112f31a..e0952ff4c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -42,7 +42,7 @@ module ApplicationHelper end def popover_with_close_html(without_close_html) - without_close_html + link_to(content_tag(:div, nil, :class => 'icons-deletelabel'), "#", :class => 'close') + without_close_html + link_to('×'.html_safe, "#", :class => 'close') end # Require jQuery from CDN if possible, falling back to vendored copy, and require diff --git a/app/views/profiles/edit.haml b/app/views/profiles/edit.haml index 62f3050fc..fb2733bd4 100644 --- a/app/views/profiles/edit.haml +++ b/app/views/profiles/edit.haml @@ -2,8 +2,6 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -.bootstrap_header_padding - .container .row-fluid .span12 @@ -19,7 +17,7 @@ - content_for :submit_block do = link_to t('cancel'), local_or_remote_person_path(current_user.person), :class => "btn" = submit_tag t('.update_profile'), :class => "creation", :id => "update_profile", :class => "btn" - = render :partial => 'edit', :locals => {:person => @person, + = render :partial => 'edit', :locals => {:person => @person, :profile => @profile, :aspect => @aspect, :step => @step} .span3 diff --git a/app/views/services/index.html.haml b/app/views/services/index.html.haml index 65780fdcd..16c8cf1dc 100644 --- a/app/views/services/index.html.haml +++ b/app/views/services/index.html.haml @@ -5,8 +5,6 @@ - content_for :page_title do = t('.edit_services') -.bootstrap_header_padding - .container .row-fluid .span12 diff --git a/app/views/streams/main_stream.html.haml b/app/views/streams/main_stream.html.haml index 6c38f039a..ba2e90e5f 100644 --- a/app/views/streams/main_stream.html.haml +++ b/app/views/streams/main_stream.html.haml @@ -7,18 +7,18 @@ = javascript_include_tag :jsxc, :id => 'jsxc', :data => { :endpoint => get_bosh_endpoint } -.bootstrap_header_padding - - if current_user.getting_started? #welcome-to-diaspora - .container{:style => "position: relative;"} - .right - = link_to image_tag('close_label.png'), getting_started_completed_path, :id => "gs-skip-x" - .span12 - %h1 - = t('aspects.index.welcome_to_diaspora', :name => current_user.first_name) - %h3 - = t('aspects.index.introduce_yourself') + .container-fluid + .row-fluid + .span8.offset1 + %h1 + = t('aspects.index.welcome_to_diaspora', :name => current_user.first_name) + %h3 + = t('aspects.index.introduce_yourself') + .span2 + .pull-right + = link_to '×'.html_safe, getting_started_completed_path, :id => "gs-skip-x", :class => "close" .container-fluid .row-fluid diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index 032517f44..b722e5a93 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -5,8 +5,6 @@ - content_for :page_title do = t('.edit_account') -.bootstrap_header_padding - .container .row-fluid .span12 @@ -41,7 +39,7 @@ .row-fluid .span12 - %h3 + %h3 = t('.change_password') = form_for @user, :url => user_path, :html => { :method => :put } do |f| - if (@user.errors.keys & [:password, :password_confirmation, :current_password]).present? @@ -65,7 +63,7 @@ .row-fluid .span-12 - %h3 + %h3 = t('.change_language') = form_for 'user', :url => user_path, :html => { :method => :put } do |f| .form-inline @@ -100,7 +98,7 @@ .row-fluid .span-12 - + %h3#auto-follow-back-preferences = t('.following') = form_for current_user, :url => user_path, :html => { :method => :put } do |f| @@ -119,7 +117,7 @@ .row-fluid .span-12 - %h3 + %h3 = t('.receive_email_notifications') = form_for 'user', :url => user_path, :html => { :method => :put } do |f| = f.fields_for :email_preferences do |type| @@ -140,40 +138,40 @@ = type.check_box :mentioned, {:checked => @email_prefs['mentioned']}, false, true = t('.mentioned') .small-horizontal-spacer - + = type.label :liked, :class => "checkbox" do = type.check_box :liked, {:checked => @email_prefs['liked']}, false, true = t('.liked') .small-horizontal-spacer - + = type.label :reshared, :class => "checkbox" do = type.check_box :reshared, {:checked => @email_prefs['reshared']}, false, true = t('.reshared') .small-horizontal-spacer - + = type.label :comment_on_post, :class => "checkbox" do = type.check_box :comment_on_post, {:checked => @email_prefs['comment_on_post']}, false, true = t('.comment_on_post') .small-horizontal-spacer - + = type.label :also_commented, :class => "checkbox" do = type.check_box :also_commented, {:checked => @email_prefs['also_commented']}, false, true = t('.also_commented') .small-horizontal-spacer - + = type.label :private_message, :class => "checkbox" do = type.check_box :private_message, {:checked => @email_prefs['private_message']}, false, true = t('.private_message') .small-horizontal-spacer - + = f.submit t('.change'), :class => "btn", :id => "change_email_preferences" %hr .row-fluid #account_data.span6 - %h3 + %h3 = t('.export_data') - if current_user.exporting .export-in-progress= t('.export_in_progress') @@ -184,7 +182,7 @@ = link_to t('.request_export_update'), export_profile_user_path, class: "btn" - else = link_to t('.request_export'), export_profile_user_path, :class => "btn" - + - if current_user.exporting_photos .small-horizontal-spacer .export-in-progress= t('.export_photos_in_progress') diff --git a/app/views/users/privacy_settings.html.haml b/app/views/users/privacy_settings.html.haml index 09c834296..82b724f5c 100644 --- a/app/views/users/privacy_settings.html.haml +++ b/app/views/users/privacy_settings.html.haml @@ -5,8 +5,6 @@ - content_for :page_title do = t('.title') -.bootstrap_header_padding - .container .row-fluid .span12 @@ -20,7 +18,7 @@ .span5 %h3 = t('.title') - + = form_for current_user, :url => user_path, :html => { :method => :put } do |f| = f.error_messages