Skip to content

Instantly share code, notes, and snippets.

@weiland
Created September 8, 2014 12:04
Show Gist options
  • Select an option

  • Save weiland/49053c514dbb9766ee96 to your computer and use it in GitHub Desktop.

Select an option

Save weiland/49053c514dbb9766ee96 to your computer and use it in GitHub Desktop.
Chayns confirm dialog box
(function (module, Chayns, undefined) {
'use strict';
module.confirm = function (question, yesCallback, noCallback) {
question = question || '';
yesCallback = yesCallback || Function.prototype;
noCallback = noCallback || Function.prototype;
var buttons = [
new Chayns.PopUpButton('Ja', yesCallback),
new Chayns.PopUpButton('Nein', noCallback)
];
Chayns.ShowPopUp('<p>' + question + '</p>', "", buttons, Function.prototype);
};
})(window.TappProject, Chayns);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment