1
0
Fork 0

try to get rid of scrollbars in Frost

This commit is contained in:
Zach Prezkuta 2012-08-25 22:41:22 -06:00
parent 5cb618bcf1
commit 193cc2c537
11 changed files with 65 additions and 4 deletions

View file

@ -116,7 +116,7 @@ function oembed_format_object($j){
if (isset($j->provider_name)) $ret.=" on ".$j->provider_name; if (isset($j->provider_name)) $ret.=" on ".$j->provider_name;
} else { } else {
// add <a> for html2bbcode conversion // add <a> for html2bbcode conversion
$ret .= "<a href='$embedurl' rel='oembed'/>"; $ret .= "<a href='$embedurl' rel='oembed'></a>";
} }
$ret.="<br style='clear:left'></span>"; $ret.="<br style='clear:left'></span>";
return mb_convert_encoding($ret, 'HTML-ENTITIES', mb_detect_encoding($ret)); return mb_convert_encoding($ret, 'HTML-ENTITIES', mb_detect_encoding($ret));

View file

@ -7,6 +7,7 @@
</script>--> </script>-->
<script type="text/javascript" src="$baseurl/js/jquery.js" ></script> <script type="text/javascript" src="$baseurl/js/jquery.js" ></script>
<script type="text/javascript">var $j = jQuery.noConflict();</script> <script type="text/javascript">var $j = jQuery.noConflict();</script>
<script type="text/javascript" src="$baseurl/view/theme/frost/js/jquery.divgrow-1.3.1.min.js" ></script>
<script type="text/javascript" src="$baseurl/js/jquery.textinputs.js" ></script> <script type="text/javascript" src="$baseurl/js/jquery.textinputs.js" ></script>
<script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/fk.autocomplete.min.js" ></script> <script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/fk.autocomplete.min.js" ></script>
<!--<script type="text/javascript" src="$baseurl/library/fancybox/jquery.fancybox-1.3.4.pack.js"></script>--> <!--<script type="text/javascript" src="$baseurl/library/fancybox/jquery.fancybox-1.3.4.pack.js"></script>-->

View 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">[&hellip;]</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);

View file

@ -349,6 +349,33 @@
} }
/* autocomplete @nicknames */ /* autocomplete @nicknames */
$j(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl"); $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() > 310) {
if(! $j(this).hasClass('divmore')) {
$j(this).divgrow({ initialHeight: 300, showBrackets: false, speed: 300 });
$j(this).addClass('divmore');
}
}
}); });
} }

File diff suppressed because one or more lines are too long

View file

@ -7,6 +7,7 @@
</script> </script>
<script type="text/javascript" src="$baseurl/js/jquery.js" ></script> <script type="text/javascript" src="$baseurl/js/jquery.js" ></script>
<script type="text/javascript">var $j = jQuery.noConflict();</script> <script type="text/javascript">var $j = jQuery.noConflict();</script>
<script type="text/javascript" src="$baseurl/view/theme/frost/js/jquery.divgrow-1.3.1.min.js" ></script>
<script type="text/javascript" src="$baseurl/js/jquery.textinputs.js" ></script> <script type="text/javascript" src="$baseurl/js/jquery.textinputs.js" ></script>
<script type="text/javascript" src="$baseurl/view/theme/frost/js/fk.autocomplete.min.js" ></script> <script type="text/javascript" src="$baseurl/view/theme/frost/js/fk.autocomplete.min.js" ></script>
<script type="text/javascript" src="$baseurl/library/fancybox/jquery.fancybox-1.3.4.pack.js"></script> <script type="text/javascript" src="$baseurl/library/fancybox/jquery.fancybox-1.3.4.pack.js"></script>

View 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">[&hellip;]</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);

View file

@ -342,6 +342,33 @@
} }
/* autocomplete @nicknames */ /* autocomplete @nicknames */
$j(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl"); $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');
}
}
}); });
} }

File diff suppressed because one or more lines are too long

View file

@ -1296,7 +1296,7 @@ input#dfrn-url {
.wall-item-content { .wall-item-content {
margin-left: 10px; margin-left: 10px;
padding-right: 1em; padding-right: 1em;
max-height: 500px; /* max-height: 500px;*/
overflow: auto; overflow: auto;
} }

View file

@ -21,4 +21,7 @@ function frost_init(&$a) {
if( $a->module === 'login' ) if( $a->module === 'login' )
$a->page['end'] .= '<script type="text/javascript"> $j(document).ready(function() { $j("#id_" + window.loginName).focus();} );</script>'; $a->page['end'] .= '<script type="text/javascript"> $j(document).ready(function() { $j("#id_" + window.loginName).focus();} );</script>';
$a->videowidth = 400;
$a->videoheight = 330;
} }