old overlay code is no longer used

This commit is contained in:
Andrew Bauer 2021-01-04 13:51:03 -06:00
parent 0cdc2b448d
commit 51132cb5e1
3 changed files with 1 additions and 174 deletions

View File

@ -1,49 +0,0 @@
.overlayMask {
position: absolute;
opacity: 0.6;
filter: alpha(opacity=60);
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60);
z-index: 999;
background: #aaaaaa;
}
.overlay {
display: none;
position: absolute;
background-color: #f0f0f0;
border: 2px solid #555555;
-moz-border-radius: 4px;
z-index: 1000;
overflow: hidden;
}
.overlayHeader {
float: left;
background-color: #853131;
width: 100%;
border-bottom: 1px solid #666666;
color: black;
}
.overlayTitle {
float: left;
padding: 10px 6px;
font-weight: bold;
width: auto;
}
.overlayToolbar {
float: right;
font-weight: bold;
padding: 6px 4px;
width: auto;
}
.overlayBody {
float: left;
width: 100%;
}
.overlayContent {
padding: 4px 4px 6px;
}

View File

@ -1,118 +0,0 @@
var Overlay = new Class({
Implements: [Options, Events],
initialize: function( id, options ) {
this.setOptions( options );
this.mask = new Mask( document.body, {'maskMargins': false, 'class': 'overlayMask'} );
this.id = id?id:'overlay';
if ( typeOf(this.id) == 'string' ) {
if ( $(this.id) ) {
this.element = $(this.id);
}
} else {
this.element = this.id;
this.id = this.element.get('id');
}
if ( !this.element ) {
this.element = new Element( 'div', {'id': this.id, 'class': 'overlay', 'styles': {'display': 'none'}} );
if ( this.options.title || this.options.buttons ) {
var overlayHeader = new Element( 'div', {'class': 'overlayHeader'} );
if ( this.options.title ) {
var overlayTitle = new Element( 'div', {'class': 'overlayTitle', 'text': this.options.title} );
overlayHeader.grab( overlayTitle );
}
if ( this.options.buttons ) {
var overlayToolbar = new Element( 'div', {'class': 'overlayToolbar'} );
this.options.buttons.each(
function( button ) {
var overlayButton = new Element( 'button', {'text': button.text} );
if ( button.id ) {
overlayButton.setProperty( 'id', button.id );
}
if ( button.events ) {
overlayButton.set( 'events', events );
}
overlayToolbar.grab( overlayButton );
}
);
overlayHeader.grab( overlayTitle );
}
this.element.grab( overlayHeader );
var overlayBody = new Element( 'div', {'class': 'overlayBody'} );
var overlayContent = new Element( 'div', {'class': 'overlayContent'} );
overlayContent.grab( this.options.content );
overlayBody.grab( overlayContent );
this.element.grab( overlayBody );
}
this.target = document.id(this.options.target) || document.id(document.body);
this.element.inject( this.target );
}
},
show: function() {
this.mask.show();
window.addEventListener( 'resize', this.update.bind(this), {passive: true} );
window.addEventListener( 'scroll', this.update.bind(this), {passive: true} );
this.element.tween( 'opacity', [0, 1.0] );
this.element.show();
this.element.position();
this.mask.position();
},
hideComplete: function() {
this.element.hide();
this.mask.hide();
},
hide: function() {
new Fx.Tween( this.element, {duration: 400, transition: Fx.Transitions.Sine, onComplete: this.hideComplete.bind(this)} ).start( 'opacity', 1.0, 0 );
},
update: function() {
this.element.position();
this.mask.position();
},
showAnimation: function() {
showOverlay();
//console.log( "Showing overlay loading" );
if ( !this.loading ) {
this.loading = new Element( 'div', {'id': 'loading'+this.key, 'styles': {'display': 'none'}} );
this.loading.grab( this.loadingImage );
document.body.grab( this.loading );
}
updateOverlayLoading();
this.loading.setStyle( 'display', 'block' );
window.addEventListener( 'resize', this.update.bind(this), {passive: true} );
window.addEventListener( 'scroll', this.update.bind(this), {passive: true} );
},
hideAnimation: function() {
if ( this.loading ) {
this.loading.setStyle( 'display', 'none' );
}
}
});
function setupOverlays() {
try {
$$('.overlay').each(
function( overlay ) {
overlay.element = new Overlay( overlay.get('id') );
overlay.getElements('.overlayCloser').each(
function( closer ) {
closer.addEvent( 'click', function() {
overlay.element.hide();
} );
}
);
overlay.overlayShow = function() {
overlay.element.show();
};
overlay.overlayHide = function() {
overlay.element.hide();
};
}
);
} catch ( e ) {
alert( e );
}
}
window.addEventListener( 'DOMContentLoaded', setupOverlays );

View File

@ -109,7 +109,6 @@ if ( file_exists("skins/$skin/css/$css/graphics/favicon.ico") ) {
}
echo output_cache_busted_stylesheet_links(array(
'css/reset.css',
'css/overlay.css',
'css/font-awesome.min.css',
'css/bootstrap.min.css',
'css/bootstrap-table.min.css',
@ -931,13 +930,8 @@ function xhtmlFooter() {
?>
<script src="<?php echo cache_bust($skinJsFile) ?>"></script>
<script src="<?php echo cache_bust('js/logger.js')?>"></script>
<?php
if ($basename == 'watch' or $basename == 'log' ) {
// This is used in the log popup for the export function. Not sure if it's used anywhere else
?>
<script src="<?php echo cache_bust('js/overlay.js') ?>"></script>
<?php
} else if ( $basename == 'monitor' ) {
if ( $basename == 'monitor' ) {
echo output_script_if_exists(array('js/leaflet/leaflet.js'), false);
} ?>
<script nonce="<?php echo $cspNonce; ?>">$j('.chosen').chosen();</script>