Initial commit

This commit is contained in:
Mauricio Dinarte 2024-12-04 10:11:27 -06:00
commit c5e731d8ae
2773 changed files with 600767 additions and 0 deletions

Binary file not shown.

After

(image error) Size: 76 B

Binary file not shown.

After

(image error) Size: 368 B

Binary file not shown.

After

(image error) Size: 344 B

View file

@ -0,0 +1,40 @@
/**
* @file
* RTL styling for Overlay child pages.
*/
html {
direction: rtl;
}
#overlay-title {
float: right;
left: auto;
}
#overlay {
padding: 0.2em;
padding-left: 26px;
}
#overlay-close-wrapper {
left: 0;
right: auto;
}
#overlay-close,
#overlay-close:hover {
background: transparent url(images/close-rtl.png) no-repeat;
-moz-border-radius-topright: 0;
-webkit-border-top-right-radius: 0;
border-top-right-radius: 0;
}
/**
* Tabs on the overlay.
*/
#overlay-tabs {
left: 20px;
right: auto;
}
#overlay-tabs li {
margin: 0 -3px 0 0;
}

View file

@ -0,0 +1,172 @@
/**
* @file
* Basic styling for the Overlay child pages.
*/
html.js {
background: transparent !important;
overflow-y: scroll;
}
html.js body {
background: transparent !important;
margin-left: 0;
margin-right: 0;
padding: 20px 0;
}
#overlay {
display: table;
margin: 0 auto;
min-height: 100px;
min-width: 700px;
position: relative;
padding: .2em;
padding-bottom: 2em;
padding-right: 26px; /* LTR */
width: 88%;
}
#overlay-titlebar {
padding: 0 20px;
position: relative;
white-space: nowrap;
z-index: 100;
}
#overlay-content {
background: #fff;
clear: both;
color: #000;
padding: .5em 1em;
position: relative;
}
#overlay-title-wrapper {
overflow: hidden;
}
#overlay-title {
color: #fff;
float: left; /* LTR */
font-size: 20px;
margin: 0;
padding: 0.3em 0;
}
#overlay-title:active,
#overlay-title:focus {
outline: 0;
}
.overlay #skip-link {
margin-top: -20px;
}
.overlay #skip-link a {
color: #fff; /* This is white to contrast with the dark background behind it. */
}
#overlay-close-wrapper {
position: absolute;
right: 0; /* LTR */
}
#overlay-close,
#overlay-close:hover {
background: transparent url(images/close.png) no-repeat; /* LTR */
-moz-border-radius-topleft: 0; /* LTR */
-webkit-border-top-left-radius: 0; /* LTR */
border-top-left-radius: 0; /* LTR */
display: block;
height: 26px;
margin: 0;
padding: 0;
/* Replace with position:fixed to get a scrolling close button. */
position: absolute;
width: 26px;
}
/**
* Tabs on the overlay.
*/
#overlay-tabs {
line-height: 27px;
margin: -28px 0 0 0;
position: absolute;
right: 20px; /* LTR */
text-transform: uppercase;
}
#overlay-tabs li {
display: inline;
list-style: none;
margin: 0 0 0 -3px; /* LTR */
padding: 0;
}
#overlay-tabs li a,
#overlay-tabs li a:active,
#overlay-tabs li a:visited,
#overlay-tabs li a:hover {
background-color: #a6a7a2;
-moz-border-radius: 8px 8px 0 0;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
border-radius: 8px 8px 0 0;
color: #000;
display: inline-block;
font-size: 11px;
font-weight: bold;
margin: 0 0 2px 0;
outline: 0;
padding: 0 14px;
text-decoration: none;
}
#overlay-tabs li.active a,
#overlay-tabs li.active a.active,
#overlay-tabs li.active a:active,
#overlay-tabs li.active a:visited {
background-color: #fff;
margin: 0;
padding-bottom: 2px;
}
#overlay-tabs li a:focus,
#overlay-tabs li a:hover {
color: #fff;
}
#overlay-tabs li.active a:focus,
#overlay-tabs li.active a:hover {
color: #000;
}
/**
* Add to shortcuts link
*/
#overlay-titlebar .add-or-remove-shortcuts {
padding-top: 0.9em;
}
/**
* IE6 shows elements with position:fixed as position:static so replace
* it with position:absolute;
*/
* html #overlay-close,
* html #overlay-close:hover {
position: absolute;
}
/**
* Disable message.
*/
#overlay-disable-message {
background-color: #fff;
margin: -20px auto 20px;
width: 80%;
-moz-border-radius: 0 0 8px 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
border-radius: 0 0 8px 8px;
}
.overlay-disable-message-focused {
padding: 0.5em;
}
.overlay-disable-message-focused a {
display: block;
float: left;
}
.overlay-disable-message-focused #overlay-dismiss-message {
float: right;
}

View file

@ -0,0 +1,196 @@
/**
* @file
* Attaches the behaviors for the Overlay child pages.
*/
(function ($) {
/**
* Attach the child dialog behavior to new content.
*/
Drupal.behaviors.overlayChild = {
attach: function (context, settings) {
// Make sure this behavior is not processed more than once.
if (this.processed) {
return;
}
this.processed = true;
// If we cannot reach the parent window, break out of the overlay.
if (!parent.Drupal || !parent.Drupal.overlay) {
window.location = window.location.href.replace(/([?&]?)render=overlay&?/g, '$1').replace(/\?$/, '');
}
var settings = settings.overlayChild || {};
// If the entire parent window should be refreshed when the overlay is
// closed, pass that information to the parent window.
if (settings.refreshPage) {
parent.Drupal.overlay.refreshPage = true;
}
// If a form has been submitted successfully, then the server side script
// may have decided to tell the parent window to close the popup dialog.
if (settings.closeOverlay) {
parent.Drupal.overlay.bindChild(window, true);
// Use setTimeout to close the child window from a separate thread,
// because the current one is busy processing Drupal behaviors.
setTimeout(function () {
if (typeof settings.redirect == 'string') {
parent.Drupal.overlay.redirect(settings.redirect);
}
else {
parent.Drupal.overlay.close();
}
}, 1);
return;
}
// If one of the regions displaying outside the overlay needs to be
// reloaded immediately, let the parent window know.
if (settings.refreshRegions) {
parent.Drupal.overlay.refreshRegions(settings.refreshRegions);
}
// Ok, now we can tell the parent window we're ready.
parent.Drupal.overlay.bindChild(window);
// IE8 crashes on certain pages if this isn't called; reason unknown.
window.scrollTo(window.scrollX, window.scrollY);
// Attach child related behaviors to the iframe document.
Drupal.overlayChild.attachBehaviors(context, settings);
// There are two links within the message that informs people about the
// overlay and how to disable it. Make sure both links are visible when
// either one has focus and add a class to the wrapper for styling purposes.
$('#overlay-disable-message', context)
.focusin(function () {
$(this).addClass('overlay-disable-message-focused');
$('a.element-focusable', this).removeClass('element-invisible');
})
.focusout(function () {
$(this).removeClass('overlay-disable-message-focused');
$('a.element-focusable', this).addClass('element-invisible');
});
}
};
/**
* Overlay object for child windows.
*/
Drupal.overlayChild = Drupal.overlayChild || {
behaviors: {}
};
Drupal.overlayChild.prototype = {};
/**
* Attach child related behaviors to the iframe document.
*/
Drupal.overlayChild.attachBehaviors = function (context, settings) {
$.each(this.behaviors, function () {
this(context, settings);
});
};
/**
* Capture and handle clicks.
*
* Instead of binding a click event handler to every link we bind one to the
* document and handle events that bubble up. This also allows other scripts
* to bind their own handlers to links and also to prevent overlay's handling.
*/
Drupal.overlayChild.behaviors.addClickHandler = function (context, settings) {
$(document).bind('click.drupal-overlay mouseup.drupal-overlay', $.proxy(parent.Drupal.overlay, 'eventhandlerOverrideLink'));
};
/**
* Modify forms depending on their relation to the overlay.
*
* By default, forms are assumed to keep the flow in the overlay. Thus their
* action attribute get a ?render=overlay suffix.
*/
Drupal.overlayChild.behaviors.parseForms = function (context, settings) {
$('form', context).once('overlay', function () {
// Obtain the action attribute of the form.
var action = $(this).attr('action');
// Keep internal forms in the overlay.
if (action == undefined || (action.indexOf('http') != 0 && action.indexOf('https') != 0)) {
action += (action.indexOf('?') > -1 ? '&' : '?') + 'render=overlay';
$(this).attr('action', action);
}
// Submit external forms into a new window.
else {
$(this).attr('target', '_new');
}
});
};
/**
* Replace the overlay title with a message while loading another page.
*/
Drupal.overlayChild.behaviors.loading = function (context, settings) {
var $title;
var text = Drupal.t('Loading');
var dots = '';
$(document).bind('drupalOverlayBeforeLoad.drupal-overlay.drupal-overlay-child-loading', function () {
$title = $('#overlay-title').text(text);
var id = setInterval(function () {
dots = (dots.length > 10) ? '' : dots + '.';
$title.text(text + dots);
}, 500);
});
};
/**
* Switch active tab immediately.
*/
Drupal.overlayChild.behaviors.tabs = function (context, settings) {
var $tabsLinks = $('#overlay-tabs > li > a');
$('#overlay-tabs > li > a').bind('click.drupal-overlay', function () {
var active_tab = Drupal.t('(active tab)');
$tabsLinks.parent().siblings().removeClass('active').find('element-invisible:contains(' + active_tab + ')').appendTo(this);
$(this).parent().addClass('active');
});
};
/**
* If the shortcut add/delete button exists, move it to the overlay titlebar.
*/
Drupal.overlayChild.behaviors.shortcutAddLink = function (context, settings) {
// Remove any existing shortcut button markup from the titlebar.
$('#overlay-titlebar').find('.add-or-remove-shortcuts').remove();
// If the shortcut add/delete button exists, move it to the titlebar.
var $addToShortcuts = $('.add-or-remove-shortcuts');
if ($addToShortcuts.length) {
$addToShortcuts.insertAfter('#overlay-title');
}
$(document).bind('drupalOverlayBeforeLoad.drupal-overlay.drupal-overlay-child-loading', function () {
$('#overlay-titlebar').find('.add-or-remove-shortcuts').remove();
});
};
/**
* Use displacement from parent window.
*/
Drupal.overlayChild.behaviors.alterTableHeaderOffset = function (context, settings) {
if (Drupal.settings.tableHeaderOffset) {
Drupal.overlayChild.prevTableHeaderOffset = Drupal.settings.tableHeaderOffset;
}
Drupal.settings.tableHeaderOffset = 'Drupal.overlayChild.tableHeaderOffset';
};
/**
* Callback for Drupal.settings.tableHeaderOffset.
*/
Drupal.overlayChild.tableHeaderOffset = function () {
var topOffset = Drupal.overlayChild.prevTableHeaderOffset ? Drupal.tableHeader.callHeaderOffsetFunction(Drupal.overlayChild.prevTableHeaderOffset) : 0;
return topOffset + parseInt($(document.body).css('marginTop'));
};
})(jQuery);

View file

@ -0,0 +1,55 @@
/**
* @file
* Basic styling for the Overlay module.
*/
html.overlay-open,
html.overlay-open body {
height: 100%;
overflow: hidden;
}
#overlay-container,
.overlay-modal-background,
.overlay-element {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 500;
}
.overlay-modal-background {
/* Using a transparent png renders faster than using opacity */
background: transparent url(images/background.png) repeat;
}
.overlay-element {
background: transparent;
left: -200%;
z-index: 501;
}
.overlay-element.overlay-active {
left: 0;
}
html.overlay-open .displace-top,
html.overlay-open .displace-bottom {
z-index: 600;
}
/**
* Within the overlay parent, the message about disabling the overlay is for
* screen-reader users only. It is always kept invisible with the
* element-invisible class, and removed from the tab order. Overlay-child.css
* contains styling for the same message appearing within the overlay, and
* intended for sighted users.
*/
#overlay-disable-message {
display: none;
}
html.overlay-open #overlay-disable-message {
display: block;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,40 @@
<?php
/**
* @file
* Hooks provided by Overlay module.
*/
/**
* @addtogroup hooks
* @{
*/
/**
* Allow modules to act when an overlay parent window is initialized.
*
* The parent window is initialized when a page is displayed in which the
* overlay might be required to be displayed, so modules can act here if they
* need to take action to accommodate the possibility of the overlay appearing
* within a Drupal page.
*/
function hook_overlay_parent_initialize() {
// Add our custom JavaScript.
drupal_add_js(drupal_get_path('module', 'hook') . '/hook-overlay.js');
}
/**
* Allow modules to act when an overlay child window is initialized.
*
* The child window is initialized when a page is displayed from within the
* overlay, so modules can act here if they need to take action to work from
* within the confines of the overlay.
*/
function hook_overlay_child_initialize() {
// Add our custom JavaScript.
drupal_add_js(drupal_get_path('module', 'hook') . '/hook-overlay-child.js');
}
/**
* @} End of "addtogroup hooks".
*/

View file

@ -0,0 +1,10 @@
name = Overlay
description = Displays the Drupal administration interface in an overlay.
package = Core
version = VERSION
core = 7.x
; Information added by Drupal.org packaging script on 2024-03-06
version = "7.100"
project = "drupal"
datestamp = "1709734591"

View file

@ -0,0 +1,19 @@
<?php
/**
* @file
* Install, update, and uninstall functions for the Overlay module.
*/
/**
* Implements hook_enable().
*
* If the module is being enabled through the admin UI, and not from an
* installation profile, reopen the modules page in an overlay.
*/
function overlay_enable() {
if (strpos(current_path(), 'admin/modules') === 0) {
// Flag for a redirect to <front>#overlay=admin/modules on hook_init().
$_SESSION['overlay_enable_redirect'] = 1;
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,39 @@
<?php
/**
* @file
* Default theme implementation to display a page in the overlay.
*
* Available variables:
* - $title: the (sanitized) title of the page.
* - $page: The rendered page content.
* - $tabs (array): Tabs linking to any sub-pages beneath the current page
* (e.g., the view and edit tabs when displaying a node).
*
* Helper variables:
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
*
* @see template_preprocess()
* @see template_preprocess_overlay()
* @see template_process()
*
* @ingroup themeable
*/
?>
<?php print render($disable_overlay); ?>
<div id="overlay" <?php print $attributes; ?>>
<div id="overlay-titlebar" class="clearfix">
<div id="overlay-title-wrapper" class="clearfix">
<h1 id="overlay-title"<?php print $title_attributes; ?>><?php print $title; ?></h1>
</div>
<div id="overlay-close-wrapper">
<a id="overlay-close" href="#" class="overlay-close"><span class="element-invisible"><?php print t('Close overlay'); ?></span></a>
</div>
<?php if ($tabs): ?><h2 class="element-invisible"><?php print t('Primary tabs'); ?></h2><ul id="overlay-tabs"><?php print render($tabs); ?></ul><?php endif; ?>
</div>
<div id="overlay-content"<?php print $content_attributes; ?>>
<?php print $page; ?>
</div>
</div>