Skip to content

Commit

Permalink
SAK-31072 Reposition the 'show system alerts' dialog (sakaiproject#2391)
Browse files Browse the repository at this point in the history
  • Loading branch information
marktriggs authored and ottenhoff committed Apr 29, 2016
1 parent 09efec2 commit d9403bd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="/library/js/bootstrap/3.1.1/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="{{{skinRepo}}}/tool_base.css" />
<link rel="stylesheet" type="text/css" href="/pasystem-tool/stylesheets/pasystem-tool.css" />
<link href="/library/js/jquery/ui/1.11.3/themes/ui-lightness/jquery-ui.min.css" rel="stylesheet" type="text/css" />

{{{randomSakaiHeadStuff}}}
</head>
Expand Down
11 changes: 6 additions & 5 deletions pasystem/pasystem-tool/tool/src/webapp/scripts/pasystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,15 @@ PASystemBannerAlerts.prototype.setupAlertBannerToggle = function() {
var self = this;

self.$toggle = $($("#pasystemBannerAlertsToggleTemplate").html().trim());
self.$toggle.hide();
$("#loginLinks").prepend(self.$toggle);

if ($("#roleSwitch").length > 0) {
var offset = 20 + $("#roleSwitch").width() + $("#roleSwitch").offset().left - self.$toggle.parent().offset().left;
self.$toggle.css("left", offset + "px");
if ($('.Mrphs-siteHierarchy:visible').length > 0) {
// Place the notification in the breadcrumbs bar where it's out of the way
self.$toggle.css('top', ($('.Mrphs-siteHierarchy').offset().top) + 'px');
}

self.$toggle.hide();
$("#loginLinks").prepend(self.$toggle);

self.$toggle.on("click", function(event) {
event.preventDefault();

Expand Down
23 changes: 22 additions & 1 deletion pasystem/pasystem-tool/tool/src/webapp/stylesheets/pasystem.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,25 @@
}
.pasystem-banner-alert-toggle-list-item {
position: absolute;
left: 10px; /* javascript will move if #roleSwitch link is present */
left: 50%;
transform: translateX(-50%);
top: 13px;
border: 1px solid #E0E0E0;
z-index: 1000;
display: inline-block;

-webkit-transition: background-color 0.2s, color 0.2s;
-moz-transition: background-color 0.2s, color 0.2s;
-ms-transition: background-color 0.2s, color 0.2s;
-o-transition: background-color 0.2s, color 0.2s;
transition: background-color 0.2s, color 0.2s;

background-color: #f7e084;
color: #000 !important;
text-align: center;
padding: 6px 8px;
border-radius: 3px;
text-decoration: none;
}
.pasystem-banner-alert-toggle:before {
font-family: 'pasystem-icons';
Expand Down Expand Up @@ -189,3 +206,7 @@
position: relative;
display: block;
}

.pasystem-body .alert li {
list-style: none;
}

0 comments on commit d9403bd

Please sign in to comment.