Skip to content

Commit

Permalink
Tweak styles, update js code to use class syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
anvit committed Aug 31, 2023
1 parent cd949d9 commit 4db4593
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php $notificationMessage = __('Bootstrap 2 themes have been deprecated and will be removed in a future release. Please consider updating to a Bootstrap 5 theme. %1%More info%2%.', ['%1%' => '<a href="https://www.accesstomemory.org/download/" target="_blank">', '%2%' => '</a>']); ?>
<?php $notificationMessage = __('Bootstrap 2 themes have been deprecated and will be removed in a future release. Please consider updating to a Bootstrap 5 theme. %1%More info.%2%', ['%1%' => '<a href="https://www.accesstomemory.org/download/" target="_blank">', '%2%' => '</a>']); ?>

<?php echo javascript_include_tag('bs2DeprecationMessage'); ?>

Expand Down
28 changes: 11 additions & 17 deletions js/bs2DeprecationMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,23 @@

"use strict";

var Bs2DeprecationMessage = function (element)
{
this.$element = $(element);
this.$Bs2DeprecationMessageBlock = this.$element.find('div[id="bs2-deprecation-message"]');
this.$Bs2DeprecationMessageButton = this.$element.find('button.bs2-deprecation-message-button');
this.listen();
};

Bs2DeprecationMessage.prototype = {

constructor: Bs2DeprecationMessage,
class Bs2DeprecationMessage {
constructor(element) {
this.$element = $(element);
this.$Bs2DeprecationMessageBlock = this.$element.find('div[id="bs2-deprecation-message"]');
this.$Bs2DeprecationMessageButton = this.$element.find('button.bs2-deprecation-message-button');
this.listen();
}

listen: function()
{
listen() {
this.$Bs2DeprecationMessageButton.on('click', $.proxy(this.onBs2DeprecationMessageButton, this));
},
}

onBs2DeprecationMessageButton: function ()
{
onBs2DeprecationMessageButton() {
this.$Bs2DeprecationMessageBlock.slideUp(100);
$.get('/default/bs2DeprecationMessageDismiss');
}
};
}

$(function ()
{
Expand Down
8 changes: 5 additions & 3 deletions plugins/arDominionPlugin/css/less/scaffolding.less
Original file line number Diff line number Diff line change
Expand Up @@ -1706,19 +1706,21 @@ body.login #content {
}

#bs2-deprecation-message-content {
padding: 6px 0;
padding: 8px 0;
color: @white;
position: relative;
left: 50%;
transform: translateX(-50%);
margin-right: 65px;
font-size: 0.85rem;

a:not(.btn) {
text-shadow: none;
color: #F0A8AF;
text-decoration: underline;
color: lighten(@linkColorHover, 45%);
}
a:hover {
color: #F6CBCF;
color: lighten(@linkColor, 45%);
}
}
}
Expand Down

0 comments on commit 4db4593

Please sign in to comment.