Browse Source

try to get rid of scrollbars in Frost

pull/445/head
Zach Prezkuta 8 years ago
parent
commit
193cc2c537
11 changed files with 65 additions and 4 deletions
  1. +1
    -1
      include/oembed.php
  2. +1
    -0
      view/theme/frost-mobile/end.tpl
  3. +1
    -0
      view/theme/frost-mobile/js/jquery.divgrow-1.3.1.min.js
  4. +27
    -0
      view/theme/frost-mobile/js/main.js
  5. +1
    -1
      view/theme/frost-mobile/js/main.min.js
  6. +1
    -0
      view/theme/frost/end.tpl
  7. +1
    -0
      view/theme/frost/js/jquery.divgrow-1.3.1.min.js
  8. +27
    -0
      view/theme/frost/js/main.js
  9. +1
    -1
      view/theme/frost/js/main.min.js
  10. +1
    -1
      view/theme/frost/style.css
  11. +3
    -0
      view/theme/frost/theme.php

+ 1
- 1
include/oembed.php View File

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


+ 1
- 0
view/theme/frost-mobile/end.tpl View File

@ -7,6 +7,7 @@
</script>-->
<script type="text/javascript" src="$baseurl/js/jquery.js" ></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/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>-->


+ 1
- 0
view/theme/frost-mobile/js/jquery.divgrow-1.3.1.min.js 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);

+ 27
- 0
view/theme/frost-mobile/js/main.js View File

@ -349,6 +349,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() > 310) {
if(! $j(this).hasClass('divmore')) {
$j(this).divgrow({ initialHeight: 300, showBrackets: false, speed: 300 });
$j(this).addClass('divmore');
}
}
});
}


+ 1
- 1
view/theme/frost-mobile/js/main.min.js
File diff suppressed because it is too large
View File


+ 1
- 0
view/theme/frost/end.tpl View File

@ -7,6 +7,7 @@
</script>
<script type="text/javascript" src="$baseurl/js/jquery.js" ></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/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>


+ 1
- 0
view/theme/frost/js/jquery.divgrow-1.3.1.min.js 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);

+ 27
- 0
view/theme/frost/js/main.js View File

@ -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');
}
}
});
}


+ 1
- 1
view/theme/frost/js/main.min.js
File diff suppressed because it is too large
View File


+ 1
- 1
view/theme/frost/style.css View File

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


+ 3
- 0
view/theme/frost/theme.php View File

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

Loading…
Cancel
Save