Commit 61203e2c authored by crawleyhost's avatar crawleyhost Committed by drumm
Browse files

Issue #3300108 by crawleyhost, drumm: Drupal for Marketers - update agency...

Issue #3300108 by crawleyhost, drumm: Drupal for Marketers - update agency display to randomize view
parent fb5c65a1
......@@ -43,10 +43,10 @@
Drupal.behaviors.drupalorgRandom = {
attach: function (context) {
$('.drupalorg-random:not(.drupalorg-random-processed)', context).addClass('drupalorg-random-processed').each(function () {
var $this = $(this),
elements = $this.children().get();
var parentElement = $(this).children('.view-content').get(0) || this,
elements = Array.from(parentElement.children);
for (var j, x, i = elements.length; i; j = Math.floor(Math.random() * i), x = elements[--i], elements[i] = elements[j], elements[j] = x);
$this.html(elements);
parentElement.replaceChildren(...elements);
});
}
};
......
......@@ -462,7 +462,6 @@ function drupalorg_marketplace_views_default_views() {
/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['title'] = 'Marketplace';
$handler->display->display_options['css_class'] = 'marketplace-pane';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
......@@ -872,6 +871,8 @@ function drupalorg_marketplace_views_default_views() {
$handler = $view->new_display('panel_pane', 'Supporting Patners - Signature and Premium', 'panel_pane_1');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['title'] = 'Find an agency to help build your success on Drupal';
$handler->display->display_options['defaults']['css_class'] = FALSE;
$handler->display->display_options['css_class'] = 'drupalorg-random';
$handler->display->display_options['defaults']['pager'] = FALSE;
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['pager']['options']['offset'] = '0';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment