mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-06 05:04:35 +08:00
Merge pull request #1037 from ZmagoD/zd_SCI_2142
Implement/update flash messages/alerts with regards to new navigation [fixes SCI-2142]
This commit is contained in:
commit
dc22e05b02
5 changed files with 33 additions and 39 deletions
|
@ -198,9 +198,6 @@ var HelperModule = (function(){
|
|||
window.setTimeout(function () {
|
||||
flash.fadeTo(500, 0).slideUp(500, function () {
|
||||
$(this).remove();
|
||||
if($('.alert').length <= 0) {
|
||||
$('#content-wrapper').removeClass('alert-shown');
|
||||
}
|
||||
});
|
||||
}, 5000);
|
||||
}
|
||||
|
@ -234,7 +231,6 @@ var HelperModule = (function(){
|
|||
'</div>' +
|
||||
'</div>';
|
||||
$('#notifications').html(htmlSnippet);
|
||||
$('#content-wrapper').addClass('alert-shown');
|
||||
helpers.hideFlashMsg();
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ $(document).ready(function () {
|
|||
$("#hide-alert").click(function(ev) {
|
||||
$(this).closest("div.alert").addClass("alert-hidden");
|
||||
$("#content-wrapper").addClass("alert-hidden");
|
||||
$("#content-wrapper").removeClass("alert-shown");
|
||||
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
|
|
|
@ -175,11 +175,11 @@
|
|||
/** Search */
|
||||
.nav-search {
|
||||
li.disabled {
|
||||
opacity: 0.8;
|
||||
opacity: .8;
|
||||
|
||||
.badge {
|
||||
background-color: $color-emperor;
|
||||
opacity: 0.8;
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -353,8 +353,36 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Alert
|
||||
.alert {
|
||||
border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
opacity: .86;
|
||||
width: 100%;
|
||||
|
||||
&.alert-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a#hide-alert {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
&.alert-floating {
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
z-index: 1000;
|
||||
}
|
||||
}
|
||||
|
||||
#content-wrapper {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
|
||||
// reset margins on small screens
|
||||
@media (max-width: 1188px) {
|
||||
|
||||
#nav-team-switch {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@import 'constants';
|
||||
@import "mixins";
|
||||
@import 'main_navigation';
|
||||
@import 'buttons';
|
||||
@import "main_navigation";
|
||||
@import "buttons";
|
||||
|
||||
/** Layout **/
|
||||
|
||||
|
@ -58,14 +58,6 @@ table {
|
|||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
#content-wrapper {
|
||||
margin-top: 50px;
|
||||
|
||||
&.alert-shown {
|
||||
margin-top: 102px;
|
||||
}
|
||||
}
|
||||
|
||||
.center-block-narrow {
|
||||
max-width: 400px;
|
||||
}
|
||||
|
@ -116,27 +108,6 @@ a {
|
|||
background-color: inherit;
|
||||
}
|
||||
|
||||
.alert {
|
||||
border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
opacity: 1;
|
||||
width: 100%;
|
||||
|
||||
&.alert-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a#hide-alert {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
&.alert-floating {
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
z-index: 1000;
|
||||
}
|
||||
}
|
||||
|
||||
.badge {
|
||||
background-color: $color-theme-primary;
|
||||
font-size: 11px;
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="content-wrapper" class="<%= "alert-shown" if flash[:success] || flash[:error] || notice || alert %>">
|
||||
<div id="content-wrapper">
|
||||
<%= yield :content %>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue