From e2f1ce775860b1bb1ce23b9229d85aed4c748aea Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 15 Dec 2016 14:49:14 +0100 Subject: note widget: whitespace and resize the textarea to reveal full content --- view/css/widgets.css | 2 +- view/tpl/notes.tpl | 47 ++++++++++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 22 deletions(-) (limited to 'view') diff --git a/view/css/widgets.css b/view/css/widgets.css index 402c3f473..abaf03038 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -65,7 +65,7 @@ li:hover .widget-nav-pills-icons { padding: 5px; width: 100%; resize: vertical; - height: 250px; + min-height: 250px; } /* saved searches */ diff --git a/view/tpl/notes.tpl b/view/tpl/notes.tpl index 0e8c8017c..f9fed1feb 100644 --- a/view/tpl/notes.tpl +++ b/view/tpl/notes.tpl @@ -1,27 +1,32 @@
- + $(document).on('focusin',"#note-text",function(e){ + noteSaveTimer = setTimeout(noteSaveChanges,10000); + }); -

{{$banner}}

- + function notePostFinal() { + $.post('notes/sync', { 'note_text' : $('#note-text').val() }); + } + + function noteSaveChanges() { + $.post('notes', { 'note_text' : $('#note-text').val() }); + noteSaveTimer = setTimeout(noteSaveChanges,10000); + } +
-- cgit v1.2.3 From 6bde70d60a02e9e461bc8cb6dcb475778c435fec Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 16 Dec 2016 16:14:01 +0100 Subject: move the sticky-kit^Cquery plugin to /lib and see if we want this for the whole app --- view/js/main.js | 2 ++ view/php/default.php | 2 +- view/php/theme_init.php | 1 + view/theme/redbasic/js/redbasic.js | 17 +++++++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 1d6eca91d..5d6867c94 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -666,6 +666,8 @@ function updateConvItems(mode,data) { $('.item_' + bParam_mid.substring(0,32)).addClass('item-highlight'); } + $(document.body).trigger("sticky_kit:recalc"); + } function collapseHeight() { diff --git a/view/php/default.php b/view/php/default.php index f5be4fa35..839a36b5b 100644 --- a/view/php/default.php +++ b/view/php/default.php @@ -10,7 +10,7 @@
- +
diff --git a/view/php/theme_init.php b/view/php/theme_init.php index 46aadaa7d..1fb07ae4f 100644 --- a/view/php/theme_init.php +++ b/view/php/theme_init.php @@ -26,6 +26,7 @@ head_add_js('library/jquery-textcomplete/jquery.textcomplete.js'); //head_add_js('library/colorbox/jquery.colorbox.js'); head_add_js('library/jquery.timeago.js'); head_add_js('library/readmore.js/readmore.js'); +head_add_js('library/sticky-kit/sticky-kit.min.js'); //head_add_js('library/jquery_ac/friendica.complete.js'); //head_add_js('library/tiptip/jquery.tipTip.minified.js'); head_add_js('library/jgrowl/jquery.jgrowl_minimized.js'); diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index c5f74db3f..c3c2c7e3f 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -16,6 +16,23 @@ $(document).ready(function() { } $('#css3-calc').remove(); // Remove the test element + if($(window).outerWidth() > 767) { + $('#left_aside_wrapper').stick_in_parent({ + offset_top: $('nav').outerHeight(true) + }); + } + + $(window).resize(function() { + if($(window).outerWidth() > 767) { + $('#left_aside_wrapper').stick_in_parent({ + offset_top: $('nav').outerHeight(true) + }); + } + else { + $('#left_aside_wrapper').trigger("sticky_kit:detach"); + } + }); + $('#expand-aside').click(function() { $('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left'); $('main').toggleClass('region_1-on'); -- cgit v1.2.3 From dc34bf18bb75b8be3bf94c2189701b3e847932ac Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 16 Dec 2016 16:24:17 +0100 Subject: retrigger after fullscreen --- view/theme/redbasic/js/redbasic.js | 1 + 1 file changed, 1 insertion(+) (limited to 'view') diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index c3c2c7e3f..8fb1117ce 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -89,5 +89,6 @@ function makeFullScreen(full) { $('#tabs-collapse-1').css({'visibility': ''}); $('#inline-btn').hide(); $('main').css({'transition': ''}); + $(document.body).trigger("sticky_kit:recalc"); } } -- cgit v1.2.3 From 6eed7eb54054502d438ea18a9411d3be7cdf14fc Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 16 Dec 2016 22:50:19 +0100 Subject: display inline instead of floating --- view/js/main.js | 1 - view/theme/redbasic/css/style.css | 16 ++++++---------- view/tpl/micropro_img.tpl | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 5d6867c94..534029275 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1166,7 +1166,6 @@ function preview_mail() { return true; } - function unpause() { // unpause auto reloads if they are currently stopped totStopped = false; diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 3ae52d5cc..f5998c5f6 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -473,7 +473,6 @@ footer { #contact-block { width: 100%; - float: left; } #contact-block-numcontacts { @@ -482,12 +481,10 @@ footer { } .contact-block-div { - float: left; - width: 50px; - height: 50px; + display: inline; } + .contact-block-textdiv { - float: left; width: 150px; height: 34px; } @@ -495,12 +492,11 @@ footer { #contact-block-end { clear: both; } -.contact-block-link { - float: left; -} + .contact-block-img { - width:48px; - height:48px; + width:47px; + height:47px; + margin-bottom: 3px; } #tag-remove { diff --git a/view/tpl/micropro_img.tpl b/view/tpl/micropro_img.tpl index 23b7bd281..a7c5973f3 100755 --- a/view/tpl/micropro_img.tpl +++ b/view/tpl/micropro_img.tpl @@ -1 +1 @@ -
{{$name}}
+
-- cgit v1.2.3 From 827d4c5fb094715a65d4559f8c6159eb5d31d5f7 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 16 Dec 2016 19:54:07 -0800 Subject: use lock colour to indicate that permissions have been set by the software to something you might not expect rather than an exclamation mark. This may not be the best colour in this page context, but it serves the intended purpose. Perhaps orange might be less intrusive and still convey the desired information. --- view/js/acl.js | 1 + view/theme/redbasic/css/style.css | 5 +++++ view/tpl/jot.tpl | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'view') diff --git a/view/js/acl.js b/view/js/acl.js index c11997c43..4dd60d303 100644 --- a/view/js/acl.js +++ b/view/js/acl.js @@ -276,6 +276,7 @@ ACL.prototype.update_view = function(value) { /* jot acl */ $('#jot-perms-icon, #dialog-perms-icon, #' + that.form_id[0].id + ' .jot-perms-icon').removeClass('fa-lock').addClass('fa-unlock'); + $('#jot-perms-icon').removeClass('jot-lock-warn'); $('#dbtn-jotnets').show(); $('.profile-jot-net input').attr('disabled', false); diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 3ae52d5cc..5f5df808f 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1267,6 +1267,11 @@ img.mail-conv-sender-photo { color: $toolicon_colour; } +.jot-icons.jot-lock-warn { + color: red; +} + + /* conversation */ .nsfw-wrap { text-align: center; diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index a3bfad842..377eef453 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -180,7 +180,7 @@ {{/if}} {{if $showacl}} {{/if}} -- cgit v1.2.3 From e1819a874f334185e379db9390d493d12273704b Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 16 Dec 2016 22:47:25 -0800 Subject: use darkorange. --- view/theme/redbasic/css/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view') diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 9bc39dfb4..8a38c68f3 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1264,7 +1264,7 @@ img.mail-conv-sender-photo { } .jot-icons.jot-lock-warn { - color: red; + color: darkorange; } -- cgit v1.2.3 From 92f3d863fa4a8a96d4f882a91a81d888a58230e5 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 18 Dec 2016 16:26:00 -0800 Subject: re-factor item_photo_menu - there is some room for future development, currently it was made compatible with minimal template changes --- view/tpl/conv_item.tpl | 17 +++++++++++++---- view/tpl/search_item.tpl | 13 ++++++++++--- 2 files changed, 23 insertions(+), 7 deletions(-) (limited to 'view') diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 35c3d18e7..b5ff475b2 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -166,18 +166,27 @@ {{if $item.star}}
  • {{$item.star.toggle}}
  • {{/if}} + + {{if $item.thread_action_menu}} + {{foreach $item.thread_action_menu as $mitem}} +
  • {{$mitem.title}}
  • + {{/foreach}} + {{/if}} + {{if $item.drop.dropping}}
  • {{$item.drop.delete}}
  • {{/if}} - {{if $item.item_photo_menu}} + + {{if $item.thread_author_menu}} - {{$item.item_photo_menu}} + {{foreach $item.thread_author_menu as $mitem}} +
  • {{$mitem.title}}
  • + {{/foreach}} + {{/if}} {{if $item.edpost && $item.dreport}}
  • {{$item.dreport}}
  • {{/if}} - - {{/if}} diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl index 51fa8b8dc..a490cb473 100755 --- a/view/tpl/search_item.tpl +++ b/view/tpl/search_item.tpl @@ -74,13 +74,20 @@ {{if $item.attachments}} -- cgit v1.2.3 From 9c5f2de4ec28ad3878fc565485d8d544caa8c66a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 19 Dec 2016 09:48:01 +0100 Subject: this is not needed --- view/js/main.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 534029275..bfe9d25a3 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -666,8 +666,6 @@ function updateConvItems(mode,data) { $('.item_' + bParam_mid.substring(0,32)).addClass('item-highlight'); } - $(document.body).trigger("sticky_kit:recalc"); - } function collapseHeight() { -- cgit v1.2.3 From 3ad3d3037f8ba9643952bbf64e70c5edf302a73b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 19 Dec 2016 12:46:36 +0100 Subject: make sticky aside available for small screens. we had to get rid of the transition effect for this to work reliably --- view/theme/redbasic/css/style.css | 10 ++++++---- view/theme/redbasic/js/redbasic.js | 38 +++++++++++++++++++++----------------- view/theme/redbasic/php/style.php | 2 +- 3 files changed, 28 insertions(+), 22 deletions(-) (limited to 'view') diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 8a38c68f3..c66b040a4 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -22,6 +22,8 @@ body { color: $font_colour; margin: 0px; height: 100%; + overflow-x: hidden; + } aside { @@ -30,6 +32,10 @@ aside { max-width: $aside_widthpx; } +aside#region_1 { + border-right: 1px solid transparent; +} + main { margin-left: auto; margin-right: auto; @@ -1838,10 +1844,6 @@ nav .badge.mail-update:hover { border-right: 1px solid $nav_bd; } - main { - transition: all 0.25s ease-in-out; - } - main { left: -$aside_widthpx; width: calc( 100% + $aside_widthpx ); diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 8fb1117ce..4a18db8ff 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -8,34 +8,32 @@ $(document).ready(function() { if( $('#css3-calc').width() == 10) { $(window).resize(function() { if($(window).width() < 767) { - $('main').css('width', $(window).width() + 287 ); + $('main').css('width', $(window).width() + $('aside').outerWidth() ); } else { $('main').css('width', '100%' ); } }); } + $('#css3-calc').remove(); // Remove the test element - if($(window).outerWidth() > 767) { - $('#left_aside_wrapper').stick_in_parent({ - offset_top: $('nav').outerHeight(true) - }); - } + $('#left_aside_wrapper').stick_in_parent({ + offset_top: $('nav').outerHeight(true) + }); - $(window).resize(function() { - if($(window).outerWidth() > 767) { - $('#left_aside_wrapper').stick_in_parent({ - offset_top: $('nav').outerHeight(true) - }); - } - else { - $('#left_aside_wrapper').trigger("sticky_kit:detach"); + $('#expand-aside').on('click', toggleAside); + + $('section').on('click', function() { + if($('main').hasClass('region_1-on')){ + toggleAside(); } }); - $('#expand-aside').click(function() { - $('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left'); - $('main').toggleClass('region_1-on'); + $(window).on('scroll', function() { + if($('main').hasClass('region_1-on') && $(window).scrollLeft() > 5){ + $(window).scrollLeft(0); + toggleAside(); + } }); if($('aside').length && $('aside').html().length === 0) { @@ -92,3 +90,9 @@ function makeFullScreen(full) { $(document.body).trigger("sticky_kit:recalc"); } } + +function toggleAside() { + $(window).scroll(); + $('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left'); + $('main').toggleClass('region_1-on'); +} diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 2db0d4c44..9b994ebdf 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -165,7 +165,7 @@ if(file_exists('view/theme/redbasic/css/style.css')) { $x .= $schemecss; } - $aside_width = 287; + $aside_width = 288; // left aside and right aside are 285px + converse width if($align_left) { -- cgit v1.2.3