forked from mirrors/easyappointments
Μικρές αλλαγές και βελτιώσεις στον κώδικα της σελίδας κράτησης ραντεβού.
This commit is contained in:
parent
8a79828d23
commit
93289f60dd
4 changed files with 26 additions and 3 deletions
|
@ -16,7 +16,8 @@
|
||||||
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/js/libs/jquery/jquery.qtip.min.js"></script>
|
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/js/libs/jquery/jquery.qtip.min.js"></script>
|
||||||
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/js/libs/bootstrap/bootstrap.min.js"></script>
|
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/js/libs/bootstrap/bootstrap.min.js"></script>
|
||||||
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/js/libs/date.js"></script>
|
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/js/libs/date.js"></script>
|
||||||
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/js/frontend/book-appointment.js"></script>
|
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/js/frontend/book_appointment.js"></script>
|
||||||
|
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/js/general_functions.js"></script>
|
||||||
|
|
||||||
<?php // SET FAVICON FOR PAGE ?>
|
<?php // SET FAVICON FOR PAGE ?>
|
||||||
<link rel="icon" type="image/x-icon" href="<?php echo $this->config->base_url(); ?>assets/images/favicon.ico">
|
<link rel="icon" type="image/x-icon" href="<?php echo $this->config->base_url(); ?>assets/images/favicon.ico">
|
||||||
|
@ -34,7 +35,8 @@
|
||||||
<?php // JQUERY PAGE STUFF ?>
|
<?php // JQUERY PAGE STUFF ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
bookAppointment.initialize(); // Begin jquery magic :P
|
bookAppointment.initialize();
|
||||||
|
GeneralFunctions.centerElementOnPage($('#book-appointment'));
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -14,7 +14,6 @@ body {
|
||||||
------------------------------------------------------------------------------ */
|
------------------------------------------------------------------------------ */
|
||||||
#book-appointment {
|
#book-appointment {
|
||||||
width: 660px;
|
width: 660px;
|
||||||
margin: 150px auto 0 auto;
|
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
box-shadow: 0px 1px 1px #B6B6B6;
|
box-shadow: 0px 1px 1px #B6B6B6;
|
||||||
min-height: 480px;
|
min-height: 480px;
|
||||||
|
|
|
@ -61,3 +61,25 @@ GeneralFunctions.displayMessageBox = function(title, message, messageButtons) {
|
||||||
jQuery("#message_box .ui-dialog-titlebar-close").hide();
|
jQuery("#message_box .ui-dialog-titlebar-close").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method centers a DOM element vertically and horizontally
|
||||||
|
* on the page.
|
||||||
|
*
|
||||||
|
* @param {object} elementHandle The object that is going to be
|
||||||
|
* centered.
|
||||||
|
*/
|
||||||
|
GeneralFunctions.centerElementOnPage = function(elementHandle) {
|
||||||
|
// Center main frame vertical middle
|
||||||
|
$(window).resize(function() {
|
||||||
|
var elementLeft = ($(window).width() - elementHandle.outerWidth()) / 2;
|
||||||
|
var elementTop = ($(window).height() - elementHandle.outerHeight()) / 2;
|
||||||
|
elementTop = (elementTop > 0 ) ? elementTop : 20;
|
||||||
|
|
||||||
|
elementHandle.css({
|
||||||
|
position : 'absolute',
|
||||||
|
left : elementLeft,
|
||||||
|
top : elementTop
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$(window).resize();
|
||||||
|
}
|
Loading…
Reference in a new issue