QUESTION: 3,
/**
- Constant for `notify` message type question.
+ Constant for `notify` message type question with cancel option.
@static
@constant
*/
YES_NO_CANCEL: 4,
+ /**
+ Constant for `notify` message type ok/cancel.
+
+ @static
+ @constant
+ @type Number
+ @default 5
+ */
+ OK_CANCEL: 5,
+
_status: {
CLEAN: 0x0001, // 1
DIRTY: 0x0002, // 2
typeToButtonMap[String(XM.Model.WARNING)] = ["notifyOk"];
typeToButtonMap[String(XM.Model.CRITICAL)] = ["notifyOk"];
typeToButtonMap[String(XM.Model.QUESTION)] = ["notifyYes", "notifyNo"];
+ typeToButtonMap[String(XM.Model.OK_CANCEL)] = ["notifyOk", "notifyCancel"];
typeToButtonMap[String(XM.Model.YES_NO_CANCEL)] = ["notifyYes", "notifyNo", "notifyCancel"];
this.$.notifyMessage.setContent(inEvent.message);
notifyParameter = false;
break;
case 'notifyCancel':
- notifyParameter = undefined;
+ notifyParameter = null;
break;
}
// the callback might make its own popup, which we do not want to hide.
model.save(null, options);
} else {
- // answer === undefined means that the user wants to cancel this action
+ // answer === null means that the user wants to cancel this action
// fetching is a good way to throw out the changes
model.fetch({success: function () {
// tell the view to re-render