class IRuby::Input::Cancel

Public Instance Methods

widget_css() click to toggle source
# File lib/iruby/input/cancel.rb, line 10
def widget_css
  ".iruby-cancel { margin-left: 5px; }"
end
widget_html() click to toggle source
# 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
widget_js() click to toggle source
# File lib/iruby/input/cancel.rb, line 14
      def widget_js
        <<-JS
          $('.iruby-cancel').click(function(){
            $('#iruby-form').remove();
          });
        JS
      end