mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
try to get rid of scrollbars in Frost
This commit is contained in:
parent
5cb618bcf1
commit
193cc2c537
11 changed files with 65 additions and 4 deletions
1
view/theme/frost/js/jquery.divgrow-1.3.1.min.js
vendored
Normal file
1
view/theme/frost/js/jquery.divgrow-1.3.1.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
(function ($) { var divgrowid = 0; $.fn.divgrow = function (options) { var options = $.extend({}, { initialHeight: 100, moreText: "+ Show More", lessText: "- Show Less", speed: 1000, showBrackets: true }, options); return this.each(function () { divgrowid++; obj = $(this); var fullHeight = obj.height() + 10; obj.css('height', options.initialHeight).css('overflow', 'hidden'); if (options.showBrackets) { obj.after('<p class="divgrow-brackets">[…]</p><a href="#" class="divgrow-showmore' + " divgrow-obj-" + divgrowid + '"' + '></a>') } else { obj.after('<a href="#" class="divgrow-showmore' + " divgrow-obj-" + divgrowid + '"' + '></a>') } $("a.divgrow-showmore").html(options.moreText); $("." + "divgrow-obj-" + divgrowid).toggle(function () { $(this).prevAll("div:first").animate({ height: fullHeight + "px" }, options.speed, function () { if (options.showBrackets) { $(this).nextAll("p.divgrow-brackets:first").fadeOut() } $(this).nextAll("a.divgrow-showmore:first").html(options.lessText) }) }, function () { $(this).prevAll("div:first").stop(true, false).animate({ height: options.initialHeight }, options.speed, function () { if (options.showBrackets) { $(this).nextAll("p.divgrow-brackets:first").stop(true, false).fadeIn() } $(this).nextAll("a.divgrow-showmore:first").stop(true, false).html(options.moreText) }) }) }) } })(jQuery);
|
|
@ -342,6 +342,33 @@
|
|||
}
|
||||
/* autocomplete @nicknames */
|
||||
$j(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl");
|
||||
|
||||
var bimgs = $j(".wall-item-body > img").not(function() { return this.complete; });
|
||||
var bimgcount = bimgs.length;
|
||||
|
||||
if (bimgcount) {
|
||||
bimgs.load(function() {
|
||||
bimgcount--;
|
||||
if (! bimgcount) {
|
||||
collapseHeight();
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
collapseHeight();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function collapseHeight() {
|
||||
$j(".wall-item-body").each(function() {
|
||||
if($j(this).height() > 410) {
|
||||
if(! $j(this).hasClass('divmore')) {
|
||||
$j(this).divgrow({ initialHeight: 400, showBrackets: false, speed: 300 });
|
||||
$j(this).addClass('divmore');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
2
view/theme/frost/js/main.min.js
vendored
2
view/theme/frost/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue