forked from Alex/Pterodactyl-Panel
Cental modals and add SweetAlerts
This commit is contained in:
parent
f560020ffd
commit
4b40fa65d4
@ -79,3 +79,4 @@ form .text-muted {margin: 0 0 -5.5px}
|
||||
.tabs_with_panel > li > a {background: transparent;}
|
||||
.label{border-radius: .25em;padding: .2em .6em .3em;}
|
||||
kbd{border-radius: .25em}
|
||||
.modal-open .modal {padding-left: 0px !important;padding-right: 0px !important;overflow-y: scroll;}
|
||||
|
15
public/js/admin.min.js
vendored
15
public/js/admin.min.js
vendored
@ -1 +1,14 @@
|
||||
$.urlParam=function(name){var results=new RegExp("[\\?&]"+name+"=([^&#]*)").exec(decodeURIComponent(window.location.href));if(results==null){return null}else{return results[1]||0}};function getPageName(url){var index=url.lastIndexOf("/")+1;var filenameWithExtension=url.substr(index);var filename=filenameWithExtension.split(".")[0];return filename}
|
||||
$(document).ready(function () {
|
||||
$.urlParam=function(name){var results=new RegExp("[\\?&]"+name+"=([^&#]*)").exec(decodeURIComponent(window.location.href));if(results==null){return null}else{return results[1]||0}};function getPageName(url){var index=url.lastIndexOf("/")+1;var filenameWithExtension=url.substr(index);var filename=filenameWithExtension.split(".")[0];return filename}
|
||||
function centerModal(element) {
|
||||
var modal = (element.length > 0) ? element : $('.modal:visible');
|
||||
var clone = modal.clone().css('display', 'block').appendTo('body');
|
||||
var top = Math.round((clone.height() - clone.find('.modal-content').height()) / 3);
|
||||
clone.remove();
|
||||
modal.find('div.modal-content').css('margin-top', top);
|
||||
}
|
||||
$('body').on('show.bs.modal', '.modal', function() {
|
||||
centerModal($(this));
|
||||
});
|
||||
$(window).on('resize', centerModal);
|
||||
});
|
||||
|
@ -9,8 +9,10 @@
|
||||
<link rel="stylesheet" href="{{ asset('css/pterodactyl.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('css/animate.css') }}">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
|
||||
<script src="{{ asset('js/admin.min.js') }}"></script>
|
||||
@show
|
||||
<title>Pterodactyl - @yield('title')</title>
|
||||
|
@ -9,9 +9,11 @@
|
||||
<link rel="stylesheet" href="{{ asset('css/pterodactyl.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('css/animate.css') }}">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.3.7/socket.io.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
|
||||
<script src="{{ asset('js/admin.min.js') }}"></script>
|
||||
<script src="{{ asset('js/bootstrap-notify.min.js') }}"></script>
|
||||
<script>
|
||||
|
Loading…
Reference in New Issue
Block a user