eita-jrails 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -0
  3. data/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  4. data/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  5. data/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  6. data/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  7. data/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  8. data/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  9. data/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  10. data/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  11. data/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  12. data/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  13. data/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  14. data/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  15. data/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  16. data/assets/javascripts/jquery/jquery-ui-i18n.js +1379 -0
  17. data/assets/javascripts/jquery/jquery-ui-i18n.min.js +33 -0
  18. data/assets/javascripts/jrails/jrails.js +0 -12
  19. data/assets/stylesheets/smoothness/jquery-ui.css +573 -0
  20. data/lib/action_view/helpers/generator.rb +336 -0
  21. data/lib/action_view/helpers/jquery_helper.rb +558 -0
  22. data/lib/action_view/helpers/jquery_ui_helper.rb +165 -0
  23. data/lib/action_view/helpers/proxies.rb +187 -0
  24. data/lib/action_view/helpers/scriptaculous_helper.rb +263 -0
  25. data/lib/action_view/template/handlers/rjs.rb +14 -0
  26. data/lib/jrails.rb +3 -7
  27. data/lib/jrails/engine.rb +26 -0
  28. data/lib/jrails/javascript_helper.rb +97 -0
  29. data/lib/jrails/on_load_action_controller.rb +2 -0
  30. data/lib/jrails/on_load_action_view.rb +26 -0
  31. data/lib/jrails/renderers.rb +12 -0
  32. data/lib/jrails/rendering.rb +13 -0
  33. data/lib/jrails/selector_assertions.rb +211 -0
  34. metadata +37 -12
  35. data/README.rdoc +0 -27
  36. data/init.rb +0 -3
  37. data/install.rb +0 -2
  38. data/lib/jrails/jquery_selector_assertions.rb +0 -60
@@ -1,27 +0,0 @@
1
- = jRails
2
-
3
- jRails is a drop-in jQuery replacement for the Rails Prototype/script.aculo.us helpers.
4
-
5
- == Resources
6
-
7
- Install
8
-
9
- * .script/plugin install git://github.com/aaronchi/jrails.git
10
-
11
- Init initial resource
12
- * .script/generator jrails
13
- * rake jrails:js:scrub # remove about prototype.js files
14
-
15
-
16
-
17
- Project Site
18
-
19
- * http://code.google.com/p/ennerchi
20
-
21
- Web Site
22
-
23
- * http://www.ennerchi.com/projects/jrails
24
-
25
- Group Site
26
-
27
- * http://groups.google.com/group/jrails
data/init.rb DELETED
@@ -1,3 +0,0 @@
1
- $: << File.expand_path("..", __FILE__)
2
-
3
- require "lib/jrails"
data/install.rb DELETED
@@ -1,2 +0,0 @@
1
- # Install hook code here
2
- puts "If you want to use 'jquery', execute \n\t ./script/generate jrails"
@@ -1,60 +0,0 @@
1
- #
2
- # jQuery Selector Assertions (modifications to the prototype/scriptaculous assertions)
3
- #
4
- # From http://pastie.org/303776
5
- #
6
- # 1. Make sure to use '#' prefix when referring to element IDs in assert_select_rjs(),
7
- # like this:
8
- # assert_select_rjs :replace_html, '#someid'
9
- # instead of prototype convention:
10
- # assert_select_rjs :replace_html, 'someid'
11
- #
12
- # We monkey-patch some RJS-matching constants for assert_select_rjs to work
13
- # with jQuery-based code as opposed to Prototype's:
14
- #
15
- #
16
- module JRailsTest
17
- module SelectorAssertions
18
- def self.included(base)
19
- self.constants.each do |cnst|
20
- if base.const_defined? cnst
21
- base.send(:remove_const,cnst)
22
- end
23
- end
24
- end
25
-
26
- silence_warnings do
27
- RJS_PATTERN_HTML = "\"((\\\\\"|[^\"])*)\""
28
- RJS_ANY_ID = "[\"']([^\"])*[\"']"
29
-
30
- RJS_STATEMENTS = {
31
- :chained_replace => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.replaceWith\\(#{RJS_PATTERN_HTML}\\)",
32
- :chained_replace_html => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.updateWith\\(#{RJS_PATTERN_HTML}\\)",
33
- :replace_html => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.html\\(#{RJS_PATTERN_HTML}\\)",
34
- :replace => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.replaceWith\\(#{RJS_PATTERN_HTML}\\)",
35
- :insert_top => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.prepend\\(#{RJS_PATTERN_HTML}\\)",
36
- :insert_bottom => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.append\\(#{RJS_PATTERN_HTML}\\)",
37
- :effect => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.effect\\(",
38
- :highlight => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.effect\\('highlight'"
39
- }
40
-
41
- [:remove, :show, :hide, :toggle, :reset ].each do |action|
42
- RJS_STATEMENTS[action] = "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.#{action}\\(\\)"
43
- end
44
-
45
- RJS_STATEMENTS[:any] = Regexp.new("(#{RJS_STATEMENTS.values.join('|')})")
46
- RJS_PATTERN_UNICODE_ESCAPED_CHAR = /\\u([0-9a-zA-Z]{4})/
47
- end
48
- end
49
- end
50
-
51
- if (defined? ActionController::Assertions)
52
- module ActionController::Assertions::SelectorAssertions
53
- include JRailsTest::SelectorAssertions
54
- end
55
- else
56
- module ActionDispatch::Assertions::SelectorAssertions
57
- include JRailsTest::SelectorAssertions
58
- end
59
- end
60
-