Fix fucking auto height reseting caused by AdminLTE
This commit is contained in:
parent
c87bcf1e3e
commit
8df825d16a
@ -50,7 +50,7 @@ var vendorStyles = [
|
||||
'sweetalert2/dist/sweetalert2.min.css',
|
||||
];
|
||||
|
||||
var replacements = [
|
||||
var styleReplacements = [
|
||||
['blue.png', '"../images/blue.png"'],
|
||||
['blue@2x.png', '"../images/blue@2x.png"'],
|
||||
['../img/loading.gif', '"../images/loading.gif"'],
|
||||
@ -58,6 +58,10 @@ var replacements = [
|
||||
['@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic);', ''],
|
||||
];
|
||||
|
||||
var scriptReplacements = [
|
||||
['$.AdminLTE.layout.activate(),', '']
|
||||
];
|
||||
|
||||
var fonts = [
|
||||
'font-awesome/fonts/**',
|
||||
'bootstrap/dist/fonts/**',
|
||||
@ -81,7 +85,8 @@ elixir((mix) => {
|
||||
|
||||
.scripts(convertNpmRelativePath(vendorScripts), distPath + 'scripts/app.min.js', './')
|
||||
.styles(convertNpmRelativePath(vendorStyles), distPath + 'styles/app.min.css', './')
|
||||
.replace(distPath + 'styles/app.min.css', replacements)
|
||||
.replace(distPath + 'styles/app.min.css', styleReplacements)
|
||||
.replace(distPath + 'scripts/app.min.js', scriptReplacements)
|
||||
|
||||
// copy fonts & images
|
||||
.copy(convertNpmRelativePath(fonts), distPath + 'fonts/')
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: printempw
|
||||
* @Date: 2016-09-15 10:39:41
|
||||
* @Last Modified by: g-plane
|
||||
* @Last Modified time: 2017-04-27 15:33:24
|
||||
* @Author: printempw
|
||||
* @Date: 2016-09-15 10:39:41
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2017-06-30 13:33:20
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@ -23,6 +23,44 @@ $.defaultPaginatorConfig = {
|
||||
wrapper: '<ul class="pagination pagination-sm no-margin"></ul>'
|
||||
};
|
||||
|
||||
// polyfill of String.prototype.includes
|
||||
if (!String.prototype.includes) {
|
||||
String.prototype.includes = function(search, start) {
|
||||
'use strict';
|
||||
if (typeof start !== 'number') {
|
||||
start = 0;
|
||||
}
|
||||
|
||||
if (start + search.length > this.length) {
|
||||
return false;
|
||||
} else {
|
||||
return this.indexOf(search, start) !== -1;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// polyfill of String.prototype.endsWith
|
||||
if (!String.prototype.endsWith) {
|
||||
String.prototype.endsWith = function (searchString, position) {
|
||||
var subjectString = this.toString();
|
||||
if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {
|
||||
position = subjectString.length;
|
||||
}
|
||||
position -= searchString.length;
|
||||
var lastIndex = subjectString.lastIndexOf(searchString, position);
|
||||
return lastIndex !== -1 && lastIndex === position;
|
||||
};
|
||||
}
|
||||
|
||||
$(window).ready(activateLayout).resize(activateLayout);
|
||||
|
||||
function activateLayout() {
|
||||
if (location.pathname == "/" || location.pathname.includes('auth'))
|
||||
return;
|
||||
|
||||
$.AdminLTE.layout.activate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if given value is empty.
|
||||
*
|
||||
@ -193,19 +231,6 @@ function debounce(func, delay, args = [], context = undefined) {
|
||||
}
|
||||
}
|
||||
|
||||
// polyfill of String.prototype.endsWith
|
||||
if (!String.prototype.endsWith) {
|
||||
String.prototype.endsWith = function (searchString, position) {
|
||||
var subjectString = this.toString();
|
||||
if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {
|
||||
position = subjectString.length;
|
||||
}
|
||||
position -= searchString.length;
|
||||
var lastIndex = subjectString.lastIndexOf(searchString, position);
|
||||
return lastIndex !== -1 && lastIndex === position;
|
||||
};
|
||||
}
|
||||
|
||||
function url(relativeUri) {
|
||||
relativeUri = relativeUri || "";
|
||||
blessing.base_url = blessing.base_url || "";
|
||||
|
@ -40,6 +40,10 @@ input:-webkit-autofill {
|
||||
-webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
|
||||
}
|
||||
|
||||
.login-page {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.item {
|
||||
display: block;
|
||||
background: #EFF1F0;
|
||||
|
@ -134,10 +134,7 @@
|
||||
{!! bs_footer() !!}
|
||||
|
||||
<script>
|
||||
$(window)
|
||||
.ready(changeWrapperHeight)
|
||||
.resize(changeWrapperHeight)
|
||||
.scroll(function(event) {
|
||||
$(window).scroll(function(event) {
|
||||
// change color of the navigation bar when scrolling
|
||||
if (document.body.scrollTop >= ($(window).height() * 2 / 3)) {
|
||||
$('.main-header').removeClass('transparent');
|
||||
|
Loading…
Reference in New Issue
Block a user