Implemented URL query parsing for initial token /opa/?token=abcde
[src/app-framework-demo.git] / afb-client / bower_components / tether / examples / chosen / index.html
1 <!DOCTYPE html>
2 <html>
3     <head>
4         <meta charset="utf-8">
5         <meta http-equiv="X-UA-Compatible" content="chrome=1">
6         <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
7         <link rel="stylesheet" href="../../css/drop.css" />
8         <link rel="stylesheet" href="../resources/css/base.css" />
9         <link rel="stylesheet" href="chosen.css" />
10     </head>
11     <body>
12         text<br/>
13         text<br/>
14         text<br/>
15         text<br/>
16         text<br/>
17         text<br/>
18         text<br/>
19         text<br/>
20         text<br/>
21         text<br/>
22         text<br/>
23         text<br/>
24         text<br/>
25         text<br/>
26         text<br/>
27         text<br/>
28         text<br/>
29         text<br/>
30         text<br/>
31         <br/>
32         Favorite pizza style: <br/>
33         <div class="drop-chosen-target chosen-container chosen-container-single chosen-with-drop" style="width: 350px">
34             <a class="chosen-single chosen-default" tabindex="-1"><span>Choose a style...</span><div><b></b></div></a>
35         </div>
36         <br/>
37         <br/>
38         text<br/>
39         text<br/>
40         text<br/>
41         text<br/>
42         text<br/>
43         text<br/>
44         text<br/>
45         text<br/>
46         text<br/>
47         text<br/>
48         <script src="../resources/js/log.js"></script>
49         <script src="../resources/js/jquery.js"></script>
50         <script src="chosen.js"></script>
51         <script src="../../drop.js"></script>
52         <script>
53             $(function(){
54                 var $target, $drop;
55
56                 $target = $('.drop-chosen-target').drop({
57                     className: 'drop-chosen',
58                     attach: 'bottom-left',
59                     content: ''
60                 });
61
62                 $drop = $target.data().drop.$drop;
63
64                 $drop.append('<select><option>Plain</option><option>Pepperoni</option><option>Supreme</option></select>');
65
66                 $drop.on('openDrop', function(event){
67                     $target.addClass('chosen-container-active');
68                 }).on('closeDrop', function(event){
69                     $target.removeClass('chosen-container-active');
70                 });
71
72                 $drop.on('openDrop', function(event) {
73                     var $select = $drop.find('select');
74
75                     if (!$drop.find('.chosen-container').length) {
76                         $select
77                             .css('width', $target.outerWidth())
78                             .chosen({
79                                 allow_single_deselect: true,
80                                 disable_search_threshold: 0
81                             })
82                         ;
83                     }
84
85                     setTimeout(function(){
86                         $drop.find('.chosen-search input').click().focus().keyup();
87                         $target.drop('positionDrop');
88                     }, 0);
89                 });
90             });
91         </script>
92         <style>
93             .drop-chosen-target > a {
94                 outline: none;
95             }
96
97             .drop.drop-chosen {
98                 background: transparent;
99             }
100
101             .drop.drop-chosen .chosen-container > .chosen-single {
102                 display: none;
103             }
104
105             .drop.drop-chosen .chosen-container .chosen-drop {
106                 position: static;
107             }
108         </style>
109     </body>
110 </html>