code stringlengths 1 2.08M | language stringclasses 1
value |
|---|---|
/*
* File: bst.js
*
* A pure JavaScript implementation of a binary search tree.
*
*/
/*
* Class: BST
*
* The binary search tree class.
*
*/
var BST = function () {
/*
* Private Class: Node
*
* A BST node constructor
*
* Parameters:
* leftChild - ... | JavaScript |
function cambiarEstado(e) {
var estado = $(this).data('value');
var estadoDesc = estado == 'D' ? 'Activar': 'Desactivar';
var codigo = $(this).data('codigo');
showModalMessage(estadoDesc + ' Tema de Evento', '\u00BFDesea ' + estadoDesc.toLowerCase() + ' el Tema de Evento?', function() {
$('#di... | JavaScript |
$(function () {
$("#registrarEventoForm").on("beforesubmit.validation", cleanFileControl);
$('#agregarFoto').click(function () {
cleanFileControl.call(this);
showImageUpload.call(this);
});
$('tr.fileupload :file').change(function (e) {
showImageName.call(this);
});... | JavaScript |
function cambiarEstado(e) {
var estado = $(this).data('value');
var estadoDesc = estado == 'D' ? 'Activar' : 'Desactivar';
var codigo = $(this).data('codigo');
showModalMessage(estadoDesc + ' Rubro ', '\u00BFDesea '
+ estadoDesc.toLowerCase() + ' el Rubro?', function() {
console.log("estado");
$('#divList... | JavaScript |
// VALIDACIONES
/**
* Jquery document ready
*/
$(function() {
$("form").bind("beforesubmit.validation", preventSubmitBlankForm);
$(':input[data-required]').jqBootstrapValidation('add', [ {
type : 'required',
message : 'Este campo es requerido.'
} ]);
$(':input[data-email]')
... | JavaScript |
var SimpleDateFormat;
(function() {
function isUndefined(obj) {
return typeof obj == "undefined";
}
var regex = /('[^']*')|(G+|y+|M+|w+|W+|D+|d+|F+|E+|a+|H+|k+|K+|h+|m+|s+|S+|Z+)|([a-zA-Z]+)|([^a-zA-Z']+)/;
var monthNames = ["January", "February", "March", "April", "May", "June",
"July", "August", "September"... | JavaScript |
$(function() {
$.jqBootstrapValidation({
'submitSuccess' : submitSuccess
});
$('#reqNombreInput').focus();
}); | JavaScript |
$(function() {
$("#btn_asistencia").click(
function() {
var cantAsist = $("#cantAsist").val();
var cantAsistMas = cantAsist + 1;
var codeve = $("#codeve").val();
var codusu = $("#codusu").val();
var fechaFin = $("#fechaFin").val();
var dataString = 'evento.cod_Evento=' + codeve
... | JavaScript |
$(function () {
$('#divListaEmpresas').load('mostrarListaEmpresa');
}); | JavaScript |
function cambiarEstado(e) {
var estado = $(this).data('value');
var estadoDesc = estado == 'D' ? 'Activar': 'Desactivar';
var codigo = $(this).data('codigo');
showModalMessage(estadoDesc + ' Subinstituci\u00F3n', '\u00BFDesea ' + estadoDesc.toLowerCase() + ' la Subinstituci\u00F3n?', function() ... | JavaScript |
// adding 'hashCode: int' method to string objects
String.prototype.hashCode = function() {
var hash = 0;
for (var i = 0; i < this.length; i++) {
char = this.charCodeAt(i);
hash = char + (hash << 6) + (hash << 16) - hash;
}
return hash;
};
(function($) {
$.fn.ms2s = function(opti... | JavaScript |
$(function() {
$('input[name="usuario.usu_foto"]').change(function(e) {
$('input[name="usuario.usu_mantener_foto"]').val(!!$('input[name="usuario.usu_foto"]').val());
});
// $("#temaSelected").empty();
$('#nombresInput').on('submitSuccess.validation', function() {
$('#temaSelected op... | JavaScript |
//function cambiarEstado(e) {
//
// var estado = $(this).data('value');
// var estadoDesc = estado == 'D' ? 'Activar' : 'Desactivar';
// var codigo = $(this).data('codigo');
//
// showModalMessage(estadoDesc + ' DiaFestivo ', '\u00BFDesea '
// + estadoDesc.toLowerCase() + ' el DiaFestivo?', function() {
// console.... | JavaScript |
function cambiarEstado(e) {
var estado = $(this).data('value');
var estadoDesc = estado == 'D' ? 'Activar': 'Desactivar';
var codigo = $(this).data('codigo');
var resumen = $(this).data('resumen');
showModalMessage(estadoDesc + ' Ponente', '\u00BFDesea ' + estadoDesc.toLowerCase() + ' el Ponente. ... | JavaScript |
/* !
* jqBootstrapValidation
* A plugin for automating validation on Twitter Bootstrap formatted forms.
*
* v1.3.6
*
* License: MIT <http://opensource.org/licenses/mit-license.php> - see LICENSE file
*
* http://ReactiveRaven.github.com/jqBootstrapValidation/
*/
(function ($) {
var createdElements = [];
... | JavaScript |
function Notification(notification) {
this.codigoNotificado = notification.codigo;
this.tipoNotificado = notification.tipoNotificado;
this.estado = notification.estado;
var notificacion = notification.notificacion;
this.id = notificacion.id;
this.codigoNotificacion = notificacion.codigo;
th... | JavaScript |
function cambiarEstado(e) {
var estado = $(this).data('value');
var estadoDesc = estado == 'D' ? 'Activar': 'Desactivar';
var codigo = $(this).data('codigo');
var descripcion = $(this).data('descripcion');
showModalMessage(estadoDesc + ' Tipo de Moneda', '\u00BFDesea ' + estadoDesc.toLowerCase() +... | JavaScript |
function linkFormatter(url, paramname, paramvalue, data) {
return '<a href="' + url + '?' + paramname + '='
+ paramvalue + '">' + data + '</a>';
}
function estadoFormatter(estado) {
var icon = estado ? 'ok act-success' : 'remove act-danger';
return '<p class="estado-icon"><i class="icon-' + icon + '... | JavaScript |
$(function() {
$.jqBootstrapValidation({
'submitSuccess' : submitSuccess
});
$('#tipoEventoSelect').focus();
}); | JavaScript |
$(function () {
$('#btnLimpiar').click(function() {
$(this).closest('form').find(':input').filter(function() {
return !$(this).is(":button, :submit, :reset, :image, :disabled, [type=hidden], :checkbox, :radio, [multiple]");
}).each(function() {
... | JavaScript |
function bloquearUsuarioFormatoEstado(cellvalue, options, rowObject) {
return '<a href="#" class="rowlink" onclick="cambiarEstado.apply(this, arguments)" data-codigo=' + rowObject.cod_Usuario + ' data-descripcion="' + rowObject.usu_correo + '" data-value="' + cellvalue + '">' + estadoFormatter(cellvalue == 'H') + ... | JavaScript |
function cambiarEstado(e) {
var estado = $(this).data('value');
var estadoDesc = estado == 'D' ? 'Activar': 'Desactivar';
var codigo = $(this).data('codigo');
var descripcion = $(this).data('descripcion');
showModalMessage(estadoDesc + ' Tipo de Evento', '\u00BFDesea ' + estadoDesc.toLowerCase() +... | JavaScript |
$(function () {
$('input.file').change(function (e) {
$(this).parent().find('input.mantener').val( !! $(this).val());
});
var labels = {
"TIN00000000000000001": ["Colegio", "Capitulo"],
"TIN00000000000000005": ["Universidad", "Facultad"],
"TIN00000000000000004": ["Inst... | JavaScript |
/*!
* FullCalendar v1.6.3 Google Calendar Plugin
* Docs & License: http://arshaw.com/fullcalendar/
* (c) 2013 Adam Shaw
*/
(function($) {
var fc = $.fullCalendar;
var formatDate = fc.formatDate;
var parseISO8601 = fc.parseISO8601;
var addDays = fc.addDays;
var applyAll = fc.applyAll;
fc.sourceNormalizers.push... | JavaScript |
(function(jq) {
jq.autoScroll = function(ops) {
ops = ops || {};
ops.styleClass = ops.styleClass || 'scroll-to-top-button';
var t = jq('<div class="'+ops.styleClass+'"></div>'),
d = jq(ops.target || document);
jq(ops.container || 'body').append(t);
t.css(... | JavaScript |
document.observe("dom:loaded", loadMain);
function loadMain() {
if (arrRemainTime.length > 0) {
TimeCountDown_List();
}
/*
if (strPhotos) {
showListIMG();
}
*/
}
/*************************Code for Time count down*********************************/
var time;
var s... | JavaScript |
$(document).ready(function(){
//Hide the slides menus.
$("#slideMenuSupport").hide();
$("#slideMenuProduct").hide();
$("#slideMenuSolutions").hide();
//$("#slideMenuDownload").hide();
$("#slideMenuInformation").hide();
$("#slideMenuBlog").hide();
$("#mainRightCompareTru").hide();
$("#main... | JavaScript |
spsupport.p = {
sfDomain : superfish.b.pluginDomain,
sfDomain_ : superfish.b.pluginDomain.replace("https","http"),
imgPath : superfish.b.pluginDomain.replace("https","http") + "images/",
cdnUrl : superfish.b.cdnUrl,
appVersion : superfish.b.appVersion,
clientVersion : superfish.b.clientVersion,... | JavaScript |
document.observe("dom:loaded", loadMainDealComments);
//chú ý khi upload file.
//các function sử dụng biến strUrlLink: showCommentsByDeal(); showSubCommentSPResult();
//var strUrlLink = "http://pcw028/NhomMua_new/";
function loadMainDealComments() {
//check trạng thái đăng nhập
try { checkSes... | JavaScript |
function openCollapse(strID, iheightMax) {
$(strID).style.overflow = "hidden";
if ($(strID).className.indexOf("hide") != -1) {
$(strID).style.display = "none";
$(strID).removeClassName('hide');
}
if ($(strID).style.display != "none") {
$(strID).style.height = iheightMax... | JavaScript |
/*
* jQuery Nivo Slider v2.6
* http://nivo.dev7studios.com
*
* Copyright 2011, Gilbert Pellegrom
* Free to use and abuse under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* March 2010
*/
(function($) {
var NivoSlider = function(element, options){
//Defaults ar... | JavaScript |
var _ga = _ga || {};
var _gaq = _gaq || [];
/**
* Helper method to track social features. This assumes all the social
* scripts / apis are loaded synchronously. If they are loaded async,
* you might need to add the nextwork specific tracking call to the
* a callback once the network's script has loaded.
* @pa... | JavaScript |
document.observe("dom:loaded", loadMain);
function loadMain() {
if (strPhotos) {
showListIMG();
}
};
/************************************Code for slide show**********************/
var curIMGList = 0;
var t1;
var t2;
var arrTOut = [null, null, 0, ""];
var linkIMG = "http://www... | JavaScript |
/**
* Name: piroBox v.1.2.1
* Date: November 2009
* Autor: Diego Valobra (http://www.pirolab.it),(http://www.diegovalobra.com)
* Version: 1.2.1
* Licence: CC-BY-SA http://creativecommons.org/licenses/by-sa/2.5/it/
**/
(function($) {
$.fn.piroBox = function(opt) {
opt = jQuery.extend({
my_speed : null,
... | JavaScript |
/*
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
/*
This is an optimized version of Dojo, built for deployment and not for
development. To get sources and documentation, p... | JavaScript |
/*
* JTip
* By Cody Lindley (http://www.codylindley.com)
* Under an Attribution, Share Alike License
* JTip is built on top of the very light weight jquery library.
*
* This version has been modified by Ueli Weiss.
* - added non-ajax tooltips
* - width can now also be passed by class name
*/
//on p... | JavaScript |
function delm(theURL)
{
if(confirm('Are you sure you want to delete?'))
window.location.href = theURL;
}
| JavaScript |
var NS = (document.layers);
var IE = (document.all);
function obj_enable(objid)
{
var e=document.getElementById(objid);
e.disabled=false;
}
function obj_disable(objid)
{
var e=document.getElementById(objid);
e.disabled=true;
}
function setactiveMenuFromContent()
{
var a=parent.MySQL_Dumper_content.location.href... | JavaScript |
/**
*
* Utilities
* Author: Stefan Petre www.eyecon.ro
*
*/
;(function($){
EYE.extend({
getPosition : function(e, forceIt)
{
var x = 0;
var y = 0;
var es = e.style;
var restoreStyles = false;
if (forceIt && jQuery.curCSS(e,'display') == 'none') {
var oldVisibility = es.visibility;
... | JavaScript |
/*
* Thickbox 3.1 - One Box To Rule Them All.
* By Cody Lindley (http://www.codylindley.com)
* Copyright (c) 2007 cody lindley
* Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
var tb_pathToImage = "/theme/default/images/loadingAnimation.gif";
/*!!!!!!!!!!!!!!!!! edit bel... | JavaScript |
/*
* Laconica - a distributed open-source microblogging tool
* Copyright (C) 2008, Controlez-Vous, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, ... | JavaScript |
/* is this stuff defined? */
if (!document.ELEMENT_NODE) {
document.ELEMENT_NODE = 1;
document.ATTRIBUTE_NODE = 2;
document.TEXT_NODE = 3;
document.CDATA_SECTION_NODE = 4;
document.ENTITY_REFERENCE_NODE = 5;
document.ENTITY_NODE = 6;
document.PROCESSING_INSTRUCTION_NODE = 7;
document.COMMENT_NODE = 8;
document... | JavaScript |
// jQuery Context Menu Plugin
//
// Version 1.00
//
// Cory S.N. LaViska
// A Beautiful Site (http://abeautifulsite.net/)
//
// Visit http://abeautifulsite.net/notebook/80 for usage and more information
//
// Terms of Use
//
// This software is licensed under a Creative Commons License and is copyrighted
//... | JavaScript |
$(document).ready( function() {
$('#bodycolor').ColorPicker({
onShow: function (colpkr) {
$(colpkr).fadeIn(500);
return false;
},
onHide: function (colpkr) {
$(colpkr).fadeOut(500);
return false;
},
onSubmi... | JavaScript |
/*
* jQuery Form Plugin
* version: 2.24 (10-MAR-2009)
* @requires jQuery v1.2.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
... | JavaScript |
/**
*
* Zoomimage
* Author: Stefan Petre www.eyecon.ro
*
*/
;(function($){
var EYE = window.EYE = function() {
var _registered = {
init: []
};
return {
init: function() {
$.each(_registered.init, function(nr, fn){
fn.call();
});
},
extend: function(prop) {
for... | JavaScript |
/**
*
* Color picker
* Author: Stefan Petre www.eyecon.ro
*
*/
;(function($) {
var ColorPicker = function () {
var
ids = {},
inAction,
charMin = 65,
visible,
tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div>... | JavaScript |
;(function($){
var initLayout = function() {
var hash = window.location.hash.replace('#', '');
var currentTab = $('ul.navigationTabs a')
.bind('click', showTab)
.filter('a[rel=' + hash + ']');
if (currentTab.size() == 0) {
currentTab = $('ul.navigationTabs a:first');
}
showTab.apply... | JavaScript |
/*
* jQuery plugin: fieldSelection - v0.1.0 - last change: 2006-12-16
* (c) 2006 Alex Brem <alex@0xab.cd> - http://blog.0xab.cd
*/
(function() {
var fieldSelection = {
getSelection: function() {
var e = this.jquery ? this[0] : this;
return (
/* mozilla / dom 3.0 */
('selectionS... | JavaScript |
/*
* Laconica - a distributed open-source microblogging tool
* Copyright (C) 2008, Controlez-Vous, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of t... | JavaScript |
// identica badge -- updated to work with the native API, 12-4-2008
// copyright Kent Brewster 2008
// see http://kentbrewster.com/identica-badge for info
( function() {
var trueName = '';
for (var i = 0; i < 16; i++) {
trueName += String.fromCharCode(Math.floor(Math.random() * 26) + 97);
}
window[... | JavaScript |
(function($){
$.fn.popupWindow = function(instanceSettings){
return this.each(function(){
$(this).click(function(){
$.fn.popupWindow.defaultSettings = {
centerBrowser:0, // center window over browser window? {1 (YES) or 0 (NO)}. overrides top and left
centerScreen:0, // center window over ent... | JavaScript |
$(function(){
var x = ($('#avatar_crop_x').val()) ? $('#avatar_crop_x').val() : 0;
var y = ($('#avatar_crop_y').val()) ? $('#avatar_crop_y').val() : 0;
var w = ($('#avatar_crop_w').val()) ? $('#avatar_crop_w').val() : $("#avatar_original img").attr("width");
var h = ($('#avatar_crop_h').val()) ? $('#avata... | JavaScript |
/*
Author: Robert Hashemian
http://www.hashemian.com/
You can use this code in any manner so long as the author's
name, Web address and this disclaimer is kept intact.
********************************************************
Usage Sample:
<script language="JavaScript">
TargetDate = "12/31/2020 5:00 AM";
... | JavaScript |
/* =========================================================
// jquery.innerfade.js
// Datum: 2008-02-14
// Firma: Medienfreunde Hofmann & Baldes GbR
// Author: Torsten Baldes
// Mail: t.baldes@medienfreunde.com
// Web: http://medienfreunde.com
// based on the work of Matt Oakes http://portfolio.gizone.co.... | JavaScript |
/*
Quicksand 1.2.2
Reorder and filter items with a nice shuffling animation.
Copyright (c) 2010 Jacek Galanciak (razorjack.net) and agilope.com
Big thanks for Piotr Petrus (riddle.pl) for deep code review and wonderful docs & demos.
Dual licensed under the MIT and GPL version 2 licenses.
http://github.com/jquery/jq... | JavaScript |
var target; // 호출한 Object의 저장
var stime;
document.write("<div id=minical oncontextmenu='return false' ondragstart='return false' onselectstart='return false' style=\"background:buttonface; margin:5; padding:5;margin-top:2;border-top:1 solid buttonshadow;border-left: 1 solid buttonshadow;border-rig... | JavaScript |
var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'locale': {} };
// Allow other JavaScript libraries to use $.
jQuery.noConflict();
(function ($) {
/**
* Override jQuery.fn.init to guard against XSS attacks.
*
* See http://bugs.jquery.com/ticket/9521
*/
var jquery_init = $.fn.init;
$.fn.init = function... | JavaScript |
(function ($) {
/**
* Drag and drop table rows with field manipulation.
*
* Using the drupal_add_tabledrag() function, any table with weights or parent
* relationships may be made into draggable tables. Columns containing a field
* may optionally be hidden, providing a better user experience.
*
* Created tableD... | JavaScript |
(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'... | JavaScript |
(function ($) {
/**
* Attach the machine-readable name form element behavior.
*/
Drupal.behaviors.machineName = {
/**
* Attaches the behavior.
*
* @param settings.machineName
* A list of elements to process, keyed by the HTML ID of the form element
* containing the human-readable value. Each ele... | JavaScript |
(function ($) {
Drupal.behaviors.tableSelect = {
attach: function (context, settings) {
// Select the inner-most table in case of nested tables.
$('th.select-all', context).closest('table').once('table-select', Drupal.tableSelect);
}
};
Drupal.tableSelect = function () {
// Do not add a "Select all" che... | JavaScript |
/**
* 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 |
/**
* @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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.