aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorStefan Parviainen <saparvia@caterva.eu>2015-01-05 17:10:08 +0100
committerStefan Parviainen <saparvia@caterva.eu>2015-01-05 17:10:08 +0100
commit7791d28a5d24193a01ce004988ba6767f45835ba (patch)
tree767d2516dbf89697e1b590382e266d3361a82a84 /view
parent074be42e234a9d44ffe7875ffef6eb7a5e22f013 (diff)
downloadvolse-hubzilla-7791d28a5d24193a01ce004988ba6767f45835ba.tar.gz
volse-hubzilla-7791d28a5d24193a01ce004988ba6767f45835ba.tar.bz2
volse-hubzilla-7791d28a5d24193a01ce004988ba6767f45835ba.zip
Replace divgrow with more modern readmore.js
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js10
-rw-r--r--view/php/theme_init.php2
2 files changed, 5 insertions, 7 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 8c48bbb72..80518768e 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -596,12 +596,10 @@ function updateConvItems(mode,data) {
function collapseHeight() {
$(".wall-item-body, .contact-info").each(function() {
- if($(this).height() > divmore_height + 10) {
- if(! $(this).hasClass('divmore')) {
- $(this).divgrow({ initialHeight: divmore_height, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false });
- $(this).addClass('divmore');
- }
- }
+ if(! $(this).hasClass('divmore')) {
+ $(this).readmore({collapsedHeight: divmore_height, moreLink: '<a href="#">'+aStr['divgrowmore']+'</a>', lessLink: '<a href="#">'+aStr['divgrowless']+'</a>'});
+ $(this).addClass('divmore');
+ }
});
}
diff --git a/view/php/theme_init.php b/view/php/theme_init.php
index 33b7e87dc..9a545470f 100644
--- a/view/php/theme_init.php
+++ b/view/php/theme_init.php
@@ -25,7 +25,7 @@ head_add_js('autocomplete.js');
head_add_js('library/jquery-textcomplete/jquery.textcomplete.js');
head_add_js('library/fancybox/jquery.fancybox-1.3.4.js');
head_add_js('library/jquery.timeago.js');
-head_add_js('library/jquery.divgrow/jquery.divgrow-1.3.1.js');
+head_add_js('library/readmore.js/readmore.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');