Skip to content
Snippets Groups Projects
Commit d41072a2 authored by Chris Gross's avatar Chris Gross
Browse files

daily build

parent 9e263a9a
No related branches found
No related tags found
No related merge requests found
Showing
with 4658 additions and 1 deletion
WCM Base 7.x-1.x, 2015-10-08
----------------------------
- WCM Base Profile: Added Better Exposed Filters module.
- OCIO SimpleSAMLphp Auth: Fixed bug that allowed users to change their own auth type.
- OCIO WYSIWYG, OCIO Field Bases: LinkIt now inserts link to file instead of entity page.
- OCIO Omega Base: Improved styling of user pages and leadership and contact views.
WCM Base 7.x-1.x, 2015-10-07
----------------------------
- WCM Base Profile: Added Private and Private files download permission modules.
......
......@@ -10,7 +10,6 @@ includes[wcm_base] = wcm_base.make
;custom
projects[ocio_accessibility][options][working-copy] = TRUE
projects[ocio_admin_menu][options][working-copy] = TRUE
projects[ocio_aggregator][options][working-copy] = TRUE
projects[ocio_basic_page][options][working-copy] = TRUE
projects[ocio_book][options][working-copy] = TRUE
projects[ocio_buckeye_alert][options][working-copy] = TRUE
......
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.
The following patches have been applied to this project:
- http://drupal.org/files/issues/bef-placeholder_support-2560321-2.patch
This file was automatically generated by Drush Make (http://drupal.org/project/drush).
\ No newline at end of file
-- SUMMARY --
The Better Exposed Filters module replaces the Views' default single-
or multi-select boxes with radio buttons or checkboxes, respectively.
Views Filters are a powerful tool to limit the results of a given view.
When you expose a filter, you allow the user to interact with the view
making it easy to build a customized advanced search. For example,
exposing a taxonomy filter lets your site visitor search for articles
with specific tags. Better Exposed Filters gives you greater control
over the rendering of exposed filters.
For a full description of the module, visit the project page:
https://drupal.org/project/better_exposed_filters
To submit bug reports and feature suggestions, or to track changes:
https://drupal.org/project/issues/better_exposed_filters
For more information on Views filters, see the Advanced Help documentation
that comes with Views or visit the online version:
https://api.drupal.org/api/views/7
-- REQUIREMENTS --
This module requires the Views module:
https://drupal.org/project/views
-- DOCUMENTATION --
See:
https://drupal.org/node/766974
-- CONTACT --
The maintainer for this project is Mike Keran, known on drupal.org as mikeker
(https://drupal.org/user/192273). He can be contacted for work on this module or
other custom projects.
<?php
/**
* @file
* Hooks provided by the Better Expoosed Filters module.
*/
/**
* Alters Better Exposed Filters settings before the exposed form widgets are
* built.
*
* @param $settings
* The settings array.
* @param $context
* The view and display to which the settings apply.
*/
function hook_better_exposed_filters_settings_alter(&$settings, $context) {
// Set the min/max value of a slider.
$settings['field_price_value']['slider_options']['bef_slider_min'] = 500;
$settings['field_price_value']['slider_options']['bef_slider_max'] = 5000;
}
/**
* @file better_exposed_filters.css
*
* Basic styling for features added by Better Exposed Filters
*/
/*
* Prevents collapsed filters from disappearing completely
*/
fieldset.bef-select-as-radios-fieldset.collapsed legend,
fieldset.bef-select-as-checkboxes-fieldset.collapsed legend
{
position: relative;
}
/*
* Styles for the jQuery UI slider widgets.
*/
.bef-slider.ui-slider-horizontal {
margin-top: 6px;
}
.bef-slider.ui-slider-vertical {
margin-top: 12px;
}
; $Id
name = Better Exposed Filters
description = Allow the use of checkboxes or radio buttons for exposed Views filters
core = 7.x
package = Views
dependencies[] = views
files[] = better_exposed_filters_exposed_form_plugin.inc
files[] = tests/better_exposed_filters.test
; Information added by Drupal.org packaging script on 2015-08-16
version = "7.x-3.2+36-dev"
core = "7.x"
project = "better_exposed_filters"
datestamp = "1439736843"
<?php
/**
* @file
* Install/Uninstall code for the Better Exposed Filters module.
*/
/**
* Implements hook_disable.
*/
function better_exposed_filters_disable() {
// Check any views have their exposed form plugin set to BEF. If so, offer
// a warning about disabling the module.
$warnings = array();
foreach (views_get_all_views() as $view) {
foreach ($view->display as $display) {
if (!empty($display->display_options['exposed_form']['type']) && 'better_exposed_filters' == $display->display_options['exposed_form']['type']) {
$warnings[] = t('The %display_title display in the %view_name view. (<a href="@link" target="_blank">Update this display</a>)',
array(
'%display_title' => $display->display_title,
'%view_name' => $view->human_name,
'@link' => url('admin/structure/views/view/' . $view->name . '/edit/' . $display->id),
)
);
}
}
}
if (!empty($warnings)) {
$message = t('The following Views displays are using the Better Exposed Filters plugin, which is no longer enabled. It is recommended that you update these displays (links open in a new window) before removing the code associated with this module. Not doing so may cause unexpected results.');
$message .= '<ul><li>' . join('</li></li>', $warnings) . '</li></ul>';
drupal_set_message($message, 'warning');
}
}
/*
* Implementations of hook_update_N.
*
* Comments above each function appear in the update database message.
*/
/**
* Rebuild the theme registry to discover new theme_bef_checkbox() function.
*/
function better_exposed_filters_update_7000() {
drupal_theme_rebuild();
return t('Theme registry has been rebuilt.');
}
/**
* @file better_exposed_filters.js
*
* Provides some client-side functionality for the Better Exposed Filters module
*/
(function ($) {
Drupal.behaviors.betterExposedFilters = {
attach: function(context) {
// Add highlight class to checked checkboxes for better theming
$('.bef-tree input[type=checkbox], .bef-checkboxes input[type=checkbox]')
// Highlight newly selected checkboxes
.change(function() {
_bef_highlight(this, context);
})
.filter(':checked').closest('.form-item', context).addClass('highlight')
;
}
};
Drupal.behaviors.betterExposedFiltersSelectAllNone = {
attach: function(context) {
/*
* Add Select all/none links to specified checkboxes
*/
var selected = $('.form-checkboxes.bef-select-all-none:not(.bef-processed)');
if (selected.length) {
var selAll = Drupal.t('Select All');
var selNone = Drupal.t('Select None');
// Set up a prototype link and event handlers
var link = $('<a class="bef-toggle" href="#">'+ selAll +'</a>')
link.click(function(event) {
// Don't actually follow the link...
event.preventDefault();
event.stopPropagation();
if (selAll == $(this).text()) {
// Select all the checkboxes
$(this)
.html(selNone)
.siblings('.bef-checkboxes, .bef-tree')
.find('.form-item input:checkbox').each(function() {
$(this).attr('checked', true);
_bef_highlight(this, context);
})
.end()
// attr() doesn't trigger a change event, so we do it ourselves. But just on
// one checkbox otherwise we have many spinning cursors
.find('input[type=checkbox]:first').change()
;
}
else {
// Unselect all the checkboxes
$(this)
.html(selAll)
.siblings('.bef-checkboxes, .bef-tree')
.find('.form-item input:checkbox').each(function() {
$(this).attr('checked', false);
_bef_highlight(this, context);
})
.end()
// attr() doesn't trigger a change event, so we do it ourselves. But just on
// one checkbox otherwise we have many spinning cursors
.find('input[type=checkbox]:first').change()
;
}
});
// Add link to the page for each set of checkboxes.
selected
.addClass('bef-processed')
.each(function(index) {
// Clone the link prototype and insert into the DOM
var newLink = link.clone(true);
newLink.insertBefore($('.bef-checkboxes, .bef-tree', this));
// If all checkboxes are already checked by default then switch to Select None
if ($('input:checkbox:checked', this).length == $('input:checkbox', this).length) {
newLink.click();
}
})
;
}
// Check for and initialize datepickers
var befSettings = Drupal.settings.better_exposed_filters;
if (befSettings && befSettings.datepicker && befSettings.datepicker_options && $.fn.datepicker) {
var opt = [];
$.each(befSettings.datepicker_options, function(key, val) {
if (key && val) {
opt[key] = JSON.parse(val);
}
});
$('.bef-datepicker').datepicker(opt);
}
} // attach: function() {
}; // Drupal.behaviors.better_exposed_filters = {
Drupal.behaviors.betterExposedFiltersAllNoneNested = {
attach:function (context, settings) {
$('.form-checkboxes.bef-select-all-none-nested li').has('ul').once('bef-all-none-nested', function () {
var $this = $(this);
// Prevent CTools autosubmit from firing until we've finished checking
// all the checkboxes.
var submitFunc = $this.parents('form').submit;
$this.parents('form').submit = null;
$this
// To respect term depth, check/uncheck child term checkboxes.
.find('input.form-checkboxes:first')
.click(function() {
$(this).parents('li:first').find('ul input.form-checkboxes').attr('checked', $(this).attr('checked'));
// Now we can trigger the autosubmit
$this.parents('form').submit = submitFunc;
$this.parents('form').trigger('submit');
})
.end()
// When a child term is checked or unchecked, set the parent term's
// status.
.find('ul input.form-checkboxes')
.click(function() {
var checked = $(this).attr('checked');
// Determine the number of unchecked sibling checkboxes.
var ct = $(this).parents('ul:first').find('input.form-checkboxes:not(:checked)').size();
// If the child term is unchecked, uncheck the parent.
// If all sibling terms are checked, check the parent.
if (!checked || !ct) {
$(this).parents('li:first').parents('li:first').find('input.form-checkboxes:first').attr('checked', checked);
}
});
});
}
}
Drupal.behaviors.better_exposed_filters_slider = {
attach: function(context, settings) {
var befSettings = settings.better_exposed_filters;
if (befSettings && befSettings.slider && befSettings.slider_options) {
$.each(befSettings.slider_options, function(i, sliderOptions) {
var containing_parent = "#" + sliderOptions.viewId + " #edit-" + sliderOptions.id + "-wrapper .views-widget";
var $filter = $(containing_parent);
// If the filter is placed in a secondary fieldset, we may not have
// the usual wrapper element.
if (!$filter.length) {
containing_parent = "#" + sliderOptions.viewId + " .bef-slider-wrapper";
$filter = $(containing_parent);
}
// Only make one slider per filter.
$filter.once('slider-filter', function() {
var $input = $(this).find('input[type=text]');
// This is a "between" or "not between" filter with two values.
if ($input.length == 2) {
var $min = $input.parent().find('input#edit-' + sliderOptions.id + '-min'),
$max = $input.parent().find('input#edit-' + sliderOptions.id + '-max'),
default_min,
default_max;
if (!$min.length || !$max.length) {
return;
}
// Get the default values.
// We use slider min & max if there are no defaults.
default_min = parseFloat(($min.val() == '') ? sliderOptions.min : $min.val(), 10);
default_max = parseFloat(($max.val() == '') ? sliderOptions.max : $max.val(), 10);
// Set the element value in case we are using the slider min & max.
$min.val(default_min);
$max.val(default_max);
$min.parents(containing_parent).after(
$('<div class="bef-slider"></div>').slider({
range: true,
min: parseFloat(sliderOptions.min, 10),
max: parseFloat(sliderOptions.max, 10),
step: parseFloat(sliderOptions.step, 10),
animate: sliderOptions.animate ? sliderOptions.animate : false,
orientation: sliderOptions.orientation,
values: [default_min, default_max],
// Update the textfields as the sliders are moved
slide: function (event, ui) {
$min.val(ui.values[0]);
$max.val(ui.values[1]);
},
// This fires when the value is set programmatically or the
// stop event fires.
// This takes care of the case that a user enters a value
// into the text field that is not a valid step of the slider.
// In that case the slider will go to the nearest step and
// this change event will update the text area.
change: function (event, ui) {
$min.val(ui.values[0]);
$max.val(ui.values[1]);
},
// Attach stop listeners.
stop: function(event, ui) {
// Click the auto submit button.
$(this).parents('form').find('.ctools-auto-submit-click').click();
}
})
);
// Update the slider when the fields are updated.
$min.blur(function() {
befUpdateSlider($(this), 0, sliderOptions);
});
$max.blur(function() {
befUpdateSlider($(this), 1, sliderOptions);
});
}
// This is single value filter.
else if ($input.length == 1) {
if ($input.attr('id') != 'edit-' + sliderOptions.id) {
return;
}
// Get the default value. We use slider min if there is no default.
var default_value = parseFloat(($input.val() == '') ? sliderOptions.min : $input.val(), 10);
// Set the element value in case we are using the slider min.
$input.val(default_value);
$input.parents(containing_parent).after(
$('<div class="bef-slider"></div>').slider({
min: parseFloat(sliderOptions.min, 10),
max: parseFloat(sliderOptions.max, 10),
step: parseFloat(sliderOptions.step, 10),
animate: sliderOptions.animate ? sliderOptions.animate : false,
orientation: sliderOptions.orientation,
value: default_value,
// Update the textfields as the sliders are moved.
slide: function (event, ui) {
$input.val(ui.value);
},
// This fires when the value is set programmatically or the
// stop event fires.
// This takes care of the case that a user enters a value
// into the text field that is not a valid step of the slider.
// In that case the slider will go to the nearest step and
// this change event will update the text area.
change: function (event, ui) {
$input.val(ui.value);
},
// Attach stop listeners.
stop: function(event, ui) {
// Click the auto submit button.
$(this).parents('form').find('.ctools-auto-submit-click').click();
}
})
);
// Update the slider when the field is updated.
$input.blur(function() {
befUpdateSlider($(this), null, sliderOptions);
});
}
else {
return;
}
})
});
}
}
};
// This is only needed to provide ajax functionality
Drupal.behaviors.better_exposed_filters_select_as_links = {
attach: function(context, settings) {
$('.bef-select-as-links', context).once(function() {
var $element = $(this);
// Check if ajax submission is enabled. If it's not enabled then we
// don't need to attach our custom submission handling, because the
// links are already properly built.
// First check if any ajax views are contained in the current page.
if (typeof settings.views == 'undefined' || typeof settings.views.ajaxViews == 'undefined') {
return;
}
// Now check that the view for which the current filter block is used,
// is part of the configured ajax views.
var $uses_ajax = false;
$.each(settings.views.ajaxViews, function(i, item) {
var $view_name = item.view_name.replace(/_/g, '-');
var $view_display_id = item.view_display_id.replace(/_/g, '-');
var $id = 'views-exposed-form-' + $view_name + '-' + $view_display_id;
var $form_id = $element.parents('form').attr('id');
if ($form_id == $id) {
$uses_ajax = true;
return;
}
});
// If no ajax is used for form submission, we quit here.
if (!$uses_ajax) {
return;
}
// Attach selection toggle and form submit on click to each link.
$(this).find('a').click(function(event) {
var $wrapper = $(this).parents('.bef-select-as-links');
var $options = $wrapper.find('select option');
// We have to prevent the page load triggered by the links.
event.preventDefault();
event.stopPropagation();
// Un select old select value.
$wrapper.find('select option').removeAttr('selected');
// Set the corresponding option inside the select element as selected.
var link_text = $(this).text();
$selected = $options.filter(function() {
return $(this).text() == link_text;
});
$selected.attr('selected', 'selected');
$wrapper.find('.bef-new-value').val($selected.val());
$wrapper.find('a').removeClass('active');
$(this).addClass('active');
// Submit the form.
$wrapper.parents('form').find('.views-submit-button *[type=submit]').click();
});
});
}
};
Drupal.behaviors.betterExposedFiltersRequiredFilter = {
attach: function(context, settings) {
// Required checkboxes should re-check all inputs if a user un-checks
// them all.
$('.bef-select-as-checkboxes', context).once('bef-required-filter').ajaxComplete(function (e, xhr, s) {
var $element = $(this);
if (typeof settings.views == 'undefined' || typeof settings.views.ajaxViews == 'undefined') {
return;
}
// Now check that the view for which the current filter block is used,
// is part of the configured ajax views.
var $view_name;
var $view_display_id;
var $uses_ajax = false;
$.each(settings.views.ajaxViews, function(i, item) {
$view_name = item.view_name;
$view_display_id = item.view_display_id;
var $id = 'views-exposed-form-' + $view_name.replace(/_/g, '-') + '-' + $view_display_id.replace(/_/g, '-');
var $form_id = $element.parents('form').attr('id');
if ($form_id == $id) {
$uses_ajax = true;
return false;
}
});
var $filter_name = $('input', this).attr('name').slice(0, -2);
if (Drupal.settings.better_exposed_filters.views[$view_name].displays[$view_display_id].filters[$filter_name].required && $('input:checked', this).length == 0) {
$('input', this).prop('checked', true);
}
});
}
}
/*
* Helper functions
*/
/**
* Adds/Removes the highlight class from the form-item div as appropriate
*/
function _bef_highlight(elem, context) {
$elem = $(elem, context);
$elem.attr('checked')
? $elem.closest('.form-item', context).addClass('highlight')
: $elem.closest('.form-item', context).removeClass('highlight');
}
/**
* Update a slider when a related input element is changed.
*
* We don't need to check whether the new value is valid based on slider min,
* max, and step because the slider will do that automatically and then we
* update the textfield on the slider's change event.
*
* We still have to make sure that the min & max values of a range slider
* don't pass each other though, however once this jQuery UI bug is fixed we
* won't have to. - http://bugs.jqueryui.com/ticket/3762
*
* @param $el
* A jQuery object of the updated element.
* @param valIndex
* The index of the value for a range slider or null for a non-range slider.
* @param sliderOptions
* The options for the current slider.
*/
function befUpdateSlider($el, valIndex, sliderOptions) {
var val = parseFloat($el.val(), 10),
currentMin = $el.parents('div.views-widget').next('.bef-slider').slider('values', 0),
currentMax = $el.parents('div.views-widget').next('.bef-slider').slider('values', 1);
// If we have a range slider.
if (valIndex != null) {
// Make sure the min is not more than the current max value.
if (valIndex == 0 && val > currentMax) {
val = currentMax;
}
// Make sure the max is not more than the current max value.
if (valIndex == 1 && val < currentMin) {
val = currentMin;
}
// If the number is invalid, go back to the last value.
if (isNaN(val)) {
val = $el.parents('div.views-widget').next('.bef-slider').slider('values', valIndex);
}
}
else {
// If the number is invalid, go back to the last value.
if (isNaN(val)) {
val = $el.parents('div.views-widget').next('.bef-slider').slider('value');
}
}
// Make sure we are a number again.
val = parseFloat(val, 10);
// Set the slider to the new value.
// The slider's change event will then update the textfield again so that
// they both have the same value.
if (valIndex != null) {
$el.parents('div.views-widget').next('.bef-slider').slider('values', valIndex, val);
}
else {
$el.parents('div.views-widget').next('.bef-slider').slider('value', val);
}
}
}) (jQuery);
<?php
/**
* @file
* Allows the use of checkboxes, radio buttons or hidden fields for exposed
* Views filters.
*/
/**
* Implements hook_theme().
*/
function better_exposed_filters_theme($existing, $type, $theme, $path) {
return array(
'select_as_checkboxes' => array(
'function' => 'theme_select_as_checkboxes',
'render element' => 'element',
'file' => 'better_exposed_filters.theme',
),
'select_as_checkboxes_fieldset' => array(
'function' => 'theme_select_as_checkboxes_fieldset',
'render element' => 'element',
'file' => 'better_exposed_filters.theme',
),
'select_as_radios' => array(
'function' => 'theme_select_as_radios',
'render element' => 'element',
'file' => 'better_exposed_filters.theme',
),
'select_as_radios_fieldset' => array(
'function' => 'theme_select_as_radios_fieldset',
'render element' => 'element',
'file' => 'better_exposed_filters.theme',
),
'select_as_hidden' => array(
'function' => 'theme_select_as_hidden',
'render element' => 'element',
'file' => 'better_exposed_filters.theme',
),
'select_as_tree' => array(
'function' => 'theme_select_as_tree',
'render element' => 'element',
'file' => 'better_exposed_filters.theme',
),
'select_as_links' => array(
'function' => 'theme_select_as_links',
'render element' => 'element',
'file' => 'better_exposed_filters.theme',
),
'secondary_exposed_elements' => array(
'function' => 'theme_secondary_exposed_elements',
'render element' => 'element',
'file' => 'better_exposed_filters.theme',
),
'bef_checkbox' => array(
'function' => 'theme_bef_checkbox',
'render element' => 'element',
'file' => 'better_exposed_filters.theme',
),
);
}
/*
* Views3 support
*
* Views3 adds the concept of exposed forms to the mix. In addition, elements
* injected into a Views dialog is no longer saved along with the Views form
* information (see the unpack_options() and option_definition() methods of the
* views_object object).
*/
/**
* Implements hook_views_api().
*/
function better_exposed_filters_views_api() {
return array(
'api' => 3.0,
);
}
/**
* Unpacks sort_by and sort_order from the sort_bef_combine element.
*/
function bef_sort_combine_submit($form, &$form_state) {
// Same default as better_exposed_filters_exposed_form_plugin::options_form.
$combine_param = empty($form_state['#combine_param']) ? 'sort_bef_combine' : $form_state['#combine_param'];
if (empty($form_state['values'][$combine_param])) {
$form_state['values']['sort_by'] = $form_state['values']['sort_order'] = '';
}
else {
list($form_state['values']['sort_by'], $form_state['values']['sort_order']) = explode(' ', $form_state['values'][$combine_param]);
}
// And pass this along to Views.
views_exposed_form_submit($form, $form_state);
}
/**
* Form element validation handler for BEF jQuery slider required fields.
*/
function better_exposed_filters_element_validate_slider_required($element, &$form_state) {
$value = $element['#value'];
// If a jQuery slider format has been selected make sure the min & max value
// fields are not empty.
if ($value == '' && _better_exposed_filters_slider_selected($element, $form_state)) {
form_error($element, t('!name field is required.', array('!name' => $element['#title'])));
}
}
/**
* Form element validation handler for BEF jQuery slider animate setting.
*/
function better_exposed_filters_element_validate_slider_animate($element, &$form_state) {
$value = $element['#value'];
if ($value !== '' && _better_exposed_filters_slider_selected($element, $form_state) &&
((!is_numeric($value) || intval($value) != $value || $value <= 0) &&
!in_array($value, array('slow', 'normal', 'fast')))) {
form_error($element, t('%name must be "slow", "normal", "fast" or the number of milliseconds to run the animation (e.g. 1000).', array('%name' => $element['#title'])));
}
}
/**
* Form element validation handler for BEF jQuery slider min and max settings.
*
* The max value must be greater than the min value.
*/
function better_exposed_filters_element_validate_slider_min_max($element, &$form_state) {
$value = $element['#value'];
$slider_min = $form_state['values']['exposed_form_options']['bef'][$element['#bef_filter_id']]['slider_options']['bef_slider_min'];
$slider_max = $form_state['values']['exposed_form_options']['bef'][$element['#bef_filter_id']]['slider_options']['bef_slider_max'];
if ($value !== '' && _better_exposed_filters_slider_selected($element, $form_state)) {
// Must not have more than 11 decimal places.
if (_better_exposed_filters_get_num_decimal_places($value) > 11) {
form_error($element, t('%name must not have more than 11 decimal places.', array('%name' => $element['#title'])));
}
// The slider min must be less than the slider max.
if (is_numeric($slider_min) && is_numeric($slider_max) && ($slider_max <= $slider_min)) {
form_error($element, t('The Range minimum value must be less than the Range maximum value.'));
}
}
}
/**
* Form element validation handler for BEF jQuery slider step setting.
*
* The full specified value range of the slider (range maximum - range minimum)
* should be evenly divisible by the step.
*/
function better_exposed_filters_element_validate_slider_step($element, &$form_state) {
$value = $element['#value'];
if ($value !== '' && _better_exposed_filters_slider_selected($element, $form_state)) {
$slider_min = $form_state['values']['exposed_form_options']['bef'][$element['#bef_filter_id']]['slider_options']['bef_slider_min'];
$slider_max = $form_state['values']['exposed_form_options']['bef'][$element['#bef_filter_id']]['slider_options']['bef_slider_max'];
// Must be positive.
if ($value < 0) {
form_error($element, t('%name must be a positive number.', array('%name' => $element['#title'])));
}
// Must not have more than 5 decimal places.
if (_better_exposed_filters_get_num_decimal_places($value) > 5) {
form_error($element, t('%name must not have more than 5 decimal places.', array('%name' => $element['#title'])));
}
// The slider range must be evenly divisible by the step.
// We check like this because of the issues PHP has with inaccurate floats,
// where 2 might actually be 1.9999999999.
// Because of this we can't reliably use fmod().
if (is_numeric($slider_min) && is_numeric($slider_max) && !ctype_digit((string) abs(($slider_max - $slider_min) / $value))) {
form_error($element, t('The range of the slider (Range maximum - Range minimum) should be evenly divisible by the step.'));
}
}
}
/**
* Return whether or not the slider has been selected for the given filter.
*/
function _better_exposed_filters_slider_selected($element, &$form_state) {
return (isset($element['#bef_filter_id']) &&
isset($form_state['values']['exposed_form_options']['bef'][$element['#bef_filter_id']]['bef_format']) &&
$form_state['values']['exposed_form_options']['bef'][$element['#bef_filter_id']]['bef_format'] == 'bef_slider');
}
/**
* Return the number of decimal places of the given number.
*/
function _better_exposed_filters_get_num_decimal_places($number) {
$str = (string) $number;
return strlen(substr(strrchr($str, '.'), 1));
}
/**
* Implements hook_preprocess_views_view().
*/
function better_exposed_filters_preprocess_views_view(&$variables) {
$filters = array();
foreach ($variables['view']->filter as $filter) {
if ($filter->options['exposed']) {
$identifier = $filter->options['is_grouped'] ? $filter->options['group_info']['identifier'] : $filter->options['expose']['identifier'];
$filters[$identifier] = array(
'required' => $filter->options['expose']['required'] ? TRUE : FALSE,
);
}
}
$bef_js['views'][$variables['view']->name]['displays'][$variables['view']->current_display]['filters'] = $filters;
drupal_add_js(array('better_exposed_filters' => $bef_js), 'setting');
}
<?php
/**
* @file
* Adds Views3 support.
*
* Views3 adds the concept of exposed forms to the mix. In addition, elements
* injected into a Views dialog is no longer saved along with the Views form
* information (see the unpack_options() and options_definition() methods of the
* views_object object).
*/
/**
* Implements hook_views_plugins().
*/
function better_exposed_filters_views_plugins() {
return array(
'exposed_form' => array(
'better_exposed_filters' => array(
'title' => t('Better Exposed Filters'),
'help' => t('Allow use of checkboxes/radio buttons for exposed filters'),
'handler' => 'better_exposed_filters_exposed_form_plugin',
'uses row plugin' => FALSE,
'uses fields' => TRUE,
'uses options' => TRUE,
'help topic' => 'exposed-form-basic',
'type' => 'normal',
'parent' => 'basic',
),
),
);
}
<?php
/**
* @file
* bef_test_content.features.field_base.inc
*/
/**
* Implements hook_field_default_field_bases().
*/
function bef_test_content_field_default_field_bases() {
$field_bases = array();
// Exported field_base: 'field_bef_test_body'
$field_bases['field_bef_test_body'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_bef_test_body',
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'locked' => 0,
'module' => 'text',
'settings' => array(),
'translatable' => 0,
'type' => 'text_with_summary',
);
// Exported field_base: 'field_bef_test_date'
$field_bases['field_bef_test_date'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_bef_test_date',
'indexes' => array(),
'locked' => 0,
'module' => 'date',
'settings' => array(
'cache_count' => 4,
'cache_enabled' => 0,
'granularity' => array(
'day' => 'day',
'hour' => 0,
'minute' => 0,
'month' => 'month',
'second' => 0,
'year' => 'year',
),
'timezone_db' => '',
'todate' => '',
'tz_handling' => 'none',
),
'translatable' => 0,
'type' => 'datetime',
);
// Exported field_base: 'field_bef_test_integer'
$field_bases['field_bef_test_integer'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_bef_test_integer',
'indexes' => array(),
'locked' => 0,
'module' => 'number',
'settings' => array(),
'translatable' => 0,
'type' => 'number_integer',
);
// Exported field_base: 'field_bef_test_letters'
$field_bases['field_bef_test_letters'] = array(
'active' => 1,
'cardinality' => -1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_bef_test_letters',
'indexes' => array(
'value' => array(
0 => 'value',
),
),
'locked' => 0,
'module' => 'list',
'settings' => array(
'allowed_values' => array(
'a' => 'Aardvark',
'b' => 'Bumble-Bee',
'c' => ' Caterpillar',
'd' => 'Devil, Tasmanian',
'e' => 'Elephant',
'f' => 'Frigatebird',
'g' => 'Giraffe',
'h' => 'Horse',
),
'allowed_values_function' => '',
),
'translatable' => 0,
'type' => 'list_text',
);
// Exported field_base: 'field_bef_test_location'
$field_bases['field_bef_test_location'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_bef_test_location',
'indexes' => array(
'tid' => array(
0 => 'tid',
),
),
'locked' => 0,
'module' => 'taxonomy',
'settings' => array(
'allowed_values' => array(
0 => array(
'vocabulary' => 'location',
'parent' => 0,
),
),
),
'translatable' => 0,
'type' => 'taxonomy_term_reference',
);
// Exported field_base: 'field_bef_test_numbers'
$field_bases['field_bef_test_numbers'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_bef_test_numbers',
'indexes' => array(
'value' => array(
0 => 'value',
),
),
'locked' => 0,
'module' => 'list',
'settings' => array(
'allowed_values' => array(
1 => 'One',
2 => 'Two',
3 => 'Three',
4 => 'Four',
5 => 'Five',
6 => 'Six',
7 => 'Seven',
8 => 'Eight',
9 => 'Nine',
10 => 'Ten',
),
'allowed_values_function' => '',
),
'translatable' => 0,
'type' => 'list_integer',
);
// Exported field_base: 'field_bef_test_price'
$field_bases['field_bef_test_price'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_bef_test_price',
'indexes' => array(),
'locked' => 0,
'module' => 'number',
'settings' => array(
'decimal_separator' => '.',
),
'translatable' => 0,
'type' => 'number_float',
);
return $field_bases;
}
<?php
/**
* @file
* bef_test_content.features.field_instance.inc
*/
/**
* Implements hook_field_default_field_instances().
*/
function bef_test_content_field_default_field_instances() {
$field_instances = array();
// Exported field_instance: 'node-bef_test-field_bef_test_body'
$field_instances['node-bef_test-field_bef_test_body'] = array(
'bundle' => 'bef_test',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 12,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_bef_test_body',
'label' => 'Body',
'required' => 0,
'settings' => array(
'display_summary' => 0,
'text_processing' => 1,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'text',
'settings' => array(
'rows' => 20,
'summary_rows' => 5,
),
'type' => 'text_textarea_with_summary',
'weight' => 7,
),
);
// Exported field_instance: 'node-bef_test-field_bef_test_date'
$field_instances['node-bef_test-field_bef_test_date'] = array(
'bundle' => 'bef_test',
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'date',
'settings' => array(
'format_type' => 'long',
'fromto' => 'both',
'multiple_from' => '',
'multiple_number' => '',
'multiple_to' => '',
),
'type' => 'date_default',
'weight' => 11,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_bef_test_date',
'label' => 'Date',
'required' => 0,
'settings' => array(
'default_value' => 'now',
'default_value2' => 'same',
'default_value_code' => '',
'default_value_code2' => '',
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'date',
'settings' => array(
'increment' => 15,
'input_format' => 'm/d/Y - H:i:s',
'input_format_custom' => '',
'label_position' => 'above',
'text_parts' => array(),
'year_range' => '-3:+3',
),
'type' => 'date_text',
'weight' => 6,
),
);
// Exported field_instance: 'node-bef_test-field_bef_test_integer'
$field_instances['node-bef_test-field_bef_test_integer'] = array(
'bundle' => 'bef_test',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'number',
'settings' => array(
'decimal_separator' => '.',
'prefix_suffix' => TRUE,
'scale' => 0,
'thousand_separator' => ' ',
),
'type' => 'number_integer',
'weight' => 10,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_bef_test_integer',
'label' => 'Integer',
'required' => 0,
'settings' => array(
'max' => 5000,
'min' => 100,
'prefix' => '',
'suffix' => '',
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 0,
'module' => 'number',
'settings' => array(),
'type' => 'number',
'weight' => 4,
),
);
// Exported field_instance: 'node-bef_test-field_bef_test_letters'
$field_instances['node-bef_test-field_bef_test_letters'] = array(
'bundle' => 'bef_test',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'list',
'settings' => array(),
'type' => 'list_default',
'weight' => 7,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_bef_test_letters',
'label' => 'Letters',
'required' => 0,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'options',
'settings' => array(),
'type' => 'options_buttons',
'weight' => 1,
),
);
// Exported field_instance: 'node-bef_test-field_bef_test_location'
$field_instances['node-bef_test-field_bef_test_location'] = array(
'bundle' => 'bef_test',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'taxonomy',
'settings' => array(),
'type' => 'taxonomy_term_reference_link',
'weight' => 9,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_bef_test_location',
'label' => 'Location',
'required' => 0,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'options',
'settings' => array(),
'type' => 'options_buttons',
'weight' => 3,
),
);
// Exported field_instance: 'node-bef_test-field_bef_test_numbers'
$field_instances['node-bef_test-field_bef_test_numbers'] = array(
'bundle' => 'bef_test',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'list',
'settings' => array(),
'type' => 'list_default',
'weight' => 8,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_bef_test_numbers',
'label' => 'Numbers',
'required' => 0,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'options',
'settings' => array(),
'type' => 'options_select',
'weight' => 2,
),
);
// Exported field_instance: 'node-bef_test-field_bef_test_price'
$field_instances['node-bef_test-field_bef_test_price'] = array(
'bundle' => 'bef_test',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'number',
'settings' => array(
'decimal_separator' => '.',
'prefix_suffix' => TRUE,
'scale' => 2,
'thousand_separator' => ' ',
),
'type' => 'number_decimal',
'weight' => 13,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_bef_test_price',
'label' => 'Price',
'required' => 0,
'settings' => array(
'max' => '',
'min' => '',
'prefix' => '$',
'suffix' => '',
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 0,
'module' => 'number',
'settings' => array(),
'type' => 'number',
'weight' => 5,
),
);
// Translatables
// Included for use with string extractors like potx.
t('Body');
t('Date');
t('Integer');
t('Letters');
t('Location');
t('Numbers');
t('Price');
return $field_instances;
}
<?php
/**
* @file
* bef_test_content.features.inc
*/
/**
* Implements hook_views_api().
*/
function bef_test_content_views_api($module = NULL, $api = NULL) {
return array("api" => "3.0");
}
/**
* Implements hook_node_info().
*/
function bef_test_content_node_info() {
$items = array(
'bef_test' => array(
'name' => t('bef_test'),
'base' => 'node_content',
'description' => '',
'has_title' => '1',
'title_label' => t('Title'),
'help' => '',
),
);
drupal_alter('node_info', $items);
return $items;
}
<?php
/**
* @file
* bef_test_content.features.taxonomy.inc
*/
/**
* Implements hook_taxonomy_default_vocabularies().
*/
function bef_test_content_taxonomy_default_vocabularies() {
return array(
'location' => array(
'name' => 'Location',
'machine_name' => 'location',
'description' => '',
'hierarchy' => 1,
'module' => 'taxonomy',
'weight' => 0,
'rdf_mapping' => array(
'rdftype' => array(
0 => 'skos:ConceptScheme',
),
'name' => array(
'predicates' => array(
0 => 'dc:title',
),
),
'description' => array(
'predicates' => array(
0 => 'rdfs:comment',
),
),
),
),
);
}
name = BEF Test Content
description = Content and Views for testing Better Exposed Filters.
core = 7.x
package = BEF Tests
dependencies[] = better_exposed_filters
dependencies[] = date
dependencies[] = features
dependencies[] = list
dependencies[] = number
dependencies[] = taxonomy
dependencies[] = text
dependencies[] = views
dependencies[] = views_content
features[ctools][] = views:views_default:3.0
features[features_api][] = api:2
features[field_base][] = field_bef_test_body
features[field_base][] = field_bef_test_date
features[field_base][] = field_bef_test_integer
features[field_base][] = field_bef_test_letters
features[field_base][] = field_bef_test_location
features[field_base][] = field_bef_test_numbers
features[field_base][] = field_bef_test_price
features[field_instance][] = node-bef_test-field_bef_test_body
features[field_instance][] = node-bef_test-field_bef_test_date
features[field_instance][] = node-bef_test-field_bef_test_integer
features[field_instance][] = node-bef_test-field_bef_test_letters
features[field_instance][] = node-bef_test-field_bef_test_location
features[field_instance][] = node-bef_test-field_bef_test_numbers
features[field_instance][] = node-bef_test-field_bef_test_price
features[node][] = bef_test
features[taxonomy][] = location
features[views_view][] = bef_test_view
features_exclude[dependencies][ctools] = ctools
features_exclude[dependencies][options] = options
features_exclude[field][node-bef_test-body] = node-bef_test-body
features_exclude[field][node-bef_test-field_letters] = node-bef_test-field_letters
features_exclude[field][node-bef_test-field_numbers] = node-bef_test-field_numbers
features_exclude[field][node-bef_test-field_location] = node-bef_test-field_location
features_exclude[field][node-bef_test-field_integer] = node-bef_test-field_integer
features_exclude[field][node-bef_test-field_price] = node-bef_test-field_price
features_exclude[field][node-bef_test-field_date] = node-bef_test-field_date
hidden = 1
; Information added by Drupal.org packaging script on 2015-08-16
version = "7.x-3.2+36-dev"
core = "7.x"
project = "better_exposed_filters"
datestamp = "1439736843"
<?php
/**
* @file
* Code for the BEF Test Content feature.
*/
include_once 'bef_test_content.features.inc';
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment