[Common UI] Fill in dialog specs

Fill in specs for bundle platform/commonUI/dialog,
which provides the ability to show dialogs. One
of the common user interface elements being transitioned
for WTD-574.
This commit is contained in:
Victor Woeltjen
2014-11-25 15:59:04 -08:00
parent f04e02359a
commit 242d40fab2
3 changed files with 125 additions and 8 deletions

View File

@ -40,11 +40,7 @@ define(
// Temporary workaround, in the absence of a
// forms package.
try {
resultingValue = JSON.parse(overlayModel.value);
} catch (e) {
resultingValue = {};
}
resultingValue = JSON.parse(overlayModel.value);
// Pass along the result
deferred.resolve(resultingValue);
@ -89,6 +85,10 @@ define(
overlayModel,
"overlay-dialog"
);
// Track that a dialog is already visible, to
// avoid spawning multiple dialogs at once.
dialogVisible = true;
}
return deferred.promise;