-
- <% if notice || flash[:notice] %>
-
-
- <%= _('Notice:') %>
- <%= raw notice %>
-
- <% end %>
- <% if alert || flash[:alert] || flash[:error] %>
-
-
- <%= _('Alert:') %>
- <%= raw alert %>
-
- <% end %>
-
+ >
+
+ <%= _('Notice:') %>
+ <%= raw notice %>
+
+ >
+
+ <%= raw alert %>
+
+
+
<%= yield %>
diff --git a/lib/assets/javascripts/views/plans/index.js b/lib/assets/javascripts/views/plans/index.js
index e5ade02..d6261b5 100644
--- a/lib/assets/javascripts/views/plans/index.js
+++ b/lib/assets/javascripts/views/plans/index.js
@@ -7,11 +7,15 @@
// Update the visbility to test or private
$.post("/plans/" + id + "/visibility", params, function(data){
if(data['code'] === 1){
+ var msg = ($(self).is(':checked') ? __('The plan is now a test.') : __('The plan is no longer a test.'));
// If the save was successful make sure the Visibility text gets updated to 'Private'
+ $("div.roadmap-info-box span:not(.aria-only)").html(msg).attr('role', 'status')
+ .css('width', 'auto').parent().css('visibility', 'visible');
$(self).parent().siblings("#visibility-" + id).html(__('Private'));
}else{
// Display an error message
- $("#main-page-alert").show().html(data['msg']);
+ $("div.roadmap-alert-box span:not(.aria-only)").show().html(data['msg'])
+ .attr('role', 'alert').css('width', 'auto').css('visibility', 'visible');
e.preventDefault();
}
});
diff --git a/lib/assets/stylesheets/dmproadmap/base.scss b/lib/assets/stylesheets/dmproadmap/base.scss
index 8d07f36..3234ee0 100644
--- a/lib/assets/stylesheets/dmproadmap/base.scss
+++ b/lib/assets/stylesheets/dmproadmap/base.scss
@@ -345,32 +345,51 @@
}
}
+ /* INFORMATION/ERROR MESSAGE BOX */
+ div.roadmap-info-box,
+ div.roadmap-alert-box {
+ position: relative;
+ float: right;
+ margin-top: 10px;
+ padding: 8px 30px;
+ border: 1px solid $dark-grey;
+ border-radius: 5px;
+ vertical-align: middle;
+ width: auto;
+ max-width: 65%;
+
+ span {
+
+ }
+ .fa {
+ position: absolute;
+ top: 7px;
+ left: 7px;
+ background: transparent;
+ font-size: 18px;
+ margin-right: 15px;
+ z-index: 99;
+ }
+ }
+ div.roadmap-info-box {
+ color: $black;
+ background-color: $white;
+ .fa {
+ color: green;
+ }
+ }
+ div.roadmap-alert-box {
+ color: $black;
+ background-color: $white;
+ .fa {
+ color: red;
+ }
+ }
+
/* MAIN CONTENT */
/* ----------------------------------------------------- */
main {
- /* INFORMATION/ERROR MESSAGE BOX */
- div.roadmap-info-box,
- div.roadmap-alert-box {
- position: relative;
- float: right;
- background-color: $white;
- padding: 8px 20px;
- border: 1px solid $primary-color;
- border-radius: 5px;
- vertical-align: middle;
-
- span {
- padding-left: 30px;
- }
- .fa {
- position: absolute;
- top: 6px;
- background: transparent;
- color: $black;
- font-size: 18px;
- margin-right: 15px;
- }
- }
+ clear: both;
div.page {
position: relative;