3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/farm_twitter_bootstrap/modal.rb', line 3
def tb_modal(, = '', &content)
html = "<div id='tb_modal' class='modal fade' aria-hidden='true'>"
html += "<script type='text/javascript'>"
html += "$('#tb_modal').on('hidden', function(){ $('#tb_modal').detach(); })"
html += '</script>'
html += "<div class='modal-header'>"
html += "<button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button>"
html += "<h3 style='text-align: center'>#{}</h3>"
html += '</div>'
html += "<div class='modal-body'>"
html += capture(&content)
html += "</div>"
html += "<div class='modal-footer'>"
html +=
html += '</div>'
html += '</div>'
html.html_safe
end
|