first global commit

This commit is contained in:
2020-09-23 15:50:29 +02:00
commit 78adf3a099
6052 changed files with 1221183 additions and 0 deletions
+339
View File
@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
@@ -0,0 +1,191 @@
#themer-toggle {
background: #333;
border-right: 1px solid #000;
border-top: 1px solid #000;
bottom: 0;
color: #fff;
cursor: pointer;
font-size: 100%;
left: 0;
padding: .25em .5em;
position: fixed;
z-index: 10002;
}
#themer-toggle > input {
margin-right: .25em;
}
.devel-themer-wrapper {
display: inline;
margin: 0;
padding: 0;
}
#themer-fixeder {
position: fixed;
right: 10px;
top: 10px;
z-index: 100000;
}
#themer-relativer {
position: relative;
}
#themer-popup {
background-color: #333;
border: 1px solid #000;
color: #fff;
display: none;
font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, Geneva, sans-serif;
font-size: 10px;
line-height: 1.5;
position: absolute;
right: 0;
text-align: left;
width: 400px;
z-index: 100001;
}
#themer-popup h2,
#themer-popup h3,
#themer-popup h4 {
font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, Geneva, sans-serif;
}
#themer-popup a,
#themer-popup a:visited,
#themer-popup span.parent {
border-bottom: 1px dotted #aaa;
color: #fff;
cursor: pointer;
font-weight: bold;
margin-bottom: -4px;
text-decoration: none;
}
#themer-popup .topper {
background: #fff;
background-image: -moz-linear-gradient(top, #888 0%, #444 100%);
background-image: -ms-linear-gradient(top, #888 0%, #444 100%);
background-image: -o-linear-gradient(top, #888 0%, #444 100%);
background-image: -webkit-linear-gradient(top, #888 0%, #444 100%);
background-image: linear-gradient(top, #888 0%, #444 100%);
cursor: move;
height: 20px;
line-height: 20px;
padding: 0 5px;
text-align: center;
}
#themer-popup .close {
cursor: pointer;
float: right;
font-weight: bold;
}
#themer-popup .starter {
font-size: 150%;
line-height: 1.25;
padding: 0 .2em;
}
#themer-popup #parents {
background-color: #222;
padding: .5em;
}
#themer-popup .row {
border-top: 1px solid #777;
margin: 0;
padding: .5em;
}
#themer-popup dl {
margin: 0;
padding: 0;
}
#themer-popup dd {
display: block;
margin: 0 0 12px;
padding: 0 0 0 12px;
}
#themer-popup .info .key {
font-size: 150%;
}
#themer-popup .candidates,
#themer-popup .preprocessors,
#themer-popup .processors {
font-weight: bold;
}
#themer-popup .candidates > .delimiter,
#themer-popup .preprocessors > .delimiter,
#themer-popup .processors > .delimiter {
font-weight: normal;
}
#themer-popup img.throbber {
left: 3px;
position: absolute;
top: 2px;
}
#themer-popup .devel-obj-output,
#themer-popup .krumo-root {
margin: 0;
max-height: 250px;
overflow: auto;
}
#themer-popup .devel-obj-output dt {
cursor: pointer;
}
#themer-popup .devel-obj-output dd {
display: none;
}
#themer-popup .krumo-element {
background: #444;
}
#themer-popup .krumo-expand {
background: #777;
}
#themer-popup .krumo-hover {
background: #000;
}
#themer-popup .krumo-preview {
background: #555;
}
#themer-popup li.krumo-footnote {
display: none;
}
#themer-popup h4 {
color: #999;
font-size: 10px;
font-weight: normal;
margin: 0;
text-align: center;
}
#themer-popup .item-list ul li {
background: none;
list-style: none;
margin: 0;
padding: 0 0 0 .5em;
text-indent: -.5em;
}
#themer-popup .item-list ul li:before {
content: "- ";
}
@@ -0,0 +1,13 @@
name = Theme developer
description = Essential theme API information for theme developers
package = Development
dependencies[] = devel
dependencies[] = simplehtmldom
core = 7.x
files[] = devel_themer.module
; Information added by drupal.org packaging script on 2012-12-19
version = "7.x-1.x-dev"
core = "7.x"
project = "devel_themer"
datestamp = "1355878241"
@@ -0,0 +1,39 @@
<?php
/**
* @file
* Install and uninstall hooks for theme developer
*
*/
function devel_themer_requirements($phase) {
// Ensure translations don't break at install time
$t = get_t();
if ($phase == 'install' || $phase == 'runtime') {
// we need the Optimizer check function
drupal_load('module', 'devel');
if (!devel_is_compatible_optimizer()) {
$requirements['optimizer'] = array(
'title' => $t('Zend Optimizer'),
'description' => $t('You must disable or upgrade the php Zend Optimizer extension in order to enable this feature. The minimum required version is 3.2.8. Earlier versions of Zend Optimizer are <a href="!url">horribly buggy and segfault your Apache.', array('!url' => url('http://drupal.org/node/126098'))),
'severity' => REQUIREMENT_ERROR,
);
}
}
return isset($requirements) ? $requirements : array();
}
function devel_themer_update_6000() {
$ret = array();
drupal_install_schema('devel_themer');
return $ret;
}
// We are now using a file based cache to avoid max_packet_size warning.
function devel_themer_update_6001() {
$ret = array();
db_drop_table($ret, 'cache_devel_themer');
return $ret;
}
@@ -0,0 +1,266 @@
(function ($) {
$(document).ready(function () {
lastObj = false;
strs = Drupal.settings.thmrStrings;
$('body').addClass("thmr_call").attr("id", "thmr_" + Drupal.settings.page_id);
var themerEnabled = 0;
var themerToggle = function () {
themerEnabled = 1 - themerEnabled;
$('#themer-toggle :checkbox').attr('checked', themerEnabled ? 'checked' : '');
$('#themer-popup').css('display', themerEnabled ? 'block' : 'none');
if (themerEnabled) {
document.onclick = themerEvent;
if (lastObj != false) {
$(lastObj).css('outline', '3px solid #999');
}
$('[data-thmr]').hover(
function () {
if (this.parentNode.nodeName != 'BODY' && $(this).attr('thmr_curr') != 1) {
$(this).css('outline', 'red solid 1px');
}
},
function () {
if ($(this).attr('thmr_curr') != 1) {
$(this).css('outline', 'none');
}
}
);
}
else {
document.onclick = null;
if (lastObj != false) {
$(lastObj).css('outline', 'none');
}
$('[data-thmr]').unbind('mouseenter mouseleave');
}
};
$(Drupal.settings.thmr_popup)
.appendTo($('body'));
$('<div id="themer-toggle"><input type="checkbox" />'+ strs.themer_info +'</div>')
.appendTo($('body'))
.click(themerToggle);
$('#themer-popup').resizable();
$('#themer-popup')
.draggable({
opacity: .6,
handle: $('#themer-popup .topper')
})
.prepend(strs.toggle_throbber)
;
// close box
$('#themer-popup .topper .close').click(function() {
themerToggle();
});
});
/**
* Known issue: IE does NOT support outline css property.
* Solution: use another browser
*/
function themerHilight(obj) {
// hilight the current object (and un-highlight the last)
if (lastObj != false) {
$(lastObj).css('outline', 'none').attr('thmr_curr', 0);
}
$(obj).css('outline', '#999 solid 3px').attr('thmr_curr', 1);
lastObj = obj;
}
function themerDoIt(obj) {
if (thmrInPop(obj)) {
return true;
}
// start throbber
//$('#themer-popup img.throbber').show();
var objs = thmrFindParents(obj);
if (objs.length) {
themerHilight(objs[0]);
thmrRebuildPopup(objs);
}
return false;
}
function thmrInPop(obj) {
//is the element in either the popup box or the toggle div?
if (obj.id == "themer-popup" || obj.id == "themer-toggle") return true;
if (obj.parentNode) {
while (obj = obj.parentNode) {
if (obj.id=="themer-popup" || obj.id == "themer-toggle") return true;
}
}
return false;
}
function themerEvent(e) {
if (!e) {
var e = window.event;
};
if (e.target) var tg = e.target;
else if (e.srcElement) var tg = e.srcElement;
return themerDoIt(tg);
}
/**
* Find all parents with @data-thmr"
*/
function thmrFindParents(obj) {
var parents = new Array();
if ($(obj).attr('data-thmr') != undefined) {
parents[parents.length] = obj;
}
if (obj && obj.parentNode) {
while ((obj = obj.parentNode) && (obj.nodeType != 9)) {
if ($(obj).attr('data-thmr') != undefined) {
parents[parents.length] = obj;
}
}
}
return parents;
}
/**
* Check to see if object is a block element
*/
function thmrIsBlock(obj) {
if (obj.style.display == 'block') {
return true;
}
else if (obj.style.display == 'inline' || obj.style.display == 'none') {
return false;
}
if (obj.tagName != undefined) {
var i = blocks.length;
if (i > 0) {
do {
if (blocks[i] === obj.tagName) {
return true;
}
} while (i--);
}
}
return false;
}
function thmrRefreshCollapse() {
$('#themer-popup .devel-obj-output dt').each(function() {
$(this).toggle(function() {
$(this).parent().children('dd').show();
}, function() {
$(this).parent().children('dd').hide();
});
});
}
/**
* Rebuild the popup
*
* @param objs
* The array of the current object and its parents. Current object is first element of the array
*/
function thmrRebuildPopup(objs) {
// rebuild the popup box
var id = objs[0].getAttribute('data-thmr').split(' ').reverse()[0];
// vars is the settings array element for this theme item
var vars = Drupal.settings[id];
// strs is the translatable strings
var strs = Drupal.settings.thmrStrings;
var type = vars.type;
var key = vars.used;
// clear out the initial "click on any element" starter text
$('#themer-popup div.starter').empty();
if (type == 'func') {
// populate the function name
$('#themer-popup dd.key').empty().prepend('<a href="'+ strs.api_site +'api/search/'+ strs.drupal_version +'/'+ key +'" title="'+ strs.drupal_api_docs +'">'+ key +'()</a>');
$('#themer-popup dt.key-type').empty().prepend(strs.function_called);
}
else {
// populate the template name
$('#themer-popup dd.key').empty().prepend(key);
$('#themer-popup dt.key-type').empty().prepend(strs.template_called);
}
// parents
var parents = '';
var parents = strs.parents +' <span class="parents">';
var isFirst = true;
for (i = 0; i < objs.length; i++) {
thmr_ids = objs[i].getAttribute('data-thmr').split(' ').reverse();
for (j = (i==0?1:0); j < thmr_ids.length; j++) {
var thmrid = thmr_ids[j];
var pvars = Drupal.settings[thmrid];
parents += (isFirst) ? '' : '&lt; ';
// populate the parents
// each parent is wrapped with a span containing a 'trig' attribute with the id of the element it represents
parents += '<span class="parent" trig="'+ objs[i].getAttribute('data-thmr') +'">'+ pvars.name +'</span> ';
isFirst = false;
}
}
parents += '</span>';
// stick the parents spans in the #parents div
$('#themer-popup #parents').empty().prepend(parents);
$('#themer-popup span.parent')
.click(function() {
var thmr_id = $(this).attr('trig');
var thmr_obj = $('[data-thmr = "' + thmr_id + '"]')[0];
themerDoIt(thmr_obj);
})
.hover(
function() {
// make them highlight their element on mouseover
$('#'+ $(this).attr('trig')).trigger('mouseover');
},
function() {
// and unhilight on mouseout
$('#'+ $(this).attr('trig')).trigger('mouseout');
}
);
if (vars == undefined) {
// if there's no item in the settings array for this element
$('#themer-popup dd.candidates').empty();
$('#themer-popup dd.preprocessors').empty();
$('#themer-popup div.attributes').empty();
$('#themer-popup div.used').empty();
$('#themer-popup div.duration').empty();
}
else {
$('#themer-popup div.duration').empty().prepend('<span class="dt">' + strs.duration + '</span>' + vars.duration + ' ms');
$('#themer-popup dd.candidates').empty().prepend(vars.candidates.join('<span class="delimiter"> < </span>'));
$('#themer-popup dd.preprocessors').empty().prepend(vars.preprocessors.join('<span class="delimiter"> + </span>'));
$('#themer-popup dt.preprocessors-type').empty().prepend(strs.preprocessors);
$('#themer-popup dd.processors').empty().prepend(vars.processors.join('<span class="delimiter"> + </span>'));
$('#themer-popup dt.processors-type').empty().prepend(strs.processors);
var uri = Drupal.settings.devel_themer_uri + '/' + id;
if (type == 'func') {
// populate the candidates
$('#themer-popup dt.candidates-type').empty().prepend(strs.candidate_functions);
}
else {
$('#themer-popup dt.candidates-type').empty().prepend(strs.candidate_files);
}
// Use drupal ajax to do what we need
vars_div_array = $('div.themer-variables');
vars_div = vars_div_array[0];
// Programatically using the drupal ajax things is tricky, so cheat.
dummy_link = $('<a href="'+uri+'" class="use-ajax">Loading Vars</a>');
$(vars_div).append(dummy_link);
Drupal.attachBehaviors(vars_div);
dummy_link.click();
thmrRefreshCollapse();
}
// stop throbber
//$('#themer-popup img.throbber').hide();
}
})(jQuery);
@@ -0,0 +1,722 @@
<?php
/**
* The name of the attribute used to store the thmr id.
*/
define ('DEVEL_THEMER_ATTRIBUTE', 'data-thmr');
/**
* Implements hook_menu().
*/
function devel_themer_menu() {
$items = array();
$items['admin/config/development/devel_themer'] = array(
'title' => 'Devel Themer',
'description' => 'Display or hide the textual template log',
'page callback' => 'drupal_get_form',
'page arguments' => array('devel_themer_admin_settings'),
'access arguments' => array('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
);
$items['devel_themer/variables/%/%'] = array(
'title' => 'Theme Development AJAX variables',
'page callback' => 'devel_themer_ajax_variables',
'page arguments' => array(2, 3),
'delivery callback' => 'ajax_deliver',
'access arguments' => array('access devel information'),
'type' => MENU_CALLBACK,
);
return $items;
}
/**
* A menu callback used by popup to retrieve variables from cache for a recent page.
*
* @param $request_id
* A unique key that is sent to the browser in Drupal.Settings.devel_themer_request_id
* @param $call
* The theme call for which you wish to retrieve variables.
* @return string
* A chunk of HTML with the devel_print_object() rendering of the variables.
*/
function devel_themer_ajax_variables($request_id, $call) {
$file = "temporary://devel_themer_$request_id";
if ($data = unserialize(file_get_contents($file))) {
$variables = $data[$call]['variables'];
if (has_krumo()) {
$content = krumo_ob($variables);
}
elseif ($data[$call]['type'] == 'func') {
$content = $variables;
}
else {
$content = $variables;
}
}
else {
$content = 'Ajax variables file not found. -' . check_plain($file);
}
$commands[] = ajax_command_replace('div.themer-variables', '<div class="themer-variables">' . $content . '</div>');
return array('#type' => 'ajax', '#commands' => $commands);
}
function devel_themer_admin_settings() {
$form['devel_themer_log'] = array('#type' => 'checkbox',
'#title' => t('Display theme log'),
'#default_value' => variable_get('devel_themer_log', FALSE),
'#description' => t('Display the list of theme templates and theme functions which could have been be used for a given page. The one that was actually used is bolded. This is the same data as the represented in the popup, but all calls are listed in chronological order and can alternately be sorted by time.'),
);
return system_settings_form($form);
}
function devel_themer_init() {
if (user_access('access devel information')) {
// Add requisite libraries.
drupal_add_library('system', 'jquery.form');
drupal_add_library('system', 'drupal.ajax');
drupal_add_library('system', 'ui.draggable');
drupal_add_library('system', 'ui.resizable');
// Add this module's JS and CSS.
$path = drupal_get_path('module', 'devel_themer');
drupal_add_js($path . '/devel_themer.js');
drupal_add_css($path . '/devel_themer.css');
drupal_add_css($path . '/devel_themer_ie_fix.css', array(
'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE),
'media' => 'screen',
'weight' => 20,
'preprocess' => FALSE,
));
// Add krumo JS and CSS. We can't rely on krumo automatically doing this,
// because we add our HTML dynamically after initial page load.
if (has_krumo()) {
$path_to_devel = drupal_get_path('module', 'devel');
// Krumo files don't work correctly when aggregated.
drupal_add_js($path_to_devel . '/krumo/krumo.js', array('preprocess' => FALSE));
drupal_add_css($path_to_devel . '/krumo/skins/default/skin.css', array('preprocess' => FALSE));
}
devel_themer_popup();
if (!devel_silent() && variable_get('devel_themer_log', FALSE)) {
register_shutdown_function('devel_themer_shutdown');
}
}
}
function devel_themer_shutdown() {
print devel_themer_log();
}
/**
* Show all theme templates and functions that could have been used on this page.
*/
function devel_themer_log() {
if (isset($GLOBALS['devel_theme_calls'])) {
foreach ($GLOBALS['devel_theme_calls'] as $counter => $call) {
// Sometimes $call is a string. Not sure why.
if (is_array($call)) {
$id = "devel_theme_log_link_$counter";
$marker = "<div id=\"$id\" class=\"devel_theme_log_link\"></div>\n";
$used = $call['used'];
if ($call['type'] == 'func') {
$name = $call['name'] . '()';
foreach ($call['candidates'] as $item) {
if ($item == $used) {
$items[] = "<strong>$used</strong>";
}
else {
$items[] = $item;
}
}
}
else {
$name = $call['name'];
foreach ($call['candidates'] as $item) {
if ($item == basename($used)) {
$items[] = "<strong>$used</strong>";
}
else {
$items[] = $item;
}
}
}
$rows[] = array($call['duration'], $marker . $name, implode(', ', $items));
unset($items);
}
}
$header = array('Duration (ms)', 'Template/Function', "Candidate template files or function names");
$output = theme('table', $header, $rows);
return $output;
}
}
/**
* Implements hook_theme_registry_alter().
*
* Route all theme hooks to devel_themer_catch_function().
*/
function devel_themer_theme_registry_alter(&$theme_registry) {
foreach ($theme_registry as $hook => $data) {
if (isset($theme_registry[$hook]['function'])) {
// If the hook is a function, store it so it can be run after it has been intercepted.
// This does not apply to template calls.
$theme_registry[$hook]['devel_function_intercept'] = $theme_registry[$hook]['function'];
}
// Add our catch function to intercept functions as well as templates.
$theme_registry[$hook]['function'] = 'devel_themer_catch_function';
// Remove the process and preprocess functions so they are
// only called by devel_themer_theme_twin().
$theme_registry[$hook]['devel_function_preprocess_intercept'] = isset($theme_registry[$hook]['preprocess functions']) ? $theme_registry[$hook]['preprocess functions'] : array();
$theme_registry[$hook]['devel_function_process_intercept'] = isset($theme_registry[$hook]['process functions']) ? $theme_registry[$hook]['process functions'] : array();
$theme_registry[$hook]['preprocess functions'] = array();
$theme_registry[$hook]['process functions'] = array();
}
}
/**
* Implements hook_module_implements_alter().
*
* Ensure devel_themer_theme_registry_alter() runs as late as possible.
*/
function devel_themer_module_implements_alter(&$implementations, $hook) {
if ($hook == 'theme_registry_alter') {
// Unsetting and resetting moves the item to the end of the array.
$group = $implementations['devel_themer'];
unset($implementations['devel_themer']);
$implementations['devel_themer'] = $group;
}
}
/**
* Injects markers into the html returned by theme functions/templates.
*
* Uses simplehtmldom to add a thmr attribute to toplevel html elements.
* A toplevel text element will be wrapped in a span.
*
* @param string $html
* @param string $marker
*/
function devel_themer_inject_markers($html, $marker) {
if (!module_exists('simplehtmldom')) {
drupal_set_message(t('<a href="http://drupal.org/project/simplehtmldom">Simplehtmldom</a> module is missing and required by Theme developer.'), 'error', FALSE);
return $html;
}
$html_dom = new simple_html_dom();
$html_dom->load($html);
foreach ($html_dom->root->nodes as $element) {
if ($element->nodetype == HDOM_TYPE_TEXT) {
if (trim($element->innertext) !== '') {
$element->innertext = "<span " . DEVEL_THEMER_ATTRIBUTE . "='$marker' class='devel-themer-wrapper'>{$element->innertext}</span>";
}
}
elseif ($element->hasAttribute(DEVEL_THEMER_ATTRIBUTE)) {
$element->setAttribute(DEVEL_THEMER_ATTRIBUTE, "$marker " . $element->getAttribute(DEVEL_THEMER_ATTRIBUTE));
}
else {
$element->setAttribute(DEVEL_THEMER_ATTRIBUTE, $marker);
}
}
$html = (string)$html_dom;
// Release memory.
$html_dom->clear();
unset($html_dom);
return $html;
}
/**
* Intercepts all theme calls (including templates), adds to template log, and dispatches to original theme function.
*/
function devel_themer_catch_function() {
$trace = debug_backtrace(FALSE);
$hook = $trace[1]['args'][0];
if (sizeof($trace[1]['args']) > 1) {
$variables = $trace[1]['args'][1];
if (!is_array($variables)) {
watchdog('devel_themer', 'Variables should be passed as an associative array to the theme hook !hook.', array('!hook' => is_array($hook) ? implode(', ', $hook) : $hook), WATCHDOG_ERROR);
}
}
else {
$variables = array();
}
$counter = devel_counter();
$variables['thmr_key'] = "thmr_" . $counter;
$timer_name = "thmr_$counter";
timer_start($timer_name);
// The twin of theme(). All rendering done through here.
list($return, $meta) = devel_themer_theme_twin($hook, $variables);
$time = timer_stop($timer_name);
if (!empty($return) && !is_array($return) && !is_object($return) && user_access('access devel information')) {
$key = "thmr_$counter";
// Check for themer attribute in content returned. Apply word boundaries so
// that 'thmr_10' doesn't match 'thmr_1'.
if (!preg_match("/\\b$key\\b/", $return)) {
// Exclude wrapping a SPAN around content returned by theme functions
// whose result is not intended for HTML usage.
$exclude = array('options_none');
// theme_html_tag() is a low-level theme function intended primarily for
// markup added to the document HEAD.
$exclude[] = 'html_tag';
// DATE MODULE: Inline labels for date select lists shouldn't be wrapped.
if (strpos($meta['hook'], 'date_part_label_') === 0 && $variables['element']['#type'] == 'date_select' && $variables['element']['#date_label_position'] == 'within') {
$exclude[] = $hook;
}
if (!in_array($hook, $exclude)) {
$return = devel_themer_inject_markers($return, $key);
}
}
if ($meta['type'] == 'func') {
$name = $meta['hook'];
$used = $meta['used'];
global $theme;
$candidates = array();
foreach (array_reverse($meta['suggestions']) as $suggestion) {
$candidates[] = "{$theme}_{$suggestion}";
}
$candidates[] = "{$theme}_{$name}";
if (empty($meta['variables'])) {
$variables = array();
}
}
else {
$name = strtr($meta['hook'], '_', '-') . $meta['extension'];
$candidates = array();
foreach (array_reverse($meta['suggestions']) as $suggestion) {
$candidates[] = strtr($suggestion, '_', '-') . $meta['extension'];
}
$candidates[] = $name;
$used = $meta['used'];
}
// Set preprocessors.
if (isset($meta['processor_functions']['preprocess functions'])) {
$preprocessors = $meta['processor_functions']['preprocess functions'];
}
else {
$preprocessors = array();
}
// Set processors.
if (isset($meta['processor_functions']['process functions'])) {
$processors = $meta['processor_functions']['process functions'];
}
else {
$processors = array();
}
// This variable gets sent to the browser in Drupal.settings.
$GLOBALS['devel_theme_calls'][$key] = array(
'id' => $key,
'name' => $name,
'used' => $used,
'type' => $meta['type'],
'duration' => $time['time'],
'candidates' => $candidates,
'preprocessors' => $preprocessors,
'processors' => $processors,
);
// Remove some things from variables to reduce size of item in crumo
unset($meta['variables']['page']);
// This variable gets serialized and cached on the server.
$GLOBALS['devel_themer_server'][$key] = array(
'variables' => $meta['variables'],
'type' => $meta['type'],
);
}
return $return;
}
/**
* Nearly clones the Drupal API theme() function, but returns meta information in addition to the rendered output.
*
* Usage:
* @code
* list($output, $meta) = devel_themer_theme_twin($hook, $variables);
* @endcode
*
* @return
* An array with two items:
* - $output: The rendered HTML.
* - $meta: An associative array with the following keys:
* - 'wildcards': Candidate hooks which have been looked at but don't have
* an implementation.
* - 'hook': The first found hook with an implementation.
* - 'path': The path to the theme that implements $meta['hook'].
* @todo Document remaining keys.
*/
function devel_themer_theme_twin($hook, $variables) {
static $hooks = NULL;
$thmr_key = $variables['thmr_key'];
unset($variables['thmr_key']);
$meta = array();
$meta['name'] = $hook;
// If called before all modules are loaded, we do not necessarily have a full
// theme registry to work with, and therefore cannot process the theme
// request properly. See also _theme_load_registry().
if (!module_load_all(NULL) && !defined('MAINTENANCE_MODE')) {
throw new Exception(t('theme() may not be called until all modules are loaded.'));
}
if (!isset($hooks)) {
drupal_theme_initialize();
$hooks = theme_get_registry();
}
// If an array of hook candidates were passed, use the first one that has an
// implementation.
if (is_array($hook)) {
foreach ($hook as $candidate) {
if (isset($hooks[$candidate])) {
break;
}
$meta['wildcards'][] = $candidate;
}
$hook = $candidate;
}
// If there's no implementation, check for more generic fallbacks. If there's
// still no implementation, log an error and return an empty string.
if (!isset($hooks[$hook])) {
// Iteratively strip everything after the last '__' delimiter, until an
// implementation is found.
while ($pos = strrpos($hook, '__')) {
$hook = substr($hook, 0, $pos);
if (isset($hooks[$hook])) {
break;
}
$meta['wildcards'][] = $hook;
}
if (!isset($hooks[$hook])) {
// Only log a message when not trying theme suggestions ($hook being an
// array).
if (!isset($candidate)) {
watchdog('theme', 'Theme key "@key" not found.', array('@key' => $hook), WATCHDOG_WARNING);
}
return array('', $meta);
}
}
$meta['hook'] = $hook;
$info = $hooks[$hook];
$meta['path'] = isset($info['theme path']) ? $info['theme path'] : NULL;
global $theme_path;
$temp = $theme_path;
// point path_to_theme() to the currently used theme path:
$theme_path = isset($info['theme path']) ? $info['theme path'] : NULL;
// Include a file if the theme function or variable processor is held elsewhere.
if (!empty($info['includes'])) {
foreach ($info['includes'] as $include_file) {
include_once DRUPAL_ROOT . '/' . $include_file;
}
}
// If a renderable array is passed as $variables, then set $variables to
// the arguments expected by the theme function.
if (isset($variables['#theme']) || isset($variables['#theme_wrappers'])) {
$element = $variables;
$variables = array();
if (isset($info['variables'])) {
foreach (array_keys($info['variables']) as $name) {
if (isset($element["#$name"])) {
$variables[$name] = $element["#$name"];
}
}
}
else {
$variables[$info['render element']] = $element;
}
}
// Merge in argument defaults.
if (!empty($info['variables'])) {
$variables += $info['variables'];
}
elseif (!empty($info['render element'])) {
$variables += array($info['render element'] => array());
}
// Add the themer attribute here
$variables['attributes_array'][DEVEL_THEMER_ATTRIBUTE] = $thmr_key;
// Invoke the variable processors, if any. The processors may specify
// alternate suggestions for which hook's template/function to use. If the
// hook is a suggestion of a base hook, invoke the variable processors of
// the base hook, but retain the suggestion as a high priority suggestion to
// be used unless overridden by a variable processor function.
if (isset($info['base hook'])) {
$base_hook = $info['base hook'];
$base_hook_info = $hooks[$base_hook];
// Return the preprocessor functions to their original state
$base_hook_info['preprocess functions'] = $base_hook_info['devel_function_preprocess_intercept'];
$base_hook_info['process functions'] = $base_hook_info['devel_function_process_intercept'];
if (isset($base_hook_info['preprocess functions']) || isset($base_hook_info['process functions'])) {
$variables['theme_hook_suggestion'] = $hook;
$hook = $base_hook;
$info = $base_hook_info;
}
}
$info['preprocess functions'] = $info['devel_function_preprocess_intercept'];
$info['process functions'] = $info['devel_function_process_intercept'];
if (isset($info['preprocess functions']) || isset($info['process functions'])) {
$variables['theme_hook_suggestions'] = array();
foreach (array('preprocess functions', 'process functions') as $phase) {
if (!empty($info[$phase])) {
foreach ($info[$phase] as $processor_function) {
$meta['processor_functions'][$phase][] = $processor_function;
if (function_exists($processor_function)) {
// We don't want a poorly behaved process function changing $hook.
$hook_clone = $hook;
$processor_function($variables, $hook_clone);
}
}
}
}
// If the preprocess/process functions specified hook suggestions, and the
// suggestion exists in the theme registry, use it instead of the hook that
// theme() was called with. This allows the preprocess/process step to
// route to a more specific theme hook. For example, a function may call
// theme('node', ...), but a preprocess function can add 'node__article' as
// a suggestion, enabling a theme to have an alternate template file for
// article nodes. Suggestions are checked in the following order:
// - The 'theme_hook_suggestion' variable is checked first. It overrides
// all others.
// - The 'theme_hook_suggestions' variable is checked in FILO order, so the
// last suggestion added to the array takes precedence over suggestions
// added earlier.
$suggestions = array();
if (!empty($variables['theme_hook_suggestions'])) {
$suggestions = $variables['theme_hook_suggestions'];
}
if (!empty($variables['theme_hook_suggestion'])) {
$suggestions[] = $variables['theme_hook_suggestion'];
}
foreach (array_reverse($suggestions) as $suggestion) {
if (isset($hooks[$suggestion])) {
$info = $hooks[$suggestion];
break;
}
}
}
// Tidy up the theme things here.
if (isset($info)) {
unset($info['function']);
if (isset($info['devel_function_intercept'])) {
$info['function'] = $info['devel_function_intercept'];
}
$meta['hook'] = $hook;
$meta['path'] = isset($info['theme path']) ? $info['theme path'] : NULL;
}
// Generate the output using either a function or a template.
$output = '';
if (isset($info['function'])) {
if (function_exists($info['function'])) {
$output = $info['function']($variables);
$meta['type'] = 'func';
$meta['used'] = $info['function'];
$meta['suggestions'] = $suggestions;
}
}
else {
// Default render function and extension.
$render_function = 'theme_render_template';
$extension = '.tpl.php';
// The theme engine may use a different extension and a different renderer.
global $theme_engine;
if (isset($theme_engine)) {
if ($info['type'] != 'module') {
if (function_exists($theme_engine . '_render_template')) {
$render_function = $theme_engine . '_render_template';
}
$extension_function = $theme_engine . '_extension';
if (function_exists($extension_function)) {
$extension = $extension_function();
}
}
}
// In some cases, a template implementation may not have had
// template_preprocess() run (for example, if the default implementation is
// a function, but a template overrides that default implementation). In
// these cases, a template should still be able to expect to have access to
// the variables provided by template_preprocess(), so we add them here if
// they don't already exist. We don't want to run template_preprocess()
// twice (it would be inefficient and mess up zebra striping), so we use the
// 'directory' variable to determine if it has already run, which while not
// completely intuitive, is reasonably safe, and allows us to save on the
// overhead of adding some new variable to track that.
if (!isset($variables['directory'])) {
$default_template_variables = array();
template_preprocess($default_template_variables, $hook);
$variables += $default_template_variables;
}
// Render the output using the template file.
$template_file = $info['template'] . $extension;
if (isset($info['path'])) {
$template_file = $info['path'] . '/' . $template_file;
}
$meta['type'] = 'tpl';
$meta['used'] = $template_file;
$meta['extension'] = $extension;
$meta['suggestions'] = $suggestions;
$meta['template_file'] = $template_file;
$meta['preprocessors'] = isset($info['preprocess functions']) ? $info['preprocess functions'] : array();
$output = $render_function($template_file, $variables);
}
$meta['variables'] = $variables;
// restore path_to_theme()
$theme_path = $temp;
return array($output, $meta);
}
// We save the huge js array here instead of hook_footer so we can catch theme('page')
function devel_themer_exit() {
// TODO: limit to html pages only $router_item = menu_get_item();
//delivery_callback
if (!empty($GLOBALS['devel_theme_calls']) && $_SERVER['REQUEST_METHOD'] != 'POST') {
// A random string that is sent to the browser. It enables the popup to retrieve params/variables from this request.
$request_id = uniqid(rand());
// Write the variables information to the a file. It will be retrieved on demand via AJAX.
// We used to write this to DB but was getting 'Warning: Got a packet bigger than 'max_allowed_packet' bytes'
// Writing to temp dir means we don't worry about folder existence/perms and cleanup is free.
try {
$file = file_save_data(serialize($GLOBALS['devel_themer_server']), "temporary://devel_themer_$request_id", FILE_EXISTS_REPLACE);
}
catch (Exception $e) {
$file = file_save_data(serialize(array("unables to save variables, probably due to pdo")), "temporary://devel_themer_$request_id", FILE_EXISTS_REPLACE);
}
// file_save_data() saves the file with permanent status. Change this to
// temporary so that system_cron() garbage collects them.
$file->status = 0;
file_save($file);
$GLOBALS['devel_theme_calls']['request_id'] = $request_id;
$GLOBALS['devel_theme_calls']['devel_themer_uri'] = url("devel_themer/variables/$request_id");
print '<script type="text/javascript">jQuery.extend(Drupal.settings, ' . drupal_json_encode($GLOBALS['devel_theme_calls']) . ");</script>\n";
}
}
// just hand out next counter, or return current value
function devel_counter($increment = TRUE) {
static $counter = 0;
if ($increment) {
$counter++;
}
return $counter;
}
/**
* Return the popup template
* placed here for easy editing
*/
function devel_themer_popup() {
$majorver = substr(VERSION, 0, strpos(VERSION, '.'));
// add translatable strings
drupal_add_js(array('thmrStrings' =>
array(
'themer_info' => t('Themer info'),
'toggle_throbber' => ' <img src="' . base_path() . drupal_get_path('module', 'devel_themer') . '/loader-little.gif' . '" alt="' . t('loading') . '" class="throbber" width="16" height="16" style="display:none" />',
'parents' => t('Parents:') . ' ',
'function_called' => t('Function called:') . ' ',
'template_called' => t('Template called:') . ' ',
'candidate_files' => t('Candidate template files:') . ' ',
'preprocessors' => t('Preprocess functions:') . ' ',
'processors' => t('Process functions:') . ' ',
'candidate_functions' => t('Candidate function names:') . ' ',
'drupal_api_docs' => t('link to Drupal API documentation'),
'source_link_title' => t('link to source code'),
'function_arguments' => t('Function Arguments'),
'template_variables' => t('Template Variables'),
'file_used' => t('File used:') . ' ',
'duration' => t('Duration:') . ' ',
'api_site' => variable_get('devel_api_site', 'http://api.drupal.org/'),
'drupal_version' => $majorver,
'source_link' => url('devel/source', array('query' => array('file' => ''))),
))
, 'setting');
$title = t('Drupal Themer Information');
$intro = t('Click on any element to see information about the Drupal theme function or template that created it.');
$popup = <<<EOT
<div id="themer-fixeder">
<div id="themer-relativer">
<div id="themer-popup">
<div class="topper">
<span class="close">X</span> $title
</div>
<div id="parents" class="row">
</div>
<div class="info row">
<div class="starter">$intro</div>
<dl>
<dt class="key-type">
</dt>
<dd class="key">
</dd>
<div class="used">
</div>
<dt class="candidates-type">
</dt>
<dd class="candidates">
</dd>
<dt class="preprocessors-type">
</dt>
<dd class="preprocessors">
</dd>
<dt class="processors-type">
</dt>
<dd class="processors">
</dd>
<div class="duration"></div>
</dl>
</div><!-- /info -->
<div class="attributes row">
<div class="themer-variables"></div>
</div><!-- /attributes -->
</div><!-- /themer-popup -->
</div>
</div>
EOT;
drupal_add_js(array('thmr_popup' => $popup), 'setting');
}
@@ -0,0 +1,9 @@
#themer-fixeder {
position: absolute !important;
}
#themer-toggle {
bottom: auto !important;
position: absolute !important;
top: 0 !important;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B