Merge branch 'translators' into showroom

This commit is contained in:
Bachir Soussi Chiadmi 2016-11-21 10:50:21 +01:00
commit cc295255a1
39 changed files with 5073 additions and 1572 deletions

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.

View File

@ -0,0 +1,2 @@
Features Translations adds a Features component "Translations" that allows to import/export sets of translated strings.
String sets can be chosen per language and per text group.

View File

@ -0,0 +1,14 @@
name = Features Translations
description = Import and export string translations with Features.
core = 7.x
package = Features
dependencies[] = features
dependencies[] = locale
; Information added by Drupal.org packaging script on 2015-06-06
version = "7.x-2.0"
core = "7.x"
project = "features_translations"
datestamp = "1433614686"

View File

@ -0,0 +1,198 @@
<?php
/**
* Implementation of hook_features_api().
*/
function features_translations_features_api() {
$translations = array();
// Legacy option - we don't write to it anymore.
$translations['translations'] = array(
'name' => t('Translations'),
'default_hook' => 'translations_defaults',
'feature_source' => TRUE,
'default_file' => FEATURES_DEFAULTS_INCLUDED,
);
foreach (language_list() as $langcode => $language) {
$machine_langcode = strtr($langcode, array('-' => '_'));
$translations["translations_{$machine_langcode}"] = array(
'name' => t('Translations: !name', array('!name' => t($language->name))),
'default_hook' => "translations_{$machine_langcode}_defaults",
'feature_source' => TRUE,
'base' => 'translations',
'default_file' => FEATURES_DEFAULTS_INCLUDED,
'supersedes' => 'translations',
);
}
return $translations;
}
/**
* Implementation of hook_features_export_options().
*/
function translations_features_export_options($component) {
// Ignore legacy option.
if ($component == 'translations') return array();
$options = array();
$textgroups = module_invoke_all('locale', 'groups');
list(,$machine_langcode) = explode('_', $component, 2);
$langcode = strtr($machine_langcode, array('_' => '-'));
$languages = language_list();
$language = $languages[$langcode];
foreach ($textgroups as $textgroup => $label) {
if ($textgroup == 'default' && $langcode == 'en') continue;
if ($textgroup != 'default' && $langcode == translations_features_string_source_language()) continue;
$options[$machine_langcode . ':' . $textgroup] = t($language->name) . ': ' . $label;
}
return $options;
}
/**
* Helper to return site's string source language.
*/
function translations_features_string_source_language() {
if (module_exists('i18n_string')) {
return i18n_string_source_language();
}
return language_default('language');
}
/**
* Implementation of hook_features_export().
*/
function translations_features_export($data, &$export, $module_name) {
foreach ($data as $component) {
list($machine_langcode,) = explode(':', $component);
$export['features']["translations_{$machine_langcode}"][$component] = $component;
}
$export['dependencies']['features'] = 'features';
$export['dependencies']['features_translations'] = 'features_translations';
return array();
}
/**
* Implementation of hook_features_export_render().
*/
function translations_features_export_render($module_name, $data, $export = NULL) {
$languages = language_list();
$code = array(
' $translations = array();',
' $translatables = array();',
);
$machine_langcode = ''; // won't change in the loop
foreach ($data as $component) {
list($machine_langcode, $textgroup) = explode(':', $component);
$langcode = strtr($machine_langcode, array('_' => '-'));
$strings = _features_translations_locale_export_get_strings($languages[$langcode], $textgroup);
foreach ($strings as $md5 => $string) {
$code[] = " \$translations['{$machine_langcode}:{$textgroup}']['{$md5}'] = " . features_var_export($string, ' ') . ";";
// potx compatibility
$code[] = " \$translatables[] = t('" .
str_replace("'", "\'", $string->source) .
"', array(), array('context' => '" .
str_replace("'", "\'", $string->context) .
"'));";
}
}
$code[] = ' return $translations;';
$code = implode("\n", $code);
return array("translations_{$machine_langcode}_defaults" => $code);
}
/**
* Implementation of hook_features_revert().
*/
function translations_features_revert($module_name, $component) {
include_once('includes/locale.inc');
$translations = features_get_default($component, $module_name);
if (!empty($translations)) {
$report = array('updates' => 0, 'skips' => 0, 'additions' => 0, 'deletes' => 0);
$lids = array();
foreach ($translations as $key => $strings) {
list($machine_langcode, $textgroup) = explode(':', $key);
$langcode = strtr($machine_langcode, array('_' => '-'));
foreach ($strings as $md5 => $string) {
if (!empty($string['plid'])) {
if (!isset($lids[$string['plid']])) {
watchdog('features', 'Translations: importing plid %plid not found for string %source', array(
'%plid' => $string['plid'],
'%source' => $string['source'],
), WATCHDOG_WARNING);
$string['plid'] = 0;
}
else {
$string['plid'] = $lids[$string['plid']];
}
}
$lids[$md5] = _locale_import_one_string_db(
$report,
$langcode,
$string['context'],
$string['source'],
$string['translation'],
$textgroup,
$string['location'],
LOCALE_IMPORT_OVERWRITE,
$string['plid'],
$string['plural']
);
if (module_exists('l10n_update')) {
// Set the "string is customized" flag so featured translations can roundtrip.
db_update('locales_target')
->fields(array(
// Use literal here as the named constant is not available globally in some versions.
'l10n_status' => 1,
))
->condition('language', $langcode)
->condition('lid', $lids[$md5])
->execute();
}
}
}
watchdog('features', 'Translations: results for importing feature %feature: %report', array(
'%feature' => $module_name . ':' . $component,
'%report' => var_export($report, TRUE),
), WATCHDOG_INFO);
}
return TRUE;
}
/**
* Helper to return translated strings in given language and group.
*/
function _features_translations_locale_export_get_strings($language, $group) {
$query = db_select('locales_source', 's');
$query->join('locales_target', 't', 's.lid = t.lid');
$query->fields('s', array('lid', 'source', 'context', 'location'));
$query->fields('t', array('translation', 'plid', 'plural'));
$query->addExpression('MD5(CONCAT(s.source, s.context))', 'source_md5');
$query->condition('t.language', $language->language);
$query->condition('s.textgroup', $group);
//exclude unchanged lids
if (module_exists('l10n_update')) {
// Use literal here as the named constant is not available globally in some versions.
$query->condition('t.l10n_status', 0, '<>');
}
$query->orderBy('t.plural', 'ASC')->orderBy('source_md5', 'ASC');
$result = $query->execute()->fetchAll();
$strings = array();
$lids = array();
foreach ($result as $string) {
$md5 = $string->source_md5;
$lids[$string->lid] = $md5;
if (!empty($string->plid)) {
if (!isset($lids[$string->plid])) {
watchdog('features', 'Translations: exporting plid %plid not found for string %source.', array('%plid' => $string->plid, '%source' => $string->source));
$string->plid = 0;
}
else {
$string->plid = $lids[$string->plid];
}
}
unset($string->lid, $string->source_md5); // don't want those in the export
$strings[$md5] = $string;
}
return $strings;
}

View File

@ -0,0 +1,3 @@
.project
.settings
/.idea

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,389 @@
/**
* Prevent page width change when scroll is required.
* Helps reduce screen redraws.
*/
body.page-admin-people-permissions {
overflow-y: scroll;
}
#user-admin-permissions.ctools-use-modal-processed .compact-link {
display:none;
}
/* Disable the hand tool styling that admin_menu adds for module rows. */
.fpa-container tr.admin-menu-tweak-permissions-processed {
cursor: default;
}
.fpa-container .form-submit {
margin: 1em;
}
/**
* Prevent vertical jitter of dummy checkboxes.
*/
.fpa-container .dummy-checkbox {
vertical-align: middle;
}
.fpa-container {
width: 100%;
}
/**
* Override admin_menu's "Collapse module groups on the Permissions page" functionality.
*/
.fpa-container tr.element-hidden {
display: table-row;
}
.fpa-left-section,
.fpa-right-section {
display: table-cell;
border: 1px solid #D6DBDE;
vertical-align: top;
}
.fpa-left-section {
background-color: #F6F6F6;
width: 1px; /* Keep column as small as possible. Table cells automatically push wider. */
}
.fpa-left-section .item-list ul {
background-color: #EFEFEF;
list-style: none;
margin:0;
padding: 0;
text-align: left;
}
.fpa-left-section .item-list li {
background-color: inherit;
border-bottom: 1px solid #D6DBDE;
cursor: pointer;
font-size: 90%;
line-height: 100%;
margin: 0;
padding: 0;
list-style: none;
white-space: nowrap;
position: relative; /* Fix for IE disappearing bg with negative margin */
}
.fpa-left-section .item-list li > div {
display: table;
width: 100%;
}
.fpa-left-section .item-list li a,
.fpa-left-section .item-list li .fpa-perm-total {
display: table-cell;
padding: 0.5em;
}
.fpa-left-section .item-list li .fpa-perm-total {
min-width: 6em;
}
.fpa-left-section .item-list li a {
text-decoration: none;
color: inherit;
}
.fpa-left-section .item-list li .fpa-perm-total {
text-align: right;
}
.fpa-right-section {
width: 100%;
background-color: white;
border-left-width: 0;
}
.fpa-filter-form {
.form-item {
display: inline-block;
padding: 3px 10px;
vertical-align: top;
float: none;
}
.form-checkboxes .form-type-checkbox,
.form-radios .form-type-radio {
display: block;
}
}
.fpa-filter-form .clear-search {
cursor: pointer;
display: inline-block;
}
.fpa-right-section .fpa-table-wrapper {
padding: 10px;
}
/**
* Module filter 2.x has a simple permissions filter. Hide this if FPA is enabled.
*/
.fpa-table-wrapper .module-filter-inputs-wrapper .form-item-module-filter-name {
display: none;
}
/**
* CTools attempts some styling to compact forms, looks bad with FPA.
*/
div.ctools-modal-content .fpa-container .form-item label {
float: none;
width: auto;
}
/*
* Rubik has some aggressive styling which makes FPA look poor, reset it here.
*/
.fpa-container .block,
.fpa-container .item-list,
.fpa-container .help-items ul,
.fpa-container .form-item,
.fpa-container .confirmation ul,
.fpa-container .admin-list,
.fpa-container .node-type-list,
.fpa-container .admin-panel {
border-width: 0;
}
/**
* Styling for matching permissions counter.
*/
.fpa-left-section li[fpa-module] {
counter-reset: fpa-module-permissions;
}
.fpa-perm-counter {
display: inline;
counter-increment: fpa-module-permissions;
}
.fpa-perm-total:before {
content: counter(fpa-module-permissions);
}
.fpa-perm-total:after {
content: " of " attr(fpa-total);
}
.fpa-toggle-container {
padding: 0.5em;
}
.fpa-toggle-container a {
margin: 0.5em;
}
.fpa-hide-descriptions table#permissions .description {
display: none;
}
.fpa-table-wrapper tr:before {
white-space: nowrap;
.fpa-hide-system-names & {
display: none;
}
}
// Need to have this to now interfere with admin_menu.
.fpa-table-wrapper thead tr:before {
content: "System Name";
display: table-cell;
border-bottom: 3px solid #ccc;
padding-right: 1em;
text-align: left;
vertical-align: middle;
padding: 8px 10px;
border: 0;
color: #000;
text-transform: uppercase;
background: #e1e2dc;
font-weight: normal;
border-width: 1px;
border-style: solid;
border-color: #bebfb9;
}
.fpa-table-wrapper tbody tr {
&:before {
content: attr(fpa-system-name);
display: table-cell;
vertical-align: middle;
padding: 8px 10px;
border: 0;
color: #000;
text-align: left;
}
&.fpa-module-row:before {
font-weight: bold;
}
&.fpa-permission-row:before {
padding-left: 1.5em;
}
}
/**
* Styling for injected checkboxes.
*/
.fpa-table-wrapper th.checkbox {
vertical-align: bottom;
}
.fpa-table-wrapper th input[type="checkbox"] {
display: block;
margin: 0.5em auto;
}
.fpa-hide-descriptions a[fpa-toggle-class="fpa-hide-descriptions"]:before {
content: attr(show);
}
a[fpa-toggle-class="fpa-hide-descriptions"]:before {
content: attr(hide);
}
.fpa-hide-system-names a[fpa-toggle-class="fpa-hide-system-names"]:before {
content: attr(show);
}
a[fpa-toggle-class="fpa-hide-system-names"]:before {
content: attr(hide);
}
#user-admin-permissions .form-submit.fpa-clear-search {
margin: 0;
}
.fpa-mobile input[type="checkbox"] {
width: 4em;
height: 4em;
}
.fpa-permission-container {
display: table;
width: 100%;
}
.fpa-row-toggle-container {
display: table-cell;
vertical-align: middle;
width: 2em;
text-align: center;
}
td.checkbox,
.fpa-row-toggle-container {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#permissions td {
text-align: center;
}
#permissions td.permission,
#permissions td.module {
text-align: left;
}
/**
* [checked] is HTML attribute. ':checked' selector is based on DOM property.
*
* IE: Both :checked and box-shadow are only supported on IE9+, so <=IE8 will not see this feature at all.
*/
.fpa-table-wrapper td.checkbox input[type="checkbox"] {
border-collapse: separate;
// [checked] = state of page load.
// :checked = current state.
&:not([checked]):checked {
box-shadow: 0px 0px 10px 6px rgba(0, 255, 0, 0.5);
}
&[checked]:not(:checked) {
box-shadow: 0px 0px 10px 6px rgba(255, 0, 0, 0.5);
}
}
/**
* Hide aspects of FPA that depend on JS.
*/
.fpa-checkboxes-toggle {
visibility: hidden;
}
html.js .fpa-checkboxes-toggle {
visibility: inherit;
}
.fpa-filter-form {
display: none;
}
html.js .fpa-filter-form {
display: block;
}
/**
* Tweak how the table is initially displayed to prevent premature reflow.
*
* The table is displayed with a <style /> tag immediately after in the HTML.
*/
#permissions {
display: none;
}
.fpa-table-wrapper {
background-repeat: no-repeat;
background-position: center -18px;
background-image: url('data:image/gif;base64,R0lGODlhDwAoAMQAAAAAAAhzvQx7vRh7xhyExjWQykaczlqi02uv2Iu/4bW1taDO57XW7729vb3e78bGxs7OztbW1t7e3sri89bn997v9+fn5+fv9+f3/+/v7+/3//f39/f3//f//////wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBgAAACwAAAAADwAoAAAFxiAgApkUWduoAhukvC+UqlujNFD0vI2nuo8ZyRYZZW5C0VExkyiKK8DOIoooJFGAFQtwQldTJXK1FAKFGSLNpsjtbj6aC/ZMqkone3bP7/v/gIGCfhQJCAsVexUGAY2NBxorFQIBAgQBl5gcKowFFQkBCROXCCMUlRceoAkeE42RAAsBCB6qobWMDCIIt7asHrwJIqC0HgwHDLgBugCnAqm1ta4BsACdFdETA7Mqk40GCIyaKxfijgjVKxQLh4mD7/Dx8vIhAAAh+QQFBgAAACwAABQADQANAAAFRyAgAtOSANqoriI3XgQQFEchFunqcUQwvCpPImBwiC6rikxpc5wQooNKulgApIALwjVyTGQskcAzinVZ5qsNsA5HkSvkaRUCACH5BAUGAAAALAAAFAANAA0AAAU/ICAC11iNY4mKKnCKxsqtoudNwjgBweg5hZ7AIzqwjAECDSVI0BAoVYEFyK0cvFZhJ+KmRtOYSGNazlZe8igEACH5BAUGAAAALAAAFAANAA0AAAVIICACVIKMKFClooYKAIwYIsGmtkjFqOdNgIALcAI4EsiEjXFKiJyBaACARDEO2MNydwMChqLVTQUDGIoAAmd0YSHAo91JLAoBACH5BAUGAAAALAAAFAANAA0AAAVJICAC05IA2qiuIjdeBBAUx1ikbH7lgCPuqgvi4vEUeieEqCZIeGqLBaAG2AUChKNjIlM5CgGAwDOKjRyClXl6BLR5U2AQcFqFAAAh+QQFBgAAACwAABQADQANAAAFQCAgAtdYjWOJiipwigZQjNy6DuMEBLYueKIDqgaI2UQJ4AohqvAqShJAMEoEDI5dq6DjEHio7UpjOhJROhF5FAIAIfkEBQYAAAAsAAAUAA0ADQAABUUgIAIUgIwoUKWihgoAjBgiwaa2WMJ34JoiR8KBYpwSIuToqEwCEh4AjVEaJQLQSQtVuSYmAy6PEMgROKMLC/FDlU6rUQgAIfkEBQYAAAAsAAAUAA0ADQAABUYgIAITkADaqK4iN14EEBTHWKRsfuWAI+6qCwJX6J0QohoSUFssmL2AACdylAKAQmDhGQm6osHM4/GtYtlDMcsbHYBBEysEACH5BAUGAAAALAAAFAANAA0AAAVBICAC11iNY4mKKnCKBlCM3LoO4wQEti54ooPoVAPEUJwEzwYj8BCjGUkUMFCAAMeuRZhgdagWbKQxMYsoMKA8CgEAIfkEBQYAAAAsAAAUAA0ADQAABUkgIAJUgowoUKWihgoAjBgiwaa2SMU3EGgJAOFAPDBQjFNgKQoCTs5CYppwiGiMneDi8YwmrVFh1avAAIZTjTO6sBCu1O5EFoUAACH5BAUGAAAALAAAFAANAA0AAAVIICAC05IA2qiuIjdeBBAUx1ikY8yKlxwYlJGDtwAYCIEAAlcAOE4IzgmAENWKgIPHU4mqHBPZDiDw5L4sXbYJYI+zvVVvqgoBACH5BAUGAAAALAAAFAANAA0AAAVBICAC11iNY4mKKnCixcitQSwO48QWwSLqAo/o4HEABCPDyuM5rFAIFkAjspWQK2OgVdD9VlyAUkQVvVazlXeKCgEAOw==');
min-height: 18px;
}
.fpa-role-styles,
.fpa-perm-styles {
display: none;
}
.fpa-wrapper {
display: table;// Need this to go full width.
}
.dummy-checkbox {
display: none;
}
.fpa-authenticated-role-behavior {
input[type="checkbox"] {
display: none;
&.rid-1, &.rid-2, &.dummy-checkbox {
display: inline-block;
}
}
}

View File

@ -0,0 +1,66 @@
<?php
/**
* @file
* Contains form alter hooks to inject FPA functionality.
*/
/**
* Implements hook_form_FORM_ID_alter().
*/
function fpa_form_node_type_form_alter(&$form, &$form_state) {
if (!empty($form['type']['#default_value']) && user_access('administer permissions')) {
fpa_fieldset($form['#node_type']->type . ' content', $form, array('#group' => 'additional_settings'));
}
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function fpa_form_user_admin_permissions_alter(&$form, &$form_state) {
// Prevent duplication of memory limit warning.
if (module_exists('filter_perms') && empty($form_state['input'])) {
$memory_limit = ini_get('memory_limit');
if (!drupal_check_memory_limit(_fpa_memory_required() . 'b', $memory_limit)) {
drupal_set_message(t('If you attempt to display all roles and permissions on this page at the same time, you will most likely exceed your PHP memory limit of %memory_limit.', array('%memory_limit' => $memory_limit)), 'warning');
}
}
$form['#theme'] = array('fpa_user_admin_permissions');
$fpa_module_path = drupal_get_path('module', 'fpa');
$form['#attached']['library'][] = array('system', 'jquery.cookie');
$form['#attached']['css'][] = $fpa_module_path . '/css/fpa.css';
$form['#attached']['js'][] = $fpa_module_path . '/js/fpa.min.js';
$form['#attached']['js'][] = array(
'type' => 'setting',
'data' => array(
'fpa' => array(
'attr' => array(
'permission' => FPA_ATTR_PERMISSION,
'module' => FPA_ATTR_MODULE,
'role' => FPA_ATTR_ROLE,
'checked' => FPA_ATTR_CHECKED,
'not_checked' => FPA_ATTR_NOT_CHECKED,
'system_name' => FPA_ATTR_SYSTEM_NAME,
),
),
),
);
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function fpa_form_filter_perms_admin_perm_filter_alter(&$form, &$form_state) {
$form['#submit'][] = '_fpa_reset_filter_defaults';
}

View File

@ -1,10 +1,10 @@
name = "Fast Permissions Administration"
description = "Provides quick access to a content type's or field's permissions."
description = "Fast filtering on permissions administration form."
core = 7.x
package = Administration
; Information added by drupal.org packaging script on 2012-04-22
version = "7.x-2.2"
; Information added by Drupal.org packaging script on 2015-05-21
version = "7.x-2.6+2-dev"
core = "7.x"
project = "fpa"
datestamp = "1335136578"
datestamp = "1432171983"

View File

@ -0,0 +1,46 @@
<?php
/**
* @file
* Install, update, and uninstall functions for the Fast Permissions Administration module.
*/
/**
* Implements hook_requirements().
*/
function fpa_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
$permissions_memory_required = _fpa_memory_required();
if (!drupal_check_memory_limit($permissions_memory_required . 'b')) {
$requirements['fpa_memory'] = array(
'severity' => REQUIREMENT_WARNING,
'title' => t('Insufficient memory for permissions page'),
'value' => t('~@permissions_memory_requiredM of memory required', array('@permissions_memory_required' => (int) ($permissions_memory_required / 1024 / 1024))),
'description' => t('It is likely that you will exceed your memory limit when viewing the permissions page for all roles and permissions. If you are unable to load the permissions page, this is most likely the cause.') . '<br />',
);
$filter_perms_link = l('Filter Permissions', 'https://drupal.org/project/filter_perms');
if (!module_exists('filter_perms')) {
$requirements['fpa_memory']['description'] .= t('The !filter_perms_link module can work with Fast Permissions Administration by reducing the amount of the permissions form that is rendered and thereby reducing the memory required on the permissions page.', array('!filter_perms_link' => $filter_perms_link)) . '<br />';
if ($php_ini_path = get_cfg_var('cfg_file_path')) {
$requirements['fpa_memory']['description'] .= t('Increase the memory limit by editing the memory_limit parameter in the file %configuration-file and then restart your web server (or contact your system administrator or hosting provider for assistance).', array('%configuration-file' => $php_ini_path)) . '<br />';
}
}
else {
$requirements['fpa_memory']['severity'] = REQUIREMENT_OK;
$requirements['fpa_memory']['description'] = t('The !filter_perms_link module installed should prevent a memory issue as long as viewed permissions and roles are limited.', array('!filter_perms_link' => $filter_perms_link));
}
}
}
return $requirements;
}

View File

@ -1,5 +1,26 @@
<?php
/**
* @file
* Main module file for FPA.
*/
define('FPA_ATTR_PERMISSION', 'fpa-permission');
define('FPA_ATTR_MODULE', 'fpa-module');
define('FPA_ATTR_ROLE', 'fpa-role');
define('FPA_ATTR_CHECKED', 'fpa-checked');
define('FPA_ATTR_NOT_CHECKED', 'fpa-not-checked');
define('FPA_ATTR_SYSTEM_NAME', 'fpa-system-name');
// Replacement for improper use of hook_hook_info().
require_once dirname(__FILE__) . '/fpa.theme.inc';
require_once dirname(__FILE__) . '/fpa.form_alter.inc';
/**
* Implements hook_menu().
*/
function fpa_menu() {
$items = array();
@ -7,63 +28,82 @@ function fpa_menu() {
'title' => 'Permissions',
'page callback' => '_fpa_ctools',
'page arguments' => array(1),
'access callback' => TRUE,
'access arguments' => array('administer permissions'),
'type' => MENU_CALLBACK,
);
return $items;
}
/**
* Implements hook_admin_paths().
*/
function fpa_admin_paths() {
return array(
'fpa_modal/*/permissions' => FALSE,
'fpa_modal/*/permissions' => TRUE,
);
}
function fpa_js_load($arg) {
if (module_exists('ctools')) {
return ctools_js_load($arg);
/**
* Implements hook_help().
*/
function fpa_help($path, $arg) {
if ($path == 'admin/people/permissions') {
$output = '';
$output .= '<p>' . t('Permissions and Module names will match on the readable or system name. The system name is provided as a togglable column.') . '</p>';
$output .= '<p>' . t('Enter in the format of "permission@module", e.g. "admin@system" will show only permissions with the text "admin" in modules with the text "system".') . '</p>';
return $output;
}
return 0;
}
/**
* Loader function to wrap ctools loader function.
*/
function fpa_js_load($arg) {
$return_code = 0;
if (module_exists('ctools')) {
$return_code = ctools_js_load($arg);
}
return $return_code;
}
function fpa_l($permission = '', $text = NULL, $options = array()) {
// available modal modules in order of priority
// Available modal module system names in order of priority.
$supported_modules = array(
//'dialog', // dialog api is buggy
'ctools',
'modalframe',
);
if (is_null($text)) {
$text = t('Manage Permissions');
}
// gets the most prefered modal method from the available methods
// Find the most preferred modal method from the available methods.
$modules = array_intersect($supported_modules, array_keys(module_list()));
$method = array_shift($modules);
$path = 'fpa_modal/nojs/permissions';
$query = array(
'fpa_perm' => $permission,
'fpa_method' => $method,
);
$attributes = array();
$query = array('fpa_perm' => $permission, 'fpa_method' => $method);
switch ($method) {
case 'dialog':
dialog_add_js();
$attributes['class'] = 'ctools-use-dialog';
break;
case 'ctools':
ctools_include('ajax');
ctools_include('modal');
ctools_modal_add_js();
$attributes['class'] = 'ctools-use-modal';
break;
case 'modalframe':
modalframe_parent_js();
drupal_add_js(drupal_get_path('module', 'fpa') . '/js/fpa.js');
$attributes['class'] = 'fpa_modalframe';
break;
default:
$path = 'admin/people/permissions';
$attributes['target'] = '_blank';
@ -76,7 +116,7 @@ function fpa_l($permission = '', $text = NULL, $options = array()) {
return l($text, $path, $options);
}
function fpa_fieldset($permission, &$parent_item, $group = array()) {
function fpa_fieldset($filter_string, &$parent_item, $group = array()) {
$parent_item['fpa_fieldset'] = array(
'#type' => 'fieldset',
@ -90,39 +130,23 @@ function fpa_fieldset($permission, &$parent_item, $group = array()) {
$parent_item['fpa_fieldset']['fpa'] = array(
'#type' => 'markup',
'#markup' => fpa_l($permission),
'#markup' => fpa_l($filter_string),
);
}
function fpa_form_node_type_form_alter(&$form, &$form_state) {
if (!empty($form['type']['#default_value']) && user_access('administer permissions')) {
fpa_fieldset($form['#node_type']->type . ':', $form, array('#group' => 'additional_settings'));
}
}
function fpa_form_user_admin_permissions_alter(&$form, &$form_state) {
if (isset($_GET['fpa_method']) && $_GET['fpa_method'] == 'modalframe') {
modalframe_child_js();
$form['#submit'][] = '_fpa_modalframe_submit';
}
$fpa_module_path = drupal_get_path('module', 'fpa');
drupal_add_css($fpa_module_path .'/css/fpa.css');
drupal_add_js($fpa_module_path .'/js/fpa.js');
drupal_add_js(array('fpa' => array('perm' => isset($_GET['fpa_perm']) && $_GET['fpa_perm'] ? check_plain($_GET['fpa_perm']) : '')), array('type' => 'setting'));
}
function _fpa_modalframe_submit() {
modalframe_close_dialog();
}
/**
* Page callback for CTools modal path.
*/
function _fpa_ctools($js = NULL) {
// Need to include the file that contains the permissions form.
module_load_include('inc', 'user', 'user.admin');
$form_id = 'user_admin_permissions';
// Fall back if $js is not set.
if (!$js) {
return drupal_get_form('user_admin_permissions');
return drupal_get_form($form_id);
}
ctools_include('modal');
@ -133,11 +157,8 @@ function _fpa_ctools($js = NULL) {
);
switch ($_GET['fpa_method']) {
case 'dialog':
$output = dialog_get_form('user_admin_permissions', $form_state);
break;
case 'ctools':
$output = ctools_modal_form_wrapper('user_admin_permissions', $form_state);
$output = ctools_modal_form_wrapper($form_id, $form_state);
break;
}
@ -149,3 +170,37 @@ function _fpa_ctools($js = NULL) {
echo ajax_render($output);
exit;
}
/**
* @return int Approximate number of bytes of ram required to render the permissions form.
*/
function _fpa_memory_required() {
$permissions_count = count(module_invoke_all('permission'));
$user_roles_count = count(user_roles());
$page_ram_required = (9 * 1024 * 1024);
// Takes ~26kb per row without any checkboxes.
$permission_row_overhead = 27261.028783658;
$permissions_ram_required = $permissions_count * $permission_row_overhead;
// Determined by checking peak ram on permissions page, over several different number of visible roles.
$bytes_per_checkbox = 18924.508820799;
$checkboxes_ram_required = $permissions_count * $user_roles_count * $bytes_per_checkbox;
return (int) ($page_ram_required + $permissions_ram_required + $checkboxes_ram_required);
}
function _fpa_reset_filter_defaults() {
setcookie("fpa_module_match", "", time() - 3600, '/');
setcookie("fpa_filter", "", time() - 3600, '/');
setcookie("fpa_roles", "", time() - 3600, '/');
}

View File

@ -0,0 +1,769 @@
<?php
/**
* @file
* Theme callbacks to pre-tag rows for FPA functionality.
*/
/**
* Implements hook_theme().
*/
function fpa_theme($existing, $type, $theme, $path) {
return array(
'fpa_user_admin_permissions' => array(
'render element' => 'form',
'file' => 'fpa.theme.inc',
),
);
}
/**
* Theme function to pre-mark rows with FPA attributes.
*
* Based on Drupal Core's permissions form theme function.
*
* @see theme_user_admin_permissions().
*/
function theme_fpa_user_admin_permissions($variables) {
$form = $variables['form'];
$nameless_checkbox = array(
'#type' => 'html_tag',
'#tag' => 'input',
'#attributes' => array(
'type' => 'checkbox',
'class' => array(
'rid-1', // Prevents Drupal core Drupal.behaviors.permissions.toggle from applying.
'form-checkbox',
'fpa-checkboxes-toggle',
),
),
);
$nameless_checkbox_output = drupal_render($nameless_checkbox);
$dummy_checkbox = array(
'#type' => 'html_tag',
'#tag' => 'input',
'#attributes' => array(
'type' => 'checkbox',
'disabled' => 'disabled',
'checked' => 'checked',
'title' => t('This permission is inherited from the authenticated user role.'),
'class' => array(
'dummy-checkbox',
),
),
);
$dummy_checkbox_output = drupal_render($dummy_checkbox);
$permission_col_template = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-permission-container',
),
),
'description' => array(
'#markup' => '',
),
'checkbox_cell' => array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-row-toggle-container',
),
),
'checkbox_form_item' => array(
'#type' => 'container',
'#attributes' => array(
'title' => t('Toggle visible checkboxes in this row.'),
'class' => array(
'form-item',
'form-type-checkbox',
),
),
'label' => array(
'#type' => 'html_tag',
'#tag' => 'label',
'#attributes' => array(
'class' => array(
'element-invisible',
),
),
'#value' => 'test',
),
'checkbox' => array(
'#markup' => $nameless_checkbox_output,
),
),
),
);
$checkboxes_children = element_children($form['checkboxes']);
// Prepare role names processed by drupal_html_class() ahead of time.
$roles_attr_values = array();
foreach ($checkboxes_children as $rid) {
$roles_attr_values[$rid] = drupal_html_class($form['role_names'][$rid]['#markup']);
}
$first_role_index = array_shift($checkboxes_children);
// Lists for wrapper.
$modules = array();
$user_roles = array();
// Index of current module row.
$module = NULL;
// Row counter.
$i = 0;
$rows = array();
// Iterate over rows in form table.
foreach (element_children($form['permission']) as $key) {
// Row template.
$row = array(
'data' => array(), // Array of table cells.
'title' => array(), // HTML attribute on table row tag.
FPA_ATTR_MODULE => array(), // HTML attribute on table row tag.
FPA_ATTR_PERMISSION => array(), // HTML attribute on table row tag.
FPA_ATTR_CHECKED => array(),
FPA_ATTR_NOT_CHECKED => array(),
);
// Determine if row is module or permission.
if (is_numeric($key)) {
// Module row.
$row['class'][] = 'fpa-module-row';
// Mark current row with escaped module name.
$row[FPA_ATTR_MODULE] = array(
// System name
0 => $form['permission'][$key]['#id'],
// Readable name
1 => strip_tags($form['permission'][$key]['#markup']),
);
// Readable
$row['data'][] = array(
'data' => drupal_render($form['permission'][$key]),
'class' => array('module'),
'id' => 'module-' . $form['permission'][$key]['#id'],
'colspan' => count($form['role_names']['#value']) + 1,
);
$row['title'] = array($form['permission'][$key]['#id']);
$row[FPA_ATTR_SYSTEM_NAME] = $row[FPA_ATTR_MODULE][0];
$row[FPA_ATTR_MODULE] = array_unique(array_map('drupal_html_class', $row[FPA_ATTR_MODULE]));
// Add modules to left-side modules list.
$modules[$row[FPA_ATTR_MODULE][0]] = array(
'text' => strip_tags($form['permission'][$key]['#markup']),
'title' => array($form['permission'][$key]['#id']),
FPA_ATTR_MODULE => $row[FPA_ATTR_MODULE],
FPA_ATTR_PERMISSION => array(),
);
// Save row number for current module.
$module = $i;
}
else {
// Permission row.
$row['class'][] = 'fpa-permission-row';
$permission_system_name = '';
// Might be empty if no modules are displayed in Permissions Filter module.
if (!empty($form['checkboxes'][$first_role_index])) {
$permission_system_name = $form['checkboxes'][$first_role_index][$key]['#return_value'];
}
$label = $permission_col_template;
$label['description']['#markup'] = drupal_render($form['permission'][$key]);
// Permissions filter might cause no Roles to display.
if (count(element_children($form['checkboxes'])) == 0) {
unset($label['checkbox_cell']);
}
// Readable
$row['data'][] = array(
'data' => drupal_render($label),
'class' => array('permission'),
);
foreach (element_children($form['checkboxes']) as $rid) {
$form['checkboxes'][$rid][$key]['#title'] = $form['role_names'][$rid]['#markup'] . ': ' . $form['permission'][$key]['#markup'];
$form['checkboxes'][$rid][$key]['#title_display'] = 'invisible';
// Filter permissions strips role id class from checkbox. Used by Drupal core functionality.
$form['checkboxes'][$rid][$key]['#attributes']['class'][] = 'rid-' . $rid;
// Set authenticated role behavior class on page load.
if ($rid == 2 && $form['checkboxes'][$rid][$key]['#checked'] === TRUE) {
$row['class'][] = 'fpa-authenticated-role-behavior';
}
// For all roles that inherit permissions from 'authenticated user' role, add in dummy checkbox for authenticated role behavior.
if ($rid > 2) {
$form['checkboxes'][$rid][$key]['#suffix'] = $dummy_checkbox_output; // '#suffix' doesn't have wrapping HTML like '#field_suffix'.
}
// Add rid's to row attribute for checked status filter.
if ($form['checkboxes'][$rid][$key]['#checked'] === TRUE) {
$row[FPA_ATTR_CHECKED][] = $rid;
}
else {
$row[FPA_ATTR_NOT_CHECKED][] = $rid;
}
$row['data'][] = array(
'data' => drupal_render($form['checkboxes'][$rid][$key]),
'class' => array(
'checkbox',
),
'title' => array(
$form['role_names'][$rid]['#markup'],
),
// For role filter
FPA_ATTR_ROLE => array(
$rid,
),
);
}
if (!empty($rid)) {
$row['title'] = array(
$form['checkboxes'][$rid][$key]['#return_value'],
);
$row[FPA_ATTR_SYSTEM_NAME] = array(
$form['checkboxes'][$rid][$key]['#return_value'],
);
}
// Mark current row with escaped permission name.
$row[FPA_ATTR_PERMISSION] = array(
// Permission system name.
0 => $permission_system_name,
// Readable description.
1 => strip_tags($form['permission'][$key]['#markup']),
);
// Mark current row with current module.
$row[FPA_ATTR_MODULE] = $rows[$module][FPA_ATTR_MODULE];
$row[FPA_ATTR_PERMISSION] = array_unique(array_map('drupal_html_class', $row[FPA_ATTR_PERMISSION]));
// Add current permission to current module row.
$rows[$module][FPA_ATTR_PERMISSION] = array_merge($rows[$module][FPA_ATTR_PERMISSION], $row[FPA_ATTR_PERMISSION]);
$rows[$module][FPA_ATTR_CHECKED] = array_unique(array_merge($rows[$module][FPA_ATTR_CHECKED], $row[FPA_ATTR_CHECKED]));
$rows[$module][FPA_ATTR_NOT_CHECKED] = array_unique(array_merge($rows[$module][FPA_ATTR_NOT_CHECKED], $row[FPA_ATTR_NOT_CHECKED]));
$modules[$rows[$module][FPA_ATTR_MODULE][0]][FPA_ATTR_PERMISSION][] = $row[FPA_ATTR_PERMISSION];
}
$rows[$i++] = $row;
}
$reset_button = array(
'#type' => 'html_tag',
'#tag' => 'input',
'#attributes' => array(
'type' => 'reset',
'class' => 'form-submit',
'value' => t('Reset changes'),
),
);
// If there is no submit button, don't add the reset button.
if (count(element_children($form['actions'])) > 0) {
// Have the reset button appear before the submit button.
array_unshift($form['actions'], $reset_button);
}
$actions_output = drupal_render_children($form['actions']);
$header = array();
$header[] = array(
'data' => t('Permission') . $actions_output,
);
foreach (element_children($form['role_names']) as $rid) {
$header[] = array(
'data' => drupal_render($form['role_names'][$rid]) . $nameless_checkbox_output,
'class' => array(
'checkbox',
),
'title' => array(
$form['role_names'][$rid]['#markup'],
),
FPA_ATTR_ROLE => array(
$rid,
),
);
$user_roles[$rid] = $form['role_names'][$rid]['#markup'];
}
$table = array(
'header' => $header,
'rows' => $rows,
);
$output = _fpa_wrapper($table, $modules, $user_roles, $actions_output);
$output .= drupal_render_children($form);
return $output;
}
/**
* Wraps table output in the FPA filter.
*/
function _fpa_wrapper($permissions_table, $modules, $user_roles, $actions_output) {
$same_page = trim(parse_url($_SERVER['HTTP_REFERER'], PHP_URL_PATH), '/') == $_GET['q'];
$render = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-container',
),
),
);
$hiders = array(
'fpa-hide-descriptions' => array(
'hide' => t('Hide descriptions'),
'show' => t('Show descriptions'),
),
'fpa-hide-system-names' => array(
'hide' => t('Hide system names'),
'show' => t('Show system names'),
),
);
$render['#attributes']['class'][] = 'fpa-hide-system-names';
$hide_container = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-toggle-container',
),
),
);
foreach ($hiders as $hide_class => $labels) {
$hide_container[$hide_class] = array(
'#theme' => 'link',
'#text' => '',
'#path' => '',
'#options' => array(
'attributes' => array_merge($labels, array(
'fpa-toggle-class' => $hide_class,
)),
'html' => TRUE,
'fragment' => ' ',
'external' => TRUE, // Prevent base path from being added to link.
),
);
}
$render['hide_container'] = $hide_container;
$wrapper = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-wrapper',
),
),
);
$render['wrapper'] = &$wrapper;
/**
* <style /> block template.
*/
$style_template = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'style-wrapper-class-name', // Override on specific block.
),
),
);
$style_template['style'] = array(
'#type' => 'html_tag',
'#tag' => 'style',
'#attributes' => array(
'type' => array(
'text/css',
),
),
'#value' => '', // #value needed for closing tag.
);
/**
* <style /> block for role filtering.
*/
$wrapper['role_styles'] = $style_template;
$wrapper['role_styles']['#attributes']['class'][0] = 'fpa-role-styles';
/**
* <style /> block for permission filtering.
*/
$wrapper['perm_styles'] = $style_template;
$wrapper['perm_styles']['#attributes']['class'][0] = 'fpa-perm-styles';
/**
* Left section contains module list and form submission button.
*/
$left_section = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-left-section',
),
),
);
$wrapper['left_section'] = &$left_section;
/**
* Right section contains filter form and permissions table.
*/
$right_section = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-right-section',
),
),
);
$wrapper['right_section'] = &$right_section;
$module_template = array(
FPA_ATTR_MODULE => array(),
FPA_ATTR_PERMISSION => array(),
'data' => array(
'#type' => 'container',
'#attributes' => array(),
'link' => array(
'#type' => 'markup',
'#markup' => '', // l($module['text'], 'admin/people/permissions', $options)
),
'counters' => array(),
'total' => array(
'#type' => 'html_tag',
'#tag' => 'span',
'#attributes' => array(
'class' => array('fpa-perm-total'),
'fpa-total' => 0,
),
'#value' => '', // #value needed for closing tag.
),
),
);
$counter_template = array(
'#type' => 'html_tag',
'#tag' => 'span',
'#attributes' => array(
'class' => array('fpa-perm-counter'),
FPA_ATTR_PERMISSION => array(), // Counters only count permissions match.
),
'#value' => '', // #value required for closing tag.
);
$items = array();
$all_modules = array(
'text' => t('All modules'),
FPA_ATTR_MODULE => array(),
FPA_ATTR_PERMISSION => array(),
);
array_unshift($modules, $all_modules);
$all_modules_counters = array();
foreach ($modules as $module) {
$module_item = $module_template;
$module_item[FPA_ATTR_MODULE] = $module[FPA_ATTR_MODULE];
$module_item[FPA_ATTR_PERMISSION] = array_reduce(array_pad($module[FPA_ATTR_PERMISSION], 1, array()), 'array_merge', array());
// Use link for accessibility and tabability.
$options = array(
'fragment' => 'all',
);
if (!empty($module['title'])) {
$options['fragment'] = 'module-' . $module['title'][0];
$options['attributes']['title'] = $module['title'][0];
}
$module_item['data']['link']['#markup'] = l($module['text'], 'admin/people/permissions', $options);
foreach ($module[FPA_ATTR_PERMISSION] as $module_perm) {
$counter_item = $counter_template;
$counter_item['#attributes'][FPA_ATTR_PERMISSION] = $module_perm;
$all_modules_counters[] = $counter_item;
$module_item['data']['counters'][] = $counter_item;
}
$module_item['data']['total']['#attributes']['fpa-total'] = count($module[FPA_ATTR_PERMISSION]);
$items[] = $module_item;
}
$items[0]['data']['counters'] = $all_modules_counters;
$items[0]['data']['total']['#attributes']['fpa-total'] = count($all_modules_counters);
foreach ($items as &$item) {
$item['data'] = drupal_render($item['data']);
}
$left_section['list'] = array(
'#items' => $items,
'#theme' => 'item_list',
);
$left_section['buttons'] = array(
'#type' => 'markup',
'#markup' => $actions_output,
);
$filter_form = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-filter-form',
),
),
);
$clear_button = array(
'#type' => 'html_tag',
'#tag' => 'input',
'#attributes' => array(
'type' => array(
'button',
),
'class' => array(
'fpa-clear-search',
'form-submit',
),
'value' => 'Clear filter',
),
);
$default_filter = '';
if (!empty($_GET['fpa_perm'])) {
$default_filter = $_GET['fpa_perm'];
}
if (!empty($_COOKIE['fpa_filter']) && $same_page) {
$default_filter = $_COOKIE['fpa_filter'];
}
$filter_form['permission_module_filter'] = array(
'#type' => 'textfield',
'#title' => t('Filter:'),
'#description' => t('<p>Enter in the format of "permission@module",</p><p>e.g. <em>admin@system</em> will show only permissions with the<br>text "admin" in modules with the text "system".</p><p>This will also match on system name of a permission.</p>'),
'#size' => 25,
'#field_suffix' => drupal_render($clear_button),
'#attributes' => array(
'placeholder' => array(
'permission@module',
),
'autofocus' => 'autofocus',
),
'#value' => $default_filter,
);
/*
* Populate the permission filter styles.
*/
$matches = array();
preg_match('/^\s*([^@]*)@?(.*?)\s*$/i', $filter_form['permission_module_filter']['#value'], $matches);
array_shift($matches); // Remove whole match item.
$safe_matches = array_map('drupal_html_class', $matches);
$module_match = !empty($_COOKIE['module_match']) ? $_COOKIE['module_match'] : '*=';
$filters = array(
drupal_strlen($safe_matches[0]) > 0 ? ('[' . FPA_ATTR_PERMISSION . '*="' . $safe_matches[0] . '"]') : '',
drupal_strlen($safe_matches[1]) > 0 ? ('[' . FPA_ATTR_MODULE . $module_match . '"' . $safe_matches[1] . '"]') : '',
);
$filter_styles = array(
'.fpa-table-wrapper tr[' . FPA_ATTR_MODULE . ']{display: none;}',
'.fpa-table-wrapper tr[' . FPA_ATTR_MODULE . ']',
$filters[0],
$filters[1],
'{display: table-row;}',
'.fpa-perm-counter{display: none;}',
'.fpa-perm-counter',
$filters[0],
'{display: inline;}',
'.fpa-left-section li[' . FPA_ATTR_MODULE . ']',
drupal_strlen($filters[1]) > 0 ? $filters[1] : '[' . FPA_ATTR_MODULE . '=""]',
'{margin-right:-1px; background-color: white; border-right: solid 1px transparent;}',
);
$wrapper['perm_styles']['style']['#value'] = implode('', $filter_styles);
$cookie_roles = (!empty($_COOKIE['fpa_roles']) && $same_page) ? json_decode($_COOKIE['fpa_roles']) : array();
$options = array(
'*' => t('--All Roles'),
);
if (!empty($user_roles)) {
$options += $user_roles; // Preserves keys.
}
if (in_array('*', $cookie_roles)) {
$cookie_roles = array('*');
}
$filter_form['role_filter'] = array(
'#type' => 'select',
'#title' => t('Roles:'),
'#description' => t('Select which roles to display.<br>Ctrl+click to select multiple.'),
'#size' => 5,
'#options' => $options,
'#attributes' => array(
'multiple' => 'multiple',
'autocomplete' => 'off', // Keep browser from populating this from 'cached' input.
),
'#value' => count(array_intersect($cookie_roles, array_keys($options))) > 0 ? $cookie_roles : array('*'),
);
/*
* Populate the roles styles.
*/
if (!in_array('*', $filter_form['role_filter']['#value'])) {
$role_styles = array(
'.fpa-table-wrapper [' . FPA_ATTR_ROLE . '] {display: none;}',
);
foreach ($filter_form['role_filter']['#value'] as $value) {
$role_styles[] = '.fpa-table-wrapper [' . FPA_ATTR_ROLE . '="' . $value . '"] {display: table-cell;}';
}
$role_styles[] = '.fpa-table-wrapper [' . FPA_ATTR_ROLE . '="' . end($filter_form['role_filter']['#value']) . '"] {border-right: 1px solid #bebfb9;}';
$wrapper['role_styles']['style']['#value'] = implode('', $role_styles);
}
$checked_status = array(
'#type' => 'checkboxes',
'#title' => t('Display permissions that are:'),
'#options' => array(
FPA_ATTR_CHECKED => t('Checked'),
FPA_ATTR_NOT_CHECKED => t('Not Checked'),
),
'#attributes' => array(),
'#title_display' => 'before',
'#description' => t('Applies to all visible roles.<br />Unsaved changes are not counted.<br />Most effective when a single role is visible.<br />Empty module rows sometimes display when used with permission filter.'),
);
$checked_status_keys = array_keys($checked_status['#options']);
$checked_status['#value'] = array_combine($checked_status_keys, $checked_status_keys);
$filter_form['checked_status'] = form_process_checkboxes($checked_status);
foreach (element_children($filter_form['checked_status']) as $key) {
$filter_form['checked_status'][$key]['#checked'] = TRUE;
}
$right_section['filter_form'] = $filter_form;
$table_wrapper = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-table-wrapper',
),
),
);
$table_wrapper['table'] = array(
'#theme' => 'table',
'#header' => $permissions_table['header'],
'#rows' => $permissions_table['rows'],
'#attributes' => array(
'id' => 'permissions',
),
);
// Show after full table HTML is loaded. Reduces progressive table load reflow/repaint.
$table_wrapper['show_table'] = array(
'#type' => 'html_tag',
'#tag' => 'style',
'#attributes' => array(
'type' => array(
'text/css',
),
),
'#value' => '#permissions {display: table;} .fpa-table-wrapper {background: none;}',
);
$table_wrapper['buttons'] = array(
'#type' => 'markup',
'#markup' => $actions_output,
);
$right_section['table_wrapper'] = $table_wrapper;
return drupal_render($render);
}

View File

@ -1,220 +1,666 @@
(function ($) {
var fpa = {
selector : {
form: '#user-admin-permissions',
table : '#permissions',
row : 'tbody tr',
filter : 'td.permission',
grouping : 'td.module'
},
dom : {
table : '', // jquery object for entire permissions table
rows : '', // jquery object containing just the rows
perm_style : '', // jquery object containing permissions style
role_style : '', // jquery object containing roles style
section_left: '',
section_right: ''
},
search:''
/**
* @file
* JS functionality that creates dynamic CSS which hides permission rows and role columns.
*/
// Wrapper normalizes 'jQuery' to '$'.
;(function fpa_scope($, Drupal, window, document) {
"use strict";
var Fpa = function (context, settings) {
this.init(context, settings);
return this;
};
Fpa.prototype.selector = {
form: '#user-admin-permissions',
table : '#permissions'
};
Fpa.prototype.init = function (context, settings) {
this.drupal_html_class_cache = {};
this.dom = {};
this.attr = settings.attr;
this.filter_timeout= null;
this.filter_timeout_time = 0;
this.module_match = '*=';
this.filter_selector_cache = {
'*=': {},
'~=': {}
};
this.selector.table_base_selector = '.fpa-table-wrapper tr[' + this.attr.module + ']';
this.selector.list_counter_selector = '.fpa-perm-counter';
this.selector.list_base_selector = '.fpa-left-section li[' + this.attr.module + ']';
if (this.select(context)) {
this.prepare();
this.authenticated_role_behavior();
}
};
Fpa.prototype.styles = {
module_active_style: '{margin-right:-1px; background-color: white; border-right: solid 1px transparent;}'
};
/**
* Kick a function to the Back Of The Line.
* Select all elements that are used by FPA ahead of time and cache on 'Fpa' instance.
*/
Fpa.prototype.select = function (context) {
this.dom.context = $(context);
this.dom.form = this.dom.context.find(this.selector.form);
// Prevent anything else from running if the form is not found.
if (this.dom.form.length === 0) {
return false;
}
this.dom.container = this.dom.form.find('.fpa-container');
// Raw element since $().html(); does not work for <style /> elements.
this.dom.perm_style = this.dom.container.find('.fpa-perm-styles style').get(0);
this.dom.role_style = this.dom.container.find('.fpa-role-styles style').get(0);
this.dom.section_left = this.dom.container.find('.fpa-left-section');
this.dom.section_right = this.dom.container.find('.fpa-right-section');
this.dom.table_wrapper = this.dom.section_right.find('.fpa-table-wrapper');
this.dom.table = this.dom.table_wrapper.find(this.selector.table);
this.dom.module_list = this.dom.section_left.find('ul');
this.dom.filter_form = this.dom.container.find('.fpa-filter-form');
this.dom.filter = this.dom.filter_form.find('input[type="text"]');
this.dom.role_select = this.dom.filter_form.find('select');
this.dom.checked_status = this.dom.filter_form.find('input[type="checkbox"]');
return true;
};
/**
* Prepares a string for use as a CSS identifier (element, class, or ID name).
*
* Anything that is botl'd will run after other attach events, like sticky table headers.
* @see https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_clean_css_identifier/7
*/
fpa.botl = function (func) {
setTimeout(function () {
func();
}, 0);
Fpa.prototype.drupal_clean_css_identifier = function (str) {
return str
// replace ' ', '_', '/', '[' with '-'
.replace(/[ _\/\[]/g, '-')
// replace ']' with ''
.replace(/\]/g, '')
// Valid characters in a CSS identifier are:
// - the hyphen (U+002D)
// - a-z (U+0030 - U+0039)
// - A-Z (U+0041 - U+005A)
// - the underscore (U+005F)
// - 0-9 (U+0061 - U+007A)
// - ISO 10646 characters U+00A1 and higher
// We strip out any character not in the above list.
.replace(/[^\u002D\u0030-\u0039\u0041-\u005A\u005F\u0061-\u007A\u00A1-\uFFFF]/, '');
};
/**
* Changes a string into a safe single css class.
* Prepares a string for use as a valid class name.
*
* @see https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_html_class/7
*/
fpa.classify = function (str) {
return str.toLowerCase().replace(/ /ig, '-');
Fpa.prototype.drupal_html_class = function (str) {
if (this.drupal_html_class_cache[str] === undefined) {
this.drupal_html_class_cache[str] = this.drupal_clean_css_identifier(str.toLowerCase());
}
return this.drupal_html_class_cache[str];
};
/**
* Handles applying styles to <style /> tags.
*/
Fpa.prototype.set_style = (function () {
// Feature detection. Mainly for IE8.
if ($('<style type="text/css" />').get(0).styleSheet) {
return function (element, styles) {
element.styleSheet.cssText = styles;
};
}
// Default that works in modern browsers.
return function (element, styles) {
element.innerHTML = styles;
};
})();
/**
* Callback for click events on module list.
*/
fpa.filter_module = function () {
var $this = $(this);
$('div.fpa-left-section ul li').removeClass('active');
$this.parent().addClass('active');
Fpa.prototype.filter_module = function (e) {
var current_perm = fpa.dom.filter.val().split('@');
current_perm[1] = $this.attr('title');
fpa.dom.filter.val(current_perm.join('@').replace(/@$/ig, '')); // remove trailing @ as that means no module; clean 'All' filter value
fpa.filter('=');
e.preventDefault();
e.stopPropagation();
var $this = $(e.currentTarget);
this.dom.filter.val([
// remove current module filter string.
this.dom.filter.val().replace(/(@.*)/, ''),
// remove trailing @ as that means no module; clean 'All' filter value
$this.attr(this.attr.module) !== '' ? '@' + $this.find('a[href]').text() : ''
].join(''));
/**
* ~= matches exactly one whitespace separated word in attribute.
*
* @see http://www.w3.org/TR/CSS2/selector.html#matching-attrs
*/
this.module_match = '~=';
this.filter();
};
fpa.filter = function (module_match) {
module_match = module_match || '*=';
perm = fpa.dom.filter.val();
fpa.botl(function () {
if (typeof perm != 'undefined' && ['', '@'].indexOf(perm) == -1) {
var perm_copy = fpa.classify(perm).split('@');
var selector = fpa.selector.table + ' ' + fpa.selector.row;
Fpa.prototype.build_filter_selectors = function (filter_string) {
// Extracts 'permissions@module', trimming leading and trailing whitespace.
var matches = filter_string.match(/^\s*([^@]*)@?(.*?)\s*$/i);
matches.shift(); // Remove whole match item.
var safe_matches = $.map(matches, $.proxy(this.drupal_html_class, this));
this.filter_selector_cache[this.module_match][filter_string] = [
safe_matches[0].length > 0 ? '[' + this.attr.permission + '*="' + safe_matches[0] + '"]' : '',
safe_matches[1].length > 0 ? '[' + this.attr.module + this.module_match + '"' + safe_matches[1] + '"]' : ''
];
return this.filter_selector_cache[this.module_match][filter_string];
};
Fpa.prototype.get_filter_selectors = function (filter_string) {
filter_string = filter_string || this.dom.filter.val();
return this.filter_selector_cache[this.module_match][filter_string] || this.build_filter_selectors(filter_string);
};
Fpa.prototype.permission_grid_styles = function (filters) {
filters = filters || this.get_filter_selectors();
var checked_filters = this.build_checked_selectors();
var styles = [
this.selector.table_base_selector,
'{display: none;}'
];
for (var i = 0; i < checked_filters.length; i++) {
styles = styles.concat([
this.selector.table_base_selector,
var perm_style_code = selector + '[fpa-module]{display:none;}';
checked_filters[i],
if (perm_copy[0]) selector += '[fpa-permission*="' + perm_copy[0] + '"]';
if (perm_copy[1]) selector += '[fpa-module' + module_match + '"' + perm_copy[1] + '"]';
filters[0],
filters[1],
'{display: table-row;}'
]);
}
return styles.join('');
};
Fpa.prototype.counter_styles = function (filters) {
filters = filters || this.get_filter_selectors();
return [
this.selector.list_counter_selector,
'{display: none;}',
this.selector.list_counter_selector,
filters[0],
'{display: inline;}'
].join('');
};
Fpa.prototype.module_list_styles = function (filters) {
filters = filters || this.get_filter_selectors();
return [
this.selector.list_base_selector,
(filters[1].length > 0 ? filters[1] : '[' + this.attr.module + '=""]'),
this.styles.module_active_style
].join('');
};
Fpa.prototype.filter = function () {
var perm = this.dom.filter.val();
$.cookie('fpa_filter', perm, {path: '/'});
$.cookie('fpa_module_match', this.module_match, {path: '/'});
this.save_filters();
var filter_selector = this.get_filter_selectors(perm);
this.set_style(this.dom.perm_style, [
this.permission_grid_styles(filter_selector),
this.counter_styles(filter_selector),
this.module_list_styles(filter_selector)
].join(''));
};
Fpa.prototype.build_role_selectors = function (roles) {
roles = roles || this.dom.role_select.val();
var selectors = ['*'];
if ($.inArray('*', roles) === -1) {
selectors = $.map(roles, $.proxy(function (value, index) {
perm_style_code += selector + '{display: table-row;}';
return '[' + this.attr.role + '="' + value + '"]';
fpa.dom.perm_style[0].innerHTML = perm_style_code;
}, this));
}
return selectors;
};
Fpa.prototype.build_checked_selectors = function (roles) {
roles = roles || this.dom.role_select.val();
var checked_boxes = $.map(this.dom.checked_status, function (element, index) {
return element.checked ? $(element).val() : null;
});
var selectors = [''];
if ($.inArray('*', roles) !== -1) {
roles = $.map(this.dom.role_select.find('option').not('[value="*"]'), $.proxy(function (element, index) {
return $(element).attr('value');
}, this));
}
if (checked_boxes.length != this.dom.checked_status.length) {
selectors = $.map(roles, $.proxy(function (value, index) {
return $.map(checked_boxes, $.proxy(function (checked_attr, index) {
return '[' + checked_attr + '~="' + value + '"]';
}, this));
}, this));
}
return selectors;
};
// Even handler for role selection.
Fpa.prototype.filter_roles = function () {
this.save_filters();
var values = this.dom.role_select.val() || [];
var role_style_code = [];
$.cookie('fpa_roles', JSON.stringify(values), {path: '/'});
// Only filter if "All Roles" is not selected.
if ($.inArray('*', values) === -1) {
role_style_code.push('.fpa-table-wrapper [' + this.attr.role + '] {display: none;}');
if (values.length > 0) {
var role_selectors = this.build_role_selectors(values);
role_style_code = role_style_code.concat($.map(role_selectors, $.proxy(function (value, index) {
return '.fpa-table-wrapper ' + value + ' {display: table-cell;}';
}, this)));
// Ensure right border on last visible role.
role_style_code.push('.fpa-table-wrapper ' + role_selectors.pop() + ' {border-right: 1px solid #bebfb9;}');
}
else {
fpa.dom.perm_style[0].innerHTML = '';
role_style_code.push('td[class="permission"] {border-right: 1px solid #bebfb9;}');
}
});
};
fpa.prepare = function (context) {
fpa.dom.form = $(fpa.selector.form, context);
if (fpa.dom.form.length == 0) {
return;
}
fpa.dom.table = fpa.dom.form.find(fpa.selector.table);
fpa.dom.section_right = fpa.dom.table.wrap('<div class="fpa-right-section" />').parent();
fpa.dom.module_list = $('<ul />').insertBefore(fpa.dom.section_right).wrap('<div class="fpa-left-section" />');
// create module list
fpa.dom.all_modules = $('<div />')
.appendTo(fpa.dom.module_list)
.wrap('<li class="active" />')
.text('All modules')
.attr('title', '')
.click(fpa.filter_module);
this.set_style(this.dom.role_style, role_style_code.join(''));
fpa.dom.table.find(fpa.selector.grouping).each(function () {
var module_id = $(this).text();
// Add new item to module list.
$('<div />')
.appendTo(fpa.dom.module_list)
.wrap('<li />')
.text(module_id.replace(/ module$/ig, ''))
.attr('title', module_id)
.attr('fpa-module', fpa.classify(module_id))
.click(fpa.filter_module);
this.filter();
};
/**
* Prevent the current filter from being cleared on form reset.
*/
Fpa.prototype.save_filters = function () {
/**
* element.defaultValue is what 'text' elements reset to.
*
* @link http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-26091157
*/
this.dom.filter.get(0).defaultValue = this.dom.filter.val();
/**
* element.defaultSelected is what 'option' elements reset to.
*
* @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-37770574
*/
this.dom.role_select.find('option').each(function (index, element) {
element.defaultSelected = element.selected;
});
// tag rows with required classes
fpa.botl(function () {
fpa.dom.filter_form = $('<div class="fpa-filter-form" />').prependTo(fpa.dom.section_right);
fpa.dom.perm_style = $('<style type="text/css" />').prependTo(fpa.dom.section_right);
fpa.dom.role_style = $('<style type="text/css" />').prependTo(fpa.dom.section_right);
// Put the "Save Permissions" button at the top and bottom.
fpa.dom.form.find('input[type="submit"][name="op"]').remove()
.clone().insertAfter(fpa.dom.module_list)
.clone().insertAfter(fpa.dom.table);
/**
* element.defaultChecked is what 'checkbox' elements reset to.
*
* @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-20509171
*/
this.dom.checked_status.each(function (index, element) {
element.defaultChecked = element.checked;
});
};
Fpa.prototype.prepare = function () {
this.filter_timeout_time = Math.min(this.dom.table.find('tr').length, 200);
this.dom.form
.delegate('.fpa-toggle-container a', 'click', $.proxy(function fpa_toggle(e) {
e.preventDefault();
fpa.dom.filter = $('<input id="fpa_filter" type="text" class="form-text" placeholder="permission@module" />')
.appendTo(fpa.dom.filter_form)
.keypress(function (e) {
//prevent enter key from submitting form
if (e.which == 13) {
return false;
}
})
.keyup(function (e) {
fpa.filter();
})
.wrap('<div id="fpa-filter-perm" class="form-item" />')
.before('<label for="fpa_filter">Filter:</label>')
.after('<div class="description">Enter in the format of permission@module;<br /> E.g. admin@system will show only permissions with<br />the text "admin" in modules with the text "system".</div>')
.val(Drupal.settings.fpa.perm);
var toggle_class = $(e.currentTarget).attr('fpa-toggle-class');
$('<button class="clear-search">Clear Filter</button>')
.insertAfter(fpa.dom.filter)
.click(function (e) {
this.dom.container.toggleClass(toggle_class).hasClass(toggle_class);
}, this))
;
this.dom.section_left
.delegate('li', 'click', $.proxy(this.filter_module, this))
;
this.dom.filter
// Prevent Enter/Return from submitting form.
.keypress(function fpa_prevent_form_submission(e) {
if (e.which === 13) {
e.preventDefault();
fpa.dom.filter.val('');
fpa.filter();
fpa.dom.all_modules.click();
});
var roles_select = $('<select multiple="multiple" size=5 />')
.appendTo(fpa.dom.filter_form)
.wrap('<div id="fpa-filter-role" class="form-item" />')
.before('<label for="fpa_filter">Roles:</label>')
.after('<div class="description">Select which roles to display.<br />Ctrl+click to select multiple.</div>')
.change(function () {
var values = $(this).val();
var selector_array = [];
var role_style_code = fpa.selector.table + ' .checkbox{display:none;}';
for (i in values) {
selector_array.push(fpa.selector.table + ' .checkbox[title^="' + values[i] + '"]');
}
role_style_code += selector_array.join(',') + '{display: table-cell;}';
fpa.dom.role_style[0].innerHTML = role_style_code;
});
fpa.dom.rows = fpa.dom.table.find(fpa.selector.row);
var roles = fpa.dom.table.find('thead th.checkbox').each(function () {
$this = $(this);
var role_text = $this.text();
var index = $this.attr('title', role_text).index() + 1;
fpa.dom.rows.find('td:nth-child(' + index + ')').attr('title', role_text);
$('<option />')
.appendTo(roles_select)
.attr('value', $this.text())
.attr('selected', 'selected')
.text($this.text());
});
var module_id = '';
var $module_row;
// iterate over the rows
fpa.dom.rows.each(function () {
var $this = $(this);
// Is this a module row?
var new_module_id = $this.find(fpa.selector.grouping).text();
if (new_module_id != '') {
$module_row = $this.addClass('module');
module_id = fpa.classify(new_module_id);
e.stopPropagation();
}
var perm = $this.find(fpa.selector.filter).clone();
perm.find('div.description').remove();
var permission = fpa.classify($.trim(perm.text()));
$this.attr('fpa-module', module_id).attr('fpa-permission', permission);
$module_row.attr('fpa-permission', $module_row.attr('fpa-permission') + ' ' + permission);
});
})
// Prevent non-character keys from triggering filter.
.keyup($.proxy(function fpa_filter_keyup(e) {
// Prevent ['Enter', 'Shift', 'Ctrl', 'Alt'] from triggering filter.
if ($.inArray(e.which, [13, 16, 17, 18]) === -1) {
window.clearTimeout(this.filter_timeout);
this.filter_timeout = window.setTimeout($.proxy(function () {
this.dom.table_wrapper
.detach()
.each($.proxy(function (index, element) {
this.module_match = '*=';
this.filter();
}, this))
.appendTo(this.dom.section_right)
;
}, this), this.filter_timeout_time);
}
}, this))
;
// Handle links to sections on permission admin page.
this.dom.form
.delegate('a[href*="admin/people/permissions#"]', 'click', $.proxy(function fpa_inter_page_links_click(e) {
e.preventDefault();
e.stopPropagation();
this.dom.module_list
.find('li[' + this.attr.module + '~="' + this.drupal_html_class(e.currentTarget.hash.substring(8)) + '"]')
.click()
;
$('body').scrollTop(this.dom.container.position().top);
}, this))
;
// Handler for links that use #hash and can't be capture server side.
if(window.location.hash.indexOf('module-') === 1) {
if (Drupal.settings.fpa.perm == '' && window.location.hash.indexOf('module-') > -1) {
fpa.dom.filter.val('@' + window.location.hash.substring(8));
fpa.filter('=');
this.dom.module_list
.find('li[' + this.attr.module + '~="' + this.drupal_html_class(window.location.hash.substring(8)) + '"]')
.click()
;
}
/**
* Reset authenticated role behavior when form resets.
*
* @todo should this be synchronous? Would have to trigger reset on elements while detached.
*/
this.dom.form.bind('reset', $.proxy(function fpa_form_reset(e) {
// Wait till after the form elements have been reset.
window.setTimeout($.proxy(function fpa_fix_authenticated_behavior() {
this.dom.table_wrapper
.detach() // Don't make numerous changes while elements are in the rendered DOM.
.each($.proxy(function (index, element) {
$(element)
.find('input[type="checkbox"].rid-2')
.each(this.dummy_checkbox_behavior)
;
}, this))
.appendTo(this.dom.section_right)
;
}, this), 0);
}, this));
// Role checkboxes toggle all visible permissions for this column.
this.dom.section_right
.delegate('th[' + this.attr.role + '] input[type="checkbox"].fpa-checkboxes-toggle', 'change', $.proxy(function fpa_role_permissions_toggle(e) {
var $this = $(e.currentTarget);
// Get visible rows selectors.
var filters = this.get_filter_selectors(this.dom.filter.val());
this.dom.table_wrapper
.detach()
.each($.proxy(function (index, element) {
var rid = $this.closest('[' + this.attr.role + ']').attr(this.attr.role);
$(element)
.find([
'tr' + filters.join(''),
'td.checkbox[' + this.attr.role + '="' + rid + '"]',
'input[type="checkbox"][name]'
].join(' ')) // Array is easier to read, separated for descendant selectors.
.attr('checked', $this.attr('checked'))
.filter('.rid-2') // Following only applies to "Authenticated User" role.
.each(this.dummy_checkbox_behavior)
;
}, this))
.appendTo(this.dom.section_right)
;
}, this))
;
// Permission checkboxes toggle all visible permissions for this row.
this.dom.section_right
.delegate('td.permission input[type="checkbox"].fpa-checkboxes-toggle', 'change', $.proxy(function fpa_role_permissions_toggle(e) {
// Get visible rows selectors.
var $row = $(e.currentTarget).closest('tr');
$row.prev('tr').after(
$row
.detach()
.each($.proxy(function (index, element) {
$(element)
.find('td.checkbox')
.filter(this.build_role_selectors().join(','))
.find('input[type="checkbox"][name]')
.attr('checked', e.currentTarget.checked)
.filter('.rid-2') // Following only applies to "Authenticated User" role.
.each(this.dummy_checkbox_behavior)
;
}, this))
);
}, this))
;
// Clear contents of search field and reset visible permissions.
this.dom.section_right
.delegate('.fpa-clear-search', 'click', $.proxy(function (e) {
this.dom.filter
.val('')
;
this.filter();
}, this))
;
// Change visible roles.
this.dom.role_select
.bind('change blur', $.proxy(this.filter_roles, this))
;
this.dom.checked_status
.bind('change', $.proxy(function (e) {
this.save_filters();
this.filter();
}, this))
;
/**
* System name is not normally selectable because its a pseudo-element.
*
* This detects clicks directly on the TR, which happens when a click is on
* the pseudo-element, and displays a prompt() with the system name as the
* pre-populated value.
*/
this.dom.table
.delegate('tr[' + this.attr.system_name + ']', 'click', $.proxy(function (e) {
var $target = $(e.target);
if ($target.is('tr[' + this.attr.system_name + ']')) {
window.prompt('You can grab the system name here', $target.attr(this.attr.system_name));
}
}, this))
;
// Focus on element takes long time, bump after normal execution.
window.setTimeout($.proxy(function fpa_filter_focus() {
this.dom.filter.focus();
}, this), 0);
};
/**
* Event handler/iterator.
*
* Should not be $.proxy()'d.
*/
Fpa.prototype.dummy_checkbox_behavior = function () {
// 'this' refers to the element, not the 'Fpa' instance.
$(this).closest('tr').toggleClass('fpa-authenticated-role-behavior', this.checked);
};
Fpa.prototype.authenticated_role_behavior = function () {
this.dom.table_wrapper
.delegate('input[type=checkbox].rid-2', 'mousedown', function (e) {
$(e.currentTarget).unbind('click.permissions');
})
.delegate('input[type=checkbox].rid-2', 'change.fpa_authenticated_role', this.dummy_checkbox_behavior)
;
};
Drupal.behaviors.fpa = {
attach: function (context, settings) {
// Add touch-screen styling for checkboxes to make easier to use.
if (document.documentElement.ontouchstart !== undefined) {
$(document.body).addClass('fpa-mobile');
}
fpa.filter();
fpa.dom.form.addClass('show');
fpa.dom.filter.focus();
});
// Fix table sticky table headers width due to changes in visible roles.
$(window)
.bind('scroll', function fpa_fix_tableheader(e) {
$(e.currentTarget).triggerHandler('resize.drupal-tableheader');
})
;
new Fpa(context, settings.fpa);
}
};
fpa.modalframe = function (context) {
$('a.fpa_modalframe', context).click(function (e) {
e.preventDefault();
e.stopPropagation();
Drupal.modalFrame.open({
url: $(this).attr('href'),
draggable: false
});
});
};
// Override Drupal core's Authenticated role checkbox behavior.
Drupal.behaviors.permissions.attach = $.noop;
Drupal.behaviors.fpa = {attach: function (context) {
fpa.prepare(context);
fpa.modalframe(context);
}};
})(jQuery);
// Drupal.behaviors.formUpdated.attach = $.noop;
})(jQuery, Drupal, window, document);

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@ function mailing_default_elysia_cron_rules() {
$cron_rule->rule = '* * * * *';
$cron_rule->weight = -11;
$cron_rule->context = 'mailing';
$cron_rules[''] = $cron_rule;
$cron_rules['simplenews_cron'] = $cron_rule;
$cron_rule = new stdClass;
$cron_rule->disabled = FALSE; /* Edit this to true to make a default cron_rule disabled initially */
@ -28,7 +28,7 @@ function mailing_default_elysia_cron_rules() {
$cron_rule->rule = '* * * * *';
$cron_rule->weight = NULL;
$cron_rule->context = NULL;
$cron_rules[''] = $cron_rule;
$cron_rules['simplenews_scheduler_cron'] = $cron_rule;
return $cron_rules;

View File

@ -171,6 +171,47 @@ table[width|cellpadding|cellspacing|border], tr[align|valign], td[align|valign|w
'video_filter_autoplay' => 1,
'video_filter_related' => 0,
'video_filter_html5' => 1,
'video_filter_codecs' => array(
'archive' => 'Archive.org',
'bliptv' => 'Blip.tv',
'candidcareer' => 'Candid Career',
'capped' => 'Capped',
'collegehumor' => 'College Humor',
'coub' => 'Coub',
'dailymotion' => 'DailyMotion',
'democracynow_fullshow' => 'DemocracyNow Fullshow',
'democracynow_story' => 'DemocracyNow Story',
'flickr_slideshows' => 'Flickr Slideshows',
'flickr_video' => 'Flickr Video',
'foxnews' => 'Fox News',
'gametrailers' => 'Game Trailers',
'gamevideos' => 'Game Videos',
'giphy' => 'Giphy',
'godtube' => 'GodTube',
'google' => 'Google Video',
'instagram' => 'Instagram',
'metacafe' => 'Meta Cafe',
'mailru' => 'Mail.Ru',
'myspace' => 'MySpace',
'myvideo' => 'MyVideo',
'picasa_slideshows' => 'Picasa Slideshows',
'rutube' => 'Rutube',
'slideshare' => 'Slideshare',
'streamhoster' => 'Streamhoster',
'teachertube' => 'Teachertube',
'ted' => 'TED',
'twitch' => 'Twitch',
'ustream' => 'Ustream',
'vbox' => 'Vbox7',
'vimeo' => 'Vimeo',
'vine' => 'Vine',
'whatchado' => 'whatchado',
'wistia' => 'Wistia',
'youku' => 'YouKu',
'youtube' => 'YouTube',
'youtube_playlist' => 'YouTube (Playlist)',
),
'video_filter_multiple_sources' => TRUE,
),
),
'pathologic' => array(

View File

@ -14,10 +14,6 @@ function materio_administration_user_default_permissions() {
$permissions['access admin theme'] = array(
'name' => 'access admin theme',
'roles' => array(
'Showroom' => 'Showroom',
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'administrator' => 'administrator',
'root' => 'root',
),
@ -28,10 +24,6 @@ function materio_administration_user_default_permissions() {
$permissions['access administration menu'] = array(
'name' => 'access administration menu',
'roles' => array(
'Showroom' => 'Showroom',
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'administrator' => 'administrator',
'root' => 'root',
),
@ -317,9 +309,6 @@ function materio_administration_user_default_permissions() {
'Premium' => 'Premium',
'Showroom' => 'Showroom',
'Student' => 'Student',
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'Unverified' => 'Unverified',
'Utilisateur' => 'Utilisateur',
'Utilisateur Alpha Tester' => 'Utilisateur Alpha Tester',
@ -408,7 +397,6 @@ function materio_administration_user_default_permissions() {
'name' => 'subscribe to simplenews category 6374',
'roles' => array(
'Adhérent' => 'Adhérent',
'Showroom' => 'Showroom',
'Utilisateur Alpha Tester' => 'Utilisateur Alpha Tester',
'administrator' => 'administrator',
'root' => 'root',
@ -426,7 +414,6 @@ function materio_administration_user_default_permissions() {
),
'module' => 'materio_user',
);
// Exported permission: 'toggle field translatability'.
$permissions['toggle field translatability'] = array(
'name' => 'toggle field translatability',
@ -450,9 +437,6 @@ function materio_administration_user_default_permissions() {
$permissions['translate any entity'] = array(
'name' => 'translate any entity',
'roles' => array(
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'administrator' => 'administrator',
'root' => 'root',
),
@ -463,10 +447,6 @@ function materio_administration_user_default_permissions() {
$permissions['translate content'] = array(
'name' => 'translate content',
'roles' => array(
'Showroom' => 'Showroom',
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'administrator' => 'administrator',
'root' => 'root',
),
@ -477,9 +457,6 @@ function materio_administration_user_default_permissions() {
$permissions['translate node entities'] = array(
'name' => 'translate node entities',
'roles' => array(
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'administrator' => 'administrator',
'root' => 'root',
),
@ -490,9 +467,6 @@ function materio_administration_user_default_permissions() {
$permissions['translate taxonomy_term entities'] = array(
'name' => 'translate taxonomy_term entities',
'roles' => array(
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'administrator' => 'administrator',
'root' => 'root',
),

View File

@ -42,25 +42,67 @@ features[ctools][] = views:views_default:3.0
features[elysia_cron][] = workflow_cron
features[features_api][] = api:2
features[menu_custom][] = navigation
features[menu_links][] = navigation_:materio_search_api_ajax/actuality
features[menu_links][] = navigation_:print/print
features[menu_links][] = navigation_add-content:node/add
features[menu_links][] = navigation_add-user:admin/people/create
features[menu_links][] = navigation_adhsions:node/11186/webform-results
features[menu_links][] = navigation_ajouter-un-tag-libre:http://dev.materio.com/fr/admin/structure/taxonomy/tag_libres/add
features[menu_links][] = navigation_breve:node/add/breve
features[menu_links][] = navigation_companies:admin/content/companies
features[menu_links][] = navigation_company:admin/structure/taxonomy_manager/voc/company
features[menu_links][] = navigation_company:node/add/company
features[menu_links][] = navigation_compose-tips:filter/tips
features[menu_links][] = navigation_content-types:admin/config/regional/translate/table/nodetype
features[menu_links][] = navigation_customers:http://www.materio.com/fr/admin/store/customers
features[menu_links][] = navigation_didactique:node/add/didactique
features[menu_links][] = navigation_duplicate-mails:admin/users/duplicatemails
features[menu_links][] = navigation_duplicates:admin/config/content/remove_duplicates
features[menu_links][] = navigation_faq:node/add/faq
features[menu_links][] = navigation_feedback:admin/reports/feedback
features[menu_links][] = navigation_formulaires-dadhsion:http://www.materio.com/fr/node/11186/webform-results
features[menu_links][] = navigation_frequently-asked-questions:faq-page
features[menu_links][] = navigation_gratuits:admin/users/gratuits
features[menu_links][] = navigation_industriels:admin/industriels
features[menu_links][] = navigation_industriels:admin/users/industriels
features[menu_links][] = navigation_ip-address-tracking:admin/reports/ip_tracking
features[menu_links][] = navigation_log-out:user/logout
features[menu_links][] = navigation_looping-embed-video:node/add/looping-embed-video
features[menu_links][] = navigation_mandrill:admin/reports/mandrill
features[menu_links][] = navigation_materiau:node/add/materiau
features[menu_links][] = navigation_materio-newsletter:node/add/simplenews/6274
features[menu_links][] = navigation_members:admin/users/members
features[menu_links][] = navigation_menus:admin/config/regional/translate/table/menu
features[menu_links][] = navigation_merge-duplicates:admin/structure/taxonomy/tag_libres/merge/duplicates
features[menu_links][] = navigation_my-sessions:mysessions
features[menu_links][] = navigation_newletters:admin/content/simplenews
features[menu_links][] = navigation_node-export-import:node/add/node_export
features[menu_links][] = navigation_onthologie:admin/structure/taxonomy/onthologie
features[menu_links][] = navigation_onthologie:admin/structure/taxonomy_manager/voc/onthologie
features[menu_links][] = navigation_orders:admin/store/orders/view
features[menu_links][] = navigation_page:node/add/page
features[menu_links][] = navigation_pages--didactique--faq:admin/content/pages
features[menu_links][] = navigation_panneau:node/add/panel
features[menu_links][] = navigation_produit:node/add/product
features[menu_links][] = navigation_publication:node/add/publication
features[menu_links][] = navigation_reports:admin/store/reports
features[menu_links][] = navigation_shopping-cart:cart
features[menu_links][] = navigation_simplenews-newsletter:node/add/simplenews
features[menu_links][] = navigation_store:/admin/store
features[menu_links][] = navigation_strings-search:admin/config/regional/translate/translate
features[menu_links][] = navigation_students:admin/students
features[menu_links][] = navigation_students:admin/users/students
features[menu_links][] = navigation_subscriptions-newsletter:admin/people/simplenews
features[menu_links][] = navigation_tag-libres:admin/structure/taxonomy/tag_libres
features[menu_links][] = navigation_tag-libres:admin/structure/taxonomy_manager/voc/tag_libres
features[menu_links][] = navigation_taxonomy-manager:admin/structure/taxonomy_manager/voc
features[menu_links][] = navigation_taxonomy:admin/config/regional/translate/table/taxonomy
features[menu_links][] = navigation_taxonomy:admin/structure/taxonomie/admin-taxo
features[menu_links][] = navigation_test:node/add/simplenews/6585
features[menu_links][] = navigation_user-account:user
features[menu_links][] = navigation_users:/admin/users?rid=6
features[menu_links][] = navigation_webform:node/add/webform
features[menu_links][] = navigation_ze-daily-materio039:node/add/simplenews/6374
features[user_permission][] = access admin theme
features[user_permission][] = access administration menu
features[user_permission][] = access workflow summary views
@ -99,8 +141,6 @@ features[user_permission][] = send newsletter
features[user_permission][] = show workflow state form
features[user_permission][] = subscribe to newsletters
features[user_permission][] = subscribe to simplenews category 6274
features[user_permission][] = subscribe to simplenews category 6374
features[user_permission][] = subscribe to simplenews category 6585
features[user_permission][] = toggle field translatability
features[user_permission][] = translate admin strings
features[user_permission][] = translate any entity

View File

@ -1064,56 +1064,21 @@ function materio_content_types_strongarm() {
'region' => 'main',
'weight' => '9',
'has_required' => FALSE,
'title' => 'Vertical tabs',
'title' => 'Onglets verticaux',
'hidden' => 0,
),
'actions' => array(
'region' => 'right',
'region' => 'footer',
'weight' => '8',
'has_required' => FALSE,
'title' => 'Save',
'title' => 'Enregistrer',
'hidden' => 0,
),
'language' => array(
'region' => 'right',
'weight' => '5',
'has_required' => FALSE,
'title' => 'Language',
'hidden' => 0,
),
'field_attachments' => array(
'region' => 'main',
'weight' => '5',
'has_required' => FALSE,
'title' => 'Fichiers joints',
'hidden' => 0,
),
'field_description' => array(
'region' => 'main',
'weight' => '3',
'has_required' => FALSE,
'title' => 'Description',
'hidden' => 0,
),
'field_nature_titre' => array(
'region' => 'main',
'weight' => '2',
'has_required' => FALSE,
'title' => 'Nature Titre',
'hidden' => 0,
),
'field_materiau_image' => array(
'region' => 'main',
'weight' => '6',
'has_required' => FALSE,
'title' => 'Image',
'hidden' => 0,
),
'field_video_filter' => array(
'region' => 'main',
'weight' => '7',
'has_required' => FALSE,
'title' => 'video',
'title' => 'Langue',
'hidden' => 0,
),
'field_memo' => array(
@ -1123,12 +1088,6 @@ function materio_content_types_strongarm() {
'title' => 'Mémo',
'hidden' => 0,
),
'title_field' => array(
'region' => 'main',
'weight' => '1',
'has_required' => TRUE,
'title' => 'Nom',
),
'field_localisation' => array(
'region' => 'right',
'weight' => '2',
@ -1136,34 +1095,6 @@ function materio_content_types_strongarm() {
'title' => 'Localisation',
'hidden' => 0,
),
'field_tags_libres' => array(
'region' => 'main',
'weight' => '10',
'has_required' => FALSE,
'title' => 'Tags libres',
'hidden' => 0,
),
'field_onthologie' => array(
'region' => 'main',
'weight' => '8',
'has_required' => FALSE,
'title' => 'Onthologie',
'hidden' => 0,
),
'field_company_fab' => array(
'region' => 'main',
'weight' => '11',
'has_required' => FALSE,
'title' => 'Manufacturer',
'hidden' => 0,
),
'field_company_distrib' => array(
'region' => 'main',
'weight' => '12',
'has_required' => FALSE,
'title' => 'Distributor',
'hidden' => 0,
),
'field_famille' => array(
'region' => 'right',
'weight' => '0',
@ -1209,8 +1140,35 @@ function materio_content_types_strongarm() {
'region' => 'right',
'weight' => '6',
'has_required' => FALSE,
'title' => 'Publication',
'collapsed' => 0,
'title' => 'Importé',
'hidden' => 0,
),
'entity_translation_entity_form_language_update' => array(
'region' => 'main',
'weight' => '0',
'has_required' => FALSE,
'title' => NULL,
'hidden' => 0,
),
'group_htabs' => array(
'region' => 'main',
'weight' => '0',
'has_required' => FALSE,
'title' => 'htabs (Field group)',
'hidden' => 0,
),
'group_media' => array(
'region' => 'main',
'weight' => '13',
'has_required' => FALSE,
'title' => 'Médias (Field group)',
'hidden' => 0,
),
'group_referencement' => array(
'region' => 'main',
'weight' => '12',
'has_required' => FALSE,
'title' => 'Référencement (Field group)',
'hidden' => 0,
),
);

View File

@ -69,342 +69,344 @@ function materio_home_v2_default_page_manager_pages() {
$display->cache = array();
$display->title = '';
$display->uuid = 'eca54323-0377-4ab0-b40c-69b96c16707a';
$display->storage_type = 'page_manager';
$display->storage_id = 'page_home_v2__panel_context_2bd92edc-8b2b-42d3-9857-f44f03574847';
$display->content = array();
$display->panels = array();
$pane = new stdClass();
$pane->pid = 'new-d0ee2cb5-bc02-4ded-a907-91d2dbea37c7';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13097',
'links' => 0,
'leave_node_title' => 0,
'identifier' => '',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<No Title>',
'override_title_heading' => 'span',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'intro-video',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = 'd0ee2cb5-bc02-4ded-a907-91d2dbea37c7';
$display->content['new-d0ee2cb5-bc02-4ded-a907-91d2dbea37c7'] = $pane;
$display->panels['middle'][0] = 'new-d0ee2cb5-bc02-4ded-a907-91d2dbea37c7';
$pane = new stdClass();
$pane->pid = 'new-afe6b27a-ba89-4292-8f16-0a59f0e9d944';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'materio_user-user_register';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$pane->locks = array();
$pane->uuid = 'afe6b27a-ba89-4292-8f16-0a59f0e9d944';
$display->content['new-afe6b27a-ba89-4292-8f16-0a59f0e9d944'] = $pane;
$display->panels['middle'][1] = 'new-afe6b27a-ba89-4292-8f16-0a59f0e9d944';
$pane = new stdClass();
$pane->pid = 'new-78b5df28-c9fd-4904-8910-aa1b96c60e35';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'menu-menu-home-v2';
$pane->shown = FALSE;
$pane->access = array(
'plugins' => array(),
);
$pane->configuration = array(
'override_title' => 1,
'override_title_text' => '',
'override_title_heading' => 'h3',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 2;
$pane->locks = array();
$pane->uuid = '78b5df28-c9fd-4904-8910-aa1b96c60e35';
$display->content['new-78b5df28-c9fd-4904-8910-aa1b96c60e35'] = $pane;
$display->panels['middle'][2] = 'new-78b5df28-c9fd-4904-8910-aa1b96c60e35';
$pane = new stdClass();
$pane->pid = 'new-fd3cbeb9-4de0-413f-8cd9-f88eb448f339';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'menu-menu-menu-home-member';
$pane->shown = TRUE;
$pane->access = array(
'plugins' => array(
0 => array(
'name' => 'role',
'settings' => array(
'rids' => array(
0 => 10,
1 => 11,
2 => 6,
3 => 8,
4 => 3,
5 => 4,
),
$pane = new stdClass();
$pane->pid = 'new-d0ee2cb5-bc02-4ded-a907-91d2dbea37c7';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13097',
'links' => 0,
'leave_node_title' => 0,
'identifier' => '',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<No Title>',
'override_title_heading' => 'span',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'intro-video',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = 'd0ee2cb5-bc02-4ded-a907-91d2dbea37c7';
$display->content['new-d0ee2cb5-bc02-4ded-a907-91d2dbea37c7'] = $pane;
$display->panels['middle'][0] = 'new-d0ee2cb5-bc02-4ded-a907-91d2dbea37c7';
$pane = new stdClass();
$pane->pid = 'new-afe6b27a-ba89-4292-8f16-0a59f0e9d944';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'materio_user-user_register';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$pane->locks = array();
$pane->uuid = 'afe6b27a-ba89-4292-8f16-0a59f0e9d944';
$display->content['new-afe6b27a-ba89-4292-8f16-0a59f0e9d944'] = $pane;
$display->panels['middle'][1] = 'new-afe6b27a-ba89-4292-8f16-0a59f0e9d944';
$pane = new stdClass();
$pane->pid = 'new-78b5df28-c9fd-4904-8910-aa1b96c60e35';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'menu-menu-home-v2';
$pane->shown = FALSE;
$pane->access = array(
'plugins' => array(),
);
$pane->configuration = array(
'override_title' => 1,
'override_title_text' => '',
'override_title_heading' => 'h3',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 2;
$pane->locks = array();
$pane->uuid = '78b5df28-c9fd-4904-8910-aa1b96c60e35';
$display->content['new-78b5df28-c9fd-4904-8910-aa1b96c60e35'] = $pane;
$display->panels['middle'][2] = 'new-78b5df28-c9fd-4904-8910-aa1b96c60e35';
$pane = new stdClass();
$pane->pid = 'new-fd3cbeb9-4de0-413f-8cd9-f88eb448f339';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'menu-menu-menu-home-member';
$pane->shown = TRUE;
$pane->access = array(
'plugins' => array(
0 => array(
'name' => 'role',
'settings' => array(
'rids' => array(
0 => 10,
1 => 11,
2 => 6,
3 => 8,
4 => 3,
5 => 4,
),
'context' => 'logged-in-user',
'not' => FALSE,
),
'context' => 'logged-in-user',
'not' => FALSE,
),
);
$pane->configuration = array(
'override_title' => 1,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 3;
$pane->locks = array();
$pane->uuid = 'fd3cbeb9-4de0-413f-8cd9-f88eb448f339';
$display->content['new-fd3cbeb9-4de0-413f-8cd9-f88eb448f339'] = $pane;
$display->panels['middle'][3] = 'new-fd3cbeb9-4de0-413f-8cd9-f88eb448f339';
$pane = new stdClass();
$pane->pid = 'new-c0f80278-c595-4c40-bcec-11063eb6fac5';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13051',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'showroom',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<No Title>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'showroom-pane',
'css_class' => 'showroom',
);
$pane->extras = array();
$pane->position = 4;
$pane->locks = array();
$pane->uuid = 'c0f80278-c595-4c40-bcec-11063eb6fac5';
$display->content['new-c0f80278-c595-4c40-bcec-11063eb6fac5'] = $pane;
$display->panels['middle'][4] = 'new-c0f80278-c595-4c40-bcec-11063eb6fac5';
$pane = new stdClass();
$pane->pid = 'new-71badc43-2232-4c2f-b454-e3be80726a22';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13052',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'database',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'bdd-pane',
'css_class' => 'bdd',
);
$pane->extras = array();
$pane->position = 5;
$pane->locks = array();
$pane->uuid = '71badc43-2232-4c2f-b454-e3be80726a22';
$display->content['new-71badc43-2232-4c2f-b454-e3be80726a22'] = $pane;
$display->panels['middle'][5] = 'new-71badc43-2232-4c2f-b454-e3be80726a22';
$pane = new stdClass();
$pane->pid = 'new-3b6cc0fd-a06a-403a-841e-404ea57fe234';
$pane->panel = 'middle';
$pane->type = 'panels_mini';
$pane->subtype = 'news_home_v2';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'news-pane',
'css_class' => 'news-panel',
);
$pane->extras = array();
$pane->position = 6;
$pane->locks = array();
$pane->uuid = '3b6cc0fd-a06a-403a-841e-404ea57fe234';
$display->content['new-3b6cc0fd-a06a-403a-841e-404ea57fe234'] = $pane;
$display->panels['middle'][6] = 'new-3b6cc0fd-a06a-403a-841e-404ea57fe234';
$pane = new stdClass();
$pane->pid = 'new-e5d39cf0-472b-4779-9d31-a1548fe86bc7';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13053',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'formations',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'formations-pane',
'css_class' => 'formations',
);
$pane->extras = array();
$pane->position = 7;
$pane->locks = array();
$pane->uuid = 'e5d39cf0-472b-4779-9d31-a1548fe86bc7';
$display->content['new-e5d39cf0-472b-4779-9d31-a1548fe86bc7'] = $pane;
$display->panels['middle'][7] = 'new-e5d39cf0-472b-4779-9d31-a1548fe86bc7';
$pane = new stdClass();
$pane->pid = 'new-9718c81e-6055-4e4e-a0e5-3796d58c6cbe';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13054',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'services',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'services-pane',
'css_class' => 'services',
);
$pane->extras = array();
$pane->position = 8;
$pane->locks = array();
$pane->uuid = '9718c81e-6055-4e4e-a0e5-3796d58c6cbe';
$display->content['new-9718c81e-6055-4e4e-a0e5-3796d58c6cbe'] = $pane;
$display->panels['middle'][8] = 'new-9718c81e-6055-4e4e-a0e5-3796d58c6cbe';
$pane = new stdClass();
$pane->pid = 'new-639eb2c7-bf5d-4920-b1bb-c33d8f72a650';
$pane->panel = 'middle';
$pane->type = 'views_panes';
$pane->subtype = 'publication_home_v2-panel_pane_1';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array();
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'publication',
);
$pane->extras = array();
$pane->position = 9;
$pane->locks = array();
$pane->uuid = '639eb2c7-bf5d-4920-b1bb-c33d8f72a650';
$display->content['new-639eb2c7-bf5d-4920-b1bb-c33d8f72a650'] = $pane;
$display->panels['middle'][9] = 'new-639eb2c7-bf5d-4920-b1bb-c33d8f72a650';
$pane = new stdClass();
$pane->pid = 'new-ab2ebbf2-7338-4db9-8df4-8b825058f98d';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '11175',
'links' => 0,
'leave_node_title' => 0,
'identifier' => '',
'build_mode' => 'full',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'contact-pane',
'css_class' => '',
);
$pane->extras = array();
$pane->position = 10;
$pane->locks = array();
$pane->uuid = 'ab2ebbf2-7338-4db9-8df4-8b825058f98d';
$display->content['new-ab2ebbf2-7338-4db9-8df4-8b825058f98d'] = $pane;
$display->panels['middle'][10] = 'new-ab2ebbf2-7338-4db9-8df4-8b825058f98d';
),
);
$pane->configuration = array(
'override_title' => 1,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 3;
$pane->locks = array();
$pane->uuid = 'fd3cbeb9-4de0-413f-8cd9-f88eb448f339';
$display->content['new-fd3cbeb9-4de0-413f-8cd9-f88eb448f339'] = $pane;
$display->panels['middle'][3] = 'new-fd3cbeb9-4de0-413f-8cd9-f88eb448f339';
$pane = new stdClass();
$pane->pid = 'new-c0f80278-c595-4c40-bcec-11063eb6fac5';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13051',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'showroom',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<No Title>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'showroom-pane',
'css_class' => 'showroom',
);
$pane->extras = array();
$pane->position = 4;
$pane->locks = array();
$pane->uuid = 'c0f80278-c595-4c40-bcec-11063eb6fac5';
$display->content['new-c0f80278-c595-4c40-bcec-11063eb6fac5'] = $pane;
$display->panels['middle'][4] = 'new-c0f80278-c595-4c40-bcec-11063eb6fac5';
$pane = new stdClass();
$pane->pid = 'new-71badc43-2232-4c2f-b454-e3be80726a22';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13052',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'database',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'bdd-pane',
'css_class' => 'bdd',
);
$pane->extras = array();
$pane->position = 5;
$pane->locks = array();
$pane->uuid = '71badc43-2232-4c2f-b454-e3be80726a22';
$display->content['new-71badc43-2232-4c2f-b454-e3be80726a22'] = $pane;
$display->panels['middle'][5] = 'new-71badc43-2232-4c2f-b454-e3be80726a22';
$pane = new stdClass();
$pane->pid = 'new-3b6cc0fd-a06a-403a-841e-404ea57fe234';
$pane->panel = 'middle';
$pane->type = 'panels_mini';
$pane->subtype = 'news_home_v2';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'news-pane',
'css_class' => 'news-panel',
);
$pane->extras = array();
$pane->position = 6;
$pane->locks = array();
$pane->uuid = '3b6cc0fd-a06a-403a-841e-404ea57fe234';
$display->content['new-3b6cc0fd-a06a-403a-841e-404ea57fe234'] = $pane;
$display->panels['middle'][6] = 'new-3b6cc0fd-a06a-403a-841e-404ea57fe234';
$pane = new stdClass();
$pane->pid = 'new-e5d39cf0-472b-4779-9d31-a1548fe86bc7';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13053',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'formations',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'formations-pane',
'css_class' => 'formations',
);
$pane->extras = array();
$pane->position = 7;
$pane->locks = array();
$pane->uuid = 'e5d39cf0-472b-4779-9d31-a1548fe86bc7';
$display->content['new-e5d39cf0-472b-4779-9d31-a1548fe86bc7'] = $pane;
$display->panels['middle'][7] = 'new-e5d39cf0-472b-4779-9d31-a1548fe86bc7';
$pane = new stdClass();
$pane->pid = 'new-9718c81e-6055-4e4e-a0e5-3796d58c6cbe';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13054',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'services',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'services-pane',
'css_class' => 'services',
);
$pane->extras = array();
$pane->position = 8;
$pane->locks = array();
$pane->uuid = '9718c81e-6055-4e4e-a0e5-3796d58c6cbe';
$display->content['new-9718c81e-6055-4e4e-a0e5-3796d58c6cbe'] = $pane;
$display->panels['middle'][8] = 'new-9718c81e-6055-4e4e-a0e5-3796d58c6cbe';
$pane = new stdClass();
$pane->pid = 'new-639eb2c7-bf5d-4920-b1bb-c33d8f72a650';
$pane->panel = 'middle';
$pane->type = 'views_panes';
$pane->subtype = 'publication_home_v2-panel_pane_1';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array();
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'publication',
);
$pane->extras = array();
$pane->position = 9;
$pane->locks = array();
$pane->uuid = '639eb2c7-bf5d-4920-b1bb-c33d8f72a650';
$display->content['new-639eb2c7-bf5d-4920-b1bb-c33d8f72a650'] = $pane;
$display->panels['middle'][9] = 'new-639eb2c7-bf5d-4920-b1bb-c33d8f72a650';
$pane = new stdClass();
$pane->pid = 'new-ab2ebbf2-7338-4db9-8df4-8b825058f98d';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '11175',
'links' => 0,
'leave_node_title' => 0,
'identifier' => '',
'build_mode' => 'full',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'contact-pane',
'css_class' => '',
);
$pane->extras = array();
$pane->position = 10;
$pane->locks = array();
$pane->uuid = 'ab2ebbf2-7338-4db9-8df4-8b825058f98d';
$display->content['new-ab2ebbf2-7338-4db9-8df4-8b825058f98d'] = $pane;
$display->panels['middle'][10] = 'new-ab2ebbf2-7338-4db9-8df4-8b825058f98d';
$display->hide_title = PANELS_TITLE_NONE;
$display->title_pane = '0';
$handler->conf['display'] = $display;
$page->default_handlers[$handler->name] = $handler;
$pages[''] = $page;
$pages['home_v2'] = $page;
return $pages;

View File

@ -36,127 +36,129 @@ function materio_home_v2_default_panels_mini() {
$display->cache = array();
$display->title = '';
$display->uuid = '4907c432-fcb2-4512-aa6a-5d96ec209978';
$display->storage_type = 'panels_mini';
$display->storage_id = 'news_home_v2';
$display->content = array();
$display->panels = array();
$pane = new stdClass();
$pane->pid = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281';
$pane->panel = 'bottom';
$pane->type = 'block';
$pane->subtype = 'simplenews-6274';
$pane->shown = FALSE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'news-letter',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '9cd76d41-bb30-42d9-9209-cdf495d97281';
$display->content['new-9cd76d41-bb30-42d9-9209-cdf495d97281'] = $pane;
$display->panels['bottom'][0] = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281';
$pane = new stdClass();
$pane->pid = 'new-dd7b8b21-bef6-4816-8f42-0165785fe751';
$pane->panel = 'bottom';
$pane->type = 'block';
$pane->subtype = 'simplenews-0';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$pane->locks = array();
$pane->uuid = 'dd7b8b21-bef6-4816-8f42-0165785fe751';
$display->content['new-dd7b8b21-bef6-4816-8f42-0165785fe751'] = $pane;
$display->panels['bottom'][1] = 'new-dd7b8b21-bef6-4816-8f42-0165785fe751';
$pane = new stdClass();
$pane->pid = 'new-04d42fc5-b2de-441b-aaff-3becac366c74';
$pane->panel = 'left';
$pane->type = 'views_panes';
$pane->subtype = 'news_home_v2-panel_pane_1';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'link_to_view' => 1,
'path' => 'actuality',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'news-pane',
'css_class' => 'news',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '04d42fc5-b2de-441b-aaff-3becac366c74';
$display->content['new-04d42fc5-b2de-441b-aaff-3becac366c74'] = $pane;
$display->panels['left'][0] = 'new-04d42fc5-b2de-441b-aaff-3becac366c74';
$pane = new stdClass();
$pane->pid = 'new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2';
$pane->panel = 'middle';
$pane->type = 'views_panes';
$pane->subtype = 'news_home_v2-panel_pane_2';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array();
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'daily',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '04d7e982-b05e-4bcd-a24a-8d80b8a4bee2';
$display->content['new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2'] = $pane;
$display->panels['middle'][0] = 'new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2';
$pane = new stdClass();
$pane->pid = 'new-5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28';
$pane->panel = 'right';
$pane->type = 'views_panes';
$pane->subtype = 'news_home_v2-panel_pane_3';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28';
$display->content['new-5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28'] = $pane;
$display->panels['right'][0] = 'new-5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28';
$pane = new stdClass();
$pane->pid = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281';
$pane->panel = 'bottom';
$pane->type = 'block';
$pane->subtype = 'simplenews-6274';
$pane->shown = FALSE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'news-letter',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '9cd76d41-bb30-42d9-9209-cdf495d97281';
$display->content['new-9cd76d41-bb30-42d9-9209-cdf495d97281'] = $pane;
$display->panels['bottom'][0] = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281';
$pane = new stdClass();
$pane->pid = 'new-dd7b8b21-bef6-4816-8f42-0165785fe751';
$pane->panel = 'bottom';
$pane->type = 'block';
$pane->subtype = 'simplenews-0';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$pane->locks = array();
$pane->uuid = 'dd7b8b21-bef6-4816-8f42-0165785fe751';
$display->content['new-dd7b8b21-bef6-4816-8f42-0165785fe751'] = $pane;
$display->panels['bottom'][1] = 'new-dd7b8b21-bef6-4816-8f42-0165785fe751';
$pane = new stdClass();
$pane->pid = 'new-04d42fc5-b2de-441b-aaff-3becac366c74';
$pane->panel = 'left';
$pane->type = 'views_panes';
$pane->subtype = 'news_home_v2-panel_pane_1';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'link_to_view' => 1,
'path' => 'actuality',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'news-pane',
'css_class' => 'news',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '04d42fc5-b2de-441b-aaff-3becac366c74';
$display->content['new-04d42fc5-b2de-441b-aaff-3becac366c74'] = $pane;
$display->panels['left'][0] = 'new-04d42fc5-b2de-441b-aaff-3becac366c74';
$pane = new stdClass();
$pane->pid = 'new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2';
$pane->panel = 'middle';
$pane->type = 'views_panes';
$pane->subtype = 'news_home_v2-panel_pane_2';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array();
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'daily',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '04d7e982-b05e-4bcd-a24a-8d80b8a4bee2';
$display->content['new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2'] = $pane;
$display->panels['middle'][0] = 'new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2';
$pane = new stdClass();
$pane->pid = 'new-5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28';
$pane->panel = 'right';
$pane->type = 'views_panes';
$pane->subtype = 'news_home_v2-panel_pane_3';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28';
$display->content['new-5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28'] = $pane;
$display->panels['right'][0] = 'new-5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28';
$display->hide_title = PANELS_TITLE_NONE;
$display->title_pane = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281';
$mini->display = $display;

View File

@ -1327,7 +1327,7 @@ function materio_user_profiles_field_default_field_instances() {
'rows' => 10,
),
'type' => 'text_textarea',
'weight' => 8,
'weight' => 7,
),
);

View File

@ -0,0 +1,14 @@
<?php
/**
* @file
* translations.features.inc
*/
/**
* Implements hook_ctools_plugin_api().
*/
function translations_ctools_plugin_api($module = NULL, $api = NULL) {
if ($module == "strongarm" && $api == "strongarm") {
return array("version" => "1");
}
}

View File

@ -0,0 +1,66 @@
<?php
/**
* @file
* translations.features.language.inc
*/
/**
* Implements hook_locale_default_languages().
*/
function translations_locale_default_languages() {
$languages = array();
// Exported language: cs.
$languages['cs'] = array(
'language' => 'cs',
'name' => 'Czech',
'native' => 'Čeština',
'direction' => 0,
'enabled' => 1,
'plurals' => 3,
'formula' => '(((($n%10)==1)&&(($n%100)!=11))?(0):((((($n%10)>=2)&&(($n%10)<=4))&&((($n%100)<10)||(($n%100)>=20)))?(1):2))',
'domain' => '',
'prefix' => 'cs',
'weight' => 0,
);
// Exported language: en.
$languages['en'] = array(
'language' => 'en',
'name' => 'English',
'native' => 'English',
'direction' => 0,
'enabled' => 1,
'plurals' => 0,
'formula' => '',
'domain' => '',
'prefix' => 'en',
'weight' => -10,
);
// Exported language: fr.
$languages['fr'] = array(
'language' => 'fr',
'name' => 'French',
'native' => 'Français',
'direction' => 0,
'enabled' => 1,
'plurals' => 2,
'formula' => '($n>1)',
'domain' => '',
'prefix' => 'fr',
'weight' => -9,
);
// Exported language: zh-hans.
$languages['zh-hans'] = array(
'language' => 'zh-hans',
'name' => 'Chinese, Simplified',
'native' => '简体中文',
'direction' => 0,
'enabled' => 1,
'plurals' => 2,
'formula' => '($n!=1)',
'domain' => '',
'prefix' => 'zh-hans',
'weight' => 0,
);
return $languages;
}

View File

@ -0,0 +1,14 @@
<?php
/**
* @file
* translations.features.translations_cs.inc
*/
/**
* Implements hook_translations_cs_defaults().
*/
function translations_translations_cs_defaults() {
$translations = array();
$translatables = array();
return $translations;
}

View File

@ -0,0 +1,59 @@
<?php
/**
* @file
* translations.features.translations_fr.inc
*/
/**
* Implements hook_translations_fr_defaults().
*/
function translations_translations_fr_defaults() {
$translations = array();
$translatables = array();
$translations['fr:default']['4194d8cbfbfed42d6fd00145134d1c78'] = array(
'source' => 'Lost my password',
'context' => '',
'location' => '/fr',
'translation' => 'J\'ai perdu mon mot de passe',
'plid' => 0,
'plural' => 0,
);
$translatables[] = t('Lost my password', array(), array('context' => ''));
$translations['fr:default']['43e6ee9cfc1d52719df78e10c6c0cd64'] = array(
'source' => 'Member access',
'context' => '',
'location' => '/fr',
'translation' => 'Accès membre',
'plid' => 0,
'plural' => 0,
);
$translatables[] = t('Member access', array(), array('context' => ''));
$translations['fr:default']['4a401353fd71b0c461fe419a6431f1e9'] = array(
'source' => '<strong>Oops!</strong></br> In order to access information matériO collected about thousands of manufacturers of emerging materials, you need to be part of materiO... ',
'context' => '',
'location' => '/fr/materio_search_api_ajax/actuality/1?keys=',
'translation' => '<strong>Oups!</strong></br> Pour accéder aux informations collectées par matériO sur les milliers de producteurs de matières émergentes, il vous est nécessaire d\'adhérer a matériO.',
'plid' => 0,
'plural' => 0,
);
$translatables[] = t('<strong>Oops!</strong></br> In order to access information matériO collected about thousands of manufacturers of emerging materials, you need to be part of materiO... ', array(), array('context' => ''));
$translations['fr:default']['daef5b384f5a22ebfbbb89feefc76c81'] = array(
'source' => 'Pursue',
'context' => '',
'location' => '/fr/form/adh-sion',
'translation' => 'Poursuivre',
'plid' => 0,
'plural' => 0,
);
$translatables[] = t('Pursue', array(), array('context' => ''));
$translations['fr:default']['dd1ba1872df91985ed1ca4cde2dfe669'] = array(
'source' => 'News',
'context' => '',
'location' => '/fr/admin/structure/features/cleanup/clear',
'translation' => 'Brèves',
'plid' => 0,
'plural' => 0,
);
$translatables[] = t('News', array(), array('context' => ''));
return $translations;
}

View File

@ -0,0 +1,14 @@
<?php
/**
* @file
* translations.features.translations_zh_hans.inc
*/
/**
* Implements hook_translations_zh_hans_defaults().
*/
function translations_translations_zh_hans_defaults() {
$translations = array();
$translatables = array();
return $translations;
}

View File

@ -0,0 +1,33 @@
<?php
/**
* @file
* translations.features.user_permission.inc
*/
/**
* Implements hook_user_default_permissions().
*/
function translations_user_default_permissions() {
$permissions = array();
// Exported permission: 'administer languages'.
$permissions['administer languages'] = array(
'name' => 'administer languages',
'roles' => array(
'root' => 'root',
),
'module' => 'locale',
);
// Exported permission: 'translate interface'.
$permissions['translate interface'] = array(
'name' => 'translate interface',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'locale',
);
return $permissions;
}

View File

@ -0,0 +1,56 @@
name = Translations
core = 7.x
package = Materio
version = 7.x-1.0-beta
dependencies[] = ctools
dependencies[] = features
dependencies[] = features_translations
dependencies[] = locale
dependencies[] = strongarm
features[ctools][] = strongarm:strongarm:1
features[features_api][] = api:2
features[language][] = cs
features[language][] = en
features[language][] = fr
features[language][] = zh-hans
features[translations_cs][] = cs:blocks
features[translations_cs][] = cs:default
features[translations_cs][] = cs:field
features[translations_cs][] = cs:menu
features[translations_cs][] = cs:metatag
features[translations_cs][] = cs:node
features[translations_cs][] = cs:profile2
features[translations_cs][] = cs:rules
features[translations_cs][] = cs:uc_attribute
features[translations_cs][] = cs:uc_order_status
features[translations_cs][] = cs:webform
features[translations_fr][] = fr:blocks
features[translations_fr][] = fr:default
features[translations_fr][] = fr:field
features[translations_fr][] = fr:menu
features[translations_fr][] = fr:metatag
features[translations_fr][] = fr:node
features[translations_fr][] = fr:profile2
features[translations_fr][] = fr:rules
features[translations_fr][] = fr:uc_attribute
features[translations_fr][] = fr:uc_order_status
features[translations_fr][] = fr:webform
features[translations_zh_hans][] = zh_hans:blocks
features[translations_zh_hans][] = zh_hans:default
features[translations_zh_hans][] = zh_hans:field
features[translations_zh_hans][] = zh_hans:menu
features[translations_zh_hans][] = zh_hans:metatag
features[translations_zh_hans][] = zh_hans:node
features[translations_zh_hans][] = zh_hans:profile2
features[translations_zh_hans][] = zh_hans:rules
features[translations_zh_hans][] = zh_hans:uc_attribute
features[translations_zh_hans][] = zh_hans:uc_order_status
features[translations_zh_hans][] = zh_hans:webform
features[user_permission][] = administer languages
features[user_permission][] = translate interface
features[variable][] = i18n_node_translation_switch
features[variable][] = locale_field_language_fallback
features[variable][] = locale_language_negotiation_url_part
features[variable][] = locale_language_providers_weight_language
features[variable][] = taxonomy_csv_locale_custom
project path = sites/all/modules/features

View File

@ -0,0 +1,7 @@
<?php
/**
* @file
* Code for the Translations feature.
*/
include_once 'translations.features.inc';

View File

@ -0,0 +1,55 @@
<?php
/**
* @file
* translations.strongarm.inc
*/
/**
* Implements hook_strongarm().
*/
function translations_strongarm() {
$export = array();
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'i18n_node_translation_switch';
$strongarm->value = 1;
$export['i18n_node_translation_switch'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'locale_field_language_fallback';
$strongarm->value = 1;
$export['locale_field_language_fallback'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'locale_language_negotiation_url_part';
$strongarm->value = '0';
$export['locale_language_negotiation_url_part'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'locale_language_providers_weight_language';
$strongarm->value = array(
'locale-url' => '-8',
'locale-session' => '-6',
'locale-user' => '-4',
'locale-browser' => '-2',
'language-default' => '10',
);
$export['locale_language_providers_weight_language'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'taxonomy_csv_locale_custom';
$strongarm->value = '';
$export['taxonomy_csv_locale_custom'] = $strongarm;
return $export;
}

View File

@ -144,3 +144,7 @@ div.messages.status{color:#468847;background-color:#dff0d8;border-color:#d6e9c6;
#better-messages-wrapper #better-messages-default div.messages.error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7;}
#better-messages-wrapper #better-messages-default div.messages.status{color:#468847;background-color:#dff0d8;border-color:#d6e9c6;}
#better-messages-wrapper #better-messages-default .footer{border:none;padding:0;margin:0;}#better-messages-wrapper #better-messages-default .footer a.message-close{background:#ffffff url('../images/close.png') no-repeat center center;width:15px;height:15px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;display:block;}
body.page-admin #page img{
max-width: 99999px;
height: auto;
}

View File

@ -116,8 +116,8 @@ span.autocomplete-deluxe-button{top:0.25em;}
.fieldset-title,
.collapsible .fieldset-legend a{
display:inline-block; width:auto;
.rounded();
font-size:12px;
.rounded();
font-size:12px;
font-weight:normal;
text-transform: uppercase;
margin:0px;
@ -152,18 +152,18 @@ li{list-style: none inside url();}
.fieldset-title,
.vertical-tab-button strong, .horizontal-tab-button strong{text-transform: uppercase; font-size:0.8em; font-weight:bold;}
div.form-type-checkboxes{
&>label, &>div.form-checkboxes{.inlineblock();}
&>label, &>div.form-checkboxes{.inlineblock();}
}
.form-item-language, .form-type-select{
&>label, &>select{.inlineblock();}
&>label{width:35%;}
&>select{max-width:60%;}
}
.form-type-textfield{
&>label, &>input.form-text{.inlineblock(); margin:0; vertical-align:middle;}
&>label{width:35%;}
@ -180,25 +180,25 @@ li{list-style: none inside url();}
.form-item{.inlineblock();}
input.form-text{width:100%;}
}
.autocomplete-deluxe-button{
margin-top:-3px;
}
.addressfield-container-inline{
&>div.form-item{.inlineblock(); margin:0; width:30%;}
}
fieldset.filter-wrapper{display:none;}
input.fid.form-text{display:none;}
input.fid.form-text{display:none;}
.form-region-right{
position:relative;
fieldset.form-wrapper{max-width:100%; padding:0; margin:0;}
.fieldset-wrapper{padding:0;}
input.form-text{width:100%;}
}
tr.draggable{
fieldset{
legend{display:none;}
@ -208,8 +208,8 @@ li{list-style: none inside url();}
}
}
}
.field-widget-term-reference-tree .form-item.form-type-checkbox-tree{
display: block;
.term-reference-tree{
@ -218,7 +218,7 @@ li{list-style: none inside url();}
}
}
}
/** VERTICAL TABS */
@ -260,8 +260,8 @@ li{list-style: none inside url();}
}
.vertical-tabs-list .summary { font-size:11px; }
.page-admin table,
.update tr.warning .version-recommended,
.page-admin table,
.update tr.warning .version-recommended,
.update tr.error .version-recommended{
background-color: transparent;
border:0px solid transparent;
@ -272,8 +272,8 @@ li{list-style: none inside url();}
}
.page-admin table tr{
&.even, &.odd{
td, h3 {background-color: transparent;}
&.even, &.odd{
td, h3 {background-color: transparent;}
&:hover{ background: #D4EFEE;}
&.ok{
background-color: #d1f2a3;
@ -296,7 +296,7 @@ li{list-style: none inside url();}
color: #468847;//#036;
background-color: #dff0d8;//#bdf;
// td{
// border-bottom:3px solid #d6e9c6;//#ace;
// border-bottom:3px solid #d6e9c6;//#ace;
// }
}
&.warning, &.warning:hover{
@ -313,7 +313,7 @@ li{list-style: none inside url();}
// border-bottom: 3px solid #eed3d7;
// }
}
// td{ border:0 solid #fff;}
}
@ -343,7 +343,7 @@ input.form-submit,
color:#333;
text-align:center;
font-size:12px;
font-weight:normal;
border-width:1px;
@ -351,13 +351,13 @@ input.form-submit,
border-color:#ddd #ddd #ccc;
background:#bdf url();
.rounded();
&.field-add-more-submit{
padding:0.1em 0.4em 0;
font-size:10px;
}
}
.node-edit, .button, .node-delete{font-size:10px;padding:0.1em 0.6em;}
@ -367,7 +367,7 @@ input.form-submit:hover,
.node-edit:hover, .button:hover, .node-delete:hover{
border-color:#ddd #ddd #ccc;
-webkit-box-shadow:#ace 0px 0px 0px;
color:#bdf;
background-color: #848484;
}
@ -384,7 +384,7 @@ input.button-no, .node-delete{
&:hover{
color:#EA4B4A;
}
}
/** admin module */
@ -416,16 +416,16 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
background-color: #D8D8D8;
}
.defaulted, .views-ui-display-tab-bucket .views-display-setting.even, .views-ui-display-tab-bucket .views-display-setting.odd{ //:not(.overriden)
.defaulted, .views-ui-display-tab-bucket .views-display-setting.even, .views-ui-display-tab-bucket .views-display-setting.odd{ //:not(.overriden)
color: #666;
background-color: #E0E0E0;
font-style: italic;
/* font-weight:bold;*/
a{color: #3F80B3}
}
}
.views-ui-display-tab-bucket.overridden .views-display-setting, .views-ui-display-tab-bucket.overridden .views-display-setting,
.views-display-setting.overridden{ //:not(.overriden)
.views-display-setting.overridden{ //:not(.overriden)
&, &.even, &.odd{
color: #7F7F7F;
background-color: #F9F9F9;
@ -433,7 +433,7 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
/* font-weight:bold;*/
a{color: #3188D1;}
}
}
}
}
.view{
.view-header{
@ -447,18 +447,18 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
.inlineblock(); padding:0;
li{
height:20px;
a, span{padding:1px 10px 2px;}
a, span{padding:1px 10px 2px;}
}
}
}
// EXPOSED
.view-filters{
padding:1em 0; margin:0 0 1em 0;
border: 1px solid #CCC; .border-radius(5px,5px,5px,5px);
&>span.title, &>form{.inlineblock();width:auto;position:relative;vertical-align: top;}
&>span.title, &>form{.inlineblock();width:auto;position:relative;vertical-align: top;}
&>span.title{padding:0.7em 1em;}
fieldset{
.inlineblock(); padding:0 1em;
@ -477,14 +477,14 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
fieldset#edit-select{
padding:1em 0; margin:0 0 1em 0;
border: 1px solid #CCC; .border-radius(5px,5px,5px,5px);
legend, .fieldset-content{.inlineblock();}
legend{
width:auto;
*{background-color: transparent;}
}
.fieldset-content{
padding:0;
select, input{font-size:0.8em;}
@ -495,7 +495,7 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
.form-item{.inlineblock();vertical-align:top;}
em{padding:0 1em;}
}
}
/** media browser */
@ -509,15 +509,15 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
float:left;
&>div{margin:0 10px 10px 0;}
}
}
}
}
*:focus{
border: 1px solid #BDF!important;
}
/* Contain floats: h5bp.com/q */
/* Contain floats: h5bp.com/q */
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { zoom: 1; }
@ -531,7 +531,7 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
table{
caption{ text-align: left; padding:2em 0 0 0; font-weight:bold;}
th{line-height:1; background-color: @greylite!important;}
td{padding-top:1em;padding-bottom:1em;}
@ -545,7 +545,7 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
background: @grey!important;
}
}
td.views-field-title{ width:350px; }
a.node-title-link{font-size:1.1em; padding:0 0 0.3em; display:inline-block;}
td.views-field-field-people{width:100px;}
@ -555,7 +555,7 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
#modalContent{
}
#modalContent div.ctools-modal-content{
@ -563,9 +563,9 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
border: 1 solid #999;
}
#modalContent div.ctools-modal-content .modal-header,
#modalContent div.ctools-modal-content .modal-header a,
@ -598,7 +598,7 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
border-color: #eed3d7;//#d52;
}
&.status {
color: #468847;//#036;
background-color: #dff0d8;//#bdf;
@ -618,7 +618,7 @@ div.messages {
.messages-label{display:none;}
div.messages{
.messages(); margin:0 0 10px 0;
}
.footer{
border:none; padding:0; margin:0;
@ -630,3 +630,9 @@ div.messages {
}
}
}
body.page-admin #page img{
max-width: 99999px;
height: auto;
}

View File

@ -2888,7 +2888,12 @@ body.node-type-publication #footer {
display: none; } }
@media only screen and (min-width: 40.063em) and (max-width: 64em) {
#header .logo span.slogan {
display: none; } }
display: block;
margin-left: 0.1em; } }
@media only screen and (min-width: 64.063em) and (max-width: 90em) {
#header .logo span.slogan {
display: block;
margin-left: 0.1em; } }
.ie8 #header .logo span.slogan {
position: absolute;
margin-top: 22px; }
@ -2936,6 +2941,38 @@ body.node-type-publication #footer {
@media only screen and (min-width: 90.063em) and (max-width: 120em) {
#header #header-blocks .block:not(:last-child) {
padding-right: 0.3em; } }
@media only screen and (max-width: 40em) {
#header #header-blocks #headerblock-left {
display: none; } }
#header #header-blocks #block-social-media-links-social-media-links ul.social-media-links {
margin: 0;
line-height: 0; }
#header #header-blocks #block-social-media-links-social-media-links li {
line-height: 1; }
#header #header-blocks #block-social-media-links-social-media-links li.facebook a {
background-image: url("../img/socialicons/svg/Facebook-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.twitter a {
background-image: url("../img/socialicons/svg/Twitter-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.linkedin a {
background-image: url("../img/socialicons/svg/LinkedIn-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.pinterest a {
background-image: url("../img/socialicons/svg/Pinterest-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.vimeo a {
background-image: url("../img/socialicons/svg/Vimeo-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.rss a {
background-image: url("../img/socialicons/svg/RSS-color.svg"); }
@media only screen and (min-width: 40.063em) and (max-width: 64em) {
#header #header-blocks #block-social-media-links-social-media-links li.linkedin, #header #header-blocks #block-social-media-links-social-media-links li.pinterest, #header #header-blocks #block-social-media-links-social-media-links li.vimeo {
display: none; } }
#header #header-blocks #block-social-media-links-social-media-links a {
display: block;
width: 16px;
height: 16px;
background-position: center;
background-repeat: no-repeat;
background-size: contain; }
#header #header-blocks #block-social-media-links-social-media-links img {
display: none; }
#header #header-blocks #block-materio-user-front-link a {
font-size: 12px; }
#header #header-blocks #block-materio-user-front-link span.text {
@ -3103,34 +3140,10 @@ body.node-type-publication #footer {
vertical-align: top;
zoom: 1;
*display: inline;
vertical-align: middle;
padding: 0; }
padding: 0;
vertical-align: middle; }
#header #header-blocks #headerblock-right .block:first-child {
padding: 0; }
#header #header-blocks #block-locale-language ul, #header #header-blocks #block-locale-language li {
margin: 0;
padding: 0;
list-style-type: none;
font-size: 12px;
line-height: 1; }
#header #header-blocks #block-locale-language ul.active, #header #header-blocks #block-locale-language li.active {
display: none; }
.ie8 #header #header-blocks #block-locale-language {
padding-top: 5px; }
#header #header-blocks #block-locale-language ul {
padding-top: 0.155em; }
#header #header-blocks #block-locale-language li {
font-size: 0.9em;
padding: 0.33em 0.35em 0.3em;
border-radius: 3px;
background-clip: padding-box;
background-color: #808080;
transition: background-color 0.3s ease-out; }
#header #header-blocks #block-locale-language li, #header #header-blocks #block-locale-language li > * {
color: #fff;
text-transform: uppercase; }
#header #header-blocks #block-locale-language li:hover {
background-color: #1A1A1A; }
.ie8 #header #header-blocks #block-menu-menu-top-menu h2 {
display: none; }
#header #header-blocks #block-menu-menu-top-menu h2 i {
@ -3188,34 +3201,55 @@ body.node-type-publication #footer {
display: block; }
html.no-touch #header #header-blocks #block-menu-menu-top-menu:hover .menu-wrapper ul.menu li, #header #header-blocks #block-menu-menu-top-menu.hovered .menu-wrapper ul.menu li {
height: 25px; } }
#header #header-blocks #block-locale-language {
position: relative; }
#header #header-blocks #block-locale-language h2 {
font-size: 9px;
line-height: 1.6;
display: inline-block;
padding: 0.20em 0.45em 0.10em;
margin: 0;
border-radius: 3px;
background-clip: padding-box;
color: #fff;
text-transform: uppercase;
background-color: #4d4b4b; }
#header #header-blocks #block-locale-language ul, #header #header-blocks #block-locale-language li {
margin: 0;
padding: 0;
list-style-type: none;
font-size: 12px;
line-height: 0.9; }
#header #header-blocks #block-locale-language ul.active, #header #header-blocks #block-locale-language li.active {
display: none; }
.ie8 #header #header-blocks #block-locale-language {
padding-top: 5px; }
#header #header-blocks #block-locale-language ul {
padding-top: 2.1em;
position: absolute;
top: 0;
left: 0;
text-align: left; }
#header #header-blocks #block-locale-language li {
height: 0;
overflow: hidden;
transition: height 0.3s ease-in-out; }
#header #header-blocks #block-locale-language li a {
display: inline-block;
font-size: 0.9em;
padding: 0.33em 0.34em 0.3em;
border-radius: 3px;
background-clip: padding-box;
color: #fff;
text-transform: uppercase;
background-color: #808080;
transition: background-color 0.3s ease-out; }
#header #header-blocks #block-locale-language li a:hover {
background-color: #1A1A1A; }
#header #header-blocks #block-locale-language:hover li {
height: 1.5em; }
#header #header-blocks #block-materio-user-old-database-link a {
font-size: 12px; }
#header #header-blocks #block-social-media-links-social-media-links ul.social-media-links {
margin: 0;
line-height: 0; }
#header #header-blocks #block-social-media-links-social-media-links li {
line-height: 1; }
#header #header-blocks #block-social-media-links-social-media-links li.facebook a {
background-image: url("../img/socialicons/svg/Facebook-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.twitter a {
background-image: url("../img/socialicons/svg/Twitter-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.linkedin a {
background-image: url("../img/socialicons/svg/LinkedIn-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.pinterest a {
background-image: url("../img/socialicons/svg/Pinterest-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.vimeo a {
background-image: url("../img/socialicons/svg/Vimeo-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.rss a {
background-image: url("../img/socialicons/svg/RSS-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links a {
display: block;
width: 16px;
height: 16px;
background-position: center;
background-repeat: no-repeat;
background-size: contain; }
#header #header-blocks #block-social-media-links-social-media-links img {
display: none; }
/*
__ _ ___ __ _
@ -3628,8 +3662,8 @@ body.home-v2 #main {
#content-top #block-materio-flag-materio-flag-mybookmarks h2, #content-top #block-materio-flag-materio-flag-mylists h2 {
font-size: 12px;
font-weight: 700;
margin: 0 0 0.5em 0;
line-height: 1.2;
margin: 0;
color: #000; }
#content-top #block-materio-flag-materio-flag-mybookmarks h2 a.open-list, #content-top #block-materio-flag-materio-flag-mybookmarks h2 i.fi-x, #content-top #block-materio-flag-materio-flag-mylists h2 a.open-list, #content-top #block-materio-flag-materio-flag-mylists h2 i.fi-x {
display: moz-inline-stack;
@ -3673,9 +3707,6 @@ body.home-v2 #main {
zoom: 1;
*display: inline;
vertical-align: middle; }
@media only screen and (max-width: 40em) {
#tool-bar .inner-content {
padding: 0; } }
.oldie #tool-bar {
background-color: #B1ADAD;
padding: 0 10px; }
@ -3718,7 +3749,7 @@ body.home-v2 #main {
.csstransitions #tool-bar #block-materio-page-title-materio-page-title:hover a.edit-list {
opacity: 1;
transition: opacity 0.3s ease-out; }
@media only screen and (min-width: 40.063em) and (max-width: 64em) {
@media only screen and (max-width: 40em) {
#tool-bar #block-materio-page-title-materio-page-title {
display: block; } }
#tool-bar #block-materio-search-api-materio-search-api-viewmode .viewmode-link {
@ -6478,13 +6509,14 @@ body.node-type-simplenews #content article.node.node-simplenews {
body.node-type-simplenews #content article.node.node-simplenews {
max-width: 100%;
overflow-x: hidden; }
body.node-type-simplenews #content article.node.node-simplenews table, body.node-type-simplenews #content article.node.node-simplenews tbody, body.node-type-simplenews #content article.node.node-simplenews tr, body.node-type-simplenews #content article.node.node-simplenews td {
display: block;
max-width: 100%; }
body.node-type-simplenews #content article.node.node-simplenews table {
width: 100% !important; }
body.node-type-simplenews #content article.node.node-simplenews td {
vertical-align: top; }
body.node-type-simplenews #content article.node.node-simplenews img {
max-width: 100%; }
body.node-type-simplenews #content article.node.node-simplenews p {
padding-right: 1em; } }
padding: 0 0.5em; } }
/*
_____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____

View File

@ -420,12 +420,13 @@
* layout
*/
function initLayout(){
if(!_max_768()){
trace("initLayout");
// if(!_max_768()){
var height = $('#header').h() + $('#tasks').h();
if(!_max_480() && !_touch ){
height += $('#utilities').h()+15;
}
// if(!_max_480() && !_touch ){
height += $('#utilities').h();//+15;
// }
//$('#main').css('margin-top', height+15);
// $('#container').css('padding-top', height+15);
@ -433,7 +434,7 @@
if(!$('html').is(".ie8")){
$('#container').animate({'padding-top':height}, 300);
}
}
// }
};
/**

File diff suppressed because one or more lines are too long

View File

@ -223,7 +223,8 @@ $headerouterheight:$headerheight+$headerpaddingtop+$headerpaddingbottom;
margin-left:-0.5em;
@include fs900;
@media #{$small-only} {display:none;}
@media #{$medium-only} {display:none;}
@media #{$medium-only} { display:block; margin-left:0.1em; }
@media #{$large-only} { display:block; margin-left:0.1em; }
.ie8 &{position: absolute; margin-top:22px;}
}
}
@ -256,6 +257,43 @@ $headerouterheight:$headerheight+$headerpaddingtop+$headerpaddingbottom;
}
}
#headerblock-left{
@media #{$small-only}{display:none;}
// @media #{$medium-only}{display:none;}
}
#block-social-media-links-social-media-links{
ul.social-media-links{margin:0;line-height: 0;}
li{
line-height: 1;
&.facebook a{background-image: url("../img/socialicons/svg/Facebook-color.svg");}
&.twitter a{background-image: url("../img/socialicons/svg/Twitter-color.svg");}
&.linkedin a{background-image: url("../img/socialicons/svg/LinkedIn-color.svg");}
&.pinterest a{background-image: url("../img/socialicons/svg/Pinterest-color.svg");}
&.vimeo a{background-image: url("../img/socialicons/svg/Vimeo-color.svg");}
&.rss a{background-image: url("../img/socialicons/svg/RSS-color.svg");}
// @media #{$small-only}{
// &.linkedin,&.pinterest,&.vimeo{display:none;}
// }
@media #{$medium-only}{
&.linkedin,&.pinterest,&.vimeo{display:none;}
}
}
a{
display:block; width:16px; height:16px;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}
img{display:none;}
}
#block-materio-user-front-link{
a{
@include fs12;
@ -405,56 +443,11 @@ $headerouterheight:$headerheight+$headerpaddingtop+$headerpaddingbottom;
#headerblock-right{
.block{
@include inlineblock; vertical-align: middle; padding:0;
@include inlineblock; padding:0; vertical-align: middle;
&:first-child{padding: 0;}
}
}
#block-locale-language{
// margin-left:1em;
// border-left: 1px solid #707070;
ul,li{
margin:0;padding:0;list-style-type: none;
@include fs12;
line-height: 1;
&.active{display:none;}
}
.ie8 &{padding-top:5px;}
ul{padding-top:0.155em;}
li{
font-size: 0.9em;
padding:0.33em 0.35em 0.3em;
@include rounded(3px);
&, >*{color:#fff; text-transform: uppercase;}
background-color: #808080;
@include transition-simply-prefix(background-color 0.3s ease-out);
&:hover{background-color: #1A1A1A;}
}
}
// #block-menu-menu-about{
// position:relative;
// ul.menu{
// position:absolute; padding: 0 5px 5px 5px; margin: 0; width:100px; display:none; right:0; text-align: right;
// background-color: #e6e6e6; @include rounded(5px);
// li{
// height:0;
// overflow:hidden; list-style-type: none;
// .transition-simply-prefix(height 0.3s ease-out");
// a{
// display:block; width:100%; padding:2px 5px; .12;
// }
// }
// }
// &:hover{
// ul.menu{
// display:block;
// li{height:25px;}
// }
// }
// }
#block-menu-menu-top-menu{
h2{
.ie8 &{display:none;}
@ -505,33 +498,60 @@ $headerouterheight:$headerheight+$headerpaddingtop+$headerpaddingbottom;
} //change this
}
#block-locale-language{
position: relative;
h2{
@include fs9;
line-height:1.6;
display: inline-block;
padding:0.20em 0.45em 0.10em; margin:0;
@include rounded(3px);
color:#fff; text-transform: uppercase;
background-color: #4d4b4b;
// @media #{$small-only}{ span.menu-title{display:none;}}
// @media #{$medium-only}{ span.menu-title{display:none;}}
}
ul,li{
margin:0;padding:0;list-style-type: none;
@include fs12;
line-height: 0.9;
&.active{display:none;}
}
.ie8 &{padding-top:5px;}
ul{
padding-top:2.1em;
position:absolute;
top:0; left:0;
text-align: left;
}
li{
a{
display: inline-block;
font-size: 0.9em;
padding:0.33em 0.34em 0.3em;
// margin:0 0 0 0;
@include rounded(3px);
color:#fff; text-transform: uppercase;
background-color: #808080;
@include transition-simply-prefix(background-color 0.3s ease-out);
&:hover{background-color: #1A1A1A;}
}
height:0;
overflow: hidden;
@include transition-simply-prefix(height 0.3s ease-in-out);
}
&:hover{li{height:1.5em;}}
}
#block-materio-user-old-database-link{
a{
@include fs12;
;}
}
#block-social-media-links-social-media-links{
ul.social-media-links{margin:0;line-height: 0;}
li{
line-height: 1;
&.facebook a{background-image: url("../img/socialicons/svg/Facebook-color.svg");}
&.twitter a{background-image: url("../img/socialicons/svg/Twitter-color.svg");}
&.linkedin a{background-image: url("../img/socialicons/svg/LinkedIn-color.svg");}
&.pinterest a{background-image: url("../img/socialicons/svg/Pinterest-color.svg");}
&.vimeo a{background-image: url("../img/socialicons/svg/Vimeo-color.svg");}
&.rss a{background-image: url("../img/socialicons/svg/RSS-color.svg");}
}
a{
display:block; width:16px; height:16px;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}
img{display:none;}
}
}
}
/*
@ -886,7 +906,7 @@ $headerouterheight:$headerheight+$headerpaddingtop+$headerpaddingbottom;
.ie8 &{margin-top:40px;}
h2{
@include fs12; @include fs700; margin: 0 0 0.5em 0; line-height:1.2; color:#000;
@include fs12; @include fs700; line-height:1.2; margin:0; color:#000;
a.open-list, i.fi-x{
@include inlineblock(); cursor:pointer; color:#000; margin-left:0.5em;
opacity:0; @include transition-simply-prefix(opacity 0.1s ease-out);
@ -947,7 +967,7 @@ $headerouterheight:$headerheight+$headerpaddingtop+$headerpaddingbottom;
// margin: 5px;
}
@media #{$small-only}{
padding:0;
// padding:0;
// h1{line-height:0.5;}
}
}
@ -983,7 +1003,7 @@ $headerouterheight:$headerheight+$headerpaddingtop+$headerpaddingbottom;
a.edit-list{ @include op-visible; }
}
@media #{$medium-only}{ display:block;}
@media #{$small-only}{ display:block;}
}
#block-materio-search-api-materio-search-api-viewmode{
@ -2212,13 +2232,19 @@ body.node-type-simplenews{
max-width: 100%;
overflow-x: hidden;
// .field-name-body{position: relative;}
table, tbody, tr,td{
display: block;
max-width: 100%;
// table, tbody, tr,td{
// display: block;
// max-width: 100%;
// }
table{
width:100%!important;
}
td{
vertical-align: top
}
img{max-width: 100%;}
p{
padding-right: 1em;
padding: 0 0.5em;
}
}
}