Browse Source

Button to collapse all open posts

nin-v2
myleneb 9 years ago
parent
commit
b26d1f0d88
  1. 34
      css/style.css
  2. 35
      js/theme_option.js
  3. 3
      sass/base/_fonts.sass
  4. 20
      sass/layout/_groupchat.sass
  5. 2
      sass/layout/_responsive.sass
  6. 5
      sass/style.sass

34
css/style.css

@ -114,7 +114,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, @@ -114,7 +114,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu,
font-weight: normal;
font-style: normal;
}
.ion:before, .userMenu li.userMenu-config > a:before, .modal-header span:before, .prompt-wrapper .modal-header span:before, .direct-messages-thread + .group-messages-control .invite-form .modal-header span:before, .mini-profile .post-area .modal-header span:before, .prompt-wrapper .switch-mode:before, .direct-messages-thread + .group-messages-control .invite-form .switch-mode:before, .mini-profile .post-area.display .switch-mode:before, .bitmessage-ctc:before, .tox-ctc:before, .profile-modal .profile-tox:before, .profile-modal .profile-bitmessage:before, .post-retransmited-icon:before, .post-interactions span:before, .post-stats li.stat-count:before, .mini-profile-indicators .userMenu-connections a:before, .mini-profile-indicators .userMenu-messages a:before, .mini-profile-indicators .userMenu-user a:before, .mini-profile-indicators .userMenu-groupmessages a:before, .twister-user-remove:before, .refresh-toptrends:before, .twistday-reminder .refresh:before, .refresh-users:before, .view-all-users:before, .ion-after:after, .isFollowing:after, .direct-messages-list .post:after {
.ion:before, .userMenu li.userMenu-config > a:before, .modal-header span:before, .prompt-wrapper .modal-header span:before, .direct-messages-thread + .group-messages-control .invite-form .modal-header span:before, .mini-profile .post-area .modal-header span:before, .prompt-wrapper .switch-mode:before, .direct-messages-thread + .group-messages-control .invite-form .switch-mode:before, .mini-profile .post-area.display .switch-mode:before, .bitmessage-ctc:before, .tox-ctc:before, .profile-modal .profile-tox:before, .profile-modal .profile-bitmessage:before, .post-retransmited-icon:before, .post-interactions span:before, .post-stats li.stat-count:before, .mini-profile-indicators .userMenu-connections a:before, .mini-profile-indicators .userMenu-messages a:before, .mini-profile-indicators .userMenu-user a:before, .mini-profile-indicators .userMenu-groupmessages a:before, .mini-profile-indicators .userMenu-collapsePosts a:before, .twister-user-remove:before, .refresh-toptrends:before, .twistday-reminder .refresh:before, .refresh-users:before, .view-all-users:before, .ion-after:after, .isFollowing:after, .direct-messages-list .post:after {
display: inline-block;
font-family: "Ionicons";
speak: none;
@ -128,11 +128,11 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, @@ -128,11 +128,11 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu,
-moz-osx-font-smoothing: grayscale;
}
.ion:before, .userMenu li.userMenu-config > a:before, .modal-header span:before, .prompt-wrapper .modal-header span:before, .direct-messages-thread + .group-messages-control .invite-form .modal-header span:before, .mini-profile .post-area .modal-header span:before, .prompt-wrapper .switch-mode:before, .direct-messages-thread + .group-messages-control .invite-form .switch-mode:before, .mini-profile .post-area.display .switch-mode:before, .bitmessage-ctc:before, .tox-ctc:before, .profile-modal .profile-tox:before, .profile-modal .profile-bitmessage:before, .post-retransmited-icon:before, .post-interactions span:before, .post-stats li.stat-count:before, .mini-profile-indicators .userMenu-connections a:before, .mini-profile-indicators .userMenu-messages a:before, .mini-profile-indicators .userMenu-user a:before, .mini-profile-indicators .userMenu-groupmessages a:before, .twister-user-remove:before, .refresh-toptrends:before, .twistday-reminder .refresh:before, .refresh-users:before, .view-all-users:before {
.ion:before, .userMenu li.userMenu-config > a:before, .modal-header span:before, .prompt-wrapper .modal-header span:before, .direct-messages-thread + .group-messages-control .invite-form .modal-header span:before, .mini-profile .post-area .modal-header span:before, .prompt-wrapper .switch-mode:before, .direct-messages-thread + .group-messages-control .invite-form .switch-mode:before, .mini-profile .post-area.display .switch-mode:before, .bitmessage-ctc:before, .tox-ctc:before, .profile-modal .profile-tox:before, .profile-modal .profile-bitmessage:before, .post-retransmited-icon:before, .post-interactions span:before, .post-stats li.stat-count:before, .mini-profile-indicators .userMenu-connections a:before, .mini-profile-indicators .userMenu-messages a:before, .mini-profile-indicators .userMenu-user a:before, .mini-profile-indicators .userMenu-groupmessages a:before, .mini-profile-indicators .userMenu-collapsePosts a:before, .twister-user-remove:before, .refresh-toptrends:before, .twistday-reminder .refresh:before, .refresh-users:before, .view-all-users:before {
padding: 0 3px;
}
.ion:after, .userMenu li.userMenu-config > a:after, .modal-header span:after, .prompt-wrapper .modal-header span:after, .direct-messages-thread + .group-messages-control .invite-form .modal-header span:after, .mini-profile .post-area .modal-header span:after, .prompt-wrapper .switch-mode:after, .direct-messages-thread + .group-messages-control .invite-form .switch-mode:after, .mini-profile .post-area.display .switch-mode:after, .bitmessage-ctc:after, .tox-ctc:after, .profile-modal .profile-tox:after, .profile-modal .profile-bitmessage:after, .post-retransmited-icon:after, .post-interactions span:after, .post-stats li.stat-count:after, .mini-profile-indicators .userMenu-connections a:after, .mini-profile-indicators .userMenu-messages a:after, .mini-profile-indicators .userMenu-user a:after, .mini-profile-indicators .userMenu-groupmessages a:after, .twister-user-remove:after, .refresh-toptrends:after, .twistday-reminder .refresh:after, .refresh-users:after, .view-all-users:after, .ion-after:before, .isFollowing:before, .direct-messages-list .post:before {
.ion:after, .userMenu li.userMenu-config > a:after, .modal-header span:after, .prompt-wrapper .modal-header span:after, .direct-messages-thread + .group-messages-control .invite-form .modal-header span:after, .mini-profile .post-area .modal-header span:after, .prompt-wrapper .switch-mode:after, .direct-messages-thread + .group-messages-control .invite-form .switch-mode:after, .mini-profile .post-area.display .switch-mode:after, .bitmessage-ctc:after, .tox-ctc:after, .profile-modal .profile-tox:after, .profile-modal .profile-bitmessage:after, .post-retransmited-icon:after, .post-interactions span:after, .post-stats li.stat-count:after, .mini-profile-indicators .userMenu-connections a:after, .mini-profile-indicators .userMenu-messages a:after, .mini-profile-indicators .userMenu-user a:after, .mini-profile-indicators .userMenu-groupmessages a:after, .mini-profile-indicators .userMenu-collapsePosts a:after, .twister-user-remove:after, .refresh-toptrends:after, .twistday-reminder .refresh:after, .refresh-users:after, .view-all-users:after, .ion-after:before, .isFollowing:before, .direct-messages-list .post:before {
display: none;
}
@ -220,6 +220,10 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, @@ -220,6 +220,10 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu,
content: "";
}
.ion-arrow-shrink:before, .mini-profile-indicators .userMenu-collapsePosts a:before {
content: "";
}
/* FONTS */
* {
outline: none !important;
@ -1667,6 +1671,26 @@ button.light:hover, .light.show-more-followers:hover, a.button.light:hover { @@ -1667,6 +1671,26 @@ button.light:hover, .light.show-more-followers:hover, a.button.light:hover {
.groupMessages button, .groupMessages .show-more-followers {
margin: 5px;
}
.groupMessages .direct-messages-list li {
padding: 10px 20px;
}
.groupMessages .direct-messages-list .post-photo {
display: none;
}
.groupMessages .direct-messages-list .post-text {
display: none;
}
.groupMessages .direct-messages-list .post-info-time {
position: static;
display: block;
text-align: left;
padding: 5px 0;
color: inherit;
}
.groupMessages .direct-messages-list .post-info-time:hover {
text-decoration: none;
color: inherit;
}
.group-messages-new-group {
text-align: center !important;
@ -2306,7 +2330,7 @@ ul.userMenu-search-profiles button, ul.userMenu-search-profiles .show-more-follo @@ -2306,7 +2330,7 @@ ul.userMenu-search-profiles button, ul.userMenu-search-profiles .show-more-follo
.mini-profile-indicators li a {
color: #57545d;
display: block;
padding: 1rem 0;
padding: 0.5rem 0;
}
.mini-profile-indicators li a:hover {
color: #3E3C42;
@ -2921,7 +2945,7 @@ ul.dropdown-menu li > li > a { @@ -2921,7 +2945,7 @@ ul.dropdown-menu li > li > a {
margin: 0;
float: left;
}
.mini-profile-indicators li.userMenu-user {
.mini-profile-indicators li.userMenu-user, .mini-profile-indicators li.userMenu-collapsePosts {
display: none;
}

35
js/theme_option.js

@ -37,8 +37,6 @@ $(document).ready(function() @@ -37,8 +37,6 @@ $(document).ready(function()
$('#postboard-top').addClass(promotedPostsOnly ? "hide" : "show");
});
if (/\/options.html$/i.test(document.location))
$(document).ready(localizeLabels);
@ -47,31 +45,32 @@ $(document).ready(function() @@ -47,31 +45,32 @@ $(document).ready(function()
});
// Collapse all .post.open
var allPostButton = $('<li></li>').addClass('userMenu-collapsePosts').append('<a href="#">Collapse All</a>');
$('.mini-profile-indicators').append(allPostButton);
$(allPostButton).children('a').on('click', function(e) {
var allPost = $('#posts .post.open');
allPost.each(function(){
if (e.button === 0 && window.getSelection() == 0)
postExpandFunction(e, $(this));
});
return false
});
});
function testRightSide() { // if rightside is empty, don't show it and engarge postboard
if( ( $('.toptrends').html() == '' ) && ($('.who-to-follow').html() == '') && ( $('.twistday-reminder').html() == '' ) ){
$('.dashboard.right').css('display: none');
$('.wrapper .postboard').addClass('large');
}
else {
$('.dashboard.right').css('display: block');
$('.wrapper .postboard').removeClass('large');
}
}
function reOrganizeTemplates() { // for nin's templating
reAppendModules();
@ -85,6 +84,7 @@ function reOrganizeTemplates() { // for nin's templating @@ -85,6 +84,7 @@ function reOrganizeTemplates() { // for nin's templating
//group chat
$('.mini-profile-indicators li.userMenu-groupmessages a span:last-child ').html('Group Msg');
$('button.invite').html('invite');
$('button.leave').html('leave');
$('.secret-key').attr('title', 'copy secret key');
@ -113,8 +113,8 @@ function reOrganizeTemplates() { // for nin's templating @@ -113,8 +113,8 @@ function reOrganizeTemplates() { // for nin's templating
else {$('.mini-profile .post-area').removeClass('display');}
return false;
});
// new post prompt
// new post prompt
$('<div><h3>New post</h3><span class="modal-close prompt-close"></span></div>')
.addClass('modal-header')
.prependTo('.mini-profile .post-area');
@ -127,6 +127,7 @@ function reOrganizeTemplates() { // for nin's templating @@ -127,6 +127,7 @@ function reOrganizeTemplates() { // for nin's templating
});
// button "follow" in search
// not very nice but works
$('li:not(.twister-user) button.follow').html('+').attr('title',polyglot.t('Follow'));
$('li:not(.twister-user) button.follow')
.on("eventToggleFollow", function() {
@ -137,20 +138,17 @@ function reOrganizeTemplates() { // for nin's templating @@ -137,20 +138,17 @@ function reOrganizeTemplates() { // for nin's templating
});
}
// Close new post prompt with esc key
$(document).keyup(function(e) {
if (e.keyCode == 27) {$('.mini-profile .post-area').removeClass('display');}
});
function reAppendModules() { // avoid w1200 things
$('.module.toptrends').detach().appendTo($('.dashboard.right'));
$('.module.who-to-follow').detach().appendTo($('.dashboard.right'));
$('.module.twistday-reminder').detach().appendTo($('.dashboard.right'));
}
function newLoader() { // create divs for new loader
$('<div></div>').appendTo('.postboard-loading');
$('<div></div>').appendTo('.postboard-loading');
@ -197,9 +195,6 @@ function openModal(modal) { @@ -197,9 +195,6 @@ function openModal(modal) {
modal.self.outerHeight(windowHeight);
modal.self.css('margin-top', - windowHeight / 2);
}
}
return modal;
}

3
sass/base/_fonts.sass

@ -150,3 +150,6 @@ @@ -150,3 +150,6 @@
.ion-android-contacts:before
content: "\f2d9"
.ion-arrow-shrink:before
content: "\f267"

20
sass/layout/_groupchat.sass

@ -22,6 +22,26 @@ @@ -22,6 +22,26 @@
button
margin: 5px
.direct-messages-list
li
padding: 10px 20px
.post-photo
display: none
.post-text
display: none
.post-info-time
position: static
display: block
text-align: left
padding: 5px 0
color: inherit
&:hover
text-decoration: none
color: inherit
// new group
.group-messages-new-group

2
sass/layout/_responsive.sass

@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
margin: 0
float: left
&.userMenu-user
&.userMenu-user, &.userMenu-collapsePosts
display: none
.who-follow

5
sass/style.sass

@ -205,7 +205,7 @@ ul.userMenu-search-profiles @@ -205,7 +205,7 @@ ul.userMenu-search-profiles
a
color: lighten($dark-grey,10%)
display: block
padding: 1rem 0
padding: .5rem 0
&:hover
color: $dark-grey
background: $bloc-light-color
@ -226,6 +226,9 @@ ul.userMenu-search-profiles @@ -226,6 +226,9 @@ ul.userMenu-search-profiles
.userMenu-groupmessages a
@extend .ion-android-contacts
@extend .ion
.userMenu-collapsePosts a
@extend .ion
@extend .ion-arrow-shrink
.messages-qtd
position: absolute
top: 5px

Loading…
Cancel
Save