Rename dialogSeverity to messageServity for reuse with notifications

This commit is contained in:
Henry 2015-10-05 10:39:06 -07:00
parent d20abe01dd
commit ec7edb58ca
3 changed files with 32 additions and 25 deletions

View File

@ -2,10 +2,11 @@
"extensions": { "extensions": {
"constants": [ "constants": [
{ {
"key": "dialogSeverity", "key": "messageSeverity",
"value": { "value": {
"ERROR": "error", "ERROR": "error",
"INFO": "info" "INFO": "info",
"SUCCESS": "success"
} }
} }
], ],

View File

@ -1,22 +1,28 @@
{ {
"extensions": { "extensions": {
"templates":[ "templates": [
{ {
"key":"dialogLaunchTemplate", "key": "dialogLaunchTemplate",
"templateUrl": "dialog-launch.html" "templateUrl": "dialog-launch.html"
} }
], ],
"controllers":[ "controllers": [
{ {
"key":"DialogLaunchController", "key": "DialogLaunchController",
"implementation":"DialogLaunchController.js", "implementation": "DialogLaunchController.js",
"depends": ["$scope", "dialogService", "$timeout", "$log", "dialogSeverity"] "depends": [
} "$scope",
], "dialogService",
"indicators": [ "$timeout",
{ "$log",
"implementation": "DialogLaunchIndicator.js" "messageSeverity"
} ]
] }
} ],
"indicators": [
{
"implementation": "DialogLaunchIndicator.js"
}
]
}
} }

View File

@ -26,14 +26,14 @@ define(
function () { function () {
"use strict"; "use strict";
function DialogLaunchController($scope, dialogService, $timeout, $log, dialogSeverity) { function DialogLaunchController($scope, dialogService, $timeout, $log, messageSeverity) {
$scope.launchProgress = function () { $scope.launchProgress = function () {
var model = { var model = {
title: "Progress dialog example", title: "Progress dialog example",
progress: 0, progress: 0,
hint: "Calculating...", hint: "Calculating...",
unknownDuration: false, unknownDuration: false,
severity: dialogSeverity.INFO, severity: messageSeverity.INFO,
actions: [ actions: [
{ {
label: "Cancel Operation", label: "Cancel Operation",
@ -72,7 +72,7 @@ define(
var model = { var model = {
title: "Error Message Title", title: "Error Message Title",
hint: "Something happened. It was not so good.", hint: "Something happened. It was not so good.",
severity: dialogSeverity.ERROR, severity: messageSeverity.ERROR,
actions: [ actions: [
{ {
label: "OK", label: "OK",