iflrandevu/doc/code/js/FrontendBook.html

1233 lines
14 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Namespace: FrontendBook</title>
2015-01-22 00:17:16 +02:00
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
2015-01-22 00:17:16 +02:00
<h1 class="page-title">Namespace: FrontendBook</h1>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<section>
2015-01-22 00:17:16 +02:00
<header>
2015-01-22 00:17:16 +02:00
<h2>
FrontendBook
</h2>
</header>
<article>
<div class="container-overview">
<div class="description">This namespace contains functions that implement the book appointment page
functionality. Once the initialize() method is called the page is fully
functional and can serve the appointment booking process.</div>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<dl class="details">
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line1">line 1</a>
</li></ul></dd>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</dl>
2015-01-22 00:17:16 +02:00
</div>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<h3 class="subsection-title">Members</h3>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<h4 class="name" id=".manageMode"><span class="type-signature">(static) </span>manageMode<span class="type-signature"> :bool</span></h4>
<div class="description">
Determines the functionality of the page.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">bool</span>
2015-01-22 00:17:16 +02:00
</li>
</ul>
<dl class="details">
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line14">line 14</a>
</li></ul></dd>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</dl>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<h3 class="subsection-title">Methods</h3>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<h4 class="name" id=".applyAppointmentData"><span class="type-signature">(static) </span>applyAppointmentData<span class="signature">(appointment, provider, customer)</span><span class="type-signature"> &rarr; {bool}</span></h4>
2015-01-22 00:17:16 +02:00
<div class="description">
This method applies the appointment's data to the wizard so
that the user can start making changes on an existing record.
2015-01-22 00:17:16 +02:00
</div>
2015-01-22 00:17:16 +02:00
<h5>Parameters:</h5>
<table class="params">
<thead>
2015-01-22 00:17:16 +02:00
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>appointment</code></td>
2015-01-22 00:17:16 +02:00
<td class="type">
<span class="param-type">object</span>
</td>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<td class="description last">Selected appointment's data.</td>
</tr>
2015-01-22 00:17:16 +02:00
<tr>
<td class="name"><code>provider</code></td>
2015-01-22 00:17:16 +02:00
<td class="type">
<span class="param-type">object</span>
</td>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<td class="description last">Selected provider's data.</td>
</tr>
2015-01-22 00:17:16 +02:00
<tr>
<td class="name"><code>customer</code></td>
2015-01-22 00:17:16 +02:00
<td class="type">
<span class="param-type">object</span>
</td>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<td class="description last">Selected customer's data.</td>
</tr>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</tbody>
</table>
<dl class="details">
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2015-01-22 00:17:16 +02:00
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line525">line 525</a>
</li></ul></dd>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</dl>
2015-01-22 00:17:16 +02:00
<h5>Returns:</h5>
<div class="param-desc">
Returns the operation result.
</div>
<dl>
2015-01-22 00:17:16 +02:00
<dt>
Type
</dt>
<dd>
<span class="param-type">bool</span>
2015-01-22 00:17:16 +02:00
</dd>
</dl>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<h4 class="name" id=".bindEventHandlers"><span class="type-signature">(static) </span>bindEventHandlers<span class="signature">()</span><span class="type-signature"></span></h4>
2015-01-22 00:17:16 +02:00
<div class="description">
This method binds the necessary event handlers for the book
appointments page.
2015-01-22 00:17:16 +02:00
</div>
2015-01-22 00:17:16 +02:00
<dl class="details">
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2015-01-22 00:17:16 +02:00
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line96">line 96</a>
</li></ul></dd>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</dl>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<h4 class="name" id=".calcEndDatetime"><span class="type-signature">(static) </span>calcEndDatetime<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
2015-01-22 00:17:16 +02:00
<div class="description">
This method calculates the end datetime of the current appointment.
End datetime is depending on the service and start datetime fieldss.
2015-01-22 00:17:16 +02:00
</div>
<dl class="details">
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2015-01-22 00:17:16 +02:00
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line490">line 490</a>
</li></ul></dd>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</dl>
2015-01-22 00:17:16 +02:00
<h5>Returns:</h5>
<div class="param-desc">
Returns the end datetime in string format.
</div>
<dl>
2015-01-22 00:17:16 +02:00
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
2015-01-22 00:17:16 +02:00
</dd>
</dl>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<h4 class="name" id=".getAvailableHours"><span class="type-signature">(static) </span>getAvailableHours<span class="signature">(selDate)</span><span class="type-signature"></span></h4>
2015-01-22 00:17:16 +02:00
<div class="description">
This function makes an ajax call and returns the available
hours for the selected service, provider and date.
2015-01-22 00:17:16 +02:00
</div>
2015-01-22 00:17:16 +02:00
<h5>Parameters:</h5>
<table class="params">
<thead>
2015-01-22 00:17:16 +02:00
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>selDate</code></td>
2015-01-22 00:17:16 +02:00
<td class="type">
<span class="param-type">string</span>
</td>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<td class="description last">The selected date of which the available
hours we need to receive.</td>
</tr>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</tbody>
</table>
<dl class="details">
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2015-01-22 00:17:16 +02:00
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line294">line 294</a>
</li></ul></dd>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</dl>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<h4 class="name" id=".initialize"><span class="type-signature">(static) </span>initialize<span class="signature">(bindEventHandlers, manageMode)</span><span class="type-signature"></span></h4>
2015-01-22 00:17:16 +02:00
<div class="description">
This method initializes the book appointment page.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
2015-01-22 00:17:16 +02:00
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>bindEventHandlers</code></td>
2015-01-22 00:17:16 +02:00
<td class="type">
<span class="param-type">bool</span>
</td>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<td class="description last">(OPTIONAL) Determines whether the default
event handlers will be binded to the dom elements.</td>
</tr>
2015-01-22 00:17:16 +02:00
<tr>
<td class="name"><code>manageMode</code></td>
2015-01-22 00:17:16 +02:00
<td class="type">
<span class="param-type">bool</span>
</td>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<td class="description last">(OPTIONAL) Determines whether the customer is going
to make changes to an existing appointment rather than booking a new one.</td>
</tr>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</tbody>
</table>
<dl class="details">
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line24">line 24</a>
</li></ul></dd>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</dl>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<h4 class="name" id=".updateConfirmFrame"><span class="type-signature">(static) </span>updateConfirmFrame<span class="signature">()</span><span class="type-signature"></span></h4>
2015-01-22 00:17:16 +02:00
<div class="description">
Every time this function is executed, it updates the confirmation
page with the latest customer settigns and input for the appointment
booking.
</div>
<dl class="details">
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2015-01-22 00:17:16 +02:00
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line406">line 406</a>
</li></ul></dd>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</dl>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<h4 class="name" id=".updateServiceDescription"><span class="type-signature">(static) </span>updateServiceDescription<span class="signature">(serviceId, $div)</span><span class="type-signature"></span></h4>
2015-01-22 00:17:16 +02:00
<div class="description">
This method updates a div's html content with a brief description of the
user selected service (only if available in db). This is usefull for the
customers upon selecting the correct service.
2015-01-22 00:17:16 +02:00
</div>
2015-01-22 00:17:16 +02:00
<h5>Parameters:</h5>
<table class="params">
<thead>
2015-01-22 00:17:16 +02:00
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>serviceId</code></td>
2015-01-22 00:17:16 +02:00
<td class="type">
<span class="param-type">int</span>
</td>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<td class="description last">The selected service record id.</td>
</tr>
2015-01-22 00:17:16 +02:00
<tr>
<td class="name"><code>$div</code></td>
2015-01-22 00:17:16 +02:00
<td class="type">
<span class="param-type">object</span>
</td>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<td class="description last">The destination div jquery object (e.g. provide $('#div-id')
object as value).</td>
</tr>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</tbody>
</table>
<dl class="details">
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2015-01-22 00:17:16 +02:00
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line566">line 566</a>
</li></ul></dd>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</dl>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<h4 class="name" id=".validateCustomerForm"><span class="type-signature">(static) </span>validateCustomerForm<span class="signature">()</span><span class="type-signature"> &rarr; {bool}</span></h4>
2015-01-22 00:17:16 +02:00
<div class="description">
This function validates the customer's data input. The user cannot contiue
without passing all the validation checks.
2015-01-22 00:17:16 +02:00
</div>
<dl class="details">
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2015-01-22 00:17:16 +02:00
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line372">line 372</a>
</li></ul></dd>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</dl>
2015-01-22 00:17:16 +02:00
<h5>Returns:</h5>
<div class="param-desc">
Returns the validation result.
</div>
<dl>
2015-01-22 00:17:16 +02:00
<dt>
Type
</dt>
<dd>
<span class="param-type">bool</span>
2015-01-22 00:17:16 +02:00
</dd>
</dl>
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
2015-01-22 00:17:16 +02:00
</article>
2015-01-22 00:17:16 +02:00
</section>
</div>
<nav>
2015-01-22 00:17:16 +02:00
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AdminsHelper.html">AdminsHelper</a></li><li><a href="CategoriesHelper.html">CategoriesHelper</a></li><li><a href="CustomersHelper.html">CustomersHelper</a></li><li><a href="ProvidersHelper.html">ProvidersHelper</a></li><li><a href="SecretariesHelper.html">SecretariesHelper</a></li><li><a href="ServicesHelper.html">ServicesHelper</a></li><li><a href="SystemSettings.html">SystemSettings</a></li><li><a href="UserSettings.html">UserSettings</a></li><li><a href="WorkingPlan.html">WorkingPlan</a></li></ul><h3>Namespaces</h3><ul><li><a href="Backend.html">Backend</a></li><li><a href="BackendCalendar.html">BackendCalendar</a></li><li><a href="BackendCustomers.html">BackendCustomers</a></li><li><a href="BackendServices.html">BackendServices</a></li><li><a href="BackendSettings.html">BackendSettings</a></li><li><a href="BackendUsers.html">BackendUsers</a></li><li><a href="FrontendBook.html">FrontendBook</a></li><li><a href="GeneralFunctions.html">GeneralFunctions</a></li></ul><h3>Global</h3><ul><li><a href="global.html#enableCancel">enableCancel</a></li><li><a href="global.html#enableSubmit">enableSubmit</a></li></ul>
</nav>
2015-01-22 00:17:16 +02:00
<br class="clear">
<footer>
2015-01-29 00:54:11 +02:00
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha13</a> on Wed Jan 28 2015 23:12:50 GMT+0100 (CET)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>