pupu 0.0.1 → 0.0.2.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +12 -1
- data/README.textile +38 -104
- data/Rakefile +17 -54
- data/TODO.txt +11 -6
- data/examples/merb/README.textile +7 -0
- data/examples/merb/Rakefile +30 -0
- data/examples/merb/application.rb +13 -0
- data/examples/merb/config/framework.rb +7 -0
- data/examples/merb/config/init.rb +48 -0
- data/examples/{blog/media/pupu/autocompleter → merb/public}/javascripts/initializers/autocompleter.js +0 -0
- data/examples/{blog/media/pupu/flash → merb/public}/javascripts/initializers/flash.js +0 -0
- data/examples/{blog/media/pupu/lighter → merb/public/javascripts}/initializers/lighter.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/CHANGELOG +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/LICENSE +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/README.textile +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/Rakefile +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/TODO +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/config.rb +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/images/spinner.gif +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/autocompleter.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/autocompleter.local.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/autocompleter.request.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/observer.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/metadata.yml +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/stylesheets/autocompleter.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/CHANGELOG +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/LICENSE +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/README.textile +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/Rakefile +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/TODO +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/config.rb +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/metadata.yml +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/ie.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/icons/cross.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/icons/key.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/icons/tick.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/readme.txt +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/screen.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/fancy-type/readme.txt +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/fancy-type/screen.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/doc.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/email.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/external.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/feed.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/im.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/pdf.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/visited.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/xls.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/readme.txt +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/screen.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/rtl/readme.txt +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/rtl/screen.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/print.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/screen.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/forms.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/grid.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/grid.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/ie.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/print.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/reset.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/typography.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/CHANGELOG +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/LICENSE +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/README.textile +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/Rakefile +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/TODO +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/config.rb +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/javascripts/flash.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/metadata.yml +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/CHANGELOG +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/LICENSE +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/README.textile +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/TODO.txt +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/config.rb +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.css.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.html.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.js.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.md.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.php.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.ruby.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.shell.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.sql.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.template.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/ZeroClipboard.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/lighter.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/media/ZeroClipboard.swf +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/metadata.yml +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.git.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.mocha.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.panic.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.standard.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.template.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.tutti.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.twilight.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/CHANGELOG +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/LICENSE +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/README.textile +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/Rakefile +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/TODO +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/config.rb +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/javascripts/mootools-1.2-core.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/javascripts/mootools-1.2-more.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/metadata.yml +0 -0
- data/examples/{blog/media/pupu/flash → merb/public}/stylesheets/initializers/flash.css +0 -0
- data/examples/merb/spec/application_spec.rb +37 -0
- data/examples/merb/spec/spec_helper.rb +16 -0
- data/examples/merb/views/examples/arguments.html.erb +0 -0
- data/examples/merb/views/examples/dependencies.html.erb +0 -0
- data/examples/merb/views/examples/simple.html.erb +4 -0
- data/examples/merb/views/index.html.erb +7 -0
- data/examples/merb/views/layout.html.erb +12 -0
- data/examples/rango/README.textile +7 -0
- data/examples/{blog → rango}/Rakefile +0 -0
- data/examples/{blog → rango}/config.ru +2 -3
- data/examples/{blog → rango}/init.rb +6 -5
- data/examples/{blog → rango}/media/javascripts/initializers/lighter.js +0 -0
- data/examples/rango/media/pupu/autocompleter/CHANGELOG +1 -0
- data/examples/rango/media/pupu/autocompleter/LICENSE +20 -0
- data/examples/rango/media/pupu/autocompleter/README.textile +26 -0
- data/examples/rango/media/pupu/autocompleter/Rakefile +29 -0
- data/examples/rango/media/pupu/autocompleter/TODO +1 -0
- data/examples/rango/media/pupu/autocompleter/config.rb +12 -0
- data/examples/rango/media/pupu/autocompleter/images/spinner.gif +0 -0
- data/examples/rango/media/pupu/autocompleter/javascripts/autocompleter.js +442 -0
- data/examples/rango/media/pupu/autocompleter/javascripts/autocompleter.local.js +31 -0
- data/examples/rango/media/pupu/autocompleter/javascripts/autocompleter.request.js +109 -0
- data/examples/rango/media/pupu/autocompleter/javascripts/initializers/autocompleter.js +26 -0
- data/examples/rango/media/pupu/autocompleter/javascripts/observer.js +69 -0
- data/examples/rango/media/pupu/autocompleter/metadata.yml +5 -0
- data/examples/rango/media/pupu/autocompleter/stylesheets/autocompleter.css +68 -0
- data/examples/rango/media/pupu/blueprint/CHANGELOG +1 -0
- data/examples/rango/media/pupu/blueprint/LICENSE +20 -0
- data/examples/rango/media/pupu/blueprint/README.textile +22 -0
- data/examples/rango/media/pupu/blueprint/Rakefile +29 -0
- data/examples/rango/media/pupu/blueprint/TODO +3 -0
- data/examples/rango/media/pupu/blueprint/config.rb +18 -0
- data/examples/rango/media/pupu/blueprint/metadata.yml +5 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/ie.css +26 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/icons/cross.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/icons/key.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/icons/tick.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/readme.txt +32 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/screen.css +97 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/fancy-type/readme.txt +14 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/fancy-type/screen.css +71 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/doc.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/email.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/external.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/feed.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/im.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/pdf.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/visited.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/xls.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/readme.txt +18 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/screen.css +40 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/rtl/readme.txt +10 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/rtl/screen.css +109 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/print.css +30 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/screen.css +251 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/forms.css +49 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/grid.css +212 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/grid.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/ie.css +59 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/print.css +85 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/reset.css +38 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/typography.css +105 -0
- data/examples/rango/media/pupu/flash/CHANGELOG +1 -0
- data/examples/rango/media/pupu/flash/LICENSE +20 -0
- data/examples/rango/media/pupu/flash/README.textile +22 -0
- data/examples/rango/media/pupu/flash/Rakefile +37 -0
- data/examples/rango/media/pupu/flash/TODO +1 -0
- data/examples/rango/media/pupu/flash/config.rb +11 -0
- data/examples/rango/media/pupu/flash/javascripts/flash.js +63 -0
- data/examples/rango/media/pupu/flash/javascripts/initializers/flash.js +12 -0
- data/examples/rango/media/pupu/flash/metadata.yml +5 -0
- data/examples/rango/media/pupu/flash/stylesheets/initializers/flash.css +21 -0
- data/examples/rango/media/pupu/lighter/CHANGELOG +2 -0
- data/examples/rango/media/pupu/lighter/LICENSE +20 -0
- data/examples/rango/media/pupu/lighter/README.textile +19 -0
- data/examples/rango/media/pupu/lighter/TODO.txt +4 -0
- data/examples/rango/media/pupu/lighter/config.rb +20 -0
- data/examples/rango/media/pupu/lighter/initializers/lighter.js +11 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.css.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.html.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.js.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.md.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.php.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.ruby.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.shell.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.sql.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.template.js +45 -0
- data/examples/rango/media/pupu/lighter/javascripts/ZeroClipboard.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/lighter.js +1 -0
- data/examples/rango/media/pupu/lighter/media/ZeroClipboard.swf +0 -0
- data/examples/rango/media/pupu/lighter/metadata.yml +5 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.git.css +1 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.mocha.css +1 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.panic.css +1 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.standard.css +1 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.template.css +101 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.tutti.css +1 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.twilight.css +1 -0
- data/examples/rango/media/pupu/mootools/CHANGELOG +2 -0
- data/examples/rango/media/pupu/mootools/LICENSE +20 -0
- data/examples/rango/media/pupu/mootools/README.textile +19 -0
- data/examples/rango/media/pupu/mootools/Rakefile +29 -0
- data/examples/rango/media/pupu/mootools/TODO +1 -0
- data/examples/rango/media/pupu/mootools/config.rb +8 -0
- data/examples/rango/media/pupu/mootools/javascripts/mootools-1.2-core.js +350 -0
- data/examples/rango/media/pupu/mootools/javascripts/mootools-1.2-more.js +154 -0
- data/examples/rango/media/pupu/mootools/metadata.yml +5 -0
- data/examples/rango/spec/pupu_spec.rb +37 -0
- data/examples/rango/spec/spec_helper.rb +15 -0
- data/examples/{blog → rango}/templates/base.html.haml +2 -3
- data/examples/rango/templates/examples/arguments.html.haml +7 -0
- data/examples/{blog → rango}/templates/examples/base.html.haml +3 -3
- data/examples/{blog → rango}/templates/examples/dependencies.html.haml +1 -1
- data/examples/{blog → rango}/templates/examples/simple.html.haml +1 -1
- data/examples/{blog → rango}/templates/index.html.haml +0 -0
- data/lib/pupu.rb +1 -1
- data/lib/pupu/adapters/merb.rb +4 -10
- data/lib/pupu/adapters/rails.rb +6 -0
- data/lib/pupu/adapters/rango.rb +0 -1
- data/lib/pupu/cli.rb +7 -3
- data/lib/pupu/github.rb +1 -1
- data/pupu.pre.gemspec +44 -0
- data/script/spec +2 -0
- data/tasks/benchmark.rake +11 -0
- data/tasks/gem.rake +23 -0
- data/tasks/hooks.rake +12 -0
- data/tasks/release.rake +68 -0
- data/tasks/spec.rake +27 -0
- data/tasks/submodules.rake +33 -0
- data/tasks/yardoc.rake +9 -0
- metadata +227 -115
- data/examples/blog/Thorfile +0 -9
- data/examples/blog/bin/pupu +0 -4
- data/examples/blog/config/pupu.rb +0 -4
- data/examples/blog/templates/examples/arguments.html.haml +0 -7
- data/url.rb +0 -20
- data/url_spec.rb +0 -35
@@ -0,0 +1,31 @@
|
|
1
|
+
/**
|
2
|
+
* Autocompleter.Local
|
3
|
+
*
|
4
|
+
* http://digitarald.de/project/autocompleter/
|
5
|
+
*
|
6
|
+
* @version 1.1.2
|
7
|
+
*
|
8
|
+
* @license MIT-style license
|
9
|
+
* @author Harald Kirschner <mail [at] digitarald.de>
|
10
|
+
* @copyright Author
|
11
|
+
*/
|
12
|
+
|
13
|
+
Autocompleter.Local = new Class({
|
14
|
+
|
15
|
+
Extends: Autocompleter,
|
16
|
+
|
17
|
+
options: {
|
18
|
+
minLength: 0,
|
19
|
+
delay: 200
|
20
|
+
},
|
21
|
+
|
22
|
+
initialize: function(element, tokens, options) {
|
23
|
+
this.parent(element, options);
|
24
|
+
this.tokens = tokens;
|
25
|
+
},
|
26
|
+
|
27
|
+
query: function() {
|
28
|
+
this.update(this.filter());
|
29
|
+
}
|
30
|
+
|
31
|
+
});
|
@@ -0,0 +1,109 @@
|
|
1
|
+
/**
|
2
|
+
* Autocompleter.Request
|
3
|
+
*
|
4
|
+
* http://digitarald.de/project/autocompleter/
|
5
|
+
*
|
6
|
+
* @version 1.1.2
|
7
|
+
*
|
8
|
+
* @license MIT-style license
|
9
|
+
* @author Harald Kirschner <mail [at] digitarald.de>
|
10
|
+
* @copyright Author
|
11
|
+
*/
|
12
|
+
|
13
|
+
Autocompleter.Request = new Class({
|
14
|
+
|
15
|
+
Extends: Autocompleter,
|
16
|
+
|
17
|
+
options: {/*
|
18
|
+
indicator: null,
|
19
|
+
indicatorClass: null,
|
20
|
+
onRequest: $empty,
|
21
|
+
onComplete: $empty,*/
|
22
|
+
postData: {},
|
23
|
+
ajaxOptions: {},
|
24
|
+
postVar: 'value'
|
25
|
+
|
26
|
+
},
|
27
|
+
|
28
|
+
query: function(){
|
29
|
+
var data = $unlink(this.options.postData) || {};
|
30
|
+
data[this.options.postVar] = this.queryValue;
|
31
|
+
var indicator = $(this.options.indicator);
|
32
|
+
if (indicator) indicator.setStyle('display', '');
|
33
|
+
var cls = this.options.indicatorClass;
|
34
|
+
if (cls) this.element.addClass(cls);
|
35
|
+
this.fireEvent('onRequest', [this.element, this.request, data, this.queryValue]);
|
36
|
+
this.request.send({'data': data});
|
37
|
+
},
|
38
|
+
|
39
|
+
/**
|
40
|
+
* queryResponse - abstract
|
41
|
+
*
|
42
|
+
* Inherated classes have to extend this function and use this.parent()
|
43
|
+
*/
|
44
|
+
queryResponse: function() {
|
45
|
+
var indicator = $(this.options.indicator);
|
46
|
+
if (indicator) indicator.setStyle('display', 'none');
|
47
|
+
var cls = this.options.indicatorClass;
|
48
|
+
if (cls) this.element.removeClass(cls);
|
49
|
+
return this.fireEvent('onComplete', [this.element, this.request]);
|
50
|
+
}
|
51
|
+
|
52
|
+
});
|
53
|
+
|
54
|
+
Autocompleter.Request.JSON = new Class({
|
55
|
+
|
56
|
+
Extends: Autocompleter.Request,
|
57
|
+
|
58
|
+
initialize: function(el, url, options) {
|
59
|
+
this.parent(el, options);
|
60
|
+
this.request = new Request.JSON($merge({
|
61
|
+
'url': url,
|
62
|
+
'link': 'cancel'
|
63
|
+
}, this.options.ajaxOptions)).addEvent('onComplete', this.queryResponse.bind(this));
|
64
|
+
},
|
65
|
+
|
66
|
+
queryResponse: function(response) {
|
67
|
+
this.parent();
|
68
|
+
this.update(response);
|
69
|
+
}
|
70
|
+
|
71
|
+
});
|
72
|
+
|
73
|
+
Autocompleter.Request.HTML = new Class({
|
74
|
+
|
75
|
+
Extends: Autocompleter.Request,
|
76
|
+
|
77
|
+
initialize: function(el, url, options) {
|
78
|
+
this.parent(el, options);
|
79
|
+
this.request = new Request.HTML($merge({
|
80
|
+
'url': url,
|
81
|
+
'link': 'cancel',
|
82
|
+
'update': this.choices
|
83
|
+
}, this.options.ajaxOptions)).addEvent('onComplete', this.queryResponse.bind(this));
|
84
|
+
},
|
85
|
+
|
86
|
+
queryResponse: function(tree, elements) {
|
87
|
+
this.parent();
|
88
|
+
if (!elements || !elements.length) {
|
89
|
+
this.hideChoices();
|
90
|
+
} else {
|
91
|
+
this.choices.getChildren(this.options.choicesMatch).each(this.options.injectChoice || function(choice) {
|
92
|
+
var value = choice.innerHTML;
|
93
|
+
choice.inputValue = value;
|
94
|
+
this.addChoiceEvents(choice.set('html', this.markQueryValue(value)));
|
95
|
+
}, this);
|
96
|
+
this.showChoices();
|
97
|
+
}
|
98
|
+
|
99
|
+
}
|
100
|
+
|
101
|
+
});
|
102
|
+
|
103
|
+
/* compatibility */
|
104
|
+
|
105
|
+
Autocompleter.Ajax = {
|
106
|
+
Base: Autocompleter.Request,
|
107
|
+
Json: Autocompleter.Request.JSON,
|
108
|
+
Xhtml: Autocompleter.Request.HTML
|
109
|
+
};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
window.addEvent("domready", function() {
|
2
|
+
// initialization
|
3
|
+
var url = "/search/autocomplete";
|
4
|
+
var id = "search";
|
5
|
+
|
6
|
+
// the code
|
7
|
+
if ($(id)) {
|
8
|
+
new Autocompleter.Request.HTML(id, url, {
|
9
|
+
'selectMode': 'type-ahead',
|
10
|
+
'indicatorClass': 'autocompleter-loading',
|
11
|
+
'minLength': 1,
|
12
|
+
'injectChoice': function(choice) {
|
13
|
+
// choice is one <li> element
|
14
|
+
var text = choice.getFirst();
|
15
|
+
// the first element in this <li> is the <span> with the text
|
16
|
+
var value = text.innerHTML;
|
17
|
+
// inputValue saves value of the element for later selection
|
18
|
+
choice.inputValue = value;
|
19
|
+
// overrides the html with the marked query value (wrapped in a <span>)
|
20
|
+
text.set('html', this.markQueryValue(value));
|
21
|
+
// add the mouse events to the <li> element
|
22
|
+
this.addChoiceEvents(choice);
|
23
|
+
}
|
24
|
+
})
|
25
|
+
}
|
26
|
+
})
|
@@ -0,0 +1,69 @@
|
|
1
|
+
/**
|
2
|
+
* Observer - Observe formelements for changes
|
3
|
+
*
|
4
|
+
* - Additional code from clientside.cnet.com
|
5
|
+
*
|
6
|
+
* @version 1.1
|
7
|
+
*
|
8
|
+
* @license MIT-style license
|
9
|
+
* @author Harald Kirschner <mail [at] digitarald.de>
|
10
|
+
* @copyright Author
|
11
|
+
*/
|
12
|
+
var Observer = new Class({
|
13
|
+
|
14
|
+
Implements: [Options, Events],
|
15
|
+
|
16
|
+
options: {
|
17
|
+
periodical: false,
|
18
|
+
delay: 1000
|
19
|
+
},
|
20
|
+
|
21
|
+
initialize: function(el, onFired, options){
|
22
|
+
this.element = $(el) || $$(el);
|
23
|
+
this.addEvent('onFired', onFired);
|
24
|
+
this.setOptions(options);
|
25
|
+
this.bound = this.changed.bind(this);
|
26
|
+
this.resume();
|
27
|
+
},
|
28
|
+
|
29
|
+
changed: function() {
|
30
|
+
var value = this.element.get('value');
|
31
|
+
if ($equals(this.value, value)) return;
|
32
|
+
this.clear();
|
33
|
+
this.value = value;
|
34
|
+
this.timeout = this.onFired.delay(this.options.delay, this);
|
35
|
+
},
|
36
|
+
|
37
|
+
setValue: function(value) {
|
38
|
+
this.value = value;
|
39
|
+
this.element.set('value', value);
|
40
|
+
return this.clear();
|
41
|
+
},
|
42
|
+
|
43
|
+
onFired: function() {
|
44
|
+
this.fireEvent('onFired', [this.value, this.element]);
|
45
|
+
},
|
46
|
+
|
47
|
+
clear: function() {
|
48
|
+
$clear(this.timeout || null);
|
49
|
+
return this;
|
50
|
+
},
|
51
|
+
|
52
|
+
pause: function(){
|
53
|
+
if (this.timer) $clear(this.timer);
|
54
|
+
else this.element.removeEvent('keyup', this.bound);
|
55
|
+
return this.clear();
|
56
|
+
},
|
57
|
+
|
58
|
+
resume: function(){
|
59
|
+
this.value = this.element.get('value');
|
60
|
+
if (this.options.periodical) this.timer = this.changed.periodical(this.options.periodical, this);
|
61
|
+
else this.element.addEvent('keyup', this.bound);
|
62
|
+
return this;
|
63
|
+
}
|
64
|
+
|
65
|
+
});
|
66
|
+
|
67
|
+
var $equals = function(obj1, obj2) {
|
68
|
+
return (obj1 == obj2 || JSON.encode(obj1) == JSON.encode(obj2));
|
69
|
+
};
|
@@ -0,0 +1,68 @@
|
|
1
|
+
ul.autocompleter-choices
|
2
|
+
{
|
3
|
+
position: absolute;
|
4
|
+
margin: 0;
|
5
|
+
padding: 0;
|
6
|
+
list-style: none;
|
7
|
+
border: 1px solid #7c7c7c;
|
8
|
+
border-left-color: #c3c3c3;
|
9
|
+
border-right-color: #c3c3c3;
|
10
|
+
border-bottom-color: #ddd;
|
11
|
+
background-color: #fff;
|
12
|
+
text-align: left;
|
13
|
+
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
|
14
|
+
z-index: 50;
|
15
|
+
background-color: #fff;
|
16
|
+
}
|
17
|
+
|
18
|
+
ul.autocompleter-choices li
|
19
|
+
{
|
20
|
+
position: relative;
|
21
|
+
margin: -2px 0 0 0;
|
22
|
+
padding: 0.2em 1.5em 0.2em 1em;
|
23
|
+
display: block;
|
24
|
+
float: none !important;
|
25
|
+
cursor: pointer;
|
26
|
+
font-weight: normal;
|
27
|
+
white-space: nowrap;
|
28
|
+
font-size: 1em;
|
29
|
+
line-height: 1.5em;
|
30
|
+
}
|
31
|
+
|
32
|
+
ul.autocompleter-choices li.autocompleter-selected
|
33
|
+
{
|
34
|
+
background-color: #444;
|
35
|
+
color: #fff;
|
36
|
+
}
|
37
|
+
|
38
|
+
ul.autocompleter-choices span.autocompleter-queried
|
39
|
+
{
|
40
|
+
display: inline;
|
41
|
+
float: none;
|
42
|
+
font-weight: bold;
|
43
|
+
margin: 0;
|
44
|
+
padding: 0;
|
45
|
+
}
|
46
|
+
|
47
|
+
ul.autocompleter-choices li.autocompleter-selected span.autocompleter-queried
|
48
|
+
{
|
49
|
+
color: #9FCFFF;
|
50
|
+
}
|
51
|
+
|
52
|
+
/* the right side of the autocompleter */
|
53
|
+
.autocompleter-note
|
54
|
+
{
|
55
|
+
position: absolute;
|
56
|
+
top: 0;
|
57
|
+
right: 4px;
|
58
|
+
padding: 1px 2px;
|
59
|
+
font-size: 0.9em;
|
60
|
+
color: #888;
|
61
|
+
}
|
62
|
+
|
63
|
+
input.autocompleter-loading
|
64
|
+
{
|
65
|
+
background-image: url(/pupu/autocompleter/images/spinner.gif);
|
66
|
+
background-repeat: no-repeat;
|
67
|
+
background-position: right 50%;
|
68
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
[12/2/2008] First public release
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2008 Jakub Stastny aka Botanicus
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,22 @@
|
|
1
|
+
h1. About merb_pupu
|
2
|
+
|
3
|
+
Merb_pupu is a plugin system for merb's public stuff like mootools plugins, icon sets etc. It knows dependencies and it has CLI interface, so it's really easy to bundle such plugins into your app. Please see http://github.com/botanicus/merb_pupu for more informations.
|
4
|
+
|
5
|
+
h1. About blueprint
|
6
|
+
|
7
|
+
h1. Usage
|
8
|
+
|
9
|
+
h2. Layout
|
10
|
+
|
11
|
+
<pre>
|
12
|
+
# for basic functionality
|
13
|
+
plugin :blueprint
|
14
|
+
</pre>
|
15
|
+
|
16
|
+
h2. Initializers
|
17
|
+
|
18
|
+
<pre>
|
19
|
+
window.addEvent("domready", function() {
|
20
|
+
// do the init stuff
|
21
|
+
})
|
22
|
+
</pre>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
namespace :git do
|
2
|
+
desc "Do the initial import"
|
3
|
+
task :init do
|
4
|
+
sh "git init"
|
5
|
+
sh "git add ."
|
6
|
+
sh "git commit -a -m 'Initial import'"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
namespace :javascripts do
|
11
|
+
desc "Compress javascripts"
|
12
|
+
task :compress do
|
13
|
+
puts "This task isn't ready yet."
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
namespace :stylesheets do
|
18
|
+
desc "Compress stylesheets"
|
19
|
+
task :compress do
|
20
|
+
puts "This task isn't ready yet."
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
namespace :sass do
|
25
|
+
desc "Compile Sass templates"
|
26
|
+
task :compile do
|
27
|
+
puts "This task isn't ready yet."
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# css_include_tag "blueprint/screen", "blueprint/plugins/fancy-type/screen", :media => "screen, projection"
|
2
|
+
# css_include_tag "blueprint/print", :media => "print"
|
3
|
+
# / [if IE]
|
4
|
+
# = css_include_tag "blueprint/ie", :media => "screen, projection"
|
5
|
+
|
6
|
+
# TODO
|
7
|
+
# :if => "ie"
|
8
|
+
stylesheet "screen", :media => "screen, projection"
|
9
|
+
stylesheet "print", :media => "print"
|
10
|
+
stylesheet "ie"
|
11
|
+
|
12
|
+
# parameters of plugin
|
13
|
+
# it will be blank in most cases
|
14
|
+
parameter :plugins do |plugins|
|
15
|
+
plugins.each do |plugin|
|
16
|
+
stylesheet "plugins/#{plugin}/screen", :media => "screen, projection"
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/* -----------------------------------------------------------------------
|
2
|
+
|
3
|
+
|
4
|
+
Blueprint CSS Framework 0.8
|
5
|
+
http://blueprintcss.org
|
6
|
+
|
7
|
+
* Copyright (c) 2007-Present. See LICENSE for more info.
|
8
|
+
* See README for instructions on how to use Blueprint.
|
9
|
+
* For credits and origins, see AUTHORS.
|
10
|
+
* This is a compressed file. See the sources in the 'src' directory.
|
11
|
+
|
12
|
+
----------------------------------------------------------------------- */
|
13
|
+
|
14
|
+
/* ie.css */
|
15
|
+
body {text-align:center;}
|
16
|
+
.container {text-align:left;}
|
17
|
+
* html .column, * html div.span-1, * html div.span-2, * html div.span-3, * html div.span-4, * html div.span-5, * html div.span-6, * html div.span-7, * html div.span-8, * html div.span-9, * html div.span-10, * html div.span-11, * html div.span-12, * html div.span-13, * html div.span-14, * html div.span-15, * html div.span-16, * html div.span-17, * html div.span-18, * html div.span-19, * html div.span-20, * html div.span-21, * html div.span-22, * html div.span-23, * html div.span-24 {overflow-x:hidden;}
|
18
|
+
* html legend {margin:-18px -8px 16px 0;padding:0;}
|
19
|
+
ol {margin-left:2em;}
|
20
|
+
sup {vertical-align:text-top;}
|
21
|
+
sub {vertical-align:text-bottom;}
|
22
|
+
html>body p code {*white-space:normal;}
|
23
|
+
hr {margin:-8px auto 11px;}
|
24
|
+
.clearfix, .container {display:inline-block;}
|
25
|
+
* html .clearfix, * html .container {height:1%;}
|
26
|
+
fieldset {padding-top:0;}
|