/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to Code Viewer Alt/AJAX/AjaxDemoApp8_getResourceAvailability_description.html

  • Committer: Gustav Hatvigsson
  • Date: 2013-05-31 06:15:46 UTC
  • mfrom: (90.1.20 lenasys2)
  • Revision ID: gustav.hartvigsson@gmail.com-20130531061546-vj8z28sq375kvghq
Merged Jonsson:s changes:
Fixed the layout on cms index so the arrows and dots marks expanded objects.
Fixed so the course content is sorted by course occasion and not by name

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<span class="description">
2
 
<br>
3
 
<div class="descriptionheading">Overview</div>
4
 
 
5
 
Since no error correction is done for the bookings (i.e. it is possible to book resources that are not available at the requested date) all
6
 
applications must check resource availability. This function passes a resource ID to the API which returns a set of available dates, 
7
 
and for each date the number of available positions and the cost for making a booking is returned.
8
 
 
9
 
<div class="descriptionheading">ResultAvailability</div>
10
 
<span class="interestingdescription">booking/getavailability_XML.php</span> shows the availability information for all available dates for the given resourceID.
11
 
 
12
 
<br><br>
13
 
 
14
 
<br><br><div class='exampleheading'>Call Example:<br><br>
15
 
<pre><span class="codeexample">$.ajax({
16
 
        type: 'POST',
17
 
        url: 'booking/getavailability_XML.php',
18
 
        data: {
19
 
        //      type: escape("Hotell_Demo"), // Optional: You can specify the application?
20
 
                resourceID: resource
21
 
        },
22
 
        success:  ResultAvailability
23
 
});                                                             
24
 
</span></pre>
25
 
</div>
26
 
 
27
 
<br>
28
 
 
29
 
<br><div class='exampleheading'>Returned Data Example:<br>
30
 
<pre><span class="codeexample">
31
 
&lt;avail&gt;
32
 
&lt;availability 
33
 
    resourceID='1008'
34
 
    name='The Laszlo Plaza'
35
 
    location='Athens'
36
 
    company='Laszlo Inc'
37
 
    size='96'
38
 
    cost='110'
39
 
    category='1'
40
 
    date='2001-01-01'
41
 
    bookingcount='0'
42
 
    bookingcost='28.99'
43
 
    bookingclass='1'
44
 
    remaining='96'
45
 
 /&gt;
46
 
</span>
47
 
 
48
 
</div>
49
 
                                                                                                                                        
50
 
</span></pre>