Sha256: cfe94a2c643f28a740ec07fe85783e531df3c6aa768a9f97d74f556aab9640c6

Contents?: true

Size: 797 Bytes

Versions: 3

Compression:

Stored size: 797 Bytes

Contents

<%# это приходит в ответ на запрос формы, завёрнутой в popup (такие запросы отправляют кнопки, обработанные RefinePriceDecorator) %>

var $body = $('body');

// вставим окно
var html_str = "<%= j render_popup_refine_price(params) %>";
var $m = $(html_str);
$body.append($m);

// покажем окно
$('#c80_refine_price_bs_modal')
        .modal('show')
        .on('hidden.bs.modal', function () {
            $(this).remove();
            //console.log($(this));
        });

// настроим форму
var $form = $("form#form_refine_price");
$form.bind("ajax:error", function (event, data, status, xhr) {
    $form.render_form_errors($.parseJSON(data.responseText));
});
$form.modal_success();

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
c80_refine_price-0.1.0.2 app/views/c80_refine_price/application/refine_price_popup.js.erb
c80_refine_price-0.1.0.1 app/views/c80_refine_price/application/refine_price_popup.js.erb
c80_refine_price-0.1.0 app/views/c80_refine_price/application/refine_price_popup.js.erb