-
Notifications
You must be signed in to change notification settings - Fork 17
confirm
pierr edited this page Sep 3, 2014
·
9 revisions
In order to create a confirm popup, you have to use the messageHelper
from the Framework.
Fmk.Helpers.messageHelper
.confirm("message.key")
.then(
function(success){console.info("OK", success)},
function(err){console.error('error', err)}
);
In order to use it, you must initialize the component in the application (only once).
- First, create a container in the html layout of the application.
<div id="modalConfirmContainer"></div>
- Then, the helper has an initialize method.
Fmk.Helpers.messageHelper.initialize()
.
Example call: in the _application.js_ ```javascript Application.prototype.initialize = function() { this.on("initialize:after", (function(_this) { return function(options) { Fmk.Helpers.messageHelper.initialize(); Backbone.history.start({ root: config.approot }); return typeof Object.freeze === "function" ? Object.freeze(_this) : void 0; }; })(this)); ```