Skip to content

Commit

Permalink
fix default notification positioning
Browse files Browse the repository at this point in the history
resolves
  • Loading branch information
soumak77 committed Jan 23, 2017
1 parent 3dbaebe commit d30e8b4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions js/angular/components/notification/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
return directive;

function link(scope, element, attrs, controller) {
scope.position = scope.position ? scope.position.split(' ').join('-') : 'top-right';
scope.position = scope.position ? scope.position.split(' ').join('-') : 'default-position';

scope.$on("$destroy", function() {
BaseAppsApi.unsubscribe(attrs.id);
Expand Down Expand Up @@ -242,7 +242,7 @@
}

function postLink(scope, element, attrs, controller) {
scope.position = attrs.position ? attrs.position.split(' ').join('-') : 'top-right';
scope.position = attrs.position ? attrs.position.split(' ').join('-') : 'default-position';

var animationIn = attrs.animationIn || 'fadeIn';
var animationOut = attrs.animationOut || 'fadeOut';
Expand Down
26 changes: 14 additions & 12 deletions scss/components/_notification.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,14 @@ $notification-icon-align: top !default;

position: fixed !important;

&.top-right { @include notification-layout(right, top); }
&.top-left { @include notification-layout(left, top); }
&.top-middle { @include notification-layout(middle, top); }
&.default-position { @include notification-layout(); }
&.top-right { @include notification-layout(right, top); }
&.top-left { @include notification-layout(left, top); }
&.top-middle { @include notification-layout(middle, top); }

&.bottom-right { @include notification-layout(right, bottom); }
&.bottom-left { @include notification-layout(left, bottom); }
&.bottom-middle { @include notification-layout(middle, bottom); }
&.bottom-right { @include notification-layout(right, bottom); }
&.bottom-left { @include notification-layout(left, bottom); }
&.bottom-middle { @include notification-layout(middle, bottom); }

&.success { @include notification-style($success-color) }
&.warning { @include notification-style($warning-color) }
Expand All @@ -200,13 +201,14 @@ $notification-icon-align: top !default;
.notification-container {
@include notification-container;

&.top-right { @include notification-layout(right, top); }
&.top-left { @include notification-layout(left, top); }
&.top-middle { @include notification-layout(middle, top); }
&.default-position { @include notification-layout(); }
&.top-right { @include notification-layout(right, top); }
&.top-left { @include notification-layout(left, top); }
&.top-middle { @include notification-layout(middle, top); }

&.bottom-right { @include notification-layout(right, bottom); }
&.bottom-left { @include notification-layout(left, bottom); }
&.bottom-middle { @include notification-layout(middle, bottom); }
&.bottom-right { @include notification-layout(right, bottom); }
&.bottom-left { @include notification-layout(left, bottom); }
&.bottom-middle { @include notification-layout(middle, bottom); }
}

.notification-icon {
Expand Down

0 comments on commit d30e8b4

Please sign in to comment.