To change this as the default behavior, change the order of the buttons and the class name in the JavaScript vex file. (Vex.combined.js)
"" .
dialog.buttons = {
NO: {
text: 'Cancel',
type: 'button',
className: 'vex-dialog-button-primary',
click: function noClick () {
this.value = false
this.close()
}
},
YES: {
text: 'OK',
type: 'submit',
className: 'vex-dialog-button-secondary',
click: function yesClick () {
this.value = true
}
}
}
dialog.defaultOptions = {
..
buttons: [
dialog.buttons.NO,
dialog.buttons.YES
],
..
}