mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 08:48:18 -05:00
Fudge the height of the page for long listing choosers.
This is a hack to ensure that the listing chooser is entirely visible on the page until we can improve the positioning/scrolling of the listing chooser sidebar.
This commit is contained in:
@@ -608,6 +608,13 @@ r.multi.ListingChooser = Backbone.View.extend({
|
||||
|
||||
initialize: function() {
|
||||
this.$el.addClass('initialized')
|
||||
|
||||
// HACK: fudge page heights for long lists of multis / short pages
|
||||
var thisHeight = this.$('.contents').height(),
|
||||
bodyHeight = $('body').height()
|
||||
if (thisHeight > bodyHeight) {
|
||||
$('body').css('padding-bottom', thisHeight - bodyHeight + 100)
|
||||
}
|
||||
},
|
||||
|
||||
createClick: function(ev) {
|
||||
|
||||
@@ -40,32 +40,34 @@
|
||||
<script>r.ui.collapseListingChooser()</script>
|
||||
<div class="listing-chooser">
|
||||
<div class="grippy"></div>
|
||||
<ul class="global">
|
||||
${section_items(thing.sections['global'])}
|
||||
</ul>
|
||||
<div class="contents">
|
||||
<ul class="global">
|
||||
${section_items(thing.sections['global'])}
|
||||
</ul>
|
||||
|
||||
<h3>${_('multireddits')}</h3>
|
||||
%if thing.show_samples:
|
||||
<div class="intro">
|
||||
<p>${_('new! create sets of subreddits to view together.')}</p>
|
||||
<p>${_('for starters, try one of these:')}</p>
|
||||
<ul class="multis">
|
||||
${section_items(thing.sections['sample'])}
|
||||
</ul>
|
||||
</div>
|
||||
%endif
|
||||
<ul class="multis">
|
||||
${section_items(thing.sections['multi'])}
|
||||
<li class="create">
|
||||
<form>
|
||||
<input type="text" class="multi-name" placeholder="${_('name')}"></input>
|
||||
<div class="error"></div>
|
||||
<button>${_('create')}</button><div class="throbber"></div>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>${_('multireddits')}</h3>
|
||||
%if thing.show_samples:
|
||||
<div class="intro">
|
||||
<p>${_('new! create sets of subreddits to view together.')}</p>
|
||||
<p>${_('for starters, try one of these:')}</p>
|
||||
<ul class="multis">
|
||||
${section_items(thing.sections['sample'])}
|
||||
</ul>
|
||||
</div>
|
||||
%endif
|
||||
<ul class="multis">
|
||||
${section_items(thing.sections['multi'])}
|
||||
<li class="create">
|
||||
<form>
|
||||
<input type="text" class="multi-name" placeholder="${_('name')}"></input>
|
||||
<div class="error"></div>
|
||||
<button>${_('create')}</button><div class="throbber"></div>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="other">
|
||||
${section_items(thing.sections['other'])}
|
||||
</ul>
|
||||
<ul class="other">
|
||||
${section_items(thing.sections['other'])}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user