code
stringlengths
1
2.08M
language
stringclasses
1 value
(function ($) { /** * Webform node form interface enhancments. */ Drupal.behaviors.webformAdmin = {}; Drupal.behaviors.webformAdmin.attach = function(context) { // Apply special behaviors to fields with default values. Drupal.webform.defaultValues(context); // On click or change, make a parent radio button se...
JavaScript
/** * jGrowl 1.1.2 * * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * Written by Stan Lemon <stanlemon@mac.com> * Last updated: 2008.08.17 * * jGrowl is a jQuery plugin implementing unobtrusive userla...
JavaScript
/** * Provide some extra responses for the page list so we can have automatic * on change. */ Drupal.behaviors.PageManagerList = function() { var timeoutID = 0; $('form#page-manager-list-pages-form select:not(.pm-processed)') .addClass('pm-processed') .change(function() { $('#edit-pages-apply').c...
JavaScript
/** * @file * Implement a simple, clickable dropbutton menu. * * See dropbutton.theme.inc for primary documentation. * * The javascript relies on four classes: * - The dropbutton must be fully contained in a div with the class * ctools-dropbutton. It must also contain the class ctools-no-js * which will be...
JavaScript
/** * @file * * CTools flexible AJAX responder object. */ (function ($) { Drupal.CTools = Drupal.CTools || {}; Drupal.CTools.AJAX = Drupal.CTools.AJAX || {}; /** * Grab the response from the server and store it. * * @todo restore the warm cache functionality */ Drupal.CTools.AJAX.warmCache = fu...
JavaScript
/** * @file * Implement a simple, clickable dropdown menu. * * See dropdown.theme.inc for primary documentation. * * The javascript relies on four classes: * - The dropdown must be fully contained in a div with the class * ctools-dropdown. It must also contain the class ctools-dropdown-no-js * which will b...
JavaScript
(function($){ /** * To make a form auto submit, all you have to do is 3 things: * * ctools_add_js('auto-submit'); * * On gadgets you want to auto-submit when changed, add the ctools-auto-submit * class. With FAPI, add: * @code * '#attributes' => array('class' => array('ctools-auto-submit')), * @endcode * * ...
JavaScript
(function($) { Drupal.behaviors.CToolsJumpMenu = { attach: function(context) { $('.ctools-jump-menu-hide') .once('ctools-jump-menu') .hide(); $('.ctools-jump-menu-change') .once('ctools-jump-menu') .change(function() { var loc = $(this).val(); var ...
JavaScript
/** * @file * Javascript required for a simple collapsible div. * * Creating a collapsible div with this doesn't take too much. There are * three classes necessary: * * - ctools-collapsible-container: This is the overall container that will be * collapsible. This must be a div. * - ctools-collapsible-handle:...
JavaScript
/** * @file * Provides dependent visibility for form items in CTools' ajax forms. * * To your $form item definition add: * - '#process' => array('ctools_process_dependency'), * - '#dependency' => array('id-of-form-item' => array(list, of, values, that, * make, this, item, show), * * Special considerations: ...
JavaScript
(function ($) { Drupal.CTools = Drupal.CTools || {}; Drupal.CTools.Stylizer = {}; Drupal.CTools.Stylizer.addFarbtastic = function(context) { // This behavior attaches by ID, so is only valid once on a page. if ($('ctools_stylizer_color_scheme_form .color-form.Stylizer-processed').size()) { return;...
JavaScript
/** * @file * * Implement a modal form. * * @see modal.inc for documentation. * * This javascript relies on the CTools ajax responder. */ (function ($) { // Make sure our objects are defined. Drupal.CTools = Drupal.CTools || {}; Drupal.CTools.Modal = Drupal.CTools.Modal || {}; /** * Display the mod...
JavaScript
/** * Provide the HTML to create the modal dialog. */ Drupal.theme.prototype.CToolsSampleModal = function () { var html = ''; html += '<div id="ctools-modal" class="popups-box">'; html += ' <div class="ctools-modal-content ctools-sample-modal-content">'; html += ' <table cellpadding="0" cellspacing="0" id=...
JavaScript
/** * @file * CTools Bulk Export javascript functions. */ (function ($) { Drupal.behaviors.CToolsBulkExport = { attach: function (context) { $('#bulk-export-export-form .vertical-tabs-pane', context).drupalSetSummary(function (context) { // Check if any individual checkbox is checked. if ($('....
JavaScript
// $Id: dhtml_menu.js,v 1.49 2009/11/12 21:47:59 arancaytar Exp $ /** * @file dhtml_menu.js * The Javascript code for DHTML Menu */ (function($) { Drupal.dhtmlMenu = {}; Drupal.dhtmlMenu.animation = {show:{}, hide:{}, count:0}; /** * Initialize the module's JS functions */ Drupal.behaviors.dhtmlMenu = { at...
JavaScript
/*jshint strict:true, browser:true, curly:true, eqeqeq:true, expr:true, forin:true, latedef:true, newcap:true, noarg:true, trailing: true, undef:true, unused:true */ /*global Drupal: true, jQuery: true*/ /** * File: clientside_validation_field_valdiation.js * Version: 7.x-1.x * Description: Replace field ...
JavaScript
/*jshint strict:true, browser:true, curly:true, eqeqeq:true, expr:true, forin:true, latedef:true, newcap:true, noarg:true, trailing: true, undef:true, unused:true */ /*global Drupal: true, jQuery: true*/ /** * File: clientside_validation_ife.js * Version: 7.x-1.x * Description: Add clientside validation r...
JavaScript
/*jshint strict:true, browser:true, curly:true, eqeqeq:true, expr:true, forin:true, latedef:true, newcap:true, noarg:true, trailing: true, undef:true, unused:true */ /*global Drupal: true, jQuery: true*/ /** * @file * Javascript api documentation for Clientside Validation. */ /** * It speaks for itself that Clients...
JavaScript
/*! * jQuery Form Plugin * version: 3.09 (16-APR-2012) * @requires jQuery v1.3.2 or later * * Examples and documentation at: http://malsup.com/jquery/form/ * Project repository: https://github.com/malsup/form * Dual licensed under the MIT and GPL licenses: * http://malsup.github.com/mit-license.txt * htt...
JavaScript
/*jshint strict:true, browser:true, curly:true, eqeqeq:true, expr:true, forin:true, latedef:true, newcap:true, noarg:true, trailing: true, undef:true, unused:true */ /*global Drupal: true, jQuery: true*/ /** * File: clientside_validation_html5.js * Version: 7.x-1.x * Description: Add clientside validation...
JavaScript
/*jshint strict:true, browser:true, curly:true, eqeqeq:true, expr:true, forin:true, latedef:true, newcap:true, noarg:true, trailing: true, undef:true, unused:true */ /*global Drupal: true, jQuery: true*/ /** * File: clientside_validation_states.js * Version: 7.x-1.x * Description: Add clientside validatio...
JavaScript
/*jshint strict:true, browser:true, curly:true, eqeqeq:true, expr:true, forin:true, latedef:true, newcap:true, noarg:true, trailing: true, undef:true, unused:true */ /*global Drupal: true, jQuery: true, XRegExp:true*/ /** * File: clientside_validation.js * Version: 7.x-1.x * Description: Add clientside va...
JavaScript
/*jshint strict:true, browser:true, curly:true, eqeqeq:true, expr:true, forin:true, latedef:true, newcap:true, noarg:true, trailing: true, undef:true, unused:true */ /** * File: clientside_validation.ie8.js * Version: 7.x-1.x * Description: ECMA-262, 5th edition support for IE <= 8 * Language: Javascr...
JavaScript
(function($) { /** * Initialize editor libraries. * * Some editors need to be initialized before the DOM is fully loaded. The * init hook gives them a chance to do so. */ Drupal.wysiwygInit = function() { // This breaks in Konqueror. Prevent it from running. if (/KDE/.test(navigator.vendor)) { return; }...
JavaScript
(function($) { /** * Initialize editor instances. * * This function needs to be called before the page is fully loaded, as * calling tinyMCE.init() after the page is loaded breaks IE6. * * @param editorSettings * An object containing editor settings for each input format. */ Drupal.wysiwyg.editor.init.tinymc...
JavaScript
(function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.epiceditor = function (context, params, settings) { var $target = $('#' + params.field); var containerId = params.field + '-epiceditor'; var defaultContent = $target.val(); $target.hide().after('<div id="' + containe...
JavaScript
var wysiwygWhizzywig = { currentField: null, fields: {} }; var buttonPath = null; /** * Override Whizzywig's document.write() function. * * Whizzywig uses document.write() by default, which leads to a blank page when * invoked in jQuery.ready(). Luckily, Whizzywig developers implemented a * shorthand w() substi...
JavaScript
(function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.fckeditor = function(context, params, settings) { var FCKinstance = new FCKeditor(params.field, settings.Width, settings.Height, settings.ToolbarSet); // Apply editor instance settings. FCKinstance.BasePath = settings....
JavaScript
(function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.jwysiwyg = function(context, params, settings) { // Attach editor. $('#' + params.field).wysiwyg(); }; /** * Detach a single or all editors. */ Drupal.wysiwyg.editor.detach.jwysiwyg = function (context, params, trigge...
JavaScript
Drupal = window.parent.Drupal; /** * Fetch and provide original editor settings as local variable. * * FCKeditor does not support to pass complex variable types to the editor. * Instance settings passed to FCKinstance.Config are temporarily stored in * FCKConfig.PageConfig. */ var wysiwygFormat = FCKConfig.Page...
JavaScript
(function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.nicedit = function(context, params, settings) { // Intercept and ignore submit handlers or they will revert changes made // since the instance was removed. The handlers are anonymous and hidden out // of scope in a clo...
JavaScript
var buttonPath = null; (function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.whizzywig = function(context, params, settings) { // Previous versions used per-button images found in this location, // now it is only used for custom buttons. if (settings.buttonPath) { w...
JavaScript
(function($) { Drupal.wysiwyg.editor.init.ckeditor = function(settings) { // Plugins must only be loaded once. Only the settings from the first format // will be used but they're identical anyway. var registeredPlugins = {}; for (var format in settings) { if (Drupal.settings.wysiwyg.plugins[format]) { ...
JavaScript
(function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.markitup = function(context, params, settings) { $('#' + params.field, context).markItUp(settings); // Adjust CSS for editor buttons. $.each(settings.markupSet, function (button) { $('.' + settings.nameSpace + ' ....
JavaScript
var wysiwygWhizzywig = { currentField: null, fields: {} }; var buttonPath = null; /** * Override Whizzywig's document.write() function. * * Whizzywig uses document.write() by default, which leads to a blank page when * invoked in jQuery.ready(). Luckily, Whizzywig developers implemented a * shorthand w() substi...
JavaScript
(function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.wymeditor = function (context, params, settings) { // Prepend basePath to wymPath. settings.wymPath = settings.basePath + settings.wymPath; // Update activeId on focus. settings.postInit = function (instance) { $...
JavaScript
// Backup $ and reset it to jQuery. Drupal.wysiwyg._openwysiwyg = $; $ = jQuery; // Wrap openWYSIWYG's methods to temporarily use its version of $. jQuery.each(WYSIWYG, function (key, value) { if (jQuery.isFunction(value)) { WYSIWYG[key] = function () { var old$ = $; $ = Drupal.wysiwyg._openwysiwyg;...
JavaScript
(function($) { /** * Initialize editor instances. * * @todo Is the following note still valid for 3.x? * This function needs to be called before the page is fully loaded, as * calling tinyMCE.init() after the page is loaded breaks IE6. * * @param editorSettings * An object containing editor settings for each...
JavaScript
(function($) { /** * Attach this editor to a target element. * * @param context * A DOM element, supplied by Drupal.attachBehaviors(). * @param params * An object containing input format parameters. Default parameters are: * - editor: The internal editor name. * - theme: The name/key of the editor them...
JavaScript
Drupal.wysiwyg = Drupal.wysiwyg || { 'instances': {} }; Drupal.wysiwyg.editor = Drupal.wysiwyg.editor || { 'init': {}, 'attach': {}, 'detach': {}, 'instance': {} }; Drupal.wysiwyg.plugins = Drupal.wysiwyg.plugins || {}; (function ($) { // Determine support for queryCommandEnabled(). // An exception should be th...
JavaScript
/** * Wysiwyg plugin button implementation for Awesome plugin. */ Drupal.wysiwyg.plugins.awesome = { /** * Return whether the passed node belongs to this plugin. * * @param node * The currently focused DOM element in the editor content. */ isNode: function(node) { return ($(node).is('img.mym...
JavaScript
(function ($) { // @todo Array syntax required; 'break' is a predefined token in JavaScript. Drupal.wysiwyg.plugins['break'] = { /** * Return whether the passed node belongs to this plugin. */ isNode: function(node) { return ($(node).is('img.wysiwyg-break')); }, /** * Execute the button. */ ...
JavaScript
tinyMCE.addToLang('break', { title: 'Insertar marcador de documento recortado', desc: 'Generar el punto de separación entre la versión recortada del documento y el resto del contenido' });
JavaScript
tinyMCE.addToLang('break', { title: 'Anrisstext trennen', desc: 'Separiert den Anrisstext und Textkörper des Inhalts an dieser Stelle' });
JavaScript
tinyMCE.addToLang('break', { title: 'Insert teaser break', desc: 'Separate teaser and body of this content' });
JavaScript
tinyMCE.addToLang('break', { title: 'Inserir marcador de document retallat', desc: 'Generar el punt de separació entre la versió retallada del document i la resta del contingut' });
JavaScript
(function ($) { /** * Attaches double-click behavior to toggle full path of Krumo elements. */ Drupal.behaviors.devel = { attach: function (context, settings) { // Add hint to footnote $('.krumo-footnote .krumo-call').once().before('<img style="vertical-align: middle;" title="Click to expand. Double-click...
JavaScript
/*! * jQuery JavaScript Library v1.4.4 * http://jquery.com/ * * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. ...
JavaScript
/** * JavaScript routines for Krumo * * @link http://sourceforge.net/projects/krumo */ ///////////////////////////////////////////////////////////////////////////// /** * Krumo JS Class */ function krumo() { } // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- /** * Add a CSS class to a...
JavaScript
/*----------------------------------------\ | Cross Browser Tree Widget 1.1 | |-----------------------------------------| | Created by Emil A. Eklund (eae@eae.net) | | For WebFX (http://webfx.eae.net/) | |-----------------------------------------| | This script is provided as is without | | any warran...
JavaScript
(function ($) { // Explain link in query log Drupal.behaviors.devel_explain = { attach: function(context, settings) { $('a.dev-explain').click(function () { qid = $(this).attr("qid"); cell = $('#devel-query-' + qid); $('.dev-explain', cell).load(settings.basePath + '?q=devel/explain/' + setting...
JavaScript
/** * @file devel_node_access.js. */ (function ($) { /** * Perform the access by user ajax request. */ function devel_node_access_user_ajax(context, settings) { // Get the cell ID for the first .dna-permission that isn't processed. var cell = $('td.dna-permission', context) .not('.a...
JavaScript
(function($) { /** * Live preview of Administration menu components. */ Drupal.behaviors.adminMenuLivePreview = { attach: function (context, settings) { $('input[name^="admin_menu_components"]', context).once('admin-menu-live-preview') .change(function () { var target = $(this).attr('rel'); ...
JavaScript
(function($) { Drupal.admin = Drupal.admin || {}; Drupal.admin.behaviors = Drupal.admin.behaviors || {}; Drupal.admin.hashes = Drupal.admin.hashes || {}; /** * Core behavior for Administration menu. * * Test whether there is an administration menu is in the output and execute all * registered behaviors. */ Drupa...
JavaScript
(function($) { /** * jQuery debugging helper. * * Invented for Dreditor. * * @usage * $.debug(var [, name]); * $variable.debug( [name] ); */ jQuery.extend({ debug: function () { // Setup debug storage in global window. We want to look into it. window.debug = window.debug || []; args = jQuery...
JavaScript
(function($) { Drupal.admin = Drupal.admin || {}; Drupal.admin.behaviors = Drupal.admin.behaviors || {}; /** * @ingroup admin_behaviors * @{ */ /** * Apply active trail highlighting based on current path. * * @todo Not limited to toolbar; move into core? */ Drupal.admin.behaviors.toolbarActiveTrail = function...
JavaScript
(function($) { Drupal.behaviors.masked_input = { attach: function(context, settings) { var config = settings.masked_input; // Quick check for the library dependency. if ($.mask) { for (var element in config.elements) { $('#' + config.elements[element].id, context).once('mask...
JavaScript
(function ($) { /** * Enhancements to states.js. */ /** * Handle array values. * @see http://drupal.org/node/1149078 */ Drupal.states.Dependent.comparisons['Array'] = function (reference, value) { // Make sure value is an array. if (!(typeof(value) === 'object' && (value instanceof Array))) { return fals...
JavaScript
(function ($) { /** * The base States namespace. * * Having the local states variable allows us to use the States namespace * without having to always declare "Drupal.states". */ var states = Drupal.states = { // An array of functions that should be postponed. postponed: [] }; /** * Attaches the states. */...
JavaScript
(function ($) { /** * This script transforms a set of wrappers into a stack of multipage pages. * Another pane can be entered by clicking next/previous. * */ Drupal.behaviors.MultiPage = { attach: function (context) { $('.multipage-panes', context).once('multipage', function () { var focusID = $(':hi...
JavaScript
(function($) { /** * Drupal FieldGroup object. */ Drupal.FieldGroup = Drupal.FieldGroup || {}; Drupal.FieldGroup.Effects = Drupal.FieldGroup.Effects || {}; Drupal.FieldGroup.groupWithfocus = null; Drupal.FieldGroup.setGroupWithfocus = function(element) { element.css({display: 'block'}); Drupal.FieldGroup.group...
JavaScript
(function ($) { /** * This script transforms a set of fieldsets into a stack of horizontal * tabs. Another tab pane can be selected by clicking on the respective * tab. * * Each tab may have a summary which can be updated by another * script. For that to work, each fieldset has an associated * 'horizontalTabCal...
JavaScript
(function($) { Drupal.behaviors.fieldUIFieldsOverview = { attach: function (context, settings) { $('table#field-overview', context).once('field-field-overview', function() { Drupal.fieldUIOverview.attach(this, settings.fieldUIRowsData, Drupal.fieldUIFieldOverview); }); } }; /** * Row handlers fo...
JavaScript
/** * This is a custom implementation of user.permissions.js, which is necessary * because LoginToboggan needs its pre-auth role to not be explicitly tied to * the auth role. The change is minor -- simply exclude the pre-auth role from * all the auto-checking as the anon and auth user roles are. */ (function ($)...
JavaScript
(function ($) { Drupal.behaviors.unifiedLogin = { attach: function (context) { // Attach behaviors to the links so that they show/hide forms appropriately. $('.toboggan-unified #register-link').click(function() { $(this).addClass('lt-active').blur(); $('.toboggan-unified #login-link').removeCla...
JavaScript
(function ($) { Drupal.behaviors.LoginToboggan = { attach: function (context, settings) { $('#toboggan-login', context).once('toggleboggan_setup', function () { $(this).hide(); Drupal.logintoboggan_toggleboggan(); }); } }; Drupal.logintoboggan_toggleboggan = function() { ...
JavaScript
// geo-location shim // Source: https://gist.github.com/366184 // currentely only serves lat/long // depends on jQuery ;(function(geolocation, $){ if (geolocation) return; var cache; geolocation = window.navigator.geolocation = {}; geolocation.getCurrentPosition = function(callback){ if (cache) callbac...
JavaScript
;(function ($) { Drupal.behaviors.viewsProximityValue = { attach: function (context, settings) { if (!$('body').hasClass('page-admin-structure-views-nojs')) { $('#edit-options-source-change').hide(); } $('#edit-options-source').change(function() { $('#edit-options-source-change')...
JavaScript
// Source: https://github.com/JasonSanford/GeoJSON-to-Google-Maps var GeoJSON = function( geojson, options ){ var _geometryToGoogleMaps = function( geojsonGeometry, opts, geojsonProperties ){ var googleObj; switch ( geojsonGeometry.type ){ case "Point": opts.position = new google.maps.LatL...
JavaScript
(function ($) { Drupal.behaviors.geofieldMap = { attach: function(context, settings) { Drupal.geoField = Drupal.geoField || {}; Drupal.geoField.maps = Drupal.geoField.maps || {}; $('.geofieldMap', context).once('geofield-processed', function(index, element) { var data = undefined; ...
JavaScript
/** * @file * JS Implementation of OpenLayers behavior. */ /** * Class: OpenLayers.Control.GeofieldEditingToolbar * The GeofieldEditingToolbar is a panel controls to modify or draw polygons, lines, * points, or to navigate the map by panning. You can select which tool to enable * with options.tools. * * Inheri...
JavaScript
(function ($) { Drupal.behaviors.popup = { attach: function(context){ // Make sure we have an overlay space if(!$('#popup-active-overlay').length){ $('body').append('<div id="popup-active-overlay"></div>'); } // Process flat menu containers $('.popup-menu-flat:not(.popup-menu-flat-proces...
JavaScript
(function ($) { Drupal.behaviors.popupFilter = { attach: function(context){ if ($('.class-popup-filter-admin-form', context).length == 0){ return; } // Show/Hide appropriate sections based on type $('#popup-type') .change(updateSections) .keyup(updateSections)...
JavaScript
(function ($) { Drupal.viewsSlideshow = Drupal.viewsSlideshow || {}; /** * Views Slideshow Controls */ Drupal.viewsSlideshowControls = Drupal.viewsSlideshowControls || {}; /** * Implement the play hook for controls. */ Drupal.viewsSlideshowControls.play = function (options) { // Route the co...
JavaScript
/** * @file * A simple jQuery Cycle Div Slideshow Rotator. */ /** * This will set our initial behavior, by starting up each individual slideshow. */ (function ($) { Drupal.behaviors.viewsSlideshowCycle = { attach: function (context) { $('.views_slideshow_cycle_main:not(.viewsSlideshowCycle-processe...
JavaScript
/** * @file * Javascript to enhance the views slideshow cycle form options. */ /** * This will set our initial behavior, by starting up each individual slideshow. */ (function ($) { // Since Drupal 7 doesn't support having a field based on one of 3 values of // a select box we need to add our own javasc...
JavaScript
/** * Plugin written by the great jqueryfordesigners.com * http://jqueryfordesigners.com/jquery-infinite-carousel/ * * Slightly addapted for our use case */ (function ($) { $.fn.infiniteCarousel = function () { function repeat(str, num) { return new Array( num + 1 ).join( str ); } ...
JavaScript
Drupal.behaviors.galleryformatter = { attach: function (context) { // We must wait for everything to load in order to get images' dimensions. (jQuery)(window).bind('load', function() { (jQuery)('.galleryformatter:not(.gallery-processed)', context).each(function(){ Drupal.galleryformatter.prepar...
JavaScript
(function ($) { Drupal.behaviors.initColorboxStockholmsyndromeStyle = { attach: function (context, settings) { $(document).bind('cbox_open', function () { // Hide close button initially. $('#cboxClose', context).css('opacity', 0); }); $(document).bind('cbox_load', function () { // Hide ...
JavaScript
(function ($) { Drupal.behaviors.initColorboxDefaultStyle = { attach: function (context, settings) { $(document).bind('cbox_complete', function () { // Only run if there is a title. if ($('#cboxTitle:empty', context).length == false) { setTimeout(function () { $('#cboxTitle', context).slideUp...
JavaScript
(function ($) { Drupal.behaviors.initColorboxLogin = { attach: function (context, settings) { if (!$.isFunction($.colorbox)) { return; } $("a[href*='/user/login'], a[href*='?q=user/login']", context).once('init-colorbox-login', function () { var path = this.href; var new_path = path.rep...
JavaScript
(function ($) { Drupal.behaviors.initColorboxInline = { attach: function (context, settings) { if (!$.isFunction($.colorbox)) { return; } $.urlParam = function(name, url){ if (name == 'fragment') { var results = new RegExp('(#[^&#]*)').exec(url); } else { var resul...
JavaScript
(function ($) { Drupal.behaviors.initColorbox = { attach: function (context, settings) { if (!$.isFunction($.colorbox)) { return; } $('.colorbox', context) .once('init-colorbox') .colorbox(settings.colorbox); } }; { $(document).bind('cbox_complete', function () { Drupal.attachB...
JavaScript
(function ($) { Drupal.behaviors.initColorboxImageModule = { attach: function (context, settings) { // Image Attach Functionality $('div.image-attach-body > a, ul.images a', context).once('init-colorbox-image-module', function () { var $img = $('.image', this); if ($img.length === 0) { re...
JavaScript
(function ($) { Drupal.behaviors.initColorboxAdminSettings = { attach: function (context, settings) { $('div.colorbox-custom-settings-activate input.form-radio', context).click(function () { if (this.value == 1) { $('div.colorbox-custom-settings', context).show(); } else { $('di...
JavaScript
(function ($) { Drupal.behaviors.initColorboxLoad = { attach: function (context, settings) { if (!$.isFunction($.colorbox)) { return; } $.urlParams = function (url) { var p = {}, e, a = /\+/g, // Regex for replacing addition symbol with a space r = /([^&=]+)=?([...
JavaScript
(function ($) { Drupal.behaviors.tokenTree = { attach: function (context, settings) { $('table.token-tree', context).once('token-tree', function () { $(this).treeTable(); }); } }; Drupal.behaviors.tokenDialog = { attach: function (context, settings) { $('a.token-dialog', context).once('token-...
JavaScript
/* * jQuery treeTable Plugin 2.3.0 * http://ludo.cubicphuse.nl/jquery-plugins/treeTable/ * * Copyright 2010, Ludo van den Boom * Dual licensed under the MIT or GPL Version 2 licenses. */ (function($) { // Helps to make options available to all functions // TODO: This gives problems when there are both expand...
JavaScript
/** * @file * Test JavaScript file for Libraries loading. * * Replace the text in the 'libraries-test-module-js' div. See README.txt for * more information. */ (function ($) { Drupal.behaviors.librariesTest = { attach: function(context, settings) { $('.libraries-test-module-js').text('If this text shows ...
JavaScript
/** * @file * Test JavaScript file for Libraries loading. * * Replace the text in the 'libraries-test-module-js' div. See README.txt for * more information. */ (function ($) { Drupal.behaviors.librariesTest = { attach: function(context, settings) { $('.libraries-test-module-js').text('If this text shows ...
JavaScript
/** * @file * Test JavaScript file for Libraries loading. * * Replace the text in the 'libraries-test-module-js' div. See README.txt for * more information. */ (function ($) { Drupal.behaviors.librariesTest = { attach: function(context, settings) { $('.libraries-test-module-js').text('If this text shows ...
JavaScript
/** * @file * Test JavaScript file for Libraries loading. * * Replace the text in the 'libraries-test-module-js' div. See README.txt for * more information. */ (function ($) { Drupal.behaviors.librariesTest = { attach: function(context, settings) { $('.libraries-test-module-js').text('If this text shows ...
JavaScript
/** * @file * Test JavaScript file for Libraries loading. * * Replace the text in the 'libraries-test-module-js' div. See README.txt for * more information. */ (function ($) { Drupal.behaviors.librariesTest = { attach: function(context, settings) { $('.libraries-test-module-js').text('If this text shows ...
JavaScript
/** * @file * Test JavaScript file for Libraries loading. * * Replace the text in the 'libraries-test-module-js' div. See README.txt for * more information. */ (function ($) { Drupal.behaviors.librariesTest = { attach: function(context, settings) { $('.libraries-test-module-js').text('If this text shows ...
JavaScript
/** * jQuery.fn.sortElements * -------------- * @param Function comparator: * Exactly the same behaviour as [1,2,3].sort(comparator) * * @param Function getSortable * A function that should return the element that is * to be sorted. The comparator will run on the * current collection, but you may want ...
JavaScript
(function ($) { Drupal.behaviors.diffRevisions = { attach: function (context, settings) { var $rows = $('table.diff-revisions tbody tr'); function updateDiffRadios() { var newTd = false; var oldTd = false; if (!$rows.length) { return true; } $rows.removeClass('selected')...
JavaScript
// $Id: compact_forms.js,v 1.11 2011/01/09 05:51:15 sun Exp $ (function ($) { Drupal.compactForms = {}; /** * Compact Forms jQuery plugin. */ $.fn.compactForm = function (stars) { stars = stars || 0; this.each(function () { $(this).addClass('compact-form').find('label').each(function () { var contex...
JavaScript
/** * Created by IVAN on 14.12.13. */ (function ($) { /** * Resize block to full screen */ Drupal.behaviors.resizeBlock = { attach: function (context) { $( window ).resize(function() { resizeBl(); }); $( window ).load(function() { ...
JavaScript
(function($) { Drupal.behaviors.HierarchicalSelect = { attach: function (context) { $('.hierarchical-select-wrapper:not(.hierarchical-select-wrapper-processed)', context) .addClass('hierarchical-select-wrapper-processed').each(function() { var hsid = $(this).attr('id').replace(/^hierarchical-select-(\...
JavaScript
/** * @file * Make Hierarchical Select work in Views' exposed filters form. * * Views' exposed filters form is a GET form, but since Hierarchical Select * really is a combination of various form items, this will result in a very * ugly and unnecessarily long GET URL, which also breaks the exposed filters. * Th...
JavaScript