code
stringlengths
1
2.08M
language
stringclasses
1 value
/** * jQuery Once Plugin v1.2 * http://plugins.jquery.com/project/once * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ (function ($) { var cache = {}, uuid = 0; /** * Filters elements by whether they ha...
JavaScript
/** * @file * Conditionally hide or show the appropriate settings and saved defaults * on the file transfer connection settings form used by authorize.php. */ (function ($) { Drupal.behaviors.authorizeFileTransferForm = { attach: function(context) { $('#edit-connection-settings-authorize-filetransfer-defau...
JavaScript
(function ($) { /** * Retrieves the summary for the first element. */ $.fn.drupalGetSummary = function () { var callback = this.data('summaryCallback'); return (this[0] && callback) ? $.trim(callback(this[0])) : ''; }; /** * Sets the summary for all matched elements. * * @param callback * Either a functio...
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 ($) { /** * Attaches the batch behavior to progress bars. */ Drupal.behaviors.batch = { attach: function (context, settings) { $('#progress', context).once('batch', function () { var holder = $(this); // Success: redirect to the summary. var updateCallback = function (progress, sta...
JavaScript
(function ($) { Drupal.behaviors.textarea = { attach: function (context, settings) { $('.form-textarea-wrapper.resizable', context).once('textarea', function () { var staticOffset = null; var textarea = $(this).addClass('resizable-textarea').find('textarea'); var grippie = $('<div class="grippi...
JavaScript
(function ($) { /** * Attaches the autocomplete behavior to all required fields. */ Drupal.behaviors.autocomplete = { attach: function (context, settings) { var acdb = []; $('input.autocomplete', context).once('autocomplete', function () { var uri = this.value; if (!acdb[uri]) { acdb[ur...
JavaScript
(function ($) { /** * This script transforms a set of fieldsets into a stack of vertical * 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 * 'verticalTabCallba...
JavaScript
(function ($) { /** * Set the client's system time zone as default values of form fields. */ Drupal.behaviors.setTimezone = { attach: function (context, settings) { $('select.timezone-detect', context).once('timezone', function () { var dateString = Date(); // In some client environments, date stri...
JavaScript
(function ($) { /** * Toggle the visibility of a fieldset using smooth animations. */ Drupal.toggleFieldset = function (fieldset) { var $fieldset = $(fieldset); if ($fieldset.is('.collapsed')) { var $content = $('> .fieldset-wrapper', fieldset).hide(); $fieldset .removeClass('collapsed') .tri...
JavaScript
(function ($) { /** * Attaches sticky table headers. */ Drupal.behaviors.tableHeader = { attach: function (context, settings) { if (!$.support.positionFixed) { return; } $('table.sticky-enabled', context).once('tableheader', function () { $(this).data("drupal-tableheader", new Drupal.table...
JavaScript
/** * Cookie plugin 1.0 * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=...
JavaScript
(function ($) { /** * Provides Ajax page updating via jQuery $.ajax (Asynchronous JavaScript and XML). * * Ajax is a method of making a request via JavaScript while viewing an HTML * page. The request returns an array of commands encoded in JSON, which is * then executed to make any changes that are necessary to ...
JavaScript
(function ($) { Drupal.behaviors.menuFieldsetSummaries = { attach: function (context) { $('fieldset.menu-link-form', context).drupalSetSummary(function (context) { if ($('.form-item-menu-enabled input', context).is(':checked')) { return Drupal.checkPlain($('.form-item-menu-link-title input', contex...
JavaScript
(function ($) { Drupal.behaviors.menuChangeParentItems = { attach: function (context, settings) { $('fieldset#edit-menu input').each(function () { $(this).change(function () { // Update list of available parent menu items. Drupal.menu_update_parent_list(); }); }); } }; /** * F...
JavaScript
Drupal.t("Standard Call t"); Drupal . t ( "Whitespace Call t" ) ; Drupal.t('Single Quote t'); Drupal.t('Single Quote \'Escaped\' t'); Drupal.t('Single Quote ' + 'Concat ' + 'strings ' + 't'); Drupal.t("Double Quote t"); Drupal.t("Double Quote \"Escaped\" t"); Drupal.t("Double Quote " + "Concat " + "strings " + "t");...
JavaScript
(function ($) { /** * Attaches language support to the jQuery UI datepicker component. */ Drupal.behaviors.localeDatepicker = { attach: function(context, settings) { // This code accesses Drupal.settings and localized strings via Drupal.t(). // So this code should run after these are initialized. By placin...
JavaScript
(function ($) { Drupal.toolbar = Drupal.toolbar || {}; /** * Attach toggling behavior and notify the overlay of the toolbar. */ Drupal.behaviors.toolbar = { attach: function(context) { // Set the initial state of the toolbar. $('#toolbar', context).once('toolbar', Drupal.toolbar.init); // Toggling t...
JavaScript
/** * @file * Javascript behaviors for the Book module. */ (function ($) { Drupal.behaviors.bookFieldsetSummaries = { attach: function (context) { $('fieldset.book-outline-form', context).drupalSetSummary(function (context) { var $select = $('.form-item-book-bid select'); var val = $select.val();...
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 ($) { /** * 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
/*----------------------------------------\ | 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...
JavaScript
/** * JavaScript routines for Krumo * * @link http://sourceforge.net/projects/krumo */ ///////////////////////////////////////////////////////////////////////////// /** * Krumo JS Class */ function krumo() { } // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- /** * Add...
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
/** * @file * Attaches the behaviors for the Field UI module. */ (function($) { Drupal.behaviors.fieldUIFieldOverview = { attach: function (context, settings) { $('table#field-overview', context).once('field-overview', function () { Drupal.fieldUIFieldOverview.attachUpdateSelects(this, settings); ...
JavaScript
/** * @file * Attaches behaviors for the Contextual module. */ (function ($) { Drupal.contextualLinks = Drupal.contextualLinks || {}; /** * Attaches outline behavior for regions associated with contextual links. */ Drupal.behaviors.contextualLinks = { attach: function (context) { $('div.contextual-links-w...
JavaScript
(function ($) { /** * Auto-hide summary textarea if empty and show hide and unhide links. */ Drupal.behaviors.textSummary = { attach: function (context, settings) { $('.text-summary', context).once('text-summary', function () { var $widget = $(this).closest('div.field-type-text-with-summary'); var...
JavaScript
(function ($) { $(document).ready(function() { $.ajax({ type: "POST", cache: false, url: Drupal.settings.statistics.url, data: Drupal.settings.statistics.data }); }); })(jQuery);
JavaScript
(function ($) { /** * Attach handlers to evaluate the strength of any password fields and to check * that its confirmation is correct. */ Drupal.behaviors.password = { attach: function (context, settings) { var translate = settings.password; $('input.password-field', context).once('password', function () ...
JavaScript
(function ($) { /** * Shows checked and disabled checkboxes for inherited permissions. */ Drupal.behaviors.permissions = { attach: function (context) { var self = this; $('table#permissions').once('permissions', function () { // On a site with many roles and permissions, this behavior initially has ...
JavaScript
(function ($) { /** * Provide the summary information for the block settings vertical tabs. */ Drupal.behaviors.blockSettingsSummary = { attach: function (context) { // The drupalSetSummary method required for this behavior is not available // on the Blocks administration page, so we need to make sure this...
JavaScript
/** * @file * Attaches the behaviors for the Color module. */ (function ($) { Drupal.behaviors.color = { attach: function (context, settings) { var i, j, colors, field_name; // This behavior attaches by ID, so is only valid once on a page. var form = $('#system-theme-settings .color-form', context).o...
JavaScript
/** * @file * Attaches preview-related behavior for the Color module. */ (function ($) { Drupal.color = { callback: function(context, settings, form, farb, height, width) { // Solid background. $('#preview', form).css('backgroundColor', $('#palette input[name="palette[base]"]', form).val()); ...
JavaScript
/** * @file * Attaches behaviors for the Path module. */ (function ($) { Drupal.behaviors.pathFieldsetSummaries = { attach: function (context) { $('fieldset.path-form', context).drupalSetSummary(function (context) { var path = $('.form-item-path-alias input').val(); return path ? Drupal...
JavaScript
(function ($) { /** * Handle the concept of a fixed number of slots. * * This behavior is dependent on the tableDrag behavior, since it uses the * objects initialized in that behavior to update the row. */ Drupal.behaviors.shortcutDrag = { attach: function (context, settings) { if (Drupal.tableDrag) { ...
JavaScript
(function ($) { Drupal.behaviors.contentTypes = { attach: function (context) { // Provide the vertical tab summaries. $('fieldset#edit-submission', context).drupalSetSummary(function(context) { var vals = []; vals.push(Drupal.checkPlain($('#edit-title-label', context).val()) || Drupal.t('Requires...
JavaScript
(function ($) { Drupal.behaviors.nodeFieldsetSummaries = { attach: function (context) { $('fieldset.node-form-revision-information', context).drupalSetSummary(function (context) { var revisionCheckbox = $('.form-item-revision input', context); // Return 'New revision' if the 'Create new revision' c...
JavaScript
(function ($) { /** * Show/hide the 'Email site administrator when updates are available' checkbox * on the install page. */ Drupal.hideEmailAdministratorCheckbox = function () { // Make sure the secondary box is shown / hidden as necessary on page load. if ($('#edit-update-status-module-1').is(':checked')) { ...
JavaScript
(function ($) { /** * Checks to see if the cron should be automatically run. */ Drupal.behaviors.cronCheck = { attach: function(context, settings) { if (settings.cronCheck || false) { $('body').once('cron-check', function() { // Only execute the cron check if its the right time. if (Math....
JavaScript
(function ($) { /** * Add functionality to the profile drag and drop table. * * This behavior is dependent on the tableDrag behavior, since it uses the * objects initialized in that behavior to update the row. It shows and hides * a warning message when removing the last field from a profile category. */ Drupal....
JavaScript
/** * @file * Provides JavaScript additions to the managed file field type. * * This file provides progress bar support (if available), popup windows for * file previews, and disabling of other file fields during Ajax uploads (which * prevents separate file fields from accidentally uploading files). */ (functio...
JavaScript
(function ($) { /** * Add the cool table collapsing on the testing overview page. */ Drupal.behaviors.simpleTestMenuCollapse = { attach: function (context, settings) { var timeout = null; // Adds expand-collapse functionality. $('div.simpletest-image').once('simpletest-image', function () { var $...
JavaScript
(function ($) { /** * Move a block in the blocks table from one region to another via select list. * * This behavior is dependent on the tableDrag behavior, since it uses the * objects initialized in that behavior to update the row. */ Drupal.behaviors.termDrag = { attach: function (context, settings) { var...
JavaScript
(function ($) { Drupal.behaviors.commentFieldsetSummaries = { attach: function (context) { $('fieldset.comment-node-settings-form', context).drupalSetSummary(function (context) { return Drupal.checkPlain($('.form-item-comment input:checked', context).next('label').text()); }); // Provide the summ...
JavaScript
(function ($) { Drupal.behaviors.openid = { attach: function (context) { var loginElements = $('.form-item-name, .form-item-pass, li.openid-link'); var openidElements = $('.form-item-openid-identifier, li.user-link'); var cookie = $.cookie('Drupal.visitor.openid_identifier'); // This behavior attach...
JavaScript
/** * @file * Attaches the behaviors for the Overlay parent pages. */ (function ($) { /** * Open the overlay, or load content into it, when an admin link is clicked. */ Drupal.behaviors.overlayParent = { attach: function (context, settings) { if (Drupal.overlay.isOpen) { Drupal.overlay.makeDocumentUn...
JavaScript
/** * @file * Attaches the behaviors for the Overlay child pages. */ (function ($) { /** * Attach the child dialog behavior to new content. */ Drupal.behaviors.overlayChild = { attach: function (context, settings) { // Make sure this behavior is not processed more than once. if (this.processed) { ...
JavaScript
(function ($) { Drupal.behaviors.filterStatus = { attach: function (context, settings) { $('#filters-status-wrapper input.form-checkbox', context).once('filter-status', function () { var $checkbox = $(this); // Retrieve the tabledrag row belonging to this filter. var $row = $('#' + $checkbox.at...
JavaScript
(function ($) { /** * Automatically display the guidelines of the selected text format. */ Drupal.behaviors.filterGuidelines = { attach: function (context) { $('.filter-guidelines', context).once('filter-guidelines') .find(':header').hide() .closest('.filter-wrapper').find('select.filter-list') ...
JavaScript
/** * @file * Attaches behaviors for the Dashboard module. */ (function ($) { /** * Implements Drupal.behaviors for the Dashboard module. */ Drupal.behaviors.dashboard = { attach: function (context, settings) { $('#dashboard', context).once(function () { $(this).prepend('<div class="customize clearfi...
JavaScript
/** * @file * Javascript related to contextual links. */ (function ($) { Drupal.behaviors.viewsContextualLinks = { attach: function (context) { // If there are views-related contextual links attached to the main page // content, find the smallest region that encloses both the links and the // view, an...
JavaScript
/** * @file * Some basic behaviors and utility functions for Views. */ (function ($) { Drupal.Views = {}; /** * jQuery UI tabs, Views integration component */ Drupal.behaviors.viewsTabs = { attach: function (context) { if ($.viewsUi && $.viewsUi.tabs) { $('#views-tabset').once('views-processed').view...
JavaScript
/** * This is part of a patch to address a jQueryUI bug. The bug is responsible * for the inability to scroll a page when a modal dialog is active. If the content * of the dialog extends beyond the bottom of the viewport, the user is only able * to scroll with a mousewheel or up/down keyboard keys. * * @see http...
JavaScript
/** * @file * Handles AJAX fetching of views, including filter submission and response. */ (function ($) { /** * Attaches the AJAX behavior to Views exposed filter forms and key View links. */ Drupal.behaviors.ViewsAjaxView = {}; Drupal.behaviors.ViewsAjaxView.attach = function() { if (Drupal.settings && Drupal...
JavaScript
/** * @file * Some basic behaviors and utility functions for Views UI. */ Drupal.viewsUi = {}; Drupal.behaviors.viewsUiEditView = {}; /** * Improve the user experience of the views edit interface. */ Drupal.behaviors.viewsUiEditView.attach = function (context, settings) { // Only show the SQL rewrite warning w...
JavaScript
/** * @file * Handles AJAX submission and response in Views UI. */ (function ($) { Drupal.ajax.prototype.commands.viewsSetForm = function (ajax, response, status) { var ajax_title = Drupal.settings.views.ajax.title; var ajax_body = Drupal.settings.views.ajax.id; var ajax_popup = Drupal.settings.views....
JavaScript
/** * @file * Javascript related to the main view list. */ (function ($) { Drupal.behaviors.viewsUIList = { attach: function (context) { $('#ctools-export-ui-list-items thead a').once('views-ajax-processed').each(function() { $(this).click(function() { var query = $.deparam.querystring(this.href...
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
(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
(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
(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
/** * @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 * 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 * * 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
/** * @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
/** * @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
/** * @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
/** * 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
/** * 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
/** * 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 ($) { // 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 ($) { /** * 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
/*----------------------------------------\ | 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...
JavaScript
/** * JavaScript routines for Krumo * * @link http://sourceforge.net/projects/krumo */ ///////////////////////////////////////////////////////////////////////////// /** * Krumo JS Class */ function krumo() { } // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- /** * Add...
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
(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 * 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
/** * @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
/** * jQuery Opacity Rollover plugin * * Copyright (c) 2008 Trent Foley (http://trentacular.com) * Licensed under the GPL 2: * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * */ ;(function($) { var defaults = { mouseOutOpacity: 0.67, mouseOverOpacity: 1.0, fadeSpeed: 'fast', ...
JavaScript
/** * jQuery Galleriffic plugin * * Copyright (c) 2008 Trent Foley (http://trentacular.com) * Licensed under the GPL 2: * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * * Much thanks to primary contributer Ponticlaro (http://www.ponticlaro.com) */ ;(function($) { // Globally keep track of all images...
JavaScript
(function ($) { Drupal.behaviors.ViewsGalleriffic = { attach: function(context) { var settings = Drupal.settings.views_galleriffic; // Initialize Advanced Galleriffic Gallery var gallery = $('#thumbs:not(.galleriffic-processed)',context).addClass("galleriffic-processed").galleriffic({ delay: ...
JavaScript
(function ($) { Drupal.behaviors.pathFieldsetSummaries = { attach: function (context) { $('fieldset.path-form', context).drupalSetSummary(function (context) { var path = $('.form-item-path-alias input').val(); var automatic = $('.form-item-path-pathauto input').attr('checked'); if (automatic) ...
JavaScript
(function ($) { /** * Provide the summary information for the tracking settings vertical tabs. */ Drupal.behaviors.trackingSettingsSummary = { attach: function (context) { // Make sure this behavior is processed only if drupalSetSummary is defined. if (typeof jQuery.fn.drupalSetSummary == 'undefined') { ...
JavaScript
(function ($) { $(document).ready(function() { // Expression to check for absolute internal links. var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i"); // Attach onclick event to document only and catch clicks on all elements. $(document.body).click(function(event) { // Catch the cl...
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
(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
(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 || {}; 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($) { /** * 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 || {}; /** * @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
/*! * jQuery Cycle Plugin (with Transition Definitions) * Examples and documentation at: http://jquery.malsup.com/cycle/ * Copyright (c) 2007-2013 M. Alsup * Version: 3.0.3 (11-JUL-2013) * Dual licensed under the MIT and GPL licenses. * http://jquery.malsup.com/license.html * Requires: jQuery v1.7.1 or later */...
JavaScript
(function ($) { Drupal.color = { logoChanged: false, callback: function(context, settings, form, farb, height, width) { // Change the logo to be the real one. if (!this.logoChanged) { $('#preview #preview-logo img').attr('src', Drupal.settings.color.logo); this.logoChanged = true;...
JavaScript
(function ($) { Drupal.color = { logoChanged: false, callback: function(context, settings, form, farb, height, width) { // Change the logo to be the real one. if (!this.logoChanged) { $('#preview #preview-logo img').attr('src', Drupal.settings.color.logo); this.logoChanged = true;...
JavaScript
$(document).ready(function () { $('.package-name', this).click(function() { $(this).siblings("dd").toggleClass("hide"); }); });
JavaScript
RegExp.prototype.replace = function(str, replacer, nonMatchedReplacer) { nonMatchedReplacer = nonMatchedReplacer || function(value) { return value }; var result = []; var position = 0; var match; while (( match = this.exec(str)) != null) { result.push(nonMatchedReplacer(str.subs...
JavaScript
'use strict'; function UserCtrl($scope, backend) { $scope.user = null; $scope.login = function() { backend.user().then(function(response) { $scope.user = response.data; }); } $scope.login(); } function EditorCtrl($scope, $location, $routeParams, $timeout, editor, autosaver) { console.log($rout...
JavaScript
'use strict'; var module = angular.module('app.directives', []); module.directive('aceEditor', function(editor) { return { retrict: 'A', link: function(scope, element) { editor.rebind(element[0]); } }; }); module.directive('star', function() { return { restrict: 'E', replace: true, ...
JavaScript
'use strict'; google.load('picker', '1'); angular.module('app', ['app.filters', 'app.services', 'app.directives']) .constant('saveInterval', 15000) .constant('appId', '892677078282') .constant('EditorState', { CLEAN: 0,// NO CHANGES DIRTY: 1, // UNSAVED CHANGES SAVE: 2, // SAVE IN PROGRESS LOAD: 3, // LOADIN...
JavaScript