diff options
author | friendica <info@friendica.com> | 2014-11-17 23:48:03 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-11-17 23:48:03 -0800 |
commit | db3015e34ed3827e68d8debc70321ed6df5dc699 (patch) | |
tree | 776e7bf5b437e381e68f7f220d343d585a7cd88d /view | |
parent | 7b39fac5f07cd2e85e4e978de8b259d40c03a173 (diff) | |
download | volse-hubzilla-db3015e34ed3827e68d8debc70321ed6df5dc699.tar.gz volse-hubzilla-db3015e34ed3827e68d8debc70321ed6df5dc699.tar.bz2 volse-hubzilla-db3015e34ed3827e68d8debc70321ed6df5dc699.zip |
allow members to set the per-item "show more" height (separately for network and matrix, display and search are system pages and therefore set at 400)
Diffstat (limited to 'view')
-rw-r--r-- | view/js/main.js | 20 | ||||
-rwxr-xr-x | view/tpl/settings_display.tpl | 2 |
2 files changed, 6 insertions, 16 deletions
diff --git a/view/js/main.js b/view/js/main.js index 9b5c1b1b2..8939f4a09 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -207,6 +207,7 @@ var loadingPage = true; var pageHasMoreContent = true; var updateCountsOnly = false; + var divmore_height = 400; $(function() { $.ajaxSetup({cache: false}); @@ -591,27 +592,14 @@ function updateConvItems(mode,data) { function collapseHeight() { - var isListMode = false; - $(".wall-item-listbody").each(function() { - isListMode = true; - if($(this).height() > 210) { + $(".wall-item-body").each(function() { + if($(this).height() > divmore_height + 10) { if(! $(this).hasClass('divmore')) { - $(this).divgrow({ initialHeight: 200, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false }); + $(this).divgrow({ initialHeight: divmore_height, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false }); $(this).addClass('divmore'); } } }); - - $(".wall-item-body").each(function() { - if(! isListMode) { - if($(this).height() > 410) { - if(! $(this).hasClass('divmore')) { - $(this).divgrow({ initialHeight: 400, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false }); - $(this).addClass('divmore'); - } - } - } - }); } function liveUpdate() { diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl index 8e870ba0e..8bf4dc0cc 100755 --- a/view/tpl/settings_display.tpl +++ b/view/tpl/settings_display.tpl @@ -11,6 +11,8 @@ {{/if}} {{include file="field_input.tpl" field=$ajaxint}} {{include file="field_input.tpl" field=$itemspage}} +{{include file="field_input.tpl" field=$channel_divmore_height}} +{{include file="field_input.tpl" field=$network_divmore_height}} {{include file="field_checkbox.tpl" field=$nosmile}} {{include file="field_checkbox.tpl" field=$title_tosource}} {{include file="field_checkbox.tpl" field=$channel_list_mode}} |