Permalink
Browse files
jquery noConflic mode - tests passes
- Loading branch information...
|
@@ -188,7 +188,7 @@ Also, updating the page is in your hands. Where Apotomo provides handy helpers a |
|
|
|
|
|
Look, +replace+ basically generates
|
|
|
|
|
|
- $("comments").replaceWith(<the rendered view>);
|
|
|
+ jQuery("comments").replaceWith(<the rendered view>);
|
|
|
|
|
|
If that's not what you want, do
|
|
|
|
|
@@ -316,7 +316,7 @@ Widget.TopBar = { |
|
|
toggleActive: function(widget_id, options) {
|
|
|
item = options['item'];
|
|
|
// do some toggle magic!!!
|
|
|
- $(widget_id).find(item).toggleClass('active');
|
|
|
+ jQuery(widget_id).find(item).toggleClass('active');
|
|
|
}
|
|
|
}
|
|
|
```
|
|
@@ -387,7 +387,7 @@ namespace "Widget" |
|
|
|
|
|
toggleActive: (options) ->
|
|
|
item = options.item
|
|
|
- $(@widget_id).find(item).toggleClass 'active'
|
|
|
+ jQuery(@widget_id).find(item).toggleClass 'active'
|
|
|
```
|
|
|
|
|
|
`rails g apotomo:widget TopBar::SuperThang show -e haml`
|
|
|
|
@@ -49,7 +49,7 @@ module Jquery |
|
|
def jquery; end
|
|
|
def element(selector)
|
|
|
selector = jq_helper.calc_selector selector
|
|
|
- "$(#{selector})"
|
|
|
+ "jQuery(#{selector})"
|
|
|
end
|
|
|
|
|
|
def update(*args, &block)
|
|
|
|
@@ -19,7 +19,7 @@ def jq_action *args, action |
|
|
def inv_markup_action(selector, markup, action)
|
|
|
selector = calc_selector selector
|
|
|
action = js_camelize(action)
|
|
|
- "$(#{escaped(markup)}).#{action}(#{selector});"
|
|
|
+ "jQuery(#{escaped(markup)}).#{action}(#{selector});"
|
|
|
end
|
|
|
|
|
|
def markup_act name, *args, &block
|
|
@@ -89,7 +89,7 @@ def apo_match? selector |
|
|
|
|
|
def element(selector)
|
|
|
selector = calc_selector selector
|
|
|
- "$(#{selector})"
|
|
|
+ "jQuery(#{selector})"
|
|
|
end
|
|
|
|
|
|
# id, selector, markup, action
|
|
|
|
@@ -3,7 +3,7 @@ module Ajax |
|
|
# fx
|
|
|
# ajax_url "#trashbin", "&id=" + ui.draggable.attr("data-id")
|
|
|
def ajax_url selector, params
|
|
|
- %Q{$.ajax({url: $("#{selector}").attr("data-event-url") + #{params};})}
|
|
|
+ %Q{jQuery.ajax({url: jQuery("#{selector}").attr("data-event-url") + #{params};})}
|
|
|
end
|
|
|
end
|
|
|
end
|
|
@@ -3,7 +3,7 @@ module DragnDrop |
|
|
# fx
|
|
|
# droppable "#trashbin", ajax_url("#trashbin", "&id=" + ui.draggable.attr("data-id"))
|
|
|
def droppable selector, &block
|
|
|
- %Q{$("#{selector}").droppable({
|
|
|
+ %Q{jQuery("#{selector}").droppable({
|
|
|
drop: function(event, ui) {
|
|
|
#{yield}
|
|
|
}
|
|
|
0 comments on commit
7b141be