Class: IRuby::Input::Cancel
- Inherits:
-
Widget
- Object
- Erector::Widget
- Widget
- IRuby::Input::Cancel
show all
- Defined in:
- lib/iruby/input/cancel.rb
Instance Method Summary
collapse
Methods inherited from Widget
builder, #content, #widget_display, #widget_join
Instance Method Details
10
11
12
|
# File 'lib/iruby/input/cancel.rb', line 10
def widget_css
".iruby-cancel { margin-left: 5px; }"
end
|
22
23
24
25
26
27
28
29
|
# File 'lib/iruby/input/cancel.rb', line 22
def widget_html
button(
@label,
type: 'button',
:'data-dismiss' => 'modal',
class: "btn btn-danger pull-right iruby-cancel"
)
end
|
14
15
16
17
18
19
20
|
# File 'lib/iruby/input/cancel.rb', line 14
def widget_js
<<-JS
$('.iruby-cancel').click(function(){
$('#iruby-form').remove();
});
JS
end
|