Make documentation compatible with the new js

pull/1498/head
Abdullah Almsaeed 2017-02-26 16:04:01 -05:00
parent 383d685a5f
commit 3f5abdbfca
3 changed files with 75 additions and 59 deletions

View File

@ -23,7 +23,7 @@
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--> <![endif]-->
</head> </head>
<body class="skin-blue fixed" data-spy="scroll" data-target="#scrollspy"> <body class="skin-blue" data-spy="scroll" data-target="#scrollspy">
<div class="wrapper"> <div class="wrapper">
<header class="main-header"> <header class="main-header">
@ -38,7 +38,7 @@
<!-- Header Navbar: style can be found in header.less --> <!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation"> <nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button--> <!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button"> <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
</a> </a>
<!-- Navbar Right Menu --> <!-- Navbar Right Menu -->
@ -102,6 +102,11 @@
<!-- Main content --> <!-- Main content -->
<div class="content body"> <div class="content body">
<p class="lead">
This documentation is for versions 2.3 and under.
If you are looking for documentation for version 2.4 and above,
please visit <a href="https://almsaeedstudio.com/adminlte-docs">our online documentation</a>.
</p>
include "introduction.html" include "introduction.html"
@ -176,14 +181,14 @@ include "license.html"
</div><!-- ./wrapper --> </div><!-- ./wrapper -->
<!-- jQuery 2.2.3 --> <!-- jQuery 3.1.1 -->
<script src="../plugins/jQuery/jquery-2.2.3.min.js"></script> <script src="../plugins/jQuery/jquery-3.1.1.min.js"></script>
<!-- Bootstrap 3.3.6 --> <!-- Bootstrap 3.3.6 -->
<script src="../bootstrap/js/bootstrap.min.js"></script> <script src="../bootstrap/js/bootstrap.min.js"></script>
<!-- FastClick --> <!-- FastClick -->
<script src="../plugins/fastclick/fastclick.min.js"></script> <script src="../plugins/fastclick/fastclick.min.js"></script>
<!-- AdminLTE App --> <!-- AdminLTE App -->
<script src="../dist/js/app.min.js"></script> <script src="../dist/js/adminlte.min.js"></script>
<!-- SlimScroll 1.3.0 --> <!-- SlimScroll 1.3.0 -->
<script src="../plugins/slimScroll/jquery.slimscroll.min.js"></script> <script src="../plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script> <script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>

View File

@ -2,62 +2,73 @@
* Documentation JS script * Documentation JS script
*/ */
$(function () { $(function () {
var slideToTop = $("<div />"); 'use strict'
slideToTop.html('<i class="fa fa-chevron-up"></i>');
slideToTop.css({ var $slideToTop = $('<div />')
position: 'fixed',
bottom: '20px', $slideToTop.html('<i class="fa fa-chevron-up"></i>')
right: '25px',
width: '40px', $slideToTop.css({
height: '40px', position : 'fixed',
color: '#eee', bottom : '20px',
'font-size': '', right : '25px',
'line-height': '40px', width : '40px',
'text-align': 'center', height : '40px',
color : '#eee',
'font-size' : '',
'line-height' : '40px',
'text-align' : 'center',
'background-color': '#222d32', 'background-color': '#222d32',
cursor: 'pointer', cursor : 'pointer',
'border-radius': '5px', 'border-radius' : '5px',
'z-index': '99999', 'z-index' : '99999',
opacity: '.7', opacity : '.7',
'display': 'none' 'display' : 'none'
}); })
slideToTop.on('mouseenter', function () {
$(this).css('opacity', '1'); $slideToTop.on('mouseenter', function () {
}); $(this).css('opacity', '1')
slideToTop.on('mouseout', function () { })
$(this).css('opacity', '.7');
}); $slideToTop.on('mouseout', function () {
$('.wrapper').append(slideToTop); $(this).css('opacity', '.7')
})
$('.wrapper').append($slideToTop)
$(window).scroll(function () { $(window).scroll(function () {
if ($(window).scrollTop() >= 150) { if ($(window).scrollTop() >= 150) {
if (!$(slideToTop).is(':visible')) { if (!$($slideToTop).is(':visible')) {
$(slideToTop).fadeIn(500); $($slideToTop).fadeIn(500)
} }
} else { } else {
$(slideToTop).fadeOut(500); $($slideToTop).fadeOut(500)
} }
}); })
$(slideToTop).click(function () {
$("body").animate({ $($slideToTop).click(function () {
$('body').animate({
scrollTop: 0 scrollTop: 0
}, 500); }, 500)
}); })
$(".sidebar-menu li:not(.treeview) a").click(function () {
var $this = $(this); $('.sidebar-menu li:not(.treeview) a').click(function () {
var target = $this.attr("href"); var $this = $(this)
var target = $this.attr('href')
if (typeof target === 'string') { if (typeof target === 'string') {
$("body").animate({ $('body').animate({
scrollTop: ($(target).offset().top) + "px" scrollTop: ($(target).offset().top) + 'px'
}, 500); }, 500)
} }
}); })
//Skin switcher // Skin switcher
var current_skin = "skin-blue"; var currentSkin = 'skin-blue'
$('#layout-skins-list [data-skin]').click(function(e) {
e.preventDefault(); $('#layout-skins-list [data-skin]').click(function (e) {
var skinName = $(this).data('skin'); e.preventDefault()
$('body').removeClass(current_skin); var skinName = $(this).data('skin')
$('body').addClass(skinName); $('body').removeClass(currentSkin)
current_skin = skinName; $('body').addClass(skinName)
}); currentSkin = skinName
}); })
})

View File

@ -38,7 +38,7 @@
<!-- Header Navbar: style can be found in header.less --> <!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation"> <nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button--> <!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button"> <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
</a> </a>
<!-- Navbar Right Menu --> <!-- Navbar Right Menu -->
@ -2151,14 +2151,14 @@ AdminLTE/
</div><!-- ./wrapper --> </div><!-- ./wrapper -->
<!-- jQuery 2.2.3 --> <!-- jQuery 3.1.1 -->
<script src="../plugins/jQuery/jquery-2.2.3.min.js"></script> <script src="../plugins/jQuery/jquery-3.1.1.min.js"></script>
<!-- Bootstrap 3.3.6 --> <!-- Bootstrap 3.3.6 -->
<script src="../bootstrap/js/bootstrap.min.js"></script> <script src="../bootstrap/js/bootstrap.min.js"></script>
<!-- FastClick --> <!-- FastClick -->
<script src="../plugins/fastclick/fastclick.min.js"></script> <script src="../plugins/fastclick/fastclick.min.js"></script>
<!-- AdminLTE App --> <!-- AdminLTE App -->
<script src="../dist/js/app.min.js"></script> <script src="../dist/js/adminlte.min.js"></script>
<!-- SlimScroll 1.3.0 --> <!-- SlimScroll 1.3.0 -->
<script src="../plugins/slimScroll/jquery.slimscroll.min.js"></script> <script src="../plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script> <script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>