Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_show_help: function() {
var buttons = [{
text: _t("Ok"),
close: true,
}];
var dialog = new Dialog(this, {
size: 'medium',
buttons: buttons,
$content: $(QWeb.render('muk_dms.DocumentHelpDialogContent')),
title: _t("Help"),
});
dialog.open();
},
});
.done(function (fields) {
new Dialog(self, {
title: _.str.sprintf(_t("Fields of %s"), model),
$content: $(QWeb.render('WebClient.DebugManager.Action.Fields', {
fields: fields
}))
}).open();
});
},
.fail(function (err, data) {
return new Dialog(self, {
title: data.data ? data.data.arguments[0] : "",
$content: $('<div>', {
html: (data.data ? data.data.arguments[1] : data.statusText)
+ '<br>'
+ _.str.sprintf(
_t('It might be possible to edit the relevant items or fix the issue in <a href="%s">the classic Flectra interface</a>'),
'/web#return_label=Website&model=' + $data.data('object') + '&id=' + $data.data('id')
),
}),
}).open();
});
},</div>
_onChangeLayout: function (event) {
var self = this;
var dialog = new Dialog(this, {
title: _t("Edit Layout"),
$content: QWeb.render('DashBoard.layouts', _.clone(event.data))
});
dialog.opened().then(function () {
dialog.$('li').click(function () {
var layout = $(this).attr('data-layout');
self.renderer.changeLayout(layout);
self._saveDashboard();
dialog.close();
});
});
dialog.open();
},
fvg: function() {
var self = this;
var dialog = new Dialog(this, { title: _t("Fields View Get") });
dialog.opened().then(function () {
$('<pre>').text(utils.json_node_to_xml(
self._controller.renderer.arch, true)
).appendTo(dialog.$el);
});
dialog.open();
},
});</pre>