~ubuntu-branches/ubuntu/raring/maas/raring-updates

« back to all changes in this revision

Viewing changes to src/maasserver/static/jslibs/yui/3.4.1/docs/autocomplete/ac-yql.html

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2012-07-03 17:42:37 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20120703174237-p8l0keuuznfg721k
Tags: 0.1+bzr709+dfsg-0ubuntu1
* New Upstream release
* debian/control:
  - Depends on python-celery, python-tempita, libjs-yui3-{full,min},
    libjs-raphael
* debian/maas.install:
  - Install apiclient, celeryconfig.py, maas-import-pxe-files, preseeds_v2.
  - Update to install various files from chroot, rather tha manually copy
    them from the source.
* debian/maas.links: symlink celeryconfig.py
* debian/maas.maas-celery.upstart: Add job.
* debian/rules:
  - Install celery upstart job.
  - Do not install jslibs as packages are now used.
  - Drop copying of maas_local_settings_sample.py as source now ships
    a maas_local_settings.py
* debian/patches:
  - 04-maas-http-fix.patch: Drop. Merged upstream.
  - 01-fix-database-settings.patch: Refreshed.
  - 99_enums_js.patch: Added until creation of enum.js / build process
    is fixed.
* debian/maas.postinst: Update bzr version to correctly handle upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html>
2
 
<html lang="en">
3
 
<head>
4
 
    <meta charset="utf-8">
5
 
    <title>Example: Remote Data via YQL</title>
6
 
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.4.0pr3/build/cssgrids/grids-min.css">
7
 
    <link rel="stylesheet" href="../assets/css/main.css">
8
 
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
9
 
    <script src="../../build/yui/yui-min.js"></script>
10
 
</head>
11
 
<body>
12
 
 
13
 
<div id="doc">
14
 
    <h1>Example: Remote Data via YQL</h1>
15
 
 
16
 
    
17
 
 
18
 
    <div class="yui3-g">
19
 
        <div id="main" class="yui3-u">
20
 
            <div class="content"><style scoped>
21
 
#ac-input { width: 250px; }
22
 
</style>
23
 
 
24
 
<div class="intro">
25
 
<p>
26
 
This example demonstrates how to provide autocomplete suggestions using a YQL query as the source. In this case, we're using a custom <a href="http://developer.yahoo.com/yql/console/?q=select%20*%20from%20search.suggest%20where%20query%3D%22yui%20autocomplete%22&amp;env=http%3A%2F%2Fpieisgood.org%2Fyql%2Ftables.env"><code>search.suggest</code> YQL table</a> to provide suggestions based on popular Yahoo! Search queries.
27
 
</p>
28
 
</div>
29
 
 
30
 
<div class="example">
31
 
    <div id="demo" class="yui3-skin-sam">
32
 
  <label for="ac-input">Search:</label><br>
33
 
  <input id="ac-input" type="text">
34
 
</div>
35
 
 
36
 
<script>
37
 
YUI().use('autocomplete', 'autocomplete-highlighters', function (Y) {
38
 
  Y.one('#ac-input').plug(Y.Plugin.AutoComplete, {
39
 
    resultHighlighter: 'phraseMatch',
40
 
    source: 'select * from search.suggest where query="{query}"',
41
 
    yqlEnv: 'http://pieisgood.org/yql/tables.env'
42
 
  });
43
 
});
44
 
</script>
45
 
 
46
 
</div>
47
 
 
48
 
<h2>HTML</h2>
49
 
 
50
 
<pre class="code prettyprint">&lt;div id=&quot;demo&quot; class=&quot;yui3-skin-sam&quot;&gt;
51
 
  &lt;label for=&quot;ac-input&quot;&gt;Search:&lt;&#x2F;label&gt;&lt;br&gt;
52
 
  &lt;input id=&quot;ac-input&quot; type=&quot;text&quot;&gt;
53
 
&lt;&#x2F;div&gt;</pre>
54
 
 
55
 
 
56
 
<h2>JavaScript</h2>
57
 
 
58
 
<pre class="code prettyprint">YUI().use(&#x27;autocomplete&#x27;, &#x27;autocomplete-highlighters&#x27;, function (Y) {
59
 
  Y.one(&#x27;#ac-input&#x27;).plug(Y.Plugin.AutoComplete, {
60
 
    resultHighlighter: &#x27;phraseMatch&#x27;,
61
 
    source: &#x27;select * from search.suggest where query=&quot;{query}&quot;&#x27;,
62
 
    yqlEnv: &#x27;http:&#x2F;&#x2F;pieisgood.org&#x2F;yql&#x2F;tables.env&#x27;
63
 
  });
64
 
});</pre>
65
 
 
66
 
 
67
 
<h2>Complete Example Source</h2>
68
 
 
69
 
<pre class="code prettyprint">&lt;div id=&quot;demo&quot; class=&quot;yui3-skin-sam&quot;&gt;
70
 
  &lt;label for=&quot;ac-input&quot;&gt;Search:&lt;&#x2F;label&gt;&lt;br&gt;
71
 
  &lt;input id=&quot;ac-input&quot; type=&quot;text&quot;&gt;
72
 
&lt;&#x2F;div&gt;
73
 
 
74
 
&lt;script&gt;
75
 
YUI().use(&#x27;autocomplete&#x27;, &#x27;autocomplete-highlighters&#x27;, function (Y) {
76
 
  Y.one(&#x27;#ac-input&#x27;).plug(Y.Plugin.AutoComplete, {
77
 
    resultHighlighter: &#x27;phraseMatch&#x27;,
78
 
    source: &#x27;select * from search.suggest where query=&quot;{query}&quot;&#x27;,
79
 
    yqlEnv: &#x27;http:&#x2F;&#x2F;pieisgood.org&#x2F;yql&#x2F;tables.env&#x27;
80
 
  });
81
 
});
82
 
&lt;&#x2F;script&gt;</pre>
83
 
 
84
 
</div>
85
 
        </div>
86
 
 
87
 
        <div id="sidebar" class="yui3-u">
88
 
            
89
 
 
90
 
            
91
 
                <div class="sidebox">
92
 
                    <div class="hd">
93
 
                        <h2 class="no-toc">Examples</h2>
94
 
                    </div>
95
 
 
96
 
                    <div class="bd">
97
 
                        <ul class="examples">
98
 
                            
99
 
                                
100
 
                                    <li data-description="How to provide autocomplete suggestions from a local array.">
101
 
                                        <a href="ac-local.html">Basic Local Data</a>
102
 
                                    </li>
103
 
                                
104
 
                            
105
 
                                
106
 
                                    <li data-description="How to provide autocomplete suggestions using a remote JSONP source.">
107
 
                                        <a href="ac-jsonp.html">Remote Data via JSONP</a>
108
 
                                    </li>
109
 
                                
110
 
                            
111
 
                                
112
 
                                    <li data-description="How to provide autocomplete suggestions using a YQL query source.">
113
 
                                        <a href="ac-yql.html">Remote Data via YQL</a>
114
 
                                    </li>
115
 
                                
116
 
                            
117
 
                                
118
 
                                    <li data-description="How to provide autocomplete suggestions using a DataSource instance.">
119
 
                                        <a href="ac-datasource.html">Remote Data via DataSource</a>
120
 
                                    </li>
121
 
                                
122
 
                            
123
 
                                
124
 
                                    <li data-description="How to implement delimited tag completion.">
125
 
                                        <a href="ac-tagging.html">Tag Completion Using Query Delimiters</a>
126
 
                                    </li>
127
 
                                
128
 
                            
129
 
                                
130
 
                                    <li data-description="How to find and select Flickr photos using a YQL source and a custom autocomplete result formatter.">
131
 
                                        <a href="ac-flickr.html">Find Photos on Flickr (Custom Formatting, YQL Source)</a>
132
 
                                    </li>
133
 
                                
134
 
                            
135
 
                                
136
 
                                    <li data-description="How to use autocomplete-base to filter a set of existing items on a page.">
137
 
                                        <a href="ac-filter.html">Filter a Set of Existing Items on a Page</a>
138
 
                                    </li>
139
 
                                
140
 
                            
141
 
                        </ul>
142
 
                    </div>
143
 
                </div>
144
 
            
145
 
 
146
 
            
147
 
        </div>
148
 
    </div>
149
 
</div>
150
 
 
151
 
<script src="../assets/vendor/prettify/prettify-min.js"></script>
152
 
<script>prettyPrint();</script>
153
 
 
154
 
</body>
155
 
</html>