[API] Expose Dialog as constructor

...and use it that way from todo plugin
This commit is contained in:
Victor Woeltjen
2016-08-11 16:04:26 -07:00
parent 8861644f2d
commit 93872ce074
6 changed files with 10 additions and 11 deletions

View File

@ -163,7 +163,7 @@ define([
destroy: function () {}
};
mct.dialog(view, "Add a Task").then(function () {
new mct.Dialog(view, "Add a Task").show().then(function () {
var description = $dialog.find('input').val();
var tasks = self.mutableObject.get('tasks');
tasks.push({ description: description });