Prettification
authorCameron Ball <cameron@getapproved.com.au>
Tue, 30 Dec 2014 08:14:57 +0000 (16:14 +0800)
committerCameron Ball <cameron@getapproved.com.au>
Tue, 30 Dec 2014 08:14:57 +0000 (16:14 +0800)
app/pages/account/account.html
app/pages/account/account.js

index f695b02..4b74a34 100644 (file)
@@ -1,6 +1,10 @@
 <div class="modal-header">
+    <div class="message-box" ng-if="!hidden" ng-class="{'error'  : messageType == 'error',
+                                                        'success': messageType == 'success'}"
+    >
+    <span class="message">{{status}}</span> <button class="btn btn-warning btn-xs" ng-click="$parent.hidden=true">X</button>
+    </div>
     <h1 class="modal-title">Account Settings</h1>
-    <h2 ng-if="status">{{status}}</h2>
 </div>
 <div class="modal-body">
     <h2>Simfiles per page</h2>
index cfc58e7..19f8d86 100644 (file)
@@ -4,6 +4,7 @@ angular.module("DivinElegy.pages.account", ['DivinElegy.components.ui'])
 
 .controller("AccountController", ['$scope', '$modalInstance', 'UiSettingsService', function($scope, $modalInstance, UiSettingsService)
 {
+    $scope.hidden = true;
     $scope.simfilesPerPage = UiSettingsService.getDirective('simfilesPerPage');
     $scope.downloadWarnings = UiSettingsService.getDirective('showDownloadWarning');
     
@@ -11,7 +12,9 @@ angular.module("DivinElegy.pages.account", ['DivinElegy.components.ui'])
     {
         UiSettingsService.setDirective('simfilesPerPage', $scope.simfilesPerPage);
         UiSettingsService.setDirective('showDownloadWarning', $scope.downloadWarnings);
-        $scope.status = "Saved!";
+        $scope.hidden = false;
+        $scope.messageType = 'success';
+        $scope.status = 'Saved!';
     };
     
     $scope.cancel = function()