Merge lp:~sidnei/lazr-js/combo-service into lp:lazr-js
- combo-service
- Merge into toolchain
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~sidnei/lazr-js/combo-service |
Merge into: | lp:lazr-js |
Diff against target: |
2210 lines (+1015/-564) 32 files modified
Makefile (+7/-4) combo.tac (+30/-0) examples/activator/index.html (+15/-21) examples/anim/index.html (+27/-18) examples/autocomplete/index.html (+273/-276) examples/choiceedit/index.html (+26/-37) examples/combo.html (+201/-0) examples/effects/index.html (+46/-27) examples/error/index.html (+18/-37) examples/formoverlay/index.html (+24/-28) examples/inlineeditor/index.html (+25/-16) examples/lazr/index.html (+27/-17) examples/overlay/index.html (+24/-27) examples/picker/index.html (+20/-20) src-js/lazrjs/activator/activator.js (+3/-2) src-js/lazrjs/autocomplete/autocomplete.js (+2/-1) src-js/lazrjs/choiceedit/assets/choiceedit-core.css (+1/-1) src-js/lazrjs/choiceedit/assets/skins/sam/choiceedit-skin.css (+3/-0) src-js/lazrjs/choiceedit/choiceedit.js (+4/-3) src-js/lazrjs/effects/effects.js (+2/-1) src-js/lazrjs/error/assets/skins/sam/error-skin.css (+3/-0) src-js/lazrjs/error/error.js (+1/-1) src-js/lazrjs/formoverlay/assets/skins/sam/formoverlay-skin.css (+3/-0) src-js/lazrjs/formoverlay/formoverlay.js (+1/-1) src-js/lazrjs/inlineedit/editor.js (+2/-1) src-js/lazrjs/lazr/lazr.js (+1/-1) src-js/lazrjs/overlay/assets/pretty-overlay-core.css (+10/-5) src-js/lazrjs/overlay/overlay.js (+2/-2) src-js/lazrjs/picker/picker.js (+2/-1) src-py/lazr/js/build.py (+0/-11) src-py/lazr/js/meta.py (+94/-2) src-py/lazr/js/tests/test_meta.py (+118/-3) |
To merge this branch: | bzr merge lp:~sidnei/lazr-js/combo-service |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Māris Fogels (community) | Approve | ||
Edwin Grubbs | Pending | ||
Review via email: mp+15009@code.launchpad.net |
Commit message
Description of the change
Sidnei da Silva (sidnei) wrote : | # |
Māris Fogels (mars) wrote : | # |
Hi Sidnei,
This looks good. If you have to, I think you could land it as-is, but I do have some comments about the branch:
• Nice formoverlay example in combo.html. It is very straight forward
• Why did some of the lazr module dependencies get updated?
• Do we need to include the css* module dependencies, or can they be inlined on the page? I worry about the two approaches confusing developers.
• test_extract_
• Use Y.one() instead of Y.get()
I think we can define a global LAZR() function in lazr-meta to replace YUI(), but that can be saved for another branch.
Maris
Francis J. Lacoste (flacoste) wrote : | # |
On November 19, 2009, Māris Fogels wrote:
> I think we can define a global LAZR() function in lazr-meta to replace
> YUI(), but that can be saved for another branch.
>
I don't think that is particularly interesting since all applications will
need to merge in their own modules in the LAZR config. So why define a LAZR()
wrapper, when you'll need to define a LP(), U1(), LANDSCAPE() one?
--
Francis J. Lacoste
<email address hidden>
- 194. By Sidnei da Silva
-
- Move css modules inline
Sidnei da Silva (sidnei) wrote : | # |
Thanks for the review.
- CSS modules: I've updated the examples to inline them.
- Module dependencies: Only overlay was changed, to make the dependencies more explicit, the other changes were about adding 'skinnable'.
- Tests: they look very similar, you have to look a bit closer to notice the difference yeah. :)
- Y.get(): I didn't introduce any new one. But it would be nice to do a once-over and clear them all.
Sidnei da Silva (sidnei) wrote : | # |
FWIW, I don't think it's a good idea to define a global LAZR, since the plan to include lazr-meta.js other projects, each of which will have to define it's own YUI() instance.
Māris Fogels (mars) wrote : | # |
On Thu, Nov 19, 2009 at 12:34 PM, Sidnei da Silva
<email address hidden> wrote:
> FWIW, I don't think it's a good idea to define a global LAZR, since the plan to include lazr-meta.js other projects, each of which will have to define it's own YUI() instance.
So, I was suggesting the global LAZR() YUI wrapper because there is
code in each example that constructs a LAZR_YUI_CONFIG, and then
passes that into a YUI() constructor. Instead of doing so, why not
combine the two steps into a project-specific LZR() convenience
function? The function would *not* be for use outside of lazr-js,
just for convenience inside. I can see every individual YUI project
going this route, wrapping the YUI constructor as their needs dictate.
Regarding including lazr-meta.js: we will have to see how it works in
practice. I assumed that lazr-meta was for the purpose of running the
lazr project for development and demonstration purposes. I did not
think other projects would ever import lazr-meta.
I am wary of the idea of combining meta-dependencies like this: at
most, you could pull in the YUI config object's "modules" section.
All of the other configuation settings should be left to the
individual project.
Preview Diff
1 | === modified file 'Makefile' | |||
2 | --- Makefile 2009-11-13 20:43:37 +0000 | |||
3 | +++ Makefile 2009-11-19 17:33:11 +0000 | |||
4 | @@ -21,11 +21,12 @@ | |||
5 | 21 | 21 | ||
6 | 22 | # Update the build directory | 22 | # Update the build directory |
7 | 23 | build: $(PY) | 23 | build: $(PY) |
9 | 24 | $(PYTHON) -S bin/jsbuild | 24 | cp -r src-js/lazrjs/yui/* build |
10 | 25 | $(PYTHON) -S bin/jsbuild -b build/lazr -s src-js/lazrjs -n lazr -x lazr/yui | ||
11 | 25 | $(PYTHON) -S bin/yuimeta -n LAZR_MODULES \ | 26 | $(PYTHON) -S bin/yuimeta -n LAZR_MODULES \ |
15 | 26 | -s build \ | 27 | -s build/lazr \ |
16 | 27 | -p lazrjs -x "(-min|-debug|-all|-meta|build/lazr.js|lazr/yui|test)" \ | 28 | -p lazr -x "(-min|-debug|-all|-meta|build/lazr/lazr.js|test)" \ |
17 | 28 | -o build/lazrjs-meta.js | 29 | -o build/lazr/lazr-meta.js |
18 | 29 | 30 | ||
19 | 30 | lint: | 31 | lint: |
20 | 31 | $(PYTHON) -S bin/jslint | 32 | $(PYTHON) -S bin/jslint |
21 | @@ -51,6 +52,8 @@ | |||
22 | 51 | $(PY): bin/buildout buildout.cfg setup.py | 52 | $(PY): bin/buildout buildout.cfg setup.py |
23 | 52 | $(PYTHON) -S ./bin/buildout | 53 | $(PYTHON) -S ./bin/buildout |
24 | 53 | 54 | ||
25 | 55 | run: $(PY) | ||
26 | 56 | $(PY) `which twistd` -ny combo.tac | ||
27 | 54 | 57 | ||
28 | 55 | clean: | 58 | clean: |
29 | 56 | rm -fr build/* bin | 59 | rm -fr build/* bin |
30 | 57 | 60 | ||
31 | === added file 'combo.tac' | |||
32 | --- combo.tac 1970-01-01 00:00:00 +0000 | |||
33 | +++ combo.tac 2009-11-19 17:33:11 +0000 | |||
34 | @@ -0,0 +1,30 @@ | |||
35 | 1 | import os | ||
36 | 2 | |||
37 | 3 | from lazr.js.combo import combo_app | ||
38 | 4 | |||
39 | 5 | from twisted.application import service, strports | ||
40 | 6 | from twisted.internet import reactor | ||
41 | 7 | from twisted.python import threadpool | ||
42 | 8 | from twisted.web import server, wsgi | ||
43 | 9 | from twisted.web.static import File | ||
44 | 10 | from twisted.web.resource import Resource | ||
45 | 11 | |||
46 | 12 | |||
47 | 13 | resource = Resource() | ||
48 | 14 | for path in os.listdir("build"): | ||
49 | 15 | folder = os.path.join("build", path) | ||
50 | 16 | if os.path.isdir(folder): | ||
51 | 17 | resource.putChild(path, File(folder)) | ||
52 | 18 | |||
53 | 19 | threadpool = threadpool.ThreadPool(0, 10) | ||
54 | 20 | threadpool.start() | ||
55 | 21 | reactor.addSystemEventTrigger("during", "shutdown", threadpool.stop) | ||
56 | 22 | |||
57 | 23 | resource.putChild("combo", wsgi.WSGIResource(reactor, threadpool, | ||
58 | 24 | combo_app("build"))) | ||
59 | 25 | |||
60 | 26 | application = service.Application("combo-service") | ||
61 | 27 | site = server.Site(resource) | ||
62 | 28 | |||
63 | 29 | s = strports.service("tcp:9876", site) | ||
64 | 30 | s.setServiceParent(application) | ||
65 | 0 | 31 | ||
66 | === modified file 'examples/activator/index.html' | |||
67 | --- examples/activator/index.html 2009-10-22 20:22:12 +0000 | |||
68 | +++ examples/activator/index.html 2009-11-19 17:33:11 +0000 | |||
69 | @@ -3,17 +3,24 @@ | |||
70 | 3 | <html> | 3 | <html> |
71 | 4 | <head> | 4 | <head> |
72 | 5 | <title>Lazr-js examples: Activator</title> | 5 | <title>Lazr-js examples: Activator</title> |
77 | 6 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 6 | |
78 | 7 | <script type="text/javascript" src="../../build/anim/anim.js"></script> | 7 | <link rel="stylesheet" type="text/css" href="../../build/cssreset/reset-min.css"></link> |
79 | 8 | <script type="text/javascript" src="../../build/lazr/lazr.js"></script> | 8 | <link rel="stylesheet" type="text/css" href="../../build/cssfonts/fonts-min.css"></link> |
80 | 9 | <script type="text/javascript" src="../../build/activator/activator.js"></script> | 9 | <link rel="stylesheet" type="text/css" href="../../build/cssbase/base-min.css"></link> |
81 | 10 | |||
82 | 11 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> | ||
83 | 12 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> | ||
84 | 13 | <script type="text/javascript"> | ||
85 | 14 | var LAZR_YUI_CONFIG = { | ||
86 | 15 | filter: "min", | ||
87 | 16 | base: "../../build/", | ||
88 | 17 | modules: LAZR_MODULES, | ||
89 | 18 | }; | ||
90 | 19 | </script> | ||
91 | 10 | 20 | ||
92 | 11 | <script id="example-script" type="text/javascript"> | 21 | <script id="example-script" type="text/javascript"> |
93 | 12 | 22 | ||
98 | 13 | YUI({ | 23 | YUI(LAZR_YUI_CONFIG).use('node', 'lazr.activator', function(Y) { |
95 | 14 | base: '../../build/yui/current/build/', | ||
96 | 15 | filter: 'raw' | ||
97 | 16 | }).use('node', 'lazr.activator', function(Y) { | ||
99 | 17 | 24 | ||
100 | 18 | Y.log('hooking up widget'); | 25 | Y.log('hooking up widget'); |
101 | 19 | var content_box = Y.get('#example-activator'); | 26 | var content_box = Y.get('#example-activator'); |
102 | @@ -92,19 +99,6 @@ | |||
103 | 92 | }); | 99 | }); |
104 | 93 | </script> | 100 | </script> |
105 | 94 | 101 | ||
106 | 95 | <!-- | ||
107 | 96 | We need to include individual css files because some of them have | ||
108 | 97 | relative paths to images. | ||
109 | 98 | --> | ||
110 | 99 | <link rel="stylesheet" type="text/css" href="../../build/yui/current/build/cssreset/reset.css" /> | ||
111 | 100 | <link rel="stylesheet" type="text/css" href="../../build/yui/current/build/cssfonts/fonts.css" /> | ||
112 | 101 | <link rel="stylesheet" type="text/css" href="../../build/yui/current/build/cssbase/base.css" /> | ||
113 | 102 | |||
114 | 103 | <link type="text/css" rel="stylesheet" href="../../build/lazr-sam.css"></link> | ||
115 | 104 | <link type="text/css" rel="stylesheet" href="../../build/lazr/assets/skins/sam/lazr.css"></link> | ||
116 | 105 | <link type="text/css" rel="stylesheet" href="../../build/activator/assets/activator-core.css"></link> | ||
117 | 106 | <link type="text/css" rel="stylesheet" href="../../build/activator/assets/skins/sam/activator-skin.css"></link> | ||
118 | 107 | </head> | ||
119 | 108 | <body class="yui-skin-sam" style="margin: 1em"> | 102 | <body class="yui-skin-sam" style="margin: 1em"> |
120 | 109 | 103 | ||
121 | 110 | <h1>Activator Widget</h1> | 104 | <h1>Activator Widget</h1> |
122 | 111 | 105 | ||
123 | === modified file 'examples/anim/index.html' | |||
124 | --- examples/anim/index.html 2009-11-10 22:57:58 +0000 | |||
125 | +++ examples/anim/index.html 2009-11-19 17:33:11 +0000 | |||
126 | @@ -1,21 +1,26 @@ | |||
128 | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
129 | 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
130 | 3 | <html> | 3 | <html> |
131 | 4 | <head> | 4 | <head> |
132 | 5 | <title>Lazr-js examples: anim</title> | 5 | <title>Lazr-js examples: anim</title> |
146 | 6 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui-min.js"></script> | 6 | |
147 | 7 | <script type="text/javascript" src="../../build/yui/current/build/oop/oop-min.js"></script> | 7 | <link rel="stylesheet" type="text/css" href="../../build/cssreset/reset-min.css"></link> |
148 | 8 | <script type="text/javascript" src="../../build/yui/current/build/event/event-min.js"></script> | 8 | <link rel="stylesheet" type="text/css" href="../../build/cssfonts/fonts-min.css"></link> |
149 | 9 | <script type="text/javascript" src="../../build/yui/current/build/attribute/attribute-min.js"></script> | 9 | <link rel="stylesheet" type="text/css" href="../../build/cssbase/base-min.css"></link> |
150 | 10 | <script type="text/javascript" src="../../build/yui/current/build/base/base-min.js"></script> | 10 | |
151 | 11 | <script type="text/javascript" src="../../build/yui/current/build/dom/dom-min.js"></script> | 11 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> |
152 | 12 | <script type="text/javascript" src="../../build/yui/current/build/node/node-min.js"></script> | 12 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
153 | 13 | <script type="text/javascript" src="../../build/yui/current/build/anim/anim-min.js"></script> | 13 | <script type="text/javascript"> |
154 | 14 | 14 | var LAZR_YUI_CONFIG = { | |
155 | 15 | <script type="text/javascript" src="../../build/anim/anim.js"></script> | 15 | filter: "min", |
156 | 16 | <script type="text/javascript"> | 16 | base: "../../build/", |
157 | 17 | 17 | modules: LAZR_MODULES, | |
158 | 18 | YUI().use('node', 'event', 'lazr.anim', function(Y) { | 18 | insertBefore: "style-overrides", |
159 | 19 | }; | ||
160 | 20 | </script> | ||
161 | 21 | <script type="text/javascript"> | ||
162 | 22 | |||
163 | 23 | YUI(LAZR_YUI_CONFIG).use('node', 'event', 'lazr.anim', function(Y) { | ||
164 | 19 | 24 | ||
165 | 20 | Y.on('click', function(ev) { | 25 | Y.on('click', function(ev) { |
166 | 21 | var id = ev.target ? ev.target.getAttribute('id') : null; | 26 | var id = ev.target ? ev.target.getAttribute('id') : null; |
167 | @@ -64,9 +69,8 @@ | |||
168 | 64 | }); | 69 | }); |
169 | 65 | 70 | ||
170 | 66 | </script> | 71 | </script> |
174 | 67 | <style> | 72 | <style id="style-overrides" type="text/css"> |
175 | 68 | #flash | 73 | #flash { |
173 | 69 | { | ||
176 | 70 | width:200px; | 74 | width:200px; |
177 | 71 | height: 200px; | 75 | height: 200px; |
178 | 72 | margin-bottom: 20px; | 76 | margin-bottom: 20px; |
179 | @@ -92,7 +96,12 @@ | |||
180 | 92 | pre-configured animation objects.</p> | 96 | pre-configured animation objects.</p> |
181 | 93 | 97 | ||
182 | 94 | <pre> | 98 | <pre> |
184 | 95 | YUI().use('lazr.anim', function(Y) { | 99 | var LAZR_YUI_CONFIG = { |
185 | 100 | filter: "min", | ||
186 | 101 | base: "../../build/", | ||
187 | 102 | modules: LAZR_MODULES, | ||
188 | 103 | }; | ||
189 | 104 | YUI(LAZR_YUI_CONFIG).use('lazr.anim', function(Y) { | ||
190 | 96 | 105 | ||
191 | 97 | var yellow = Y.lazr.anim.flash_in(...); // A yellow flash. | 106 | var yellow = Y.lazr.anim.flash_in(...); // A yellow flash. |
192 | 98 | var green = Y.lazr.anim.green_flash(...); // A green flash. | 107 | var green = Y.lazr.anim.green_flash(...); // A green flash. |
193 | 99 | 108 | ||
194 | === modified file 'examples/autocomplete/index.html' | |||
195 | --- examples/autocomplete/index.html 2009-11-12 18:00:07 +0000 | |||
196 | +++ examples/autocomplete/index.html 2009-11-19 17:33:11 +0000 | |||
197 | @@ -4,284 +4,274 @@ | |||
198 | 4 | <head> | 4 | <head> |
199 | 5 | <title>Lazr-js examples: autocomplete</title> | 5 | <title>Lazr-js examples: autocomplete</title> |
200 | 6 | 6 | ||
211 | 7 | <link type="text/css" rel="stylesheet" href="../../build/yui/current/build/cssreset/reset.css"></link> | 7 | <link rel="stylesheet" type="text/css" href="../../build/cssreset/reset-min.css"></link> |
212 | 8 | <link type="text/css" rel="stylesheet" href="../../build/yui/current/build/cssfonts/fonts.css"></link> | 8 | <link rel="stylesheet" type="text/css" href="../../build/cssfonts/fonts-min.css"></link> |
213 | 9 | <link type="text/css" rel="stylesheet" href="../../build/yui/current/build/cssbase/base.css"></link> | 9 | <link rel="stylesheet" type="text/css" href="../../build/cssbase/base-min.css"></link> |
214 | 10 | 10 | ||
215 | 11 | 11 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> | |
216 | 12 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 12 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
207 | 13 | <script type="text/javascript" src="../../build/yui/current/build/widget/widget-position-debug.js"></script> | ||
208 | 14 | <script type="text/javascript" src="../../build/yui/current/build/widget/widget-position-ext-debug.js"></script> | ||
209 | 15 | <script type="text/javascript" src="../../build/lazr/lazr.js"></script> | ||
210 | 16 | <script type="text/javascript" src="../../build/autocomplete/autocomplete.js"></script> | ||
217 | 17 | <script type="text/javascript"> | 13 | <script type="text/javascript"> |
438 | 18 | 14 | var LAZR_YUI_CONFIG = { | |
439 | 19 | var LP = YUI({ | 15 | filter: "min", |
440 | 20 | base: '../../build/yui/current/build/', | 16 | base: "../../build/", |
441 | 21 | filter: 'raw' | 17 | modules: LAZR_MODULES, |
442 | 22 | }); | 18 | insertBefore: "style-overrides", |
443 | 23 | 19 | }; | |
444 | 24 | var countries = [ | 20 | |
445 | 25 | "European Union", | 21 | var LP = YUI(LAZR_YUI_CONFIG); |
446 | 26 | "United States", | 22 | |
447 | 27 | "Japan", | 23 | var countries = [ |
448 | 28 | "Germany", | 24 | "European Union", |
449 | 29 | "China (PRC)", | 25 | "United States", |
450 | 30 | "United Kingdom", | 26 | "Japan", |
451 | 31 | "France", | 27 | "Germany", |
452 | 32 | "Italy", | 28 | "China (PRC)", |
453 | 33 | "Spain", | 29 | "United Kingdom", |
454 | 34 | "Canada", | 30 | "France", |
455 | 35 | "Brazil", | 31 | "Italy", |
456 | 36 | "Russia", | 32 | "Spain", |
457 | 37 | "India", | 33 | "Canada", |
458 | 38 | "South Korea", | 34 | "Brazil", |
459 | 39 | "Australia", | 35 | "Russia", |
460 | 40 | "Mexico", | 36 | "India", |
461 | 41 | "Netherlands", | 37 | "South Korea", |
462 | 42 | "Turkey", | 38 | "Australia", |
463 | 43 | "Sweden", | 39 | "Mexico", |
464 | 44 | "Belgium", | 40 | "Netherlands", |
465 | 45 | "Indonesia", | 41 | "Turkey", |
466 | 46 | "Switzerland", | 42 | "Sweden", |
467 | 47 | "Poland", | 43 | "Belgium", |
468 | 48 | "Norway", | 44 | "Indonesia", |
469 | 49 | "Republic of China", | 45 | "Switzerland", |
470 | 50 | "Saudi Arabia", | 46 | "Poland", |
471 | 51 | "Austria", | 47 | "Norway", |
472 | 52 | "Greece", | 48 | "Republic of China", |
473 | 53 | "Denmark", | 49 | "Saudi Arabia", |
474 | 54 | "Iran", | 50 | "Austria", |
475 | 55 | "South Africa", | 51 | "Greece", |
476 | 56 | "Argentina", | 52 | "Denmark", |
477 | 57 | "Ireland", | 53 | "Iran", |
478 | 58 | "Thailand", | 54 | "South Africa", |
479 | 59 | "Finland", | 55 | "Argentina", |
480 | 60 | "Venezuela", | 56 | "Ireland", |
481 | 61 | "Portugal", | 57 | "Thailand", |
482 | 62 | "Hong Kong", | 58 | "Finland", |
483 | 63 | "United Arab Emirates", | 59 | "Venezuela", |
484 | 64 | "Malaysia", | 60 | "Portugal", |
485 | 65 | "Czech Republic", | 61 | "Hong Kong", |
486 | 66 | "Colombia", | 62 | "United Arab Emirates", |
487 | 67 | "Nigeria", | 63 | "Malaysia", |
488 | 68 | "Romania", | 64 | "Czech Republic", |
489 | 69 | "Chile", | 65 | "Colombia", |
490 | 70 | "Israel", | 66 | "Nigeria", |
491 | 71 | "Singapore", | 67 | "Romania", |
492 | 72 | "Philippines", | 68 | "Chile", |
493 | 73 | "Pakistan", | 69 | "Israel", |
494 | 74 | "Ukraine", | 70 | "Singapore", |
495 | 75 | "Hungary", | 71 | "Philippines", |
496 | 76 | "Algeria", | 72 | "Pakistan", |
497 | 77 | "New Zealand", | 73 | "Ukraine", |
498 | 78 | "Egypt", | 74 | "Hungary", |
499 | 79 | "Kuwait", | 75 | "Algeria", |
500 | 80 | "Peru", | 76 | "New Zealand", |
501 | 81 | "Kazakhstan", | 77 | "Egypt", |
502 | 82 | "Slovakia", | 78 | "Kuwait", |
503 | 83 | "Morocco", | 79 | "Peru", |
504 | 84 | "Bangladesh", | 80 | "Kazakhstan", |
505 | 85 | "Vietnam", | 81 | "Slovakia", |
506 | 86 | "Qatar", | 82 | "Morocco", |
507 | 87 | "Angola", | 83 | "Bangladesh", |
508 | 88 | "Libya", | 84 | "Vietnam", |
509 | 89 | "Iraq", | 85 | "Qatar", |
510 | 90 | "Croatia", | 86 | "Angola", |
511 | 91 | "Luxembourg", | 87 | "Libya", |
512 | 92 | "Sudan", | 88 | "Iraq", |
513 | 93 | "Slovenia", | 89 | "Croatia", |
514 | 94 | "Cuba", | 90 | "Luxembourg", |
515 | 95 | "Belarus", | 91 | "Sudan", |
516 | 96 | "Ecuador", | 92 | "Slovenia", |
517 | 97 | "Serbia", | 93 | "Cuba", |
518 | 98 | "Oman", | 94 | "Belarus", |
519 | 99 | "Bulgaria", | 95 | "Ecuador", |
520 | 100 | "Lithuania", | 96 | "Serbia", |
521 | 101 | "Syria", | 97 | "Oman", |
522 | 102 | "Dominican Republic", | 98 | "Bulgaria", |
523 | 103 | "Tunisia", | 99 | "Lithuania", |
524 | 104 | "Guatemala", | 100 | "Syria", |
525 | 105 | "Azerbaijan", | 101 | "Dominican Republic", |
526 | 106 | "Sri Lanka", | 102 | "Tunisia", |
527 | 107 | "Kenya", | 103 | "Guatemala", |
528 | 108 | "Latvia", | 104 | "Azerbaijan", |
529 | 109 | "Turkmenistan", | 105 | "Sri Lanka", |
530 | 110 | "Costa Rica", | 106 | "Kenya", |
531 | 111 | "Lebanon", | 107 | "Latvia", |
532 | 112 | "Uruguay", | 108 | "Turkmenistan", |
533 | 113 | "Uzbekistan", | 109 | "Costa Rica", |
534 | 114 | "Yemen", | 110 | "Lebanon", |
535 | 115 | "Cyprus", | 111 | "Uruguay", |
536 | 116 | "Estonia", | 112 | "Uzbekistan", |
537 | 117 | "Trinidad and Tobago", | 113 | "Yemen", |
538 | 118 | "Cameroon", | 114 | "Cyprus", |
539 | 119 | "El Salvador", | 115 | "Estonia", |
540 | 120 | "Iceland", | 116 | "Trinidad and Tobago", |
541 | 121 | "Panama", | 117 | "Cameroon", |
542 | 122 | "Bahrain", | 118 | "El Salvador", |
543 | 123 | "Ivory Coast", | 119 | "Iceland", |
544 | 124 | "Ethiopia", | 120 | "Panama", |
545 | 125 | "Tanzania", | 121 | "Bahrain", |
546 | 126 | "Jordan", | 122 | "Ivory Coast", |
547 | 127 | "Ghana", | 123 | "Ethiopia", |
548 | 128 | "Bosnia and Herzegovina", | 124 | "Tanzania", |
549 | 129 | "Macau", | 125 | "Jordan", |
550 | 130 | "Burma", | 126 | "Ghana", |
551 | 131 | "Bolivia", | 127 | "Bosnia and Herzegovina", |
552 | 132 | "Brunei", | 128 | "Macau", |
553 | 133 | "Botswana", | 129 | "Burma", |
554 | 134 | "Honduras", | 130 | "Bolivia", |
555 | 135 | "Gabon", | 131 | "Brunei", |
556 | 136 | "Uganda", | 132 | "Botswana", |
557 | 137 | "Jamaica", | 133 | "Honduras", |
558 | 138 | "Zambia", | 134 | "Gabon", |
559 | 139 | "Senegal", | 135 | "Uganda", |
560 | 140 | "Paraguay", | 136 | "Jamaica", |
561 | 141 | "Albania", | 137 | "Zambia", |
562 | 142 | "Equatorial Guinea", | 138 | "Senegal", |
563 | 143 | "Georgia", | 139 | "Paraguay", |
564 | 144 | "Democratic Republic of the Congo", | 140 | "Albania", |
565 | 145 | "Nepal", | 141 | "Equatorial Guinea", |
566 | 146 | "Afghanistan", | 142 | "Georgia", |
567 | 147 | "Cambodia", | 143 | "Democratic Republic of the Congo", |
568 | 148 | "Armenia", | 144 | "Nepal", |
569 | 149 | "Republic of the Congo", | 145 | "Afghanistan", |
570 | 150 | "Mozambique", | 146 | "Cambodia", |
571 | 151 | "Republic of Macedonia", | 147 | "Armenia", |
572 | 152 | "Malta", | 148 | "Republic of the Congo", |
573 | 153 | "Namibia", | 149 | "Mozambique", |
574 | 154 | "Madagascar", | 150 | "Republic of Macedonia", |
575 | 155 | "Chad", | 151 | "Malta", |
576 | 156 | "Burkina Faso", | 152 | "Namibia", |
577 | 157 | "Mauritius", | 153 | "Madagascar", |
578 | 158 | "Mali", | 154 | "Chad", |
579 | 159 | "The Bahamas", | 155 | "Burkina Faso", |
580 | 160 | "Papua New Guinea", | 156 | "Mauritius", |
581 | 161 | "Nicaragua", | 157 | "Mali", |
582 | 162 | "Haiti", | 158 | "The Bahamas", |
583 | 163 | "Benin", | 159 | "Papua New Guinea", |
584 | 164 | "Palestinian flag West Bank and Gaza", | 160 | "Nicaragua", |
585 | 165 | "Jersey", | 161 | "Haiti", |
586 | 166 | "Fiji", | 162 | "Benin", |
587 | 167 | "Guinea", | 163 | "Palestinian flag West Bank and Gaza", |
588 | 168 | "Moldova", | 164 | "Jersey", |
589 | 169 | "Niger", | 165 | "Fiji", |
590 | 170 | "Laos", | 166 | "Guinea", |
591 | 171 | "Mongolia", | 167 | "Moldova", |
592 | 172 | "French Polynesia", | 168 | "Niger", |
593 | 173 | "Kyrgyzstan", | 169 | "Laos", |
594 | 174 | "Barbados", | 170 | "Mongolia", |
595 | 175 | "Tajikistan", | 171 | "French Polynesia", |
596 | 176 | "Malawi", | 172 | "Kyrgyzstan", |
597 | 177 | "Liechtenstein", | 173 | "Barbados", |
598 | 178 | "New Caledonia", | 174 | "Tajikistan", |
599 | 179 | "Kosovo", | 175 | "Malawi", |
600 | 180 | "Rwanda", | 176 | "Liechtenstein", |
601 | 181 | "Montenegro", | 177 | "New Caledonia", |
602 | 182 | "Swaziland", | 178 | "Kosovo", |
603 | 183 | "Guam", | 179 | "Rwanda", |
604 | 184 | "Mauritania", | 180 | "Montenegro", |
605 | 185 | "Guernsey", | 181 | "Swaziland", |
606 | 186 | "Isle of Man", | 182 | "Guam", |
607 | 187 | "Togo", | 183 | "Mauritania", |
608 | 188 | "Somalia", | 184 | "Guernsey", |
609 | 189 | "Suriname", | 185 | "Isle of Man", |
610 | 190 | "Aruba", | 186 | "Togo", |
611 | 191 | "North Korea", | 187 | "Somalia", |
612 | 192 | "Zimbabwe", | 188 | "Suriname", |
613 | 193 | "Central African Republic", | 189 | "Aruba", |
614 | 194 | "Faroe Islands", | 190 | "North Korea", |
615 | 195 | "Greenland", | 191 | "Zimbabwe", |
616 | 196 | "Sierra Leone", | 192 | "Central African Republic", |
617 | 197 | "Lesotho", | 193 | "Faroe Islands", |
618 | 198 | "Cape Verde", | 194 | "Greenland", |
619 | 199 | "Eritrea", | 195 | "Sierra Leone", |
620 | 200 | "Bhutan", | 196 | "Lesotho", |
621 | 201 | "Belize", | 197 | "Cape Verde", |
622 | 202 | "Antigua and Barbuda", | 198 | "Eritrea", |
623 | 203 | "Gibraltar", | 199 | "Bhutan", |
624 | 204 | "Maldives", | 200 | "Belize", |
625 | 205 | "San Marino", | 201 | "Antigua and Barbuda", |
626 | 206 | "Guyana", | 202 | "Gibraltar", |
627 | 207 | "Burundi", | 203 | "Maldives", |
628 | 208 | "Saint Lucia", | 204 | "San Marino", |
629 | 209 | "Djibouti", | 205 | "Guyana", |
630 | 210 | "British Virgin Islands", | 206 | "Burundi", |
631 | 211 | "Liberia", | 207 | "Saint Lucia", |
632 | 212 | "Seychelles", | 208 | "Djibouti", |
633 | 213 | "The Gambia", | 209 | "British Virgin Islands", |
634 | 214 | "Northern Mariana Islands", | 210 | "Liberia", |
635 | 215 | "Grenada", | 211 | "Seychelles", |
636 | 216 | "Saint Vincent and the Grenadines", | 212 | "The Gambia", |
637 | 217 | "Saint Kitts and Nevis", | 213 | "Northern Mariana Islands", |
638 | 218 | "East Timor", | 214 | "Grenada", |
639 | 219 | "Vanuatu", | 215 | "Saint Vincent and the Grenadines", |
640 | 220 | "Comoros", | 216 | "Saint Kitts and Nevis", |
641 | 221 | "Samoa", | 217 | "East Timor", |
642 | 222 | "Solomon Islands", | 218 | "Vanuatu", |
643 | 223 | "Guinea-Bissau", | 219 | "Comoros", |
644 | 224 | "American Samoa", | 220 | "Samoa", |
645 | 225 | "Dominica", | 221 | "Solomon Islands", |
646 | 226 | "Micronesia", | 222 | "Guinea-Bissau", |
647 | 227 | "Tonga", | 223 | "American Samoa", |
648 | 228 | "Cook Islands", | 224 | "Dominica", |
649 | 229 | "Palau", | 225 | "Micronesia", |
650 | 230 | "Marshall Islands", | 226 | "Tonga", |
651 | 231 | "S o Tom and Pr ncipe", | 227 | "Cook Islands", |
652 | 232 | "Anguilla", | 228 | "Palau", |
653 | 233 | "Kiribati", | 229 | "Marshall Islands", |
654 | 234 | "Tuvalu", | 230 | "S o Tom and Pr ncipe", |
655 | 235 | "Niue" | 231 | "Anguilla", |
656 | 236 | ]; | 232 | "Kiribati", |
657 | 237 | 233 | "Tuvalu", | |
658 | 234 | "Niue" | ||
659 | 235 | ]; | ||
660 | 238 | </script> | 236 | </script> |
661 | 239 | 237 | ||
687 | 240 | <!-- | 238 | <style id="style-overrides" type="text/css"> |
688 | 241 | We need to include individual css files because some of them have | 239 | #example { |
689 | 242 | relative paths to images. | 240 | background-color: #ecf5fa; |
690 | 243 | --> | 241 | border: 1px solid #8899dd; |
691 | 244 | <link type="text/css" rel="stylesheet" href="../../build/lazr-sam.css"></link> | 242 | padding: 2em; |
692 | 245 | <link type="text/css" rel="stylesheet" href="../../build/lazr/assets/skins/sam/lazr.css"></link> | 243 | } |
693 | 246 | <link type="text/css" rel="stylesheet" href="../../build/autocomplete/assets/skins/sam/autocomplete.css"></link> | 244 | |
694 | 247 | 245 | #example label { display: block; line-height: 2em; font-weight: bold; } | |
695 | 248 | <style type="text/css"> | 246 | #example input { margin-bottom: 1em; } |
696 | 249 | #example { | 247 | #example h4 { font-weight: normal; } |
697 | 250 | background-color: #ecf5fa; | 248 | #example #keys li { line-height: 2em; } |
698 | 251 | border: 1px solid #8899dd; | 249 | #example #keys kbd { |
699 | 252 | padding: 2em; | 250 | background-color: #eee; |
700 | 253 | } | 251 | border: 1px solid #bbb; |
701 | 254 | 252 | padding-left: 3px; | |
702 | 255 | #example label { display: block; line-height: 2em; font-weight: bold; } | 253 | padding-right: 3px; |
703 | 256 | #example input { margin-bottom: 1em; } | 254 | } |
679 | 257 | #example h4 { font-weight: normal; } | ||
680 | 258 | #example #keys li { line-height: 2em; } | ||
681 | 259 | #example #keys kbd { | ||
682 | 260 | background-color: #eee; | ||
683 | 261 | border: 1px solid #bbb; | ||
684 | 262 | padding-left: 3px; | ||
685 | 263 | padding-right: 3px; | ||
686 | 264 | } | ||
704 | 265 | </style> | 255 | </style> |
705 | 266 | </head> | 256 | </head> |
706 | 267 | 257 | ||
707 | 268 | <body class="yui-skin-sam"> | 258 | <body class="yui-skin-sam"> |
708 | 269 | 259 | ||
724 | 270 | <h1>A Simple auto-complete Widget</h1> | 260 | <h1>A Simple auto-complete Widget</h1> |
725 | 271 | 261 | ||
726 | 272 | <h2>Demonstration</h2> | 262 | <h2>Demonstration</h2> |
727 | 273 | <div id="example"> | 263 | <div id="example"> |
728 | 274 | <label for="ac-input">Enter a country name:</label> | 264 | <label for="ac-input">Enter a country name:</label> |
729 | 275 | <input id="ac-input" type="text" value="" /> | 265 | <input id="ac-input" type="text" value="" /> |
730 | 276 | <h4>Some useful keyboard shortcuts:</h4> | 266 | <h4>Some useful keyboard shortcuts:</h4> |
731 | 277 | <ul id="keys"> | 267 | <ul id="keys"> |
732 | 278 | <li><kbd>Tab</kbd> or <kbd>Enter</kbd> completes the current input.</li> | 268 | <li><kbd>Tab</kbd> or <kbd>Enter</kbd> completes the current input.</li> |
733 | 279 | <li><kbd>Up Arrow</kbd> and <kbd>Down Arrow</kbd> navigate the completions list</li> | 269 | <li><kbd>Up Arrow</kbd> and <kbd>Down Arrow</kbd> navigate the completions list</li> |
734 | 280 | <li><kbd>Esc</kbd> closes the completion list</li> | 270 | <li><kbd>Esc</kbd> closes the completion list</li> |
735 | 281 | </ul> | 271 | </ul> |
736 | 282 | 272 | ||
737 | 283 | <script type="text/javascript"> | 273 | <script type="text/javascript"> |
738 | 284 | LP.use('node', 'event', 'dump', 'lazr.autocomplete', function(Y) { | 274 | LP.use('node', 'event', 'dump', 'lazr.autocomplete', function(Y) { |
739 | 285 | 275 | ||
740 | 286 | function log(msg) { | 276 | function log(msg) { |
741 | 287 | Y.log(msg, 'info'); | 277 | Y.log(msg, 'info'); |
742 | @@ -319,8 +309,8 @@ | |||
743 | 319 | <h3>Javascript</h3> | 309 | <h3>Javascript</h3> |
744 | 320 | Add the following javascript and css tags into your page. | 310 | Add the following javascript and css tags into your page. |
745 | 321 | <pre> | 311 | <pre> |
748 | 322 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 312 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> |
749 | 323 | <script type="text/javascript" src="../../build/autocomplete/autocomplete.js"></script> | 313 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
750 | 324 | </pre> | 314 | </pre> |
751 | 325 | 315 | ||
752 | 326 | <p> | 316 | <p> |
753 | @@ -338,11 +328,18 @@ | |||
754 | 338 | The AutoComplete widget requires two ATTRs on creation: a node id and an | 328 | The AutoComplete widget requires two ATTRs on creation: a node id and an |
755 | 339 | array containing data. | 329 | array containing data. |
756 | 340 | <pre> | 330 | <pre> |
760 | 341 | var autocomplete = new Y.lazr.AutoComplete({ | 331 | var LAZR_YUI_CONFIG = { |
761 | 342 | input: '#input-box', | 332 | filter: "min", |
762 | 343 | data: ['Mike', 'Fred', 'Barney'] | 333 | base: "../../build/", |
763 | 334 | modules: LAZR_MODULES, | ||
764 | 335 | }; | ||
765 | 336 | YUI(LAZR_YUI_CONFIG).use("lazr.autocomplete", function(Y) { | ||
766 | 337 | var autocomplete = new Y.lazr.AutoComplete({ | ||
767 | 338 | input: '#input-box', | ||
768 | 339 | data: ['Mike', 'Fred', 'Barney'] | ||
769 | 340 | }); | ||
770 | 341 | autocomplete.render(); | ||
771 | 344 | }); | 342 | }); |
772 | 345 | autocomplete.render(); | ||
773 | 346 | </pre> | 343 | </pre> |
774 | 347 | </body> | 344 | </body> |
775 | 348 | </html> | 345 | </html> |
776 | 349 | 346 | ||
777 | === modified file 'examples/choiceedit/index.html' | |||
778 | --- examples/choiceedit/index.html 2009-10-22 20:22:12 +0000 | |||
779 | +++ examples/choiceedit/index.html 2009-11-19 17:33:11 +0000 | |||
780 | @@ -2,27 +2,20 @@ | |||
781 | 2 | <html> | 2 | <html> |
782 | 3 | <head> | 3 | <head> |
783 | 4 | <title>Lazr-js examples: Choice editing</title> | 4 | <title>Lazr-js examples: Choice editing</title> |
805 | 5 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 5 | |
806 | 6 | <script type="text/javascript" src="../../build/lazr/lazr.js"></script> | 6 | <link rel="stylesheet" type="text/css" href="../../build/cssreset/reset-min.css"></link> |
807 | 7 | <script type="text/javascript" src="../../build/anim/anim.js"></script> | 7 | <link rel="stylesheet" type="text/css" href="../../build/cssfonts/fonts-min.css"></link> |
808 | 8 | <script type="text/javascript" src="../../build/overlay/overlay.js"></script> | 8 | <link rel="stylesheet" type="text/css" href="../../build/cssbase/base-min.css"></link> |
809 | 9 | 9 | ||
810 | 10 | <!-- | 10 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> |
811 | 11 | We need to include individual css files because some of them have | 11 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
812 | 12 | relative paths to images. | 12 | <script type="text/javascript"> |
813 | 13 | --> | 13 | var LAZR_YUI_CONFIG = { |
814 | 14 | <link type="text/css" rel="stylesheet" href="../../build/lazr-sam.css"></link> | 14 | filter: "min", |
815 | 15 | <link type="text/css" rel="stylesheet" href="../../build/lazr/assets/skins/sam/lazr.css"></link> | 15 | base: "../../build/", |
816 | 16 | <link type="text/css" rel="stylesheet" href="../../build/inlineedit/assets/skins/sam/editor.css"></link> | 16 | modules: LAZR_MODULES, |
817 | 17 | 17 | }; | |
818 | 18 | <script type="text/javascript" src="../../build/choiceedit/choiceedit.js"></script> | 18 | </script> |
798 | 19 | |||
799 | 20 | <link type="text/css" rel="stylesheet" | ||
800 | 21 | href="../../build/overlay/assets/pretty-overlay-core.css"> | ||
801 | 22 | <link type="text/css" rel="stylesheet" | ||
802 | 23 | href="../../build/overlay/assets/skins/sam/pretty-overlay-skin.css"> | ||
803 | 24 | <link type="text/css" rel="stylesheet" | ||
804 | 25 | href="../../build/choiceedit/assets/choiceedit-core.css"> | ||
819 | 26 | </head> | 19 | </head> |
820 | 27 | <body class="yui-skin-sam"> | 20 | <body class="yui-skin-sam"> |
821 | 28 | 21 | ||
822 | @@ -36,23 +29,21 @@ | |||
823 | 36 | 29 | ||
824 | 37 | <h2>Required include dependencies</h2> | 30 | <h2>Required include dependencies</h2> |
825 | 38 | <pre> | 31 | <pre> |
836 | 39 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 32 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> |
837 | 40 | <script type="text/javascript" src="../../build/choiceedit/choiceedit.js"></script> | 33 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
828 | 41 | <script type="text/javascript" src="../../build/anim/anim.js"></script> | ||
829 | 42 | |||
830 | 43 | <!-- overlay required files --> | ||
831 | 44 | <link type="text/css" rel="stylesheet" href="../../build/overlay/assets/pretty-overlay-core.css"></link> | ||
832 | 45 | <link type="text/css" rel="stylesheet" href="../../build/overlay/assets/skins/sam/pretty-overlay-skin.css"></link> | ||
833 | 46 | <!-- choiceedit required files --> | ||
834 | 47 | <link type="text/css" rel="stylesheet" href="../../build/choiceedit/assets/choiceedit-core.css"></link> | ||
835 | 48 | |||
838 | 49 | </pre> | 34 | </pre> |
839 | 50 | 35 | ||
840 | 51 | <h2>Example instantiation</h2> | 36 | <h2>Example instantiation</h2> |
841 | 52 | 37 | ||
842 | 53 | <pre> | 38 | <pre> |
845 | 54 | YUI().use('node', 'event', 'widget', 'plugin', 'overlay', 'lazr.choiceedit', function(Y) { | 39 | var LAZR_YUI_CONFIG = { |
846 | 55 | 40 | filter: "min", | |
847 | 41 | base: "../../build/", | ||
848 | 42 | modules: LAZR_MODULES, | ||
849 | 43 | }; | ||
850 | 44 | YUI(LAZR_YUI_CONFIG).use('node', 'event', 'widget', 'plugin', 'overlay', | ||
851 | 45 | 'lazr.choiceedit', function(Y) { | ||
852 | 46 | |||
853 | 56 | var choice_edit = new Y.ChoiceSource({ | 47 | var choice_edit = new Y.ChoiceSource({ |
854 | 57 | contentBox: '#status', | 48 | contentBox: '#status', |
855 | 58 | value: 'incomplete', | 49 | value: 'incomplete', |
856 | @@ -175,10 +166,8 @@ | |||
857 | 175 | </pre> | 166 | </pre> |
858 | 176 | 167 | ||
859 | 177 | <script> | 168 | <script> |
864 | 178 | YUI({ | 169 | YUI(LAZR_YUI_CONFIG).use('node', 'event', 'widget', 'plugin', |
865 | 179 | base: '../../build/yui/current/build/', | 170 | 'overlay', 'lazr.choiceedit', function(Y) { |
862 | 180 | filter: 'raw' | ||
863 | 181 | }).use('node', 'event', 'widget', 'plugin', 'overlay', 'lazr.choiceedit', function(Y) { | ||
866 | 182 | 171 | ||
867 | 183 | // Add a delay between the start and end of the inline editor widget's | 172 | // Add a delay between the start and end of the inline editor widget's |
868 | 184 | // "save" event. | 173 | // "save" event. |
869 | 185 | 174 | ||
870 | === added file 'examples/combo.html' | |||
871 | --- examples/combo.html 1970-01-01 00:00:00 +0000 | |||
872 | +++ examples/combo.html 2009-11-19 17:33:11 +0000 | |||
873 | @@ -0,0 +1,201 @@ | |||
874 | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
875 | 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
876 | 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
877 | 4 | <head> | ||
878 | 5 | <title>LAZR JS Examples: lazr.formoverlay</title> | ||
879 | 6 | <meta http-equiv="content-type" content="text/html;charset=utf-8" /> | ||
880 | 7 | |||
881 | 8 | <link rel="stylesheet" type="text/css" href="../build/cssreset/reset-min.css"></link> | ||
882 | 9 | <link rel="stylesheet" type="text/css" href="../cssfonts/fonts-min.css"></link> | ||
883 | 10 | <link rel="stylesheet" type="text/css" href="../cssbase/base-min.css"></link> | ||
884 | 11 | |||
885 | 12 | <script type="text/javascript" src="../build/yui/yui.js"></script> | ||
886 | 13 | <script type="text/javascript" src="../build/lazr/lazr-meta.js"></script> | ||
887 | 14 | <script type="text/javascript"> | ||
888 | 15 | var LAZR_YUI_CONFIG = { | ||
889 | 16 | filter: "min", | ||
890 | 17 | comboBase: "http://localhost:9876/combo?", | ||
891 | 18 | root: "", | ||
892 | 19 | combine: true, | ||
893 | 20 | modules: LAZR_MODULES, | ||
894 | 21 | }; | ||
895 | 22 | </script> | ||
896 | 23 | |||
897 | 24 | <script type="text/javascript"> | ||
898 | 25 | |||
899 | 26 | YUI(LAZR_YUI_CONFIG).use('lazr.formoverlay', 'node', 'event', | ||
900 | 27 | 'dump', function(Y) { | ||
901 | 28 | |||
902 | 29 | var big_error = [ | ||
903 | 30 | 'Traceback (most recent call last):', | ||
904 | 31 | ' File "/foo/bar/baz.py", line 130, in publish', | ||
905 | 32 | ' obj = request.traverse(obj)', | ||
906 | 33 | ' File "/foo/bar/baz.py", line 1348, in traverse', | ||
907 | 34 | ' result = super(WebServiceRequestTraversal, self).traverse(ob)', | ||
908 | 35 | ' File "/foo/bar/baz.py", line 513, in traverse', | ||
909 | 36 | ' ob = super(BrowserRequest, self).traverse(obj)', | ||
910 | 37 | ' File "/foo/bar/baz.py", line 453, in traverse', | ||
911 | 38 | ' ob = super(HTTPRequest, self).traverse(obj)', | ||
912 | 39 | ' File "/foo/bar/baz.py", line 263, in traverse', | ||
913 | 40 | ' obj = publication.traverseName(self, obj, entry_name)', | ||
914 | 41 | ' File "/foo/bar/baz.py", line 1157, in traverseName', | ||
915 | 42 | ' return super(WebServicePublication, self).traverseName(', | ||
916 | 43 | ' File "/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/baz.py", ' + | ||
917 | 44 | 'line 61, in traverseName', | ||
918 | 45 | ' File "/foo/bar/baz.py", line 659, in publishTraverse', | ||
919 | 46 | ' nextobj = self._publishTraverse(request, name)', | ||
920 | 47 | ' File "/foo/bar/baz.py", line 763, in _publishTraverse', | ||
921 | 48 | ' nextstep)', | ||
922 | 49 | ' File "/foo/bar/baz.py", line 689, in _handle_next_object', | ||
923 | 50 | ' raise NotFound(self.context, name)', | ||
924 | 51 | "NotFound: Object: , name: u'1asdfasdf'" | ||
925 | 52 | ].join("\n"); | ||
926 | 53 | |||
927 | 54 | var formoverlay; | ||
928 | 55 | var submit_callback = function(data){ | ||
929 | 56 | if (data['firstname'][0] == "Harry"){ | ||
930 | 57 | formoverlay.showError([ | ||
931 | 58 | '"Harry" is not allowed.', | ||
932 | 59 | big_error, | ||
933 | 60 | ]); | ||
934 | 61 | } | ||
935 | 62 | |||
936 | 63 | Y.get("#data-display").set("innerHTML", Y.dump(data)); | ||
937 | 64 | }; | ||
938 | 65 | |||
939 | 66 | formoverlay = new Y.lazr.FormOverlay({ | ||
940 | 67 | headerContent: '<h2>Your details</h2>', | ||
941 | 68 | form_header: [ | ||
942 | 69 | '<p>Enter the firstname "Harry" to see an example error.</p>', | ||
943 | 70 | '<p id="formoverview">Please fill in the following details:</p>' | ||
944 | 71 | ].join(""), | ||
945 | 72 | form_content: [ | ||
946 | 73 | '<div id="myform">', | ||
947 | 74 | '<table>', | ||
948 | 75 | '<tr>', | ||
949 | 76 | ' <td><label for="firstname">First name: </label></td>', | ||
950 | 77 | ' <td><input type="text" name="firstname" id="firstname"/></td>', | ||
951 | 78 | '</tr>', | ||
952 | 79 | '<tr>', | ||
953 | 80 | ' <td><label for="lastname">Last name: </label></td>', | ||
954 | 81 | ' <td><input type="text" name="lastname" id="lastname"/></td>', | ||
955 | 82 | '</tr>', | ||
956 | 83 | '<tr>', | ||
957 | 84 | ' <td><label for="gender">Gender: </label></td>', | ||
958 | 85 | ' <td><select name="gender">', | ||
959 | 86 | ' <option value="female">Female</option>', | ||
960 | 87 | ' <option value="male">Male</option>', | ||
961 | 88 | ' </select></td>', | ||
962 | 89 | '</tr>', | ||
963 | 90 | '</table>', | ||
964 | 91 | '</div>' | ||
965 | 92 | ].join(""), | ||
966 | 93 | form_submit_callback: submit_callback, | ||
967 | 94 | centered: true, | ||
968 | 95 | visible: false | ||
969 | 96 | }); | ||
970 | 97 | formoverlay.render(); | ||
971 | 98 | |||
972 | 99 | Y.on("domready", function(){ | ||
973 | 100 | formoverlay.show(); | ||
974 | 101 | }); | ||
975 | 102 | |||
976 | 103 | Y.on('click', function(e) { | ||
977 | 104 | Y.log("Showing overlay", "info"); | ||
978 | 105 | formoverlay.show(); | ||
979 | 106 | }, '#show-overlay'); | ||
980 | 107 | }); | ||
981 | 108 | </script> | ||
982 | 109 | </head> | ||
983 | 110 | |||
984 | 111 | <body class="yui-skin-sam"> | ||
985 | 112 | <h1>Using forms in a LAZR overlay</h1> | ||
986 | 113 | |||
987 | 114 | <p>The <code>FormOverlay</code> widget allows the display and data | ||
988 | 115 | extraction of any form. | ||
989 | 116 | </p> | ||
990 | 117 | |||
991 | 118 | <h2>Demonstration</h2> | ||
992 | 119 | <div id="example"> | ||
993 | 120 | <button id="show-overlay">Re-display form</button> | ||
994 | 121 | |||
995 | 122 | <p>Data returned upon form submission: <span id="data-display"></span> | ||
996 | 123 | </p> | ||
997 | 124 | </div> | ||
998 | 125 | |||
999 | 126 | <h2>Page Setup</h2> | ||
1000 | 127 | <p>The following Javascript and CSS files will need to be included on your page:</p> | ||
1001 | 128 | |||
1002 | 129 | <h3>Javascript</h3> | ||
1003 | 130 | <pre> | ||
1004 | 131 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui-min.js"></script> | ||
1005 | 132 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> | ||
1006 | 133 | </pre> | ||
1007 | 134 | |||
1008 | 135 | <h2>Widget Setup</h2> | ||
1009 | 136 | <p>The FormOverlay requires only form content during initialization. | ||
1010 | 137 | The normal Overlay attributes (such as headerContent) can be used | ||
1011 | 138 | as expected.</p> | ||
1012 | 139 | <pre><code> | ||
1013 | 140 | var LAZR_YUI_CONFIG = { | ||
1014 | 141 | filter: "min", | ||
1015 | 142 | base: "../../build/", | ||
1016 | 143 | modules: LAZR_MODULES, | ||
1017 | 144 | }; | ||
1018 | 145 | YUI(LAZR_YUI_CONFIG).use("lazr.formoverlay", function(Y){ | ||
1019 | 146 | var form_content = 'Enter name: <input type="text" name="username" />'; | ||
1020 | 147 | var formoverlay = new Y.lazr.FormOverlay({ | ||
1021 | 148 | headerContent: '<h2>Your Form Title</h2>', | ||
1022 | 149 | form_content: form_content}); | ||
1023 | 150 | formoverlay.render(); | ||
1024 | 151 | }); | ||
1025 | 152 | </code></pre> | ||
1026 | 153 | <p><strong>Note:</strong> The form content can be passed as either a string | ||
1027 | 154 | of HTML (as is useful if the form is obtained via an AJAX request) or | ||
1028 | 155 | as an instance of a Y.Node (as is useful if the form is obtained from | ||
1029 | 156 | the current page). | ||
1030 | 157 | </p> | ||
1031 | 158 | <h3>Providing the submit callback</h3> | ||
1032 | 159 | <p>To do something useful with the FormOverlay, you will want to provide | ||
1033 | 160 | your own submit callback, so that you can do something with the data. | ||
1034 | 161 | Data is returned to your callback as a hash, where each value is | ||
1035 | 162 | a list, due to the ability to select multiple values for a single key | ||
1036 | 163 | with HTML check input elements. | ||
1037 | 164 | </p> | ||
1038 | 165 | <pre><code> | ||
1039 | 166 | ... | ||
1040 | 167 | var submit_callback = function(data){ | ||
1041 | 168 | // Do something useful with the data... | ||
1042 | 169 | Y.get("#data-display").set("innerHTML", Y.dump(data)); | ||
1043 | 170 | }; | ||
1044 | 171 | var formoverlay = new Y.lazr.FormOverlay({ | ||
1045 | 172 | headerContent: '<h2>Your Form Title</h2>', | ||
1046 | 173 | form_content: form_content, | ||
1047 | 174 | form_submit_callback: submit_callback}); | ||
1048 | 175 | formoverlay.render(); | ||
1049 | 176 | </code></pre> | ||
1050 | 177 | |||
1051 | 178 | <h3>Displaying error messages</h3> | ||
1052 | 179 | <p> The FormOverlay includes showError() and clearError() methods that | ||
1053 | 180 | can be used to display an error (or a list of errors) inside the | ||
1054 | 181 | FormOverlay, as demonstrated in the example. | ||
1055 | 182 | </p> | ||
1056 | 183 | |||
1057 | 184 | <h3>Providing a custom submit button</h3> | ||
1058 | 185 | <p>By default, the FormOverlay will create a submit button and include | ||
1059 | 186 | it in the form element. | ||
1060 | 187 | If you would like your own submit button, with it's own text etc., | ||
1061 | 188 | you can also pass it in as an attribute:</p> | ||
1062 | 189 | <pre><code> | ||
1063 | 190 | ... | ||
1064 | 191 | var submit_button = Y.Node.create('<input type="submit" value="Hit me!">'); | ||
1065 | 192 | var formoverlay = new Y.lazr.FormOverlay({ | ||
1066 | 193 | headerContent: '<h2>Your Form Title</h2>', | ||
1067 | 194 | form_content: form_content, | ||
1068 | 195 | form_submit_callback: submit_callback, | ||
1069 | 196 | form_submit_button: submit_button}); | ||
1070 | 197 | formoverlay.render(); | ||
1071 | 198 | </code></pre> | ||
1072 | 199 | |||
1073 | 200 | </body> | ||
1074 | 201 | </html> | ||
1075 | 0 | 202 | ||
1076 | === modified file 'examples/effects/index.html' | |||
1077 | --- examples/effects/index.html 2009-10-22 20:22:12 +0000 | |||
1078 | +++ examples/effects/index.html 2009-11-19 17:33:11 +0000 | |||
1079 | @@ -4,23 +4,22 @@ | |||
1080 | 4 | <head> | 4 | <head> |
1081 | 5 | <title>Lazr-js examples: lazr.effects</title> | 5 | <title>Lazr-js examples: lazr.effects</title> |
1082 | 6 | 6 | ||
1100 | 7 | <link type="text/css" rel="stylesheet" href="../../build/yui/current/build/cssreset/reset.css"></link> | 7 | <link rel="stylesheet" type="text/css" href="../../build/cssreset/reset-min.css"></link> |
1101 | 8 | <link type="text/css" rel="stylesheet" href="../../build/yui/current/build/cssfonts/fonts.css"></link> | 8 | <link rel="stylesheet" type="text/css" href="../../build/cssfonts/fonts-min.css"></link> |
1102 | 9 | <link type="text/css" rel="stylesheet" href="../../build/yui/current/build/cssbase/base.css"></link> | 9 | <link rel="stylesheet" type="text/css" href="../../build/cssbase/base-min.css"></link> |
1103 | 10 | 10 | ||
1104 | 11 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 11 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> |
1105 | 12 | <script type="text/javascript" src="../../build/lazr.js"></script> | 12 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
1106 | 13 | <script type="text/javascript" src="../../build/effects/effects.js"></script> | 13 | <script type="text/javascript"> |
1107 | 14 | 14 | var LAZR_YUI_CONFIG = { | |
1108 | 15 | <!-- | 15 | filter: "min", |
1109 | 16 | We need to include individual css files because some of them have | 16 | base: "../../build/", |
1110 | 17 | relative paths to images. | 17 | modules: LAZR_MODULES, |
1111 | 18 | --> | 18 | insertBefore: "style-overrides", |
1112 | 19 | <link type="text/css" rel="stylesheet" href="../../build/lazr-sam.css"></link> | 19 | }; |
1113 | 20 | <link type="text/css" rel="stylesheet" href="../../build/lazr/assets/skins/sam/lazr.css"></link> | 20 | </script> |
1114 | 21 | <link type="text/css" rel="stylesheet" href="../../build/effects/assets/skins/sam/effects.css"></link> | 21 | |
1115 | 22 | 22 | <style id="style-overrides" type="text/css"> | |
1099 | 23 | <style type="text/css"> | ||
1116 | 24 | .example { | 23 | .example { |
1117 | 25 | background-color: #ecf5fa; | 24 | background-color: #ecf5fa; |
1118 | 26 | border: 1px solid #8899dd; | 25 | border: 1px solid #8899dd; |
1119 | @@ -76,7 +75,12 @@ | |||
1120 | 76 | 75 | ||
1121 | 77 | <h3>Usage</h3> | 76 | <h3>Usage</h3> |
1122 | 78 | <pre> | 77 | <pre> |
1124 | 79 | YUI().use('node', 'event', 'lazr.effects', function(Y) { | 78 | var LAZR_YUI_CONFIG = { |
1125 | 79 | filter: "min", | ||
1126 | 80 | base: "../../build/", | ||
1127 | 81 | modules: LAZR_MODULES, | ||
1128 | 82 | }; | ||
1129 | 83 | YUI(LAZR_YUI_CONFIG).use('node', 'event', 'lazr.effects', function(Y) { | ||
1130 | 80 | 84 | ||
1131 | 81 | var reset_height = null; | 85 | var reset_height = null; |
1132 | 82 | var slide_node; | 86 | var slide_node; |
1133 | @@ -107,7 +111,12 @@ | |||
1134 | 107 | 111 | ||
1135 | 108 | <h3>Usage</h3> | 112 | <h3>Usage</h3> |
1136 | 109 | <pre> | 113 | <pre> |
1138 | 110 | YUI().use('node', 'event', 'lazr.effects', function(Y) { | 114 | var LAZR_YUI_CONFIG = { |
1139 | 115 | filter: "min", | ||
1140 | 116 | base: "../../build/", | ||
1141 | 117 | modules: LAZR_MODULES, | ||
1142 | 118 | }; | ||
1143 | 119 | YUI(LAZR_YUI_CONFIG).use('node', 'event', 'lazr.effects', function(Y) { | ||
1144 | 111 | 120 | ||
1145 | 112 | var reset_height = null; | 121 | var reset_height = null; |
1146 | 113 | var slide_node; | 122 | var slide_node; |
1147 | @@ -147,7 +156,12 @@ | |||
1148 | 147 | </p> | 156 | </p> |
1149 | 148 | 157 | ||
1150 | 149 | <pre> | 158 | <pre> |
1152 | 150 | YUI().use('node', 'event', 'lazr.effects', function(Y) { | 159 | var LAZR_YUI_CONFIG = { |
1153 | 160 | filter: "min", | ||
1154 | 161 | base: "../../build/", | ||
1155 | 162 | modules: LAZR_MODULES, | ||
1156 | 163 | }; | ||
1157 | 164 | YUI(LAZR_YUI_CONFIG).use('node', 'event', 'lazr.effects', function(Y) { | ||
1158 | 151 | 165 | ||
1159 | 152 | var slide; | 166 | var slide; |
1160 | 153 | 167 | ||
1161 | @@ -176,7 +190,12 @@ | |||
1162 | 176 | 190 | ||
1163 | 177 | <h3>Usage</h3> | 191 | <h3>Usage</h3> |
1164 | 178 | <pre> | 192 | <pre> |
1166 | 179 | YUI().use('lazr.effects-async', function(Y) { | 193 | var LAZR_YUI_CONFIG = { |
1167 | 194 | filter: "min", | ||
1168 | 195 | base: "../../build/", | ||
1169 | 196 | modules: LAZR_MODULES, | ||
1170 | 197 | }; | ||
1171 | 198 | YUI(LAZR_YUI_CONFIG).use('lazr.effects-async', function(Y) { | ||
1172 | 180 | 199 | ||
1173 | 181 | Y.lazr.effects.async_slideout( | 200 | Y.lazr.effects.async_slideout( |
1174 | 182 | '#drawer', // The node to slide opened and closed. | 201 | '#drawer', // The node to slide opened and closed. |
1175 | @@ -190,11 +209,12 @@ | |||
1176 | 190 | </pre> | 209 | </pre> |
1177 | 191 | 210 | ||
1178 | 192 | <script type="text/javascript"> | 211 | <script type="text/javascript"> |
1184 | 193 | 212 | var LAZR_YUI_CONFIG = { | |
1185 | 194 | YUI({ | 213 | filter: "min", |
1186 | 195 | base: '../../build/yui/current/build/', | 214 | base: "../../build/", |
1187 | 196 | filter: 'raw' | 215 | modules: LAZR_MODULES, |
1188 | 197 | }).use('node', 'event', 'lazr.effects', function(Y) { | 216 | }; |
1189 | 217 | YUI(LAZR_YUI_CONFIG).use('node', 'event', 'lazr.effects', function(Y) { | ||
1190 | 198 | 218 | ||
1191 | 199 | var reset_height = null; | 219 | var reset_height = null; |
1192 | 200 | var slide_node; | 220 | var slide_node; |
1193 | @@ -227,6 +247,5 @@ | |||
1194 | 227 | }); | 247 | }); |
1195 | 228 | 248 | ||
1196 | 229 | </script> | 249 | </script> |
1197 | 230 | |||
1198 | 231 | </body> | 250 | </body> |
1199 | 232 | </html> | 251 | </html> |
1200 | 233 | 252 | ||
1201 | === modified file 'examples/error/index.html' | |||
1202 | --- examples/error/index.html 2009-11-13 16:15:25 +0000 | |||
1203 | +++ examples/error/index.html 2009-11-19 17:33:11 +0000 | |||
1204 | @@ -3,21 +3,28 @@ | |||
1205 | 3 | <html> | 3 | <html> |
1206 | 4 | <head> | 4 | <head> |
1207 | 5 | <title>Lazr-js examples: error</title> | 5 | <title>Lazr-js examples: error</title> |
1213 | 6 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 6 | |
1214 | 7 | <script type="text/javascript" src="../../build/lazr/lazr.js"></script> | 7 | <link rel="stylesheet" type="text/css" href="../../build/cssreset/reset-min.css"></link> |
1215 | 8 | <script type="text/javascript" src="../../build/anim/anim.js"></script> | 8 | <link rel="stylesheet" type="text/css" href="../../build/cssfonts/fonts-min.css"></link> |
1216 | 9 | <script type="text/javascript" src="../../build/overlay/overlay.js"></script> | 9 | <link rel="stylesheet" type="text/css" href="../../build/cssbase/base-min.css"></link> |
1217 | 10 | <script type="text/javascript" src="../../build/error/error.js"></script> | 10 | |
1218 | 11 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> | ||
1219 | 12 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> | ||
1220 | 13 | <script type="text/javascript"> | ||
1221 | 14 | var LAZR_YUI_CONFIG = { | ||
1222 | 15 | filter: "min", | ||
1223 | 16 | base: "../../build/", | ||
1224 | 17 | modules: LAZR_MODULES, | ||
1225 | 18 | }; | ||
1226 | 19 | </script> | ||
1227 | 20 | |||
1228 | 11 | <script type="text/javascript"> | 21 | <script type="text/javascript"> |
1229 | 12 | 22 | ||
1230 | 13 | // We create a global variable here to reference our display_error | 23 | // We create a global variable here to reference our display_error |
1231 | 14 | // method only so that the call to setTimeout() below used for | 24 | // method only so that the call to setTimeout() below used for |
1232 | 15 | // demonstration has access to the function. | 25 | // demonstration has access to the function. |
1233 | 16 | var display_error; | 26 | var display_error; |
1238 | 17 | YUI({ | 27 | YUI(LAZR_YUI_CONFIG).use( |
1235 | 18 | base: '../../build/yui/current/build/', | ||
1236 | 19 | filter: 'raw' | ||
1237 | 20 | }).use( | ||
1239 | 21 | 'lazr.error', 'lazr.anim', 'node', 'event', | 28 | 'lazr.error', 'lazr.anim', 'node', 'event', |
1240 | 22 | 'dump', function(Y) { | 29 | 'dump', function(Y) { |
1241 | 23 | 30 | ||
1242 | @@ -44,19 +51,6 @@ | |||
1243 | 44 | }); | 51 | }); |
1244 | 45 | </script> | 52 | </script> |
1245 | 46 | 53 | ||
1246 | 47 | <!-- | ||
1247 | 48 | We need to include individual css files because some of them have | ||
1248 | 49 | relative paths to images. | ||
1249 | 50 | --> | ||
1250 | 51 | <link rel="stylesheet" href="../../build/yui/current/build/cssreset/reset.css"/> | ||
1251 | 52 | <link rel="stylesheet" href="../../build/yui/current/build/cssfonts/fonts.css"/> | ||
1252 | 53 | <link rel="stylesheet" href="../../build/yui/current/build/cssbase/base.css"/> | ||
1253 | 54 | <link type="text/css" rel="stylesheet" href="../../build/lazr-sam.css"/> | ||
1254 | 55 | <link type="text/css" rel="stylesheet" href="../../build/lazr/assets/skins/sam/lazr.css"/> | ||
1255 | 56 | <link rel="stylesheet" href="../../build/overlay/assets/pretty-overlay-core.css"/> | ||
1256 | 57 | <link rel="stylesheet" href="../../build/overlay/assets/skins/sam/pretty-overlay-skin.css"/> | ||
1257 | 58 | |||
1258 | 59 | <link type="text/css" rel="stylesheet" href="../../build/error/assets/error-core.css"/> | ||
1259 | 60 | </head> | 54 | </head> |
1260 | 61 | 55 | ||
1261 | 62 | <body class="yui-skin-sam"> | 56 | <body class="yui-skin-sam"> |
1262 | @@ -80,21 +74,8 @@ | |||
1263 | 80 | 74 | ||
1264 | 81 | <h3>Javascript</h3> | 75 | <h3>Javascript</h3> |
1265 | 82 | <pre> | 76 | <pre> |
1281 | 83 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 77 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> |
1282 | 84 | <script type="text/javascript" src="../../build/lazr/lazr.js"></script> | 78 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
1268 | 85 | <script type="text/javascript" src="../../build/anim/anim.js"></script> | ||
1269 | 86 | <script type="text/javascript" src="../../build/overlay/overlay.js"></script> | ||
1270 | 87 | <script type="text/javascript" src="../../build/error/error.js"></script> | ||
1271 | 88 | </pre> | ||
1272 | 89 | |||
1273 | 90 | <h3>CSS</h3> | ||
1274 | 91 | <pre> | ||
1275 | 92 | <link type="text/css" rel="stylesheet" href="../../build/lazr-sam.css"/> | ||
1276 | 93 | <link type="text/css" rel="stylesheet" href="../../build/lazr/assets/skins/sam/lazr.css"/> | ||
1277 | 94 | <link rel="stylesheet" href="../../build/overlay/assets/pretty-overlay-core.css"/> | ||
1278 | 95 | <link rel="stylesheet" href="../../build/overlay/assets/skins/sam/pretty-overlay-skin.css"/> | ||
1279 | 96 | |||
1280 | 97 | <link type="text/css" rel="stylesheet" href="../../build/error/assets/error-core.css"/> | ||
1283 | 98 | </pre> | 79 | </pre> |
1284 | 99 | 80 | ||
1285 | 100 | <h2>Widget Setup</h2> | 81 | <h2>Widget Setup</h2> |
1286 | 101 | 82 | ||
1287 | === modified file 'examples/formoverlay/index.html' | |||
1288 | --- examples/formoverlay/index.html 2009-10-22 20:22:12 +0000 | |||
1289 | +++ examples/formoverlay/index.html 2009-11-19 17:33:11 +0000 | |||
1290 | @@ -5,24 +5,21 @@ | |||
1291 | 5 | <title>LAZR JS Examples: lazr.formoverlay</title> | 5 | <title>LAZR JS Examples: lazr.formoverlay</title> |
1292 | 6 | <meta http-equiv="content-type" content="text/html;charset=utf-8" /> | 6 | <meta http-equiv="content-type" content="text/html;charset=utf-8" /> |
1293 | 7 | 7 | ||
1312 | 8 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 8 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> |
1313 | 9 | <script type="text/javascript" src="../../build/lazr/lazr.js"></script> | 9 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
1314 | 10 | <script type="text/javascript" src="../../build/overlay/overlay.js"></script> | 10 | <script type="text/javascript"> |
1315 | 11 | <script type="text/javascript" src="../../build/formoverlay/formoverlay.js"></script> | 11 | var LAZR_YUI_CONFIG = { |
1316 | 12 | 12 | filter: "min", | |
1317 | 13 | <link rel="stylesheet" href="../../build/yui/current/build/cssreset/reset.css"/> | 13 | base: "../../build/", |
1318 | 14 | <link rel="stylesheet" href="../../build/yui/current/build/cssfonts/fonts.css"/> | 14 | modules: LAZR_MODULES, |
1319 | 15 | <link rel="stylesheet" href="../../build/yui/current/build/cssbase/base.css"/> | 15 | }; |
1320 | 16 | <link rel="stylesheet" href="../../build/overlay/assets/pretty-overlay-core.css"/> | 16 | </script> |
1321 | 17 | <link rel="stylesheet" href="../../build/overlay/assets/skins/sam/pretty-overlay-skin.css"/> | 17 | |
1322 | 18 | <link rel="stylesheet" href="../../build/formoverlay/assets/formoverlay.css"/> | 18 | <script type="text/javascript"> |
1323 | 19 | 19 | ||
1324 | 20 | <script type="text/javascript"> | 20 | YUI(LAZR_YUI_CONFIG).use('cssreset', 'cssfonts', 'cssbase', |
1325 | 21 | 21 | 'lazr.formoverlay', 'node', 'event', | |
1326 | 22 | YUI({ | 22 | 'dump', function(Y) { |
1309 | 23 | base: "../../build/yui/current/build/", | ||
1310 | 24 | filter: 'raw', | ||
1311 | 25 | }).use('lazr.formoverlay', 'node', 'event', 'dump', function(Y) { | ||
1327 | 26 | 23 | ||
1328 | 27 | var big_error = [ | 24 | var big_error = [ |
1329 | 28 | 'Traceback (most recent call last):', | 25 | 'Traceback (most recent call last):', |
1330 | @@ -126,16 +123,8 @@ | |||
1331 | 126 | 123 | ||
1332 | 127 | <h3>Javascript</h3> | 124 | <h3>Javascript</h3> |
1333 | 128 | <pre> | 125 | <pre> |
1344 | 129 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 126 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui-min.js"></script> |
1345 | 130 | <script type="text/javascript" src="../../build/overlay/overlay.js"></script> | 127 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
1336 | 131 | <script type="text/javascript" src="../../build/formoverlay/formoverlay.js"></script> | ||
1337 | 132 | </pre> | ||
1338 | 133 | |||
1339 | 134 | <h3>CSS</h3> | ||
1340 | 135 | <pre> | ||
1341 | 136 | <link rel="stylesheet" href="../../build/overlay/assets/pretty-overlay-core.css" /> | ||
1342 | 137 | <link rel="stylesheet" href="../../build/overlay/assets/skins/sam/pretty-overlay-skin.css" /> | ||
1343 | 138 | <link rel="stylesheet" href="../../build/formoverlay/assets/formoverlay.css" /> | ||
1346 | 139 | </pre> | 128 | </pre> |
1347 | 140 | 129 | ||
1348 | 141 | <h2>Widget Setup</h2> | 130 | <h2>Widget Setup</h2> |
1349 | @@ -143,11 +132,18 @@ | |||
1350 | 143 | The normal Overlay attributes (such as headerContent) can be used | 132 | The normal Overlay attributes (such as headerContent) can be used |
1351 | 144 | as expected.</p> | 133 | as expected.</p> |
1352 | 145 | <pre><code> | 134 | <pre><code> |
1353 | 135 | var LAZR_YUI_CONFIG = { | ||
1354 | 136 | filter: "min", | ||
1355 | 137 | base: "../../build/", | ||
1356 | 138 | modules: LAZR_MODULES, | ||
1357 | 139 | }; | ||
1358 | 140 | YUI(LAZR_YUI_CONFIG).use("lazr.formoverlay", function(Y){ | ||
1359 | 146 | var form_content = 'Enter name: <input type="text" name="username" />'; | 141 | var form_content = 'Enter name: <input type="text" name="username" />'; |
1360 | 147 | var formoverlay = new Y.lazr.FormOverlay({ | 142 | var formoverlay = new Y.lazr.FormOverlay({ |
1361 | 148 | headerContent: '<h2>Your Form Title</h2>', | 143 | headerContent: '<h2>Your Form Title</h2>', |
1362 | 149 | form_content: form_content}); | 144 | form_content: form_content}); |
1363 | 150 | formoverlay.render(); | 145 | formoverlay.render(); |
1364 | 146 | }); | ||
1365 | 151 | </code></pre> | 147 | </code></pre> |
1366 | 152 | <p><strong>Note:</strong> The form content can be passed as either a string | 148 | <p><strong>Note:</strong> The form content can be passed as either a string |
1367 | 153 | of HTML (as is useful if the form is obtained via an AJAX request) or | 149 | of HTML (as is useful if the form is obtained via an AJAX request) or |
1368 | 154 | 150 | ||
1369 | === modified file 'examples/inlineeditor/index.html' | |||
1370 | --- examples/inlineeditor/index.html 2009-11-13 23:59:22 +0000 | |||
1371 | +++ examples/inlineeditor/index.html 2009-11-19 17:33:11 +0000 | |||
1372 | @@ -3,17 +3,23 @@ | |||
1373 | 3 | <html> | 3 | <html> |
1374 | 4 | <head> | 4 | <head> |
1375 | 5 | <title>Lazr-js examples: In-line text editing</title> | 5 | <title>Lazr-js examples: In-line text editing</title> |
1387 | 6 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 6 | |
1388 | 7 | <script type="text/javascript" src="../../build/lazr/lazr.js"></script> | 7 | <link rel="stylesheet" type="text/css" href="../../build/cssreset/reset-min.css"></link> |
1389 | 8 | <script type="text/javascript" src="../../build/anim/anim.js"></script> | 8 | <link rel="stylesheet" type="text/css" href="../../build/cssfonts/fonts-min.css"></link> |
1390 | 9 | <script type="text/javascript" src="../../build/inlineedit/editor.js"></script> | 9 | <link rel="stylesheet" type="text/css" href="../../build/cssbase/base-min.css"></link> |
1391 | 10 | 10 | ||
1392 | 11 | <!-- | 11 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> |
1393 | 12 | We need to include individual css files because some of them have | 12 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
1394 | 13 | relative paths to images. | 13 | <script type="text/javascript"> |
1395 | 14 | --> | 14 | var LAZR_YUI_CONFIG = { |
1396 | 15 | <link type="text/css" rel="stylesheet" href="../../build/lazr-sam.css"></link> | 15 | filter: "min", |
1397 | 16 | <style> | 16 | base: "../../build/", |
1398 | 17 | modules: LAZR_MODULES, | ||
1399 | 18 | insertBefore: "style-overrides", | ||
1400 | 19 | }; | ||
1401 | 20 | </script> | ||
1402 | 21 | |||
1403 | 22 | <style id="style-overrides" type="text/css"> | ||
1404 | 17 | #example { | 23 | #example { |
1405 | 18 | margin-left: 20px; | 24 | margin-left: 20px; |
1406 | 19 | padding: 50px 200px 50px 200px; | 25 | padding: 50px 200px 50px 200px; |
1407 | @@ -96,7 +102,12 @@ | |||
1408 | 96 | </pre> | 102 | </pre> |
1409 | 97 | 103 | ||
1410 | 98 | <pre> | 104 | <pre> |
1412 | 99 | YUI().use('lazr.editor', function(Y) { | 105 | var LAZR_YUI_CONFIG = { |
1413 | 106 | filter: "min", | ||
1414 | 107 | base: "../../build/", | ||
1415 | 108 | modules: LAZR_MODULES, | ||
1416 | 109 | }; | ||
1417 | 110 | YUI(LAZR_YUI_CONFIG).use('lazr.editor', function(Y) { | ||
1418 | 100 | 111 | ||
1419 | 101 | var editor = new Y.EditableText(...); | 112 | var editor = new Y.EditableText(...); |
1420 | 102 | 113 | ||
1421 | @@ -352,10 +363,8 @@ | |||
1422 | 352 | 363 | ||
1423 | 353 | <script type="text/javascript"> | 364 | <script type="text/javascript"> |
1424 | 354 | 365 | ||
1429 | 355 | YUI({ | 366 | YUI(LAZR_YUI_CONFIG).use('node', 'event', 'plugin', |
1430 | 356 | base: '../../build/yui/current/build/', | 367 | 'lazr.editor', function(Y) { |
1427 | 357 | filter: 'raw' | ||
1428 | 358 | }).use('node', 'event', 'plugin', 'lazr.editor', function(Y) { | ||
1431 | 359 | 368 | ||
1432 | 360 | // Add a delay between the start and end of the inline editor widget's | 369 | // Add a delay between the start and end of the inline editor widget's |
1433 | 361 | // "save" event. | 370 | // "save" event. |
1434 | 362 | 371 | ||
1435 | === modified file 'examples/lazr/index.html' | |||
1436 | --- examples/lazr/index.html 2009-10-22 20:22:12 +0000 | |||
1437 | +++ examples/lazr/index.html 2009-11-19 17:33:11 +0000 | |||
1438 | @@ -5,15 +5,24 @@ | |||
1439 | 5 | <title>LAZR JS Examples: lazr.base</title> | 5 | <title>LAZR JS Examples: lazr.base</title> |
1440 | 6 | <meta http-equiv="content-type" content="text/html;charset=utf-8" /> | 6 | <meta http-equiv="content-type" content="text/html;charset=utf-8" /> |
1441 | 7 | 7 | ||
1451 | 8 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 8 | <link rel="stylesheet" type="text/css" href="../../build/cssreset/reset-min.css"></link> |
1452 | 9 | <script type="text/javascript" src="../../build/lazr/lazr.js"></script> | 9 | <link rel="stylesheet" type="text/css" href="../../build/cssfonts/fonts-min.css"></link> |
1453 | 10 | 10 | <link rel="stylesheet" type="text/css" href="../../build/cssbase/base-min.css"></link> | |
1454 | 11 | <script type="text/javascript"> | 11 | |
1455 | 12 | 12 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> | |
1456 | 13 | YUI({ | 13 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
1457 | 14 | base: "../../build/yui/current/build/", | 14 | <script type="text/javascript"> |
1458 | 15 | filter: 'raw', | 15 | var LAZR_YUI_CONFIG = { |
1459 | 16 | }).use('node', 'lazr.base', function(Y) { | 16 | filter: "min", |
1460 | 17 | base: "../../build/", | ||
1461 | 18 | modules: LAZR_MODULES, | ||
1462 | 19 | insertBefore: "style-overrides", | ||
1463 | 20 | }; | ||
1464 | 21 | </script> | ||
1465 | 22 | |||
1466 | 23 | <script type="text/javascript"> | ||
1467 | 24 | |||
1468 | 25 | YUI(LAZR_YUI_CONFIG).use('node', 'lazr.base', function(Y) { | ||
1469 | 17 | 26 | ||
1470 | 18 | Y.log(Y.lazr.ui.OK_BUTTON, 'info'); | 27 | Y.log(Y.lazr.ui.OK_BUTTON, 'info'); |
1471 | 19 | Y.log(Y.lazr.ui.CANCEL_BUTTON, 'info'); | 28 | Y.log(Y.lazr.ui.CANCEL_BUTTON, 'info'); |
1472 | @@ -39,10 +48,7 @@ | |||
1473 | 39 | 48 | ||
1474 | 40 | </script> | 49 | </script> |
1475 | 41 | 50 | ||
1480 | 42 | <link type="text/css" rel="stylesheet" href="../../build/lazr/assets/skins/sam/lazr.css" /> | 51 | <style id="style-overrides" type="text/css"> |
1477 | 43 | |||
1478 | 44 | <style> | ||
1479 | 45 | |||
1481 | 46 | #example { | 52 | #example { |
1482 | 47 | margin-left: 5em; | 53 | margin-left: 5em; |
1483 | 48 | padding: 3em; | 54 | padding: 3em; |
1484 | @@ -72,9 +78,8 @@ | |||
1485 | 72 | <p>The common usage:</p> | 78 | <p>The common usage:</p> |
1486 | 73 | 79 | ||
1487 | 74 | <pre> | 80 | <pre> |
1491 | 75 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 81 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> |
1492 | 76 | <script type="text/javascript" src="../../build/lazr/lazr.js"></script> | 82 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
1490 | 77 | <script type="text/javascript" src="../../build/lazr/assets/skins/sam/lazr-skin.css"></script> | ||
1493 | 78 | </pre> | 83 | </pre> |
1494 | 79 | 84 | ||
1495 | 80 | <ul> | 85 | <ul> |
1496 | @@ -107,7 +112,12 @@ | |||
1497 | 107 | <p>And here's the JavaScript to hook it up:</p> | 112 | <p>And here's the JavaScript to hook it up:</p> |
1498 | 108 | 113 | ||
1499 | 109 | <pre> | 114 | <pre> |
1501 | 110 | YUI().use('node', 'lazr.base', function(Y) { | 115 | var LAZR_YUI_CONFIG = { |
1502 | 116 | filter: "min", | ||
1503 | 117 | base: "../../build/", | ||
1504 | 118 | modules: LAZR_MODULES, | ||
1505 | 119 | }; | ||
1506 | 120 | YUI(LAZR_YUI_CONFIG).use('node', 'lazr.base', function(Y) { | ||
1507 | 111 | 121 | ||
1508 | 112 | Y.get('#ok').appendChild( | 122 | Y.get('#ok').appendChild( |
1509 | 113 | Y.Node.create(Y.lazr.ui.OK_BUTTON)); | 123 | Y.Node.create(Y.lazr.ui.OK_BUTTON)); |
1510 | 114 | 124 | ||
1511 | === modified file 'examples/overlay/index.html' | |||
1512 | --- examples/overlay/index.html 2009-10-22 20:22:12 +0000 | |||
1513 | +++ examples/overlay/index.html 2009-11-19 17:33:11 +0000 | |||
1514 | @@ -3,17 +3,22 @@ | |||
1515 | 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
1516 | 4 | <head> | 4 | <head> |
1517 | 5 | <title>LAZR JS Examples: lazr.overlay</title> | 5 | <title>LAZR JS Examples: lazr.overlay</title> |
1518 | 6 | |||
1519 | 7 | <link rel="stylesheet" type="text/css" href="../../build/cssreset/reset-min.css"></link> | ||
1520 | 8 | <link rel="stylesheet" type="text/css" href="../../build/cssfonts/fonts-min.css"></link> | ||
1521 | 9 | <link rel="stylesheet" type="text/css" href="../../build/cssbase/base-min.css"></link> | ||
1522 | 10 | |||
1523 | 6 | <meta http-equiv="content-type" content="text/html;charset=utf-8" /> | 11 | <meta http-equiv="content-type" content="text/html;charset=utf-8" /> |
1524 | 7 | 12 | ||
1534 | 8 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 13 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> |
1535 | 9 | <script type="text/javascript" src="../../build/overlay/overlay.js"></script> | 14 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> |
1536 | 10 | 15 | <script type="text/javascript"> | |
1537 | 11 | <link rel="stylesheet" type="text/css" href="../../build/yui/current/build/cssreset/reset.css" /> | 16 | var LAZR_YUI_CONFIG = { |
1538 | 12 | <link rel="stylesheet" type="text/css" href="../../build/yui/current/build/cssfonts/fonts.css" /> | 17 | filter: "min", |
1539 | 13 | <link rel="stylesheet" type="text/css" href="../../build/yui/current/build/cssbase/base.css" /> | 18 | base: "../../build/", |
1540 | 14 | 19 | modules: LAZR_MODULES, | |
1541 | 15 | <link rel="stylesheet" type="text/css" href="../../build/overlay/assets/pretty-overlay-core.css" /> | 20 | }; |
1542 | 16 | <link rel="stylesheet" type="text/css" href="../../build/overlay/assets/skins/sam/pretty-overlay-skin.css" /> | 21 | </script> |
1543 | 17 | </head> | 22 | </head> |
1544 | 18 | 23 | ||
1545 | 19 | <body class="yui-skin-sam"> | 24 | <body class="yui-skin-sam"> |
1546 | @@ -53,7 +58,12 @@ | |||
1547 | 53 | <h2>Usage</h2> | 58 | <h2>Usage</h2> |
1548 | 54 | <h3>Subclassing (probably what you want)</h3> | 59 | <h3>Subclassing (probably what you want)</h3> |
1549 | 55 | <pre> | 60 | <pre> |
1551 | 56 | YUI().use('lazr.overlay', function(Y) { | 61 | var LAZR_YUI_CONFIG = { |
1552 | 62 | filter: "min", | ||
1553 | 63 | base: "../../build/", | ||
1554 | 64 | modules: LAZR_MODULES, | ||
1555 | 65 | }; | ||
1556 | 66 | YUI(LAZR_YUI_CONFIG).use('lazr.overlay', function(Y) { | ||
1557 | 57 | 67 | ||
1558 | 58 | var MyThing = function() { | 68 | var MyThing = function() { |
1559 | 59 | MyThing.superclass.constructor.apply(this, arguments); | 69 | MyThing.superclass.constructor.apply(this, arguments); |
1560 | @@ -82,13 +92,11 @@ | |||
1561 | 82 | 92 | ||
1562 | 83 | <h3>Instantiating directly (probably not what you want)</h3> | 93 | <h3>Instantiating directly (probably not what you want)</h3> |
1563 | 84 | <pre> | 94 | <pre> |
1565 | 85 | YUI().use('lazr.overlay', function(Y) { | 95 | YUI(LAZR_YUI_CONFIG).use('lazr.overlay', function(Y) { |
1566 | 86 | var overlay = new Y.lazr.PrettyOverlay({ | 96 | var overlay = new Y.lazr.PrettyOverlay({ |
1567 | 87 | bodyContent: 'hello', | 97 | bodyContent: 'hello', |
1568 | 88 | headerContent: 'heading', | 98 | headerContent: 'heading', |
1572 | 89 | align: { | 99 | centered: true, |
1570 | 90 | points: [Y.WidgetPositionExt.CC, Y.WidgetPositionExt.CC] | ||
1571 | 91 | }, | ||
1573 | 92 | progressbar: true, | 100 | progressbar: true, |
1574 | 93 | progress: 12 | 101 | progress: 12 |
1575 | 94 | }); | 102 | }); |
1576 | @@ -96,11 +104,6 @@ | |||
1577 | 96 | }); | 104 | }); |
1578 | 97 | </pre> | 105 | </pre> |
1579 | 98 | 106 | ||
1580 | 99 | <h2>CSS</h2> | ||
1581 | 100 | <p>You need to include two CSS files, | ||
1582 | 101 | <a href="../../lib/lazr/build/overlay/assets/pretty-overlay-core.css"><code>overlay/assets/pretty-overlay-core.css</code></a> and | ||
1583 | 102 | <a href="../../lib/lazr/build/overlay/assets/skins/sam/pretty-overlay-skin.css"><code>overlay/assets/skins/sam/pretty-overlay-skin.css</code></a>.</p> | ||
1584 | 103 | |||
1585 | 104 | <h2>Limitations</h2> | 107 | <h2>Limitations</h2> |
1586 | 105 | <p>You can only specify <code>progressbar: {true, false}</code> in the initial | 108 | <p>You can only specify <code>progressbar: {true, false}</code> in the initial |
1587 | 106 | config object; it cannot be altered once <code>renderUI()</code> has been called.</p> | 109 | config object; it cannot be altered once <code>renderUI()</code> has been called.</p> |
1588 | @@ -108,18 +111,12 @@ | |||
1589 | 108 | 111 | ||
1590 | 109 | 112 | ||
1591 | 110 | <script type="text/javascript"> | 113 | <script type="text/javascript"> |
1597 | 111 | YUI({ | 114 | YUI(LAZR_YUI_CONFIG).use('lazr.overlay', function(Y) { |
1593 | 112 | base: '../../build/yui/current/build/', | ||
1594 | 113 | filter: "raw", | ||
1595 | 114 | combine: false | ||
1596 | 115 | }).use('lazr.overlay', function(Y) { | ||
1598 | 116 | var overlay = new Y.lazr.PrettyOverlay({ | 115 | var overlay = new Y.lazr.PrettyOverlay({ |
1599 | 117 | bodyContent: 'hello', | 116 | bodyContent: 'hello', |
1600 | 118 | headerContent: '<h2>heading</h2>', | 117 | headerContent: '<h2>heading</h2>', |
1601 | 119 | steptitle: 'First step', | 118 | steptitle: 'First step', |
1605 | 120 | align: { | 119 | centered: true, |
1603 | 121 | points: [Y.WidgetPositionExt.CC, Y.WidgetPositionExt.CC] | ||
1604 | 122 | }, | ||
1606 | 123 | progressbar: true, | 120 | progressbar: true, |
1607 | 124 | progress: 12 | 121 | progress: 12 |
1608 | 125 | }); | 122 | }); |
1609 | 126 | 123 | ||
1610 | === modified file 'examples/picker/index.html' | |||
1611 | --- examples/picker/index.html 2009-11-13 22:26:40 +0000 | |||
1612 | +++ examples/picker/index.html 2009-11-19 17:33:11 +0000 | |||
1613 | @@ -3,17 +3,25 @@ | |||
1614 | 3 | <html> | 3 | <html> |
1615 | 4 | <head> | 4 | <head> |
1616 | 5 | <title>Lazr-js examples: Picker widget</title> | 5 | <title>Lazr-js examples: Picker widget</title> |
1628 | 6 | <script type="text/javascript" src="../../build/yui/current/build/yui/yui.js"></script> | 6 | |
1629 | 7 | <script type="text/javascript" src="../../build/lazr/lazr.js"></script> | 7 | <link rel="stylesheet" type="text/css" href="../../build/cssreset/reset-min.css"></link> |
1630 | 8 | <script type="text/javascript" src="../../build/overlay/overlay.js"></script> | 8 | <link rel="stylesheet" type="text/css" href="../../build/cssfonts/fonts-min.css"></link> |
1631 | 9 | <script type="text/javascript" src="../../build/picker/picker.js"></script> | 9 | <link rel="stylesheet" type="text/css" href="../../build/cssbase/base-min.css"></link> |
1632 | 10 | 10 | ||
1633 | 11 | <script type="text/javascript"> | 11 | <script type="text/javascript" src="../../build/yui/yui-min.js"></script> |
1634 | 12 | 12 | <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script> | |
1635 | 13 | YUI({ | 13 | <script type="text/javascript"> |
1636 | 14 | base: '../../build/yui/current/build/', | 14 | var LAZR_YUI_CONFIG = { |
1637 | 15 | filter: 'raw' | 15 | filter: "min", |
1638 | 16 | }).use('lazr.picker', 'dump', function(Y) { | 16 | base: "../../build/", |
1639 | 17 | modules: LAZR_MODULES, | ||
1640 | 18 | insertBefore: "style-overrides", | ||
1641 | 19 | }; | ||
1642 | 20 | </script> | ||
1643 | 21 | |||
1644 | 22 | <script type="text/javascript"> | ||
1645 | 23 | |||
1646 | 24 | YUI(LAZR_YUI_CONFIG).use('lazr.picker', 'dump', function(Y) { | ||
1647 | 17 | // Parse the content of the textarea in the data structure | 25 | // Parse the content of the textarea in the data structure |
1648 | 18 | // expected by the widget. | 26 | // expected by the widget. |
1649 | 19 | function parse_items () { | 27 | function parse_items () { |
1650 | @@ -156,15 +164,7 @@ | |||
1651 | 156 | }); | 164 | }); |
1652 | 157 | </script> | 165 | </script> |
1653 | 158 | 166 | ||
1663 | 159 | <link rel="stylesheet" type="text/css" href="../../build/yui/current/build/cssreset/reset.css" /> | 167 | <style id="style-overrides" type="text/css"> |
1655 | 160 | <link rel="stylesheet" type="text/css" href="../../build/yui/current/build/cssfonts/fonts.css" /> | ||
1656 | 161 | <link rel="stylesheet" type="text/css" href="../../build/yui/current/build/cssbase/base.css" /> | ||
1657 | 162 | |||
1658 | 163 | <link rel="stylesheet" type="text/css" href="../../build/overlay/assets/skins/sam/pretty-overlay.css" /> | ||
1659 | 164 | <link type="text/css" rel="stylesheet" href="../../build/lazr/assets/skins/sam/lazr.css" /> | ||
1660 | 165 | <link type="text/css" rel="stylesheet" href="../../build/picker/assets/picker-core.css" /> | ||
1661 | 166 | <link type="text/css" rel="stylesheet" href="../../build/picker/assets/skins/sam/picker-skin.css" /> | ||
1662 | 167 | <style> | ||
1664 | 168 | #example { width: 500px; } | 168 | #example { width: 500px; } |
1665 | 169 | #items { width: 500px; } | 169 | #items { width: 500px; } |
1666 | 170 | body { | 170 | body { |
1667 | 171 | 171 | ||
1668 | === modified file 'src-js/lazrjs/activator/activator.js' | |||
1669 | --- src-js/lazrjs/activator/activator.js 2009-11-12 21:35:17 +0000 | |||
1670 | +++ src-js/lazrjs/activator/activator.js 2009-11-19 17:33:11 +0000 | |||
1671 | @@ -274,5 +274,6 @@ | |||
1672 | 274 | // Nuke the tabindex attribute. | 274 | // Nuke the tabindex attribute. |
1673 | 275 | Y.augment(Activator, Y.lazr.ui.NoTabIndex, true); | 275 | Y.augment(Activator, Y.lazr.ui.NoTabIndex, true); |
1674 | 276 | 276 | ||
1677 | 277 | }, "0.1", {"requires": | 277 | }, "0.1", {"skinnable": true, |
1678 | 278 | ["oop", "event", "node", "widget", "lazr.anim", "lazr.base"]}); | 278 | "requires": ["oop", "event", "node", "widget", |
1679 | 279 | "lazr.anim", "lazr.base"]}); | ||
1680 | 279 | 280 | ||
1681 | === modified file 'src-js/lazrjs/autocomplete/autocomplete.js' | |||
1682 | --- src-js/lazrjs/autocomplete/autocomplete.js 2009-11-12 21:35:17 +0000 | |||
1683 | +++ src-js/lazrjs/autocomplete/autocomplete.js 2009-11-19 17:33:11 +0000 | |||
1684 | @@ -789,4 +789,5 @@ | |||
1685 | 789 | }; | 789 | }; |
1686 | 790 | 790 | ||
1687 | 791 | 791 | ||
1689 | 792 | }, "0.1", {"requires":["oop", "base", "event", "widget", "widget-stack", "node-menunav"]}); | 792 | }, "0.1", {"skinnable": true, "requires":["oop", "base", "event", "widget", |
1690 | 793 | "widget-stack", "node-menunav"]}); | ||
1691 | 793 | 794 | ||
1692 | === modified file 'src-js/lazrjs/choiceedit/assets/choiceedit-core.css' | |||
1693 | --- src-js/lazrjs/choiceedit/assets/choiceedit-core.css 2009-07-31 00:06:15 +0000 | |||
1694 | +++ src-js/lazrjs/choiceedit/assets/choiceedit-core.css 2009-11-19 17:33:11 +0000 | |||
1695 | @@ -30,7 +30,7 @@ | |||
1696 | 30 | .yui-ichoicelist li a:hover { | 30 | .yui-ichoicelist li a:hover { |
1697 | 31 | background-color: #eee; | 31 | background-color: #eee; |
1698 | 32 | } | 32 | } |
1700 | 33 | .yui-ichoicelist #yui-pretty-overlay-modal h2 {/ | 33 | .yui-ichoicelist #yui-pretty-overlay-modal h2 { |
1701 | 34 | font-weight: bold; | 34 | font-weight: bold; |
1702 | 35 | font-size: 1.2em; | 35 | font-size: 1.2em; |
1703 | 36 | text-indent: 0; | 36 | text-indent: 0; |
1704 | 37 | 37 | ||
1705 | === added directory 'src-js/lazrjs/choiceedit/assets/skins' | |||
1706 | === added directory 'src-js/lazrjs/choiceedit/assets/skins/sam' | |||
1707 | === added file 'src-js/lazrjs/choiceedit/assets/skins/sam/choiceedit-skin.css' | |||
1708 | --- src-js/lazrjs/choiceedit/assets/skins/sam/choiceedit-skin.css 1970-01-01 00:00:00 +0000 | |||
1709 | +++ src-js/lazrjs/choiceedit/assets/skins/sam/choiceedit-skin.css 2009-11-19 17:33:11 +0000 | |||
1710 | @@ -0,0 +1,3 @@ | |||
1711 | 1 | /* Copyright (c) 2009, Canonical Ltd. All rights reserved. */ | ||
1712 | 2 | |||
1713 | 3 | /* Placeholder for skinning of the Choice Edit Widget */ | ||
1714 | 0 | \ No newline at end of file | 4 | \ No newline at end of file |
1715 | 1 | 5 | ||
1716 | === modified file 'src-js/lazrjs/choiceedit/choiceedit.js' | |||
1717 | --- src-js/lazrjs/choiceedit/choiceedit.js 2009-11-13 20:50:08 +0000 | |||
1718 | +++ src-js/lazrjs/choiceedit/choiceedit.js 2009-11-19 17:33:11 +0000 | |||
1719 | @@ -661,7 +661,8 @@ | |||
1720 | 661 | 661 | ||
1721 | 662 | Y.NullChoiceSource = NullChoiceSource; | 662 | Y.NullChoiceSource = NullChoiceSource; |
1722 | 663 | 663 | ||
1726 | 664 | },"0.2", {"requires": ["oop", "event", "event-delegate", "node", | 664 | },"0.2", {"skinnable": true, |
1727 | 665 | "widget", "widget-stdmod", "overlay", | 665 | "requires": ["oop", "event", "event-delegate", "node", |
1728 | 666 | "lazr.overlay", "lazr.anim", "lazr.base"]}); | 666 | "widget", "widget-stdmod", "overlay", |
1729 | 667 | "lazr.overlay", "lazr.anim", "lazr.base"]}); | ||
1730 | 667 | 668 | ||
1731 | 668 | 669 | ||
1732 | === modified file 'src-js/lazrjs/effects/effects.js' | |||
1733 | --- src-js/lazrjs/effects/effects.js 2009-11-12 21:35:17 +0000 | |||
1734 | +++ src-js/lazrjs/effects/effects.js 2009-11-19 17:33:11 +0000 | |||
1735 | @@ -183,4 +183,5 @@ | |||
1736 | 183 | } | 183 | } |
1737 | 184 | 184 | ||
1738 | 185 | 185 | ||
1740 | 186 | }, null, { "requires":["anim", "node"] }); | 186 | }, null, {"skinnable": true, |
1741 | 187 | "requires":["anim", "node"]}); | ||
1742 | 187 | 188 | ||
1743 | === added directory 'src-js/lazrjs/error/assets/skins' | |||
1744 | === added directory 'src-js/lazrjs/error/assets/skins/sam' | |||
1745 | === added file 'src-js/lazrjs/error/assets/skins/sam/error-skin.css' | |||
1746 | --- src-js/lazrjs/error/assets/skins/sam/error-skin.css 1970-01-01 00:00:00 +0000 | |||
1747 | +++ src-js/lazrjs/error/assets/skins/sam/error-skin.css 2009-11-19 17:33:11 +0000 | |||
1748 | @@ -0,0 +1,3 @@ | |||
1749 | 1 | /* Copyright (c) 2009, Canonical Ltd. All rights reserved. */ | ||
1750 | 2 | |||
1751 | 3 | /* Placeholder for skinning of the Error Widget */ | ||
1752 | 0 | \ No newline at end of file | 4 | \ No newline at end of file |
1753 | 1 | 5 | ||
1754 | === modified file 'src-js/lazrjs/error/error.js' | |||
1755 | --- src-js/lazrjs/error/error.js 2009-11-16 14:39:47 +0000 | |||
1756 | +++ src-js/lazrjs/error/error.js 2009-11-19 17:33:11 +0000 | |||
1757 | @@ -165,4 +165,4 @@ | |||
1758 | 165 | Y.lazr.error.widget = error_widget; | 165 | Y.lazr.error.widget = error_widget; |
1759 | 166 | Y.lazr.error.BasicErrorWidget = BasicErrorWidget; | 166 | Y.lazr.error.BasicErrorWidget = BasicErrorWidget; |
1760 | 167 | 167 | ||
1762 | 168 | }, "0.1", {"requires":["lazr.overlay"]}); | 168 | }, "0.1", {"skinnable": true, "requires":["lazr.overlay"]}); |
1763 | 169 | 169 | ||
1764 | === renamed file 'src-js/lazrjs/formoverlay/assets/formoverlay.css' => 'src-js/lazrjs/formoverlay/assets/formoverlay-core.css' | |||
1765 | === added directory 'src-js/lazrjs/formoverlay/assets/skins' | |||
1766 | === added directory 'src-js/lazrjs/formoverlay/assets/skins/sam' | |||
1767 | === added file 'src-js/lazrjs/formoverlay/assets/skins/sam/formoverlay-skin.css' | |||
1768 | --- src-js/lazrjs/formoverlay/assets/skins/sam/formoverlay-skin.css 1970-01-01 00:00:00 +0000 | |||
1769 | +++ src-js/lazrjs/formoverlay/assets/skins/sam/formoverlay-skin.css 2009-11-19 17:33:11 +0000 | |||
1770 | @@ -0,0 +1,3 @@ | |||
1771 | 1 | /* Copyright (c) 2009, Canonical Ltd. All rights reserved. */ | ||
1772 | 2 | |||
1773 | 3 | /* Placeholder for skinning of the Form Overlay Widget */ | ||
1774 | 0 | \ No newline at end of file | 4 | \ No newline at end of file |
1775 | 1 | 5 | ||
1776 | === modified file 'src-js/lazrjs/formoverlay/formoverlay.js' | |||
1777 | --- src-js/lazrjs/formoverlay/formoverlay.js 2009-11-12 21:35:17 +0000 | |||
1778 | +++ src-js/lazrjs/formoverlay/formoverlay.js 2009-11-19 17:33:11 +0000 | |||
1779 | @@ -499,4 +499,4 @@ | |||
1780 | 499 | 499 | ||
1781 | 500 | Y.lazr.FormOverlay = FormOverlay; | 500 | Y.lazr.FormOverlay = FormOverlay; |
1782 | 501 | 501 | ||
1784 | 502 | }, "0.1", { "requires": ["lazr.overlay"] }); | 502 | }, "0.1", {"skinnable": true, "requires": ["lazr.overlay"]}); |
1785 | 503 | 503 | ||
1786 | === modified file 'src-js/lazrjs/inlineedit/editor.js' | |||
1787 | --- src-js/lazrjs/inlineedit/editor.js 2009-11-13 20:50:08 +0000 | |||
1788 | +++ src-js/lazrjs/inlineedit/editor.js 2009-11-19 17:33:11 +0000 | |||
1789 | @@ -1499,5 +1499,6 @@ | |||
1790 | 1499 | 1499 | ||
1791 | 1500 | //~ Y.log("Module loaded", 'info', 'lazr.editor'); | 1500 | //~ Y.log("Module loaded", 'info', 'lazr.editor'); |
1792 | 1501 | 1501 | ||
1794 | 1502 | }, "0.2", {"requires": ["oop", "anim", "event", "node", "widget", | 1502 | }, "0.2", {"skinnable": true, |
1795 | 1503 | "requires": ["oop", "anim", "event", "node", "widget", | ||
1796 | 1503 | "lazr.anim", "lazr.base"]}); | 1504 | "lazr.anim", "lazr.base"]}); |
1797 | 1504 | 1505 | ||
1798 | === modified file 'src-js/lazrjs/lazr/lazr.js' | |||
1799 | --- src-js/lazrjs/lazr/lazr.js 2009-11-12 21:35:17 +0000 | |||
1800 | +++ src-js/lazrjs/lazr/lazr.js 2009-11-19 17:33:11 +0000 | |||
1801 | @@ -145,4 +145,4 @@ | |||
1802 | 145 | }; | 145 | }; |
1803 | 146 | 146 | ||
1804 | 147 | 147 | ||
1806 | 148 | }, "0.1", {"requires": ["classnamemanager"]}); | 148 | }, "0.1", {"skinnable": true, "requires": ["classnamemanager"]}); |
1807 | 149 | 149 | ||
1808 | === modified file 'src-js/lazrjs/overlay/assets/pretty-overlay-core.css' | |||
1809 | --- src-js/lazrjs/overlay/assets/pretty-overlay-core.css 2009-10-21 21:43:07 +0000 | |||
1810 | +++ src-js/lazrjs/overlay/assets/pretty-overlay-core.css 2009-11-19 17:33:11 +0000 | |||
1811 | @@ -3,11 +3,16 @@ | |||
1812 | 3 | /* blocking-div appears above everything else. */ | 3 | /* blocking-div appears above everything else. */ |
1813 | 4 | .blocking-div { | 4 | .blocking-div { |
1814 | 5 | z-index: 999; | 5 | z-index: 999; |
1820 | 6 | position: fixed; | 6 | opacity:0; |
1821 | 7 | left: 0px; | 7 | filter:alpha(opacity=0); |
1822 | 8 | top: 0px; | 8 | position:absolute; |
1823 | 9 | right: 0px; | 9 | border:none; |
1824 | 10 | bottom: 0px; | 10 | top:0px; |
1825 | 11 | left:0px; | ||
1826 | 12 | padding:0; | ||
1827 | 13 | margin:0; | ||
1828 | 14 | width:100%; | ||
1829 | 15 | height:100%; | ||
1830 | 11 | } | 16 | } |
1831 | 12 | 17 | ||
1832 | 13 | /* overlay appears above blocking-div. */ | 18 | /* overlay appears above blocking-div. */ |
1833 | 14 | 19 | ||
1834 | === modified file 'src-js/lazrjs/overlay/overlay.js' | |||
1835 | --- src-js/lazrjs/overlay/overlay.js 2009-11-13 15:20:06 +0000 | |||
1836 | +++ src-js/lazrjs/overlay/overlay.js 2009-11-19 17:33:11 +0000 | |||
1837 | @@ -210,7 +210,7 @@ | |||
1838 | 210 | if (visible) { | 210 | if (visible) { |
1839 | 211 | Y.get('body').appendChild(this._blocking_div); | 211 | Y.get('body').appendChild(this._blocking_div); |
1840 | 212 | // Handle Escape (code 27) on keydown. | 212 | // Handle Escape (code 27) on keydown. |
1842 | 213 | this._doc_kp_handler = Y.on('key', function() { | 213 | this._doc_kp_handler = Y.on('key', function() { |
1843 | 214 | self.fire(CANCEL); | 214 | self.fire(CANCEL); |
1844 | 215 | }, document, 'down:27'); | 215 | }, document, 'down:27'); |
1845 | 216 | } else { | 216 | } else { |
1846 | @@ -364,4 +364,4 @@ | |||
1847 | 364 | 364 | ||
1848 | 365 | Y.lazr.PrettyOverlay = PrettyOverlay; | 365 | Y.lazr.PrettyOverlay = PrettyOverlay; |
1849 | 366 | 366 | ||
1851 | 367 | }, "0.1", {"requires": ["oop", "overlay", "event", "widget-position"]}); | 367 | }, "0.1", {"skinnable": true, "requires": ["oop", "overlay", "event", "widget", "widget-stack", "widget-position", "widget-position-ext"]}); |
1852 | 368 | 368 | ||
1853 | === modified file 'src-js/lazrjs/picker/picker.js' | |||
1854 | --- src-js/lazrjs/picker/picker.js 2009-11-13 20:50:08 +0000 | |||
1855 | +++ src-js/lazrjs/picker/picker.js 2009-11-19 17:33:11 +0000 | |||
1856 | @@ -825,7 +825,8 @@ | |||
1857 | 825 | 825 | ||
1858 | 826 | Y.Picker = Picker; | 826 | Y.Picker = Picker; |
1859 | 827 | 827 | ||
1861 | 828 | }, "0.1", {"requires": ["oop", "event", "event-focus", "node", | 828 | }, "0.1", {"skinnable": true, |
1862 | 829 | "requires": ["oop", "event", "event-focus", "node", | ||
1863 | 829 | "substitute", "widget", "widget-stdmod", | 830 | "substitute", "widget", "widget-stdmod", |
1864 | 830 | "lazr.overlay", "lazr.anim", "lazr.base"] | 831 | "lazr.overlay", "lazr.anim", "lazr.base"] |
1865 | 831 | }); | 832 | }); |
1866 | 832 | 833 | ||
1867 | === renamed directory 'src-js/lazrjs/yui/current/build/anim' => 'src-js/lazrjs/yui/anim' | |||
1868 | === renamed directory 'src-js/lazrjs/yui/current/build/assets' => 'src-js/lazrjs/yui/assets' | |||
1869 | === renamed directory 'src-js/lazrjs/yui/current/build/async-queue' => 'src-js/lazrjs/yui/async-queue' | |||
1870 | === renamed directory 'src-js/lazrjs/yui/current/build/attribute' => 'src-js/lazrjs/yui/attribute' | |||
1871 | === renamed directory 'src-js/lazrjs/yui/current/build/base' => 'src-js/lazrjs/yui/base' | |||
1872 | === renamed directory 'src-js/lazrjs/yui/current/build/cache' => 'src-js/lazrjs/yui/cache' | |||
1873 | === renamed directory 'src-js/lazrjs/yui/current/build/classnamemanager' => 'src-js/lazrjs/yui/classnamemanager' | |||
1874 | === renamed directory 'src-js/lazrjs/yui/current/build/collection' => 'src-js/lazrjs/yui/collection' | |||
1875 | === renamed directory 'src-js/lazrjs/yui/current/build/compat' => 'src-js/lazrjs/yui/compat' | |||
1876 | === renamed directory 'src-js/lazrjs/yui/current/build/console' => 'src-js/lazrjs/yui/console' | |||
1877 | === renamed directory 'src-js/lazrjs/yui/current/build/cookie' => 'src-js/lazrjs/yui/cookie' | |||
1878 | === renamed directory 'src-js/lazrjs/yui/current/build/cssbase' => 'src-js/lazrjs/yui/cssbase' | |||
1879 | === renamed directory 'src-js/lazrjs/yui/current/build/cssfonts' => 'src-js/lazrjs/yui/cssfonts' | |||
1880 | === renamed directory 'src-js/lazrjs/yui/current/build/cssgrids' => 'src-js/lazrjs/yui/cssgrids' | |||
1881 | === renamed directory 'src-js/lazrjs/yui/current/build/cssreset' => 'src-js/lazrjs/yui/cssreset' | |||
1882 | === removed directory 'src-js/lazrjs/yui/current' | |||
1883 | === removed directory 'src-js/lazrjs/yui/current/build' | |||
1884 | === renamed directory 'src-js/lazrjs/yui/current/build/dataschema' => 'src-js/lazrjs/yui/dataschema' | |||
1885 | === renamed directory 'src-js/lazrjs/yui/current/build/datasource' => 'src-js/lazrjs/yui/datasource' | |||
1886 | === renamed directory 'src-js/lazrjs/yui/current/build/datatype' => 'src-js/lazrjs/yui/datatype' | |||
1887 | === renamed directory 'src-js/lazrjs/yui/current/build/dd' => 'src-js/lazrjs/yui/dd' | |||
1888 | === renamed directory 'src-js/lazrjs/yui/current/build/dom' => 'src-js/lazrjs/yui/dom' | |||
1889 | === renamed directory 'src-js/lazrjs/yui/current/build/dump' => 'src-js/lazrjs/yui/dump' | |||
1890 | === renamed directory 'src-js/lazrjs/yui/current/build/event' => 'src-js/lazrjs/yui/event' | |||
1891 | === renamed directory 'src-js/lazrjs/yui/current/build/event-custom' => 'src-js/lazrjs/yui/event-custom' | |||
1892 | === renamed directory 'src-js/lazrjs/yui/current/build/event-simulate' => 'src-js/lazrjs/yui/event-simulate' | |||
1893 | === renamed directory 'src-js/lazrjs/yui/current/build/get' => 'src-js/lazrjs/yui/get' | |||
1894 | === renamed directory 'src-js/lazrjs/yui/current/build/history' => 'src-js/lazrjs/yui/history' | |||
1895 | === renamed directory 'src-js/lazrjs/yui/current/build/imageloader' => 'src-js/lazrjs/yui/imageloader' | |||
1896 | === renamed directory 'src-js/lazrjs/yui/current/build/io' => 'src-js/lazrjs/yui/io' | |||
1897 | === renamed directory 'src-js/lazrjs/yui/current/build/json' => 'src-js/lazrjs/yui/json' | |||
1898 | === renamed directory 'src-js/lazrjs/yui/current/build/loader' => 'src-js/lazrjs/yui/loader' | |||
1899 | === renamed directory 'src-js/lazrjs/yui/current/build/node' => 'src-js/lazrjs/yui/node' | |||
1900 | === renamed directory 'src-js/lazrjs/yui/current/build/node-focusmanager' => 'src-js/lazrjs/yui/node-focusmanager' | |||
1901 | === renamed directory 'src-js/lazrjs/yui/current/build/node-menunav' => 'src-js/lazrjs/yui/node-menunav' | |||
1902 | === renamed directory 'src-js/lazrjs/yui/current/build/oop' => 'src-js/lazrjs/yui/oop' | |||
1903 | === renamed directory 'src-js/lazrjs/yui/current/build/overlay' => 'src-js/lazrjs/yui/overlay' | |||
1904 | === renamed directory 'src-js/lazrjs/yui/current/build/plugin' => 'src-js/lazrjs/yui/plugin' | |||
1905 | === renamed directory 'src-js/lazrjs/yui/current/build/pluginhost' => 'src-js/lazrjs/yui/pluginhost' | |||
1906 | === renamed directory 'src-js/lazrjs/yui/current/build/profiler' => 'src-js/lazrjs/yui/profiler' | |||
1907 | === renamed directory 'src-js/lazrjs/yui/current/build/queue-promote' => 'src-js/lazrjs/yui/queue-promote' | |||
1908 | === renamed directory 'src-js/lazrjs/yui/current/build/slider' => 'src-js/lazrjs/yui/slider' | |||
1909 | === renamed directory 'src-js/lazrjs/yui/current/build/stylesheet' => 'src-js/lazrjs/yui/stylesheet' | |||
1910 | === renamed directory 'src-js/lazrjs/yui/current/build/substitute' => 'src-js/lazrjs/yui/substitute' | |||
1911 | === renamed directory 'src-js/lazrjs/yui/current/build/test' => 'src-js/lazrjs/yui/test' | |||
1912 | === renamed directory 'src-js/lazrjs/yui/current/build/widget' => 'src-js/lazrjs/yui/widget' | |||
1913 | === renamed directory 'src-js/lazrjs/yui/current/build/yui' => 'src-js/lazrjs/yui/yui' | |||
1914 | === renamed directory 'src-js/lazrjs/yui/current/build/yui-base' => 'src-js/lazrjs/yui/yui-base' | |||
1915 | === modified file 'src-py/lazr/js/build.py' | |||
1916 | --- src-py/lazr/js/build.py 2009-11-13 16:47:45 +0000 | |||
1917 | +++ src-py/lazr/js/build.py 2009-11-19 17:33:11 +0000 | |||
1918 | @@ -211,9 +211,6 @@ | |||
1919 | 211 | self.extra_files = [] | 211 | self.extra_files = [] |
1920 | 212 | else: | 212 | else: |
1921 | 213 | self.extra_files = extra_files | 213 | self.extra_files = extra_files |
1922 | 214 | # If we build the lazr-js widgets, make sure that YUI source is | ||
1923 | 215 | # included as well, since we depend on it being available. | ||
1924 | 216 | self.include_yui = (src_dir == SRC_DIR) | ||
1925 | 217 | 214 | ||
1926 | 218 | self.exclusion_regex = exclude_regex | 215 | self.exclusion_regex = exclude_regex |
1927 | 219 | self.file_type = file_type | 216 | self.file_type = file_type |
1928 | @@ -420,14 +417,6 @@ | |||
1929 | 420 | 417 | ||
1930 | 421 | self.update_combined_js_file() | 418 | self.update_combined_js_file() |
1931 | 422 | self.update_combined_css_skins() | 419 | self.update_combined_css_skins() |
1932 | 423 | if self.include_yui: | ||
1933 | 424 | self.link_yui_directory() | ||
1934 | 425 | |||
1935 | 426 | def link_yui_directory(self): | ||
1936 | 427 | """Link to the built yui source directory.""" | ||
1937 | 428 | yui_directory = os.path.join(os.path.dirname(lazrjs.__file__), 'yui') | ||
1938 | 429 | link_location = os.path.join(self.build_dir, 'yui') | ||
1939 | 430 | self.ensure_link(yui_directory, link_location) | ||
1940 | 431 | 420 | ||
1941 | 432 | 421 | ||
1942 | 433 | def get_options(): | 422 | def get_options(): |
1943 | 434 | 423 | ||
1944 | === modified file 'src-py/lazr/js/meta.py' | |||
1945 | --- src-py/lazr/js/meta.py 2009-11-13 15:37:35 +0000 | |||
1946 | +++ src-py/lazr/js/meta.py 2009-11-19 17:33:11 +0000 | |||
1947 | @@ -77,12 +77,16 @@ | |||
1948 | 77 | meta = extract_metadata(data) | 77 | meta = extract_metadata(data) |
1949 | 78 | prefix = "" | 78 | prefix = "" |
1950 | 79 | if self.prefix and not prefix.endswith("/"): | 79 | if self.prefix and not prefix.endswith("/"): |
1952 | 80 | prefix = prefix + "/" | 80 | prefix = self.prefix + "/" |
1953 | 81 | for entry in meta: | 81 | for entry in meta: |
1954 | 82 | entry["path"] = ( | 82 | entry["path"] = ( |
1956 | 83 | prefix + fname.replace(root + os.path.sep, "")) | 83 | prefix + fname.replace(root + os.path.sep, "") |
1957 | 84 | ).replace(os.path.sep, "/") | ||
1958 | 85 | |||
1959 | 84 | entry["type"] = "js" | 86 | entry["type"] = "js" |
1960 | 85 | entry["ext"] = self.ext | 87 | entry["ext"] = self.ext |
1961 | 88 | if entry.get("skinnable"): | ||
1962 | 89 | self.generate_skin_modules(entry, metadata, root) | ||
1963 | 86 | metadata.extend(meta) | 90 | metadata.extend(meta) |
1964 | 87 | 91 | ||
1965 | 88 | modules = {} | 92 | modules = {} |
1966 | @@ -93,6 +97,94 @@ | |||
1967 | 93 | open(out, "w").write("var %s = %s;" % | 97 | open(out, "w").write("var %s = %s;" % |
1968 | 94 | (var_name, simplejson.dumps(modules))) | 98 | (var_name, simplejson.dumps(modules))) |
1969 | 95 | 99 | ||
1970 | 100 | def generate_skin_modules(self, entry, metadata, root): | ||
1971 | 101 | # Generate a skin module definition, since YUI assumes that | ||
1972 | 102 | # the path starts with the module name, and that breaks with | ||
1973 | 103 | # our structure. | ||
1974 | 104 | # | ||
1975 | 105 | # Follow lazr-js conventions and look for any file in the skin | ||
1976 | 106 | # assets directory. | ||
1977 | 107 | module_names = [] | ||
1978 | 108 | by_name = {} | ||
1979 | 109 | |||
1980 | 110 | prefix = "" | ||
1981 | 111 | if self.prefix and not prefix.endswith("/"): | ||
1982 | 112 | prefix = self.prefix + "/" | ||
1983 | 113 | |||
1984 | 114 | # Default 'after' modules from YUI Loader. Might have to | ||
1985 | 115 | # be changed in the future, if YUI itself changes. | ||
1986 | 116 | after = ["cssreset", "cssfonts", | ||
1987 | 117 | "cssgrids", "cssreset-context", | ||
1988 | 118 | "cssfonts-context", | ||
1989 | 119 | "cssgrids-context"] | ||
1990 | 120 | |||
1991 | 121 | if entry.get("requires"): | ||
1992 | 122 | # If the base module requires other modules, extend | ||
1993 | 123 | # the after entry with the (expected) skins for those | ||
1994 | 124 | # modules to force our skin to be loaded after those. | ||
1995 | 125 | after.extend(["skin-sam-%s" % s | ||
1996 | 126 | for s in entry["requires"]]) | ||
1997 | 127 | |||
1998 | 128 | assets = os.path.join( | ||
1999 | 129 | os.path.dirname(entry["path"][len(prefix):]), "assets") | ||
2000 | 130 | sam = os.path.join(assets, "skins", "sam") | ||
2001 | 131 | css_assets = glob.glob(os.path.join(root, sam, "*-skin.css")) | ||
2002 | 132 | |||
2003 | 133 | for fname in css_assets: | ||
2004 | 134 | if not os.path.exists(fname): | ||
2005 | 135 | # If the file doesn't exist, don't create a module to | ||
2006 | 136 | # load it. | ||
2007 | 137 | continue | ||
2008 | 138 | |||
2009 | 139 | # Compute a module name for this asset. | ||
2010 | 140 | module_name = os.path.basename(fname)[:-len("-skin.css")] | ||
2011 | 141 | skin_module_name = "skin-sam-%s" % entry["name"] | ||
2012 | 142 | # If the computed module_name does not match the | ||
2013 | 143 | # Javascript module name without the namespace, then use | ||
2014 | 144 | # it as a postfix to disambiguate possibly multiple | ||
2015 | 145 | # modules. | ||
2016 | 146 | package = entry["name"].split(".")[-1] | ||
2017 | 147 | if module_name != package and len(css_assets) > 1: | ||
2018 | 148 | skin_module_name = "%s+%s" % (skin_module_name, module_name) | ||
2019 | 149 | |||
2020 | 150 | css = (fname.replace(root + os.path.sep, "") | ||
2021 | 151 | ).replace(os.path.sep, "/") | ||
2022 | 152 | module = {"name": skin_module_name, | ||
2023 | 153 | "after": after[:], | ||
2024 | 154 | "type": "css", | ||
2025 | 155 | "ext": self.ext, | ||
2026 | 156 | "path": prefix + css} | ||
2027 | 157 | by_name[skin_module_name] = module | ||
2028 | 158 | module_names.append(skin_module_name) | ||
2029 | 159 | metadata.append(module) | ||
2030 | 160 | |||
2031 | 161 | # All assets under the skin have been looked at. Now look for | ||
2032 | 162 | # a "-core.css" asset, following lazr-js conventions and add | ||
2033 | 163 | # it as a requirement for the previously-found assets. | ||
2034 | 164 | for module_name in module_names: | ||
2035 | 165 | name = os.path.basename( | ||
2036 | 166 | by_name[module_name]["path"])[:-len("-skin.css")] | ||
2037 | 167 | fname = os.path.join(root, assets, "%s-core.css" % name) | ||
2038 | 168 | if not os.path.exists(fname): | ||
2039 | 169 | # No core CSS asset exists for this skin, skip | ||
2040 | 170 | # generating a module for it. | ||
2041 | 171 | continue | ||
2042 | 172 | |||
2043 | 173 | skin_module_name = "%s+core" % module_name | ||
2044 | 174 | css = (fname.replace(root + os.path.sep, "") | ||
2045 | 175 | ).replace(os.path.sep, "/") | ||
2046 | 176 | module = {"name": skin_module_name, | ||
2047 | 177 | "after": after[:], | ||
2048 | 178 | "type": "css", | ||
2049 | 179 | "ext": self.ext, | ||
2050 | 180 | "path": prefix + css} | ||
2051 | 181 | |||
2052 | 182 | requires = by_name[module_name].setdefault("requires", []) | ||
2053 | 183 | requires.append(skin_module_name) | ||
2054 | 184 | after = by_name[module_name].setdefault("after", []) | ||
2055 | 185 | after.append(skin_module_name) | ||
2056 | 186 | metadata.append(module) | ||
2057 | 187 | |||
2058 | 96 | def do_build(self): | 188 | def do_build(self): |
2059 | 97 | included_files = [] | 189 | included_files = [] |
2060 | 98 | 190 | ||
2061 | 99 | 191 | ||
2062 | === modified file 'src-py/lazr/js/tests/test_meta.py' | |||
2063 | --- src-py/lazr/js/tests/test_meta.py 2009-11-13 20:24:46 +0000 | |||
2064 | +++ src-py/lazr/js/tests/test_meta.py 2009-11-19 17:33:11 +0000 | |||
2065 | @@ -185,7 +185,7 @@ | |||
2066 | 185 | Y.log('goodbye world'); | 185 | Y.log('goodbye world'); |
2067 | 186 | }, Y); | 186 | }, Y); |
2068 | 187 | }, '0.1', {"use": ["dom"], "omit": ["nono"], | 187 | }, '0.1', {"use": ["dom"], "omit": ["nono"], |
2070 | 188 | "skinnable": true, "optional": ["meh"], | 188 | "optional": ["meh"], |
2071 | 189 | "supersedes": ["old-anim"], | 189 | "supersedes": ["old-anim"], |
2072 | 190 | "after": ["lazr.base"]}); | 190 | "after": ["lazr.base"]}); |
2073 | 191 | """) | 191 | """) |
2074 | @@ -194,12 +194,10 @@ | |||
2075 | 194 | self.assertEquals(metadata[0]["name"], "lazr.anim") | 194 | self.assertEquals(metadata[0]["name"], "lazr.anim") |
2076 | 195 | self.assertEquals(metadata[0]["use"], ["dom"]) | 195 | self.assertEquals(metadata[0]["use"], ["dom"]) |
2077 | 196 | self.assertEquals(metadata[0]["omit"], ["nono"]) | 196 | self.assertEquals(metadata[0]["omit"], ["nono"]) |
2078 | 197 | self.assertEquals(metadata[0]["skinnable"], True) | ||
2079 | 198 | self.assertEquals(metadata[0]["optional"], ["meh"]) | 197 | self.assertEquals(metadata[0]["optional"], ["meh"]) |
2080 | 199 | self.assertEquals(metadata[0]["supersedes"], ["old-anim"]) | 198 | self.assertEquals(metadata[0]["supersedes"], ["old-anim"]) |
2081 | 200 | self.assertEquals(metadata[0]["after"], ["lazr.base"]) | 199 | self.assertEquals(metadata[0]["after"], ["lazr.base"]) |
2082 | 201 | 200 | ||
2083 | 202 | |||
2084 | 203 | class GenerateMetadataTest(mocker.MockerTestCase): | 201 | class GenerateMetadataTest(mocker.MockerTestCase): |
2085 | 204 | 202 | ||
2086 | 205 | def test_generate_metadata_simple(self): | 203 | def test_generate_metadata_simple(self): |
2087 | @@ -231,6 +229,123 @@ | |||
2088 | 231 | open(output, "r").read(), | 229 | open(output, "r").read(), |
2089 | 232 | "var LAZR_CONFIG = %s;" % simplejson.dumps(config)) | 230 | "var LAZR_CONFIG = %s;" % simplejson.dumps(config)) |
2090 | 233 | 231 | ||
2091 | 232 | def test_extract_skinnable(self): | ||
2092 | 233 | """ | ||
2093 | 234 | If a module is skinnable, we'll generate the module | ||
2094 | 235 | registration for it's skin ourselves, to prevent YUI from | ||
2095 | 236 | auto-generating one, since it assumes the skin path starts | ||
2096 | 237 | with the module name. | ||
2097 | 238 | """ | ||
2098 | 239 | root = self.makeDir() | ||
2099 | 240 | anim = self.makeDir(path=os.path.join(root, "anim")) | ||
2100 | 241 | sample = self.makeFile("""\ | ||
2101 | 242 | YUI.add('lazr.anim', function(Y){ | ||
2102 | 243 | Y.log('Hello World'); | ||
2103 | 244 | }, "0.1", {"use": ["dom"], "requires": ["widget"], "skinnable": true}); | ||
2104 | 245 | """, basename="anim.js", dirname=anim) | ||
2105 | 246 | |||
2106 | 247 | skin = self.makeDir(path=os.path.join(anim, "assets", "skins", "sam")) | ||
2107 | 248 | css = self.makeFile("""\ | ||
2108 | 249 | /* anim-skin.css */ | ||
2109 | 250 | """, basename="anim-skin.css", dirname=skin) | ||
2110 | 251 | |||
2111 | 252 | output = self.makeFile("") | ||
2112 | 253 | builder = TestBuilder(name="LAZR_CONFIG", src_dir=root, | ||
2113 | 254 | output=output, exclude_regex="", | ||
2114 | 255 | prefix="lazr") | ||
2115 | 256 | builder.do_build() | ||
2116 | 257 | |||
2117 | 258 | config = { | ||
2118 | 259 | "skin-sam-lazr.anim": | ||
2119 | 260 | {"path": "lazr/anim/assets/skins/sam/anim-skin.css", | ||
2120 | 261 | "type": "css", | ||
2121 | 262 | "ext": True, | ||
2122 | 263 | "after": ["cssreset", "cssfonts", "cssgrids", | ||
2123 | 264 | "cssreset-context", "cssfonts-context", | ||
2124 | 265 | "cssgrids-context", "skin-sam-widget"], | ||
2125 | 266 | }, | ||
2126 | 267 | "lazr.anim": | ||
2127 | 268 | {"path": "lazr/anim/anim.js", | ||
2128 | 269 | "use": ["dom"], | ||
2129 | 270 | "requires": ["widget"], | ||
2130 | 271 | "type": "js", | ||
2131 | 272 | "ext": True, | ||
2132 | 273 | "skinnable": True, | ||
2133 | 274 | } | ||
2134 | 275 | } | ||
2135 | 276 | |||
2136 | 277 | got = open(output, "r").read() | ||
2137 | 278 | prefix = got[:18] | ||
2138 | 279 | self.assertEquals(prefix, "var LAZR_CONFIG = ") | ||
2139 | 280 | self.assertEquals(simplejson.loads(got[18:-1]), config) | ||
2140 | 281 | |||
2141 | 282 | def test_extract_skinnable_with_lazr_conventions(self): | ||
2142 | 283 | """ | ||
2143 | 284 | LazrJS conventionally uses a "-core.css" file to load core CSS rules, | ||
2144 | 285 | and a "-skin.css" file to store skinnable rules. | ||
2145 | 286 | |||
2146 | 287 | If we find this filesystem structure, let's generate different | ||
2147 | 288 | CSS modules and hook them up accordingly. The filename doesn't | ||
2148 | 289 | need to match the module name. | ||
2149 | 290 | """ | ||
2150 | 291 | root = self.makeDir() | ||
2151 | 292 | anim = self.makeDir(path=os.path.join(root, "anim")) | ||
2152 | 293 | sample = self.makeFile("""\ | ||
2153 | 294 | YUI.add('lazr.anim', function(Y){ | ||
2154 | 295 | Y.log('Hello World'); | ||
2155 | 296 | }, "0.1", {"use": ["dom"], "requires": ["widget"], "skinnable": true}); | ||
2156 | 297 | """, basename="anim.js", dirname=anim) | ||
2157 | 298 | |||
2158 | 299 | assets = self.makeDir(path=os.path.join(anim, "assets")) | ||
2159 | 300 | css_core = self.makeFile("""\ | ||
2160 | 301 | /* purty-anim-core.css */ | ||
2161 | 302 | """, basename="purty-anim-core.css", dirname=assets) | ||
2162 | 303 | |||
2163 | 304 | skin = self.makeDir(path=os.path.join(assets, "skins", "sam")) | ||
2164 | 305 | css_skin = self.makeFile("""\ | ||
2165 | 306 | /* purty-anim-skin.css */ | ||
2166 | 307 | """, basename="purty-anim-skin.css", dirname=skin) | ||
2167 | 308 | |||
2168 | 309 | output = self.makeFile("") | ||
2169 | 310 | builder = TestBuilder(name="LAZR_CONFIG", src_dir=root, | ||
2170 | 311 | output=output, exclude_regex="", | ||
2171 | 312 | prefix="lazr") | ||
2172 | 313 | builder.do_build() | ||
2173 | 314 | |||
2174 | 315 | config = { | ||
2175 | 316 | "skin-sam-lazr.anim+core": | ||
2176 | 317 | {"path": "lazr/anim/assets/purty-anim-core.css", | ||
2177 | 318 | "type": "css", | ||
2178 | 319 | "ext": True, | ||
2179 | 320 | "after": ["cssreset", "cssfonts", "cssgrids", | ||
2180 | 321 | "cssreset-context", "cssfonts-context", | ||
2181 | 322 | "cssgrids-context", "skin-sam-widget"], | ||
2182 | 323 | }, | ||
2183 | 324 | "skin-sam-lazr.anim": | ||
2184 | 325 | {"path": "lazr/anim/assets/skins/sam/purty-anim-skin.css", | ||
2185 | 326 | "type": "css", | ||
2186 | 327 | "ext": True, | ||
2187 | 328 | "after": ["cssreset", "cssfonts", "cssgrids", | ||
2188 | 329 | "cssreset-context", "cssfonts-context", | ||
2189 | 330 | "cssgrids-context", "skin-sam-widget", | ||
2190 | 331 | "skin-sam-lazr.anim+core"], | ||
2191 | 332 | "requires": ["skin-sam-lazr.anim+core"], | ||
2192 | 333 | }, | ||
2193 | 334 | "lazr.anim": | ||
2194 | 335 | {"path": "lazr/anim/anim.js", | ||
2195 | 336 | "use": ["dom"], | ||
2196 | 337 | "requires": ["widget"], | ||
2197 | 338 | "type": "js", | ||
2198 | 339 | "ext": True, | ||
2199 | 340 | "skinnable": True, | ||
2200 | 341 | } | ||
2201 | 342 | } | ||
2202 | 343 | |||
2203 | 344 | got = open(output, "r").read() | ||
2204 | 345 | prefix = got[:18] | ||
2205 | 346 | self.assertEquals(prefix, "var LAZR_CONFIG = ") | ||
2206 | 347 | self.assertEquals(simplejson.loads(got[18:-1]), config) | ||
2207 | 348 | |||
2208 | 234 | 349 | ||
2209 | 235 | def test_suite(): | 350 | def test_suite(): |
2210 | 236 | return defaultTestLoader.loadTestsFromName(__name__) | 351 | return defaultTestLoader.loadTestsFromName(__name__) |
- Implements a demo combo-service which is able to serve the contents of the 'build' directory (see examples/ combo.html)
- Fix all examples to use pure loader goodness.