How to use the web.Dialog.confirm function in web

To help you get started, we’ve selected a few web examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DocMarty84 / koozic / addons / web / static / src / js / widgets / sidebar.js View on Github external
on_attachment_delete: function(e) {
        e.preventDefault();
        e.stopPropagation();
        var self = this;
        var $e = $(e.currentTarget);
        var options = {
            confirm_callback: function () {
                new data.DataSet(this, 'ir.attachment')
                    .unlink([parseInt($e.attr('data-id'), 10)])
                    .done(function() {
                        self.do_attachement_update(self.dataset, self.model_id);
                    });
            }
        };
        Dialog.confirm(this, _t("Do you really want to delete this attachment ?"), options);
    }
});
github DocMarty84 / koozic / addons / web / static / src / js / widgets / data_export.js View on Github external
self.$('.o_delete_exported_list').click(function() {
                var select_exp = self.$('.o_exported_lists_select option:selected');
                var options = {
                    confirm_callback: function () {
                        if (select_exp.val()) {
                            self.exports.unlink([parseInt(select_exp.val(), 10)]);
                            select_exp.remove();
                            self.$fields_list.empty();
                            if (self.$('.o_exported_lists_select option').length <= 1) {
                                self.$('.o_exported_lists').hide();
                            }
                        }
                    }
                };
                Dialog.confirm(this, _t("Do you really want to delete this export template?"), options);
            });
       });

web

A small and fast web/http library for nodejs. (replaces the built-in http module)

MIT
Latest version published 11 years ago

Package Health Score

45 / 100
Full package analysis