From 12c6fd3628fbc87e5df9cd8d71a4c71e04345955 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 22 Oct 2015 15:33:47 -0400 Subject: [PATCH] CRM-13823 - Switch statusPage to use tabbed interface --- ang/crmStatusPage.js | 19 +------ ang/crmStatusPage/StatusPage.html | 66 ++++++++++++++----------- ang/crmStatusPage/StatusPageCtrl.js | 10 +--- ang/crmStatusPage/StatusPageServices.js | 1 - 4 files changed, 40 insertions(+), 56 deletions(-) diff --git a/ang/crmStatusPage.js b/ang/crmStatusPage.js index eae10777a6..91a6046637 100644 --- a/ang/crmStatusPage.js +++ b/ang/crmStatusPage.js @@ -13,24 +13,7 @@ resolve: { statuses: function(statuspageGetStatuses) { - return statuspageGetStatuses({is_visible: 1}); - }, - statusModel: function(statuspageStatusModel) { - return statuspageStatusModel(); - }, - preferences: function(statuspageGetPreferences){ - return statuspageGetPreferences(); - } - } - }); - - $routeProvider.when('/status/hushed', { - controller: 'statuspageStatusPage', - templateUrl: '~/statuspage/StatusPage.html', - - resolve: { - statuses: function(statuspageGetStatuses) { - return statuspageGetStatuses({is_visible: 0}); + return statuspageGetStatuses({sequential: 1}); }, statusModel: function(statuspageStatusModel) { return statuspageStatusModel(); diff --git a/ang/crmStatusPage/StatusPage.html b/ang/crmStatusPage/StatusPage.html index 2c5a9cd3ac..9100fcc849 100644 --- a/ang/crmStatusPage/StatusPage.html +++ b/ang/crmStatusPage/StatusPage.html @@ -5,38 +5,46 @@
-

Status Page


- - +

Status Page

-
-

- - {{status.title}} - -
-
- - - - -

-

-
-
-
- - - + +
+
+
+

+ + {{status.title}} + +
+
+ + + + +

+

+
+
+
+ + + +
+
-

+


-
+ +
diff --git a/ang/crmStatusPage/StatusPageCtrl.js b/ang/crmStatusPage/StatusPageCtrl.js index bec4df34f1..52ec83b22e 100644 --- a/ang/crmStatusPage/StatusPageCtrl.js +++ b/ang/crmStatusPage/StatusPageCtrl.js @@ -3,13 +3,9 @@ // controller angular.module('statuspage').controller('statuspageStatusPage', - function($scope, $location, crmApi, crmStatus, crmUiHelp, statuses, crmNavigator, preferences) { - // The ts() and hs() functions help load strings for this module. - var ts = $scope.ts = CRM.ts('statuspage'); - // var hs = $scope.hs = crmUiHelp({file: 'CRM/statuspage/StatusPage'}); // See: templates/CRM/statuspage/StatusPage.hlp + function($scope, crmApi, crmStatus, crmUiHelp, statuses, preferences) { - $scope.path = $location.path(); - $scope.navigator = crmNavigator; + var ts = $scope.ts = CRM.ts(); $scope.statuses = statuses; $scope.preferences = preferences; $scope.alert = CRM.alert; @@ -33,7 +29,6 @@ return crmStatus( { start: ts('Saving Status Preference...') , success: ts('Preference Saved') }, crmApi('StatusPreference', 'create', { - "sequential": 1, "name": name, "ignore_severity": 0, "hush_until": "" @@ -48,7 +43,6 @@ return crmStatus( { status: ts('Saving Status Preference...') , success: ts('Preference Saved') }, crmApi('StatusPreference', 'create', { - "sequential": 1, "name": status.name, "ignore_severity": status.snoozeOptions.severity, "hush_until": status.snoozeOptions.until diff --git a/ang/crmStatusPage/StatusPageServices.js b/ang/crmStatusPage/StatusPageServices.js index 5ece188e9d..8f82941883 100644 --- a/ang/crmStatusPage/StatusPageServices.js +++ b/ang/crmStatusPage/StatusPageServices.js @@ -29,7 +29,6 @@ _.each(apiResults.values, function(status){ status.severity_id = status.severity; status.severity = statuspageSeverityList[status.severity]; - status.displayTitle = status.name+' - '+status.title +' - '+status.severity.toUpperCase(); status.snoozeOptions = { show: false, severity: status.severity -- 2.25.1