compass-jquery-plugin 0.3.2.1 → 0.3.2.2
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.
- data/README.md +13 -6
- data/VERSION.yml +1 -1
- data/lib/handle_attributes.rb +23 -23
- data/lib/handle_js_files.rb +1 -1
- data/lib/jquery/compass_plugin.rb +5 -5
- data/lib/jquery/dynatree.rb +5 -5
- data/lib/jquery/jqtouch.rb +3 -3
- data/lib/jquery/jquery_auto_complete.rb +44 -44
- data/lib/jquery/jquery_selector_assertions.rb +78 -78
- data/lib/jquery/jstree.rb +4 -4
- data/lib/jquery/ribbon.rb +5 -5
- data/templates/jqtouch/jquery.jqtouch.min.js +2 -2
- data/templates/jquery/config/initializers/jquery.rb +2 -0
- data/templates/jquery/jquery.dotimeout.js +285 -0
- data/templates/jquery/jquery.dotimeout.min.js +2 -0
- data/templates/jquery/jquery.dst.js +154 -0
- data/templates/jquery/jquery.dst.min.js +4 -0
- data/templates/jquery/jquery.form.js +48 -36
- data/templates/jquery/jquery.form.min.js +15 -14
- data/templates/jquery/manifest.rb +4 -0
- data/templates/mobile/jquery/mobile/_base.scss +35 -20
- data/templates/mobile/jquery/mobile/default/icons-18-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-18-white.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-36-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-36-white.png +0 -0
- data/templates/mobile/jquery/mobile/default.scss +8 -2
- data/templates/mobile/jquery/mobile/valencia/icons-18-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-18-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-36-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-36-white.png +0 -0
- data/templates/mobile/jquery.mobile.js +29 -26
- data/templates/mobile/jquery.mobile.min.js +6 -6
- metadata +8 -4
data/README.md
CHANGED
@@ -15,8 +15,11 @@ A Sass-based Meta-Framework for Compass that allows you to mix and match any of
|
|
15
15
|
* jquery.jstree.js V1.0rc3
|
16
16
|
* jquery.dynatree.js V1.0.2
|
17
17
|
* jquery.ribbon.js
|
18
|
-
* jquery.jqGrid.js V3.8.2 (with minor changes to make
|
19
|
-
|
18
|
+
* jquery.jqGrid.js V3.8.2 (with minor changes to make it RESTful)
|
19
|
+
|
20
|
+
and for mobile devices <i>(using pure haml/sass without compass)</i>:
|
21
|
+
|
22
|
+
* jquery.mobile.js 1.0a3
|
20
23
|
* jquery.jqtouch.js V1.0b2
|
21
24
|
|
22
25
|
This library requires [Compass][3].
|
@@ -25,7 +28,7 @@ For the moment this plugin supports Rails 2.3.
|
|
25
28
|
|
26
29
|
An upgrade to Rails 3.x is planned, but depends on the upgrade of compass which actually has alpha state.
|
27
30
|
|
28
|
-
*Hint: When trying to build the gem under Windows, bundler can't locate the
|
31
|
+
*Hint: When trying to build the gem under Windows, bundler can't locate the rakefile. Apply the patch from [Arve Knudsen][4] to fix it.*
|
29
32
|
|
30
33
|
jRails, jQuery and jQuery.UI including themes
|
31
34
|
---------------------------------------------
|
@@ -235,13 +238,15 @@ jQuery Plugins included:
|
|
235
238
|
|
236
239
|
* Chris Domigan for [jQuery ContextMenu Plugin][13]
|
237
240
|
* Kalus Hartl for [jQuery Cookie Plugin][14]
|
241
|
+
* "Cowboy" Ben Alman for [jQuery doTimeout Plugin][37]
|
242
|
+
* Pete Gamache for [jQuery DSt Plugin][38]
|
238
243
|
* Martin Wendt for [jQuery Dynatree Plugin][15]
|
239
244
|
* John Reisig et. al. for [jQuery Form Plugin][16]
|
240
245
|
* Tony Tomov for [jQuery Grid Plugin][17]
|
241
246
|
* Tim Caswell for [jQuery haml Plugin][18]
|
242
247
|
* Takayuki Miwa for [jQuery history plugin][19]
|
243
248
|
* Ivan Bozhanov for [jQuery jsTree Plugin][20]
|
244
|
-
* Fabrizio Balliano and
|
249
|
+
* Fabrizio Balliano and Kevin Dalman for [jQuery Layout Plugin][21]
|
245
250
|
* Brandon Aaron and Fabrizio Balliano for [jQuery Mousewheel Plugin][21]
|
246
251
|
* Yehuda Katz for [jQuery Offline Plugin][34]
|
247
252
|
* Andreas Eberhard for [jQuery PngFix Plugin][22] (for IE)
|
@@ -300,11 +305,11 @@ Copyright © 2009-2011 Kosmas Schuetz. See LICENSE for details.
|
|
300
305
|
[19]: http://tkyk.github.com/jquery-history-plugin/
|
301
306
|
[20]: http://jstree.com/
|
302
307
|
[21]: http://www.fabrizioballiano.net/
|
303
|
-
[22]:
|
308
|
+
[22]: http://jquery.andreaseberhard.de/
|
304
309
|
[23]: http://jqueryribbon.codeplex.com/
|
305
310
|
[24]: http://omnipotent.net/jquery.sparkline/
|
306
311
|
[25]: http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/
|
307
|
-
[26]:
|
312
|
+
[26]: http://github.com/jquery/jquery-tmpl/
|
308
313
|
[27]: http://github.com/jquerytools/jquerytools
|
309
314
|
[28]: http://quasipartikel.at
|
310
315
|
[29]: http://www.ama3.com/anytime/
|
@@ -315,4 +320,6 @@ Copyright © 2009-2011 Kosmas Schuetz. See LICENSE for details.
|
|
315
320
|
[34]: http://github.com/wycats/jquery-offline
|
316
321
|
[35]: http://github.com/brandonaaron/jquery-mousewheel
|
317
322
|
[36]: http://github.com/cowboy/jquery-replacetext
|
323
|
+
[37]: http://github.com/cowboy/jquery-dotimeout
|
324
|
+
[38]: http://github.com/gamache/DSt
|
318
325
|
|
data/VERSION.yml
CHANGED
data/lib/handle_attributes.rb
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
module HandleAttributes
|
2
|
-
private
|
3
|
-
|
4
|
-
def get_atr_value(elem, atr, couples)
|
5
|
-
if atr.to_s.include?('.')
|
6
|
-
value = get_nested_atr_value(elem, atr.to_s.split('.').reverse)
|
7
|
-
else
|
8
|
-
value = couples[atr]
|
9
|
-
value = elem.send(atr.to_sym) if value.blank? && elem.respond_to?(atr) # Required for virtual attributes
|
10
|
-
end
|
11
|
-
value
|
12
|
-
end
|
13
|
-
|
14
|
-
def get_nested_atr_value(elem, hierarchy)
|
15
|
-
return nil if hierarchy.size == 0
|
16
|
-
atr = hierarchy.pop
|
17
|
-
raise ArgumentError, "#{atr} doesn't exist on #{elem.inspect}" unless elem.respond_to?(atr)
|
18
|
-
nested_elem = elem.send(atr)
|
19
|
-
return "" if nested_elem.nil?
|
20
|
-
value = get_nested_atr_value(nested_elem, hierarchy)
|
21
|
-
value.nil? ? nested_elem : value
|
22
|
-
end
|
23
|
-
end
|
1
|
+
module HandleAttributes
|
2
|
+
private
|
3
|
+
|
4
|
+
def get_atr_value(elem, atr, couples)
|
5
|
+
if atr.to_s.include?('.')
|
6
|
+
value = get_nested_atr_value(elem, atr.to_s.split('.').reverse)
|
7
|
+
else
|
8
|
+
value = couples[atr]
|
9
|
+
value = elem.send(atr.to_sym) if value.blank? && elem.respond_to?(atr) # Required for virtual attributes
|
10
|
+
end
|
11
|
+
value
|
12
|
+
end
|
13
|
+
|
14
|
+
def get_nested_atr_value(elem, hierarchy)
|
15
|
+
return nil if hierarchy.size == 0
|
16
|
+
atr = hierarchy.pop
|
17
|
+
raise ArgumentError, "#{atr} doesn't exist on #{elem.inspect}" unless elem.respond_to?(atr)
|
18
|
+
nested_elem = elem.send(atr)
|
19
|
+
return "" if nested_elem.nil?
|
20
|
+
value = get_nested_atr_value(nested_elem, hierarchy)
|
21
|
+
value.nil? ? nested_elem : value
|
22
|
+
end
|
23
|
+
end
|
data/lib/handle_js_files.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
GEM_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
2
2
|
GOOGLE_JS_COMPRESSOR = File.join(GEM_ROOT, 'lib', 'google-compiler-20100917.jar')
|
3
|
-
YUI_JS_COMPRESSOR = File.join(GEM_ROOT, 'lib', 'yuicompressor-2.4.
|
3
|
+
YUI_JS_COMPRESSOR = File.join(GEM_ROOT, 'lib', 'yuicompressor-2.4.4.jar')
|
4
4
|
|
5
5
|
def compress_js(scripts, compressor)
|
6
6
|
min_js = ''
|
@@ -1,5 +1,5 @@
|
|
1
|
-
options = Hash.new
|
2
|
-
options[:stylesheets_directory] = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'sass'))
|
3
|
-
options[:templates_directory] = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'templates'))
|
4
|
-
|
5
|
-
Compass::Frameworks.register('jquery', options)
|
1
|
+
options = Hash.new
|
2
|
+
options[:stylesheets_directory] = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'sass'))
|
3
|
+
options[:templates_directory] = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'templates'))
|
4
|
+
|
5
|
+
Compass::Frameworks.register('jquery', options)
|
data/lib/jquery/dynatree.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
module ActionView
|
2
|
-
module Helpers
|
3
|
-
|
4
|
-
end
|
5
|
-
end
|
1
|
+
module ActionView
|
2
|
+
module Helpers
|
3
|
+
|
4
|
+
end
|
5
|
+
end
|
data/lib/jquery/jqtouch.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
module JqTouch#:nodoc:
|
2
|
-
end
|
3
|
-
|
1
|
+
module JqTouch#:nodoc:
|
2
|
+
end
|
3
|
+
|
4
4
|
#require 'jquery/jqtouch/controller/ui_dialog_controls'
|
@@ -1,44 +1,44 @@
|
|
1
|
-
module JqueryAutoComplete
|
2
|
-
|
3
|
-
def self.included(base)
|
4
|
-
base.extend(ClassMethods)
|
5
|
-
end
|
6
|
-
|
7
|
-
module ClassMethods
|
8
|
-
def auto_complete_for(object, method, options = {})
|
9
|
-
define_method("auto_complete_for_#{object}_#{method}") do
|
10
|
-
object_constant = object.to_s.camelize.constantize
|
11
|
-
|
12
|
-
find_options = {
|
13
|
-
:conditions => [ "LOWER(#{method}) LIKE ?", '%' + params[:term].downcase + '%' ],
|
14
|
-
:order => "#{method} ASC",
|
15
|
-
:limit => 10 }.merge!(options)
|
16
|
-
|
17
|
-
render :json => object_constant.to_auto_complete(:json, find_options)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
module JqueryAutoCompleteJson
|
24
|
-
include ActionView::Helpers::JavaScriptHelper
|
25
|
-
include HandleAttributes
|
26
|
-
|
27
|
-
def to_auto_complete(format, attributes)
|
28
|
-
case format
|
29
|
-
when :json
|
30
|
-
json = %Q([)
|
31
|
-
each do |elem|
|
32
|
-
couples = elem.attributes.symbolize_keys
|
33
|
-
json << %Q({ "id": "#{get_atr_value(elem, attributes[0], couples)}",)
|
34
|
-
json << %Q( "label": "#{get_atr_value(elem, attributes[1], couples)}",)
|
35
|
-
json << %Q( "value": "#{get_atr_value(elem, attributes[2], couples).gsub(/<\/?[^>]*>/, "")}" },)
|
36
|
-
end
|
37
|
-
json.chop! << " ]"
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
class Array
|
43
|
-
include JqueryAutoCompleteJson
|
44
|
-
end
|
1
|
+
module JqueryAutoComplete
|
2
|
+
|
3
|
+
def self.included(base)
|
4
|
+
base.extend(ClassMethods)
|
5
|
+
end
|
6
|
+
|
7
|
+
module ClassMethods
|
8
|
+
def auto_complete_for(object, method, options = {})
|
9
|
+
define_method("auto_complete_for_#{object}_#{method}") do
|
10
|
+
object_constant = object.to_s.camelize.constantize
|
11
|
+
|
12
|
+
find_options = {
|
13
|
+
:conditions => [ "LOWER(#{method}) LIKE ?", '%' + params[:term].downcase + '%' ],
|
14
|
+
:order => "#{method} ASC",
|
15
|
+
:limit => 10 }.merge!(options)
|
16
|
+
|
17
|
+
render :json => object_constant.to_auto_complete(:json, find_options)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
module JqueryAutoCompleteJson
|
24
|
+
include ActionView::Helpers::JavaScriptHelper
|
25
|
+
include HandleAttributes
|
26
|
+
|
27
|
+
def to_auto_complete(format, attributes)
|
28
|
+
case format
|
29
|
+
when :json
|
30
|
+
json = %Q([)
|
31
|
+
each do |elem|
|
32
|
+
couples = elem.attributes.symbolize_keys
|
33
|
+
json << %Q({ "id": "#{get_atr_value(elem, attributes[0], couples)}",)
|
34
|
+
json << %Q( "label": "#{get_atr_value(elem, attributes[1], couples)}",)
|
35
|
+
json << %Q( "value": "#{get_atr_value(elem, attributes[2], couples).gsub(/<\/?[^>]*>/, "")}" },)
|
36
|
+
end
|
37
|
+
json.chop! << " ]"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
class Array
|
43
|
+
include JqueryAutoCompleteJson
|
44
|
+
end
|
@@ -1,78 +1,78 @@
|
|
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
|
-
module ActionController
|
16
|
-
module Assertions
|
17
|
-
module SelectorAssertions
|
18
|
-
silence_warnings do
|
19
|
-
RJS_PATTERN_HTML = "\"((\\\\\"|[^\"])*)\""
|
20
|
-
# RJS_ANY_ID = "\"([^\"])*\""
|
21
|
-
# better match with single or double quoted ids
|
22
|
-
RJS_ANY_ID = "[\"']([^\"])*[\"']"
|
23
|
-
|
24
|
-
RJS_STATEMENTS = {
|
25
|
-
:chained_replace => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.replaceWith\\(#{RJS_PATTERN_HTML}\\)",
|
26
|
-
:chained_replace_html => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.updateWith\\(#{RJS_PATTERN_HTML}\\)",
|
27
|
-
:replace_html => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.html\\(#{RJS_PATTERN_HTML}\\)",
|
28
|
-
:replace => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.replaceWith\\(#{RJS_PATTERN_HTML}\\)",
|
29
|
-
:insert_top => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.prepend\\(#{RJS_PATTERN_HTML}\\)",
|
30
|
-
:insert_bottom => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.append\\(#{RJS_PATTERN_HTML}\\)",
|
31
|
-
:effect => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.effect\\(",
|
32
|
-
:highlight => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.effect\\('highlight'"
|
33
|
-
|
34
|
-
=begin TODO:
|
35
|
-
|
36
|
-
I've never used the chained_* so I don't know if they work.
|
37
|
-
|
38
|
-
I couldn't seem to get assert_select_rjs to actually match the single quoted ids
|
39
|
-
which are created by some of the effects like ...
|
40
|
-
... jQuery('#item_1559').effect('highlight',{},1000);
|
41
|
-
so I modified jrails/lib/jrails.rb line 337
|
42
|
-
... javascript = "#{JQUERY_VAR}('#{jquery_id(element_id)}').#{mode || 'effect'}('#{name}'"
|
43
|
-
to
|
44
|
-
... javascript = "#{JQUERY_VAR}(\"#{jquery_id(element_id)}\").#{mode || 'effect'}('#{name}'"
|
45
|
-
so it writes double quotes like most of the others. This change should probably be
|
46
|
-
done to the others, but as I don't use them so haven't tested them.
|
47
|
-
|
48
|
-
My other option seemed to require modifying rails' selector_assertions.rb line 427
|
49
|
-
... id ? statement.gsub(RJS_ANY_ID, "\"#{id}\"") : statement
|
50
|
-
which forces the expectation that the id is double quoted. If I changed it to
|
51
|
-
... statement.gsub(RJS_ANY_ID, "[\"']{1}#{id}[\"']{1}")
|
52
|
-
I believe that it would work as the logic seemed to work in some testing.
|
53
|
-
I have not actually tried to modify rails, as this file doesn't seem to
|
54
|
-
actually be in the git repository.
|
55
|
-
|
56
|
-
|
57
|
-
jrails now uses a nonconflict option so $ is jQuery. I put both in the pattern in case it gets changed.
|
58
|
-
|
59
|
-
:insert_after => "",
|
60
|
-
:insert_before => "",
|
61
|
-
=end
|
62
|
-
|
63
|
-
}
|
64
|
-
|
65
|
-
[:remove, :show, :hide, :toggle, :reset ].each do |action|
|
66
|
-
RJS_STATEMENTS[action] = "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.#{action}\\(\\)"
|
67
|
-
end
|
68
|
-
|
69
|
-
# TODO:
|
70
|
-
#RJS_STATEMENTS[:insert_html] = "Element.insert\\(#{RJS_ANY_ID}, \\{ (#{RJS_INSERTIONS.join('|')}):
|
71
|
-
#{RJS_PATTERN_HTML} \\}\\)"
|
72
|
-
|
73
|
-
RJS_STATEMENTS[:any] = Regexp.new("(#{RJS_STATEMENTS.values.join('|')})")
|
74
|
-
RJS_PATTERN_UNICODE_ESCAPED_CHAR = /\\u([0-9a-zA-Z]{4})/
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
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
|
+
module ActionController
|
16
|
+
module Assertions
|
17
|
+
module SelectorAssertions
|
18
|
+
silence_warnings do
|
19
|
+
RJS_PATTERN_HTML = "\"((\\\\\"|[^\"])*)\""
|
20
|
+
# RJS_ANY_ID = "\"([^\"])*\""
|
21
|
+
# better match with single or double quoted ids
|
22
|
+
RJS_ANY_ID = "[\"']([^\"])*[\"']"
|
23
|
+
|
24
|
+
RJS_STATEMENTS = {
|
25
|
+
:chained_replace => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.replaceWith\\(#{RJS_PATTERN_HTML}\\)",
|
26
|
+
:chained_replace_html => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.updateWith\\(#{RJS_PATTERN_HTML}\\)",
|
27
|
+
:replace_html => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.html\\(#{RJS_PATTERN_HTML}\\)",
|
28
|
+
:replace => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.replaceWith\\(#{RJS_PATTERN_HTML}\\)",
|
29
|
+
:insert_top => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.prepend\\(#{RJS_PATTERN_HTML}\\)",
|
30
|
+
:insert_bottom => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.append\\(#{RJS_PATTERN_HTML}\\)",
|
31
|
+
:effect => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.effect\\(",
|
32
|
+
:highlight => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.effect\\('highlight'"
|
33
|
+
|
34
|
+
=begin TODO:
|
35
|
+
|
36
|
+
I've never used the chained_* so I don't know if they work.
|
37
|
+
|
38
|
+
I couldn't seem to get assert_select_rjs to actually match the single quoted ids
|
39
|
+
which are created by some of the effects like ...
|
40
|
+
... jQuery('#item_1559').effect('highlight',{},1000);
|
41
|
+
so I modified jrails/lib/jrails.rb line 337
|
42
|
+
... javascript = "#{JQUERY_VAR}('#{jquery_id(element_id)}').#{mode || 'effect'}('#{name}'"
|
43
|
+
to
|
44
|
+
... javascript = "#{JQUERY_VAR}(\"#{jquery_id(element_id)}\").#{mode || 'effect'}('#{name}'"
|
45
|
+
so it writes double quotes like most of the others. This change should probably be
|
46
|
+
done to the others, but as I don't use them so haven't tested them.
|
47
|
+
|
48
|
+
My other option seemed to require modifying rails' selector_assertions.rb line 427
|
49
|
+
... id ? statement.gsub(RJS_ANY_ID, "\"#{id}\"") : statement
|
50
|
+
which forces the expectation that the id is double quoted. If I changed it to
|
51
|
+
... statement.gsub(RJS_ANY_ID, "[\"']{1}#{id}[\"']{1}")
|
52
|
+
I believe that it would work as the logic seemed to work in some testing.
|
53
|
+
I have not actually tried to modify rails, as this file doesn't seem to
|
54
|
+
actually be in the git repository.
|
55
|
+
|
56
|
+
|
57
|
+
jrails now uses a nonconflict option so $ is jQuery. I put both in the pattern in case it gets changed.
|
58
|
+
|
59
|
+
:insert_after => "",
|
60
|
+
:insert_before => "",
|
61
|
+
=end
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
[:remove, :show, :hide, :toggle, :reset ].each do |action|
|
66
|
+
RJS_STATEMENTS[action] = "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.#{action}\\(\\)"
|
67
|
+
end
|
68
|
+
|
69
|
+
# TODO:
|
70
|
+
#RJS_STATEMENTS[:insert_html] = "Element.insert\\(#{RJS_ANY_ID}, \\{ (#{RJS_INSERTIONS.join('|')}):
|
71
|
+
#{RJS_PATTERN_HTML} \\}\\)"
|
72
|
+
|
73
|
+
RJS_STATEMENTS[:any] = Regexp.new("(#{RJS_STATEMENTS.values.join('|')})")
|
74
|
+
RJS_PATTERN_UNICODE_ESCAPED_CHAR = /\\u([0-9a-zA-Z]{4})/
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
data/lib/jquery/jstree.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
module ActionView
|
2
|
-
module Helpers
|
3
|
-
|
4
|
-
end
|
1
|
+
module ActionView
|
2
|
+
module Helpers
|
3
|
+
|
4
|
+
end
|
5
5
|
end
|
data/lib/jquery/ribbon.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
module ActionView
|
2
|
-
module Helpers
|
3
|
-
|
4
|
-
end
|
5
|
-
end
|
1
|
+
module ActionView
|
2
|
+
module Helpers
|
3
|
+
|
4
|
+
end
|
5
|
+
end
|