Revised scroll-locker layout. iPhone preview causing some styling issues that will require th dynamic resizing of the preview to fix which may impact the quality of the display
This commit is contained in:
@ -310,13 +310,6 @@ $(document).ready(function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$('#story-submit').on('click', storySubmitButtonHandler);
|
$('#story-submit').on('click', storySubmitButtonHandler);
|
||||||
|
|
||||||
if($('.editorScrollDiv').html() !== 'undefined'){
|
|
||||||
function truncateEditor(){$('.editorScrollDiv').css("height",$(window).height()-($('.navbar').height()+$('.footer').height()+100) + "px");}
|
|
||||||
truncateEditor();
|
|
||||||
$(window).resize(function(){truncateEditor();});
|
|
||||||
}
|
|
||||||
|
|
||||||
//fakeiphone positioning hotfix
|
//fakeiphone positioning hotfix
|
||||||
if($('.iphone-position').html() !==undefined || $('.iphone').html() !== undefined){
|
if($('.iphone-position').html() !==undefined || $('.iphone').html() !== undefined){
|
||||||
var startIphonePosition = parseInt($('.iphone-position').css('top').replace('px', ''));
|
var startIphonePosition = parseInt($('.iphone-position').css('top').replace('px', ''));
|
||||||
@ -333,34 +326,39 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if($('.scroll-locker').html() != undefined){
|
if($('.scroll-locker').html() != undefined){
|
||||||
function lockTop(initOff){
|
function lockTop(){
|
||||||
if ($(window).width() >= 992) {
|
if ($(window).width() >= 990) {
|
||||||
if ((($('.scroll-locker').offset().top - $(window).scrollTop()) + $('.scroll-locker').height()) >= ($('.fcc-footer').offset().top - $(window).scrollTop())) {
|
if($('.editorScrollDiv').html() !== 'undefined'){
|
||||||
$('.scroll-locker').css('position', 'fixed').css('top', initOff).css('width', $($('.scroll-locker').parent()).width()).css('max-height', '85%').css('overflow-y', 'auto').css('overflow-x', 'hidden');
|
var magiVal = $(window).height()-($('.navbar').height()+$('.footer').height());
|
||||||
$('.well').css('margin-right', '6px');
|
if(magiVal < 0){
|
||||||
}
|
magiVal = 0;
|
||||||
else {
|
}
|
||||||
$('.scroll-locker').css('position', 'fixed').css('bottom', $('.fcc-footer') - (($('.scroll-locker').offset().top - $(window).scrollTop()) + $('.scroll-locker').height()) - ($('.fcc-footer').offset().top - $(window).scrollTop())).css('width', $($('.scroll-locker').parent()).width()).css('max-height', '85%').css('overflow-y', 'auto').css('overflow-x', 'hidden');
|
magiVal = $(window).height()-($('.navbar').height()+$('.footer').height());
|
||||||
$('.well').css('margin-right', '6px');
|
if(magiVal < 0){
|
||||||
}
|
magiVal = 0;
|
||||||
|
}
|
||||||
|
$('.editorScrollDiv').css("height", (magiVal-85) + "px");
|
||||||
|
}
|
||||||
|
magiVal = $(window).height()-($('.navbar').height()+$('.footer').height());
|
||||||
|
if(magiVal < 0){
|
||||||
|
magiVal = 0;
|
||||||
|
}
|
||||||
|
$('.scroll-locker').css("min-height", $('.editorScrollDiv').height()).css("height",magiVal-85);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
$('.editorScrollDiv').css("max-height", 500 + "px");
|
||||||
$('.scroll-locker').css('position', 'inherit').css('top', 'inherit').css('width', '100%').css('max-height', '85%').css('overflow-y', 'auto').css('overflow-x', 'hidden');
|
$('.scroll-locker').css('position', 'inherit').css('top', 'inherit').css('width', '100%').css('max-height', '85%').css('overflow-y', 'auto').css('overflow-x', 'hidden');
|
||||||
$('.well').css('margin-right', '');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var $scrollLocker = $('.scroll-locker');
|
if ($('.scroll-locker').offset()){
|
||||||
if ($scrollLocker.offset()) {
|
$(document).ready(function(){
|
||||||
var initOff = $scrollLocker.offset().top - $(window).scrollTop();
|
lockTop();
|
||||||
lockTop(initOff);
|
|
||||||
$(window).on('resize', function(){
|
$(window).on('resize', function(){
|
||||||
lockTop(initOff);
|
lockTop();
|
||||||
});
|
});
|
||||||
$(window).scroll(function() {
|
$(window).scroll(function() {
|
||||||
lockTop(initOff);
|
lockTop();
|
||||||
});
|
});
|
||||||
$(document).ready(function(){
|
|
||||||
lockTop(initOff);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ block content
|
|||||||
.row.courseware-height
|
.row.courseware-height
|
||||||
.col-xs-12.col-sm-12.col-md-3.col-lg-3
|
.col-xs-12.col-sm-12.col-md-3.col-lg-3
|
||||||
.scroll-locker
|
.scroll-locker
|
||||||
|
.innerMarginFix(style = "width: 99%;")
|
||||||
.well
|
.well
|
||||||
.row
|
.row
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
|
@ -17,6 +17,7 @@ block content
|
|||||||
.row(ng-controller="pairedWithController")
|
.row(ng-controller="pairedWithController")
|
||||||
.col-xs-12.col-sm-12.col-md-4.col-lg-3
|
.col-xs-12.col-sm-12.col-md-4.col-lg-3
|
||||||
.scroll-locker
|
.scroll-locker
|
||||||
|
.innerMarginFix(style = "width: 99%;")
|
||||||
#testCreatePanel.well
|
#testCreatePanel.well
|
||||||
h3.text-center.negative-10= name
|
h3.text-center.negative-10= name
|
||||||
.row
|
.row
|
||||||
|
Reference in New Issue
Block a user