1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-25 18:42:31 +01:00

Cental modals and add SweetAlerts

This commit is contained in:
Dane Everitt 2016-01-08 18:58:03 -05:00
parent f560020ffd
commit 4b40fa65d4
4 changed files with 19 additions and 1 deletions

View File

@ -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;}

View File

@ -1 +1,14 @@
$(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);
});

View File

@ -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>

View File

@ -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>