Fixed jumpy footer

pull/229/merge
Abdullah Almsaeed 10 years ago
parent 3888ca4471
commit fd947242ac

@ -45,7 +45,8 @@ body {
.content-wrapper, .content-wrapper,
.right-side, .right-side,
.main-footer { .main-footer {
.transition(all @transition-speed @transition-fn); .transition(margin-left @transition-speed @transition-fn);
.transition(transform @transition-speed @transition-fn);
margin-left: @sidebar-width; margin-left: @sidebar-width;
//Top nav layout //Top nav layout
.layout-top-nav & { .layout-top-nav & {

@ -57,9 +57,12 @@ body {
.content-wrapper, .content-wrapper,
.right-side, .right-side,
.main-footer { .main-footer {
-webkit-transition: all 0.3s ease; -webkit-transition: margin-left 0.3s ease;
-o-transition: all 0.3s ease; -o-transition: margin-left 0.3s ease;
transition: all 0.3s ease; transition: margin-left 0.3s ease;
-webkit-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
margin-left: 230px; margin-left: 230px;
} }
.layout-top-nav .content-wrapper, .layout-top-nav .content-wrapper,

File diff suppressed because one or more lines are too long

16
dist/js/app.js vendored

@ -104,12 +104,12 @@ $(function () {
//Easy access to options //Easy access to options
var o = $.AdminLTE.options; var o = $.AdminLTE.options;
//Enable sidebar tree view controls
$.AdminLTE.tree('.sidebar');
//Activate the layout maker //Activate the layout maker
$.AdminLTE.layout.activate(); $.AdminLTE.layout.activate();
//Enable sidebar tree view controls
$.AdminLTE.tree('.sidebar');
//Add slimscroll to navbar dropdown //Add slimscroll to navbar dropdown
if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') { if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {
$(".navbar .menu").slimscroll({ $(".navbar .menu").slimscroll({
@ -169,22 +169,22 @@ $.AdminLTE.layout = {
var _this = this; var _this = this;
_this.fix(); _this.fix();
_this.fixSidebar(); _this.fixSidebar();
$(".wrapper").resize(function () { $(window, ".wrapper").resize(function () {
_this.fix(); _this.fix();
_this.fixSidebar(); _this.fixSidebar();
}); });
}, },
fix: function () { fix: function () {
//Get window height and the wrapper height //Get window height and the wrapper height
var neg = $('.main-header').height() + $('.main-footer').height(); var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
var window_height = $(window).height(); var window_height = $(window).height();
var sidebar_height = $(".main-sidebar, .left-side").height(); var sidebar_height = $(".main-sidebar, .left-side").height();
//Set the min-height of the content and sidebar based on the //Set the min-height of the content and sidebar based on the
//the maximum height of the document. //the height of the document.
if (window_height >= sidebar_height) { if (window_height >= sidebar_height) {
$(".content-wrapper, .main-sidebar, .left-side, .right-side").css('min-height', window_height - neg); $(".content-wrapper, .main-sidebar, .left-side, .right-side").css('min-height', window_height - neg);
} else { } else {
$(".content-wrapper, .main-sidebar, .left-side, .right-side").css('min-height', sidebar_height); $(".content-wrapper, .main-sidebar, .left-side, .right-side").css('min-height', sidebar_height);
} }
}, },
fixSidebar: function () { fixSidebar: function () {

@ -10,4 +10,4 @@
* @version 2.0 * @version 2.0
* @license MIT <http://opensource.org/licenses/MIT> * @license MIT <http://opensource.org/licenses/MIT>
*/ */
if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");$.AdminLTE=new Object,$.AdminLTE.options={navbarMenuSlimscroll:!0,navbarMenuSlimscrollWidth:"3px",navbarMenuHeight:"200px",sidebarToggleSelector:"[data-toggle='offcanvas']",sidebarPushMenu:!0,sidebarSlimScroll:!0,enableBoxRefresh:!0,enableBSToppltip:!0,BSTooltipSelector:"[data-toggle='tooltip']",enableBoxWidget:!0,boxWidgetOptions:{boxWidgetIcons:{collapse:"fa fa-minus",open:"fa fa-plus",remove:"fa fa-times"},boxWidgetSelectors:{remove:'[data-widget="remove"]',collapse:'[data-widget="collapse"]'}},colors:{lightBlue:"#3c8dbc",red:"#f56954",green:"#00a65a",aqua:"#00c0ef",yellow:"#f39c12",blue:"#0073b7",navy:"#001F3F",teal:"#39CCCC",olive:"#3D9970",lime:"#01FF70",orange:"#FF851B",fuchsia:"#F012BE",purple:"#8E24AA",maroon:"#D81B60",black:"#222222",gray:"#eaeaec"}},$(function(){var a=$.AdminLTE.options;$.AdminLTE.tree(".sidebar"),$.AdminLTE.layout.activate(),a.navbarMenuSlimscroll&&"undefined"!=typeof $.fn.slimscroll&&$(".navbar .menu").slimscroll({height:"200px",alwaysVisible:!1,size:"3px"}).css("width","100%"),a.sidebarPushMenu&&$.AdminLTE.pushMenu(a.sidebarToggleSelector),a.enableBSToppltip&&$(a.BSTooltipSelector).tooltip(),a.enableBoxWidget&&$.AdminLTE.boxWidget.activate(),$('.btn-group[data-toggle="btn-toggle"]').each(function(){var a=$(this);$(this).find(".btn").click(function(b){a.find(".btn.active").removeClass("active"),$(this).addClass("active"),b.preventDefault()})})}),$.AdminLTE.layout={activate:function(){var a=this;a.fix(),a.fixSidebar(),$(".wrapper").resize(function(){a.fix(),a.fixSidebar()})},fix:function(){var a=$(".main-header").height()+$(".main-footer").height(),b=$(window).height(),c=$(".main-sidebar, .left-side").height();b>=c?$(".content-wrapper, .main-sidebar, .left-side, .right-side").css("min-height",b-a):$(".content-wrapper, .main-sidebar, .left-side, .right-side").css("min-height",c)},fixSidebar:function(){return $("body").hasClass("fixed")?void($.AdminLTE.options.sidebarSlimScroll&&"undefined"!=typeof $.fn.slimScroll&&$(".sidebar").slimscroll({height:$(window).height()-$(".main-header").height()+"px",color:"rgba(0,0,0,0.2)",size:"3px"})):void("undefined"!=typeof $.fn.slimScroll&&$(".sidebar").slimScroll({destroy:!0}).height("auto"))}},$.AdminLTE.pushMenu=function(a){$(a).click(function(a){a.preventDefault(),$("body").toggleClass("sidebar-collapse"),$("body").toggleClass("sidebar-open")})},$.AdminLTE.tree=function(a){$("li a",$(a)).click(function(a){var b=$(this),c=b.next();if(c.is(".treeview-menu")&&c.is(":visible"))c.slideUp("normal",function(){c.removeClass("menu-open")}),c.parent("li").removeClass("active");else if(c.is(".treeview-menu")&&!c.is(":visible")){var d=b.parents("ul").first(),e=d.find("ul:visible").slideUp("normal");e.removeClass("menu-open");var f=b.parent("li");c.slideDown("normal",function(){c.addClass("menu-open"),d.find("li.active").removeClass("active"),f.addClass("active")})}c.is(".treeview-menu")&&a.preventDefault()})},$.AdminLTE.boxWidget={activate:function(){var a=$.AdminLTE.options,b=this;$(a.boxWidgetOptions.boxWidgetSelectors.collapse).click(function(a){a.preventDefault(),b.collapse($(this))}),$(a.boxWidgetOptions.boxWidgetSelectors.remove).click(function(a){a.preventDefault(),b.remove($(this))})},collapse:function(a){var b=a.parents(".box").first(),c=b.find(".box-body, .box-footer");b.hasClass("collapsed-box")?(a.children(".fa-plus").removeClass("fa-plus").addClass("fa-minus"),c.slideDown(300,function(){b.removeClass("collapsed-box")})):(a.children(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),c.slideUp(300,function(){b.addClass("collapsed-box")}))},remove:function(a){var b=a.parents(".box").first();b.slideUp()},options:$.AdminLTE.options.boxWidgetOptions},function(a){a.fn.boxRefresh=function(b){function c(a){a.append(f),e.onLoadStart.call(a)}function d(a){a.find(f).remove(),e.onLoadDone.call(a)}var e=a.extend({trigger:".refresh-btn",source:"",onLoadStart:function(){},onLoadDone:function(){}},b),f=a('<div class="overlay"></div><div class="loading-img"></div>');return this.each(function(){if(""===e.source)return void(console&&console.log("Please specify a source first - boxRefresh()"));var b=a(this),f=b.find(e.trigger).first();f.click(function(a){a.preventDefault(),c(b),b.find(".box-body").load(e.source,function(){d(b)})})})}}(jQuery),function(a){a.fn.todolist=function(b){var c=a.extend({onCheck:function(){},onUncheck:function(){}},b);return this.each(function(){"undefined"!=typeof a.fn.iCheck?(a("input",this).on("ifChecked",function(){var b=a(this).parents("li").first();b.toggleClass("done"),c.onCheck.call(b)}),a("input",this).on("ifUnchecked",function(){var b=a(this).parents("li").first();b.toggleClass("done"),c.onUncheck.call(b)})):a("input",this).on("change",function(){var b=a(this).parents("li").first();b.toggleClass("done"),c.onCheck.call(b)})})}}(jQuery); if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");$.AdminLTE=new Object,$.AdminLTE.options={navbarMenuSlimscroll:!0,navbarMenuSlimscrollWidth:"3px",navbarMenuHeight:"200px",sidebarToggleSelector:"[data-toggle='offcanvas']",sidebarPushMenu:!0,sidebarSlimScroll:!0,enableBoxRefresh:!0,enableBSToppltip:!0,BSTooltipSelector:"[data-toggle='tooltip']",enableBoxWidget:!0,boxWidgetOptions:{boxWidgetIcons:{collapse:"fa fa-minus",open:"fa fa-plus",remove:"fa fa-times"},boxWidgetSelectors:{remove:'[data-widget="remove"]',collapse:'[data-widget="collapse"]'}},colors:{lightBlue:"#3c8dbc",red:"#f56954",green:"#00a65a",aqua:"#00c0ef",yellow:"#f39c12",blue:"#0073b7",navy:"#001F3F",teal:"#39CCCC",olive:"#3D9970",lime:"#01FF70",orange:"#FF851B",fuchsia:"#F012BE",purple:"#8E24AA",maroon:"#D81B60",black:"#222222",gray:"#eaeaec"}},$(function(){var a=$.AdminLTE.options;$.AdminLTE.layout.activate(),$.AdminLTE.tree(".sidebar"),a.navbarMenuSlimscroll&&"undefined"!=typeof $.fn.slimscroll&&$(".navbar .menu").slimscroll({height:"200px",alwaysVisible:!1,size:"3px"}).css("width","100%"),a.sidebarPushMenu&&$.AdminLTE.pushMenu(a.sidebarToggleSelector),a.enableBSToppltip&&$(a.BSTooltipSelector).tooltip(),a.enableBoxWidget&&$.AdminLTE.boxWidget.activate(),$('.btn-group[data-toggle="btn-toggle"]').each(function(){var a=$(this);$(this).find(".btn").click(function(b){a.find(".btn.active").removeClass("active"),$(this).addClass("active"),b.preventDefault()})})}),$.AdminLTE.layout={activate:function(){var a=this;a.fix(),a.fixSidebar(),$(window,".wrapper").resize(function(){a.fix(),a.fixSidebar()})},fix:function(){var a=$(".main-header").outerHeight()+$(".main-footer").outerHeight(),b=$(window).height(),c=$(".main-sidebar, .left-side").height();b>=c?$(".content-wrapper, .main-sidebar, .left-side, .right-side").css("min-height",b-a):$(".content-wrapper, .main-sidebar, .left-side, .right-side").css("min-height",c)},fixSidebar:function(){return $("body").hasClass("fixed")?void($.AdminLTE.options.sidebarSlimScroll&&"undefined"!=typeof $.fn.slimScroll&&$(".sidebar").slimscroll({height:$(window).height()-$(".main-header").height()+"px",color:"rgba(0,0,0,0.2)",size:"3px"})):void("undefined"!=typeof $.fn.slimScroll&&$(".sidebar").slimScroll({destroy:!0}).height("auto"))}},$.AdminLTE.pushMenu=function(a){$(a).click(function(a){a.preventDefault(),$("body").toggleClass("sidebar-collapse"),$("body").toggleClass("sidebar-open")})},$.AdminLTE.tree=function(a){$("li a",$(a)).click(function(a){var b=$(this),c=b.next();if(c.is(".treeview-menu")&&c.is(":visible"))c.slideUp("normal",function(){c.removeClass("menu-open")}),c.parent("li").removeClass("active");else if(c.is(".treeview-menu")&&!c.is(":visible")){var d=b.parents("ul").first(),e=d.find("ul:visible").slideUp("normal");e.removeClass("menu-open");var f=b.parent("li");c.slideDown("normal",function(){c.addClass("menu-open"),d.find("li.active").removeClass("active"),f.addClass("active")})}c.is(".treeview-menu")&&a.preventDefault()})},$.AdminLTE.boxWidget={activate:function(){var a=$.AdminLTE.options,b=this;$(a.boxWidgetOptions.boxWidgetSelectors.collapse).click(function(a){a.preventDefault(),b.collapse($(this))}),$(a.boxWidgetOptions.boxWidgetSelectors.remove).click(function(a){a.preventDefault(),b.remove($(this))})},collapse:function(a){var b=a.parents(".box").first(),c=b.find(".box-body, .box-footer");b.hasClass("collapsed-box")?(a.children(".fa-plus").removeClass("fa-plus").addClass("fa-minus"),c.slideDown(300,function(){b.removeClass("collapsed-box")})):(a.children(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),c.slideUp(300,function(){b.addClass("collapsed-box")}))},remove:function(a){var b=a.parents(".box").first();b.slideUp()},options:$.AdminLTE.options.boxWidgetOptions},function(a){a.fn.boxRefresh=function(b){function c(a){a.append(f),e.onLoadStart.call(a)}function d(a){a.find(f).remove(),e.onLoadDone.call(a)}var e=a.extend({trigger:".refresh-btn",source:"",onLoadStart:function(){},onLoadDone:function(){}},b),f=a('<div class="overlay"></div><div class="loading-img"></div>');return this.each(function(){if(""===e.source)return void(console&&console.log("Please specify a source first - boxRefresh()"));var b=a(this),f=b.find(e.trigger).first();f.click(function(a){a.preventDefault(),c(b),b.find(".box-body").load(e.source,function(){d(b)})})})}}(jQuery),function(a){a.fn.todolist=function(b){var c=a.extend({onCheck:function(){},onUncheck:function(){}},b);return this.each(function(){"undefined"!=typeof a.fn.iCheck?(a("input",this).on("ifChecked",function(){var b=a(this).parents("li").first();b.toggleClass("done"),c.onCheck.call(b)}),a("input",this).on("ifUnchecked",function(){var b=a(this).parents("li").first();b.toggleClass("done"),c.onUncheck.call(b)})):a("input",this).on("change",function(){var b=a(this).parents("li").first();b.toggleClass("done"),c.onCheck.call(b)})})}}(jQuery);

@ -39,7 +39,7 @@
</div> </div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="Retype password"/> <input type="password" class="form-control" placeholder="Retype password"/>
<span class="glyphicon glyphicon-refresh form-control-feedback"></span> <span class="glyphicon glyphicon-log-in form-control-feedback"></span>
</div> </div>
<div class="row"> <div class="row">
<div class="col-xs-8"> <div class="col-xs-8">

Loading…
Cancel
Save