diff options
author | Augier <contact@c-henry.fr> | 2015-04-16 20:19:41 +0300 |
---|---|---|
committer | Jonne Haß <me@jhass.eu> | 2015-06-04 19:05:43 +0300 |
commit | 207b6c61537fc96528f7cd29e80a27401f49be18 (patch) | |
tree | 621f6b8b70559c69e3443ec66a13149b837d6923 | |
parent | e39d024ba1dc6fa742e5b8f5024fef09006a9e29 (diff) |
Port to Bootstrap 3
correcting images display on stream sidebar
Corrections on profile page
154 files changed, 1524 insertions, 1674 deletions
@@ -53,7 +53,7 @@ gem "rack-cors", "0.4.0", require: "rack/cors" # CSS -gem "bootstrap-sass", "2.3.2.2" +gem "bootstrap-sass", "3.3.4.1" gem "compass-rails", "2.0.4" gem "sass-rails", "5.0.1" gem "autoprefixer-rails", "5.1.11" diff --git a/Gemfile.lock b/Gemfile.lock index bb5fe80bc..dbf214036 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,8 +70,9 @@ GEM jquery-rails railties bcrypt (3.1.10) - bootstrap-sass (2.3.2.2) - sass (~> 3.2) + bootstrap-sass (3.3.4.1) + autoprefixer-rails (>= 5.0.0.1) + sass (>= 3.2.19) builder (3.2.2) byebug (4.0.5) columnize (= 0.9.0) @@ -629,7 +630,7 @@ GEM ruby-progressbar (1.7.5) rubyzip (1.1.7) safe_yaml (1.0.4) - sass (3.4.13) + sass (3.4.14) sass-rails (5.0.1) railties (>= 4.0.0, < 5.0) sass (~> 3.1) @@ -735,7 +736,7 @@ DEPENDENCIES asset_sync (= 1.1.0) autoprefixer-rails (= 5.1.11) backbone-on-rails (= 1.1.2.1) - bootstrap-sass (= 2.3.2.2) + bootstrap-sass (= 3.3.4.1) capybara (= 2.4.4) carrierwave (= 0.10.0) compass-rails (= 2.0.4) diff --git a/app/assets/images/ajax-loader.gif b/app/assets/images/ajax-loader.gif Binary files differdeleted file mode 100644 index e40f19a28..000000000 --- a/app/assets/images/ajax-loader.gif +++ /dev/null diff --git a/app/assets/images/mobile/deletelabel.png b/app/assets/images/mobile/deletelabel.png Binary files differdeleted file mode 100644 index b3e53ee3a..000000000 --- a/app/assets/images/mobile/deletelabel.png +++ /dev/null diff --git a/app/assets/images/static-loader.png b/app/assets/images/static-loader.png Binary files differdeleted file mode 100644 index 1b3709935..000000000 --- a/app/assets/images/static-loader.png +++ /dev/null diff --git a/app/assets/javascripts/app/app.js b/app/assets/javascripts/app/app.js index de6913f21..cad4f3c0f 100644 --- a/app/assets/javascripts/app/app.js +++ b/app/assets/javascripts/app/app.js @@ -127,7 +127,7 @@ var app = { $("a.disabled").click(function(event) { event.preventDefault(); }); - }, + } }; $(function() { diff --git a/app/assets/javascripts/app/helpers/handlebars-helpers.js b/app/assets/javascripts/app/helpers/handlebars-helpers.js index 1862dc11b..442d35c49 100644 --- a/app/assets/javascripts/app/helpers/handlebars-helpers.js +++ b/app/assets/javascripts/app/helpers/handlebars-helpers.js @@ -78,10 +78,10 @@ Handlebars.registerHelper('personImage', function(person, size, imageClass) { size = ( !_.isString(size) ) ? "small" : size; imageClass = ( !_.isString(imageClass) ) ? size : imageClass; - return _.template('<img src="<%= src %>" class="avatar <%= img_class %>" title="<%= title %>" alt="<%= title %>" />')({ - 'src': avatar[size], - 'img_class': imageClass, - 'title': _.escape(name) + return _.template('<img src="<%= src %>" class="<%= img_class %>" title="<%= title %>" alt="<%= title %>" />')({ + src: avatar[size], + img_class: imageClass + " avatar img-responsive center-block", + title: _.escape(name) }); }); diff --git a/app/assets/javascripts/app/helpers/modal_helper.js b/app/assets/javascripts/app/helpers/modal_helper.js new file mode 100644 index 000000000..77e84034e --- /dev/null +++ b/app/assets/javascripts/app/helpers/modal_helper.js @@ -0,0 +1,12 @@ +(function(){ + app.helpers.showModal = function(id){ + $(id).modal(); + var modalBody = $(id).find(".modal-body"); + + var url = $(id).attr("href"); + + modalBody.load(url, function(){ + $(id).find("#modalWaiter").remove(); + }); + }; +})(); diff --git a/app/assets/javascripts/app/pages/contacts.js b/app/assets/javascripts/app/pages/contacts.js index 782120b22..a0d01c8e6 100644 --- a/app/assets/javascripts/app/pages/contacts.js +++ b/app/assets/javascripts/app/pages/contacts.js @@ -78,8 +78,8 @@ app.pages.Contacts = Backbone.View.extend({ }, setupAspectSorting: function() { - $("#aspect_nav .nav").sortable({ - items: "li.aspect[data-aspect-id]", + $("#aspect_nav .list-group").sortable({ + items: "a.aspect[data-aspect-id]", update: function() { $("#aspect_nav .ui-sortable").removeClass("synced"); var data = JSON.stringify({ ordered_aspect_ids: $(this).sortable("toArray", { attribute: "data-aspect-id" }) }); diff --git a/app/assets/javascripts/app/router.js b/app/assets/javascripts/app/router.js index 8cefd3f1a..0a9958bcf 100644 --- a/app/assets/javascripts/app/router.js +++ b/app/assets/javascripts/app/router.js @@ -48,11 +48,11 @@ app.Router = Backbone.Router.extend({ contacts: function() { app.aspect = new app.models.Aspect(gon.preloads.aspect); - app.contacts = new app.collections.Contacts(app.parsePreload('contacts')); + app.contacts = new app.collections.Contacts(app.parsePreload("contacts")); var stream = new app.views.ContactStream({ collection: app.contacts, - el: $('.stream.contacts #contact_stream'), + el: $(".stream.contacts #contact_stream"), }); app.page = new app.pages.Contacts({stream: stream}); @@ -80,7 +80,7 @@ app.Router = Backbone.Router.extend({ app.page.render(); if( !$.contains(document, app.page.el) ) { - // view element isn't already attached to the DOM, insert it + // view element isn"t already attached to the DOM, insert it $("#container").empty().append(app.page.el); } }, @@ -96,7 +96,7 @@ app.Router = Backbone.Router.extend({ var streamFacesView = new app.views.StreamFaces({collection : app.stream.items}); $("#main_stream").html(app.page.render().el); - $('#selected_aspect_contacts .content').html(streamFacesView.render().el); + $("#selected_aspect_contacts .content").html(streamFacesView.render().el); this._hideInactiveStreamLists(); }, @@ -104,7 +104,7 @@ app.Router = Backbone.Router.extend({ this.renderPage(function() { return new app.pages.Profile({ person_id: guid, - el: $('body > .container-fluid'), + el: $("body > #profile_container"), streamCollection: app.collections.Photos, streamView: app.views.Photos }); @@ -132,14 +132,14 @@ app.Router = Backbone.Router.extend({ }, aspects : function(){ - app.aspects = new app.collections.Aspects(app.currentUser.get('aspects')); + app.aspects = new app.collections.Aspects(app.currentUser.get("aspects")); this.aspects_list = new app.views.AspectsList({ collection: app.aspects }); this.aspects_list.render(); this.aspects_stream(); }, aspects_stream : function(){ - var ids = app.aspects.selectedAspects('id'); + var ids = app.aspects.selectedAspects("id"); app.stream = new app.models.StreamAspects([], { aspects_ids: ids }); app.stream.fetch(); @@ -150,7 +150,7 @@ app.Router = Backbone.Router.extend({ var streamFacesView = new app.views.StreamFaces({collection : app.stream.items}); $("#main_stream").html(app.page.render().el); - $('#selected_aspect_contacts .content').html(streamFacesView.render().el); + $("#selected_aspect_contacts .content").html(streamFacesView.render().el); this._hideInactiveStreamLists(); }, @@ -165,13 +165,13 @@ app.Router = Backbone.Router.extend({ bookmarklet: function() { var contents = (window.gon) ? gon.preloads.bookmarklet : {}; app.bookmarklet = new app.views.Bookmarklet( - _.extend({}, {el: $('#bookmarklet')}, contents) + _.extend({}, {el: $("#bookmarklet")}, contents) ).render(); }, profile: function() { this.renderPage(function() { return new app.pages.Profile({ - el: $('body > .container-fluid') + el: $("body > #profile_container") }); }); } }); diff --git a/app/assets/javascripts/app/views/aspect_create_view.js b/app/assets/javascripts/app/views/aspect_create_view.js index 4ef77c808..0ec50afa2 100644 --- a/app/assets/javascripts/app/views/aspect_create_view.js +++ b/app/assets/javascripts/app/views/aspect_create_view.js @@ -4,7 +4,7 @@ app.views.AspectCreate = app.views.Base.extend({ templateName: "aspect_create_modal", events: { - "click .btn.creation": "createAspect" + "click .btn.btn-primary": "createAspect" }, initialize: function(opts) { diff --git a/app/assets/javascripts/app/views/aspect_membership_view.js b/app/assets/javascripts/app/views/aspect_membership_view.js index 4d8d52367..b15d9bbc4 100644 --- a/app/assets/javascripts/app/views/aspect_membership_view.js +++ b/app/assets/javascripts/app/views/aspect_membership_view.js @@ -13,8 +13,7 @@ app.views.AspectMembership = app.views.AspectsDropdown.extend({ events: { "click ul.aspect_membership.dropdown-menu > li.aspect_selector": "_clickHandler", - "keypress ul.aspect_membership.dropdown-menu > li.aspect_selector": "_clickHandler", - "click ul.aspect_membership.dropdown-menu > li.newItem": "showModal" + "keypress ul.aspect_membership.dropdown-menu > li.aspect_selector": "_clickHandler" }, initialize: function() { @@ -147,10 +146,6 @@ app.views.AspectMembership = app.views.AspectsDropdown.extend({ updateSummary: function(target) { this._toggleCheckbox(target); this._updateButton('green'); - }, - - showModal: function() { - this.$("#newAspectModal").modal("show"); } }); // @license-end diff --git a/app/assets/javascripts/app/views/aspects_dropdown_view.js b/app/assets/javascripts/app/views/aspects_dropdown_view.js index 70e446704..ae9d7d897 100644 --- a/app/assets/javascripts/app/views/aspects_dropdown_view.js +++ b/app/assets/javascripts/app/views/aspects_dropdown_view.js @@ -1,6 +1,6 @@ // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later -/* +/* * Aspects view for the publishers aspect dropdown and the aspect membership dropdown. */ app.views.AspectsDropdown = app.views.Base.extend({ @@ -31,7 +31,7 @@ app.views.AspectsDropdown = app.views.Base.extend({ var button = this.$('.btn.dropdown-toggle'), selectedAspects = this.$(".dropdown-menu > li.selected").length, buttonText; - + if (selectedAspects === 0) { button.removeClass(inAspectClass).addClass('btn-default'); buttonText = Diaspora.I18n.t("aspect_dropdown.select_aspects"); diff --git a/app/assets/javascripts/app/views/location_view.js b/app/assets/javascripts/app/views/location_view.js index 0fe6be15d..362f66fbb 100644 --- a/app/assets/javascripts/app/views/location_view.js +++ b/app/assets/javascripts/app/views/location_view.js @@ -10,18 +10,20 @@ app.views.Location = Backbone.View.extend({ }, render: function(){ - $(this.el).append('<img alt="ajax-loader" src="'+ImagePaths.get('ajax-loader.gif')+'">'); + $("<img/>", { alt: 'ajax-loader', src: ImagePaths.get('ajax-loader2.gif') }).appendTo(this.el); }, getLocation: function(){ - var element = this.el; + var element = this.el ; var locator = new OSM.Locator(); locator.getAddress(function(address, latlng){ - $(element).html('<input id="location_address" type="text" class="input-block-level" value="' + address + '"/>'); - $('#location_coords').val(latlng.latitude + "," + latlng.longitude); + $(element).empty(); + $("<input/>", { id: "location_address", value: address, + type: "text", class: "input-block-level form-control"}).appendTo($(element)); + + $("#location_coords").val(latlng.latitude + "," + latlng.longitude); }); - }, + } }); // @license-end - diff --git a/app/assets/javascripts/app/views/notification_dropdown_view.js b/app/assets/javascripts/app/views/notification_dropdown_view.js index 36de9c954..3b373a169 100644 --- a/app/assets/javascripts/app/views/notification_dropdown_view.js +++ b/app/assets/javascripts/app/views/notification_dropdown_view.js @@ -86,7 +86,7 @@ app.views.NotificationDropdown = app.views.Base.extend({ hideAjaxLoader: function(){ var self = this; this.ajaxLoader.find('img').fadeTo(200, 0, function(){ - self.ajaxLoader.hide(300, function(){ + self.ajaxLoader.hide(200, function(){ self.ajaxLoader.find('img').css('opacity', 1); }); }); diff --git a/app/assets/javascripts/app/views/notifications_view.js b/app/assets/javascripts/app/views/notifications_view.js index 808ce6749..5d33edc47 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(note.data("guid")); } }, - getAllUnread: function(){ return $('.media.stream_element.unread'); }, + getAllUnread: function(){ return $(".media.stream_element.unread"); }, setRead: function(guid) { this.setUnreadStatus(guid, false); }, @@ -37,7 +37,7 @@ app.views.Notifications = Backbone.View.extend({ }, clickSuccess: function(data) { - var type = $('.stream_element[data-guid=' + data["guid"] + ']').data('type'); + var type = $(".stream_element[data-guid=" + data["guid"] + "]").data("type"); this.updateView(data["guid"], type, data["unread"]); }, @@ -51,43 +51,43 @@ app.views.Notifications = Backbone.View.extend({ updateView: function(guid, type, unread) { var change = unread ? 1 : -1, - all_notes = $('ul.nav > li:eq(0) .badge'), - type_notes = $('ul.nav > li[data-type=' + type + '] .badge'), - header_badge = $('#notification_badge .badge_count'), - note = $('.stream_element[data-guid=' + guid + ']'), - markAllReadLink = $('a#mark_all_read_link'), - translationKey = unread ? 'notifications.mark_read' : 'notifications.mark_unread'; + allNotes = $("ul.list-group > a:eq(0) .badge"), + typeNotes = $("ul.list-group > a[data-type=" + type + "] .badge"), + headerBadge = $("#notification_badge .badge_count"), + note = $(".stream_element[data-guid=" + guid + "]"), + markAllReadLink = $("a#mark_all_read_link"), + translationKey = unread ? "notifications.mark_read" : "notifications.mark_unread"; if(unread){ note.removeClass("read").addClass("unread"); } else { note.removeClass("unread").addClass("read"); } $(".unread-toggle .entypo", note) - .tooltip('destroy') + .tooltip("destroy") .removeAttr("data-original-title") - .attr('title',Diaspora.I18n.t(translationKey)) + .attr("title",Diaspora.I18n.t(translationKey)) .tooltip(); - [all_notes, type_notes, header_badge].forEach(function(element){ + [allNotes, typeNotes, headerBadge].forEach(function(element){ element.text(function(i, text){ return parseInt(text) + change }); }); - [all_notes, type_notes].forEach(function(badge) { + [allNotes, typeNotes].forEach(function(badge) { if(badge.text() > 0) { - badge.addClass('badge-important').removeClass('badge-default'); + badge.addClass("badge-important").removeClass("badge-default"); } else { - badge.removeClass('badge-important').addClass('badge-default'); + badge.removeClass("badge-important").addClass("badge-default"); } }); - if(header_badge.text() > 0){ - header_badge.removeClass('hidden'); - markAllReadLink.removeClass('disabled'); + if(headerBadge.text() > 0){ + headerBadge.removeClass("hidden"); + markAllReadLink.removeClass("disabled"); } else{ - header_badge.addClass('hidden'); - markAllReadLink.addClass('disabled'); + headerBadge.addClass("hidden"); + markAllReadLink.addClass("disabled"); } } }); diff --git a/app/assets/javascripts/app/views/profile_header_view.js b/app/assets/javascripts/app/views/profile_header_view.js index 7a460e182..322f81bf8 100644 --- a/app/assets/javascripts/app/views/profile_header_view.js +++ b/app/assets/javascripts/app/views/profile_header_view.js @@ -3,6 +3,11 @@ app.views.ProfileHeader = app.views.Base.extend({ templateName: 'profile_header', + events: { + "click #mention_button": "showMentionModal", + "click #message_button": "showMessageModal" + }, + initialize: function(opts) { app.events.on('aspect:create', this.postRenderTemplate, this); this.photos = _.has(opts, 'photos') ? opts.photos : null; @@ -40,6 +45,14 @@ app.views.ProfileHeader = app.views.Base.extend({ return (this.contacts && this.contacts.count > 0); }, + showMentionModal: function(){ + app.helpers.showModal("#mentionModal"); + }, + + showMessageModal: function(){ + app.helpers.showModal("#conversationModal"); + }, + postRenderTemplate: function() { var self = this; var dropdownEl = this.$('.aspect_membership_dropdown.placeholder'); diff --git a/app/assets/javascripts/app/views/publisher/getting_started_view.js b/app/assets/javascripts/app/views/publisher/getting_started_view.js index 6d36a83a7..1ca796ca5 100644 --- a/app/assets/javascripts/app/views/publisher/getting_started_view.js +++ b/app/assets/javascripts/app/views/publisher/getting_started_view.js @@ -19,58 +19,58 @@ app.views.PublisherGettingStarted = Backbone.View.extend({ // initiate all the popover message boxes show: function() { this._addPopover(this.el_first_msg, { - trigger: 'manual', + trigger: "manual", offset: 30, - id: 'first_message_explain', - placement: 'right', + id: "first_message_explain", + placement: "right", html: true, - container: 'body' + container: "body" }, 600); this._addPopover(this.el_visibility, { - trigger: 'manual', + trigger: "manual", offset: 10, - id: 'message_visibility_explain', - placement: 'bottom', + id: "message_visibility_explain", + placement: "bottom", html: true, - container: 'body' + container: "body" }, 1000); this._addPopover(this.el_stream, { - trigger: 'manual', + trigger: "manual", offset: -5, - id: 'stream_explain', - placement: 'left', + id: "stream_explain", + placement: "left", html: true, - container: 'body' + container: "body" }, 1400); // hide some popovers when a post is created - this.$('.button.creation').click(function() { - this.el_visibility.popover('hide'); - this.el_first_msg.popover('hide'); + this.$("#submit").click(function() { + this.el_visibility.popover("hide"); + this.el_first_msg.popover("hide"); }); }, _addPopover: function(el, opts, timeout) { el.popover(opts); el.click(function() { - el.popover('hide'); + el.popover("hide"); }); // show the popover after the given timeout setTimeout(function() { - el.popover('show'); + el.popover("show"); // disable 'getting started' when the last popover is closed - var popup = el.data('popover').$tip[0]; - var close = $(popup).find('.close'); + var popup = el.data("bs.popover").$tip[0]; + var close = $(popup).find(".close"); close.click(function() { - if( $('.popover').length === 1 ) { - $.get('/getting_started_completed', {success: function() { + if( $(".popover").length <= 1 ) { + $.get("/getting_started_completed", {success: function() { $("#welcome-to-diaspora, #welcome-to-diaspora~br").remove(); }}); } - el.popover('hide'); + el.popover("hide"); return false; }); }, timeout); diff --git a/app/assets/javascripts/app/views/publisher_view.js b/app/assets/javascripts/app/views/publisher_view.js index fece5dd08..dd2bf7077 100644 --- a/app/assets/javascripts/app/views/publisher_view.js +++ b/app/assets/javascripts/app/views/publisher_view.js @@ -324,7 +324,7 @@ app.views.Publisher = Backbone.View.extend({ "title" : serializedForm["status_message[text]"], "address" : $("#location_address").val(), "interactions" : {"likes":[],"reshares":[],"comments_count":0,"likes_count":0,"reshares_count":0}, - 'poll': poll, + 'poll': poll }; if(app.stream) { this.removePostPreview(); diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index 58f9db688..deaf9217a 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -45,8 +45,5 @@ //= require view //= require aspects-dropdown //= require mentions -//= require bootstrap-tooltip -//= require bootstrap-popover -//= require bootstrap-dropdown -//= require bootstrap-modal +//= require bootstrap //= require osmlocator diff --git a/app/assets/javascripts/view.js b/app/assets/javascripts/view.js index 508da666d..32c14d325 100644 --- a/app/assets/javascripts/view.js +++ b/app/assets/javascripts/view.js @@ -37,6 +37,7 @@ var View = { Diaspora.page.directionDetector.updateBinds(); }); + $("a.new_aspect").click(function(){ $("input#aspect_name").focus(); }); diff --git a/app/assets/javascripts/widgets/infinite-scroll.js b/app/assets/javascripts/widgets/infinite-scroll.js index d3fa5be01..4e0c745b9 100644 --- a/app/assets/javascripts/widgets/infinite-scroll.js +++ b/app/assets/javascripts/widgets/infinite-scroll.js @@ -13,7 +13,7 @@ debug: false, donetext: Diaspora.I18n.t("infinite_scroll.no_more"), loadingText: "", - loadingImg: ImagePaths.get("ajax-loader.gif"), + loadingImg: ImagePaths.get("ajax-loader2.gif"), navSelector: "#pagination", nextSelector: ".paginate", itemSelector: ".stream_element", diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 2084f5e3d..f8caef389 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -40,12 +40,20 @@ body > div.container { height: 50px; } - .actions li { - margin-top: .3em; - } + .actions{ width: 150px; } + + .pull-right .label{ display: inline-block; } + } +} + +/** Invites panel **/ +.more_invites{ + #add-invites-section{ + line-height: 34px; + margin-bottom: 15px; } } /** reported posts **/ -@import 'report' +@import 'report'; diff --git a/app/assets/stylesheets/aspects.scss b/app/assets/stylesheets/aspects.scss index 3c9b1ac22..1295f6cb5 100644 --- a/app/assets/stylesheets/aspects.scss +++ b/app/assets/stylesheets/aspects.scss @@ -6,17 +6,17 @@ height: 14px; display: inline-block; } - .icon-ok, .icon-refresh { + .glyphicon-ok, .icon-refresh { padding-right: 5px; display: none; } &.selected { - .icon-ok { display: inline-block;} + .glyphicon-ok { display: inline-block;} .icon-refresh { display: none;} } &.loading { .icon-refresh { display: inline-block;} - .icon-ok { display: none;} + .glyphicon-ok { display: none;} } a { .text { diff --git a/app/assets/stylesheets/autocomplete.scss b/app/assets/stylesheets/autocomplete.scss index c23205248..4f3394ae6 100644 --- a/app/assets/stylesheets/autocomplete.scss +++ b/app/assets/stylesheets/autocomplete.scss @@ -26,7 +26,7 @@ } cursor: default; display: block; - height: 37px; + height: 45px; position: relative; // if width will be 100% horizontal scrollbar will apear // when scroll mode will be used @@ -42,7 +42,7 @@ } .ac_loading { - background: white image-url('ajax-loader.gif') right center no-repeat; + background: white image-url('ajax-loader2.gif') right center no-repeat; } .ac_odd { diff --git a/app/assets/stylesheets/bootstrap-complete.scss b/app/assets/stylesheets/bootstrap-complete.scss index 7e36e3854..6ccbe0b82 100644 --- a/app/assets/stylesheets/bootstrap-complete.scss +++ b/app/assets/stylesheets/bootstrap-complete.scss @@ -1,9 +1,3 @@ // Calling this file bootstrap would cause an infinite recursion during asset compilation. -@import 'bootstrap'; -@import 'bootstrap-responsive'; - - -// according to the docs, this is part of bootstrap 2.3.x -.text-left { text-align: left; } -.text-center { text-align: center; } -.text-right { text-align: right; } +@import "bootstrap-sprockets"; +@import "bootstrap"; diff --git a/app/assets/stylesheets/bootstrap-headerfix.scss b/app/assets/stylesheets/bootstrap-headerfix.scss index 53f4919dc..792b44c6c 100644 --- a/app/assets/stylesheets/bootstrap-headerfix.scss +++ b/app/assets/stylesheets/bootstrap-headerfix.scss @@ -26,8 +26,8 @@ header { } #global_search { form { + top: -3px; input { - height: 15px; color: black; } } diff --git a/app/assets/stylesheets/chat.scss b/app/assets/stylesheets/chat.scss index 3be259038..88232bcf4 100644 --- a/app/assets/stylesheets/chat.scss +++ b/app/assets/stylesheets/chat.scss @@ -1,7 +1,7 @@ -body > .container-fluid.chat-roster-shown { +body > .container.chat-roster-shown { padding-right: 224px; #back-to-top { right: 244px; } } -body > .container-fluid.chat-roster-hidden { +body > .container.chat-roster-hidden { #back-to-top { right: 54px; } } diff --git a/app/assets/stylesheets/comments.scss b/app/assets/stylesheets/comments.scss index d21f77fde..6a8551eb9 100644 --- a/app/assets/stylesheets/comments.scss +++ b/app/assets/stylesheets/comments.scss @@ -10,9 +10,8 @@ } .comments > .comment, .comment.new_comment_form_wrapper { .avatar { - margin-top: 5px; - height: 30px; - width: 30px; + height: 35px; + width: 35px; } margin: 0; border-top: 1px dotted $border-grey; @@ -30,6 +29,7 @@ } } .submit_button { + margin-top: 10px; input { float: right; } @@ -39,10 +39,12 @@ } .comment_box { width: 95%; - height: 30px; + height: 35px; } textarea.comment_box:focus, textarea.comment_box:valid, textarea.comment_box:active { border-color: $border-dark-grey; & + .submit_button { display: block; } + min-height: 35px; + box-shadow: none; } } diff --git a/app/assets/stylesheets/conversations.scss b/app/assets/stylesheets/conversations.scss index f37a0d3c1..aeca3bec6 100644 --- a/app/assets/stylesheets/conversations.scss +++ b/app/assets/stylesheets/conversations.scss @@ -18,7 +18,15 @@ margin: 0 0 1em 0; &:last-child { margin-bottom: 0; } } - &.new_message { border-bottom: none; } + &.new_message { + border-bottom: none; + + #new_message #message_text{ + width: 100%; + max-width: 100%; + min-width: 100%; + } + } .timestamp { font-size: 11px; } } @@ -191,6 +199,10 @@ background: $background-grey; } } + div.pagination{ + text-align: center; + width: 100%; + } } } @@ -202,6 +214,12 @@ #conversation_new { label { font-weight: bold; } + + #new_conversation #conversation_text{ + width: 100%; + max-width: 100%; + min-width: 100%; + } } #no_conversations, @@ -226,3 +244,4 @@ input#contact_ids { box-shadow: none; } label { font-weight: bold; } } + diff --git a/app/assets/stylesheets/entypo.scss b/app/assets/stylesheets/entypo.scss index a2d2a3774..50f3f8b22 100644 --- a/app/assets/stylesheets/entypo.scss +++ b/app/assets/stylesheets/entypo.scss @@ -25,7 +25,7 @@ } &.small { - font-size: 1.2em; + font-size: 1em; } /* main icon map */ diff --git a/app/assets/stylesheets/getting-started.scss b/app/assets/stylesheets/getting-started.scss index 57b4d0a6f..a8453f0e9 100644 --- a/app/assets/stylesheets/getting-started.scss +++ b/app/assets/stylesheets/getting-started.scss @@ -10,10 +10,6 @@ .awesome { text-align: center; - - .btn.creation { - text-shadow: none; - } } .hero-unit { @@ -33,6 +29,7 @@ width: 100%; li.as-original { + width: 100%; input { margin-bottom: 15px; } diff --git a/app/assets/stylesheets/header.scss b/app/assets/stylesheets/header.scss index 7e4757ae8..e2e1185eb 100644 --- a/app/assets/stylesheets/header.scss +++ b/app/assets/stylesheets/header.scss @@ -9,7 +9,7 @@ body > header { z-index: 1001; padding: 6px 0; color: #CCC; - height: 26px; + height: 39px; position: fixed; width: 100%; min-width: 620px; diff --git a/app/assets/stylesheets/hovercard.scss b/app/assets/stylesheets/hovercard.scss index eb5ae9518..f7b69b378 100644 --- a/app/assets/stylesheets/hovercard.scss +++ b/app/assets/stylesheets/hovercard.scss @@ -8,7 +8,6 @@ max-width: 400px; background-color: $background-white; - height: 70px; border: 1px solid $border-dark-grey; font-size: small; diff --git a/app/assets/stylesheets/invitations.scss b/app/assets/stylesheets/invitations.scss index 366b0caf4..2c7629687 100644 --- a/app/assets/stylesheets/invitations.scss +++ b/app/assets/stylesheets/invitations.scss @@ -14,7 +14,6 @@ #paste_link { font-weight: 700; } #invite_code { margin-top: 10px; } #codes_left { color: $text-grey; } - .control-label { width: 120px; } .controls { margin-left: 140px; } #email_invitation { padding-top: 10px; diff --git a/app/assets/stylesheets/leftnavbar.scss b/app/assets/stylesheets/leftnavbar.scss index 6bee6e8d6..a803f58e7 100644 --- a/app/assets/stylesheets/leftnavbar.scss +++ b/app/assets/stylesheets/leftnavbar.scss @@ -90,7 +90,8 @@ } /* ---- override app/stylesheets/vendor/autoSuggest.css ---- */ - ul.as-selections { padding: 1px 5px 4px 5px; } + ul.as-selections { padding: 4px 5px; } + .as-original{ width: 100%; } .tag_input { line-height: $font-size-text; vertical-align: top; diff --git a/app/assets/stylesheets/mobile/header.scss b/app/assets/stylesheets/mobile/header.scss index 3c887aa8d..0bea56be3 100644 --- a/app/assets/stylesheets/mobile/header.scss +++ b/app/assets/stylesheets/mobile/header.scss @@ -15,28 +15,23 @@ header { #header_title { display: inline-block; - width: 30px; - height: 30px; + width: 45px; + height: 100%; padding: 7px; } #nav_badges { float: right; - margin: 7px 0px; + margin: 7px 0; display: inline-block; .badge { display: inline; - margin: 0px 4px; + margin: 0 4px; padding: 10px 6px; font-weight: bold; font-size: smaller; background-color: transparent; - - img { - height: 30px; - width: 30px; - } } .badge_count { @@ -53,6 +48,12 @@ header { height: 18px; } } + #nav_badges, #header_title{ + img { + height: 30px; + width: 30px; + } + } } #drawer { @@ -62,7 +63,7 @@ header { width: 100%; left: 100%; background-color: #444; - box-shadow: -2px 0px 2px 1px #333; + box-shadow: none; header { position: static; @@ -74,22 +75,21 @@ header { form { position: absolute; - left: 5px; + left: 15px; right: 22%; input { box-shadow: 0 1px 1px #444; border-radius: 15px; width: 100%; - margin-top: 7px; + margin-top: 5px; background-color: #444; border: 1px solid #222; font-size: 13px; - padding: 4px; + padding: 6px; color: black; &.active { - background-color: $highlight-white; background-color: rgba(160,160,160,0.6); } diff --git a/app/assets/stylesheets/mobile/mobile.scss b/app/assets/stylesheets/mobile/mobile.scss index d6d056beb..b2ac8de9d 100644 --- a/app/assets/stylesheets/mobile/mobile.scss +++ b/app/assets/stylesheets/mobile/mobile.scss @@ -1,13 +1,20 @@ -@import "bootstrap"; -@import "bootstrap-responsive"; +@import "bootstrap-complete"; @import "colors"; @import "_mixins"; @import "vendor/autoSuggest"; @import "_flash_messages"; +@import 'entypo-fonts'; +@import 'entypo'; @import "header"; @import "mobile/tags"; +.col-xs-1{ + width: 50px; + padding-right: 0; +} +.col-xs-11{ width: calc(100% - 50px); } + a { color: #2489ce; text-decoration: none; @@ -21,51 +28,38 @@ code { body { background: { image: image-url("mobile/hatched-light.jpg"); - position: fixed; /* scale background image down for iOS retina display */ size: 200px; } - padding: 0px; -} - -h3 { - margin-top: 0px; -} - -.clear { - clear: both; -} - -#app > * { - transition: all 0.25s ease; + padding: 0; } -#main { - padding: 55px 10px 0px 10px; -} +h3 { margin-top: 0; } +.clear { clear: both; } +#app > * { transition: all 0.25s ease; } +#main { padding: 55px 10px 0 10px; } .message { padding-left: 2px; } .stream_element, -.comments { +.comments{ overflow: auto; position: relative; text-align: left; - padding: 10px 0; min-height: 34px; + padding: 10px 0 0 0; + list-style: none; * { max-width: 100%; } .avatar { border-radius: 4px; - float: left; - height: 35px; - width: 35px; - margin: { - right: 10px; }; } + margin-top: 0; + max-width: 35px; + } .from { a { @@ -82,25 +76,15 @@ h3 { } } - > .content, - .reshare > .content { - padding: 5px; - } - .info { - margin: { - top: 0; }; } - .photo_attachments { - margin: { - top: 6px; }; } - .timeago { - font: { - weight: normal; }; } - padding: 0 !important; + > .content, .reshare > .content { padding: 6px; } + .info{ margin-top: 0; } + .photo_attachments{ margin-top: 6px; } + .timeago{ font-weight: normal; } } .shield{ padding: 10px; font-size: larger; - } +} .shield_wrapper{ height: 100%; @@ -117,7 +101,6 @@ h3 { .stream_element .comments { width: 100%; - padding: 0; margin: 0; top: 3px; .content { @@ -168,8 +151,7 @@ h3 { margin-bottom: 10px; border: 1px solid #bbb; - border-top: 1px solid $border-grey; - border-bottom: 1px solid #aaa; + border-bottom-color: #aaa; } .stream_element div.img img.avatar { @@ -202,18 +184,23 @@ h3 { .more-link, .no-more-posts { display: block; text-align: center; - padding: 0 10px; - margin: 0 10px; + padding: 0; + margin: 20px 0; border-radius: 5px; + border: 1px solid $text-grey; - background: { - color: rgba(220,220,220,0.8); - } + background: { color: rgba(220,220,220,0.8); } h1, h2 { color: $text-grey; padding: 20px; text-shadow: 0 2px 0 #fff; + margin: 0; + } + + &:hover, &:active{ + text-decoration: none; + border: 1px solid $text-dark-grey; } } .no-more-posts { @@ -279,7 +266,7 @@ h3 { } &.photos { - border-bottom: 0px !important; + border-bottom: 0 !important; } } @@ -470,15 +457,13 @@ h3 { background: { size: 20px; repeat: no-repeat; - position: center; }; - - height: 13px; + position: center; + }; + height: 20px; width: 20px; - padding: 5px; - - margin: { - left: 5px; }; + padding: 0; + margin-left: 5px; &.loading { background-image: image-url("mobile-spinner.gif"); @@ -507,7 +492,7 @@ h3 { } #new_status_message { - margin: 0px; + margin: 0; fieldset { padding: 10px; @@ -526,14 +511,8 @@ h3 { } textarea { - border-radius: 0; - box-shadow: 0 2px 3px #999; - border: none; - border-bottom: 1px solid $border-dark-grey; - width: 96%; - padding: 2%; - margin: 0px; - font-size: 14px; + min-width: 100%; + max-width: 100%; } } @@ -623,10 +602,14 @@ select { overflow: hidden; } +.stream_element{ padding: 0; } + .notifications { list-style: none; - margin: 0px; + margin: 0; clear: right; + + &, & ul{ padding: 0; } } .notifications_for_day { @@ -689,11 +672,6 @@ select { color: #3F8FBA; } -form#new_conversation.new_message input.button.creation{ - float: right; - margin: 0 5px 5px; -} - h3.ltr { font-size: 18px; line-height: 27px; @@ -712,10 +690,6 @@ h3.ltr { word-wrap: break-word; } -textarea#message_text { - margin: 10px 0 10px; -} - form#new_conversation.new_conversation { background-color: #FFFFFF; border-bottom: 1px solid $border-dark-grey; @@ -742,74 +716,10 @@ form#new_conversation.new_conversation { } textarea#conversation_text { - border: 0.2s; - border-radius: 0 0 0 0; font-size: larger; - left: 0; - margin: 10px 0; - width: 218px; - padding: 0; -} - -.bottom_submit_section { - display: block; - position: relative; - text-align: right; - padding-bottom: 5px; -} - -.button.creation { - display: inline-block; - padding: 4px 12px; - margin-bottom: 0; - font-size: 14px; - line-height: 20px; - color: #333333; - text-align: center; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - vertical-align: middle; - cursor: pointer; - background-color: #f5f5f5; - background-image: gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); - background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); - background-repeat: repeat-x; - border: 1px solid #cccccc; - border-color: #e6e6e6 #e6e6e6 #bfbfbf; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - border-bottom-color: #b3b3b3; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.button.creation:hover, -.button.creation:focus, -.button.creation:active { - color: #333333; - background-color: #e6e6e6; -} - -.button.creation:active { - background-color: #cccccc \9; -} - -.button.creation:first-child { - margin-left: 0; -} - -.button.creation:hover, -.button.creation:focus { - color: #333333; - text-decoration: none; - background-position: 0 -15px; - transition: background-position 0.1s linear; -} - -.button.creation:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; + width: 100%; + min-width: 100%; + max-width: 100%; } .registrations_error, @@ -839,6 +749,8 @@ form#new_user.new_user input.btn { } } +.media{ padding: 12px 0 } + .conversation_error { color: #DF0101; text-shadow: 1px 1px 5px #666; @@ -899,7 +811,6 @@ h1.session { padding: 20px; margin: -10px -20px 10px -20px; background-color:#4b4b4b; - box-shadow: 0 3px 40px rgba(0,0,0,0.8); z-index: 10; position: relative; text-align: center; @@ -923,6 +834,7 @@ form p.checkbox_select { margin-top: 5px; min-height: 100px; position: relative; + margin-bottom: 20px; img { border-radius: 5px; @@ -930,8 +842,8 @@ form p.checkbox_select { position: absolute; left: 0; - height: 100px; - width: 100px; + height: auto; + width: auto; &.avatar { @include transition(opacity, 0.5s); @@ -990,6 +902,8 @@ form#update_profile_form { select { padding: 3px; } + + .submit_block{ margin-bottom: 20px; } } select#user_language, #user_auto_follow_back_aspect_id, #aspect_ids_ { @@ -1003,10 +917,6 @@ select#user_language, #user_auto_follow_back_aspect_id, #aspect_ids_ { color: inherit; background-color: $background-grey; border-radius: 10px; - .img .avatar { - width: 50px; - height: 50px; - } } .search-mobile { @@ -1168,16 +1078,8 @@ select#aspect_ids_ { } } -.remove_post { - position: absolute; - top: 2px; - right: 5px; - opacity: 0.5; -} - -.remove_comment { - opacity: 0.5; -} +.remove_post { opacity: 0.5; } +.remove_comment{ opacity: 0.5; } .center { text-align: center; @@ -1202,6 +1104,11 @@ select#aspect_ids_ { margin: 0 10px 0 0; padding: 3px; + &, &:focus, &:active{ + box-shadow: none; + border-color: #CCCCCC; + } + &.has_connection { background-color: $light-green; } @@ -1212,4 +1119,14 @@ select#aspect_ids_ { word-wrap: break-word; } +#email_prefs{ + .checkbox{ + margin: 15px 0; + } +} +.small-horizontal-spacer{ margin: 15px 0; } + +.form-control, .form-control:active, .form-control:focus{ box-shadow: none; } +.form-control:active, .form-control:focus{ border-color: #999999; } + .tag_following_action { margin: 5px 0 10px 0; } diff --git a/app/assets/stylesheets/new_styles/_buttons.scss b/app/assets/stylesheets/new_styles/_buttons.scss index 732f98af3..4b8b2dcdb 100644 --- a/app/assets/stylesheets/new_styles/_buttons.scss +++ b/app/assets/stylesheets/new_styles/_buttons.scss @@ -1,26 +1,27 @@ -.btn.creation { +.btn.btn-primary { $button-border-color: #aaa; - @include button-gradient($creation-blue); + background: $dark-blue; color: #fff; - border: 1px solid darken($button-border-color,20%); + border: 1px solid darken($button-border-color, 20%); text-shadow: none; - &:hover { - background: $creation-blue; + &:hover, &:active { + background: lighten($dark-blue, 10%); border: 1px solid darken($button-border-color,35%); } } -.btn-group.open > .btn.creation { +.btn-group.open > .btn.btn-primary { background: $creation-blue; + &:hover, &:active { background: lighten($dark-blue, 10%); } } .btn.green { $button-border-color: #aaa; - @include button-gradient($green); + background: $green; color: $grey; - border: 1px solid darken($button-border-color,20%); + border: 1px solid darken($button-border-color, 20% ); &:hover { - background: $green; + background: $light-green; border: 1px solid darken($button-border-color,35%); } } diff --git a/app/assets/stylesheets/new_styles/_poll.scss b/app/assets/stylesheets/new_styles/_poll.scss index c7eba90ce..2b98d3959 100644 --- a/app/assets/stylesheets/new_styles/_poll.scss +++ b/app/assets/stylesheets/new_styles/_poll.scss @@ -22,10 +22,10 @@ height: 10px !important; .bar { - background-image: none; - background-color: $border-dark-grey; + background: $border-dark-grey none; color: $text-dark-grey; text-align: left; + height: 100%; } } .submit[disabled] { diff --git a/app/assets/stylesheets/new_styles/_settings.scss b/app/assets/stylesheets/new_styles/_settings.scss index 88e181e88..2d8eef75f 100644 --- a/app/assets/stylesheets/new_styles/_settings.scss +++ b/app/assets/stylesheets/new_styles/_settings.scss @@ -4,7 +4,6 @@ } .as-selections #tags { - border: none; box-shadow: none; } @@ -12,11 +11,21 @@ margin-bottom: 0; } -#profile_photo_upload .avatar { - height: auto; - width: auto; - max-width: 200px; - margin-bottom: 10px; +#profile_photo_upload { + text-align: center; + + .avatar { + height: auto; + width: auto; + max-width: 200px; + margin-bottom: 20px; + } } .settings_visibilty { margin-left: 10px; } + +#profile_bio{ + width: 100%; + max-width: 100%; + min-width: 100%; +} diff --git a/app/assets/stylesheets/new_styles/_spinner.scss b/app/assets/stylesheets/new_styles/_spinner.scss index 49086f97e..2876c8eae 100644 --- a/app/assets/stylesheets/new_styles/_spinner.scss +++ b/app/assets/stylesheets/new_styles/_spinner.scss @@ -17,15 +17,11 @@ clear: both; } -.loaded { - animation: fade-in 0.16s linear; -} - .loader { - mask-image: image-url('static-loader.png'); + mask-image: image-url('ajax-loader2.gif'); animation: spin 1s infinite ease-in-out, fade-in 0.2s ease-in; - background-image : image-url("static-loader.png"); + background-image : image-url("ajax-loader2.gif"); display: inline-block; width : 14px; diff --git a/app/assets/stylesheets/new_styles/_statistics.scss b/app/assets/stylesheets/new_styles/_statistics.scss index 30a9a871b..446b19a4d 100644 --- a/app/assets/stylesheets/new_styles/_statistics.scss +++ b/app/assets/stylesheets/new_styles/_statistics.scss @@ -7,8 +7,8 @@ background-color: $green; } - .span-3 { - width: 30%; + .span-3 { + width: 100%; height: 150px; text-align: center; border: 1px solid $border-grey; @@ -25,4 +25,4 @@ background-color: $background-grey; } } -}
\ No newline at end of file +} diff --git a/app/assets/stylesheets/notifications.scss b/app/assets/stylesheets/notifications.scss index d784105c7..0cc1460f6 100644 --- a/app/assets/stylesheets/notifications.scss +++ b/app/assets/stylesheets/notifications.scss @@ -9,7 +9,7 @@ .header { border-bottom: 1px solid $border-grey; .btn-toolbar, h4 { - margin-bottom: 10px; + margin: 11px 0; line-height: 40px; } margin-bottom: 10px; diff --git a/app/assets/stylesheets/profile.scss b/app/assets/stylesheets/profile.scss index 7c868ff55..19d440b66 100644 --- a/app/assets/stylesheets/profile.scss +++ b/app/assets/stylesheets/profile.scss @@ -128,3 +128,11 @@ .stream_container > .pagination { text-align: center; } } + +#email-form{ + padding: 0; + .form-group{ + margin-left: 0; + margin-right: 0; + } +} diff --git a/app/assets/stylesheets/publisher.scss b/app/assets/stylesheets/publisher.scss index 8df3350b3..d6700163c 100644 --- a/app/assets/stylesheets/publisher.scss +++ b/app/assets/stylesheets/publisher.scss @@ -1,6 +1,9 @@ #publisher { z-index: 1; color: $text-grey; + margin: 0; + + & * { font-size: 13px; } &.closed { #button_container, @@ -15,30 +18,27 @@ #publisher_textarea_wrapper { border: 1px solid $border-grey !important; } } + .container-fluid{ padding: 0; } .mentions-autocomplete-list ul { width: 100% !important; } form { margin: 0; #fileInfo { display: none !important; } - #hide_publisher { - margin-top: 10px; - } #publisher_spinner { text-align: center; } .options_and_submit { + padding: 10px 0 ; #publisher_service_icons { - margin-right: 10px; - .btn-link { + .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 { 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; @@ -71,7 +71,7 @@ min-height: 70px; } - .help-block { + .markdownIndications { font-size: 13px; line-height: 30px; padding-left: 10px; @@ -84,11 +84,11 @@ line-height: $line-height !important; } - &.with_attachments .row-fluid#photodropzone_container { + &.with_attachments #photodropzone_container { border-top: 1px dashed $border-grey; } - .row-fluid#poll_creator_container { + #poll_creator_container { display: none; border-top: 1px dashed $border-grey; padding:4px 6px 4px 6px; @@ -104,7 +104,7 @@ } } - &.with_location .row-fluid#location_container { + &.with_location #location_container { height: 30px; border-top: 1px dashed $border-grey; input[type='text'] { @@ -112,7 +112,7 @@ color: $text-grey; } } - &.active .row-fluid#button_container { + &.active #button_container { border-top: 1px solid $border-grey; } @@ -232,8 +232,10 @@ .aspect_dropdown { .radio { - min-height: 0px; - padding-left: 0px; + min-height: 0; + padding-left: 0; + margin-top: 0; + margin-bottom: 0; } } } diff --git a/app/assets/stylesheets/sidebar.scss b/app/assets/stylesheets/sidebar.scss index 28d012ceb..6098e39b6 100644 --- a/app/assets/stylesheets/sidebar.scss +++ b/app/assets/stylesheets/sidebar.scss @@ -56,6 +56,7 @@ display: inline-block; } } + .stream-faces img{ display: inline-flex; } } } } diff --git a/app/assets/stylesheets/single-post-view.scss b/app/assets/stylesheets/single-post-view.scss index 7ddcb9576..40a465267 100644 --- a/app/assets/stylesheets/single-post-view.scss +++ b/app/assets/stylesheets/single-post-view.scss @@ -24,7 +24,7 @@ padding-left: 10px; } } - .row-fluid.reshare { + .row.reshare { border-top: 1px solid lighten($border-grey,5%); padding-top: 10px; margin-top: 10px; @@ -150,5 +150,7 @@ #reshares, #likes, #comments-meta { margin-left: 7px; margin-bottom: 8px; + img{ display: inline; } } + } diff --git a/app/assets/stylesheets/stream_element.scss b/app/assets/stylesheets/stream_element.scss index 0041de0da..e18880c54 100644 --- a/app/assets/stylesheets/stream_element.scss +++ b/app/assets/stylesheets/stream_element.scss @@ -27,7 +27,6 @@ &:hover > .bd > .control-icons { background: #fff; } } .thumbnail { - height: 200px; padding: 10px; margin: 0 5px 10px; text-align: center; diff --git a/app/assets/stylesheets/tag.scss b/app/assets/stylesheets/tag.scss index aa49a815d..fc4098d57 100644 --- a/app/assets/stylesheets/tag.scss +++ b/app/assets/stylesheets/tag.scss @@ -24,7 +24,7 @@ h1.tag { } #tags_show { - .span3 { + .col-md-3 { h4 { margin: 25px 0 15px; } .side_stream #people_stream { .name { display: block; } @@ -35,14 +35,14 @@ h1.tag { } } } - .span7 { + .col-md-7 { .tag-following-action { max-width: 100%; input[type="submit"] { overflow: hidden; text-overflow: ellipsis; max-width: 100%; - } + } } } } diff --git a/app/assets/stylesheets/vendor/autoSuggest.css b/app/assets/stylesheets/vendor/autoSuggest.css index 760365e3c..cf87b15e1 100644 --- a/app/assets/stylesheets/vendor/autoSuggest.css +++ b/app/assets/stylesheets/vendor/autoSuggest.css @@ -1,212 +1,203 @@ /* AutoSuggest CSS - Version 1.2 */ ul.as-selections { - list-style-type: none; - border: 1px solid #ccc; - margin: 0; - overflow: auto; - background-color: #fff; - border-radius: 3px; - /* 1% padding (all sides) + 98% width = 100% */ - padding: 1%; - width: 98%; + list-style-type: none; + margin: 0; + overflow: auto; + background-color: #fff; + border-radius: 3px; + width: 100%; + padding: 0; } ul.as-selections.loading { - background: asset_path("ajax-loader.gif") right center no-repeat; + background: asset_path("ajax-loader2.gif") right center no-repeat; } ul.as-selections li { - float: left; - margin: 1px 4px 1px 0; - cursor: pointer; + float: left; + margin: 1px 4px 1px 0; + cursor: pointer; } ul.as-selections li.as-selection-item { - color: #2b3840; - font-size: 13px; - text-shadow: 0 1px 1px #fff; - background-color: #ddeefe; - background-image: gradient(linear, 0% 0%, 0% 100%, from(#ddeefe), to(#bfe0f1)); - border: 1px solid #acc3ec; - padding: 0; + color: #2b3840; + font-size: 13px; + text-shadow: 0 1px 1px #fff; + background-color: #ddeefe; + background-image: gradient(linear, 0% 0%, 0% 100%, from(#ddeefe), to(#bfe0f1)); + border: 1px solid #acc3ec; + padding: 0; padding-top: 6px; padding-bottom: 6px; padding-left: 6px; - border-radius: 5px; - box-shadow: 0 1px 1px #e4edf2; + border-radius: 5px; + box-shadow: 0 1px 1px #e4edf2; line-height: 10px; - margin-top: -1px; margin-bottom: 10px; } ul.as-selections li.as-selection-item:last-child { - margin-left: 30px; + margin-left: 30px; } ul.as-selections li.as-selection-item a.as-close { - float: right; - margin: 0px 3px 0 0px; - padding: 0 3px; - cursor: pointer; - color: #5491be; - font-family: "Helvetica", helvetica, arial, sans-serif; - font-size: 14px; - font-weight: bold; - text-shadow: 0 1px 1px #fff; - transition: color .1s ease-in; + float: right; + margin: 0px 3px 0 0px; + padding: 0 3px; + cursor: pointer; + color: #5491be; + font-family: "Helvetica", helvetica, arial, sans-serif; + font-size: 14px; + font-weight: bold; + text-shadow: 0 1px 1px #fff; + transition: color .1s ease-in; } ul.as-selections li.as-selection-item.blur { - color: #666666; - background-color: #f4f4f4; - background-image: gradient(linear, 0% 0%, 0% 100%, from(#f4f4f4), to(#d5d5d5)); - border-color: #bbb; - border-top-color: #ccc; - box-shadow: 0 1px 1px #e9e9e9; + color: #666666; + background-color: #f4f4f4; + background-image: gradient(linear, 0% 0%, 0% 100%, from(#f4f4f4), to(#d5d5d5)); + border-color: #bbb; + border-top-color: #ccc; + box-shadow: 0 1px 1px #e9e9e9; } ul.as-selections li.as-selection-item.blur a.as-close { - color: #999; + color: #999; } ul.as-selections li:hover.as-selection-item { - color: #2b3840; - background-color: #bbd4f1; - background-image: gradient(linear, 0% 0%, 0% 100%, from(#bbd4f1), to(#a3c2e5)); - border-color: #6da0e0; - border-top-color: #8bb7ed; + color: #2b3840; + background-color: #bbd4f1; + background-image: gradient(linear, 0% 0%, 0% 100%, from(#bbd4f1), to(#a3c2e5)); + border-color: #6da0e0; + border-top-color: #8bb7ed; } ul.as-selections li:hover.as-selection-item a.as-close { - color: #4d70b0; + color: #4d70b0; } ul.as-selections li.as-selection-item.selected { - border-color: #1f30e4; + border-color: #1f30e4; } ul.as-selections li.as-selection-item a:hover.as-close { - color: #1b3c65; + color: #1b3c65; } ul.as-selections li.as-selection-item a:active.as-close { - color: #4d70b0; + color: #4d70b0; } ul.as-selections li.as-original { - margin-left: 0; + width: 100%; + margin: 0; list-style: none; + padding: 0; } ul.as-selections li.as-original input { - border: none; - outline: none; - font-size: 13px; - width: auto; - padding: 0; - margin: 0; - height: 20px; - line-height: 20px; - width: 300px; -} - -ul.as-selections li.as-original.as-original{ - width: auto; + outline: none; + font-size: 13px; + margin: 0; + line-height: 20px; + width: 100%; } ul.as-list { - position: absolute; - list-style-type: none; + position: absolute; + list-style-type: none; list-style: none; - margin: 2px 0 0 0; - padding: 0; - font-size: 13px; - color: #000; - background-color: #fff; - background-color: rgba(255,255,255,0.95); - z-index: 2; - box-shadow: 0 2px 12px #222; - border-radius: 5px; + margin: 2px 0 0 0; + padding: 0; + font-size: 13px; + color: #000; + background-color: #fff; + background-color: rgba(255,255,255,0.95); + z-index: 2; + box-shadow: 0 2px 12px #222; + border-radius: 5px; } li.as-result-item, li.as-message { - margin: 0 0 0 0; - padding: 5px; - background-color: transparent; - border: 1px solid #fff; - border-bottom: 1px solid #ddd; - cursor: pointer; - border-radius: 3px; + margin: 0 0 0 0; + padding: 5px; + background-color: transparent; + border: 1px solid #fff; + border-bottom: 1px solid #ddd; + cursor: pointer; + border-radius: 3px; } li:first-child.as-result-item { - margin: 0; + margin: 0; } li.as-message { - margin: 0; - cursor: default; + margin: 0; + cursor: default; } li.as-result-item.active { - background-color: #3668d9; - background-image: gradient(linear, 0% 0%, 0% 64%, from(rgb(110, 129, 245)), to(rgb(62, 82, 242))); - border-color: #3342e8; - color: #fff; - text-shadow: 0 1px 2px #122042; + background-color: #3668d9; + background-image: gradient(linear, 0% 0%, 0% 64%, from(rgb(110, 129, 245)), to(rgb(62, 82, 242))); + border-color: #3342e8; + color: #fff; + text-shadow: 0 1px 2px #122042; } li.as-result-item em { - font-style: normal; - background: #444; - padding: 0 2px; - color: #fff; + font-style: normal; + background: #444; + padding: 0 2px; + color: #fff; } li.as-result-item.active em { - background: #253f7a; - color: #fff; + background: #253f7a; + color: #fff; } /* Webkit Hacks */ @media screen and (-webkit-min-device-pixel-ratio:0) { - ul.as-selections li.as-selection-item { - padding-top: 6px; - padding-bottom: 6px; - } - ul.as-selections li.as-selection-item a.as-close { - margin-top: -1px; - } - ul.as-selections li.as-original input { - height: 20px; - } + ul.as-selections li.as-selection-item { + padding-top: 6px; + padding-bottom: 6px; + } + ul.as-selections li.as-selection-item a.as-close { + margin-top: -1px; + } + ul.as-selections li.as-original input { + height: 20px; + } } /* Opera Hacks */ @media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0) { - ul.as-list { - border: 1px solid #ccc; - } - ul.as-selections li.as-selection-item a.as-close { - margin-left: 4px; - margin-top: 0; - } + ul.as-list { + border: 1px solid #ccc; + } + ul.as-selections li.as-selection-item a.as-close { + margin-left: 4px; + margin-top: 0; + } } /* IE Hacks */ ul.as-list { - border: 1px solid #ccc\9; + border: 1px solid #ccc\9; } ul.as-selections li.as-selection-item a.as-close { - margin-left: 4px\9; - margin-top: 0\9; + margin-left: 4px\9; + margin-top: 0\9; } /* Firefox 3.0 Hacks */ ul.as-list, x:-moz-any-link, x:default { - border: 1px solid #ccc; + border: 1px solid #ccc; } BODY:first-of-type ul.as-list, x:-moz-any-link, x:default { /* Target FF 3.5+ */ - border: none; + border: none; } diff --git a/app/assets/templates/aspect_create_modal_tpl.jst.hbs b/app/assets/templates/aspect_create_modal_tpl.jst.hbs index bcb326553..b91216e0d 100644 --- a/app/assets/templates/aspect_create_modal_tpl.jst.hbs +++ b/app/assets/templates/aspect_create_modal_tpl.jst.hbs @@ -1,40 +1,51 @@ -<div class="modal hide fade" id="newAspectModal" tabindex="-1" role="dialog" aria-labelledby="newAspectModalLabel" aria-hidden="true"> +<div class="modal fade" id="newAspectModal" tabindex="-1" role="dialog" aria-labelledby="newAspectModalLabel" + aria-hidden="true" xmlns="http://www.w3.org/1999/html"> - <div class="modal-header"> - <button class="close" type="button" data-dismiss="modal" aria-hidden="true">×</button> - <h3 id="newAspectModalLabel">{{ t "aspects.create.add_a_new_aspect" }}</h3> - </div> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button class="close" type="button" data-dismiss="modal" aria-hidden="true">×</button> + <h3 id="newAspectModalLabel">{{ t "aspects.create.add_a_new_aspect" }}</h3> + </div> - <div class="modal-body"> - <form> - <fieldset> - {{#if addPersonId}} - <input id="aspect_person_id" type="hidden" value="{{ personId }}"> - {{/if}} + <div class="modal-body"> + <form> + <fieldset> + {{#if addPersonId}} + <input id="aspect_person_id" type="hidden" value="{{ personId }}"> + {{/if}} - <div class="control-group"> - <label for="aspect_name">{{ t "aspects.name" }}</label> - <input id="aspect_name" class="input-block-level" maxlength=20 type="text"> - </div> + <form class="form-horizontal"> + <div class="form-group"> + <label class="col-sm-2 control-label" for="aspect_name">{{ t "aspects.name" }}</label> + <div class="col-sm-10"> + <input id="aspect_name" class="input-block-level form-control" maxlength=20 type="text"/> + </div> + </div> - <div class="control-group"> - <label for="aspect_contacts_visible" class="checkbox inline"> - <input id="aspect_contacts_visible" type="checkbox"> - {{ t "aspects.make_aspect_list_visible" }} - </label> - </div> + <div class="form-group"> + <div class="col-sm-offset-2 col-sm-10"> + <div class="checkbox"> + <label for="aspect_contacts_visible" class="checkbox inline"> + <input id="aspect_contacts_visible" type="checkbox"> {{ t "aspects.make_aspect_list_visible" }} + </label> + </div> + </div> + </div> + </form> - </fieldset> - </form> - </div> + </fieldset> + </form> + </div> - <div class="modal-footer"> - <div class="btn" data-dismiss="modal" aria-hidden="true"> - {{ t "cancel" }} - </div> - <div class="btn creation"> - {{ t "create" }} + <div class="modal-footer"> + <div class="btn btn-default" data-dismiss="modal" aria-hidden="true"> + {{ t "cancel" }} + </div> + <div class="btn btn-primary"> + {{ t "create" }} + </div> + </div> </div> </div> - </div> diff --git a/app/assets/templates/comment-stream_tpl.jst.hbs b/app/assets/templates/comment-stream_tpl.jst.hbs index 1ba92fe98..372f344fa 100644 --- a/app/assets/templates/comment-stream_tpl.jst.hbs +++ b/app/assets/templates/comment-stream_tpl.jst.hbs @@ -20,9 +20,10 @@ <div class="bd"> <form accept-charset="UTF-8" action="/posts/{{id}}/comments" class="new_comment" id="new_comment_on_{{id}}" method="post"> - <textarea class="comment_box" id="comment_text_on_{{id}}" name="text" rows="2" required placeholder="{{t "stream.comment"}}" /> + <textarea class="comment_box form-control" id="comment_text_on_{{id}}" name="text" rows="2" required placeholder="{{t + "stream.comment"}}" /> <div class="submit_button"> - <input class="btn creation" id="comment_submit_{{id}}" name="commit" type="submit" value="{{t "stream.comment"}}" /> + <input class="btn btn-primary" id="comment_submit_{{id}}" name="commit" type="submit" value="{{t "stream.comment"}}" /> </div> </form> </div> diff --git a/app/assets/templates/contact_tpl.jst.hbs b/app/assets/templates/contact_tpl.jst.hbs index a89542f4e..9dd218f12 100644 --- a/app/assets/templates/contact_tpl.jst.hbs +++ b/app/assets/templates/contact_tpl.jst.hbs @@ -1,4 +1,4 @@ -<div class="stream_element media contact {{in_aspect}}" id={{person_id}}> +<div class="container-fluid stream_element media contact {{in_aspect}}" id={{person_id}}> <div class="pull-right"> {{{aspectMembershipIndicator this in_aspect}}} </div> diff --git a/app/assets/templates/header_tpl.jst.hbs b/app/assets/templates/header_tpl.jst.hbs index 92ed903fc..2da389ade 100644 --- a/app/assets/templates/header_tpl.jst.hbs +++ b/app/assets/templates/header_tpl.jst.hbs @@ -56,7 +56,7 @@ <div class="notifications"> <div class="ajax_loader"> - <img alt="Ajax-loader" src="{{imageUrl "ajax-loader.gif"}}"> + <img alt="Ajax-loader" src="{{imageUrl "ajax-loader2.gif"}}"> </div> </div> <div class="view_all"> diff --git a/app/assets/templates/help_tpl.jst.hbs b/app/assets/templates/help_tpl.jst.hbs index 45bb0ed7e..9a1579b7e 100644 --- a/app/assets/templates/help_tpl.jst.hbs +++ b/app/assets/templates/help_tpl.jst.hbs @@ -4,8 +4,8 @@ <h2 class="help_header">{{ title_header }}</h2> </div> - <div class="row-fluid"> - <div class="span3"> + <div class="row"> + <div class="col-md-3"> <div id='faq_nav'> <ul> <li> @@ -78,7 +78,7 @@ </div> </div> - <div class="span9 last" id=faq> + <div class="col-md-9 last" id=faq> </div> </div> </div> diff --git a/app/assets/templates/photo_tpl.jst.hbs b/app/assets/templates/photo_tpl.jst.hbs index 4f8e8b1bf..19ceed16b 100644 --- a/app/assets/templates/photo_tpl.jst.hbs +++ b/app/assets/templates/photo_tpl.jst.hbs @@ -1,4 +1,4 @@ -<div class="media span4"> +<div class="media col-md-4"> <div class="bd"> {{#if loggedIn}} <div class="control-icons"> @@ -20,7 +20,7 @@ </div> {{/if}} - <div class="thumbnail"> + <div class="thumbnail img-thumbnail"> <a href="#" class="photo-link"> <img src="{{sizes.large}}" class="photo big_photo" data-small-photo="{{sizes.small}}" data-full-photo="{{sizes.large}}" rel="lightbox"> </a> diff --git a/app/assets/templates/poll_creator_tpl.jst.hbs b/app/assets/templates/poll_creator_tpl.jst.hbs index ea5ce6207..4210afb1e 100644 --- a/app/assets/templates/poll_creator_tpl.jst.hbs +++ b/app/assets/templates/poll_creator_tpl.jst.hbs @@ -1,20 +1,20 @@ -<div class="poll-question control-group"> - <input class="input-block-level" placeholder="{{t 'publisher.question' }}" type="text" name="poll_question"> +<div class="poll-question form-group"> + <input class="input-block-level form-control" placeholder="{{t 'publisher.question' }}" type="text" name="poll_question"> </div> -<div class="poll-answers"> - <div class="poll-answer row-fluid"> - <div class="span11"> - <input type="text" class="input-block-level" name="poll_answers[]" placeholder="{{t 'publisher.option' }}"> +<div class="poll-answers form-group clearfix row"> + <div class="poll-answer form-group clearfix"> + <div class="col-md-11"> + <input type="text" class="input-block-level form-control" name="poll_answers[]" placeholder="{{t 'publisher.option' }}"> </div> - <div class="span1"> + <div class="col-md-1"> <i class="remove-answer entypo cross"></i> </div> </div> - <div class="poll-answer row-fluid"> - <div class="span11"> - <input type="text" class="input-block-level" name="poll_answers[]" placeholder="{{t 'publisher.option' }}"> + <div class="poll-answer form-group clearfix"> + <div class="col-md-11"> + <input type="text" class="input-block-level form-control" name="poll_answers[]" placeholder="{{t 'publisher.option' }}"> </div> - <div class="span1"> + <div class="col-md-1"> <i class="remove-answer entypo cross"></i> </div> </div> diff --git a/app/assets/templates/poll_tpl.jst.hbs b/app/assets/templates/poll_tpl.jst.hbs index 4b73b1a86..1e3bfb01e 100644 --- a/app/assets/templates/poll_tpl.jst.hbs +++ b/app/assets/templates/poll_tpl.jst.hbs @@ -1,29 +1,31 @@ {{#if poll}} <div class="poll_form"> - <div class="row-fluid poll_head"> + <div class="poll_head"> <strong>{{poll.question}}</strong> <div class="poll_statistic pull-right"> {{t "poll.count" count=poll.participation_count}} </div> </div> - <div class="row-fluid poll_content"> + <div class="poll_content"> {{#if show_form}} <form action="/posts/{{poll.post_id}}/poll_participations" method="POST"> {{#poll.poll_answers}} - <label class="radio result-row"> - <input type="radio" name="vote" value="{{id}}"/> - {{answer}} - <span class="percentage pull-right" style="display: none;"></span> - <div class="poll_progress_bar_wrapper progress" style="display: none"> - <div class="poll_progress_bar bar" data-answerid="{{id}}"> - </div> + <div class="radio result-row"> + <label> + <input type="radio" name="vote" value="{{id}}"/> + {{answer}} + <span class="percentage form-control-feedback" style="display: none;"></span> + <div class="poll_progress_bar_wrapper progress" style="display: none"> + <div class="poll_progress_bar bar" data-answerid="{{id}}" style="height: 100%"></div> + </div> + </label> </div> - </label> {{/poll.poll_answers}} <div class="toggle_result_wrapper"> <a class="toggle_result" href="#">{{t "poll.show_result"}}</a> </div> - <input type="submit" class="button submit pull-rigth btn" style="float:right;" value="{{t "poll.vote"}}"/> + <input type="submit" class="submit pull-right btn btn-default" value="{{t "poll.vote"}}"/> + <div class="clearfix"></div> </form> {{else}} {{#poll.poll_answers}} diff --git a/app/assets/templates/profile_header_tpl.jst.hbs b/app/assets/templates/profile_header_tpl.jst.hbs index 45c06f9eb..31af260c9 100644 --- a/app/assets/templates/profile_header_tpl.jst.hbs +++ b/app/assets/templates/profile_header_tpl.jst.hbs @@ -2,7 +2,7 @@ <div class="pull-right"> {{#if is_own_profile}} {{!-- can't block myself, so don't check it here --}} - <a href="{{urlTo 'editProfile'}}" id="edit_profile" class="btn btn-primary creation">{{t 'people.edit_my_profile'}}</a> + <a href="{{urlTo 'editProfile'}}" id="edit_profile" class="btn btn-primary">{{t 'people.edit_my_profile'}}</a> {{else}} {{#if is_blocked}} <a href="#" id="unblock_user_button" class="btn btn-danger">{{t 'people.stop_ignoring'}}</a> {{else}} @@ -46,14 +46,14 @@ {{#if is_receiving}} {{!-- create status message with mention --}} <span class="profile_button"> - <span id="mention_button" class="profile-header-icon" title="{{t 'people.mention'}}" data-placement="bottom" data-toggle="modal" data-target="#mentionModal">@</span> + <span id="mention_button" class="profile-header-icon" title="{{t 'people.mention'}}" data-placement="bottom" data-toggle="modal">@</span> </span> {{/if}} {{#if is_mutual}} {{!-- create private conversation with person --}} <span class="profile_button"> - <i id="message_button" class="entypo profile-header-icon mail" title="{{t 'people.message'}}" data-placement="bottom" data-toggle="modal" data-target="#conversationModal"></i> + <i id="message_button" class="entypo profile-header-icon mail" title="{{t 'people.message'}}" data-placement="bottom" data-toggle="modal"></i> </span> {{/if}} diff --git a/app/assets/templates/single-post-viewer/single-post-content_tpl.jst.hbs b/app/assets/templates/single-post-viewer/single-post-content_tpl.jst.hbs index 4bffd46ff..e933a2bc7 100644 --- a/app/assets/templates/single-post-viewer/single-post-content_tpl.jst.hbs +++ b/app/assets/templates/single-post-viewer/single-post-content_tpl.jst.hbs @@ -1,6 +1,7 @@ -<div id='head' class='row-fluid'> - <div class='row-fluid'> - <div id='post-info' class='span8'> +<div id='head' class='row'> + <div class='col-md-12 + '> + <div id='post-info' class='col-md-8'> <div class="img pull-left"> {{#if root}} {{#linkToAuthor root.author}} @@ -64,12 +65,12 @@ </div> </div> {{#unless root}} - <div id='single-post-actions' class='span4' /> + <div id='single-post-actions' class='col-md-4' /> {{/unless}} </div> {{#if root}} - <div class='row-fluid reshare'> - <div class='span8' id='reshare-info'> + <div class='row reshare'> + <div class='col-md-8' id='reshare-info'> <i class='entypo retweet small pull-left'></i> <div class="img pull-left"> {{#linkToAuthor author}} @@ -90,11 +91,11 @@ <span id='single-post-moderation' /> </div> </div> - <div id='single-post-actions' class='span4' /> + <div id='single-post-actions' class='col-md-4' /> </div> {{/if}} </div> -<div id='body' class='row-fluid'> - <div id='real-post-content' class='post-content span12'> +<div id='body' class='row'> + <div id='real-post-content' class='post-content col-md-12'> </div> </div> diff --git a/app/assets/templates/single-post-viewer_tpl.jst.hbs b/app/assets/templates/single-post-viewer_tpl.jst.hbs index 322d96367..0d4ea63de 100644 --- a/app/assets/templates/single-post-viewer_tpl.jst.hbs +++ b/app/assets/templates/single-post-viewer_tpl.jst.hbs @@ -1,8 +1,8 @@ <div id='single-post-container' class='container-fluid'> - <div class='row-fluid'> - <div id='single-post-content' class='span6'> + <div class='row'> + <div id='single-post-content' class='col-md-6'> </div> - <div id='single-post-interactions' class='span6'> + <div id='single-post-interactions' class='col-md-6'> </div> </div> </div> diff --git a/app/assets/templates/stream-element_tpl.jst.hbs b/app/assets/templates/stream-element_tpl.jst.hbs index 6029e056b..7ef41bcc6 100644 --- a/app/assets/templates/stream-element_tpl.jst.hbs +++ b/app/assets/templates/stream-element_tpl.jst.hbs @@ -1,5 +1,4 @@ <div class="media"> - {{#with author}} <a href="/people/{{guid}}" class="img {{{hovercardable this}}}"> {{{personImage this}}} diff --git a/app/assets/templates/tag_following_list_tpl.jst.hbs b/app/assets/templates/tag_following_list_tpl.jst.hbs index d4ba359fb..3d8edbcf4 100644 --- a/app/assets/templates/tag_following_list_tpl.jst.hbs +++ b/app/assets/templates/tag_following_list_tpl.jst.hbs @@ -1,5 +1,5 @@ <li> <form id="new_tag_following" accept-charset="UTF-8" action="/tag_followings" method="post"> - <input class="tag_input" type="text" name="name" placeholder="{{t "stream.followed_tag.add_a_tag"}}" /> + <input class="tag_input form-control" type="text" name="name" placeholder="{{t "stream.followed_tag.add_a_tag"}}" /> </form> </li> diff --git a/app/helpers/invitation_codes_helper.rb b/app/helpers/invitation_codes_helper.rb index a0f614f42..326e67a1c 100644 --- a/app/helpers/invitation_codes_helper.rb +++ b/app/helpers/invitation_codes_helper.rb @@ -6,13 +6,13 @@ module InvitationCodesHelper end def invite_link(invite_code) - text_field_tag :invite_code, invite_code_url(invite_code), :readonly => true + text_field_tag :invite_code, invite_code_url(invite_code), :class => 'form-control', :readonly => true end def invited_by_message inviter = current_user.invited_by if inviter.present? - contact = current_user.contact_for(inviter.person) || Contact.new + contact = current_user.contact_for(inviter.person) || Contact.new render :partial => 'people/add_contact', :locals => {:inviter => inviter.person, :contact => contact} end end diff --git a/app/views/admins/_user_entry.haml b/app/views/admins/_user_entry.haml index 5fa76beaa..40ef42c09 100644 --- a/app/views/admins/_user_entry.haml +++ b/app/views/admins/_user_entry.haml @@ -7,7 +7,7 @@ %div.media-body.row %div.pull-right - %span.label + %span.label.label-default = t('.id') = user.id %span.label.label-info @@ -18,20 +18,20 @@ = user.person.name if user.person %div.pull-right - %ul.unstyled.text-right.actions - %li= link_to t('admins.user_search.view_profile'), person_path(user.person), class: 'btn btn-mini' - %li= link_to t('admins.user_search.add_invites'), add_invites_path(user.invitation_code), class: 'btn btn-info btn-mini' + .unstyled.text-right.actions + = link_to t('admins.user_search.view_profile'), person_path(user.person), class: 'btn btn-default btn-block btn-xs' + = link_to t('admins.user_search.add_invites'), add_invites_path(user.invitation_code), class: 'btn btn-info btn-block btn-xs' - unless user.person.closed_account - %li= link_to t('admins.user_search.close_account'), admin_close_account_path(user), method: :post, data: { confirm: t('admins.user_search.are_you_sure') }, class: 'btn btn-danger btn-mini' + = link_to t('admins.user_search.close_account'), admin_close_account_path(user), method: :post, data: { confirm: t('admins.user_search.are_you_sure') }, class: 'btn btn-danger btn-block btn-xs' - unless user.closed_account? - unless user.access_locked? - %li= link_to t('admins.user_search.lock_account'), admin_lock_account_path(user), method: :post, data: { confirm: t('admins.user_search.are_you_sure_lock_account') }, class: 'btn btn-danger btn-mini' + = link_to t('admins.user_search.lock_account'), admin_lock_account_path(user), method: :post, data: { confirm: t('admins.user_search.are_you_sure_lock_account') }, class: 'btn btn-danger btn-block btn-xs' - else - %li= link_to t('admins.user_search.unlock_account'), admin_unlock_account_path(user), method: :post, data: { confirm: t('admins.user_search.are_you_sure_unlock_account') }, class: 'btn btn-danger btn-mini' - + = link_to t('admins.user_search.unlock_account'), admin_unlock_account_path(user), method: :post, data: { confirm: t('admins.user_search.are_you_sure_unlock_account') }, class: 'btn btn-danger btn-block btn-xs' + %div.row - %div.span5 + %div.col-md-5 %dl.dl-horizontal %dt= t('username') %dd= user.username @@ -47,15 +47,15 @@ %dt= t('.account_closed') %dd - if user.person.closed_account - %span.badge.badge-warning= t('.yes') + %span.label.label-warning= t('.yes') - else - %span.badge.badge-success= t('.no') + %span.label.label-success= t('.no') %dt= t('.nsfw') %dd - if user.person.profile.nsfw - %span.badge.badge-warning= t('.yes') + %span.label.label-warning= t('.yes') - else - %span.badge.badge-success= t('.no') + %span.label.label-success= t('.no') %h4= t('layouts.header.profile') diff --git a/app/views/admins/correlations.haml b/app/views/admins/correlations.haml index 703f96af7..b83fd6759 100644 --- a/app/views/admins/correlations.haml +++ b/app/views/admins/correlations.haml @@ -3,7 +3,7 @@ = render :partial => 'admins/admin_bar' %div.row - %div.span12 + %div.col-md-12 %h1 = t('.correlations_count') %ul diff --git a/app/views/admins/stats.html.haml b/app/views/admins/stats.html.haml index 470ce97b2..f14123d57 100644 --- a/app/views/admins/stats.html.haml +++ b/app/views/admins/stats.html.haml @@ -34,7 +34,7 @@ - if name == :users - name = t('.users', :count => model[:yesterday]) - .span3 + .col-md-3 %h2{:style => 'font-weight:bold;'} = name.to_s %h4 @@ -43,12 +43,12 @@ = "(#{model[:change]}%)" %div.row - %div.span12 + %div.col-md-12 %p.alert.alert-info.text-center != t('.current_segment', :post_yest => @posts[:yesterday]/@user_count.to_f, :post_day => @posts[:day_before]/@user_count.to_f) %div.row - %div.span12 + %div.col-md-12 %h3= t('.50_most') %ul - @popular_tags.each do |name,count| diff --git a/app/views/admins/user_search.html.haml b/app/views/admins/user_search.html.haml index 1db5ea218..741eba693 100644 --- a/app/views/admins/user_search.html.haml +++ b/app/views/admins/user_search.html.haml @@ -3,47 +3,56 @@ = render :partial => 'admins/admin_bar' %div.row - %div.user_search.span9 + %div.user_search.col-md-8 %h3= t('admins.admin_bar.user_search') = form_for @search, url: {action: 'user_search'}, html: {method: :get, class: 'form-horizontal'} do |f| - %div.control-group - = f.label :username, t('username'), class: 'control-label' - %div.controls - = f.text_field :username - - %div.control-group - = f.label :email, t('email'), class: 'control-label' - %div.controls - = f.text_field :email - - %div.control-group - = f.label :guid, t('admins.user_entry.guid'), class: 'control-label' - %div.controls - = f.text_field :guid - - %div.control-group - %div.controls + %div.form-group + = f.label :username, t('username'), class: 'col-sm-2 control-label' + %div.col-sm-10 + = f.text_field :username, class: "form-control" + + %div.form-group + = f.label :email, t('email'), class: 'col-sm-2 control-label' + %div.col-sm-10 + = f.text_field :email, class: "form-control" + + %div.form-group + = f.label :guid, t('admins.user_entry.guid'), class: 'col-sm-2 control-label' + %div.col-sm-10 + = f.text_field :guid, class: "form-control" + + %div.form-group + %div.col-sm-offset-2.col-sm-10 = f.label :under13 do = f.check_box :under13 = t(".under_13") - = submit_tag t("admins.stats.go"), class: "btn btn-primary" + %div.form-group + %div.clearfix.col-sm-12 + = submit_tag t("admins.stats.go"), class: "btn btn-primary pull-right" - %div.more_invites.span3 + %div.more_invites.col-md-4 %h3= t("shared.invitations.invites") - - != t(".you_currently", count: current_user.invitation_code.count, link: link_to(t(".add_invites"), add_invites_path(current_user.invitation_code))) - - = form_tag "admin_inviter", method: :get do - = t(".email_to") - = text_field_tag "identifier" - = submit_tag t("services.remote_friend.invite"), class: "btn btn-default" + #add-invites-section.clearfix + != t(".you_currently", count: current_user.invitation_code.count, + link: link_to(t(".add_invites"), add_invites_path(current_user.invitation_code), + class: "btn btn-link pull-right")) + + = form_tag "admin_inviter", method: :get, class: "form-horizontal" do + .form-group + %label.col-sm-4.control-label + = t(".email_to") + .col-sm-8 + = text_field_tag "identifier", nil, class: "form-control" + .form-group + .clearfix.col-md-12 + = submit_tag t("services.remote_friend.invite"), class: "btn btn-default pull-right" %div.row - %div.span12 + %div.col-md-12 %div.alert.alert-info.text-center= t('.users', :count => @users.count) %div.row - %div.users.span12 + %div.users.col-md-12 %ul.media-list - @users.each do |user| = render partial: 'user_entry', locals: { user: user } diff --git a/app/views/aspect_memberships/_aspect_membership_dropdown.haml b/app/views/aspect_memberships/_aspect_membership_dropdown.haml index ba4ee2fd1..fdb23c4c5 100644 --- a/app/views/aspect_memberships/_aspect_membership_dropdown.haml +++ b/app/views/aspect_memberships/_aspect_membership_dropdown.haml @@ -14,18 +14,17 @@ %li.aspect_selector{ :class => ('selected' if aspect_membership_ids[aspect.id].present?), 'data-aspect_id' => aspect.id, 'data-membership_id' => aspect_membership_ids[aspect.id], :tabindex => '0' } %a %span.status_indicator - %i.icon-ok + %i.glyphicon.glyphicon-ok %i.icon-refresh %span.text = aspect.name - - if (dropdown_may_create_new_aspect && defined?(person) && person) + - if dropdown_may_create_new_aspect && defined?(person) && person %li.divider - %li.newItem - .add_aspect - %a{ href: "#" } - = t("contacts.index.add_a_new_aspect") + %li.newItem.add_aspect + %a{ href: "#", data: { toggle: "modal", target: "#newAspectModal" }} + = t("contacts.index.add_a_new_aspect") - - if (dropdown_may_create_new_aspect && defined?(person) && person) + - if dropdown_may_create_new_aspect && defined?(person) && person .newAspectContainer -# JS diff --git a/app/views/aspect_memberships/_aspect_membership_dropdown.mobile.haml b/app/views/aspect_memberships/_aspect_membership_dropdown.mobile.haml index b7a8ffc1e..cd595ab7e 100644 --- a/app/views/aspect_memberships/_aspect_membership_dropdown.mobile.haml +++ b/app/views/aspect_memberships/_aspect_membership_dropdown.mobile.haml @@ -1,13 +1,13 @@ %div - %select{:name => 'user_aspects', :class => 'user_aspects', 'data-person-id' => @person.id} - %option{:value => 'list_cover', :class => 'list_cover', :disabled => 'true', :selected => 'true'} + %select{name: 'user_aspects', class: 'user_aspects form-control', 'data-person-id' => @person.id} + %option{value: 'list_cover', class: 'list_cover', disabled: 'true', selected: 'true'} = t("add_contact") - contact = current_user.contact_for(@person) - current_user.aspects.each do |aspect| - if contact.try(:in_aspect?, aspect) - - membership_id = contact.aspect_memberships.where(:aspect_id => aspect.id).limit(1).pluck(:id).first - %option{:value => aspect.id, 'data-name' => aspect.name, 'data-membership_id' => membership_id, :class => 'selected'} + - membership_id = contact.aspect_memberships.where(aspect_id: aspect.id).limit(1).pluck(:id).first + %option{value: aspect.id, 'data-name' => aspect.name, 'data-membership_id' => membership_id, class: 'selected'} = "✓ #{t('shared.aspect_dropdown.mobile_row_checked', name: aspect.name)}" - else - %option{:value => aspect.id, 'data-name' => aspect.name} + %option{value: aspect.id, 'data-name' => aspect.name} = "– #{t('shared.aspect_dropdown.mobile_row_unchecked', name: aspect.name)}" diff --git a/app/views/comments/_comment.mobile.haml b/app/views/comments/_comment.mobile.haml index 24b5fc98b..47f6fe7e0 100644 --- a/app/views/comments/_comment.mobile.haml +++ b/app/views/comments/_comment.mobile.haml @@ -2,18 +2,22 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -%li.comment{:data=>{:guid=>comment.id}, :class => ("hidden" if(defined? hidden))} +%li.comment{data:{guid:comment.id}, class: ("hidden" if(defined? hidden))} .content - .remove_comment - .right - - if user_signed_in? && comment.author == current_user.person - = link_to(image_tag("mobile/deletelabel.png"), comment_path(comment), method: :delete, data: { confirm: "#{t('are_you_sure')}" }, class: "remove") - .from - = person_image_link(comment.author) - = person_link(comment.author) - .info - %span - = timeago(comment.created_at ? comment.created_at : Time.now) + .col-xs-1 + = person_image_link(comment.author, size: :thumb_small) + .col-xs-11 + .from.pull-left + = person_link(comment.author) + .info + %span + = timeago(comment.created_at ? comment.created_at : Time.now) + .remove_comment + .pull-right + - if user_signed_in? && comment.author == current_user.person + = link_to(raw("<i class='entypo trash'></i>"), comment_path(comment), method: :delete, + data: { confirm: "#{t('are_you_sure')}" }, class: "remove") + .clearfix - %div{:class => direction_for(comment.text)} + %div{class: direction_for(comment.text)} = comment.message.markdownified diff --git a/app/views/comments/_new_comment.mobile.haml b/app/views/comments/_new_comment.mobile.haml index 97705fb48..bba1aa86a 100644 --- a/app/views/comments/_new_comment.mobile.haml +++ b/app/views/comments/_new_comment.mobile.haml @@ -2,9 +2,10 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -= form_tag( post_comments_path(post_id), :id => "new_comment_on_#{post_id}", :class => 'new_comment', :autocomplete => "off") do += form_tag( post_comments_path(post_id), id: "new_comment_on_#{post_id}", class: 'new_comment', autocomplete: "off") do %fieldset .control-group - = hidden_field_tag :post_id, post_id, :id => "post_id_on_#{post_id}" - = text_area_tag :text, nil, :class => "span12 comment_box", :id => "comment_text_on_#{post_id}", :placeholder => t('.comment'), :autofocus => true - = submit_tag t('.comment'), :id => "comment_submit_#{post_id}", 'data-disable-with' => t('.commenting'), :class => "btn primary" + = hidden_field_tag :post_id, post_id, id: "post_id_on_#{post_id}" + = text_area_tag :text, nil, class: "col-md-12 comment_box form-control form-group", id: "comment_text_on_#{post_id}", placeholder: t('.comment'), autofocus: true + = submit_tag t('.comment'), id: "comment_submit_#{post_id}", 'data-disable-with' => t('.commenting'), class: "btn btn-primary pull-right" + .clearfix diff --git a/app/views/contacts/_aspect_listings.haml b/app/views/contacts/_aspect_listings.haml index 664b412c6..f7c52d6bc 100644 --- a/app/views/contacts/_aspect_listings.haml +++ b/app/views/contacts/_aspect_listings.haml @@ -1,34 +1,28 @@ #aspect_nav - %ul.nav.nav-tabs.nav-stacked.synced - %li.all_contacts{:class => ("active" if params["set"] == "all")} - %a{:href => contacts_path(:set => "all")} - = t('contacts.index.all_contacts') - .badge.badge-default.pull-right - = all_contacts_count + %ul.list-group.synced.ui-sortable + %a.list-group-item.ui-sortable-handle.all_contacts{class: ("active" if params["set"] == "all"), href: contacts_path(set: "all")} + = t('contacts.index.all_contacts') + .badge.badge-default.pull-right + = all_contacts_count - %li.all_aspects{:class => ("active" if !params["set"] && !params["a_id"] && !@spotlight)} - %a{:href => contacts_path} - = t('contacts.index.my_contacts') - .badge.badge-default.pull-right - = my_contacts_count + %a.list-group-item.ui-sortable-handle.all_aspects{class: ("active" if !params["set"] && !params["a_id"] && !@spotlight), href: contacts_path} + = t('contacts.index.my_contacts') + .badge.badge-default.pull-right + = my_contacts_count - all_aspects.each do |aspect| - %li.aspect{:data => {:aspect_id => aspect.id}, :class => ("active" if params["a_id"].to_i == aspect.id)} - %a{:href => contacts_path(:a_id => aspect.id)} - .badge.badge-default.pull-right - = aspect.contacts.size - .name - = aspect - - %li.new_aspect - %a{ "data-toggle" => "modal", "data-target" => "#newAspectModal", href: "#"} - = t("aspects.aspect_listings.add_an_aspect") + %a.list-group-item.ui-sortable-handle.aspect{data: {aspect_id: aspect.id}, class: ("active" if params["a_id"].to_i == aspect.id), href: contacts_path(a_id: aspect.id)} + .badge.badge-default.pull-right + = aspect.contacts.size + .name + = aspect - #newAspectContainer - -# JS + %a.list-group-item.ui-sortable-handle.new_aspect{ data: { toggle: "modal", target: "#newAspectModal" }, href: "#"} + = t('aspects.aspect_listings.add_an_aspect') + #newAspectContainer + -# JS - %li.only_sharing{:class => ("active" if params["set"] == "only_sharing")} - %a{:href => contacts_path(:set => "only_sharing")} - = t('contacts.index.only_sharing_with_me') - .badge.badge-default.pull-right - = only_sharing_count + %a.list-group-item.ui-sortable-handle.only_sharing{ class: ("active" if params["set"] == "only_sharing"), href: contacts_path(set: "only_sharing")} + = t('contacts.index.only_sharing_with_me') + .badge.badge-default.pull-right + = only_sharing_count diff --git a/app/views/contacts/_header.html.haml b/app/views/contacts/_header.html.haml index 6d879c1ab..5ef69408e 100644 --- a/app/views/contacts/_header.html.haml +++ b/app/views/contacts/_header.html.haml @@ -6,30 +6,30 @@ = link_to aspect_toggle_contact_visibility_path(@aspect), id: "contacts_visibility_toggle", class: "contacts_button", method: :put, remote: true do -if @aspect.contacts_visible? - %i.entypo.lock-open.contacts-header-icon{:title => t('aspects.edit.aspect_list_is_visible')} + %i.entypo.lock-open.contacts-header-icon{title: t('aspects.edit.aspect_list_is_visible')} -else - %i.entypo.lock.contacts-header-icon{:title => t('aspects.edit.aspect_list_is_not_visible')} + %i.entypo.lock.contacts-header-icon{title: t('aspects.edit.aspect_list_is_not_visible')} -if AppConfig.chat.enabled? = link_to aspect_toggle_chat_privilege_path(@aspect), id: "chat_privilege_toggle", class: "contacts_button", method: :put, remote: true do -if @aspect.chat_enabled? - %i.entypo.chat.enabled.contacts-header-icon{:title => t('aspects.edit.aspect_chat_is_enabled')} + %i.entypo.chat.enabled.contacts-header-icon{title: t('aspects.edit.aspect_chat_is_enabled')} -else - %i.entypo.chat.contacts-header-icon{:title => t('aspects.edit.aspect_chat_is_not_enabled')} + %i.entypo.chat.contacts-header-icon{title: t('aspects.edit.aspect_chat_is_not_enabled')} = link_to @aspect, method: "delete", data: { confirm: t('aspects.edit.confirm_remove_aspect') }, class: 'delete contacts_button', id: 'delete_aspect' do - %i.entypo.trash.contacts-header-icon{:title => t('delete')} + %i.entypo.trash.contacts-header-icon{title: t('delete')} .pull-right - = search_field_tag :contact_search, "", id: "contact_list_search", class: "search-query", placeholder: t('contacts.index.user_search') + = search_field_tag :contact_search, "", id: "contact_list_search", class: "search-query form-control", placeholder: t('contacts.index.user_search') %h3 %span#aspect_name = @aspect.name %span#change_aspect_name.contacts_button - %i.entypo.pencil.contacts-header-icon{:title => t('aspects.edit.rename')} + %i.entypo.pencil.contacts-header-icon{title: t('aspects.edit.rename')} #aspect_name_form - = form_for @aspect, :remote => true do |aspect| - = aspect.text_field :name, :maxlength => 20 - = aspect.submit t('aspects.edit.update'), 'data-disable-with' => t('aspects.edit.updating'), :class => "btn" + = form_for @aspect, remote: true, html: { class: "form-inline edit_aspect"} do |aspect| + = aspect.text_field :name, class: "form-control", :maxlength => 20 + = aspect.submit t('aspects.edit.update'), 'data-disable-with' => t('aspects.edit.updating'), class: "btn btn-default" - else %h3 diff --git a/app/views/contacts/_sidebar.html.haml b/app/views/contacts/_sidebar.html.haml index 5b9411a02..5d42397e9 100644 --- a/app/views/contacts/_sidebar.html.haml +++ b/app/views/contacts/_sidebar.html.haml @@ -6,9 +6,15 @@ .text-center.spotlight = link_to t("contacts.spotlight.community_spotlight"), community_spotlight_path, class: "btn btn-link" .text-center - .btn.btn-link{ "data-toggle" => "modal", "data-target" => "#invitationsModal"} + #invitations-button.btn.btn-link{ "data-toggle" => "modal" } = t("invitations.new.invite_someone_to_join") = render "shared/modal", path: new_user_invitation_path, id: "invitationsModal", title: t("invitations.new.invite_someone_to_join") + +-# This will have to be extracte in a JS view +:javascript + $("#invitations-button").click(function(){ + app.helpers.showModal("#invitationsModal"); + }); diff --git a/app/views/contacts/index.html.haml b/app/views/contacts/index.html.haml index 44d6232b6..365537d3d 100644 --- a/app/views/contacts/index.html.haml +++ b/app/views/contacts/index.html.haml @@ -2,11 +2,11 @@ = t('.title') .container-fluid#contacts_container - .row-fluid - .span3 + .row + .col-md-3 = render 'contacts/sidebar' - .span9 + .col-md-9 #people_stream.stream.contacts = render 'contacts/header' @@ -25,7 +25,7 @@ != t('.no_contacts_message', :community_spotlight => link_to(t('.community_spotlight'), community_spotlight_path)) %p - .btn.btn-link{ 'data-toggle' => 'modal', 'data-target' => '#invitationsModal'} + .btn.btn-link{ 'data-toggle' => 'modal' } = t('invitations.new.invite_someone_to_join') -if @aspect diff --git a/app/views/contacts/spotlight.haml b/app/views/contacts/spotlight.haml index 3b69b12f0..6e16edcc6 100644 --- a/app/views/contacts/spotlight.haml +++ b/app/views/contacts/spotlight.haml @@ -2,12 +2,12 @@ = t('contacts.spotlight.community_spotlight') -.container-fluid#contacts_container - .row-fluid - .span3 +.container#contacts_container + .row + .col-md-3 = render 'contacts/sidebar' - .span9 + .col-md-9 #people_stream.stream.contacts .header - if AppConfig.settings.community_spotlight.suggest_email.present? diff --git a/app/views/messages/_message.haml b/app/views/conversations/_message.haml index 94b23aaa1..34a8341cd 100644 --- a/app/views/messages/_message.haml +++ b/app/views/conversations/_message.haml @@ -4,9 +4,9 @@ .stream_element{:data=>{:guid=>message.id}, :id => ('first_unread' if @first_unread_message_id == message.id)} .media - .img + .col-xs-1 = person_image_link(message.author, :size => :thumb_small) - .bd + .col-xs-11 = person_link(message.author, :class => 'author from') = timeago(message.created_at) diff --git a/app/views/conversations/_messages.haml b/app/views/conversations/_messages.haml new file mode 100644 index 000000000..280d15080 --- /dev/null +++ b/app/views/conversations/_messages.haml @@ -0,0 +1,15 @@ +.stream + = render partial: "message", collection: conversation.messages + + .stream_element.new_message + .media + .col-xs-1 + = owner_image_tag(:thumb_small) + + .col-xs-11 + = form_for [conversation, Message.new], html: {class: "control-group"} do |message| + = message.text_area :text, rows: 5, tabindex: 1, class: "form-control form-group" + = message.submit t("conversations.show.reply").capitalize, + "data-disable-with" => t("conversations.show.replying"), + class: "btn btn-primary pull-right", tabindex: 2 + .clearfix diff --git a/app/views/conversations/_new.haml b/app/views/conversations/_new.haml index bc5a559f5..398682402 100644 --- a/app/views/conversations/_new.haml +++ b/app/views/conversations/_new.haml @@ -1,18 +1,14 @@ -= form_for Conversation.new, html: {class: "form-horizontal form_do_not_clear"}, remote: true do |conversation| - .control-group - %label.control-label{:for => 'contact_ids'} - = t('.to') - .controls - = text_field_tag "contact_autocomplete" - .control-group - %label.control-label{:for => 'conversation_subject'} - = t('.subject') - .controls - = conversation.text_field :subject, :class => 'input-block-level' - .control-group - .controls - = text_area_tag "conversation[text]", '', :rows => 5, :class => 'input-block-level' - .control-group - .controls - .pull-right - = conversation.submit t('.send'), 'data-disable-with' => t('.sending'), :class => 'btn btn-primary creation' +.container-fluid + = form_for Conversation.new, html: {class: "form-horizontal form_do_not_clear"}, remote: true do |conversation| + .form-group + %label{ for: 'contact_ids' } + = t('.to') + = text_field_tag "contact_autocomplete", nil, class: "form-control" + .form-group + %label{ for: 'conversation_subject' } + = t('.subject') + = conversation.text_field :subject, class: 'input-block-level form-control' + .form-group + = text_area_tag "conversation[text]", '', rows: 5, class: 'input-block-level form-control' + .form-group + = conversation.submit t('.send'), 'data-disable-with' => t('.sending'), class: 'btn btn-primary pull-right' diff --git a/app/views/conversations/_show.haml b/app/views/conversations/_show.haml index 122f2e1ce..c13e5d81c 100644 --- a/app/views/conversations/_show.haml +++ b/app/views/conversations/_show.haml @@ -26,14 +26,4 @@ = person_image_link(participant, :size => :thumb_small) .stream - = render :partial => 'messages/message', :collection => conversation.messages - - .stream_element.new_message - .media - .img - = owner_image_tag(:thumb_small) - - .bd - = form_for [conversation, Message.new] do |message| - = message.text_area :text, :class => 'span12', :rows => 5, :tabindex => 1 - = message.submit t('.reply').capitalize, 'data-disable-with' => t('.replying'), class: 'btn btn-primary pull-right creation', tabindex: 2 + = render partial: 'messages', locals: { conversation: conversation } diff --git a/app/views/conversations/_show.mobile.haml b/app/views/conversations/_show.mobile.haml index 2a8a574e9..1a8eb0c80 100644 --- a/app/views/conversations/_show.mobile.haml +++ b/app/views/conversations/_show.mobile.haml @@ -4,24 +4,14 @@ .conversation_participants .right - = link_to(image_tag("mobile/deletelabel.png"), conversation_visibility_path(conversation), method: :delete, data: { confirm: "#{t('.delete')}?" }, class: "remove") + = link_to(raw("<i class='entypo trash'></i>"), conversation_visibility_path(conversation), + method: 'delete', data: { confirm: "#{t('.delete')}?" }, class: "remove") - %h3{ :class => direction_for(conversation.subject) } + %h3{ class: direction_for(conversation.subject) } = conversation.subject - for participant in conversation.participants - = person_image_link(participant, :size => :thumb_small) + = person_image_link(participant, size: :thumb_small) .span-15.last - .stream - = render :partial => 'messages/message', :collection => conversation.messages - - .stream_element.new_message - .media - .img - = owner_image_tag(:thumb_small) - - .bd - = form_for [conversation, Message.new] do |message| - = message.text_area :text, :rows => 5, :tabindex => 1 - = message.submit t('.reply').capitalize, 'data-disable-with' => t('.replying'), :class => 'button creation', :tabindex => 2 + = render partial: 'messages', locals: { conversation: conversation } diff --git a/app/views/conversations/index.haml b/app/views/conversations/index.haml index ecbcb6aff..27b65a213 100644 --- a/app/views/conversations/index.haml +++ b/app/views/conversations/index.haml @@ -5,34 +5,37 @@ = t('.conversations_inbox') .container-fluid#conversations_container - .row-fluid - .span4 + .row + .col-md-4 #left_pane #left_pane_header %h3 - .pull-right{ :class => ("hidden" unless @conversation)} - = link_to t('.new_conversation'), conversations_path, :class => 'btn btn-default' + .pull-right{ class: ("hidden" unless @conversation)} + = link_to t('.new_conversation'), conversations_path, class: 'btn btn-default' = t('.inbox') #conversation_inbox .stream.conversations - if @conversations.count > 0 - = render :partial => 'conversations/conversation', :collection => @conversations, :locals => {:authors => @authors, :ordered_participants => @ordered_participants, :unread_counts => @unread_counts, :selected_conversation_id => @conversation.try(:id)} + = render partial: 'conversations/conversation', collection: @conversations, + locals: { authors: @authors, ordered_participants: @ordered_participants, + unread_counts: @unread_counts, selected_conversation_id: @conversation.try(:id) } - else #no_conversations = t('.no_messages') - = will_paginate @conversations, :previous_label => '«', :next_label => '»', :inner_window => 1, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer + = will_paginate @conversations, previous_label: '«', next_label: '»',inner_window: 1, + renderer: WillPaginate::ActionView::BootstrapLinkRenderer - .span8 + .col-md-8 - if @conversation .stream_container #conversation_show - = render 'conversations/show', :conversation => @conversation + = render 'conversations/show', conversation: @conversation - else .stream_container.hidden #conversation_show - #conversation_new.row-fluid + #conversation_new %h3.text-center = t('conversations.index.new_conversation') - .span10.offset + .col-md-10.col-md-offset-1 = render 'conversations/new' diff --git a/app/views/conversations/index.mobile.haml b/app/views/conversations/index.mobile.haml index 57341e0d5..0c4fef326 100644 --- a/app/views/conversations/index.mobile.haml +++ b/app/views/conversations/index.mobile.haml @@ -3,13 +3,13 @@ -# the COPYRIGHT file. .right - = link_to t('.new_conversation'), new_conversation_path, :class => 'btn' + = link_to t('.new_conversation'), new_conversation_path, class: 'btn btn-default' - flash.each do |name, msg| - %div{:id => "flash_#{name}", :class => "expose"} + %div{ id: "flash_#{name}", class: "expose" } .message= msg .stream - %p{:class => "conversation_#{name}"}= msg + %p{ class: "conversation_#{name}" }= msg %h3 = t('.inbox') @@ -17,14 +17,16 @@ #conversation_inbox .stream.conversations - if @conversations.count > 0 - = render :partial => 'conversations/conversation', :collection => @conversations, :locals => {:authors => @authors, :unread_counts => @unread_counts} + = render partial: 'conversations/conversation', collection: @conversations, + locals: { authors: @authors, unread_counts: @unread_counts } - else %br %br %br %br - %div{:style => 'text-align:center;'} + %div{ style: 'text-align:center;' } %i = t('.no_messages') - = will_paginate @conversations, :previous_label => '«', :next_label => '»', :inner_window => 1, :outer_window => 0, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer + = will_paginate @conversations, previous_label: '«', next_label: '»', inner_window: 1, outer_window: 0, + renderer: WillPaginate::ActionView::BootstrapLinkRenderer diff --git a/app/views/conversations/new.mobile.haml b/app/views/conversations/new.mobile.haml index 160059c8d..b99070f8a 100644 --- a/app/views/conversations/new.mobile.haml +++ b/app/views/conversations/new.mobile.haml @@ -24,28 +24,9 @@ autocompleteInput.focus(); }); -.span6#new_conversation_pane - .span5#facebox_header +.col-md-6#new_conversation_pane + #facebox_header.container-fluid.row %h3 = t('conversations.index.new_conversation') - = form_for Conversation.new, html: {class: "new_conversation form_do_not_clear"}, remote: true do |conversation| - - .span1 - %h4 - = t('.to') - .span4 - = text_field_tag "contact_autocomplete" - .clearfix - %br - .span1 - %h4 - = t('.subject') - .span4 - = conversation.text_field :subject - %br - .span4.offset1 - = text_area_tag "conversation[text]", '', :rows => 5 - .clearfix - .bottom_submit_section - = conversation.submit t('.send'), 'data-disable-with' => t('.sending'), :class => 'button creation' + = render 'conversations/new' diff --git a/app/views/devise/passwords/edit.haml b/app/views/devise/passwords/edit.haml index 732ffa90f..36665d83e 100644 --- a/app/views/devise/passwords/edit.haml +++ b/app/views/devise/passwords/edit.haml @@ -2,7 +2,7 @@ = "#{AppConfig.settings.pod_name} - #{t('devise.passwords.edit.change_password')}" #reset_password - .container-fluid + .container .text-center .logos-asterisk %h1 @@ -11,7 +11,7 @@ = form_for(resource, as: resource_name, url: password_path(resource_name), html: {class: "form-horizontal block-form", method: :put }, autocomplete: 'off') do |f| = f.error_messages - %fieldset + %fieldset.form %label{for: "user_password"} = t('devise.passwords.edit.new_password') %i.entypo.lock @@ -25,7 +25,7 @@ = f.password_field :password_confirmation, class: "input-block-level form-control", required: true, placeholder: t('devise.passwords.edit.confirm_password'), autocapitalize: "none", autocorrect: "off" = hidden_field(:user, :remember_me, value: 1) - = f.submit t('devise.passwords.edit.change_password'), class: "btn btn-block" + = f.submit t('devise.passwords.edit.change_password'), class: "btn btn-block btn-default" .text-center = link_to t('devise.shared.links.sign_in'), new_session_path(resource_name) diff --git a/app/views/devise/passwords/edit.mobile.haml b/app/views/devise/passwords/edit.mobile.haml index 18c97e636..6b96290f8 100644 --- a/app/views/devise/passwords/edit.mobile.haml +++ b/app/views/devise/passwords/edit.mobile.haml @@ -5,7 +5,7 @@ #main_stream.stream #login_form .login-container - = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| + = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| = devise_error_messages! = f.hidden_field :reset_password_token %fieldset @@ -13,17 +13,17 @@ =t('devise.passwords.edit.change_password') .control-group - = f.label :password, t('devise.passwords.edit.new_password'), :class => "control-label" + = f.label :password, t('devise.passwords.edit.new_password'), class: "control-label" .controls = f.password_field :password .control-group - = f.label :password_confirmation, t('devise.passwords.edit.confirm_password'), :class => "control-label" + = f.label :password_confirmation, t('devise.passwords.edit.confirm_password'), class: "control-label" .controls = f.password_field :password_confirmation .controls - = f.submit t('devise.passwords.edit.change_password'), :class => 'btn primary' + = f.submit t('devise.passwords.edit.change_password'), :class: 'btn btn-primary' %footer = link_to t('layouts.application.toggle'), toggle_mobile_path diff --git a/app/views/devise/passwords/new.haml b/app/views/devise/passwords/new.haml index 9486f5035..13bc07b94 100644 --- a/app/views/devise/passwords/new.haml +++ b/app/views/devise/passwords/new.haml @@ -2,7 +2,7 @@ = "#{AppConfig.settings.pod_name} - #{t('devise.passwords.new.forgot_password')}" #forgot_password - .container-fluid + .container .text-center .logos-asterisk %h1 @@ -18,7 +18,7 @@ = t('devise.passwords.new.email') %i.entypo.mail = f.text_field :email, class: "input-block-level form-control", required: true, autocapitalize: "off", placeholder: t('devise.passwords.new.email'), autocorrect: "off", autofocus: true - = f.submit t('devise.passwords.new.send_password_instructions'), class: "btn btn-block" + = f.submit t('devise.passwords.new.send_password_instructions'), class: "btn btn-block btn-default" .text-center = link_to t('devise.shared.links.sign_in'), new_session_path(resource_name) diff --git a/app/views/home/default.haml b/app/views/home/default.haml index 919a81185..380f0d6b4 100644 --- a/app/views/home/default.haml +++ b/app/views/home/default.haml @@ -3,7 +3,7 @@ #page.container %header#header - %a#login-link.btn{href: "login"} Log In + %a#login-link.btn.btn-default{href: "login"} Log In = image_tag "branding/logos/logo.png" #banner.row @@ -11,7 +11,7 @@ %h3 You're about to change the Internet. Let's get you set up, shall we? #steps.row - .span4 + .col-md-4 %h2 Configure your %abbr.helpful{title: "A Diaspora installation"} pod @@ -26,7 +26,7 @@ config/database.yml.example for help. - .span4 + .col-md-4 %h2 Try it out = image_tag "landing/smiley_laughing.png" @@ -34,7 +34,7 @@ Start by = link_to "creating an account", new_user_registration_path - .span4 + .col-md-4 %h2 Make a contribution! = image_tag "landing/pen_write.png" diff --git a/app/views/invitations/new.html.haml b/app/views/invitations/new.html.haml index b39bb12b0..078844276 100644 --- a/app/views/invitations/new.html.haml +++ b/app/views/invitations/new.html.haml @@ -1,29 +1,32 @@ #paste_link = t('.paste_link') %span#codes_left - = '(' + t('.codes_left', :count => @invite_code.count) + ')' + = '(' + t('.codes_left', count: @invite_code.count) + ')' .form-horizontal .control-group - .controls - = invite_link(@invite_code) + = invite_link(@invite_code) #email_invitation - = form_tag new_user_invitation_path, :class => 'form-horizontal' do - - .control-group - %label.control-label{ :for => 'email_inviter_emails' } + = form_tag new_user_invitation_path, class: 'form-horizontal' do + + .form-group + %label.col-sm-2.control-label{ for: 'email_inviter_emails' } = t('email') - .controls - = text_field_tag 'email_inviter[emails]', @invalid_emails, :title => t('.comma_separated_plz'), :placeholder => 'foo@bar.com, max@foo.com...' - #already_sent - = t('invitations.create.note_already_sent', :emails => @valid_emails) unless @valid_emails.empty? - - .control-group - %label.control-label{ :for => 'email_inviter_locale' } + .col-sm-10 + = text_field_tag 'email_inviter[emails]', @invalid_emails, title: t('.comma_separated_plz'), + placeholder: 'foo@bar.com, max@foo.com...', class: "form-control" + #already_sent + = t('invitations.create.note_already_sent', emails: @valid_emails) unless @valid_emails.empty? + + .form-group + %label.col-sm-2.control-label{ for: 'email_inviter_locale' } = t('.language') - .controls - = select_tag('email_inviter[locale]', options_from_collection_for_select(available_language_options, "second", "first", :selected => current_user.language)) - - .control-group - .controls - = submit_tag t('.send_an_invitation'), class: 'btn btn-primary creation', data: {disable_with: t('.sending_invitation')} + .col-sm-10 + = select_tag 'email_inviter[locale]', options_from_collection_for_select(available_language_options, + "second", "first", selected: current_user.language), class: "form-control" + + .form-group + .pull-right.col-md-12 + = submit_tag t('.send_an_invitation'), class: 'btn btn-primary pull-right', + data: {disable_with: t('.sending_invitation')} + .clearfix diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 12b09b559..e40ee1abd 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -3,18 +3,17 @@ -# the COPYRIGHT file. !!! -%html{:lang => I18n.locale.to_s, :dir => (rtl?) ? 'rtl' : 'ltr'} - %head{:prefix => og_prefix} +%html{lang: I18n.locale.to_s, dir: (rtl?) ? 'rtl' : 'ltr'} + %head{prefix: og_prefix} %title = page_title yield(:page_title) - %meta{:charset => 'utf-8'}/ - %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/ - %meta{:name => "description", :content => "diaspora*"}/ - %meta{:name => "author", :content => "Diaspora, Inc."}/ + %meta{charset: 'utf-8'}/ + %meta{"http-equiv" => "Content-Type", :content=>"text/html; charset=utf-8"}/ + %meta{name: "description", content: "diaspora*"}/ + %meta{name: "author", content: "Diaspora, Inc."}/ - %link{:rel => 'shortcut icon', :href => "#{image_path('favicon.png')}" } - %link{:rel => 'apple-touch-icon', :href => "#{image_path('apple-touch-icon.png')}"} + %link{rel: 'shortcut icon', href: "#{image_path('favicon.png')}" } = render 'layouts/open_graph' @@ -22,10 +21,10 @@ = include_mixpanel = include_base_css_framework - = stylesheet_link_tag 'application', :media => 'all' + = stylesheet_link_tag 'application', media: 'all' - if rtl? - = stylesheet_link_tag :rtl, :media => 'all' + = stylesheet_link_tag :rtl, media: 'all' = old_browser_js_support <!--[if IE]> @@ -45,9 +44,9 @@ = csrf_meta_tag - = include_gon(:camel_case => true) + = include_gon(camel_case: true) - %body{ :class => "page-#{controller_name} action-#{action_name}" } + %body{ class: "page-#{controller_name} action-#{action_name}" } = flash_messages = yield :before_content diff --git a/app/views/layouts/application.mobile.haml b/app/views/layouts/application.mobile.haml index 405e27201..89a453683 100644 --- a/app/views/layouts/application.mobile.haml +++ b/app/views/layouts/application.mobile.haml @@ -23,6 +23,8 @@ %link{rel: "apple-touch-icon", href: image_path("apple-touch-icon.png")} / For Nokia devices %link{rel: "shortcut icon", href: image_path("apple-touch-icon.png")} + / For desktop + %link{rel: 'shortcut icon', href: image_path("favicon.png")} } / iOS mobile web app indicator / NOTE(we will enable these once we don't have to rely on back/forward buttons anymore) @@ -77,7 +79,7 @@ = form_tag('/search', method: 'get', class: 'search_form', "accept-charset" => "UTF-8") do %div = hidden_field_tag "utf8", "✓" - = search_field_tag "q", nil, id: "q", placeholder: t("search"), results: "5", autocomplete: "off", class: "ac_input" + = search_field_tag "q", nil, id: "q", placeholder: t("search"), results: "5", autocomplete: "off", class: "ac_input form-control" %nav %ul %li diff --git a/app/views/likes/_likes.haml b/app/views/likes/_likes.haml index a2e89298d..a960df447 100644 --- a/app/views/likes/_likes.haml +++ b/app/views/likes/_likes.haml @@ -3,5 +3,4 @@ -# the COPYRIGHT file. - @people[0..17].each do |person| - = person_image_link(person) - + = person_image_link(person, size: :thumb_small) diff --git a/app/views/notifications/index.html.haml b/app/views/notifications/index.html.haml index 4d3d4cde0..71ad48c71 100644 --- a/app/views/notifications/index.html.haml +++ b/app/views/notifications/index.html.haml @@ -1,43 +1,41 @@ .container-fluid#notifications_container - .row-fluid - .span3 + .row + .col-md-3 %h3 = t('.notifications') - %ul.nav.nav-tabs.nav-stacked - %li{ :class => ('active' unless params[:type] && @grouped_unread_notification_counts.has_key?(params[:type])) } - %a{ :href => '/notifications' + (params[:show] == 'unread' ? '?show=unread' : '') } - %span.pull-right.badge{:class => (@unread_notification_count > 0 ? 'badge-important' : 'badge-default')} - = @unread_notification_count - = t('.all_notifications') + %ul.list-group + %a.list-group-item{class: ('active' unless params[:type] && @grouped_unread_notification_counts.has_key?(params[:type])), href: '/notifications' + (params[:show] == 'unread' ? '?show=unread' : '') } + %span.pull-right.badge{class: (@unread_notification_count > 0 ? 'badge-important' : 'badge-default')} + = @unread_notification_count + = t('.all_notifications') - @grouped_unread_notification_counts.each do |key, count| - %li{ :class => ('active' if params[:type] == key), :data => { :type => key } } - %a{ :href => '/notifications?type=' + key + (params[:show] == 'unread' ? '&show=unread' : '') } - %span.pull-right.badge{ :class => (count > 0 ? 'badge-important' :'badge-default') } - = count - - case key - - when 'also_commented', 'comment_on_post' - %i.entypo.comment - - when 'liked' - %i.entypo.heart - - when 'mentioned' - %span.mentionIcon - @ - - when 'reshared' - %i.entypo.retweet - - when 'started_sharing' - %i.entypo.add-user - = t('.'+key) + %a.list-group-item{class: ('active' if params[:type] == key), data: { type: key }, href: '/notifications?type=' + key + (params[:show] == 'unread' ? '&show=unread' : '') } + %span.pull-right.badge{class: (count > 0 ? 'badge-important' :'badge-default') } + = count + - case key + - when 'also_commented', 'comment_on_post' + %i.entypo.comment + - when 'liked' + %i.entypo.heart + - when 'mentioned' + %span.mentionIcon + @ + - when 'reshared' + %i.entypo.retweet + - when 'started_sharing' + %i.entypo.add-user + = t('.'+key) - .span9.stream.notifications - .row-fluid.header - .span12 + .col-md-9.stream.notifications + .row.header + .col-md-12 .btn-toolbar.pull-right .btn-group - %a.btn.btn-default{ :class => ('active' unless params[:show] == 'unread'), :href => '/notifications' + (params[:type] ? '?type=' + params[:type] : '') } + %a.btn.btn-default{class: ('active' unless params[:show] == 'unread'), href: '/notifications' + (params[:type] ? '?type=' + params[:type] : '') } = t('.show_all') - %a.btn.btn-default{ :class => ('active' if params[:show] == 'unread'), :href => '/notifications?show=unread' + (params[:type] ? '&type=' + params[:type] : '') } + %a.btn.btn-default{class: ('active' if params[:show] == 'unread'), href: '/notifications?show=unread' + (params[:type] ? '&type=' + params[:type] : '') } = t('.show_unread') - %a.btn.btn-default{:href => read_all_notifications_path(:type => params[:type] ), :class => ('disabled' unless @unread_notification_count > 0)} + %a.btn.btn-default.btn-group{href: read_all_notifications_path(type: params[:type] ),class: ('disabled' unless @unread_notification_count > 0)} -if params[:type] = t('.mark_all_shown_as_read') -else @@ -47,19 +45,19 @@ - @group_days.each do |date, notes| - if display_year?(year, date) - year = the_year(date) - .row-fluid.year_container - .span4.offset4.year= year + .row.year_container + .col-md-4.col-md-offset-4.year= year - .day_group.row-fluid - .date.span2 + .day_group.row + .date.col-md-2 .day= the_day(date) .month= the_month(date) - .notifications_for_day.span10 + .notifications_for_day.col-md-10 - notes.each do |note| - = render :partial => 'notifications/notification', :locals => { :note => note } + = render partial: 'notifications/notification', locals: { note: note } - = will_paginate @notifications, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer + = will_paginate @notifications, renderer: WillPaginate::ActionView::BootstrapLinkRenderer - else .no_notifications.well diff --git a/app/views/notifications/index.mobile.haml b/app/views/notifications/index.mobile.haml index 7258fc418..038e11f8f 100644 --- a/app/views/notifications/index.mobile.haml +++ b/app/views/notifications/index.mobile.haml @@ -1,24 +1,27 @@ -%h3 - = t('.notifications') +.col-md-12 + %h3 + = t('.notifications') -.right - -if params[:type] - = link_to t('.mark_all_shown_as_read'), read_all_notifications_path(:type => params[:type] ), :class => 'btn' - -else - = link_to t('.mark_all_as_read'), read_all_notifications_path, :class => 'btn' -%ul.notifications - - @group_days.each do |date, notes| - %li - .notification_day_header - %span.label - = locale_date(date) - %ul.notifications_for_day - - notes.each do |note| - .stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : 'read'}"} - .content.from - =person_image_link(note.actors.last) - = notification_message_for(note) - .time_notif - = timeago(note.created_at) + .right + -if params[:type] + = link_to t('.mark_all_shown_as_read'), read_all_notifications_path(type: params[:type] ), class: 'btn btn-default' + -else + = link_to t('.mark_all_as_read'), read_all_notifications_path, class: 'btn btn-default' + %ul.notifications + - @group_days.each do |date, notes| + %li + .notification_day_header + %span.label.label-default + = locale_date(date) + %ul.notifications_for_day + - notes.each do |note| + .stream_element{:data=>{guid: note.id}, class: "#{note.unread ? 'unread' : 'read'}"} + .content.from + .col-xs-1 + = person_image_link(note.actors.last, size: :thumb_small) + .col-xs-11 + = notification_message_for(note) + .time_notif + = timeago(note.created_at) - = will_paginate @notifications, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer + = will_paginate @notifications, renderer: WillPaginate::ActionView::BootstrapLinkRenderer diff --git a/app/views/people/_person.html.haml b/app/views/people/_person.html.haml index 15f4ca690..3c008b339 100644 --- a/app/views/people/_person.html.haml +++ b/app/views/people/_person.html.haml @@ -1,13 +1,14 @@ -.media.stream_element{:id => person.id} +.media.stream_element{id: person.id} .pull-right - = render :partial => 'people/relationship_action', - :locals => { :person => person, :contact => contact, + = render partial: 'people/relationship_action', + locals: { person: person, contact: contact, :current_user => current_user } .media-object.pull-left - = person_image_link(person) + = person_image_link(person, size: :thumb_small) .media-body = person_link(person) .info.diaspora_handle = person.diaspora_handle .info.tags = Diaspora::Taggable.format_tags(person.profile.tag_string) + .clearfix diff --git a/app/views/people/_person.mobile.haml b/app/views/people/_person.mobile.haml index 806dd2c2d..72cf44737 100644 --- a/app/views/people/_person.mobile.haml +++ b/app/views/people/_person.mobile.haml @@ -2,12 +2,12 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -.stream_element{:id => person.id} +.stream_element{id: person.id} .content =person_image_link(person) %span.from - =person_link(person) + =person_link(person, size: :thumb_small) .info - = link_to person.diaspora_handle, local_or_remote_person_path(person), :class => 'black' + = link_to person.diaspora_handle, local_or_remote_person_path(person), class: 'black' diff --git a/app/views/people/contacts.haml b/app/views/people/contacts.haml index 4046fdb47..b1f416448 100644 --- a/app/views/people/contacts.haml +++ b/app/views/people/contacts.haml @@ -8,34 +8,34 @@ = @person.name .container-fluid#profile_container - .row-fluid - .span3 + .row + .col-md-3 #profile -# here be JS - .span9 + .col-md-9 .profile_header -# more JS .stream_container #people_stream.stream - @hashes.each do |hash| - = render :partial => 'people/person', :locals => hash - = will_paginate @contacts_of_contact, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer + = render partial: 'people/person', locals: hash + = will_paginate @contacts_of_contact, renderer: WillPaginate::ActionView::BootstrapLinkRenderer - %a{:id=>"back-to-top", :title=>"#{t('layouts.application.back_to_top')}", :href=>"#"} + %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} ⇧ -if user_signed_in? && @person #new_status_message_pane = render 'shared/modal', - :path => new_status_message_path(:person_id => @person.id), - :title => t('status_messages.new.mentioning', :person => @person.name), - :id => 'mentionModal' + path: new_status_message_path(:person_id => @person.id), + title: t('status_messages.new.mentioning', person: @person.name), + id: 'mentionModal' -if @contact #new_conversation_pane = render 'shared/modal', - :path => new_conversation_path(:contact_id => @contact.id, :name => @contact.person.name, :modal => true), - :title => t('conversations.index.new_conversation'), - :id => 'conversationModal' + path: new_conversation_path(:contact_id => @contact.id, name: @contact.person.name, modal: true), + title: t('conversations.index.new_conversation'), + id: 'conversationModal' diff --git a/app/views/people/index.html.haml b/app/views/people/index.html.haml index a4a90ee7c..281cc65e7 100644 --- a/app/views/people/index.html.haml +++ b/app/views/people/index.html.haml @@ -8,12 +8,12 @@ - content_for :head do = javascript_include_tag 'contact-list' -.container-fluid#people_search - .row-fluid +.container#people_search + .row .page-header = search_header - .row-fluid - .span8 + .row + .col-md-8 #people_stream.stream - if @hashes.empty? - if @background_query.present? @@ -26,20 +26,20 @@ %p = t('.searching') - = image_tag('static-loader.png', :class => 'loader') + = image_tag('ajax-loader2.gif', class: 'loader') - else %p = t('.no_one_found') - else - for hash in @hashes - = render :partial => 'people/person', :locals => hash + = render partial: 'people/person', locals: hash = will_paginate(@people) - %a{:id=>"back-to-top", :title=>"#{t('layouts.application.back_to_top')}", :href=>"#"} + %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} ⇧ - .span4 + .col-md-4 - if AppConfig.settings.invitations.open? %h4 = t('.couldnt_find_them') diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 235c22ccc..021592551 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -12,12 +12,12 @@ = @person.name .container-fluid#profile_container - .row-fluid - .span3 + .row + .col-md-3 #profile -# here be JS - .span9 + .col-md-9 .profile_header -# more JS @@ -32,19 +32,19 @@ #paginate %span.loader.hidden - %a{:id=>"back-to-top", :title=>"#{t('layouts.application.back_to_top')}", :href=>"#"} + %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} ⇧ -if user_signed_in? && @person #new_status_message_pane = render 'shared/modal', - :path => new_status_message_path(:person_id => @person.id), - :title => t('status_messages.new.mentioning', :person => @person.name), - :id => 'mentionModal' + path: new_status_message_path(:person_id => @person.id), + title: t('status_messages.new.mentioning', person: @person.name), + id: 'mentionModal' -if @contact #new_conversation_pane = render 'shared/modal', - :path => new_conversation_path(:contact_id => @contact.id, :name => @contact.person.name, :modal => true), - :title => t('conversations.index.new_conversation'), - :id => 'conversationModal' + path: new_conversation_path(:contact_id => @contact.id, name: @contact.person.name, modal: true), + title: t('conversations.index.new_conversation'), + id: 'conversationModal' diff --git a/app/views/people/show.mobile.haml b/app/views/people/show.mobile.haml index db85990ae..345394225 100644 --- a/app/views/people/show.mobile.haml +++ b/app/views/people/show.mobile.haml @@ -2,33 +2,32 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -.span12 - #author_info - = person_image_tag @person, :thumb_medium - .content - %h2 - = @person.name - %span.description - = @person.diaspora_handle - - if user_signed_in? && @person != current_user.person - = render 'aspect_memberships/aspect_membership_dropdown' - .clear - .bottom_bar - - if !@person.tag_string.blank? && user_signed_in? - = Diaspora::Taggable.format_tags(@person.tag_string) +#author_info + = person_image_tag @person, :thumb_medium + .content + %h2 + = @person.name + %span.description + = @person.diaspora_handle + - if user_signed_in? && @person != current_user.person + = render 'aspect_memberships/aspect_membership_dropdown' + .clear + .bottom_bar + - if !@person.tag_string.blank? && user_signed_in? + = Diaspora::Taggable.format_tags(@person.tag_string) -.span12.profile_stream +.col-md-12.profile_stream - if @stream.stream_posts.length > 0 - if @post_type == :photos - = render 'photos/index', :photos => @stream.stream_posts + = render 'photos/index', photos: @stream.stream_posts - else #main_stream.stream - = render 'shared/stream', :posts => @stream.stream_posts + = render 'shared/stream', posts: @stream.stream_posts = render 'shared/stream_more_button' - else #main_stream .dull - if @block.present? - = t('.ignoring', :name => @person.first_name) + = t('.ignoring', name: @person.first_name) - elsif user_signed_in? && (current_user.person != @person) - = t('.has_not_shared_with_you_yet', :name => @person.first_name) + = t('.has_not_shared_with_you_yet', name: @person.first_name) diff --git a/app/views/photos/_new_profile_photo.haml b/app/views/photos/_new_profile_photo.haml index af526be04..26b52522b 100644 --- a/app/views/photos/_new_profile_photo.haml +++ b/app/views/photos/_new_profile_photo.haml @@ -59,10 +59,9 @@ #profile_photo_upload = owner_image_tag(:thumb_large) - .clearfix - #file-upload.btn + #file-upload.btn.btn-primary.pull-right =t('.upload') = image_tag('mobile-spinner.gif', :class => 'hidden', :style => "z-index:-1", :id => 'file-upload-spinner') diff --git a/app/views/photos/_new_profile_photo.mobile.haml b/app/views/photos/_new_profile_photo.mobile.haml index 5677f4ed5..08bc3b4f2 100644 --- a/app/views/photos/_new_profile_photo.mobile.haml +++ b/app/views/photos/_new_profile_photo.mobile.haml @@ -42,11 +42,12 @@ #profile_photo_upload = owner_image_tag(:thumb_medium) +.clearfix - #file-upload.button + #file-upload.btn.btn-primary.pull-right =t('.upload') - = image_tag('mobile-spinner.gif', :class => 'hidden', :style => "z-index:-1", :id => 'file-upload-spinner') + = image_tag('mobile-spinner.gif', class: 'hidden', style: "z-index:-1", id: 'file-upload-spinner') %p #fileInfo diff --git a/app/views/photos/_photo.haml b/app/views/photos/_photo.haml index e80287c53..bcea86782 100644 --- a/app/views/photos/_photo.haml +++ b/app/views/photos/_photo.haml @@ -2,7 +2,7 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -= link_to (image_tag post.url(:thumb_large)), person_photo_path(post.author, post), :class => 'stream_photo' += link_to (image_tag post.url(:thumb_large)), person_photo_path(post.author, post), class: 'stream_photo' %h1 = post.pending @@ -10,5 +10,4 @@ %p.photo_description = post.text -= link_to t('.view_all', :name => post.author_name), person_photos_path(post.author), :class => "small_text" - += link_to t('.view_all', name: post.author_name), person_photos_path(post.author), class: "small_text" diff --git a/app/views/photos/edit.html.haml b/app/views/photos/edit.html.haml index bb78ea0f8..983a0be4a 100644 --- a/app/views/photos/edit.html.haml +++ b/app/views/photos/edit.html.haml @@ -4,12 +4,12 @@ %h2= "#{t('.editing')} #{@photo.processed_image}" -%div{:id => @photo.id} +%div{id: @photo.id} #show_photo = image_tag @photo.url(:scaled_full) = form_for @photo do |photo| = photo.label :text - = photo.text_field :text, :value => @photo.text + = photo.text_field :text, value: @photo.text = photo.submit diff --git a/app/views/posts/_photo.html.haml b/app/views/posts/_photo.html.haml index 9ee149c97..851832020 100644 --- a/app/views/posts/_photo.html.haml +++ b/app/views/posts/_photo.html.haml @@ -6,7 +6,7 @@ = javascript_include_tag :photos #author_info - = person_image_link(post.author) + = person_image_link(post.author, :size => :thumb_small) .from %h2 = post.author_name diff --git a/app/views/profiles/_edit.haml b/app/views/profiles/_edit.haml index 6c1f63dce..c2854c28b 100644 --- a/app/views/profiles/_edit.haml +++ b/app/views/profiles/_edit.haml @@ -5,45 +5,53 @@ - content_for :page_title do = t('.edit_profile') -= form_tag profile_path, :method => :put, :multipart => true, :id => 'update_profile_form' do - = render 'profiles/edit_public', :profile => profile, :aspect => aspect, :person => person += form_tag profile_path, method: :put, multipart: true, id: 'update_profile_form' do + = render 'profiles/edit_public', profile: profile, aspect: aspect, person: person %hr - %h3 = t('profiles.edit.your_private_profile') %h4 = t('profiles.edit.your_bio') - = text_area_tag 'profile[bio]', profile.bio, :rows => 5, :placeholder => t('fill_me_out'), :class => 'span12' + .row + .col-md-12 + = text_area_tag 'profile[bio]', profile.bio, rows: 5, placeholder: t('fill_me_out'), class: 'col-md-12 form-control' .small-horizontal-spacer %h4 = t('profiles.edit.your_location') - = text_field_tag 'profile[location]', profile.location, :placeholder => t('fill_me_out'), :class => 'span12' + .row + .col-md-12 + = text_field_tag 'profile[location]', profile.location, placeholder: t('fill_me_out'), class: 'col-md-12 form-control' .small-horizontal-spacer %h4 = t('profiles.edit.your_gender') - = text_field_tag 'profile[gender]', profile.gender, :placeholder => t("fill_me_out"), :class => 'span12' + .row + .col-md-12 + = text_field_tag 'profile[gender]', profile.gender, placeholder: t("fill_me_out"), class: 'col-md-12 form-control' .small-horizontal-spacer %h4 = t('profiles.edit.your_birthday') - .row-fluid - = select_date profile.birthday, { :prompt => true, :default => true, :order => t('date.order'), :start_year => upper_limit_date_of_birth, :end_year => lower_limit_date_of_birth, :prefix => 'profile[date]' }, { :class => 'span4' } + .row + .col-md-12.form-inline + = select_date profile.birthday, { prompt: true, default: true, order: t('date.order'), + :start_year => upper_limit_date_of_birth, :end_year => lower_limit_date_of_birth, prefix: 'profile[date]' }, + { class: 'form-control', style: 'width: 32.7%;'} .small-horizontal-spacer %h4 = t('search') - - .well.enclosed-checkbox - = label_tag 'profile[searchable]', :class => "checkbox" do + + .well.checkbox + = label_tag 'profile[searchable]', class: "checkbox-inline" do = check_box_tag 'profile[searchable]', true, profile.searchable = t('profiles.edit.allow_search') @@ -53,17 +61,17 @@ = t('nsfw') %p = t('profiles.edit.nsfw_explanation') - .well.enclosed-checkbox - = label_tag 'profile[nsfw]', :class => "checkbox" do + .well.checkbox + = label_tag 'profile[nsfw]', class: "checkbox-inline" do = check_box_tag 'profile[nsfw]', true, profile.nsfw? = t('profiles.edit.nsfw_check') - + .small-horizontal-spacer = t('profiles.edit.nsfw_explanation2') - + .small-horizontal-spacer .submit_block - =yield(:submit_block) + = yield(:submit_block) diff --git a/app/views/profiles/_edit.mobile.haml b/app/views/profiles/_edit.mobile.haml index b4a5badbd..3d2a84185 100644 --- a/app/views/profiles/_edit.mobile.haml +++ b/app/views/profiles/_edit.mobile.haml @@ -5,53 +5,68 @@ - content_for :page_title do = t('.edit_profile') -= form_tag profile_path, :method => :put, :multipart => true, :id => 'update_profile_form' do - = render 'profiles/edit_public', :profile => profile, :aspect => aspect, :person => person += form_tag profile_path, method: :put, multipart: true, id: 'update_profile_form' do + = render 'profiles/edit_public', profile: profile, aspect: aspect, person: person %hr %h4 = t('profiles.edit.your_private_profile') - %h4 = t('profiles.edit.your_bio') - = text_area_tag 'profile[bio]', profile.bio, :rows => 5, :placeholder => t('fill_me_out') + .row + .col-md-12 + = text_area_tag 'profile[bio]', profile.bio, rows: 5, placeholder: t('fill_me_out'), class: 'col-md-12 form-control' + + %br %h4 = t('profiles.edit.your_location') - = text_field_tag 'profile[location]', profile.location, :placeholder => t('fill_me_out') - + .row + .col-md-12 + = text_field_tag 'profile[location]', profile.location, placeholder: t('fill_me_out'), class: 'col-md-12 form-control' %br %h4 = t('profiles.edit.your_gender') - = text_field_tag 'profile[gender]', profile.gender, :placeholder => t("fill_me_out") + .row + .col-md-12 + = text_field_tag 'profile[gender]', profile.gender, placeholder: t("fill_me_out"), class: 'col-md-12 form-control' %br %h4 = t('profiles.edit.your_birthday') - = select_date profile.birthday, :prompt => true, - :default => true, :order => t('date.order'), :start_year => 2000, :end_year => 1930, :prefix => 'profile[date]' + + .row + .col-md-12.form-inline + = select_date profile.birthday, { prompt: true, default: true, order: t('date.order'), + :start_year => upper_limit_date_of_birth, :end_year => lower_limit_date_of_birth, prefix: 'profile[date]' }, + { class: 'form-control', style: 'width: 33%;'} + + %br %h4 = t('search') - %p{:class=>"checkbox_select"} - = label_tag 'profile[searchable]', t('profiles.edit.allow_search') - = check_box_tag 'profile[searchable]', true, profile.searchable + .well.checkbox + = label_tag 'profile[searchable]', class: "checkbox-inline" do + = check_box_tag 'profile[searchable]', true, profile.searchable + = t('profiles.edit.allow_search') + %br %h4 = t('nsfw') - = t('profiles.edit.nsfw_explanation') - %p{:class=>"checkbox_select"} - = check_box_tag 'profile[nsfw]', true, profile.nsfw - = label_tag 'profile[nsfw]', t('profiles.edit.nsfw_check') - = t('profiles.edit.nsfw_explanation2') - %br - %br + %p + = t('profiles.edit.nsfw_explanation') + .well.checkbox + = label_tag 'profile[nsfw]', class: "checkbox-inline" do + = check_box_tag 'profile[nsfw]', true, profile.nsfw? + = t('profiles.edit.nsfw_check') + %p + = t('profiles.edit.nsfw_explanation2') .submit_block =yield(:submit_block) diff --git a/app/views/profiles/_edit_public.haml b/app/views/profiles/_edit_public.haml index 83e46ba85..986621e52 100644 --- a/app/views/profiles/_edit_public.haml +++ b/app/views/profiles/_edit_public.haml @@ -36,26 +36,26 @@ %h4 = t('profiles.edit.your_name') -.row-fluid - .span6 +.row + .col-md-6 = label_tag 'profile[first_name]', t('profiles.edit.first_name') - = text_field_tag 'profile[first_name]', profile.first_name, :class => 'span12' - .span6 + = text_field_tag 'profile[first_name]', profile.first_name, class: 'col-md-12 form-control' + .col-md-6 = label_tag 'profile[last_name]', t('profiles.edit.last_name') - = text_field_tag 'profile[last_name]', profile.last_name, :class => 'span12' + = text_field_tag 'profile[last_name]', profile.last_name, class: 'col-md-12 form-control' .small-horizontal-spacer %h4 = t('profiles.edit.your_tags') -= text_field_tag 'profile[tag_string]', "", :placeholder => t('profiles.edit.your_tags_placeholder') += text_field_tag 'profile[tag_string]', "", placeholder: t('profiles.edit.your_tags_placeholder'), class: "form-control" .small-horizontal-spacer %h4 = t('profiles.edit.your_photo') -= render 'photos/new_profile_photo', :aspect => aspect, :person => person += render 'photos/new_profile_photo', aspect: aspect, person: person .small-horizontal-spacer diff --git a/app/views/profiles/_edit_public.mobile.haml b/app/views/profiles/_edit_public.mobile.haml index 186f429bf..a8fd0c31e 100644 --- a/app/views/profiles/_edit_public.mobile.haml +++ b/app/views/profiles/_edit_public.mobile.haml @@ -36,10 +36,10 @@ .stream - flash.each do |name, msg| - %div{:id => "flash_#{name}", :class => "expose"} + %div{id: "flash_#{name}", class: "expose"} .message= msg .stream - %p{:class => "conversation_#{name}"}= msg + %p{class: "conversation_#{name}"}= msg %h4 = t('profiles.edit.your_public_profile') @@ -48,24 +48,25 @@ %h4 = t('profiles.edit.your_name') -= label_tag 'profile[first_name]', t('profiles.edit.first_name') -= text_field_tag 'profile[first_name]', profile.first_name - -= label_tag 'profile[first_name]', t('profiles.edit.last_name') -= text_field_tag 'profile[last_name]', profile.last_name - +.row + .col-md-6 + = label_tag 'profile[first_name]', t('profiles.edit.first_name') + = text_field_tag 'profile[first_name]', profile.first_name, class: 'col-md-12 form-control' + .col-md-6 + = label_tag 'profile[last_name]', t('profiles.edit.last_name') + = text_field_tag 'profile[last_name]', profile.last_name, class: 'col-md-12 form-control' %br %h4 = t('profiles.edit.your_tags') -= text_field_tag 'profile[tag_string]', "", :placeholder => t('profiles.edit.your_tags_placeholder') += text_field_tag 'profile[tag_string]', "", placeholder: t('profiles.edit.your_tags_placeholder'), class: "form-control" %br %h4 = t('profiles.edit.your_photo') -= render 'photos/new_profile_photo', :aspect => aspect, :person => person += render 'photos/new_profile_photo', aspect: aspect, person: person %br diff --git a/app/views/profiles/edit.haml b/app/views/profiles/edit.haml index 4dc0bc846..557f39120 100644 --- a/app/views/profiles/edit.haml +++ b/app/views/profiles/edit.haml @@ -3,20 +3,20 @@ -# the COPYRIGHT file. .container - .row-fluid - .span12 + .row + .col-md-12 #section_header %h2 = t("settings") = render "shared/settings_nav" .container - .row-fluid - .span3 - .span6 + .row + .col-md-3 + .col-md-6 - 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: "btn creation", id: "update_profile" + = link_to t("cancel"), local_or_remote_person_path(current_user.person), class: "btn btn-default" + = submit_tag t(".update_profile"), class: "btn btn-primary pull-right", id: "update_profile" = render partial: "edit", locals: {person: @person, profile: @profile, aspect: @aspect, step: @step} - .span3 + .col-md-3 diff --git a/app/views/profiles/edit.mobile.haml b/app/views/profiles/edit.mobile.haml index e0df90577..2ae5a331f 100644 --- a/app/views/profiles/edit.mobile.haml +++ b/app/views/profiles/edit.mobile.haml @@ -8,9 +8,9 @@ = t('settings') = render 'shared/settings_nav' -.span-12.prepend-5.last +.col-md-12.prepend-5.last - content_for :submit_block do - = link_to t('cancel'), local_or_remote_person_path(current_user.person), :class => "button" - = submit_tag t('.update_profile'), :class => "btn", :id => "update_profile" - = render :partial => 'edit', :locals => {:person => @person, - :profile => @profile, :aspect => @aspect, :step => @step} + = link_to t('cancel'), local_or_remote_person_path(current_user.person), class: "btn btn-default button" + = submit_tag t('.update_profile'), class: "btn btn-primary pull-right", id: "update_profile" + = render partial: 'edit', locals: {person: @person, + profile: @profile, aspect: @aspect, step: @step} diff --git a/app/views/publisher/_aspect_dropdown.html.haml b/app/views/publisher/_aspect_dropdown.html.haml index 792a76e87..e00856824 100644 --- a/app/views/publisher/_aspect_dropdown.html.haml +++ b/app/views/publisher/_aspect_dropdown.html.haml @@ -1,5 +1,5 @@ .btn-group.aspect_dropdown - %button.btn.btn-default.dropdown-toggle{ ! current_user.getting_started? ? {'data-toggle' => 'dropdown'} : {'data-toggle' => 'dropdown', :title => popover_with_close_html("2. #{t('shared.public_explain.control_your_audience')}"), 'data-content'=> t('shared.public_explain.visibility_dropdown')} } + %button.btn.btn-default.dropdown-toggle{ ! current_user.getting_started? ? {'data-toggle' => 'dropdown'} : {'data-toggle' => 'dropdown', title: popover_with_close_html("2. #{t('shared.public_explain.control_your_audience')}"), 'data-content'=> t('shared.public_explain.visibility_dropdown')} } - if publisher_public %i#visibility-icon.entypo.small.globe %span.text @@ -14,25 +14,25 @@ - else = t('shared.aspect_dropdown.toggle', count: selected_aspects.size) %span.caret - %ul.dropdown-menu.pull-right{ :unSelectable => 'on' } + %ul.dropdown-menu.pull-right{ unSelectable: 'on' } - %li.public.radio{"data-aspect_id" => "public", :class => ("selected" if publisher_public)} + %li.public.radio{"data-aspect_id" => "public", class: ("selected" if publisher_public)} %a %span.status_indicator - %i.icon-ok + %i.glyphicon.glyphicon-ok %span.text = t('public') - %li.all_aspects.radio{"data-aspect_id" => "all_aspects", :class => ("selected" if (!publisher_public && all_aspects_selected?(selected_aspects)))} + %li.all_aspects.radio{"data-aspect_id" => "all_aspects", class: ("selected" if (!publisher_public && all_aspects_selected?(selected_aspects)))} %a %span.status_indicator - %i.icon-ok + %i.glyphicon.glyphicon-ok %span.text = t('all_aspects') %li.divider - for aspect in all_aspects - %li.aspect_selector{ 'data-aspect_id' => aspect.id, :class => !all_aspects_selected?(selected_aspects) && selected_aspects.include?(aspect) ? "selected" : "" } + %li.aspect_selector{ 'data-aspect_id' => aspect.id, class: !all_aspects_selected?(selected_aspects) && selected_aspects.include?(aspect) ? "selected" : "" } %a %span.status_indicator - %i.icon-ok + %i.glyphicon.glyphicon-ok %span.text = aspect.name diff --git a/app/views/publisher/_publisher.html.haml b/app/views/publisher/_publisher.html.haml index 64b4bb194..c34a59cb4 100644 --- a/app/views/publisher/_publisher.html.haml +++ b/app/views/publisher/_publisher.html.haml @@ -4,37 +4,39 @@ if( app.publisher ) app.publisher.triggerGettingStarted(); }); -.row-fluid#publisher{:class => ((aspect == :profile || publisher_open) ? "mention_popup" : "closed")} +#publisher.row{class: ((aspect == :profile || publisher_open) ? "mention_popup" : "closed")} .content_creation = form_for(StatusMessage.new) do |status| = status.error_messages %params #publisher_textarea_wrapper - if current_user.getting_started? - = status.text_area :fake_text, :rows => 2, :value => h(publisher_formatted_text), :tabindex => 1, :placeholder => "#{t('contacts.index.start_a_conversation')}...", + = status.text_area :fake_text, rows: 2, value: h(publisher_formatted_text), tabindex: 1, placeholder: "#{t('contacts.index.start_a_conversation')}...", 'data-title' => popover_with_close_html( '1. ' + t('shared.public_explain.share') ), - 'data-content' => t('shared.public_explain.new_user_welcome_message') + 'data-content' => t('shared.public_explain.new_user_welcome_message'), + 'class' => 'form-control' - else - = status.text_area :fake_text, :rows => 2, :value => h(publisher_formatted_text), :tabindex => 1, :placeholder => "#{t('contacts.index.start_a_conversation')}..." - = status.hidden_field :text, :value => h(publisher_hidden_text), :class => 'clear_on_submit' + = status.text_area :fake_text, rows: 2, value: h(publisher_formatted_text), tabindex: 1, placeholder: "#{t('contacts.index.start_a_conversation')}...", + 'class' => 'form-control' + = status.hidden_field :text, value: h(publisher_hidden_text), class: 'clear_on_submit' - .row-fluid#photodropzone_container + #photodropzone_container.container-fluid %ul#photodropzone - .row-fluid#location_container + #location_container.form-group{ style: "padding: 4px 6px;"} = hidden_field :location, :coords - .row-fluid#poll_creator_container + #poll_creator_container -# handlebars template - .row-fluid#button_container + #button_container #publisher-images.pull-right - #poll_creator.btn.btn-link{:title => t('shared.publisher.poll.add_a_poll')} + #poll_creator.btn.btn-link{title: t('shared.publisher.poll.add_a_poll')} %i.entypo.bar-graph - #file-upload.btn.btn-link{:title => t('shared.publisher.upload_photos')} + #file-upload.btn.btn-link{title: t('shared.publisher.upload_photos')} %i.entypo.camera.publisher_image - #locator.btn.btn-link{:title => t('shared.publisher.get_location')} + #locator.btn.btn-link{title: t('shared.publisher.get_location')} %i.entypo.location.publisher_image - #hide_location.btn.btn-link{:title => t('shared.publisher.remove_location')} + #hide_location.btn.btn-link{title: t('shared.publisher.remove_location')} %i.entypo.cross.publisher_image - %span.help-block.markdownIndications + %span.markdownIndications != t('shared.publisher.formatWithMarkdown', markdown_link: link_to(t('help.markdown'), 'https://diasporafoundation.org/formatting', target: :blank)) - if publisher_public @@ -45,11 +47,11 @@ - for aspect_id in aspect_ids = hidden_field_tag 'aspect_ids[]', aspect_id.to_s - .row-fluid#publisher_spinner{:class => 'hidden'} - = image_tag 'ajax-loader.gif' - .row-fluid.options_and_submit + #publisher_spinner{class: 'hidden'} + = image_tag 'ajax-loader2.gif' + .options_and_submit.col-sm-12 .public_toggle - .btn.btn-default.pull-left#hide_publisher{:title => t('shared.publisher.discard_post')} + .btn.btn-default.pull-left#hide_publisher{title: t('shared.publisher.discard_post')} %span.text =t('cancel') @@ -58,23 +60,23 @@ - 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') } + %a.btn.btn-group.btn-link{ href: "#question_mark_pane", class: 'question_mark', rel: 'facebox', title: t('shared.public_explain.manage') } %i.entypo.small.cog - = render :partial => "publisher/aspect_dropdown", :locals => { :selected_aspects => selected_aspects } + = render partial: "publisher/aspect_dropdown", locals: { :selected_aspects => selected_aspects } - %button{:class => 'btn btn-default post_preview_button'} + %button.btn.btn-default.btn-group.post_preview_button %span.text = t('shared.publisher.preview') - %button#submit.btn.btn-primary.creation{:tabindex => 2} + %button#submit.btn.btn-group.btn-primary %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' + = link_to '', contacts_path(:aspect_ids => aspect_ids), class: 'selected_contacts_link hidden' #publisher_photo_upload diff --git a/app/views/publisher/_publisher.mobile.haml b/app/views/publisher/_publisher.mobile.haml index df36515d5..9aced532e 100644 --- a/app/views/publisher/_publisher.mobile.haml +++ b/app/views/publisher/_publisher.mobile.haml @@ -2,25 +2,26 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -= form_for StatusMessage.new, {:data => {:ajax => false}} do |status| - = status.hidden_field :provider_display_name, :value => 'mobile' - = status.text_area :text, :placeholder => t('shared.publisher.whats_on_your_mind'), :rows => 4, :autofocus => "autofocus" += form_for StatusMessage.new, html: {class: "control-group", data: {ajax: false}} do |status| + .form-group + = status.hidden_field :provider_display_name, value: 'mobile' + = status.text_area :text, placeholder: t('shared.publisher.whats_on_your_mind'), rows: 4, autofocus: "autofocus", class: "form-control" - %fieldset + .form-group %span#publisher_service_icons - if current_user.services - for service in current_user.services - = image_tag "social_media_logos/#{service.provider}-32x32.png", :title => service.provider.titleize, :class => "service_icon dim", :id =>"#{service.provider}", :maxchar => "#{service.class::MAX_CHARACTERS}" + = image_tag "social_media_logos/#{service.provider}-32x32.png", title: service.provider.titleize, class: "service_icon dim", id:"#{service.provider}", maxchar: "#{service.class::MAX_CHARACTERS}" - %select{:id => "aspect_ids_", :name => "aspect_ids[]"} - %option{:value => 'public'} + %select{id: "aspect_ids_", class: "form-control", name: "aspect_ids[]"} + %option{value: 'public'} = t('public') - %option{:value => 'all_aspects', :selected => true} + %option{value: 'all_aspects', selected: true} = t('all_aspects') - current_user.aspects.each do |aspect| - %option{:value => aspect.id} + %option{value: aspect.id} = "· #{aspect.name}" .clear @@ -28,9 +29,10 @@ %ul#photodropzone #fileInfo-publisher - #file-upload-publisher{:title => t('shared.publisher.upload_photos'), :class => 'btn'} + #file-upload-publisher{title: t('shared.publisher.upload_photos'), class: 'btn btn-default'} = image_tag "mobile/camera.png", alt: t("shared.publisher.upload_photos").titleize #publisher_mobile - = submit_tag t('shared.publisher.share'), :class => 'btn primary', :id => "submit_new_message" + = submit_tag t('shared.publisher.share'), class: 'btn btn-primary', id: "submit_new_message" + .clearfix #publisher_photo_upload diff --git a/app/views/registrations/_form.haml b/app/views/registrations/_form.haml index f4a904294..403ac9c3e 100644 --- a/app/views/registrations/_form.haml +++ b/app/views/registrations/_form.haml @@ -28,7 +28,7 @@ = f.password_field :password_confirmation, class: "input-block-level form-control", placeholder: t('registrations.new.password_confirmation'), title: t('registrations.new.enter_password_again'), required: true, pattern: "......+" - if AppConfig.settings.captcha.enable? - = show_simple_captcha :object => 'user', :code_type => 'numeric' + = show_simple_captcha object: 'user', :code_type => 'numeric', input_html: {class: "form-control"} = invite_hidden_tag(invite) @@ -36,4 +36,4 @@ %p#terms.text-center = t('registrations.new.terms', terms_link: link_to(t('registrations.new.terms_link'), terms_path, target: "_blank")).html_safe - = f.submit t('registrations.new.sign_up'), class: "btn btn-block btn-large", data: {disable_with: t('registrations.new.submitting')} + = f.submit t('registrations.new.sign_up'), class: "btn btn-block btn-large btn-default", data: {disable_with: t('registrations.new.submitting')} diff --git a/app/views/registrations/new.haml b/app/views/registrations/new.haml index 6164b1d46..510b607b6 100644 --- a/app/views/registrations/new.haml +++ b/app/views/registrations/new.haml @@ -1,10 +1,10 @@ #registration - .container-fluid - .row-fluid - .span10.offset1 - .span7.hidden-phone + .container + .row + .col-md-10.offset1 + .col-md-7.hidden-phone %h1.ball - .span5.v-center + .col-md-5.v-center .content.text-center %h2#pod-name = AppConfig.settings.pod_name diff --git a/app/views/registrations/new.mobile.haml b/app/views/registrations/new.mobile.haml index 8be870e29..1c7a27a8c 100644 --- a/app/views/registrations/new.mobile.haml +++ b/app/views/registrations/new.mobile.haml @@ -8,13 +8,13 @@ .registrations .stream - flash.each do |name, msg| - %p{:class => "registrations_#{name}"}= msg + %p{class: "registrations_#{name}"}= msg #flash_alert.expose - %div{:class => "message", :id => "session"}= msg + %div{class: "message", id: "session"}= msg #login_form .login-container - = form_for(resource, :as => resource_name, :html => {:class => 'new_user_form'}, :url => registration_path(resource_name)) do |f| + = form_for(resource, as: resource_name, html: {class: 'new_user_form'}, url: registration_path(resource_name)) do |f| %fieldset %legend = image_tag("branding/logos/header-logo2x.png", height: 40, width: 40) @@ -23,25 +23,25 @@ .control-group = f.label :username, t('username') .controls - = f.text_field :username, :placeholder => "jedi_guy" + = f.text_field :username, placeholder: "jedi_guy" .control-group = f.label :email, t('email') .controls - = f.text_field :email, :placeholder => "luke@hoth.net" + = f.text_field :email, placeholder: "luke@hoth.net" .control-group = f.label :password, t('password') .controls - = f.password_field :password, :placeholder => "••••••••" + = f.password_field :password, placeholder: "••••••••" .control-group = f.label :password_confirmation, t('password_confirmation') .controls - = f.password_field :password_confirmation, :placeholder => "••••••••" + = f.password_field :password_confirmation, placeholder: "••••••••" - if AppConfig.settings.captcha.enable? - = show_simple_captcha(:object => 'user', :code_type => 'numeric') + = show_simple_captcha(object: 'user', :code_type => 'numeric') = invite_hidden_tag(invite) @@ -49,8 +49,8 @@ = t('registrations.new.terms', terms_link: link_to(t('registrations.new.terms_link'), terms_path, target: "_blank")).html_safe .controls - = f.submit t('registrations.new.create_my_account'), :class => 'btn primary', :disable_with => t('registrations.new.submitting') - = link_to t('devise.sessions.new.sign_in'), new_user_session_path(), :class => 'btn btn-link', :style => "float: right;" + = f.submit t('registrations.new.create_my_account'), class: 'btn btn-primary', :disable_with => t('registrations.new.submitting') + = link_to t('devise.sessions.new.sign_in'), new_user_session_path(), class: 'btn btn-link', style: "float: right;" %footer = link_to t('layouts.application.toggle'), toggle_mobile_path diff --git a/app/views/report/index.html.haml b/app/views/report/index.html.haml index d9a3e4eae..46ee43c0b 100644 --- a/app/views/report/index.html.haml +++ b/app/views/report/index.html.haml @@ -3,7 +3,7 @@ = render :partial => 'admins/admin_bar' %div.row - %div.span12 + %div.col-md-12 %h1 = t('report.title') %div#reports diff --git a/app/views/services/index.html.haml b/app/views/services/index.html.haml index cea937b11..23bc36c7d 100644 --- a/app/views/services/index.html.haml +++ b/app/views/services/index.html.haml @@ -6,17 +6,17 @@ = t('.edit_services') .container - .row-fluid - .span12 + .row + .col-md-12 #section_header %h2 = t('settings') = render 'shared/settings_nav' - .row-fluid - .span7 + .row{ :style=>"margin-top: 20px;" } + .col-md-7 = render 'add_remove_services' - .span5 + .col-md-5 %p = t('.services_explanation') diff --git a/app/views/sessions/new.html.haml b/app/views/sessions/new.html.haml index 41c251400..ed4604315 100644 --- a/app/views/sessions/new.html.haml +++ b/app/views/sessions/new.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = AppConfig.settings.pod_name + " - " + t('devise.sessions.new.sign_in') -.container-fluid#login +.container#login .text-center .logos-asterisk %h1 @@ -32,7 +32,7 @@ autocorrect: 'off' = f.hidden_field :remember_me, value: 1 - = f.submit t('devise.sessions.new.sign_in'), class: 'btn btn-large btn-block' + = f.submit t('devise.sessions.new.sign_in'), class: 'btn btn-large btn-block btn-default' .text-center - if display_password_reset_link? diff --git a/app/views/sessions/new.mobile.haml b/app/views/sessions/new.mobile.haml index df996cc46..5f6c1fafa 100644 --- a/app/views/sessions/new.mobile.haml +++ b/app/views/sessions/new.mobile.haml @@ -23,22 +23,20 @@ = image_tag("branding/logos/header-logo2x.png", height: 40, width: 40) = t("devise.sessions.new.login") - .control-group + .form-group = f.label :username, t("username") - .controls - = f.text_field :username, autofocus: true, autocapitalize: "none", autocorrect: "off" + = f.text_field :username, autofocus: true, class: "form-control", autocapitalize: "none", autocorrect: "off" - .control-group + .form-group = f.label :password , t("password") - .controls - = f.password_field :password - + = f.password_field :password, class: "form-control" = hidden_field(:user, :remember_me, value: 1) - .controls - = f.submit t("devise.sessions.new.sign_in"), class: "btn primary" + .form-group + = f.submit t("devise.sessions.new.sign_in"), class: "btn btn-primary" - if display_registration_link? - = link_to t("devise.shared.links.sign_up"), new_registration_path(resource_name), class: "btn btn-link", style: "float: right;" + = link_to t("devise.shared.links.sign_up"), new_registration_path(resource_name), + class: "btn btn-default pull-right" %footer - if display_password_reset_link? diff --git a/app/views/shared/_invitations.haml b/app/views/shared/_invitations.haml index 346f5d572..ee4610048 100644 --- a/app/views/shared/_invitations.haml +++ b/app/views/shared/_invitations.haml @@ -1,9 +1,15 @@ = t('.share_this') = invite_link(current_user.invitation_code) -.btn-link{ 'data-toggle' => 'modal', 'data-target' => '#invitationsModal'} +#invitations-button.btn.btn-link{ 'data-toggle' => 'modal', style: "padding-left: 0;"} = t('.by_email') = render 'shared/modal', - :path => new_user_invitation_path, - :id => 'invitationsModal', - :title => t('invitations.new.invite_someone_to_join') + path: new_user_invitation_path, + id: 'invitationsModal', + title: t('invitations.new.invite_someone_to_join') + +-# This will have to be extracte in a JS view +:javascript + $("#invitations-button").click(function(){ + app.helpers.showModal("#invitationsModal"); + }); diff --git a/app/views/shared/_modal.haml b/app/views/shared/_modal.haml index a102ddfcd..5dbcd2ea1 100644 --- a/app/views/shared/_modal.haml +++ b/app/views/shared/_modal.haml @@ -1,12 +1,15 @@ -.modal.hide.fade{ :id => id, - :tabindex => '-1', - :role => 'dialog', - 'aria-labelledby' => "#{id}Label", - 'aria-hidden' => 'true', - 'data-remote' => path} - .modal-header - %button.close{:type => 'button', 'data-dismiss' => 'modal', 'aria-hidden' => 'true' } - × - %h3{ :id => "#{id}Label"} - = title - .modal-body +.modal.fade{ id: id, + tabindex: '-1', + role: 'dialog', + 'aria-labelledby' => "#{id}Label", + 'aria-hidden' => 'true', + 'href' => path} + .modal-dialog + .modal-content + .modal-header + %button.close{type: 'button', 'data-dismiss' => 'modal', 'aria-hidden' => 'true' } + × + %h3{ id: "#{id}Label"} + = title + .modal-body + = image_tag('ajax-loader2.gif', id: "modalWaiter", class: "img-responsive center-block") diff --git a/app/views/shared/_post_info.mobile.haml b/app/views/shared/_post_info.mobile.haml index cff91d25a..8f59a580f 100644 --- a/app/views/shared/_post_info.mobile.haml +++ b/app/views/shared/_post_info.mobile.haml @@ -3,25 +3,30 @@ -# the COPYRIGHT file. .from - = person_image_link(post.author, :size => :thumb_small) - = person_link(post.author) + .col-xs-1 + = person_image_link(post.author, size: :thumb_small) + .col-xs-11 + .pull-left + = person_link(post.author) - .remove_post - - if user_signed_in? && post.author == current_user.person - = link_to(image_tag("mobile/deletelabel.png"), post_path(post), method: :delete, data: { confirm: "#{t('are_you_sure')}" }, class: "remove") + .remove_post.pull-right + - if user_signed_in? && post.author == current_user.person + = link_to(raw("<i class='entypo trash'></i>"), post_path(post), method: :delete, + data: { confirm: "#{t('are_you_sure')}" }, class: "remove") + .clearfix - .info - %span - = link_to(post_path(post)) do - = timeago(post.created_at) - %span.via - - if post.activity_streams? - = t('shared.stream_element.via', :link => link_to("#{post.provider_display_name}", post.actor_url)).html_safe - - elsif post.provider_display_name == 'mobile' - = t('shared.stream_element.via_mobile', :link => nil) - – - %span.scope_scope - - if post.public? - = t('public') - - else - = t('limited') + .info + %span + = link_to(post_path(post)) do + = timeago(post.created_at) + %span.via + - if post.activity_streams? + = t('shared.stream_element.via', link: link_to("#{post.provider_display_name}", post.actor_url)).html_safe + - elsif post.provider_display_name == 'mobile' + = t('shared.stream_element.via_mobile', link: nil) + – + %span.scope_scope + - if post.public? + = t('public') + - else + = t('limited') diff --git a/app/views/shared/_post_stats.mobile.haml b/app/views/shared/_post_stats.mobile.haml index eaa514266..3f96807b3 100644 --- a/app/views/shared/_post_stats.mobile.haml +++ b/app/views/shared/_post_stats.mobile.haml @@ -18,4 +18,4 @@ = image_tag "mobile/arrow_up_small.png" - if user_signed_in? - = link_to t("comments.new_comment.comment"), new_post_comment_path(@post), class: "add_comment_bottom_link btn comment_action inactive" + = link_to t("comments.new_comment.comment"), new_post_comment_path(@post), class: "add_comment_bottom_link btn btn-default comment_action inactive" diff --git a/app/views/statistics/_statistic.haml b/app/views/statistics/_statistic.haml index 130dc6c1a..1ead62278 100644 --- a/app/views/statistics/_statistic.haml +++ b/app/views/statistics/_statistic.haml @@ -1,5 +1,6 @@ -.span-3 - %h3{:class => activated} - = name - .data - = value
\ No newline at end of file +.col-md-3 + .span-3 + %h3{class: activated} + = name + .data + = value diff --git a/app/views/statistics/_statistics.haml b/app/views/statistics/_statistics.haml index 28626eed3..79fdca056 100644 --- a/app/views/statistics/_statistics.haml +++ b/app/views/statistics/_statistics.haml @@ -2,7 +2,7 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -.row-fluid +.row %h1 = t('_statistics') = render 'statistics/statistic', name: t('statistics.name'), value: @statistics.name, activated: "serv-enabled" @@ -16,8 +16,8 @@ = render 'statistics/statistic', name: t('statistics.local_posts'), value: @statistics.local_posts, activated: "serv-enabled" - if @statistics.expose_comment_counts? = render 'statistics/statistic', name: t('statistics.local_comments'), value: @statistics.local_comments, activated: "serv-enabled" -.row-fluid +.row %h1 = t('statistics.services') - Configuration::KNOWN_SERVICES.each do |service| - = render 'statistics/statistic', name: "#{service.capitalize}", value: service_status(service, @statistics.available_services), activated: service_class(service, @statistics.available_services)
\ No newline at end of file + = render 'statistics/statistic', name: "#{service.capitalize}", value: service_status(service, @statistics.available_services), activated: service_class(service, @statistics.available_services) diff --git a/app/views/statistics/statistics.html.haml b/app/views/statistics/statistics.html.haml index a55da7893..564ae15c7 100644 --- a/app/views/statistics/statistics.html.haml +++ b/app/views/statistics/statistics.html.haml @@ -1 +1,2 @@ -= render('statistics/statistics')
\ No newline at end of file +.container-fluid + = render('statistics/statistics') diff --git a/app/views/status_messages/bookmarklet.html.haml b/app/views/status_messages/bookmarklet.html.haml index 90958364a..560251dfd 100644 --- a/app/views/status_messages/bookmarklet.html.haml +++ b/app/views/status_messages/bookmarklet.html.haml @@ -1,5 +1,5 @@ -.container-fluid#bookmarklet - .row-fluid +.container#bookmarklet + .row %h4 =t('bookmarklet.post_something') - = render :partial => 'publisher/publisher', :locals => { :aspect => :profile, :selected_aspects => @aspects, :aspect_ids => @aspect_ids } + = render partial: 'publisher/publisher', locals: { aspect: :profile, :selected_aspects => @aspects, :aspect_ids => @aspect_ids } diff --git a/app/views/streams/main_stream.html.haml b/app/views/streams/main_stream.html.haml index ba2e90e5f..2d7949fd6 100644 --- a/app/views/streams/main_stream.html.haml +++ b/app/views/streams/main_stream.html.haml @@ -4,47 +4,47 @@ - content_for :head do - if AppConfig.chat.enabled? - = javascript_include_tag :jsxc, :id => 'jsxc', - :data => { :endpoint => get_bosh_endpoint } + = javascript_include_tag :jsxc, id: 'jsxc', + data: { endpoint: get_bosh_endpoint } - if current_user.getting_started? #welcome-to-diaspora - .container-fluid - .row-fluid - .span8.offset1 + .container + .row + .col-md-8.offset1 %h1 - = t('aspects.index.welcome_to_diaspora', :name => current_user.first_name) + = t('aspects.index.welcome_to_diaspora', name: current_user.first_name) %h3 = t('aspects.index.introduce_yourself') - .span2 + .col-md-2 .pull-right - = link_to '×'.html_safe, getting_started_completed_path, :id => "gs-skip-x", :class => "close" + = link_to '×'.html_safe, getting_started_completed_path, id: "gs-skip-x", class: "close" -.container-fluid - .row-fluid - .offset1.span2#leftNavBar +%div.container-fluid + .row + .col-md-offset-1.col-md-2#leftNavBar #home_user_badge = owner_image_link %h4 = link_to current_user.first_name, local_or_remote_person_path(current_user.person) %ul#stream_selection - %li.hoverable{:data => {:stream => 'stream'}} - = link_to t("streams.multi.title"), stream_path, :rel => 'backbone' - %li.hoverable{:data => {:stream => 'activity'}} - = link_to t("streams.activity.title"), activity_stream_path, :rel => 'backbone' - %li.hoverable{:data => {:stream => 'mentions'}} - = link_to t('streams.mentions.title'), mentioned_stream_path, :rel => 'backbone' + %li.hoverable{data: {stream: 'stream'}} + = link_to t("streams.multi.title"), stream_path, rel: 'backbone' + %li.hoverable{data: {stream: 'activity'}} + = link_to t("streams.activity.title"), activity_stream_path, rel: 'backbone' + %li.hoverable{data: {stream: 'mentions'}} + = link_to t('streams.mentions.title'), mentioned_stream_path, rel: 'backbone' %li.all_aspects - = render 'aspects/aspect_listings', :stream => @stream + = render 'aspects/aspect_listings', stream: @stream %li = render 'tags/followed_tags_listings' - .span6 + .col-md-6 #aspect_stream_container.stream_container - = render 'aspects/aspect_stream', :stream => @stream + = render 'aspects/aspect_stream', stream: @stream - .span2.rightBar + .col-md-2.rightBar #selected_aspect_contacts.section .title.no_icon %h5.stream_title @@ -53,5 +53,5 @@ = render 'shared/right_sections' - %a{:id=>"back-to-top", :title=>"#{t('layouts.application.back_to_top')}", :href=>"#"} + %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} ⇧ diff --git a/app/views/streams/main_stream.mobile.haml b/app/views/streams/main_stream.mobile.haml index 2cd8c0dbc..3a8424ada 100644 --- a/app/views/streams/main_stream.mobile.haml +++ b/app/views/streams/main_stream.mobile.haml @@ -2,12 +2,12 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -%h2{:style => "padding:0 10px;display:none;"} +%h2{style: "padding:0 10px;display:none;"} - if @stream.for_all_aspects? = t('all_aspects') - else = @stream.aspect -#main_stream.stream - = render 'shared/stream', :posts => @stream.stream_posts +#main_stream.stream.col-md-12 + = render 'shared/stream', posts: @stream.stream_posts = render 'shared/stream_more_button' diff --git a/app/views/tags/show.haml b/app/views/tags/show.haml index e65ee419e..1151d29f9 100644 --- a/app/views/tags/show.haml +++ b/app/views/tags/show.haml @@ -6,25 +6,25 @@ - if @stream.tag_name = @stream.display_tag_name - else - = t('.whatup', :pod => @pod_url) + = t('.whatup', pod: @pod_url) .container-fluid#tags_show - .row-fluid - .span3.offset1 + .row + .col-md-3.col-md-offset-1 %h4 - = t('.tagged_people', :count => @stream.tagged_people_count, :tag => @stream.display_tag_name) + = t('.tagged_people', count: @stream.tagged_people_count, tag: @stream.display_tag_name) .side_stream.stream - = render :partial => 'people/index', :locals => {:people => @stream.tagged_people} + = render partial: 'people/index', locals: {people: @stream.tagged_people} - .span7 + .col-md-7 .stream_container #author_info %h2 = @stream.display_tag_name - if current_user - = render 'publisher/publisher', :selected_aspects => @stream.aspect_ids, :aspect_ids => @stream.aspect_ids, :aspect => @stream.aspect + = render 'publisher/publisher', :selected_aspects => @stream.aspect_ids, :aspect_ids => @stream.aspect_ids, aspect: @stream.aspect %hr @@ -33,5 +33,5 @@ #paginate %span.loader.hidden - %a{:id=>"back-to-top", :title=>"#{t('layouts.application.back_to_top')}", :href=>"#"} + %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} ⇧ diff --git a/app/views/terms/default.haml b/app/views/terms/default.haml index 00cf94bc4..d6ad746a1 100644 --- a/app/views/terms/default.haml +++ b/app/views/terms/default.haml @@ -12,25 +12,25 @@ / These terms of service and privacy policy documents have been forked / from the App.Net ToS repository (https://github.com/appdotnet/terms-of-service). -/ The terms of use and privacy policy are available to you under the +/ The terms of use and privacy policy are available to you under the / CC BY-SA 3.0 Creative Commons license. / If you modify or copy this file, please do not remove this license text. -%div{:class => "container-fluid", :style => "margin-top: 50px;"} - %div{:class => "row-fluid"} - %div{:class => "span3"} +%div{class: "container", style: "margin-top: 50px;"} + %div{class: "row"} + %div{class: "col-md-3"} %h3 Terms of Service %h4 - %a{:href => "/terms#privacy"} + %a{href: "/terms#privacy"} Privacy Policy - %div{:class => "span9", :style => "margin-top: 20px;"} + %div{class: "col-md-9", style: "margin-top: 20px;"} %p Last Updated: 17th August, 2014 %hr - %a{:name => "terms"} + %a{name: "terms"} %h1 #{AppConfig.settings.pod_name} - Terms of Service @@ -44,7 +44,7 @@ If you access or use the Service, it means you agree to be bound by all of the terms below. So, before you use the Service, please read all of the terms. If you don't agree to all of the terms below, please do not use the Service. - if AppConfig.admins.podmin_email? Also, if a term does not make sense to you, please let us know by e-mailing <a href="mailto:#{AppConfig.admins.podmin_email}">#{AppConfig.admins.podmin_email}</a>. - + %h2 Changes to these Terms @@ -202,13 +202,13 @@ %p Questions or comments about the Service may be directed to us at the email address <a href="mailto:#{AppConfig.admins.podmin_email}">#{AppConfig.admins.podmin_email}</a>. - %a{:name => "privacy"} + %a{name: "privacy"} %hr %h1 #{AppConfig.settings.pod_name} - Privacy Policy - + %p Our privacy policy applies to information we collect when you use or access our website located at #{AppConfig.environment.url} and social networking services, or just interact with us. We may change this privacy policy from time to time. Whenever we make changes to this privacy policy, the changes are effective six (6) weeks after we post the revised privacy policy to our website (as indicated by revising the date at the top of our privacy policy). We encourage you to review our privacy policy whenever you access our services to stay informed about our information practices and the ways you can help protect your privacy. diff --git a/app/views/users/_edit.haml b/app/views/users/_edit.haml new file mode 100644 index 000000000..d615b4617 --- /dev/null +++ b/app/views/users/_edit.haml @@ -0,0 +1,256 @@ +-# Copyright (c) 2010-2011, Diaspora Inc. This file is +-# licensed under the Affero General Public License version 3 or later. See +-# the COPYRIGHT file. + +- content_for :page_title do + = t('.edit_account') + +.container + .row + .col-md-12 + #section_header + %h2 + = t('settings') + = render 'shared/settings_nav' + + .row + .col-md-2 + .col-md-8 + .row + .col-md-6 + %h3 + = t('.your_handle') + %p + %b= current_user.diaspora_handle + .col-md-6 + %h3 + = t('.your_email') + = form_for 'user', url: user_path, html: { method: :put, class: "form-horizontal" , id: "email-form"} do |f| + = f.error_messages + .form-group + = f.text_field :email, value: @user.unconfirmed_email || @user.email, class: "col-md-7 form-control" + .form-group + = f.submit t('.change_email'), class: "btn btn-primary pull-right" + - if @user.unconfirmed_email.present? + %div= t('.email_awaiting_confirmation', email: @user.email, :unconfirmed_email => @user.unconfirmed_email) + + %hr + + .row + .col-md-12 + %h3 + = t('.change_password') + = form_for @user, url: user_path, html: { method: :put, class: "form-horizontal" } do |f| + - if (@user.errors.keys & [:password, :password_confirmation, :current_password]).present? + = f.error_messages + %div.form-group + = f.label :current_password, t('.current_password'), class: "col-sm-3 control-label" + %div.col-sm-9 + = f.password_field :current_password, placeholder: t('.current_password_expl'), class: "form-control col-sm-10" + %div.form-group + = f.label :password, t('.new_password'), class: "col-sm-3 control-label" + %div.col-sm-9 + = f.password_field :password, placeholder: t('.character_minimum_expl'), class: "form-control" + %div.form-group + = f.label :password_confirmation, t('password_confirmation'), class: "col-sm-3 control-label" + %div.col-sm-9 + = f.password_field :password_confirmation, placeholder: t('.character_minimum_expl'), class: "form-control" + + .submit_block + = link_to t('cancel'), edit_user_path, class: "btn btn-default" + = f.submit t('.change_password'), class: "btn btn-primary pull-right", name: 'change_password' + + %hr + + .row + .col-md-12 + %h3 + = t('.change_language') + = form_for 'user', url: user_path, html: { method: :put} do |f| + .form-inline + = f.select :language, available_language_options, {}, { class: 'form-control' } + = f.submit t('.change_language'), class: "btn btn-primary pull-right" + + %hr + + .row + .col-md-12 + %h3#stream-preferences + = t('.stream_preferences') + = form_for current_user, url: user_path, html: { method: :put } do |f| + + = f.fields_for :stream_preferences do |type| + #stream_prefs + - if AppConfig.settings.community_spotlight.enable? + = f.label :show_community_spotlight_in_stream, class: "checkbox-inline" do + = f.check_box :show_community_spotlight_in_stream + = t('.show_community_spotlight') + + = f.label :getting_started, class: "checkbox-inline" do + = f.check_box :getting_started + = t('.show_getting_started') + + = f.submit t('.change'), class: 'btn btn-primary pull-right' + + %hr + + .row + .col-md-12 + %h3#auto-follow-back-preferences + = t('.following') + = form_for current_user, url: user_path, html: { method: :put, class: "form-horizontal"} do |f| + = f.label :auto_follow_back, class: "checkbox-inline" do + = f.check_box :auto_follow_back + = t('.auto_follow_back') + .small-horizontal-spacer + %div.form-group.row + %label.col-sm-5.control-label= t('.auto_follow_aspect') + %div.col-sm-7 + = f.select :auto_follow_back_aspect_id, aspect_options_for_select(current_user.aspects), {}, { class: 'form-control' } + + .small-horizontal-spacer + = f.submit t('.change'), class: 'btn btn-primary pull-right' + + %hr + + .row + .col-md-12 + %h3 + = t('.receive_email_notifications') + = form_for 'user', url: user_path, html: { method: :put } do |f| + = f.fields_for :email_preferences do |type| + #email_prefs + - if current_user.admin? + = type.label :someone_reported, class: "checkbox-inline" do + = type.check_box :someone_reported, {checked: @email_prefs['someone_reported']}, false, true + = t('.someone_reported') + + .small-horizontal-spacer + + = type.label :started_sharing, class: "checkbox-inline" do + = type.check_box :started_sharing, {checked: @email_prefs['started_sharing']}, false, true + = t('.started_sharing') + .small-horizontal-spacer + + = type.label :mentioned, class: "checkbox-inline" do + = type.check_box :mentioned, {checked: @email_prefs['mentioned']}, false, true + = t('.mentioned') + .small-horizontal-spacer + + = type.label :liked, class: "checkbox-inline" do + = type.check_box :liked, {checked: @email_prefs['liked']}, false, true + = t('.liked') + .small-horizontal-spacer + + = type.label :reshared, class: "checkbox-inline" do + = type.check_box :reshared, {checked: @email_prefs['reshared']}, false, true + = t('.reshared') + .small-horizontal-spacer + + = type.label :comment_on_post, class: "checkbox-inline" 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-inline" 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-inline" 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 btn-primary pull-right', id: "change_email_preferences" + + %hr + .row + #account_data.col-md-7 + .row + %h3.col-md-12= t('.export_data') + .col-md-6 + - if current_user.exporting + .export-in-progress= t('.export_in_progress') + - elsif current_user.export.present? + = link_to t('.request_export_update'), export_profile_user_path, class: "btn btn-default btn-block" + .small-horizontal-spacer + = link_to t('.download_export'), download_profile_user_path, class: "btn btn-success btn-block" + .small-horizontal-spacer + %h6 + = t('.last_exported_at', timestamp: current_user.exported_at) + - else + = link_to t('.request_export'), export_profile_user_path, method: :post, class: "btn btn-default btn-block" + + .col-md-6 + - if current_user.exporting_photos + .export-in-progress= t('.export_photos_in_progress') + - elsif current_user.exported_photos_file.present? + = link_to t('.request_export_photos_update'), export_photos_user_path, class: "btn btn-default btn-block" + .small-horizontal-spacer + = link_to t('.download_export_photos'), download_photos_user_path, class: "btn btn-success btn-block" + .small-horizontal-spacer + %h6 + = t('.last_exported_at', timestamp: current_user.exported_photos_at) + - else + = link_to t('.request_export_photos'), export_photos_user_path, method: :post, class: "btn btn-default btn-block" + + .col-md-5 + %h3{ style: "text-align: right;" } + = t('.close_account_text') + + - if mobile + = form_for "user", url: user_path, html: { method: :delete } do |f| + = f.error_messages + .form-group + .clearfix= f.label :close_account_password, t("users.edit.current_password"), for: :close_account_password, + class: "pull-right", style: "padding-top: 9px;" + .small-horizontal-spacer + .clearfix= f.password_field :current_password, id: :close_account_password, class: "form-control" + %p + .clearfix= f.submit t('users.edit.close_account_text'), class: "btn btn-danger pull-right", + id: "close_account_confirm", data: { confirm: t("are_you_sure_delete_account") } + + - if not mobile + =link_to t('.close_account_text'), '#close_account_pane', rel: 'facebox', + class: "btn btn-danger pull-right", id: "close_account" + + .hidden#close_account_pane{rel: 'facebox'} + #inner_account_delete + %h1 + = t('.close_account.dont_go') + %p + = t('.close_account.make_diaspora_better') + .row + .col-md-6 + = image_tag 'sadcat.jpg' + .small-horizontal-spacer + %small + %b + = t('.close_account.mr_wiggles') + .col-md-6 + %ul + %li + = t('.close_account.what_we_delete') + %li + = t('.close_account.locked_out') + %li + = t('.close_account.lock_username') + %p + %b + = t('.close_account.no_turning_back') + + = form_for 'user', url: user_path, html: { method: :delete } do |f| + = f.error_messages + + %p + = f.label :close_account_password, t('.current_password'), for: :close_account_password + = f.password_field :current_password, id: :close_account_password + %p + .small-horizontal-spacer + = f.submit t('.close_account_text'), class: "btn btn-danger", id: "close_account_confirm", + data: { confirm: t('are_you_sure_delete_account') } + + .col-md-2 +.small-horizontal-spacer diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index 78f6f8780..b67173ee4 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -1,207 +1 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('.edit_account') - -.container - .row-fluid - .span12 - #section_header - %h2 - = t('settings') - = render 'shared/settings_nav' - - .row-fluid - .span3 - .span6 - .row-fluid - .span6 - %h3 - = t('.your_handle') - %p - %b= current_user.diaspora_handle - .span6 - %h3 - = t('.your_email') - %i.entypo.lock.gray.settings_visibilty{title: t("users.edit.your_email_private")} - - = form_for 'user', :url => user_path, :html => { :method => :put } do |f| - = f.error_messages - .form-inline - = f.text_field :email, :value => @user.unconfirmed_email || @user.email, :class => "span7" - = f.submit t('.change_email'), :class => "btn" - .small-horizontal-spacer - - if @user.unconfirmed_email.present? - %p= t('.email_awaiting_confirmation', :email => @user.email, :unconfirmed_email => @user.unconfirmed_email) - .small-horizontal-spacer - - %hr - - .row-fluid - .span12 - %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? - = f.error_messages - %p - = f.label :current_password, t('.current_password') - = f.password_field :current_password, :placeholder => t('.current_password_expl') - %p - = f.label :password, t('.new_password') - = f.password_field :password, :placeholder => t('.character_minimum_expl') - %p - = f.label :password_confirmation, t('password_confirmation') - = f.password_field :password_confirmation, :placeholder => t('.character_minimum_expl') - - .submit_block - = link_to t('cancel'), edit_user_path - = t('or') - = f.submit t('.change_password'), class: "btn", name: 'change_password' - - %hr - - .row-fluid - .span-12 - %h3 - = t('.change_language') - = form_for 'user', :url => user_path, :html => { :method => :put } do |f| - .form-inline - = f.select :language, available_language_options - = f.submit t('.change_language'), :class => "btn" - - %hr - - .row-fluid - .span-12 - - %h3#stream-preferences - = t('.stream_preferences') - = form_for current_user, :url => user_path, :html => { :method => :put } do |f| - - = f.fields_for :stream_preferences do |type| - #stream_prefs - - if AppConfig.settings.community_spotlight.enable? - = f.label :show_community_spotlight_in_stream, :class => "checkbox" do - = f.check_box :show_community_spotlight_in_stream - = t('.show_community_spotlight') - - .small-horizontal-spacer - = f.label :getting_started, :class => "checkbox" do - = f.check_box :getting_started - = t('.show_getting_started') - - .small-horizontal-spacer - = f.submit t('.change'), :class => 'btn' - - %hr - - .row-fluid - .span-12 - - %h3#auto-follow-back-preferences - = t('.following') - = form_for current_user, :url => user_path, :html => { :method => :put } do |f| - = f.label :auto_follow_back, :class => "checkbox" do - = f.check_box :auto_follow_back - = t('.auto_follow_back') - .small-horizontal-spacer - %div{:class => "muted"} - = t('.auto_follow_aspect') - = f.select :auto_follow_back_aspect_id, aspect_options_for_select(current_user.aspects) - - .small-horizontal-spacer - = f.submit t('.change'), :class => 'btn' - - %hr - - .row-fluid - .span-12 - %h3 - = t('.receive_email_notifications') - = form_for 'user', :url => user_path, :html => { :method => :put } do |f| - = f.fields_for :email_preferences do |type| - #email_prefs - - if current_user.admin? - = type.label :someone_reported, :class => "checkbox" do - = type.check_box :someone_reported, {:checked => @email_prefs['someone_reported']}, false, true - = t('.someone_reported') - - .small-horizontal-spacer - - = type.label :started_sharing, :class => "checkbox" do - = type.check_box :started_sharing, {:checked => @email_prefs['started_sharing']}, false, true - = t('.started_sharing') - .small-horizontal-spacer - - = type.label :mentioned, :class => "checkbox" do - = 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 - = t('.export_data') - - if current_user.exporting - .export-in-progress= t('.export_in_progress') - - elsif current_user.export.present? - = link_to t('.download_export'), download_profile_user_path, class: "btn btn-success" - %h6 - = t('.last_exported_at', timestamp: current_user.exported_at) - = link_to t(".request_export_update"), export_profile_user_path, method: :post, class: "btn" - - else - = link_to t(".request_export"), export_profile_user_path, method: :post, class: "btn" - - - if current_user.exporting_photos - .small-horizontal-spacer - .export-in-progress= t('.export_photos_in_progress') - - elsif current_user.exported_photos_file.present? - .small-horizontal-spacer - = link_to t('.download_export_photos'), download_photos_user_path, class: "btn btn-success" - %h6 - = t('.last_exported_at', timestamp: current_user.exported_photos_at) - = link_to t(".request_export_photos_update"), export_photos_user_path, method: :post, class: "btn" - - else - .small-horizontal-spacer - = link_to t(".request_export_photos"), export_photos_user_path, method: :post, class: "btn" - - .span6 - %h3 - = t(".close_account_text") - .btn.btn-danger{ id: "close_account", data: {toggle: "modal", target: "#closeAccountModal"}} - = t(".close_account_text") - - = render "close_account_modal" += render "edit", mobile: false diff --git a/app/views/users/edit.mobile.haml b/app/views/users/edit.mobile.haml index dfec1832f..2dfc771ef 100644 --- a/app/views/users/edit.mobile.haml +++ b/app/views/users/edit.mobile.haml @@ -1,196 +1 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('.edit_account') - -.stream - - flash.each do |name, msg| - %div{:id => "flash_#{name}", :class => "expose"} - .message= msg - .stream - %p{:class => "conversation_#{name}"}= msg - -#section_header - %h3 - = t('settings') - = render 'shared/settings_nav' - -.span-12.prepend-5.last - %hr - - %h4 - = t('.your_handle') - %p - %b= current_user.diaspora_handle - - %h4 - = t('.your_email') - = form_for 'user', :url => user_path, :html => { :method => :put } do |f| - = f.error_messages - %p - = f.text_field :email, :value => @user.unconfirmed_email || @user.email - = f.submit t('.change_email'), :class => "btn" - - if @user.unconfirmed_email.present? - %p= t('.email_awaiting_confirmation', :email => @user.email, :unconfirmed_email => @user.unconfirmed_email) - - %hr - - %h4 - = t('.change_password') - = form_for 'user', :url => user_path, :html => { :method => :put } do |f| - = f.error_messages - %p - = f.label :current_password, t('.current_password') - = f.password_field :current_password, :placeholder => t('.current_password_expl') - %p - = f.label :password, t('.new_password') - = f.password_field :password, :placeholder => t('.character_minimum_expl') - %p - = f.label :password_confirmation, t('password_confirmation') - = f.password_field :password_confirmation, :placeholder => t('.character_minimum_expl') - - .submit_block - = f.submit t('.change_password'), :class => "btn" - - %hr - - %h4 - = t('.change_language') - = form_for 'user', :url => user_path, :html => { :method => :put } do |f| - = f.error_messages - - %p - = f.select :language, available_language_options - = f.submit t('.change_language'), :class => "btn" - - %hr - - %h4#stream-preferences - = t('.stream_preferences') - = form_for current_user, :url => user_path, :html => { :method => :put } do |f| - = f.error_messages - - = f.fields_for :stream_preferences do |type| - #stream_prefs - %p.checkbox_select - = f.label :show_community_spotlight_in_stream, t('.show_community_spotlight') - = f.check_box :show_community_spotlight_in_stream - - %br - %p.checkbox_select - = f.label :getting_started, t('.show_getting_started') - = f.check_box :getting_started - - %br - = f.submit t('.change'), :class => 'button' - - %hr - - %h4#auto-follow-back-preferences - = t('.following') - = form_for current_user, :url => user_path, :html => { :method => :put } do |f| - = f.error_messages - - %p.checkbox_select - = f.label :auto_follow_back, t('.auto_follow_back') - = f.check_box :auto_follow_back - %br - %p.checkbox_select - %span{:style => "color: #999"} - = t('.auto_follow_aspect') - = f.select :auto_follow_back_aspect_id, aspect_options_for_select(current_user.aspects) - %br - = f.submit t('.change'), :class => 'btn' - - %hr - - %h4 - = t('.receive_email_notifications') - = form_for 'user', :url => user_path, :html => { :method => :put } do |f| - = f.error_messages - - = f.fields_for :email_preferences do |type| - #email_prefs - - if current_user.admin? - %p.checkbox_select - = type.label :someone_reported, t('.someone_reported') - = type.check_box :someone_reported, {:checked => @email_prefs['someone_reported']}, false, true - - %br - %p.checkbox_select - = type.label :started_sharing, t('.started_sharing') - = type.check_box :started_sharing, {:checked => @email_prefs['started_sharing']}, false, true - %br - - %p.checkbox_select - = type.label :mentioned, t('.mentioned') - = type.check_box :mentioned, {:checked => @email_prefs['mentioned']}, false, true - %br - - %p.checkbox_select - = type.label :liked, t('.liked') - = type.check_box :liked, {:checked => @email_prefs['liked']}, false, true - %br - - %p.checkbox_select - = type.label :reshared, t('.reshared') - = type.check_box :reshared, {:checked => @email_prefs['reshared']}, false, true - %br - - %p.checkbox_select - = type.label :comment_on_post, t('.comment_on_post') - = type.check_box :comment_on_post, {:checked => @email_prefs['comment_on_post']}, false, true - %br - - %p.checkbox_select - = type.label :also_commented, t('.also_commented') - = type.check_box :also_commented, {:checked => @email_prefs['also_commented']}, false, true - %br - - %p.checkbox_select - = type.label :private_message, t('.private_message') - = type.check_box :private_message, {:checked => @email_prefs['private_message']}, false, true - - %br - = f.submit t('.change'), :class => "button" - - %hr - - #account_data.span-5.append-2 - %h4 - = t('.export_data') - - if current_user.exporting - .export-in-progress= t('.export_in_progress') - - elsif current_user.export.present? - = link_to t('.download_export'), download_profile_user_path, class: "btn btn-success" - %h6 - = t('.last_exported_at', timestamp: current_user.exported_at) - = link_to t('.request_export_update'), export_profile_user_path, class: "btn" - - else - = link_to t('.request_export'), export_profile_user_path, :class => "btn" - %br - %br - - if current_user.exporting_photos - .export-in-progress= t('.export_photos_in_progress') - - elsif current_user.exported_photos_file.present? - = link_to t('.download_export_photos'), download_photos_user_path, class: "btn btn-success" - %h6 - = t('.last_exported_at', timestamp: current_user.exported_photos_at) - = link_to t('.request_export_photos_update'), export_photos_user_path, class: "btn" - - else - = link_to t('.request_export_photos'), export_photos_user_path, :class => "btn" - - %hr - .span-5.last - %h4 - = t('.close_account_text') - = form_for "user", url: user_path, html: { method: :delete } do |f| - = f.error_messages - - %p - = f.label :close_account_password, t("users.edit.current_password"), for: :close_account_password - = f.password_field :current_password, id: :close_account_password - %p - = f.submit t('users.edit.close_account_text'), class: "btn btn-danger", id: "close_account_confirm", data: { confirm: t("are_you_sure_delete_account") } += render "edit", mobile: true diff --git a/app/views/users/getting_started.haml b/app/views/users/getting_started.haml index 0da1ed832..b5eef07f3 100644 --- a/app/views/users/getting_started.haml +++ b/app/views/users/getting_started.haml @@ -1,6 +1,6 @@ .container .row - %section#hello-there.span12 + %section#hello-there.col-md-12 .hero-unit %h1.text-center = t('.well_hello_there') @@ -14,15 +14,15 @@ - if AppConfig.configured_services.include? :facebook %p - != t('.connect_to_facebook', :link => link_to(t('.connect_to_facebook_link'), "auth/facebook?callback_url=#{getting_started_url}")) + != t('.connect_to_facebook', link: link_to(t('.connect_to_facebook_link'), "auth/facebook?callback_url=#{getting_started_url}")) - = form_tag profile_path, :method => :put, :remote => true, :id => 'edit_profile' do + = form_tag profile_path, method: :put, remote: true, id: 'edit_profile' do %fieldset = label_tag 'profile[first_name]', t('profiles.edit.your_name') - = text_field_tag 'profile[first_name]', current_user.first_name - = image_tag 'ajax-loader.gif', :id => "gs-name-form-spinner", :class => "hidden" + = text_field_tag 'profile[first_name]', current_user.first_name, class: "form-control" + = image_tag 'ajax-loader2.gif', id: "gs-name-form-spinner", class: "hidden" = label_tag :your_photo, t('profiles.edit.your_photo') - = render 'photos/new_profile_photo', :aspect => :getting_started, :person => current_user.person + = render 'photos/new_profile_photo', aspect: :getting_started, person: current_user.person %h2 = t('.what_are_you_in_to') @@ -30,11 +30,11 @@ %p = t('.hashtag_explanation') - = form_tag(tag_followings_path, :method => 'get', :class => "tag_input search_form") do + = form_tag(tag_followings_path, method: 'get', class: "tag_input search_form") do %fieldset = label_tag 'follow_tags', t('.hashtag_suggestions') #tags_list - = text_field_tag 'follow_tags', nil, :class => "nostrap" + = text_field_tag 'follow_tags', nil, class: "nostrap form-control" .awesome - = link_to "#{t('.awesome_take_me_to_diaspora')} »", stream_path, :id => "awesome_button", :class => "btn creation" + = link_to "#{t('.awesome_take_me_to_diaspora')} »", stream_path, id: "awesome_button", class: "btn" diff --git a/app/views/users/getting_started.mobile.haml b/app/views/users/getting_started.mobile.haml index c1e008bf1..4dd2483c0 100644 --- a/app/views/users/getting_started.mobile.haml +++ b/app/views/users/getting_started.mobile.haml @@ -53,19 +53,19 @@ - if AppConfig.configured_services.include? :facebook %p - != t('.connect_to_facebook', :link => link_to(t('.connect_to_facebook_link'), "auth/facebook?callback_url=#{getting_started_url}")) + != t('.connect_to_facebook', link: link_to(t('.connect_to_facebook_link'), "auth/facebook?callback_url=#{getting_started_url}")) - = form_tag profile_path, :method => :put, :remote => true, :id => 'edit_profile' do + = form_tag profile_path, method: :put, remote: true, id: 'edit_profile' do %fieldset - = label_tag 'profile[first_name]', t('profiles.edit.your_name'), :class => "bootstrapped" + = label_tag 'profile[first_name]', t('profiles.edit.your_name'), class: "bootstrapped" = text_field_tag 'profile[first_name]', current_user.first_name - = image_tag 'ajax-loader.gif', :id => "gs-name-form-spinner", :class => "hidden" - %span.saved{:class => "hidden"} + = image_tag 'ajax-loader2.gif', id: "gs-name-form-spinner", class: "hidden" + %span.saved{class: "hidden"} = image_tag "mobile/check_yes_ok.png" = t(".saved") - = label_tag :your_photo, t('profiles.edit.your_photo'), :class => "bootstrapped" - = render 'photos/new_profile_photo', :aspect => :getting_started, :person => current_user.person + = label_tag :your_photo, t('profiles.edit.your_photo'), class: "bootstrapped" + = render 'photos/new_profile_photo', aspect: :getting_started, person: current_user.person %h2 = t('.what_are_you_in_to') @@ -73,11 +73,11 @@ %p = t('.hashtag_explanation') - = form_tag(tag_followings_path, :method => 'get', :class => "tag_input search_form") do + = form_tag(tag_followings_path, method: 'get', class: "tag_input search_form") do %fieldset - = label_tag 'follow_tags', t('.hashtag_suggestions'), :class => "bootstrapped" - = text_field_tag 'follow_tags', nil, :class => "nostrap" + = label_tag 'follow_tags', t('.hashtag_suggestions'), class: "bootstrapped" + = text_field_tag 'follow_tags', nil, class: "nostrap" .center - = link_to "#{t('.awesome_take_me_to_diaspora')} »", stream_path, :id => "awesome_button", :class => "button creation" + = link_to "#{t('.awesome_take_me_to_diaspora')} »", stream_path, id: "awesome_button", class: "btn btn-primary" diff --git a/app/views/users/privacy_settings.html.haml b/app/views/users/privacy_settings.html.haml index 82b724f5c..335fca651 100644 --- a/app/views/users/privacy_settings.html.haml +++ b/app/views/users/privacy_settings.html.haml @@ -6,36 +6,37 @@ = t('.title') .container - .row-fluid - .span12 + .row + .col-md-12 #section_header %h2 = t('privacy') = render 'shared/settings_nav' - .row-fluid - .span3 - .span5 + .row + .col-md-3 + .col-md-5 %h3 = t('.title') - = form_for current_user, :url => user_path, :html => { :method => :put } do |f| + = form_for current_user, url: user_path, html: { method: :put } do |f| = f.error_messages = f.fields_for :stream_preferences do |type| #stream_prefs - = f.label :strip_exif, :class => "checkbox" do + = f.label :strip_exif, class: "checkbox" do = f.check_box :strip_exif = t('.strip_exif') .small-horizontal-spacer - = f.submit t('users.edit.change'), :class => 'btn' + .clearfix + = f.submit t('users.edit.change'), class: 'btn btn-primary pull-right' %hr - .row-fluid - .span3 - .span5 + .row + .col-md-3 + .col-md-5 %h3 = t('.ignored_users') @@ -46,6 +47,6 @@ = block.person_name \- = link_to t('.stop_ignoring'), block_path(block), - :method => :delete + method: :delete %br - .span3 + .col-md-3 diff --git a/config/application.rb b/config/application.rb index 616f2ed6f..0c8111377 100644 --- a/config/application.rb +++ b/config/application.rb @@ -81,9 +81,7 @@ module Diaspora templates.js validation.js - bootstrap.css bootstrap-complete.css - bootstrap-responsive.css error_pages.css admin.css mobile/mobile.css diff --git a/config/initializers/will_paginate.rb b/config/initializers/will_paginate.rb index 966b1da5c..8922b88b2 100644 --- a/config/initializers/will_paginate.rb +++ b/config/initializers/will_paginate.rb @@ -15,9 +15,9 @@ module WillPaginate class BootstrapLinkRenderer < LinkRenderer protected - + def html_container(html) - tag :div, tag(:ul, html), container_attributes + tag :div, tag(:ul, html, class: "pagination"), container_attributes end def page_number(page) diff --git a/features/desktop/accepts_invitation.feature b/features/desktop/accepts_invitation.feature index 02a02a7ef..a4fb95108 100644 --- a/features/desktop/accepts_invitation.feature +++ b/features/desktop/accepts_invitation.feature @@ -31,13 +31,13 @@ Feature: invitation acceptance And I close the publisher And I log out And I sign in as "bob@bob.bob" - And I click on selector ".btn-link[data-target='#invitationsModal']" + And I click on selector "#invitations-button" Then I should see one less invite Scenario: sends an invitation Given a user with email "bob@bob.bob" When I sign in as "bob@bob.bob" - And I click on selector ".btn-link[data-target='#invitationsModal']" + And I click on selector "#invitations-button" And I fill in the following: | email_inviter_emails | alex@example.com | And I press "Send an invitation" diff --git a/features/desktop/connects_users.feature b/features/desktop/connects_users.feature index f6ac162a8..41f2ffb9b 100644 --- a/features/desktop/connects_users.feature +++ b/features/desktop/connects_users.feature @@ -67,7 +67,7 @@ Feature: following and being followed And I press the first "a" within ".add_aspect" And I fill in "aspect_name" with "Super People" in the aspect creation modal - And I click on selector ".btn.creation" in the aspect creation modal + And I click on selector ".btn-primary" in the aspect creation modal When I go to the home page Then I should have 1 contact in "Super People" diff --git a/features/desktop/manages_aspects.feature b/features/desktop/manages_aspects.feature index 5f6865eaf..be0f4bc3f 100644 --- a/features/desktop/manages_aspects.feature +++ b/features/desktop/manages_aspects.feature @@ -9,7 +9,7 @@ Feature: User manages contacts And I am on the contacts page And I follow "+ Add an aspect" And I fill in "aspect_name" with "Dorm Mates" in the aspect creation modal - And I click on selector ".btn.creation" in the aspect creation modal + And I click on selector ".btn-primary" in the aspect creation modal Then I should see "Dorm Mates" within "#aspect_nav" Scenario: creating an aspect from homepage @@ -17,7 +17,7 @@ Feature: User manages contacts And I go to the aspects page When I follow "Add an aspect" And I fill in "aspect_name" with "losers" in the aspect creation modal - And I click on selector ".btn.creation" in the aspect creation modal + And I click on selector ".btn-primary" in the aspect creation modal Then I should see "losers" within "#aspect_nav" Scenario: deleting an aspect from contacts index @@ -67,14 +67,14 @@ Feature: User manages contacts And I have 0 contacts And I click on my name in the header When I follow "Contacts" - Then I should see "Community spotlight" within ".span9" + Then I should see "Community spotlight" within ".col-md-9" Scenario: clicking on the contacts link in the header with contacts does not send a user to the featured users page Given I am signed in And I have 2 contacts And I click on my name in the header When I follow "Contacts" - Then I should not see "Community spotlight" within ".span9" + Then I should not see "Community spotlight" within ".col-md-9" Scenario: sorting the aspects Given I am signed in diff --git a/features/step_definitions/aspects_steps.rb b/features/step_definitions/aspects_steps.rb index 5d7115066..c56eeeddd 100644 --- a/features/step_definitions/aspects_steps.rb +++ b/features/step_definitions/aspects_steps.rb @@ -92,7 +92,7 @@ When /^I drag "([^"]*)" (up|down) (\d+) pixels?$/ do |aspect_name, direction, di distance = distance.to_i * -1 if direction == "up" page.execute_script %{ function drag() { - $("li.aspect:contains('#{aspect_name}')") + $("a.aspect:contains('#{aspect_name}')") .simulate("drag-n-drop", { dy: #{distance}, interpolation: { stepWidth: 10, stepDelay: 5 } }); } function loadScripts() { @@ -130,5 +130,5 @@ Then /^the aspect dropdown should be visible$/ do end Then /^I should see "([^"]*)" as (\d+). aspect$/ do |aspect_name, position| - expect(find("#aspect_nav li:nth-child(#{position.to_i + 2})")).to have_text aspect_name + expect(find("#aspect_nav a:nth-child(#{position.to_i + 2})")).to have_text aspect_name end diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index 0009f8b56..3fafbb68c 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -102,8 +102,7 @@ end When /^I click to delete the first comment$/ do within("div.comment", match: :first) do - find(".control-icons").hover - find(".comment_delete").click + find(".comment_delete", visible: false).click end end @@ -243,8 +242,12 @@ And "I wait for the popovers to appear" do end And /^I click close on all the popovers$/ do + page.execute_script("$('.popover .close')[0].click();") + expect(page).to have_selector(".popover", count: 2) + page.execute_script("$('.popover .close')[0].click();") + expect(page).to have_selector(".popover", count: 1) page.execute_script("$('.popover .close').click();") - page.should_not have_selector(".popover .close") + expect(page).to_not have_selector(".popover .close") end Then /^I should see a flash message indicating success$/ do diff --git a/features/step_definitions/notifications_steps.rb b/features/step_definitions/notifications_steps.rb index 6151b8560..c9270a0f8 100644 --- a/features/step_definitions/notifications_steps.rb +++ b/features/step_definitions/notifications_steps.rb @@ -1,7 +1,7 @@ When /^I filter notifications by likes$/ do - step %(I follow "Liked" within "#notifications_container ul.nav.nav-tabs") + step %(I follow "Liked" within "#notifications_container ul.list-group") end When /^I filter notifications by mentions$/ do - step %(I follow "Mentioned" within "#notifications_container ul.nav.nav-tabs") + step %(I follow "Mentioned" within "#notifications_container ul.list-group") end diff --git a/features/support/publishing_cuke_helpers.rb b/features/support/publishing_cuke_helpers.rb index c76c46f68..9aae6ea10 100644 --- a/features/support/publishing_cuke_helpers.rb +++ b/features/support/publishing_cuke_helpers.rb @@ -26,10 +26,10 @@ module PublishingCukeHelpers end def submit_publisher - txt = find('#publisher #status_message_fake_text').value - find('#publisher .creation').click + txt = find("#publisher #status_message_fake_text").value + find("#publisher .btn-primary").click # wait for the content to appear - expect(find('#main_stream')).to have_content(txt) + expect(find("#main_stream")).to have_content(txt) end def click_and_post(text) diff --git a/spec/javascripts/app/views/aspect_create_view_spec.js b/spec/javascripts/app/views/aspect_create_view_spec.js index bbd17446f..ada4b1bbe 100644 --- a/spec/javascripts/app/views/aspect_create_view_spec.js +++ b/spec/javascripts/app/views/aspect_create_view_spec.js @@ -32,7 +32,7 @@ describe("app.views.AspectCreate", function() { expect(this.view.$("#newAspectModal form").length).toBe(1); expect(this.view.$("#newAspectModal input#aspect_name").length).toBe(1); expect(this.view.$("#newAspectModal input#aspect_contacts_visible").length).toBe(1); - expect(this.view.$("#newAspectModal .btn.creation").length).toBe(1); + expect(this.view.$("#newAspectModal .btn-primary").length).toBe(1); }); it("shouldn't show a hidden person id input", function() { @@ -86,7 +86,8 @@ describe("app.views.AspectCreate", function() { }); it("should hide the modal", function() { - this.view.$(".modal").modal("show"); + this.view.$('.modal').removeClass('fade'); + this.view.$(".modal").modal("toggle"); expect(this.view.$(".modal")).toHaveClass("in"); this.view.createAspect(); jasmine.Ajax.requests.mostRecent().respondWith(this.response); @@ -108,6 +109,7 @@ describe("app.views.AspectCreate", function() { }); it("should hide the modal", function() { + this.view.$('.modal').removeClass('fade'); this.view.$(".modal").modal("show"); expect(this.view.$(".modal")).toHaveClass("in"); this.view.createAspect(); @@ -141,7 +143,7 @@ describe("app.views.AspectCreate", function() { expect(this.view.$("#newAspectModal form").length).toBe(1); expect(this.view.$("#newAspectModal input#aspect_name").length).toBe(1); expect(this.view.$("#newAspectModal input#aspect_contacts_visible").length).toBe(1); - expect(this.view.$("#newAspectModal .btn.creation").length).toBe(1); + expect(this.view.$("#newAspectModal .btn-primary").length).toBe(1); }); it("should show a hidden person id input", function() { diff --git a/spec/javascripts/app/views/aspects_dropdown_view_spec.js b/spec/javascripts/app/views/aspects_dropdown_view_spec.js index a3b7238de..0720a26e2 100644 --- a/spec/javascripts/app/views/aspects_dropdown_view_spec.js +++ b/spec/javascripts/app/views/aspects_dropdown_view_spec.js @@ -16,7 +16,7 @@ describe("app.views.AspectsDropdown", function(){ context('_toggleCheckbox', function() { beforeEach(function() { this.view.$('li.selected').removeClass('selected'); - this.view.$('li.all_aspects.radio').addClass('selected'); + this.view.$('li.all_aspects').addClass('selected'); }); it('deselects all radio buttons', function() { @@ -45,21 +45,21 @@ describe("app.views.AspectsDropdown", function(){ }); it('deselects all checkboxes', function() { - this.view._toggleRadio(this.view.$('li.all_aspects.radio')); + this.view._toggleRadio(this.view.$('li.all_aspects')); expect(this.view.$('li.aspect_selector:eq(0)').hasClass('selected')).toBeFalsy(); expect(this.view.$('li.aspect_selector:eq(1)').hasClass('selected')).toBeFalsy(); }); it('toggles the clicked radio buttons', function() { - this.view._toggleRadio(this.view.$('li.all_aspects.radio')); - expect(this.view.$('li.all_aspects.radio').hasClass('selected')).toBeTruthy(); - expect(this.view.$('li.public.radio').hasClass('selected')).toBeFalsy(); - this.view._toggleRadio(this.view.$('li.public.radio')); - expect(this.view.$('li.all_aspects.radio').hasClass('selected')).toBeFalsy(); - expect(this.view.$('li.public.radio').hasClass('selected')).toBeTruthy(); - this.view._toggleRadio(this.view.$('li.all_aspects.radio')); - expect(this.view.$('li.all_aspects.radio').hasClass('selected')).toBeTruthy(); - expect(this.view.$('li.public.radio').hasClass('selected')).toBeFalsy(); + this.view._toggleRadio(this.view.$('li.all_aspects')); + expect(this.view.$('li.all_aspects').hasClass('selected')).toBeTruthy(); + expect(this.view.$('li.public').hasClass('selected')).toBeFalsy(); + this.view._toggleRadio(this.view.$('li.public')); + expect(this.view.$('li.all_aspects').hasClass('selected')).toBeFalsy(); + expect(this.view.$('li.public').hasClass('selected')).toBeTruthy(); + this.view._toggleRadio(this.view.$('li.all_aspects')); + expect(this.view.$('li.all_aspects').hasClass('selected')).toBeTruthy(); + expect(this.view.$('li.public').hasClass('selected')).toBeFalsy(); }); }); @@ -72,8 +72,8 @@ describe("app.views.AspectsDropdown", function(){ it('select aspects in the dropdown by a given list of ids', function() { this.ids = [this.view.$('li.aspect_selector:eq(1)').data('aspect_id'),'public']; this.view._selectAspects(this.ids); - expect(this.view.$('li.all_aspects.radio').hasClass('selected')).toBeFalsy(); - expect(this.view.$('li.public.radio').hasClass('selected')).toBeTruthy(); + expect(this.view.$('li.all_aspects').hasClass('selected')).toBeFalsy(); + expect(this.view.$('li.public').hasClass('selected')).toBeTruthy(); expect(this.view.$('li.aspect_selector:eq(0)').hasClass('selected')).toBeFalsy(); expect(this.view.$('li.aspect_selector:eq(1)').hasClass('selected')).toBeTruthy(); }); @@ -90,7 +90,7 @@ describe("app.views.AspectsDropdown", function(){ }); it('shows the name of the selected radio button', function() { - this.view.$('li.all_aspects.radio').addClass('selected'); + this.view.$('li.all_aspects').addClass('selected'); this.view._updateButton('inAspectClass'); expect(this.view.$('.btn.dropdown-toggle > .text').text()).toContain(Diaspora.I18n.t('aspect_dropdown.all_aspects')); }); diff --git a/spec/javascripts/app/views/notifications_view_spec.js b/spec/javascripts/app/views/notifications_view_spec.js index ab422515a..fc81403d3 100644 --- a/spec/javascripts/app/views/notifications_view_spec.js +++ b/spec/javascripts/app/views/notifications_view_spec.js @@ -40,7 +40,7 @@ describe("app.views.Notifications", function(){ }); it('changes the "all notifications" count', function() { - var badge = $('ul.nav > li:eq(0) .badge'); + var badge = $('ul.list-group > a:eq(0) .badge'); var count = parseInt(badge.text()); this.view.updateView(this.guid, this.type, true); @@ -51,7 +51,7 @@ describe("app.views.Notifications", function(){ }); it('changes the notification type count', function() { - var badge = $('ul.nav > li[data-type=' + this.type + '] .badge'); + var badge = $('ul.list-group > a[data-type=' + this.type + '] .badge'); var count = parseInt(badge.text()); this.view.updateView(this.guid, this.type, true); diff --git a/spec/javascripts/app/views/publisher_view_spec.js b/spec/javascripts/app/views/publisher_view_spec.js index 428fc7efa..d15719262 100644 --- a/spec/javascripts/app/views/publisher_view_spec.js +++ b/spec/javascripts/app/views/publisher_view_spec.js @@ -305,61 +305,37 @@ describe("app.views.Publisher", function() { spec.loadFixture("status_message_new"); Diaspora.I18n.load({ stream: { public: 'Public' }}); + this.view_aspect_selector = new app.views.PublisherAspectSelector({ + el: $('.public_toggle .aspect_dropdown'), + form: $('.content_creation form') + }); + this.view = new app.views.Publisher(); this.view.open(); - - this.radio_els = this.view.$('#publisher .aspect_dropdown li.radio'); - this.check_els = this.view.$('#publisher .aspect_dropdown li.aspect_selector'); - this.visibility_icon = this.view.$('#visibility-icon'); }); it("initializes with 'all_aspects'", function(){ - expect($('.aspect_dropdown li.public')).not.toHaveClass('selected'); - expect($('.aspect_dropdown li.all_aspects')).toHaveClass('selected'); - expect($('.aspect_dropdown li.aspect_selector')).not.toHaveClass('selected'); - expect($('#publisher #visibility-icon')).not.toHaveClass('globe'); expect($('#publisher #visibility-icon')).toHaveClass('lock'); }); - it("toggles the selected entry visually", function(){ - // click on the first aspect - var evt = $.Event("click", { target: $('.aspect_dropdown li.aspect_selector:first') }); - this.view.view_aspect_selector.toggleAspect(evt); - // public and "all aspects" are deselected - expect($('.aspect_dropdown li.public')).not.toHaveClass('selected'); - expect($('.aspect_dropdown li.all_aspects')).not.toHaveClass('selected'); - // the first aspect is selected - expect($('.aspect_dropdown li.aspect_selector:first')).toHaveClass('selected'); - // the last aspect is not selected - expect($('.aspect_dropdown li.aspect_selector:last')).not.toHaveClass('selected'); - // visibility icon is set to the lock icon - expect($('#publisher #visibility-icon')).not.toHaveClass('globe'); - expect($('#publisher #visibility-icon')).toHaveClass('lock'); + describe("toggles the selected entry visually", function(){ + it("click on the first aspect", function(){ + this.view.$('.aspect_dropdown li.aspect_selector:first').click(); + expect($('#publisher #visibility-icon')).not.toHaveClass('globe'); + expect($('#publisher #visibility-icon')).toHaveClass('lock'); + }); - // click on public - evt = $.Event("click", { target: $('.aspect_dropdown li.public') }); - this.view.view_aspect_selector.toggleAspect(evt); - // public is selected, "all aspects" is deselected - expect($('.aspect_dropdown li.public').hasClass('selected')).toBeTruthy(); - expect($('.aspect_dropdown li.all_aspects').hasClass('selected')).toBeFalsy(); - // the aspects are deselected - expect($('.aspect_dropdown li.aspect_selector').hasClass('selected')).toBeFalsy(); - // visibility icon is set to the globe icon - expect($('#publisher #visibility-icon').hasClass('globe')).toBeTruthy(); - expect($('#publisher #visibility-icon').hasClass('lock')).toBeFalsy(); - - // click on "all aspects" - evt = $.Event("click", { target: $('.aspect_dropdown li.all_aspects') }); - this.view.view_aspect_selector.toggleAspect(evt); - // public is deselected, "all aspects" is selected - expect($('.aspect_dropdown li.public').hasClass('selected')).toBeFalsy(); - expect($('.aspect_dropdown li.all_aspects').hasClass('selected')).toBeTruthy(); - // the aspects are deselected - expect($('.aspect_dropdown li.aspect_selector').hasClass('selected')).toBeFalsy(); - // visibility icon is set to the lock icon - expect($('#publisher #visibility-icon').hasClass('globe')).toBeFalsy(); - expect($('#publisher #visibility-icon').hasClass('lock')).toBeTruthy(); + it("click on public", function(){ + this.view.$('.aspect_dropdown li.public').click(); + expect($('#publisher #visibility-icon')).toHaveClass('globe'); + expect($('#publisher #visibility-icon')).not.toHaveClass('lock'); + }); + + it("click on 'all aspects'", function(){ + expect($('#publisher #visibility-icon')).not.toHaveClass('globe'); + expect($('#publisher #visibility-icon')).toHaveClass('lock'); + }); }); describe("hidden form elements", function(){ |