Sha256: d1b903378d430ebbedb156b77efe471ddc6f4ee22ed8d43b20169fbcbed357d6
Contents?: true
Size: 784 Bytes
Versions: 19
Compression:
Stored size: 784 Bytes
Contents
result = render :partial => "form" page << <<-JS var idialog = '#<%= singular_name %>_dialog'; var iform = idialog + ' > form'; var ierror = '#error_dialog'; $('#container').append('#{ escape_javascript result}'); var options = { dataType: 'script', success: function() { if ($(ierror).html() == null) { $(idialog).dialog("close"); $(idialog).remove(); } } }; $(iform).ajaxForm(options); $(idialog).dialog({ autoOpen: true, width: 500, title: '#{params[:action].capitalize} <%= singular_name.capitalize %>', closeOnEscape: true, buttons: { "Ok": function() { $(iform).submit(); }, "Cancel": function() { $(this).dialog("close"); } }, close: function() { $(this).remove(); } }); $('.button.dialog').hide(); JS
Version data entries
19 entries across 12 versions & 1 rubygems