/(function($){
Drupal.behaviors.block_carousel = {
attach: function (context, settings) {
if ($('.page-node .owl-carousel-rte').length) {
$('.owl-carousel-rte').owlCarousel({
pagination: false,
navigation: true, // Show next and prev buttons
slideSpeed: 300,
paginationSpeed: 400,
singleItem: true,
// "singleItem:true" is a shortcut for:
// items : 1,
// itemsDesktop : false,
// itemsDesktopSmall : false,
// itemsTablet: false,
itemsMobile: false
});
}
}
};
})(jQuery);
;/*})'"*/
;/*})'"*/
/**
* Attaches the calendar behavior to all required fields
*/
(function($) {
function makeFocusHandler(e) {
if (!$(this).hasClass('date-popup-init')) {
var datePopup = e.data;
// Explicitely filter the methods we accept.
switch (datePopup.func) {
case 'datepicker':
$(this)
.datepicker(datePopup.settings)
.addClass('date-popup-init');
$(this).click(function(){
$(this).focus();
});
break;
case 'timeEntry':
$(this)
.timeEntry(datePopup.settings)
.addClass('date-popup-init');
$(this).click(function(){
$(this).focus();
});
break;
case 'timepicker':
// Translate the PHP date format into the style the timepicker uses.
datePopup.settings.timeFormat = datePopup.settings.timeFormat
// 12-hour, leading zero,
.replace('h', 'hh')
// 12-hour, no leading zero.
.replace('g', 'h')
// 24-hour, leading zero.
.replace('H', 'HH')
// 24-hour, no leading zero.
.replace('G', 'H')
// AM/PM.
.replace('A', 'p')
// Minutes with leading zero.
.replace('i', 'mm')
// Seconds with leading zero.
.replace('s', 'ss');
datePopup.settings.startTime = new Date(datePopup.settings.startTime);
$(this)
.timepicker(datePopup.settings)
.addClass('date-popup-init');
$(this).click(function(){
$(this).focus();
});
break;
}
}
}
Drupal.behaviors.date_popup = {
attach: function (context) {
for (var id in Drupal.settings.datePopup) {
$('#'+ id).bind('focus', Drupal.settings.datePopup[id], makeFocusHandler);
}
}
};
})(jQuery);
;/*})'"*/
;/*})'"*/
(function ($) {
// Store the original beforeSerialize, as we want to continue using
// it after we've overridden it.
Drupal.ajax.prototype.originalBeforeSerialize = Drupal.ajax.prototype.beforeSerialize;
/**
* Override core's beforeSerialize.
*
* We switch to using GET if this is for an ajax View.
* We also avoid adding ajax_html_id and ajax_page_state.
* (This happens in core's beforeSerialize).
*/
Drupal.ajax.prototype.beforeSerialize = function (element, options) {
// If this is for a view, switch to GET.
if (options.url &&
options.url.indexOf('/views/ajax') !== -1 &&
Drupal.settings.viewsAjaxGet &&
$.inArray(options.data.view_name, Drupal.settings.viewsAjaxGet) !== -1) {
// @See Drupal.ajax.prototype.beforeSerialize
if (this.form) {
var settings = this.settings || Drupal.settings;
Drupal.detachBehaviors(this.form, settings, 'serialize');
}
options.type = 'GET';
return;
}
return this.originalBeforeSerialize(element, options);
};
})(jQuery);
;/*})'"*/
;/*})'"*/
/**
* @file views_load_more.js
*
* Handles the AJAX pager for the view_load_more plugin.
*/
(function ($) {
/**
* Provide a series of commands that the server can request the client perform.
*/
Drupal.ajax.prototype.commands.viewsLoadMoreAppend = function (ajax, response, status) {
// Get information from the response. If it is not there, default to
// our presets.
var wrapper = response.selector ? $(response.selector) : $(ajax.wrapper);
var method = response.method || ajax.method;
var targetList = response.targetList || '';
var effect = ajax.getEffect(response);
var pager_selector = response.options.pager_selector ? response.options.pager_selector : '.pager-load-more';
// We don't know what response.data contains: it might be a string of text
// without HTML, so don't rely on jQuery correctly iterpreting
// $(response.data) as new HTML rather than a CSS selector. Also, if
// response.data contains top-level text nodes, they get lost with either
// $(response.data) or $('
').replaceWith(response.data).
var new_content_wrapped = $('').html(response.data);
var new_content = new_content_wrapped.contents();
// For legacy reasons, the effects processing code assumes that new_content
// consists of a single top-level element. Also, it has not been
// sufficiently tested whether attachBehaviors() can be successfully called
// with a context object that includes top-level text nodes. However, to
// give developers full control of the HTML appearing in the page, and to
// enable Ajax content to be inserted in places where DIV elements are not
// allowed (e.g., within TABLE, TR, and SPAN parents), we check if the new
// content satisfies the requirement of a single top-level element, and
// only use the container DIV created above when it doesn't. For more
// information, please see http://drupal.org/node/736066.
if (new_content.length != 1 || new_content.get(0).nodeType != 1) {
new_content = new_content_wrapped;
}
// If removing content from the wrapper, detach behaviors first.
var settings = response.settings || ajax.settings || Drupal.settings;
Drupal.detachBehaviors(wrapper, settings);
if ($.waypoints != undefined) {
$.waypoints('refresh');
}
// Set up our default query options. This is for advance users that might
// change there views layout classes. This allows them to write there own
// jquery selector to replace the content with.
// Provide sensible defaults for unordered list, ordered list and table
// view styles.
var content_query = targetList && !response.options.content ? '> .view-content ' + targetList : response.options.content || '> .view-content';
// If we're using any effects. Hide the new content before adding it to the DOM.
if (effect.showEffect != 'show') {
new_content.find(content_query).children().hide();
}
// Update the pager
// Find both for the wrapper as the newly loaded content the direct child
// .item-list in case of nested pagers
wrapper.find(pager_selector).replaceWith(new_content.find(pager_selector));
// Add the new content to the page.
wrapper.find(content_query)[method](new_content.find(content_query).children());
// Re-class the loaded content.
// @todo this is faulty in many ways. first of which is that user may have configured view to not have these classes at all.
wrapper.find(content_query).children()
.removeClass('views-row-first views-row-last views-row-odd views-row-even')
.filter(':first')
.addClass('views-row-first')
.end()
.filter(':last')
.addClass('views-row-last')
.end()
.filter(':even')
.addClass('views-row-odd')
.end()
.filter(':odd')
.addClass('views-row-even')
.end();
if (effect.showEffect != 'show') {
wrapper.find(content_query).children(':not(:visible)')[effect.showEffect](effect.showSpeed);
}
// Additional processing over new content
wrapper.trigger('views_load_more.new_content', new_content.clone());
// Attach all JavaScript behaviors to the new content
// Remove the Jquery once Class, TODO: There needs to be a better
// way of doing this, look at .removeOnce() :-/
var classes = wrapper.attr('class');
var onceClass = classes.match(/jquery-once-[0-9]*-[a-z]*/);
wrapper.removeClass(onceClass[0]);
settings = response.settings || ajax.settings || Drupal.settings;
Drupal.attachBehaviors(wrapper, settings);
};
/**
* Attaches the AJAX behavior to Views Load More waypoint support.
*/
Drupal.behaviors.ViewsLoadMore = {
attach: function (context, settings) {
var default_opts = {
offset: '100%'
};
if (settings && settings.viewsLoadMore && settings.views && settings.views.ajaxViews) {
$.each(settings.viewsLoadMore, function(i, setting) {
var view = '.view-id-' + setting.view_name + '.view-display-id-' + setting.view_display_id + ' .pager-next a',
opts = {};
$.extend(opts, default_opts, settings.viewsLoadMore[i].opts);
$(view).waypoint('destroy');
$(view).waypoint(function(event, direction) {
$(view).click();
}, opts);
});
}
},
detach: function (context, settings, trigger) {
if (settings && settings.viewsLoadMore && settings.views && settings.views.ajaxViews) {
$.each(settings.viewsLoadMore, function(i, setting) {
var view = '.view-id-' + setting.view_name + '.view-display-id-' + setting.view_display_id;
if ($(context).is(view)) {
$('.pager-next a', view).waypoint('destroy');
}
else {
$(view, context).waypoint('destroy');
}
});
}
}
};
})(jQuery);
;/*})'"*/
;/*})'"*/
/*!
* Masonry PACKAGED v4.1.0
* Cascading grid layout library
* http://masonry.desandro.com
* MIT License
* by David DeSandro
*/
!function(t,e){"use strict";"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}(this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);r.isBoxSizeOuter=s=200==t(o.width),i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,E=a.borderTopWidth+a.borderBottomWidth,z=d&&s,b=t(r.width);b!==!1&&(a.width=b+(z?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(z?0:g+E)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+E),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;is?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},i.prototype.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},i.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this._getColGroup(n),r=Math.min.apply(Math,o),s=o.indexOf(r),a={x:this.columnWidth*s,y:r},h=r+t.size.outerHeight,u=this.cols+1-o.length,d=0;u>d;d++)this.colYs[s+d]=h;return a},i.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++){var o=this.colYs.slice(n,n+t);e[n]=Math.max.apply(Math,o)}return e},i.prototype._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},i.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},i.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},i.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
;/*})'"*/
;/*})'"*/
/*!
* imagesLoaded PACKAGED v4.1.0
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
!function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}(this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||[];return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}(window,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function n(t){var e=[];if(Array.isArray(t))e=t;else if("number"==typeof t.length)for(var i=0;i -1) {
href = href.substr(0, href.indexOf(chars[i]));
}
}
return href;
};
})(jQuery);
;/*})'"*/
;/*})'"*/
(function ($) {
/**
* A progressbar object. Initialized with the given id. Must be inserted into
* the DOM afterwards through progressBar.element.
*
* method is the function which will perform the HTTP request to get the
* progress bar state. Either "GET" or "POST".
*
* e.g. pb = new progressBar('myProgressBar');
* some_element.appendChild(pb.element);
*/
Drupal.progressBar = function (id, updateCallback, method, errorCallback) {
var pb = this;
this.id = id;
this.method = method || 'GET';
this.updateCallback = updateCallback;
this.errorCallback = errorCallback;
// The WAI-ARIA setting aria-live="polite" will announce changes after users
// have completed their current activity and not interrupt the screen reader.
this.element = $('');
this.element.html('' +
'' +
'
');
};
/**
* Set the percentage and status message for the progressbar.
*/
Drupal.progressBar.prototype.setProgress = function (percentage, message) {
if (percentage >= 0 && percentage <= 100) {
$('div.progress-bar', this.element).css('width', percentage + '%');
$('div.progress-bar', this.element).attr('aria-valuenow', percentage);
$('div.percentage', this.element).html(percentage + '%');
}
$('div.message', this.element).html(message);
if (this.updateCallback) {
this.updateCallback(percentage, message, this);
}
};
/**
* Start monitoring progress via Ajax.
*/
Drupal.progressBar.prototype.startMonitoring = function (uri, delay) {
this.delay = delay;
this.uri = uri;
this.sendPing();
};
/**
* Stop monitoring progress via Ajax.
*/
Drupal.progressBar.prototype.stopMonitoring = function () {
clearTimeout(this.timer);
// This allows monitoring to be stopped from within the callback.
this.uri = null;
};
/**
* Request progress data from server.
*/
Drupal.progressBar.prototype.sendPing = function () {
if (this.timer) {
clearTimeout(this.timer);
}
if (this.uri) {
var pb = this;
// When doing a post request, you need non-null data. Otherwise a
// HTTP 411 or HTTP 406 (with Apache mod_security) error may result.
$.ajax({
type: this.method,
url: this.uri,
data: '',
dataType: 'json',
success: function (progress) {
// Display errors.
if (progress.status == 0) {
pb.displayError(progress.data);
return;
}
// Update display.
pb.setProgress(progress.percentage, progress.message);
// Schedule next timer.
pb.timer = setTimeout(function () { pb.sendPing(); }, pb.delay);
},
error: function (xmlhttp) {
pb.displayError(Drupal.ajaxError(xmlhttp, pb.uri));
}
});
}
};
/**
* Display errors on the page.
*/
Drupal.progressBar.prototype.displayError = function (string) {
var error = $('').append(string);
$(this.element).before(error).hide();
if (this.errorCallback) {
this.errorCallback(this);
}
};
})(jQuery);
;/*})'"*/
;/*})'"*/
/**
* @file
* Handles AJAX fetching of views, including filter submission and response.
*/
(function ($) {
/**
* Attaches the AJAX behavior to exposed filter forms and key views links.
*/
Drupal.behaviors.ViewsAjaxView = {};
Drupal.behaviors.ViewsAjaxView.attach = function() {
if (Drupal.settings && Drupal.settings.views && Drupal.settings.views.ajaxViews) {
$.each(Drupal.settings.views.ajaxViews, function(i, settings) {
Drupal.views.instances[i] = new Drupal.views.ajaxView(settings);
});
}
};
Drupal.views = {};
Drupal.views.instances = {};
/**
* JavaScript object for a certain view.
*/
Drupal.views.ajaxView = function(settings) {
var selector = '.view-dom-id-' + settings.view_dom_id;
this.$view = $(selector);
// If view is not present return to prevent errors.
if (!this.$view.length) {
return;
}
// Retrieve the path to use for views' ajax.
var ajax_path = Drupal.settings.views.ajax_path;
// If there are multiple views this might've ended up showing up multiple
// times.
if (ajax_path.constructor.toString().indexOf("Array") != -1) {
ajax_path = ajax_path[0];
}
// Check if there are any GET parameters to send to views.
var queryString = window.location.search || '';
if (queryString !== '') {
// Remove the question mark and Drupal path component if any.
var queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, '');
if (queryString !== '') {
// If there is a '?' in ajax_path, clean url are on and & should be
// used to add parameters.
queryString = ((/\?/.test(ajax_path)) ? '&' : '?') + queryString;
}
}
this.element_settings = {
url: ajax_path + queryString,
submit: settings,
setClick: true,
event: 'click',
selector: selector,
progress: {
type: 'throbber'
}
};
this.settings = settings;
// Add the ajax to exposed forms.
this.$exposed_form = $('#views-exposed-form-' + settings.view_name.replace(/_/g, '-') + '-' + settings.view_display_id.replace(/_/g, '-'));
this.$exposed_form.once(jQuery.proxy(this.attachExposedFormAjax, this));
// Store Drupal.ajax objects here for all pager links.
this.links = [];
// Add the ajax to pagers.
this.$view
.once(jQuery.proxy(this.attachPagerAjax, this));
// Add a trigger to update this view specifically. In order to trigger a
// refresh use the following code.
//
// @code
// jQuery('.view-name').trigger('RefreshView');
// @endcode
// Add a trigger to update this view specifically.
var self_settings = this.element_settings;
self_settings.event = 'RefreshView';
var self = this;
this.$view.once('refresh', function () {
self.refreshViewAjax = new Drupal.ajax(self.selector, self.$view, self_settings);
});
};
Drupal.views.ajaxView.prototype.attachExposedFormAjax = function() {
var button = $('input[type=submit], button[type=submit], input[type=image]', this.$exposed_form);
button = button[0];
// Call the autocomplete submit before doing AJAX.
$(button).click(function () {
if (Drupal.autocompleteSubmit) {
Drupal.autocompleteSubmit();
}
});
this.exposedFormAjax = new Drupal.ajax($(button).attr('id'), button, this.element_settings);
};
/**
* Attach the ajax behavior to each link.
*/
Drupal.views.ajaxView.prototype.attachPagerAjax = function() {
this.$view.find('ul.pager > li > a, ol.pager > li > a, th.views-field a, .attachment .views-summary a')
.each(jQuery.proxy(this.attachPagerLinkAjax, this));
};
/**
* Attach the ajax behavior to a single link.
*/
Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function(id, link) {
var $link = $(link);
var viewData = {};
var href = $link.attr('href');
// Don't attach to pagers inside nested views.
if ($link.closest('.view')[0] !== this.$view[0] &&
$link.closest('.view').parent().hasClass('attachment') === false) {
return;
}
// Provide a default page if none has been set. This must be done
// prior to merging with settings to avoid accidentally using the
// page landed on instead of page 1.
if (typeof(viewData.page) === 'undefined') {
viewData.page = 0;
}
// Construct an object using the settings defaults and then overriding
// with data specific to the link.
$.extend(
viewData,
this.settings,
Drupal.Views.parseQueryString(href),
// Extract argument data from the URL.
Drupal.Views.parseViewArgs(href, this.settings.view_base_path)
);
// For anchor tags, these will go to the target of the anchor rather
// than the usual location.
$.extend(viewData, Drupal.Views.parseViewArgs(href, this.settings.view_base_path));
// Construct an object using the element settings defaults,
// then overriding submit with viewData.
var pager_settings = $.extend({}, this.element_settings);
pager_settings.submit = viewData;
this.pagerAjax = new Drupal.ajax(false, $link, pager_settings);
this.links.push(this.pagerAjax);
};
Drupal.ajax.prototype.commands.viewsScrollTop = function (ajax, response, status) {
// Scroll to the top of the view. This will allow users
// to browse newly loaded content after e.g. clicking a pager
// link.
var offset = $(response.selector).offset();
// We can't guarantee that the scrollable object should be
// the body, as the view could be embedded in something
// more complex such as a modal popup. Recurse up the DOM
// and scroll the first element that has a non-zero top.
var scrollTarget = response.selector;
while ($(scrollTarget).scrollTop() == 0 && $(scrollTarget).parent()) {
scrollTarget = $(scrollTarget).parent();
}
// Only scroll upward.
if (offset.top - 10 < $(scrollTarget).scrollTop()) {
$(scrollTarget).animate({scrollTop: (offset.top - 10)}, 500);
}
};
})(jQuery);
;/*})'"*/
;/*})'"*/
/**
* @file
* set agenda dates fields placeholders.
*/
(function($) {
Drupal.behaviors.placeholders = {
attach: function (context, settings) {
if ( $("input[name*=field_event_date_value\\[min\\]]").length && $("input[name*=field_event_date_value\\[max\\]]").length ) {
$("input[name*=field_event_date_value\\[min\\]]").attr('placeholder', Drupal.t('Du'));
$("input[name*=field_event_date_value\\[max\\]]").attr('placeholder', Drupal.t('Au'));
}
}
};
})(jQuery);
;/*})'"*/
;/*})'"*/
(function ($) {
$(document).ready(function() {
// Attach mousedown, keyup, touchstart events to document only and catch
// clicks on all elements.
$(document.body).bind("mousedown keyup touchstart", function(event) {
// Catch the closest surrounding link of a clicked element.
$(event.target).closest("a,area").each(function() {
if (Drupal.settings.piwik.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) {
// Mailto link clicked.
_paq.push(["trackEvent", "Mails", "Click", this.href.substring(7)]);
}
});
});
// Colorbox: This event triggers when the transition has completed and the
// newly loaded content has been revealed.
if (Drupal.settings.piwik.trackColorbox) {
$(document).bind("cbox_complete", function () {
var href = $.colorbox.element().attr("href");
if (href) {
_paq.push(["setCustomUrl", href]);
_paq.push(["trackPageView"]);
}
});
}
});
})(jQuery);
;/*})'"*/
;/*})'"*/